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