Recognizer for coordinate structures.
(coordinatep x) → *
Function:
(defun coordinatep (x) (declare (xargs :guard t)) (let ((__function__ 'coordinatep)) (declare (ignorable __function__)) (and (consp x) (cond ((or (atom x) (eq (car x) :explicit)) (and (true-listp (cdr x)) (eql (len (cdr x)) 1) (b* ((get (std::da-nth 0 (cdr x)))) (integerp get)))) ((eq (car x) :sign-high) (and (true-listp (cdr x)) (eql (len (cdr x)) 0) (b* nil t))) ((eq (car x) :sign-low) (and (true-listp (cdr x)) (eql (len (cdr x)) 0) (b* nil t))) (t (and (eq (car x) :inferred) (and (true-listp (cdr x)) (eql (len (cdr x)) 0)) (b* nil t)))))))
Theorem:
(defthm consp-when-coordinatep (implies (coordinatep x) (consp x)) :rule-classes :compound-recognizer)