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