• Top
    • Documentation
    • Books
    • Recursion-and-induction
    • Boolean-reasoning
    • Projects
    • Debugging
    • Std
    • Proof-automation
    • Macro-libraries
    • ACL2
    • Interfacing-tools
      • Io
      • Defttag
      • Sys-call
      • Save-exec
      • Quicklisp
      • Oslib
      • Std/io
      • Bridge
      • Clex
        • Example-lexer
          • Token-p
          • Lex-punctuation
          • Lex-id/keyword
          • Lex-string
          • Lex-comment
          • Lex-whitespace
          • Lex1
          • Lex-main
          • Lex*
          • Tokenlist-p
          • Idtail-char-p
            • Idtail-charlist-p
            • Idtail-chars
          • Letter-char-p
          • Whitespace-char-p
          • Number-char-p
          • Tokentype-p
          • Lex*-exec
          • Newline-string
        • Sin
        • Matching-functions
        • Def-sin-progress
      • Tshell
      • Unsound-eval
      • Hacker
      • Startup-banner
      • Command-line
    • Hardware-verification
    • Software-verification
    • Testing-utilities
    • Math
  • Example-lexer

Idtail-char-p

Recogize characters that are okay in the "tails" of identifiers: letters, numbers, and underscores.

Definitions and Theorems

Function: idtail-char-p

(defun idtail-char-p (x)
       (declare (xargs :guard t))
       (and (characterp x)
            (or (letter-char-p x)
                (number-char-p x)
                (eql x #\_))))

Theorem: booleanp-of-idtail-char-p

(defthm booleanp-of-idtail-char-p
        (booleanp (idtail-char-p x))
        :rule-classes :type-prescription)

Theorem: characterp-when-idtail-char-p

(defthm characterp-when-idtail-char-p
        (implies (idtail-char-p x)
                 (characterp x))
        :rule-classes :compound-recognizer)

Subtopics

Idtail-charlist-p
(idtail-charlist-p x) recognizes lists where every element satisfies idtail-char-p.
Idtail-chars
A character set for idtail-char-p.