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