• Top
  • Fun-sort

Fun-sortp

Recognizer for fun-sort structures.

Signature
(fun-sortp x) → *

Definitions and Theorems

Function: fun-sortp

(defun fun-sortp (x)
  (declare (xargs :guard t))
  (let ((__function__ 'fun-sortp))
    (declare (ignorable __function__))
    (and (consp x)
         (cond ((or (atom x) (eq (car x) :standard))
                (and (true-listp (cdr x))
                     (eql (len (cdr x)) 0)
                     (b* nil t)))
               (t (and (eq (car x) :transition)
                       (and (true-listp (cdr x))
                            (eql (len (cdr x)) 0))
                       (b* nil t)))))))

Theorem: consp-when-fun-sortp

(defthm consp-when-fun-sortp
  (implies (fun-sortp x) (consp x))
  :rule-classes :compound-recognizer)