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