Build an array of type
(ushort-array-of elements) → array
Function:
(defun ushort-array-of (elements) (declare (xargs :guard (ushort-listp elements))) (declare (xargs :guard (consp elements))) (let ((__function__ 'ushort-array-of)) (declare (ignorable __function__)) (ushort-array (type-ushort) elements)))
Theorem:
(defthm ushort-arrayp-of-ushort-array-of (b* ((array (ushort-array-of elements))) (ushort-arrayp array)) :rule-classes :rewrite)
Theorem:
(defthm ushort-array-of-of-ushort-array->elements (equal (ushort-array-of (ushort-array->elements array)) (ushort-array-fix array)))
Theorem:
(defthm ushort-array-of-alt-def (implies (and (ushort-listp elems) (consp elems)) (equal (ushort-array-of elems) (make-value-array :elemtype (type-ushort) :elements elems))))
Theorem:
(defthm ushort-array-of-of-ushort-list-fix-elements (equal (ushort-array-of (ushort-list-fix elements)) (ushort-array-of elements)))
Theorem:
(defthm ushort-array-of-ushort-list-equiv-congruence-on-elements (implies (ushort-list-equiv elements elements-equiv) (equal (ushort-array-of elements) (ushort-array-of elements-equiv))) :rule-classes :congruence)