Fixing function for cgraph-derivstate structures.
(cgraph-derivstate-fix x) → new-x
Function:
(defun cgraph-derivstate-fix$inline (x) (declare (xargs :guard (cgraph-derivstate-p x))) (let ((__function__ 'cgraph-derivstate-fix)) (declare (ignorable __function__)) (mbe :logic (b* ((times-seen (nfix (std::prod-car x))) (result-msg (std::prod-cdr x))) (std::prod-cons times-seen result-msg)) :exec x)))
Theorem:
(defthm cgraph-derivstate-p-of-cgraph-derivstate-fix (b* ((new-x (cgraph-derivstate-fix$inline x))) (cgraph-derivstate-p new-x)) :rule-classes :rewrite)
Theorem:
(defthm cgraph-derivstate-fix-when-cgraph-derivstate-p (implies (cgraph-derivstate-p x) (equal (cgraph-derivstate-fix x) x)))
Function:
(defun cgraph-derivstate-equiv$inline (x y) (declare (xargs :guard (and (cgraph-derivstate-p x) (cgraph-derivstate-p y)))) (equal (cgraph-derivstate-fix x) (cgraph-derivstate-fix y)))
Theorem:
(defthm cgraph-derivstate-equiv-is-an-equivalence (and (booleanp (cgraph-derivstate-equiv x y)) (cgraph-derivstate-equiv x x) (implies (cgraph-derivstate-equiv x y) (cgraph-derivstate-equiv y x)) (implies (and (cgraph-derivstate-equiv x y) (cgraph-derivstate-equiv y z)) (cgraph-derivstate-equiv x z))) :rule-classes (:equivalence))
Theorem:
(defthm cgraph-derivstate-equiv-implies-equal-cgraph-derivstate-fix-1 (implies (cgraph-derivstate-equiv x x-equiv) (equal (cgraph-derivstate-fix x) (cgraph-derivstate-fix x-equiv))) :rule-classes (:congruence))
Theorem:
(defthm cgraph-derivstate-fix-under-cgraph-derivstate-equiv (cgraph-derivstate-equiv (cgraph-derivstate-fix x) x) :rule-classes (:rewrite :rewrite-quoted-constant))
Theorem:
(defthm equal-of-cgraph-derivstate-fix-1-forward-to-cgraph-derivstate-equiv (implies (equal (cgraph-derivstate-fix x) y) (cgraph-derivstate-equiv x y)) :rule-classes :forward-chaining)
Theorem:
(defthm equal-of-cgraph-derivstate-fix-2-forward-to-cgraph-derivstate-equiv (implies (equal x (cgraph-derivstate-fix y)) (cgraph-derivstate-equiv x y)) :rule-classes :forward-chaining)
Theorem:
(defthm cgraph-derivstate-equiv-of-cgraph-derivstate-fix-1-forward (implies (cgraph-derivstate-equiv (cgraph-derivstate-fix x) y) (cgraph-derivstate-equiv x y)) :rule-classes :forward-chaining)
Theorem:
(defthm cgraph-derivstate-equiv-of-cgraph-derivstate-fix-2-forward (implies (cgraph-derivstate-equiv x (cgraph-derivstate-fix y)) (cgraph-derivstate-equiv x y)) :rule-classes :forward-chaining)