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