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