This is a universal equivalence, introduced using def-universal-equiv.
Function:
(defun bdd-equiv (x y) (declare (xargs :non-executable t)) (declare (xargs :guard t)) (prog2$ (throw-nonexec-error 'bdd-equiv (list x y)) (let ((env (bdd-equiv-witness x y))) (and (equal (eval-bdd x env) (eval-bdd y env))))))
Theorem:
(defthm bdd-equiv-necc (implies (not (and (equal (eval-bdd x env) (eval-bdd y env)))) (not (bdd-equiv x y))))
Theorem:
(defthm bdd-equiv-is-an-equivalence (and (booleanp (bdd-equiv x y)) (bdd-equiv x x) (implies (bdd-equiv x y) (bdd-equiv y x)) (implies (and (bdd-equiv x y) (bdd-equiv y z)) (bdd-equiv x z))) :rule-classes (:equivalence))