Fixing function for let-binding structures.
(let-binding-fix x) → new-x
Function:
(defun let-binding-fix$inline (x) (declare (xargs :guard (let-binding-p x))) (let ((acl2::__function__ 'let-binding-fix)) (declare (ignorable acl2::__function__)) (mbe :logic (b* ((bindings (binding-list-fix (cdr (std::da-nth 0 x)))) (hypotheses (hint-pair-list-fix (cdr (std::da-nth 1 x))))) (list (cons 'bindings bindings) (cons 'hypotheses hypotheses))) :exec x)))
Theorem:
(defthm let-binding-p-of-let-binding-fix (b* ((new-x (let-binding-fix$inline x))) (let-binding-p new-x)) :rule-classes :rewrite)
Theorem:
(defthm let-binding-fix-when-let-binding-p (implies (let-binding-p x) (equal (let-binding-fix x) x)))
Function:
(defun let-binding-equiv$inline (acl2::x acl2::y) (declare (xargs :guard (and (let-binding-p acl2::x) (let-binding-p acl2::y)))) (equal (let-binding-fix acl2::x) (let-binding-fix acl2::y)))
Theorem:
(defthm let-binding-equiv-is-an-equivalence (and (booleanp (let-binding-equiv x y)) (let-binding-equiv x x) (implies (let-binding-equiv x y) (let-binding-equiv y x)) (implies (and (let-binding-equiv x y) (let-binding-equiv y z)) (let-binding-equiv x z))) :rule-classes (:equivalence))
Theorem:
(defthm let-binding-equiv-implies-equal-let-binding-fix-1 (implies (let-binding-equiv acl2::x x-equiv) (equal (let-binding-fix acl2::x) (let-binding-fix x-equiv))) :rule-classes (:congruence))
Theorem:
(defthm let-binding-fix-under-let-binding-equiv (let-binding-equiv (let-binding-fix acl2::x) acl2::x) :rule-classes (:rewrite :rewrite-quoted-constant))
Theorem:
(defthm equal-of-let-binding-fix-1-forward-to-let-binding-equiv (implies (equal (let-binding-fix acl2::x) acl2::y) (let-binding-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm equal-of-let-binding-fix-2-forward-to-let-binding-equiv (implies (equal acl2::x (let-binding-fix acl2::y)) (let-binding-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm let-binding-equiv-of-let-binding-fix-1-forward (implies (let-binding-equiv (let-binding-fix acl2::x) acl2::y) (let-binding-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm let-binding-equiv-of-let-binding-fix-2-forward (implies (let-binding-equiv acl2::x (let-binding-fix acl2::y)) (let-binding-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)