(fgl-generic-rule-fix x) is a ACL2::fty fixing function.
(fgl-generic-rule-fix x) → fty::newx
Note that in the execution this is just an inline identity function.
Function:
(defun fgl-generic-rule-fix$inline (x) (declare (xargs :guard (fgl-generic-rule-p x))) (let ((__function__ 'fgl-generic-rule-fix)) (declare (ignorable __function__)) (mbe :logic (case (tag x) ((:brewrite :bmeta) (fgl-binder-rule-fix x)) (otherwise (fgl-rule-fix x))) :exec x)))
Theorem:
(defthm fgl-generic-rule-p-of-fgl-generic-rule-fix (b* ((fty::newx (fgl-generic-rule-fix$inline x))) (fgl-generic-rule-p fty::newx)) :rule-classes :rewrite)
Theorem:
(defthm fgl-generic-rule-fix-when-fgl-generic-rule-p (implies (fgl-generic-rule-p x) (equal (fgl-generic-rule-fix x) x)))
Function:
(defun fgl-generic-rule-equiv$inline (x y) (declare (xargs :guard (and (fgl-generic-rule-p x) (fgl-generic-rule-p y)))) (equal (fgl-generic-rule-fix x) (fgl-generic-rule-fix y)))
Theorem:
(defthm fgl-generic-rule-equiv-is-an-equivalence (and (booleanp (fgl-generic-rule-equiv x y)) (fgl-generic-rule-equiv x x) (implies (fgl-generic-rule-equiv x y) (fgl-generic-rule-equiv y x)) (implies (and (fgl-generic-rule-equiv x y) (fgl-generic-rule-equiv y z)) (fgl-generic-rule-equiv x z))) :rule-classes (:equivalence))
Theorem:
(defthm fgl-generic-rule-equiv-implies-equal-fgl-generic-rule-fix-1 (implies (fgl-generic-rule-equiv x x-equiv) (equal (fgl-generic-rule-fix x) (fgl-generic-rule-fix x-equiv))) :rule-classes (:congruence))
Theorem:
(defthm fgl-generic-rule-fix-under-fgl-generic-rule-equiv (fgl-generic-rule-equiv (fgl-generic-rule-fix x) x) :rule-classes (:rewrite :rewrite-quoted-constant))
Theorem:
(defthm equal-of-fgl-generic-rule-fix-1-forward-to-fgl-generic-rule-equiv (implies (equal (fgl-generic-rule-fix x) y) (fgl-generic-rule-equiv x y)) :rule-classes :forward-chaining)
Theorem:
(defthm equal-of-fgl-generic-rule-fix-2-forward-to-fgl-generic-rule-equiv (implies (equal x (fgl-generic-rule-fix y)) (fgl-generic-rule-equiv x y)) :rule-classes :forward-chaining)
Theorem:
(defthm fgl-generic-rule-equiv-of-fgl-generic-rule-fix-1-forward (implies (fgl-generic-rule-equiv (fgl-generic-rule-fix x) y) (fgl-generic-rule-equiv x y)) :rule-classes :forward-chaining)
Theorem:
(defthm fgl-generic-rule-equiv-of-fgl-generic-rule-fix-2-forward (implies (fgl-generic-rule-equiv x (fgl-generic-rule-fix y)) (fgl-generic-rule-equiv x y)) :rule-classes :forward-chaining)
Theorem:
(defthm tag-of-fgl-generic-rule-fix-forward (or (equal (tag (fgl-generic-rule-fix x)) :brewrite) (equal (tag (fgl-generic-rule-fix x)) :bmeta) (equal (tag (fgl-generic-rule-fix x)) :rewrite) (equal (tag (fgl-generic-rule-fix x)) :primitive) (equal (tag (fgl-generic-rule-fix x)) :meta)) :rule-classes ((:forward-chaining :trigger-terms ((tag (fgl-generic-rule-fix x))))))