Get the kind (tag) of a escape structure.
(escape-kind x) → kind
Function:
(defun escape-kind$inline (x) (declare (xargs :guard (escapep x))) (let ((__function__ 'escape-kind)) (declare (ignorable __function__)) (mbe :logic (cond ((or (atom x) (eq (car x) :single-quote)) :single-quote) ((eq (car x) :double-quote) :double-quote) ((eq (car x) :backslash) :backslash) ((eq (car x) :letter-n) :letter-n) ((eq (car x) :letter-r) :letter-r) ((eq (car x) :letter-t) :letter-t) ((eq (car x) :line-feed) :line-feed) ((eq (car x) :carriage-return) :carriage-return) ((eq (car x) :x) :x) (t :u)) :exec (car x))))
Theorem:
(defthm escape-kind-possibilities (or (equal (escape-kind x) :single-quote) (equal (escape-kind x) :double-quote) (equal (escape-kind x) :backslash) (equal (escape-kind x) :letter-n) (equal (escape-kind x) :letter-r) (equal (escape-kind x) :letter-t) (equal (escape-kind x) :line-feed) (equal (escape-kind x) :carriage-return) (equal (escape-kind x) :x) (equal (escape-kind x) :u)) :rule-classes ((:forward-chaining :trigger-terms ((escape-kind x)))))