Fixing function for fgl-rune structures.
(fgl-rune-fix x) → new-x
Function:
(defun fgl-rune-fix$inline (x) (declare (xargs :guard (fgl-rune-p x))) (let ((__function__ 'fgl-rune-fix)) (declare (ignorable __function__)) (mbe :logic (case (fgl-rune-kind x) (:rewrite (b* ((name (std::da-nth 0 (cdr x)))) (cons :rewrite (list name)))) (:definition (b* ((name (std::da-nth 0 (cdr x)))) (cons :definition (list name)))) (:formula (b* ((name (pseudo-fnsym-fix (std::da-nth 0 (cdr x))))) (cons :formula (list name)))) (: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-rune-p-of-fgl-rune-fix (b* ((new-x (fgl-rune-fix$inline x))) (fgl-rune-p new-x)) :rule-classes :rewrite)
Theorem:
(defthm fgl-rune-fix-when-fgl-rune-p (implies (fgl-rune-p x) (equal (fgl-rune-fix x) x)))
Function:
(defun fgl-rune-equiv$inline (x y) (declare (xargs :guard (and (fgl-rune-p x) (fgl-rune-p y)))) (equal (fgl-rune-fix x) (fgl-rune-fix y)))
Theorem:
(defthm fgl-rune-equiv-is-an-equivalence (and (booleanp (fgl-rune-equiv x y)) (fgl-rune-equiv x x) (implies (fgl-rune-equiv x y) (fgl-rune-equiv y x)) (implies (and (fgl-rune-equiv x y) (fgl-rune-equiv y z)) (fgl-rune-equiv x z))) :rule-classes (:equivalence))
Theorem:
(defthm fgl-rune-equiv-implies-equal-fgl-rune-fix-1 (implies (fgl-rune-equiv x x-equiv) (equal (fgl-rune-fix x) (fgl-rune-fix x-equiv))) :rule-classes (:congruence))
Theorem:
(defthm fgl-rune-fix-under-fgl-rune-equiv (fgl-rune-equiv (fgl-rune-fix x) x) :rule-classes (:rewrite :rewrite-quoted-constant))
Theorem:
(defthm equal-of-fgl-rune-fix-1-forward-to-fgl-rune-equiv (implies (equal (fgl-rune-fix x) y) (fgl-rune-equiv x y)) :rule-classes :forward-chaining)
Theorem:
(defthm equal-of-fgl-rune-fix-2-forward-to-fgl-rune-equiv (implies (equal x (fgl-rune-fix y)) (fgl-rune-equiv x y)) :rule-classes :forward-chaining)
Theorem:
(defthm fgl-rune-equiv-of-fgl-rune-fix-1-forward (implies (fgl-rune-equiv (fgl-rune-fix x) y) (fgl-rune-equiv x y)) :rule-classes :forward-chaining)
Theorem:
(defthm fgl-rune-equiv-of-fgl-rune-fix-2-forward (implies (fgl-rune-equiv x (fgl-rune-fix y)) (fgl-rune-equiv x y)) :rule-classes :forward-chaining)
Theorem:
(defthm fgl-rune-kind$inline-of-fgl-rune-fix-x (equal (fgl-rune-kind$inline (fgl-rune-fix x)) (fgl-rune-kind$inline x)))
Theorem:
(defthm fgl-rune-kind$inline-fgl-rune-equiv-congruence-on-x (implies (fgl-rune-equiv x x-equiv) (equal (fgl-rune-kind$inline x) (fgl-rune-kind$inline x-equiv))) :rule-classes :congruence)
Theorem:
(defthm consp-of-fgl-rune-fix (consp (fgl-rune-fix x)) :rule-classes :type-prescription)