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