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