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