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