Recognizer for jliteral structures.
(jliteralp x) → *
Function:
(defun jliteralp (x) (declare (xargs :guard t)) (let ((__function__ 'jliteralp)) (declare (ignorable __function__)) (and (consp x) (cond ((or (atom x) (eq (car x) :integer)) (and (true-listp (cdr x)) (eql (len (cdr x)) 1) (b* ((get (std::da-nth 0 (cdr x)))) (integer-literalp get)))) ((eq (car x) :floating) (and (true-listp (cdr x)) (eql (len (cdr x)) 1) (b* ((value (std::da-nth 0 (cdr x)))) (natp value)))) ((eq (car x) :boolean) (and (true-listp (cdr x)) (eql (len (cdr x)) 1) (b* ((value (std::da-nth 0 (cdr x)))) (booleanp value)))) ((eq (car x) :character) (and (true-listp (cdr x)) (eql (len (cdr x)) 1) (b* ((value (std::da-nth 0 (cdr x)))) (characterp value)))) ((eq (car x) :string) (and (true-listp (cdr x)) (eql (len (cdr x)) 1) (b* ((value (std::da-nth 0 (cdr x)))) (stringp value)))) (t (and (eq (car x) :null) (and (true-listp (cdr x)) (eql (len (cdr x)) 0)) (b* nil t)))))))
Theorem:
(defthm consp-when-jliteralp (implies (jliteralp x) (consp x)) :rule-classes :compound-recognizer)