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