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