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