(vl-datatype-syscall-remove-dims n type) → (mv err final-dim)
Function:
(defun vl-datatype-syscall-remove-dims (n type) (declare (xargs :guard (and (natp n) (vl-datatype-p type)))) (declare (xargs :guard (vl-datatype-resolved-p type))) (let ((__function__ 'vl-datatype-syscall-remove-dims)) (declare (ignorable __function__)) (b* (((mv err ?caveat new-type dim) (vl-datatype-remove-dim type)) ((when err) (mv err nil)) ((when (zp n)) (mv nil dim))) (vl-datatype-syscall-remove-dims (1- n) new-type))))
Theorem:
(defthm return-type-of-vl-datatype-syscall-remove-dims.err (b* (((mv ?err ?final-dim) (vl-datatype-syscall-remove-dims n type))) (iff (vl-msg-p err) err)) :rule-classes :rewrite)
Theorem:
(defthm return-type-of-vl-datatype-syscall-remove-dims.final-dim (b* (((mv ?err ?final-dim) (vl-datatype-syscall-remove-dims n type))) (implies (not err) (vl-dimension-p final-dim))) :rule-classes :rewrite)
Theorem:
(defthm vl-datatype-syscall-remove-dims-of-nfix-n (equal (vl-datatype-syscall-remove-dims (nfix n) type) (vl-datatype-syscall-remove-dims n type)))
Theorem:
(defthm vl-datatype-syscall-remove-dims-nat-equiv-congruence-on-n (implies (acl2::nat-equiv n n-equiv) (equal (vl-datatype-syscall-remove-dims n type) (vl-datatype-syscall-remove-dims n-equiv type))) :rule-classes :congruence)
Theorem:
(defthm vl-datatype-syscall-remove-dims-of-vl-datatype-fix-type (equal (vl-datatype-syscall-remove-dims n (vl-datatype-fix type)) (vl-datatype-syscall-remove-dims n type)))
Theorem:
(defthm vl-datatype-syscall-remove-dims-vl-datatype-equiv-congruence-on-type (implies (vl-datatype-equiv type type-equiv) (equal (vl-datatype-syscall-remove-dims n type) (vl-datatype-syscall-remove-dims n type-equiv))) :rule-classes :congruence)