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