(vl-datatype-update-dims pdims udims x) → newx
Function:
(defun vl-datatype-update-dims (pdims udims x) (declare (xargs :guard (and (vl-packeddimensionlist-p pdims) (vl-packeddimensionlist-p udims) (vl-datatype-p x)))) (let ((__function__ 'vl-datatype-update-dims)) (declare (ignorable __function__)) (vl-datatype-case x :vl-coretype (change-vl-coretype x :pdims pdims :udims udims) :vl-struct (change-vl-struct x :pdims pdims :udims udims) :vl-union (change-vl-union x :pdims pdims :udims udims) :vl-enum (change-vl-enum x :pdims pdims :udims udims) :vl-usertype (change-vl-usertype x :pdims pdims :udims udims))))
Theorem:
(defthm return-type-of-vl-datatype-update-dims (b* ((newx (vl-datatype-update-dims pdims udims x))) (and (vl-datatype-p newx) (eq (vl-datatype-kind newx) (vl-datatype-kind x)))) :rule-classes :rewrite)
Theorem:
(defthm vl-datatype-update-dims-of-own (equal (vl-datatype-update-dims (vl-datatype->pdims x) (vl-datatype->udims x) x) (vl-datatype-fix x)))
Theorem:
(defthm vl-datatype->pdims-of-vl-datatype-update-dims (equal (vl-datatype->pdims (vl-datatype-update-dims pdims udims x)) (vl-packeddimensionlist-fix pdims)))
Theorem:
(defthm vl-datatype->udims-of-vl-datatype-update-dims (equal (vl-datatype->udims (vl-datatype-update-dims pdims udims x)) (vl-packeddimensionlist-fix udims)))
Theorem:
(defthm vl-datatype-update-dims-of-vl-packeddimensionlist-fix-pdims (equal (vl-datatype-update-dims (vl-packeddimensionlist-fix pdims) udims x) (vl-datatype-update-dims pdims udims x)))
Theorem:
(defthm vl-datatype-update-dims-vl-packeddimensionlist-equiv-congruence-on-pdims (implies (vl-packeddimensionlist-equiv pdims pdims-equiv) (equal (vl-datatype-update-dims pdims udims x) (vl-datatype-update-dims pdims-equiv udims x))) :rule-classes :congruence)
Theorem:
(defthm vl-datatype-update-dims-of-vl-packeddimensionlist-fix-udims (equal (vl-datatype-update-dims pdims (vl-packeddimensionlist-fix udims) x) (vl-datatype-update-dims pdims udims x)))
Theorem:
(defthm vl-datatype-update-dims-vl-packeddimensionlist-equiv-congruence-on-udims (implies (vl-packeddimensionlist-equiv udims udims-equiv) (equal (vl-datatype-update-dims pdims udims x) (vl-datatype-update-dims pdims udims-equiv x))) :rule-classes :congruence)
Theorem:
(defthm vl-datatype-update-dims-of-vl-datatype-fix-x (equal (vl-datatype-update-dims pdims udims (vl-datatype-fix x)) (vl-datatype-update-dims pdims udims x)))
Theorem:
(defthm vl-datatype-update-dims-vl-datatype-equiv-congruence-on-x (implies (vl-datatype-equiv x x-equiv) (equal (vl-datatype-update-dims pdims udims x) (vl-datatype-update-dims pdims udims x-equiv))) :rule-classes :congruence)