• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
      • Apt
      • Zfc
      • Acre
      • Milawa
      • Smtlink
      • Abnf
      • Vwsim
      • Isar
      • Wp-gen
      • Dimacs-reader
      • Pfcs
        • Proof-support
        • Abstract-syntax
        • R1cs-subset
        • Semantics
        • Abstract-syntax-operations
        • Indexed-names
        • Well-formedness
        • Concrete-syntax
          • Lexer
            • Lex-separator
            • Lex-operator
            • Lex-group-letter/digit/_
            • Lex-token
            • Lex-whitespace
            • Lex-line-terminator
            • Lex-identifier
            • Lex-lexeme
            • Lex-letter
            • Lex-uppercase-letter
              • Lex-lowercase-letter
              • Lex-integer
              • Lex-carriage-return
              • Lex-line-feed
              • Lex-space
              • Lex-optional-hyphen
              • Lex-optional-cr
              • Lex-numeral
              • Lex-digit
              • Lex-*-rest-of-identifier
              • Lex-1*-digit
              • Lexemize-pfcs-from-string
              • Lex-*-lexeme
              • Lex-*-digit
              • Lexemize-pfcs-from-bytes
              • Lexemize-pfcs
              • *defparse-pfcs-repetition-table*
              • *defparse-pfcs-option-table*
              • Lex-generation-macros
              • *defparse-pfcs-group-table*
              • Lex-generation-tables
            • Grammar
            • Parser
            • Tokenizer
          • R1cs-bridge
          • Parser-interface
        • Legacy-defrstobj
        • Proof-checker-array
        • Soft
        • C
        • Farray
        • Rp-rewriter
        • Instant-runoff-voting
        • Imp-language
        • Sidekick
        • Leftist-trees
        • Java
        • Taspi
        • Bitcoin
        • Riscv
        • 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
        • Bigmems
        • Builtins
        • Execloader
        • Aleo
        • Solidity
        • Paco
        • Concurrent-programs
        • Bls12-377-curves
      • Debugging
      • Std
      • Proof-automation
      • Macro-libraries
      • ACL2
      • Interfacing-tools
      • Hardware-verification
      • Software-verification
      • Math
      • Testing-utilities
    • Lexer

    Lex-uppercase-letter

    Parse a uppercase-letter.

    Signature
    (lex-uppercase-letter abnf::input) 
      → 
    (mv abnf::tree abnf::rest-input)
    Arguments
    abnf::input — Guard (nat-listp abnf::input).
    Returns
    abnf::tree — Type (abnf::tree-resultp abnf::tree).
    abnf::rest-input — Type (nat-listp abnf::rest-input).

    Definitions and Theorems

    Function: lex-uppercase-letter

    (defun lex-uppercase-letter (abnf::input)
     (declare (xargs :guard (nat-listp abnf::input)))
     (let ((__function__ 'lex-uppercase-letter))
      (declare (ignorable __function__))
      (b*
       (((mv abnf::treess abnf::input)
         (b* (((mv abnf::treess1 abnf::input1)
               (b* (((mv abnf::tree abnf::input)
                     (abnf::parse-range 65 90 abnf::input))
                    ((when (reserrp abnf::tree))
                     (mv (reserrf-push abnf::tree)
                         abnf::input))
                    (abnf::trees1 (list abnf::tree))
                    (abnf::treess (list abnf::trees1)))
                 (mv abnf::treess abnf::input)))
              ((when (not (reserrp abnf::treess1)))
               (mv abnf::treess1 abnf::input1)))
          (mv
           (reserrf
             (list :found (list abnf::treess1)
                   :required
                   '(((:repetition (:repeat 1 (:finite 1))
                                   (:num-val (:range (:hex) 65 90)))))))
           abnf::input)))
        ((when (reserrp abnf::treess))
         (mv (reserrf-push abnf::treess)
             (nat-list-fix abnf::input))))
       (mv (abnf::make-tree-nonleaf
                :rulename? (abnf::rulename "uppercase-letter")
                :branches abnf::treess)
           abnf::input))))

    Theorem: tree-resultp-of-lex-uppercase-letter.tree

    (defthm tree-resultp-of-lex-uppercase-letter.tree
      (b* (((mv abnf::?tree abnf::?rest-input)
            (lex-uppercase-letter abnf::input)))
        (abnf::tree-resultp abnf::tree))
      :rule-classes :rewrite)

    Theorem: nat-listp-of-lex-uppercase-letter.rest-input

    (defthm nat-listp-of-lex-uppercase-letter.rest-input
      (b* (((mv abnf::?tree abnf::?rest-input)
            (lex-uppercase-letter abnf::input)))
        (nat-listp abnf::rest-input))
      :rule-classes :rewrite)

    Theorem: len-of-lex-uppercase-letter-<=

    (defthm len-of-lex-uppercase-letter-<=
      (b* (((mv abnf::?tree abnf::?rest-input)
            (lex-uppercase-letter abnf::input)))
        (<= (len abnf::rest-input)
            (len abnf::input)))
      :rule-classes :linear)

    Theorem: len-of-lex-uppercase-letter-<

    (defthm len-of-lex-uppercase-letter-<
      (b* (((mv abnf::?tree abnf::?rest-input)
            (lex-uppercase-letter abnf::input)))
        (implies (not (reserrp abnf::tree))
                 (< (len abnf::rest-input)
                    (len abnf::input))))
      :rule-classes :linear)

    Theorem: lex-uppercase-letter-of-nat-list-fix-input

    (defthm lex-uppercase-letter-of-nat-list-fix-input
      (equal (lex-uppercase-letter (nat-list-fix abnf::input))
             (lex-uppercase-letter abnf::input)))

    Theorem: lex-uppercase-letter-nat-list-equiv-congruence-on-input

    (defthm lex-uppercase-letter-nat-list-equiv-congruence-on-input
      (implies (acl2::nat-list-equiv abnf::input input-equiv)
               (equal (lex-uppercase-letter abnf::input)
                      (lex-uppercase-letter input-equiv)))
      :rule-classes :congruence)