Get the kind (tag) of a unary-op structure.
(unary-op-kind x) → kind
Function:
(defun unary-op-kind$inline (x) (declare (xargs :guard (unary-opp x))) (let ((__function__ 'unary-op-kind)) (declare (ignorable __function__)) (mbe :logic (cond ((or (atom x) (eq (car x) :abs)) :abs) ((eq (car x) :abs.w) :abs.w) ((eq (car x) :double) :double) ((eq (car x) :inv) :inv) ((eq (car x) :neg) :neg) ((eq (car x) :not) :not) ((eq (car x) :square) :square) (t :sqrt)) :exec (car x))))
Theorem:
(defthm unary-op-kind-possibilities (or (equal (unary-op-kind x) :abs) (equal (unary-op-kind x) :abs.w) (equal (unary-op-kind x) :double) (equal (unary-op-kind x) :inv) (equal (unary-op-kind x) :neg) (equal (unary-op-kind x) :not) (equal (unary-op-kind x) :square) (equal (unary-op-kind x) :sqrt)) :rule-classes ((:forward-chaining :trigger-terms ((unary-op-kind x)))))