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