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