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) :dec-number) :dec-number) ((eq (car x) :hex-number) :hex-number) ((eq (car x) :plain-string) :plain-string) (t :hex-string)) :exec (car x))))
Theorem:
(defthm literal-kind-possibilities (or (equal (literal-kind x) :boolean) (equal (literal-kind x) :dec-number) (equal (literal-kind x) :hex-number) (equal (literal-kind x) :plain-string) (equal (literal-kind x) :hex-string)) :rule-classes ((:forward-chaining :trigger-terms ((literal-kind x)))))