Read an element from an array of type
(sshort-array-read array index) → element
Function:
(defun sshort-array-read (array index) (declare (xargs :guard (and (sshort-arrayp array) (cintegerp index)))) (declare (xargs :guard (sshort-array-index-okp array index))) (let ((__function__ 'sshort-array-read)) (declare (ignorable __function__)) (sshort-fix (nth (integer-from-cinteger index) (sshort-array->elements array)))))
Theorem:
(defthm sshortp-of-sshort-array-read (b* ((element (sshort-array-read array index))) (sshortp element)) :rule-classes :rewrite)
Theorem:
(defthm sshort-array-read-alt-def (implies (and (sshort-arrayp array) (cintegerp index) (sshort-array-index-okp array index)) (equal (sshort-array-read array index) (value-array-read (integer-from-cinteger index) array))))
Theorem:
(defthm sshort-array-read-of-sshort-array-fix-array (equal (sshort-array-read (sshort-array-fix array) index) (sshort-array-read array index)))
Theorem:
(defthm sshort-array-read-sshort-array-equiv-congruence-on-array (implies (sshort-array-equiv array array-equiv) (equal (sshort-array-read array index) (sshort-array-read array-equiv index))) :rule-classes :congruence)
Theorem:
(defthm sshort-array-read-of-cinteger-fix-index (equal (sshort-array-read array (cinteger-fix index)) (sshort-array-read array index)))
Theorem:
(defthm sshort-array-read-cinteger-equiv-congruence-on-index (implies (cinteger-equiv index index-equiv) (equal (sshort-array-read array index) (sshort-array-read array index-equiv))) :rule-classes :congruence)