Get the kind (tag) of a element structure.
(element-kind x) → kind
Function:
(defun element-kind$inline (x) (declare (xargs :guard (elementp x))) (let ((__function__ 'element-kind)) (declare (ignorable __function__)) (mbe :logic (cond ((or (atom x) (eq (car x) :rulename)) :rulename) ((eq (car x) :group) :group) ((eq (car x) :option) :option) ((eq (car x) :char-val) :char-val) ((eq (car x) :num-val) :num-val) (t :prose-val)) :exec (car x))))
Theorem:
(defthm element-kind-possibilities (or (equal (element-kind x) :rulename) (equal (element-kind x) :group) (equal (element-kind x) :option) (equal (element-kind x) :char-val) (equal (element-kind x) :num-val) (equal (element-kind x) :prose-val)) :rule-classes ((:forward-chaining :trigger-terms ((element-kind x)))))