Fixing function for maybe-fgl-generic-rule structures.
(maybe-fgl-generic-rule-fix x) → new-x
Function:
(defun maybe-fgl-generic-rule-fix$inline (x) (declare (xargs :guard (maybe-fgl-generic-rule-p x))) (let ((__function__ 'maybe-fgl-generic-rule-fix)) (declare (ignorable __function__)) (mbe :logic (cond ((not x) nil) (t (b* ((fty::val (fgl-generic-rule-fix x))) fty::val))) :exec x)))
Theorem:
(defthm maybe-fgl-generic-rule-p-of-maybe-fgl-generic-rule-fix (b* ((new-x (maybe-fgl-generic-rule-fix$inline x))) (maybe-fgl-generic-rule-p new-x)) :rule-classes :rewrite)
Theorem:
(defthm maybe-fgl-generic-rule-fix-when-maybe-fgl-generic-rule-p (implies (maybe-fgl-generic-rule-p x) (equal (maybe-fgl-generic-rule-fix x) x)))
Function:
(defun maybe-fgl-generic-rule-equiv$inline (x y) (declare (xargs :guard (and (maybe-fgl-generic-rule-p x) (maybe-fgl-generic-rule-p y)))) (equal (maybe-fgl-generic-rule-fix x) (maybe-fgl-generic-rule-fix y)))
Theorem:
(defthm maybe-fgl-generic-rule-equiv-is-an-equivalence (and (booleanp (maybe-fgl-generic-rule-equiv x y)) (maybe-fgl-generic-rule-equiv x x) (implies (maybe-fgl-generic-rule-equiv x y) (maybe-fgl-generic-rule-equiv y x)) (implies (and (maybe-fgl-generic-rule-equiv x y) (maybe-fgl-generic-rule-equiv y z)) (maybe-fgl-generic-rule-equiv x z))) :rule-classes (:equivalence))
Theorem:
(defthm maybe-fgl-generic-rule-equiv-implies-equal-maybe-fgl-generic-rule-fix-1 (implies (maybe-fgl-generic-rule-equiv x x-equiv) (equal (maybe-fgl-generic-rule-fix x) (maybe-fgl-generic-rule-fix x-equiv))) :rule-classes (:congruence))
Theorem:
(defthm maybe-fgl-generic-rule-fix-under-maybe-fgl-generic-rule-equiv (maybe-fgl-generic-rule-equiv (maybe-fgl-generic-rule-fix x) x) :rule-classes (:rewrite :rewrite-quoted-constant))
Theorem:
(defthm equal-of-maybe-fgl-generic-rule-fix-1-forward-to-maybe-fgl-generic-rule-equiv (implies (equal (maybe-fgl-generic-rule-fix x) y) (maybe-fgl-generic-rule-equiv x y)) :rule-classes :forward-chaining)
Theorem:
(defthm equal-of-maybe-fgl-generic-rule-fix-2-forward-to-maybe-fgl-generic-rule-equiv (implies (equal x (maybe-fgl-generic-rule-fix y)) (maybe-fgl-generic-rule-equiv x y)) :rule-classes :forward-chaining)
Theorem:
(defthm maybe-fgl-generic-rule-equiv-of-maybe-fgl-generic-rule-fix-1-forward (implies (maybe-fgl-generic-rule-equiv (maybe-fgl-generic-rule-fix x) y) (maybe-fgl-generic-rule-equiv x y)) :rule-classes :forward-chaining)
Theorem:
(defthm maybe-fgl-generic-rule-equiv-of-maybe-fgl-generic-rule-fix-2-forward (implies (maybe-fgl-generic-rule-equiv x (maybe-fgl-generic-rule-fix y)) (maybe-fgl-generic-rule-equiv x y)) :rule-classes :forward-chaining)