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