Get the kind (tag) of a scratchobj structure.
(scratchobj-kind x) → kind
Function:
(defun scratchobj-kind$inline (x) (declare (xargs :guard (scratchobj-p x))) (let ((__function__ 'scratchobj-kind)) (declare (ignorable __function__)) (mbe :logic (cond ((or (atom x) (eq (car x) :fgl-obj)) :fgl-obj) ((eq (car x) :fgl-objlist) :fgl-objlist) ((eq (car x) :bfr) :bfr) ((eq (car x) :bfrlist) :bfrlist) ((eq (car x) :cinst) :cinst) (t :cinstlist)) :exec (car x))))
Theorem:
(defthm scratchobj-kind-possibilities (or (equal (scratchobj-kind x) :fgl-obj) (equal (scratchobj-kind x) :fgl-objlist) (equal (scratchobj-kind x) :bfr) (equal (scratchobj-kind x) :bfrlist) (equal (scratchobj-kind x) :cinst) (equal (scratchobj-kind x) :cinstlist)) :rule-classes ((:forward-chaining :trigger-terms ((scratchobj-kind x)))))