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