Fixing function for lhprobe structures.
Function:
(defun lhprobe-fix$inline (x) (declare (xargs :guard (lhprobe-p x))) (let ((__function__ 'lhprobe-fix)) (declare (ignorable __function__)) (mbe :logic (b* ((lhs (lhs-fix (car x))) (stage (nfix (car (cdr x)))) (signedp (bool-fix (cdr (cdr x))))) (cons lhs (cons stage signedp))) :exec x)))
Theorem:
(defthm lhprobe-p-of-lhprobe-fix (b* ((new-x (lhprobe-fix$inline x))) (lhprobe-p new-x)) :rule-classes :rewrite)
Theorem:
(defthm lhprobe-fix-when-lhprobe-p (implies (lhprobe-p x) (equal (lhprobe-fix x) x)))
Function:
(defun lhprobe-equiv$inline (x y) (declare (xargs :guard (and (lhprobe-p x) (lhprobe-p y)))) (equal (lhprobe-fix x) (lhprobe-fix y)))
Theorem:
(defthm lhprobe-equiv-is-an-equivalence (and (booleanp (lhprobe-equiv x y)) (lhprobe-equiv x x) (implies (lhprobe-equiv x y) (lhprobe-equiv y x)) (implies (and (lhprobe-equiv x y) (lhprobe-equiv y z)) (lhprobe-equiv x z))) :rule-classes (:equivalence))
Theorem:
(defthm lhprobe-equiv-implies-equal-lhprobe-fix-1 (implies (lhprobe-equiv x x-equiv) (equal (lhprobe-fix x) (lhprobe-fix x-equiv))) :rule-classes (:congruence))
Theorem:
(defthm lhprobe-fix-under-lhprobe-equiv (lhprobe-equiv (lhprobe-fix x) x) :rule-classes (:rewrite :rewrite-quoted-constant))
Theorem:
(defthm equal-of-lhprobe-fix-1-forward-to-lhprobe-equiv (implies (equal (lhprobe-fix x) y) (lhprobe-equiv x y)) :rule-classes :forward-chaining)
Theorem:
(defthm equal-of-lhprobe-fix-2-forward-to-lhprobe-equiv (implies (equal x (lhprobe-fix y)) (lhprobe-equiv x y)) :rule-classes :forward-chaining)
Theorem:
(defthm lhprobe-equiv-of-lhprobe-fix-1-forward (implies (lhprobe-equiv (lhprobe-fix x) y) (lhprobe-equiv x y)) :rule-classes :forward-chaining)
Theorem:
(defthm lhprobe-equiv-of-lhprobe-fix-2-forward (implies (lhprobe-equiv x (lhprobe-fix y)) (lhprobe-equiv x y)) :rule-classes :forward-chaining)