• Top
  • Slong-array

Slong-arrayp

Recognizer for slong-array structures.

Signature
(slong-arrayp x) → *

Definitions and Theorems

Function: slong-arrayp

(defun slong-arrayp (x)
       (declare (xargs :guard t))
       (let ((__function__ 'slong-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)
                          (slong-listp elements)
                          (type-case elemtype :slong)
                          (consp elements))))))

Theorem: consp-when-slong-arrayp

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