• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
      • Apt
      • Zfc
      • Acre
      • Milawa
      • Smtlink
      • Abnf
      • Vwsim
      • Isar
      • Wp-gen
      • Dimacs-reader
      • Pfcs
      • Legacy-defrstobj
      • Proof-checker-array
      • Soft
      • C
      • Farray
      • Rp-rewriter
      • Instant-runoff-voting
      • Imp-language
      • Sidekick
      • Leftist-trees
      • Java
        • Atj
        • Aij
        • Language
          • Syntax
            • Grammar
            • Unicode-escapes
            • Unicode-input-char
            • Escape-sequence
            • Identifiers
            • Primitive-types
            • Reference-types
            • Keywords
            • Unicode-characters
            • Integer-literals
            • String-literals
            • Octal-digits
            • Hexadecimal-digits
            • Decimal-digits
            • Binary-digits
            • Character-literals
              • Unicode-charlit-char
              • Char-literal
                • Char-literal-fix
                • Char-literal-case
                • Char-literal-equiv
                • Char-literalp
                  • Char-literal-escape
                  • Char-literal-char
                  • Char-literal-kind
                • Unicode-charlit-char-fix
                • Unicode-charlit-char-p
              • Null-literal
              • Floating-point-literals
              • Boolean-literals
              • Package-names
              • Literals
            • Semantics
        • Taspi
        • Riscv
        • Bitcoin
        • Des
        • Ethereum
        • X86isa
        • Sha-2
        • Yul
        • Zcash
        • Proof-checker-itp13
        • Regex
        • ACL2-programming-language
        • Json
        • Jfkr
        • Equational
        • Cryptography
        • Poseidon
        • Where-do-i-place-my-book
        • Axe
        • Aleo
        • Bigmems
        • Builtins
        • Execloader
        • Solidity
        • Paco
        • Concurrent-programs
        • Bls12-377-curves
      • Debugging
      • Std
      • Community
      • Proof-automation
      • ACL2
      • Macro-libraries
      • Interfacing-tools
      • Hardware-verification
      • Software-verification
      • Math
      • Testing-utilities
    • Char-literal

    Char-literalp

    Recognizer for char-literal structures.

    Signature
    (char-literalp x) → *

    Definitions and Theorems

    Function: char-literalp

    (defun char-literalp (x)
      (declare (xargs :guard t))
      (let ((__function__ 'char-literalp))
        (declare (ignorable __function__))
        (and (consp x)
             (cond ((or (atom x) (eq (car x) :char))
                    (and (true-listp (cdr x))
                         (eql (len (cdr x)) 1)
                         (b* ((get (std::da-nth 0 (cdr x))))
                           (unicode-charlit-char-p get))))
                   (t (and (eq (car x) :escape)
                           (and (true-listp (cdr x))
                                (eql (len (cdr x)) 1))
                           (b* ((get (std::da-nth 0 (cdr x))))
                             (escape-sequence-p get))))))))

    Theorem: consp-when-char-literalp

    (defthm consp-when-char-literalp
      (implies (char-literalp x) (consp x))
      :rule-classes :compound-recognizer)