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