Fixing function for boolean-value structures.
(boolean-value-fix x) → new-x
Function:
(defun boolean-value-fix$inline (x) (declare (xargs :guard (boolean-valuep x))) (let ((__function__ 'boolean-value-fix)) (declare (ignorable __function__)) (mbe :logic (b* ((bool (acl2::bool-fix (std::da-nth 0 (cdr x))))) (cons :boolean (list bool))) :exec x)))
Theorem:
(defthm boolean-valuep-of-boolean-value-fix (b* ((new-x (boolean-value-fix$inline x))) (boolean-valuep new-x)) :rule-classes :rewrite)
Theorem:
(defthm boolean-value-fix-when-boolean-valuep (implies (boolean-valuep x) (equal (boolean-value-fix x) x)))
Function:
(defun boolean-value-equiv$inline (acl2::x acl2::y) (declare (xargs :guard (and (boolean-valuep acl2::x) (boolean-valuep acl2::y)))) (equal (boolean-value-fix acl2::x) (boolean-value-fix acl2::y)))
Theorem:
(defthm boolean-value-equiv-is-an-equivalence (and (booleanp (boolean-value-equiv x y)) (boolean-value-equiv x x) (implies (boolean-value-equiv x y) (boolean-value-equiv y x)) (implies (and (boolean-value-equiv x y) (boolean-value-equiv y z)) (boolean-value-equiv x z))) :rule-classes (:equivalence))
Theorem:
(defthm boolean-value-equiv-implies-equal-boolean-value-fix-1 (implies (boolean-value-equiv acl2::x x-equiv) (equal (boolean-value-fix acl2::x) (boolean-value-fix x-equiv))) :rule-classes (:congruence))
Theorem:
(defthm boolean-value-fix-under-boolean-value-equiv (boolean-value-equiv (boolean-value-fix acl2::x) acl2::x) :rule-classes (:rewrite :rewrite-quoted-constant))
Theorem:
(defthm equal-of-boolean-value-fix-1-forward-to-boolean-value-equiv (implies (equal (boolean-value-fix acl2::x) acl2::y) (boolean-value-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm equal-of-boolean-value-fix-2-forward-to-boolean-value-equiv (implies (equal acl2::x (boolean-value-fix acl2::y)) (boolean-value-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm boolean-value-equiv-of-boolean-value-fix-1-forward (implies (boolean-value-equiv (boolean-value-fix acl2::x) acl2::y) (boolean-value-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm boolean-value-equiv-of-boolean-value-fix-2-forward (implies (boolean-value-equiv acl2::x (boolean-value-fix acl2::y)) (boolean-value-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)