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