Basic equivalence relation for fsm structures.
Function:
(defun fsm-equiv$inline (x y) (declare (xargs :guard (and (fsm-p x) (fsm-p y)))) (equal (fsm-fix x) (fsm-fix y)))
Theorem:
(defthm fsm-equiv-is-an-equivalence (and (booleanp (fsm-equiv x y)) (fsm-equiv x x) (implies (fsm-equiv x y) (fsm-equiv y x)) (implies (and (fsm-equiv x y) (fsm-equiv y z)) (fsm-equiv x z))) :rule-classes (:equivalence))
Theorem:
(defthm fsm-equiv-implies-equal-fsm-fix-1 (implies (fsm-equiv x x-equiv) (equal (fsm-fix x) (fsm-fix x-equiv))) :rule-classes (:congruence))
Theorem:
(defthm fsm-fix-under-fsm-equiv (fsm-equiv (fsm-fix x) x) :rule-classes (:rewrite :rewrite-quoted-constant))
Theorem:
(defthm equal-of-fsm-fix-1-forward-to-fsm-equiv (implies (equal (fsm-fix x) y) (fsm-equiv x y)) :rule-classes :forward-chaining)
Theorem:
(defthm equal-of-fsm-fix-2-forward-to-fsm-equiv (implies (equal x (fsm-fix y)) (fsm-equiv x y)) :rule-classes :forward-chaining)
Theorem:
(defthm fsm-equiv-of-fsm-fix-1-forward (implies (fsm-equiv (fsm-fix x) y) (fsm-equiv x y)) :rule-classes :forward-chaining)
Theorem:
(defthm fsm-equiv-of-fsm-fix-2-forward (implies (fsm-equiv x (fsm-fix y)) (fsm-equiv x y)) :rule-classes :forward-chaining)