(pseudo-fn-fix x) → new-x
Function:
(defun pseudo-fn-fix (x) (declare (xargs :guard (pseudo-fn-p x))) (let ((__function__ 'pseudo-fn-fix)) (declare (ignorable __function__)) (mbe :logic (if (consp x) (pseudo-lambda-fix x) (pseudo-fnsym-fix x)) :exec x)))
Theorem:
(defthm pseudo-fn-p-of-pseudo-fn-fix (b* ((new-x (pseudo-fn-fix x))) (pseudo-fn-p new-x)) :rule-classes :rewrite)
Theorem:
(defthm pseudo-fn-fix-when-pseudo-fn-p (implies (pseudo-fn-p x) (equal (pseudo-fn-fix x) x)))
Theorem:
(defthm pseudo-fn-fix-when-consp (implies (consp x) (equal (pseudo-fn-fix x) (pseudo-lambda-fix x))))
Theorem:
(defthm pseudo-fn-fix-when-not-consp (implies (not (consp x)) (equal (pseudo-fn-fix x) (pseudo-fnsym-fix x))))
Function:
(defun pseudo-fn-equiv$inline (x y) (declare (xargs :guard (and (pseudo-fn-p x) (pseudo-fn-p y)))) (equal (pseudo-fn-fix x) (pseudo-fn-fix y)))
Theorem:
(defthm pseudo-fn-equiv-is-an-equivalence (and (booleanp (pseudo-fn-equiv x y)) (pseudo-fn-equiv x x) (implies (pseudo-fn-equiv x y) (pseudo-fn-equiv y x)) (implies (and (pseudo-fn-equiv x y) (pseudo-fn-equiv y z)) (pseudo-fn-equiv x z))) :rule-classes (:equivalence))
Theorem:
(defthm pseudo-fn-equiv-implies-equal-pseudo-fn-fix-1 (implies (pseudo-fn-equiv x x-equiv) (equal (pseudo-fn-fix x) (pseudo-fn-fix x-equiv))) :rule-classes (:congruence))
Theorem:
(defthm pseudo-fn-fix-under-pseudo-fn-equiv (pseudo-fn-equiv (pseudo-fn-fix x) x) :rule-classes (:rewrite :rewrite-quoted-constant))
Theorem:
(defthm pseudo-fn-fix-of-pseudo-fn-fix-x (equal (pseudo-fn-fix (pseudo-fn-fix x)) (pseudo-fn-fix x)))
Theorem:
(defthm pseudo-fn-fix-pseudo-fn-equiv-congruence-on-x (implies (pseudo-fn-equiv x x-equiv) (equal (pseudo-fn-fix x) (pseudo-fn-fix x-equiv))) :rule-classes :congruence)