Length of an array.
Function:
(defun value-array->length (array) (declare (xargs :guard (valuep array))) (declare (xargs :guard (value-case array :array))) (let ((__function__ 'value-array->length)) (declare (ignorable __function__)) (len (value-array->elements array))))
Theorem:
(defthm posp-of-value-array->length (b* ((length (value-array->length array))) (posp length)) :rule-classes :rewrite)
Theorem:
(defthm value-array->length-of-value-fix-array (equal (value-array->length (value-fix array)) (value-array->length array)))
Theorem:
(defthm value-array->length-value-equiv-congruence-on-array (implies (value-equiv array array-equiv) (equal (value-array->length array) (value-array->length array-equiv))) :rule-classes :congruence)