• Top
  • Uint-array

Uint-arrayp

Recognizer for uint-array structures.

Signature
(uint-arrayp x) → *

Definitions and Theorems

Function: uint-arrayp

(defun uint-arrayp (x)
       (declare (xargs :guard t))
       (let ((__function__ 'uint-arrayp))
            (declare (ignorable __function__))
            (and (consp x)
                 (eq (car x) :array)
                 (true-listp (cdr x))
                 (eql (len (cdr x)) 2)
                 (b* ((elemtype (std::da-nth 0 (cdr x)))
                      (elements (std::da-nth 1 (cdr x))))
                     (and (typep elemtype)
                          (uint-listp elements)
                          (type-case elemtype :uint)
                          (consp elements))))))

Theorem: consp-when-uint-arrayp

(defthm consp-when-uint-arrayp
        (implies (uint-arrayp x) (consp x))
        :rule-classes :compound-recognizer)