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