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) :integer)) :integer) ((eq (car x) :fpoint) :fpoint) ((eq (car x) :char) :char) ((eq (car x) :string) :string) ((eq (car x) :boolean) :boolean) (t :null)) :exec (car x))))
Theorem:
(defthm literal-kind-possibilities (or (equal (literal-kind x) :integer) (equal (literal-kind x) :fpoint) (equal (literal-kind x) :char) (equal (literal-kind x) :string) (equal (literal-kind x) :boolean) (equal (literal-kind x) :null)) :rule-classes ((:forward-chaining :trigger-terms ((literal-kind x)))))