(node-list-fix x) is a usual ACL2::fty list fixing function.
(node-list-fix x) → fty::newx
In the logic, we apply node-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 node-list-fix$inline (x) (declare (xargs :guard (node-listp x))) (let ((__function__ 'node-list-fix)) (declare (ignorable __function__)) (mbe :logic (if (atom x) nil (cons (node-fix (car x)) (node-list-fix (cdr x)))) :exec x)))
Theorem:
(defthm node-listp-of-node-list-fix (b* ((fty::newx (node-list-fix$inline x))) (node-listp fty::newx)) :rule-classes :rewrite)
Theorem:
(defthm node-list-fix-when-node-listp (implies (node-listp x) (equal (node-list-fix x) x)))
Function:
(defun node-list-equiv$inline (x acl2::y) (declare (xargs :guard (and (node-listp x) (node-listp acl2::y)))) (equal (node-list-fix x) (node-list-fix acl2::y)))
Theorem:
(defthm node-list-equiv-is-an-equivalence (and (booleanp (node-list-equiv x y)) (node-list-equiv x x) (implies (node-list-equiv x y) (node-list-equiv y x)) (implies (and (node-list-equiv x y) (node-list-equiv y z)) (node-list-equiv x z))) :rule-classes (:equivalence))
Theorem:
(defthm node-list-equiv-implies-equal-node-list-fix-1 (implies (node-list-equiv x x-equiv) (equal (node-list-fix x) (node-list-fix x-equiv))) :rule-classes (:congruence))
Theorem:
(defthm node-list-fix-under-node-list-equiv (node-list-equiv (node-list-fix x) x) :rule-classes (:rewrite :rewrite-quoted-constant))
Theorem:
(defthm equal-of-node-list-fix-1-forward-to-node-list-equiv (implies (equal (node-list-fix x) acl2::y) (node-list-equiv x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm equal-of-node-list-fix-2-forward-to-node-list-equiv (implies (equal x (node-list-fix acl2::y)) (node-list-equiv x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm node-list-equiv-of-node-list-fix-1-forward (implies (node-list-equiv (node-list-fix x) acl2::y) (node-list-equiv x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm node-list-equiv-of-node-list-fix-2-forward (implies (node-list-equiv x (node-list-fix acl2::y)) (node-list-equiv x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm car-of-node-list-fix-x-under-node-equiv (node-equiv (car (node-list-fix x)) (car x)))
Theorem:
(defthm car-node-list-equiv-congruence-on-x-under-node-equiv (implies (node-list-equiv x x-equiv) (node-equiv (car x) (car x-equiv))) :rule-classes :congruence)
Theorem:
(defthm cdr-of-node-list-fix-x-under-node-list-equiv (node-list-equiv (cdr (node-list-fix x)) (cdr x)))
Theorem:
(defthm cdr-node-list-equiv-congruence-on-x-under-node-list-equiv (implies (node-list-equiv x x-equiv) (node-list-equiv (cdr x) (cdr x-equiv))) :rule-classes :congruence)
Theorem:
(defthm cons-of-node-fix-x-under-node-list-equiv (node-list-equiv (cons (node-fix x) acl2::y) (cons x acl2::y)))
Theorem:
(defthm cons-node-equiv-congruence-on-x-under-node-list-equiv (implies (node-equiv x x-equiv) (node-list-equiv (cons x acl2::y) (cons x-equiv acl2::y))) :rule-classes :congruence)
Theorem:
(defthm cons-of-node-list-fix-y-under-node-list-equiv (node-list-equiv (cons x (node-list-fix acl2::y)) (cons x acl2::y)))
Theorem:
(defthm cons-node-list-equiv-congruence-on-y-under-node-list-equiv (implies (node-list-equiv acl2::y y-equiv) (node-list-equiv (cons x acl2::y) (cons x y-equiv))) :rule-classes :congruence)
Theorem:
(defthm consp-of-node-list-fix (equal (consp (node-list-fix x)) (consp x)))
Theorem:
(defthm node-list-fix-under-iff (iff (node-list-fix x) (consp x)))
Theorem:
(defthm node-list-fix-of-cons (equal (node-list-fix (cons a x)) (cons (node-fix a) (node-list-fix x))))
Theorem:
(defthm len-of-node-list-fix (equal (len (node-list-fix x)) (len x)))
Theorem:
(defthm node-list-fix-of-append (equal (node-list-fix (append std::a std::b)) (append (node-list-fix std::a) (node-list-fix std::b))))
Theorem:
(defthm node-list-fix-of-repeat (equal (node-list-fix (acl2::repeat acl2::n x)) (acl2::repeat acl2::n (node-fix x))))
Theorem:
(defthm list-equiv-refines-node-list-equiv (implies (list-equiv x acl2::y) (node-list-equiv x acl2::y)) :rule-classes :refinement)
Theorem:
(defthm nth-of-node-list-fix (equal (nth acl2::n (node-list-fix x)) (if (< (nfix acl2::n) (len x)) (node-fix (nth acl2::n x)) nil)))
Theorem:
(defthm node-list-equiv-implies-node-list-equiv-append-1 (implies (node-list-equiv x fty::x-equiv) (node-list-equiv (append x acl2::y) (append fty::x-equiv acl2::y))) :rule-classes (:congruence))
Theorem:
(defthm node-list-equiv-implies-node-list-equiv-append-2 (implies (node-list-equiv acl2::y fty::y-equiv) (node-list-equiv (append x acl2::y) (append x fty::y-equiv))) :rule-classes (:congruence))
Theorem:
(defthm node-list-equiv-implies-node-list-equiv-nthcdr-2 (implies (node-list-equiv acl2::l l-equiv) (node-list-equiv (nthcdr acl2::n acl2::l) (nthcdr acl2::n l-equiv))) :rule-classes (:congruence))
Theorem:
(defthm node-list-equiv-implies-node-list-equiv-take-2 (implies (node-list-equiv acl2::l l-equiv) (node-list-equiv (take acl2::n acl2::l) (take acl2::n l-equiv))) :rule-classes (:congruence))