Get the kind (tag) of a tree structure.
(tree-kind x) → kind
Function:
(defun tree-kind$inline (x) (declare (xargs :guard (treep x))) (let ((__function__ 'tree-kind)) (declare (ignorable __function__)) (mbe :logic (cond ((or (atom x) (eq (car x) :leafterm)) :leafterm) ((eq (car x) :leafrule) :leafrule) (t :nonleaf)) :exec (car x))))
Theorem:
(defthm tree-kind-possibilities (or (equal (tree-kind x) :leafterm) (equal (tree-kind x) :leafrule) (equal (tree-kind x) :nonleaf)) :rule-classes ((:forward-chaining :trigger-terms ((tree-kind x)))))