(cgraph-derivstates-fix x) is an ACL2::fty alist fixing function that follows the drop-keys strategy.
(cgraph-derivstates-fix x) → fty::newx
Note that in the execution this is just an inline identity function.
Function:
(defun cgraph-derivstates-fix$inline (x) (declare (xargs :guard (cgraph-derivstates-p x))) (let ((__function__ 'cgraph-derivstates-fix)) (declare (ignorable __function__)) (mbe :logic (if (atom x) nil (let ((rest (cgraph-derivstates-fix (cdr x)))) (if (and (consp (car x)) (fgl-object-p (caar x))) (let ((fty::first-key (caar x)) (fty::first-val (cgraph-derivstate-fix (cdar x)))) (cons (cons fty::first-key fty::first-val) rest)) rest))) :exec x)))
Theorem:
(defthm cgraph-derivstates-p-of-cgraph-derivstates-fix (b* ((fty::newx (cgraph-derivstates-fix$inline x))) (cgraph-derivstates-p fty::newx)) :rule-classes :rewrite)
Theorem:
(defthm cgraph-derivstates-fix-when-cgraph-derivstates-p (implies (cgraph-derivstates-p x) (equal (cgraph-derivstates-fix x) x)))
Function:
(defun cgraph-derivstates-equiv$inline (x y) (declare (xargs :guard (and (cgraph-derivstates-p x) (cgraph-derivstates-p y)))) (equal (cgraph-derivstates-fix x) (cgraph-derivstates-fix y)))
Theorem:
(defthm cgraph-derivstates-equiv-is-an-equivalence (and (booleanp (cgraph-derivstates-equiv x y)) (cgraph-derivstates-equiv x x) (implies (cgraph-derivstates-equiv x y) (cgraph-derivstates-equiv y x)) (implies (and (cgraph-derivstates-equiv x y) (cgraph-derivstates-equiv y z)) (cgraph-derivstates-equiv x z))) :rule-classes (:equivalence))
Theorem:
(defthm cgraph-derivstates-equiv-implies-equal-cgraph-derivstates-fix-1 (implies (cgraph-derivstates-equiv x x-equiv) (equal (cgraph-derivstates-fix x) (cgraph-derivstates-fix x-equiv))) :rule-classes (:congruence))
Theorem:
(defthm cgraph-derivstates-fix-under-cgraph-derivstates-equiv (cgraph-derivstates-equiv (cgraph-derivstates-fix x) x) :rule-classes (:rewrite :rewrite-quoted-constant))
Theorem:
(defthm equal-of-cgraph-derivstates-fix-1-forward-to-cgraph-derivstates-equiv (implies (equal (cgraph-derivstates-fix x) y) (cgraph-derivstates-equiv x y)) :rule-classes :forward-chaining)
Theorem:
(defthm equal-of-cgraph-derivstates-fix-2-forward-to-cgraph-derivstates-equiv (implies (equal x (cgraph-derivstates-fix y)) (cgraph-derivstates-equiv x y)) :rule-classes :forward-chaining)
Theorem:
(defthm cgraph-derivstates-equiv-of-cgraph-derivstates-fix-1-forward (implies (cgraph-derivstates-equiv (cgraph-derivstates-fix x) y) (cgraph-derivstates-equiv x y)) :rule-classes :forward-chaining)
Theorem:
(defthm cgraph-derivstates-equiv-of-cgraph-derivstates-fix-2-forward (implies (cgraph-derivstates-equiv x (cgraph-derivstates-fix y)) (cgraph-derivstates-equiv x y)) :rule-classes :forward-chaining)
Theorem:
(defthm cons-of-cgraph-derivstate-fix-v-under-cgraph-derivstates-equiv (cgraph-derivstates-equiv (cons (cons k (cgraph-derivstate-fix v)) x) (cons (cons k v) x)))
Theorem:
(defthm cons-cgraph-derivstate-equiv-congruence-on-v-under-cgraph-derivstates-equiv (implies (cgraph-derivstate-equiv v v-equiv) (cgraph-derivstates-equiv (cons (cons k v) x) (cons (cons k v-equiv) x))) :rule-classes :congruence)
Theorem:
(defthm cons-of-cgraph-derivstates-fix-y-under-cgraph-derivstates-equiv (cgraph-derivstates-equiv (cons x (cgraph-derivstates-fix y)) (cons x y)))
Theorem:
(defthm cons-cgraph-derivstates-equiv-congruence-on-y-under-cgraph-derivstates-equiv (implies (cgraph-derivstates-equiv y y-equiv) (cgraph-derivstates-equiv (cons x y) (cons x y-equiv))) :rule-classes :congruence)
Theorem:
(defthm cgraph-derivstates-fix-of-acons (equal (cgraph-derivstates-fix (cons (cons a b) x)) (let ((rest (cgraph-derivstates-fix x))) (if (and (fgl-object-p a)) (let ((fty::first-key a) (fty::first-val (cgraph-derivstate-fix b))) (cons (cons fty::first-key fty::first-val) rest)) rest))))
Theorem:
(defthm hons-assoc-equal-of-cgraph-derivstates-fix (equal (hons-assoc-equal k (cgraph-derivstates-fix x)) (let ((fty::pair (hons-assoc-equal k x))) (and (fgl-object-p k) fty::pair (cons k (cgraph-derivstate-fix (cdr fty::pair)))))))
Theorem:
(defthm cgraph-derivstates-fix-of-append (equal (cgraph-derivstates-fix (append std::a std::b)) (append (cgraph-derivstates-fix std::a) (cgraph-derivstates-fix std::b))))
Theorem:
(defthm consp-car-of-cgraph-derivstates-fix (equal (consp (car (cgraph-derivstates-fix x))) (consp (cgraph-derivstates-fix x))))