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