Get the elemtype field from a uchar-array.
(uchar-array->elemtype x) → elemtype
This is an ordinary field accessor created by fty::defprod.
Function:
(defun uchar-array->elemtype$inline (x) (declare (xargs :guard (uchar-arrayp x))) (declare (xargs :guard t)) (let ((__function__ 'uchar-array->elemtype)) (declare (ignorable __function__)) (mbe :logic (b* ((x (and t x)) (elemtype (type-fix (std::da-nth 0 (cdr x)))) (elements (uchar-list-fix (std::da-nth 1 (cdr x))))) (if (type-case elemtype :uchar) elemtype (type-uchar))) :exec (std::da-nth 0 (cdr x)))))
Theorem:
(defthm typep-of-uchar-array->elemtype (b* ((elemtype (uchar-array->elemtype$inline x))) (typep elemtype)) :rule-classes :rewrite)
Theorem:
(defthm uchar-array->elemtype$inline-of-uchar-array-fix-x (equal (uchar-array->elemtype$inline (uchar-array-fix x)) (uchar-array->elemtype$inline x)))
Theorem:
(defthm uchar-array->elemtype$inline-uchar-array-equiv-congruence-on-x (implies (uchar-array-equiv x x-equiv) (equal (uchar-array->elemtype$inline x) (uchar-array->elemtype$inline x-equiv))) :rule-classes :congruence)