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