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