This is a universal equivalence, introduced using def-universal-equiv.
Function:
(defun svex-alist-eval-equiv (x y) (declare (xargs :non-executable t)) (declare (xargs :guard t)) (declare (xargs :non-executable t)) (prog2$ (acl2::throw-nonexec-error 'svex-alist-eval-equiv (list x y)) (let ((var (svex-alist-eval-equiv-witness x y))) (and (svex-eval-equiv (svex-lookup var x) (svex-lookup var y)) (iff (svex-lookup var x) (svex-lookup var y))))))
Theorem:
(defthm svex-alist-eval-equiv-necc (implies (not (and (svex-eval-equiv (svex-lookup var x) (svex-lookup var y)) (iff (svex-lookup var x) (svex-lookup var y)))) (not (svex-alist-eval-equiv x y))))
Theorem:
(defthm svex-alist-eval-equiv-witnessing-witness-rule-correct (implies (not ((lambda (var y x) (not (if (svex-eval-equiv (svex-lookup var x) (svex-lookup var y)) (iff (svex-lookup var x) (svex-lookup var y)) 'nil))) (svex-alist-eval-equiv-witness x y) y x)) (svex-alist-eval-equiv x y)) :rule-classes nil)
Theorem:
(defthm svex-alist-eval-equiv-instancing-instance-rule-correct (implies (not (if (svex-eval-equiv (svex-lookup var x) (svex-lookup var y)) (iff (svex-lookup var x) (svex-lookup var y)) 'nil)) (not (svex-alist-eval-equiv x y))) :rule-classes nil)
Theorem:
(defthm svex-alist-eval-equiv-is-an-equivalence (and (booleanp (svex-alist-eval-equiv x y)) (svex-alist-eval-equiv x x) (implies (svex-alist-eval-equiv x y) (svex-alist-eval-equiv y x)) (implies (and (svex-alist-eval-equiv x y) (svex-alist-eval-equiv y z)) (svex-alist-eval-equiv x z))) :rule-classes (:equivalence))