Fixing function for matchmode structures.
(matchmode-fix x) → new-x
Function:
(defun matchmode-fix$inline (x) (declare (xargs :guard (matchmode-p x))) (let ((__function__ 'matchmode-fix)) (declare (ignorable __function__)) (mbe :logic (b* ((case-insens (acl2::bool-fix x))) case-insens) :exec x)))
Theorem:
(defthm matchmode-p-of-matchmode-fix (b* ((new-x (matchmode-fix$inline x))) (matchmode-p new-x)) :rule-classes :rewrite)
Theorem:
(defthm matchmode-fix-when-matchmode-p (implies (matchmode-p x) (equal (matchmode-fix x) x)))
Function:
(defun matchmode-equiv$inline (acl2::x acl2::y) (declare (xargs :guard (and (matchmode-p acl2::x) (matchmode-p acl2::y)))) (equal (matchmode-fix acl2::x) (matchmode-fix acl2::y)))
Theorem:
(defthm matchmode-equiv-is-an-equivalence (and (booleanp (matchmode-equiv x y)) (matchmode-equiv x x) (implies (matchmode-equiv x y) (matchmode-equiv y x)) (implies (and (matchmode-equiv x y) (matchmode-equiv y z)) (matchmode-equiv x z))) :rule-classes (:equivalence))
Theorem:
(defthm matchmode-equiv-implies-equal-matchmode-fix-1 (implies (matchmode-equiv acl2::x x-equiv) (equal (matchmode-fix acl2::x) (matchmode-fix x-equiv))) :rule-classes (:congruence))
Theorem:
(defthm matchmode-fix-under-matchmode-equiv (matchmode-equiv (matchmode-fix acl2::x) acl2::x) :rule-classes (:rewrite :rewrite-quoted-constant))
Theorem:
(defthm equal-of-matchmode-fix-1-forward-to-matchmode-equiv (implies (equal (matchmode-fix acl2::x) acl2::y) (matchmode-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm equal-of-matchmode-fix-2-forward-to-matchmode-equiv (implies (equal acl2::x (matchmode-fix acl2::y)) (matchmode-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm matchmode-equiv-of-matchmode-fix-1-forward (implies (matchmode-equiv (matchmode-fix acl2::x) acl2::y) (matchmode-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm matchmode-equiv-of-matchmode-fix-2-forward (implies (matchmode-equiv acl2::x (matchmode-fix acl2::y)) (matchmode-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)