Get the kind (tag) of a toplevel structure.
(toplevel-kind x) → kind
Function:
(defun toplevel-kind$inline (x) (declare (xargs :guard (toplevelp x))) (let ((__function__ 'toplevel-kind)) (declare (ignorable __function__)) (mbe :logic (cond ((or (atom x) (eq (car x) :type)) :type) ((eq (car x) :types) :types) ((eq (car x) :function) :function) ((eq (car x) :functions) :functions) ((eq (car x) :specification) :specification) ((eq (car x) :theorem) :theorem) (t :transform)) :exec (car x))))
Theorem:
(defthm toplevel-kind-possibilities (or (equal (toplevel-kind x) :type) (equal (toplevel-kind x) :types) (equal (toplevel-kind x) :function) (equal (toplevel-kind x) :functions) (equal (toplevel-kind x) :specification) (equal (toplevel-kind x) :theorem) (equal (toplevel-kind x) :transform)) :rule-classes ((:forward-chaining :trigger-terms ((toplevel-kind x)))))