A character value notation is well-formed iff it consists of only non-control ASCII characters, except for the double quote character.
(char-val-wfp char-val) → yes/no
These allowed characters are consistent with
the rule
Function:
(defun char-val-wfp (char-val) (declare (xargs :guard (char-val-p char-val))) (b* ((allowed-chars (nats=>chars (append (integers-from-to 32 33) (integers-from-to 35 126))))) (char-val-case char-val :sensitive (subsetp (explode char-val.get) allowed-chars) :insensitive (subsetp (explode char-val.get) allowed-chars))))
Theorem:
(defthm booleanp-of-char-val-wfp (b* ((yes/no (char-val-wfp char-val))) (booleanp yes/no)) :rule-classes :rewrite)