Basic equivalence relation for lhbit structures.
Function:
(defun lhbit-equiv$inline (x y) (declare (xargs :guard (and (lhbit-p x) (lhbit-p y)))) (equal (lhbit-fix x) (lhbit-fix y)))
Theorem:
(defthm lhbit-equiv-is-an-equivalence (and (booleanp (lhbit-equiv x y)) (lhbit-equiv x x) (implies (lhbit-equiv x y) (lhbit-equiv y x)) (implies (and (lhbit-equiv x y) (lhbit-equiv y z)) (lhbit-equiv x z))) :rule-classes (:equivalence))
Theorem:
(defthm lhbit-equiv-implies-equal-lhbit-fix-1 (implies (lhbit-equiv x x-equiv) (equal (lhbit-fix x) (lhbit-fix x-equiv))) :rule-classes (:congruence))
Theorem:
(defthm lhbit-fix-under-lhbit-equiv (lhbit-equiv (lhbit-fix x) x) :rule-classes (:rewrite :rewrite-quoted-constant))
Theorem:
(defthm equal-of-lhbit-fix-1-forward-to-lhbit-equiv (implies (equal (lhbit-fix x) y) (lhbit-equiv x y)) :rule-classes :forward-chaining)
Theorem:
(defthm equal-of-lhbit-fix-2-forward-to-lhbit-equiv (implies (equal x (lhbit-fix y)) (lhbit-equiv x y)) :rule-classes :forward-chaining)
Theorem:
(defthm lhbit-equiv-of-lhbit-fix-1-forward (implies (lhbit-equiv (lhbit-fix x) y) (lhbit-equiv x y)) :rule-classes :forward-chaining)
Theorem:
(defthm lhbit-equiv-of-lhbit-fix-2-forward (implies (lhbit-equiv x (lhbit-fix y)) (lhbit-equiv x y)) :rule-classes :forward-chaining)