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