(pseudo-lambda-fix x) → lambda
Function:
(defun pseudo-lambda-fix (x) (declare (xargs :guard (pseudo-lambda-p x))) (let ((__function__ 'pseudo-lambda-fix)) (declare (ignorable __function__)) (mbe :logic (b* ((formals (cadr x)) (body (caddr x))) (list 'lambda (replace-non-symbols-with-nil formals) (pseudo-term-fix body))) :exec x)))
Theorem:
(defthm pseudo-lambda-p-of-pseudo-lambda-fix (b* ((lambda (pseudo-lambda-fix x))) (pseudo-lambda-p lambda)) :rule-classes (:rewrite (:type-prescription :typed-term (pseudo-lambda-fix x))))
Theorem:
(defthm pseudo-lambda-fix-when-pseudo-lambda-p (implies (pseudo-lambda-p x) (equal (pseudo-lambda-fix x) x)))
Function:
(defun pseudo-lambda-equiv$inline (x y) (declare (xargs :guard (and (pseudo-lambda-p x) (pseudo-lambda-p y)))) (equal (pseudo-lambda-fix x) (pseudo-lambda-fix y)))
Theorem:
(defthm pseudo-lambda-equiv-is-an-equivalence (and (booleanp (pseudo-lambda-equiv x y)) (pseudo-lambda-equiv x x) (implies (pseudo-lambda-equiv x y) (pseudo-lambda-equiv y x)) (implies (and (pseudo-lambda-equiv x y) (pseudo-lambda-equiv y z)) (pseudo-lambda-equiv x z))) :rule-classes (:equivalence))
Theorem:
(defthm pseudo-lambda-equiv-implies-equal-pseudo-lambda-fix-1 (implies (pseudo-lambda-equiv x x-equiv) (equal (pseudo-lambda-fix x) (pseudo-lambda-fix x-equiv))) :rule-classes (:congruence))
Theorem:
(defthm pseudo-lambda-fix-under-pseudo-lambda-equiv (pseudo-lambda-equiv (pseudo-lambda-fix x) x) :rule-classes (:rewrite :rewrite-quoted-constant))
Theorem:
(defthm pseudo-lambda-fix-of-pseudo-lambda-fix-x (equal (pseudo-lambda-fix (pseudo-lambda-fix x)) (pseudo-lambda-fix x)))
Theorem:
(defthm pseudo-lambda-fix-pseudo-lambda-equiv-congruence-on-x (implies (pseudo-lambda-equiv x x-equiv) (equal (pseudo-lambda-fix x) (pseudo-lambda-fix x-equiv))) :rule-classes :congruence)