(cgraph-edgelist-fix x) is a usual ACL2::fty list fixing function.
(cgraph-edgelist-fix x) → fty::newx
In the logic, we apply cgraph-edge-fix to each member of the x. In the execution, none of that is actually necessary and this is just an inlined identity function.
Function:
(defun cgraph-edgelist-fix$inline (x) (declare (xargs :guard (cgraph-edgelist-p x))) (let ((__function__ 'cgraph-edgelist-fix)) (declare (ignorable __function__)) (mbe :logic (if (atom x) nil (cons (cgraph-edge-fix (car x)) (cgraph-edgelist-fix (cdr x)))) :exec x)))
Theorem:
(defthm cgraph-edgelist-p-of-cgraph-edgelist-fix (b* ((fty::newx (cgraph-edgelist-fix$inline x))) (cgraph-edgelist-p fty::newx)) :rule-classes :rewrite)
Theorem:
(defthm cgraph-edgelist-fix-when-cgraph-edgelist-p (implies (cgraph-edgelist-p x) (equal (cgraph-edgelist-fix x) x)))
Function:
(defun cgraph-edgelist-equiv$inline (x y) (declare (xargs :guard (and (cgraph-edgelist-p x) (cgraph-edgelist-p y)))) (equal (cgraph-edgelist-fix x) (cgraph-edgelist-fix y)))
Theorem:
(defthm cgraph-edgelist-equiv-is-an-equivalence (and (booleanp (cgraph-edgelist-equiv x y)) (cgraph-edgelist-equiv x x) (implies (cgraph-edgelist-equiv x y) (cgraph-edgelist-equiv y x)) (implies (and (cgraph-edgelist-equiv x y) (cgraph-edgelist-equiv y z)) (cgraph-edgelist-equiv x z))) :rule-classes (:equivalence))
Theorem:
(defthm cgraph-edgelist-equiv-implies-equal-cgraph-edgelist-fix-1 (implies (cgraph-edgelist-equiv x x-equiv) (equal (cgraph-edgelist-fix x) (cgraph-edgelist-fix x-equiv))) :rule-classes (:congruence))
Theorem:
(defthm cgraph-edgelist-fix-under-cgraph-edgelist-equiv (cgraph-edgelist-equiv (cgraph-edgelist-fix x) x) :rule-classes (:rewrite :rewrite-quoted-constant))
Theorem:
(defthm equal-of-cgraph-edgelist-fix-1-forward-to-cgraph-edgelist-equiv (implies (equal (cgraph-edgelist-fix x) y) (cgraph-edgelist-equiv x y)) :rule-classes :forward-chaining)
Theorem:
(defthm equal-of-cgraph-edgelist-fix-2-forward-to-cgraph-edgelist-equiv (implies (equal x (cgraph-edgelist-fix y)) (cgraph-edgelist-equiv x y)) :rule-classes :forward-chaining)
Theorem:
(defthm cgraph-edgelist-equiv-of-cgraph-edgelist-fix-1-forward (implies (cgraph-edgelist-equiv (cgraph-edgelist-fix x) y) (cgraph-edgelist-equiv x y)) :rule-classes :forward-chaining)
Theorem:
(defthm cgraph-edgelist-equiv-of-cgraph-edgelist-fix-2-forward (implies (cgraph-edgelist-equiv x (cgraph-edgelist-fix y)) (cgraph-edgelist-equiv x y)) :rule-classes :forward-chaining)
Theorem:
(defthm car-of-cgraph-edgelist-fix-x-under-cgraph-edge-equiv (cgraph-edge-equiv (car (cgraph-edgelist-fix x)) (car x)))
Theorem:
(defthm car-cgraph-edgelist-equiv-congruence-on-x-under-cgraph-edge-equiv (implies (cgraph-edgelist-equiv x x-equiv) (cgraph-edge-equiv (car x) (car x-equiv))) :rule-classes :congruence)
Theorem:
(defthm cdr-of-cgraph-edgelist-fix-x-under-cgraph-edgelist-equiv (cgraph-edgelist-equiv (cdr (cgraph-edgelist-fix x)) (cdr x)))
Theorem:
(defthm cdr-cgraph-edgelist-equiv-congruence-on-x-under-cgraph-edgelist-equiv (implies (cgraph-edgelist-equiv x x-equiv) (cgraph-edgelist-equiv (cdr x) (cdr x-equiv))) :rule-classes :congruence)
Theorem:
(defthm cons-of-cgraph-edge-fix-x-under-cgraph-edgelist-equiv (cgraph-edgelist-equiv (cons (cgraph-edge-fix x) y) (cons x y)))
Theorem:
(defthm cons-cgraph-edge-equiv-congruence-on-x-under-cgraph-edgelist-equiv (implies (cgraph-edge-equiv x x-equiv) (cgraph-edgelist-equiv (cons x y) (cons x-equiv y))) :rule-classes :congruence)
Theorem:
(defthm cons-of-cgraph-edgelist-fix-y-under-cgraph-edgelist-equiv (cgraph-edgelist-equiv (cons x (cgraph-edgelist-fix y)) (cons x y)))
Theorem:
(defthm cons-cgraph-edgelist-equiv-congruence-on-y-under-cgraph-edgelist-equiv (implies (cgraph-edgelist-equiv y y-equiv) (cgraph-edgelist-equiv (cons x y) (cons x y-equiv))) :rule-classes :congruence)
Theorem:
(defthm consp-of-cgraph-edgelist-fix (equal (consp (cgraph-edgelist-fix x)) (consp x)))
Theorem:
(defthm cgraph-edgelist-fix-under-iff (iff (cgraph-edgelist-fix x) (consp x)))
Theorem:
(defthm cgraph-edgelist-fix-of-cons (equal (cgraph-edgelist-fix (cons a x)) (cons (cgraph-edge-fix a) (cgraph-edgelist-fix x))))
Theorem:
(defthm len-of-cgraph-edgelist-fix (equal (len (cgraph-edgelist-fix x)) (len x)))
Theorem:
(defthm cgraph-edgelist-fix-of-append (equal (cgraph-edgelist-fix (append std::a std::b)) (append (cgraph-edgelist-fix std::a) (cgraph-edgelist-fix std::b))))
Theorem:
(defthm cgraph-edgelist-fix-of-repeat (equal (cgraph-edgelist-fix (acl2::repeat n x)) (acl2::repeat n (cgraph-edge-fix x))))
Theorem:
(defthm list-equiv-refines-cgraph-edgelist-equiv (implies (acl2::list-equiv x y) (cgraph-edgelist-equiv x y)) :rule-classes :refinement)
Theorem:
(defthm nth-of-cgraph-edgelist-fix (equal (nth n (cgraph-edgelist-fix x)) (if (< (nfix n) (len x)) (cgraph-edge-fix (nth n x)) nil)))
Theorem:
(defthm cgraph-edgelist-equiv-implies-cgraph-edgelist-equiv-append-1 (implies (cgraph-edgelist-equiv x fty::x-equiv) (cgraph-edgelist-equiv (append x y) (append fty::x-equiv y))) :rule-classes (:congruence))
Theorem:
(defthm cgraph-edgelist-equiv-implies-cgraph-edgelist-equiv-append-2 (implies (cgraph-edgelist-equiv y fty::y-equiv) (cgraph-edgelist-equiv (append x y) (append x fty::y-equiv))) :rule-classes (:congruence))
Theorem:
(defthm cgraph-edgelist-equiv-implies-cgraph-edgelist-equiv-nthcdr-2 (implies (cgraph-edgelist-equiv l l-equiv) (cgraph-edgelist-equiv (nthcdr n l) (nthcdr n l-equiv))) :rule-classes (:congruence))
Theorem:
(defthm cgraph-edgelist-equiv-implies-cgraph-edgelist-equiv-take-2 (implies (cgraph-edgelist-equiv l l-equiv) (cgraph-edgelist-equiv (take n l) (take n l-equiv))) :rule-classes (:congruence))