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