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