Get the kind (tag) of a simple-escape structure.
(simple-escape-kind x) → kind
Function:
(defun simple-escape-kind$inline (x) (declare (xargs :guard (simple-escapep x))) (let ((__function__ 'simple-escape-kind)) (declare (ignorable __function__)) (mbe :logic (cond ((or (atom x) (eq (car x) :squote)) :squote) ((eq (car x) :dquote) :dquote) ((eq (car x) :qmark) :qmark) ((eq (car x) :bslash) :bslash) ((eq (car x) :a) :a) ((eq (car x) :b) :b) ((eq (car x) :f) :f) ((eq (car x) :n) :n) ((eq (car x) :r) :r) ((eq (car x) :t) :t) ((eq (car x) :v) :v) (t :percent)) :exec (car x))))
Theorem:
(defthm simple-escape-kind-possibilities (or (equal (simple-escape-kind x) :squote) (equal (simple-escape-kind x) :dquote) (equal (simple-escape-kind x) :qmark) (equal (simple-escape-kind x) :bslash) (equal (simple-escape-kind x) :a) (equal (simple-escape-kind x) :b) (equal (simple-escape-kind x) :f) (equal (simple-escape-kind x) :n) (equal (simple-escape-kind x) :r) (equal (simple-escape-kind x) :t) (equal (simple-escape-kind x) :v) (equal (simple-escape-kind x) :percent)) :rule-classes ((:forward-chaining :trigger-terms ((simple-escape-kind x)))))