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