Get the kind (tag) of a value structure.
(value-kind x) → kind
Function:
(defun value-kind$inline (x) (declare (xargs :guard (valuep x))) (let ((__function__ 'value-kind)) (declare (ignorable __function__)) (mbe :logic (cond ((eq (car x) :object) :object) ((eq (car x) :array) :array) ((or (atom x) (eq (car x) :number)) :number) ((eq (car x) :string) :string) ((eq (car x) :true) :true) ((eq (car x) :false) :false) (t :null)) :exec (car x))))
Theorem:
(defthm value-kind-possibilities (or (equal (value-kind x) :object) (equal (value-kind x) :array) (equal (value-kind x) :number) (equal (value-kind x) :string) (equal (value-kind x) :true) (equal (value-kind x) :false) (equal (value-kind x) :null)) :rule-classes ((:forward-chaining :trigger-terms ((value-kind x)))))