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