Fixing function for bfrstate objects.
(bfrstate-fix x) → new-x
Function:
(defun bfrstate-fix$inline (x) (declare (xargs :guard (bfrstate-p x))) (let ((__function__ 'bfrstate-fix)) (declare (ignorable __function__)) (mbe :logic (logior (logand -4 (nfix x)) (bfr-mode-fix (logand 3 (nfix x)))) :exec x)))
Theorem:
(defthm bfrstate-p-of-bfrstate-fix (b* ((new-x (bfrstate-fix$inline x))) (bfrstate-p new-x)) :rule-classes :rewrite)
Theorem:
(defthm bfrstate-fix-when-bfrstate-p (implies (bfrstate-p x) (equal (bfrstate-fix x) x)))
Function:
(defun bfrstate-equiv$inline (x y) (declare (xargs :guard (and (bfrstate-p x) (bfrstate-p y)))) (equal (bfrstate-fix x) (bfrstate-fix y)))
Theorem:
(defthm bfrstate-equiv-is-an-equivalence (and (booleanp (bfrstate-equiv x y)) (bfrstate-equiv x x) (implies (bfrstate-equiv x y) (bfrstate-equiv y x)) (implies (and (bfrstate-equiv x y) (bfrstate-equiv y z)) (bfrstate-equiv x z))) :rule-classes (:equivalence))
Theorem:
(defthm bfrstate-equiv-implies-equal-bfrstate-fix-1 (implies (bfrstate-equiv x x-equiv) (equal (bfrstate-fix x) (bfrstate-fix x-equiv))) :rule-classes (:congruence))
Theorem:
(defthm bfrstate-fix-under-bfrstate-equiv (bfrstate-equiv (bfrstate-fix x) x) :rule-classes (:rewrite :rewrite-quoted-constant))
Theorem:
(defthm equal-of-bfrstate-fix-1-forward-to-bfrstate-equiv (implies (equal (bfrstate-fix x) y) (bfrstate-equiv x y)) :rule-classes :forward-chaining)
Theorem:
(defthm equal-of-bfrstate-fix-2-forward-to-bfrstate-equiv (implies (equal x (bfrstate-fix y)) (bfrstate-equiv x y)) :rule-classes :forward-chaining)
Theorem:
(defthm bfrstate-equiv-of-bfrstate-fix-1-forward (implies (bfrstate-equiv (bfrstate-fix x) y) (bfrstate-equiv x y)) :rule-classes :forward-chaining)
Theorem:
(defthm bfrstate-equiv-of-bfrstate-fix-2-forward (implies (bfrstate-equiv x (bfrstate-fix y)) (bfrstate-equiv x y)) :rule-classes :forward-chaining)
Theorem:
(defthm bfrstate-fix$inline-of-bfrstate-fix-x (equal (bfrstate-fix$inline (bfrstate-fix x)) (bfrstate-fix$inline x)))
Theorem:
(defthm bfrstate-fix$inline-bfrstate-equiv-congruence-on-x (implies (bfrstate-equiv x x-equiv) (equal (bfrstate-fix$inline x) (bfrstate-fix$inline x-equiv))) :rule-classes :congruence)