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