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