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