We say the FAIG Alists
This is a universal equivalence, introduced using def-universal-equiv.
Function:
(defun faig-alist-equiv (x y) (declare (xargs :non-executable t)) (declare (xargs :guard t)) (prog2$ (throw-nonexec-error 'faig-alist-equiv (list x y)) (let ((k (faig-alist-equiv-witness x y))) (and (iff (hons-assoc-equal k x) (hons-assoc-equal k y)) (faig-equiv (cdr (hons-assoc-equal k x)) (cdr (hons-assoc-equal k y)))))))
Theorem:
(defthm faig-alist-equiv-necc (implies (not (and (iff (hons-assoc-equal k x) (hons-assoc-equal k y)) (faig-equiv (cdr (hons-assoc-equal k x)) (cdr (hons-assoc-equal k y))))) (not (faig-alist-equiv x y))))
Theorem:
(defthm faig-alist-equiv-witnessing-witness-rule-correct (implies (not ((lambda (k y x) (not (if (iff (hons-assoc-equal k x) (hons-assoc-equal k y)) (faig-equiv (cdr (hons-assoc-equal k x)) (cdr (hons-assoc-equal k y))) 'nil))) (faig-alist-equiv-witness x y) y x)) (faig-alist-equiv x y)) :rule-classes nil)
Theorem:
(defthm faig-alist-equiv-instancing-instance-rule-correct (implies (not (if (iff (hons-assoc-equal k x) (hons-assoc-equal k y)) (faig-equiv (cdr (hons-assoc-equal k x)) (cdr (hons-assoc-equal k y))) 'nil)) (not (faig-alist-equiv x y))) :rule-classes nil)
Theorem:
(defthm faig-alist-equiv-is-an-equivalence (and (booleanp (faig-alist-equiv x y)) (faig-alist-equiv x x) (implies (faig-alist-equiv x y) (faig-alist-equiv y x)) (implies (and (faig-alist-equiv x y) (faig-alist-equiv y z)) (faig-alist-equiv x z))) :rule-classes (:equivalence))