Fixing function for fgl-rule structures.
(fgl-rule-fix x) → new-x
Function:
(defun fgl-rule-fix$inline (x) (declare (xargs :guard (fgl-rule-p x))) (let ((__function__ 'fgl-rule-fix)) (declare (ignorable __function__)) (mbe :logic (case (fgl-rule-kind x) (:rewrite (b* ((rune (fgl-rune-fix (car (cdr x)))) (rule (cmr::rewrite-fix (cdr (cdr x))))) (cons :rewrite (cons rune rule)))) (:primitive (b* ((name (pseudo-fnsym-fix (std::da-nth 0 (cdr x))))) (cons :primitive (list name)))) (:meta (b* ((name (pseudo-fnsym-fix (std::da-nth 0 (cdr x))))) (cons :meta (list name))))) :exec x)))
Theorem:
(defthm fgl-rule-p-of-fgl-rule-fix (b* ((new-x (fgl-rule-fix$inline x))) (fgl-rule-p new-x)) :rule-classes :rewrite)
Theorem:
(defthm fgl-rule-fix-when-fgl-rule-p (implies (fgl-rule-p x) (equal (fgl-rule-fix x) x)))
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)
Theorem:
(defthm fgl-rule-kind$inline-of-fgl-rule-fix-x (equal (fgl-rule-kind$inline (fgl-rule-fix x)) (fgl-rule-kind$inline x)))
Theorem:
(defthm fgl-rule-kind$inline-fgl-rule-equiv-congruence-on-x (implies (fgl-rule-equiv x x-equiv) (equal (fgl-rule-kind$inline x) (fgl-rule-kind$inline x-equiv))) :rule-classes :congruence)
Theorem:
(defthm consp-of-fgl-rule-fix (consp (fgl-rule-fix x)) :rule-classes :type-prescription)