• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • Std
    • Proof-automation
    • Macro-libraries
    • ACL2
      • Theories
      • Rule-classes
      • Proof-builder
      • Recursion-and-induction
      • Hons-and-memoization
      • Events
      • Parallelism
      • History
      • Programming
      • Operational-semantics
      • Real
      • Start-here
      • Debugging
      • Miscellaneous
      • Output-controls
      • Macros
      • Interfacing-tools
        • Io
        • Defttag
        • Sys-call
        • Save-exec
        • Quicklisp
        • Std/io
        • Oslib
        • Bridge
        • Clex
          • Example-lexer
            • Token-p
            • Lex-punctuation
            • Lex-id/keyword
            • Lex-string
            • Lex-whitespace
            • Lex-comment
            • Lex1
            • Lex-main
            • Lex*
            • Tokenlist-p
            • Letter-char-p
            • Idtail-char-p
              • Idtail-charlist-p
              • Idtail-chars
            • Whitespace-char-p
            • Number-char-p
            • Tokentype-p
            • Lex*-exec
            • Newline-string
          • Sin
          • Matching-functions
          • Def-sin-progress
        • Tshell
        • Unsound-eval
        • Hacker
        • ACL2s-interface
        • Startup-banner
        • Command-line
    • Interfacing-tools
      • Io
      • Defttag
      • Sys-call
      • Save-exec
      • Quicklisp
      • Std/io
      • Oslib
      • Bridge
      • Clex
        • Example-lexer
          • Token-p
          • Lex-punctuation
          • Lex-id/keyword
          • Lex-string
          • Lex-whitespace
          • Lex-comment
          • Lex1
          • Lex-main
          • Lex*
          • Tokenlist-p
          • Letter-char-p
          • Idtail-char-p
            • Idtail-charlist-p
            • Idtail-chars
          • Whitespace-char-p
          • Number-char-p
          • Tokentype-p
          • Lex*-exec
          • Newline-string
        • Sin
        • Matching-functions
        • Def-sin-progress
      • Tshell
      • Unsound-eval
      • Hacker
      • ACL2s-interface
      • Startup-banner
      • Command-line
    • Hardware-verification
    • Software-verification
    • Math
    • Testing-utilities
  • 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.