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