Fixing function for mode structures.
Function:
(defun mode-fix$inline (x) (declare (xargs :guard (modep x))) (let ((__function__ 'mode-fix)) (declare (ignorable __function__)) (mbe :logic (case (mode-kind x) (:absorb (cons :absorb (list))) (:squeeze (cons :squeeze (list)))) :exec x)))
Theorem:
(defthm modep-of-mode-fix (b* ((new-x (mode-fix$inline x))) (modep new-x)) :rule-classes :rewrite)
Theorem:
(defthm mode-fix-when-modep (implies (modep x) (equal (mode-fix x) x)))
Function:
(defun mode-equiv$inline (acl2::x acl2::y) (declare (xargs :guard (and (modep acl2::x) (modep acl2::y)))) (equal (mode-fix acl2::x) (mode-fix acl2::y)))
Theorem:
(defthm mode-equiv-is-an-equivalence (and (booleanp (mode-equiv x y)) (mode-equiv x x) (implies (mode-equiv x y) (mode-equiv y x)) (implies (and (mode-equiv x y) (mode-equiv y z)) (mode-equiv x z))) :rule-classes (:equivalence))
Theorem:
(defthm mode-equiv-implies-equal-mode-fix-1 (implies (mode-equiv acl2::x x-equiv) (equal (mode-fix acl2::x) (mode-fix x-equiv))) :rule-classes (:congruence))
Theorem:
(defthm mode-fix-under-mode-equiv (mode-equiv (mode-fix acl2::x) acl2::x) :rule-classes (:rewrite :rewrite-quoted-constant))
Theorem:
(defthm equal-of-mode-fix-1-forward-to-mode-equiv (implies (equal (mode-fix acl2::x) acl2::y) (mode-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm equal-of-mode-fix-2-forward-to-mode-equiv (implies (equal acl2::x (mode-fix acl2::y)) (mode-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm mode-equiv-of-mode-fix-1-forward (implies (mode-equiv (mode-fix acl2::x) acl2::y) (mode-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm mode-equiv-of-mode-fix-2-forward (implies (mode-equiv acl2::x (mode-fix acl2::y)) (mode-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm mode-kind$inline-of-mode-fix-x (equal (mode-kind$inline (mode-fix x)) (mode-kind$inline x)))
Theorem:
(defthm mode-kind$inline-mode-equiv-congruence-on-x (implies (mode-equiv x x-equiv) (equal (mode-kind$inline x) (mode-kind$inline x-equiv))) :rule-classes :congruence)
Theorem:
(defthm consp-of-mode-fix (consp (mode-fix x)) :rule-classes :type-prescription)