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