Fixing function for prof-entry structures.
(prof-entry-fix x) → new-x
Function:
(defun prof-entry-fix$inline (x) (declare (xargs :guard (prof-entry-p x))) (let ((__function__ 'prof-entry-fix)) (declare (ignorable __function__)) (mbe :logic (b* ((name (std::da-nth 0 x)) (tries-succ (nfix (std::da-nth 1 x))) (tries-fail (nfix (std::da-nth 2 x))) (frames-succ (nfix (std::da-nth 3 x))) (frames-fail (nfix (std::da-nth 4 x)))) (list name tries-succ tries-fail frames-succ frames-fail)) :exec x)))
Theorem:
(defthm prof-entry-p-of-prof-entry-fix (b* ((new-x (prof-entry-fix$inline x))) (prof-entry-p new-x)) :rule-classes :rewrite)
Theorem:
(defthm prof-entry-fix-when-prof-entry-p (implies (prof-entry-p x) (equal (prof-entry-fix x) x)))
Function:
(defun prof-entry-equiv$inline (x y) (declare (xargs :guard (and (prof-entry-p x) (prof-entry-p y)))) (equal (prof-entry-fix x) (prof-entry-fix y)))
Theorem:
(defthm prof-entry-equiv-is-an-equivalence (and (booleanp (prof-entry-equiv x y)) (prof-entry-equiv x x) (implies (prof-entry-equiv x y) (prof-entry-equiv y x)) (implies (and (prof-entry-equiv x y) (prof-entry-equiv y z)) (prof-entry-equiv x z))) :rule-classes (:equivalence))
Theorem:
(defthm prof-entry-equiv-implies-equal-prof-entry-fix-1 (implies (prof-entry-equiv x x-equiv) (equal (prof-entry-fix x) (prof-entry-fix x-equiv))) :rule-classes (:congruence))
Theorem:
(defthm prof-entry-fix-under-prof-entry-equiv (prof-entry-equiv (prof-entry-fix x) x) :rule-classes (:rewrite :rewrite-quoted-constant))
Theorem:
(defthm equal-of-prof-entry-fix-1-forward-to-prof-entry-equiv (implies (equal (prof-entry-fix x) y) (prof-entry-equiv x y)) :rule-classes :forward-chaining)
Theorem:
(defthm equal-of-prof-entry-fix-2-forward-to-prof-entry-equiv (implies (equal x (prof-entry-fix y)) (prof-entry-equiv x y)) :rule-classes :forward-chaining)
Theorem:
(defthm prof-entry-equiv-of-prof-entry-fix-1-forward (implies (prof-entry-equiv (prof-entry-fix x) y) (prof-entry-equiv x y)) :rule-classes :forward-chaining)
Theorem:
(defthm prof-entry-equiv-of-prof-entry-fix-2-forward (implies (prof-entry-equiv x (prof-entry-fix y)) (prof-entry-equiv x y)) :rule-classes :forward-chaining)