• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • Std
    • Community
    • Proof-automation
    • ACL2
    • Macro-libraries
    • Interfacing-tools
    • Hardware-verification
    • Software-verification
      • Kestrel-books
        • Crypto-hdwallet
        • Apt
        • Error-checking
        • Fty-extensions
        • Isar
        • Kestrel-utilities
        • Set
        • Soft
        • C
        • Bv
        • Imp-language
        • Event-macros
        • Java
        • Bitcoin
        • Ethereum
        • Yul
          • Transformations
          • Language
            • Abstract-syntax
            • Dynamic-semantics
            • Concrete-syntax
              • Lexer
                • Lex-keyword
                • Lex-group-escape-sequence-single
                • Lex-symbol
                • Lex-rest-of-block-comment-fns
                • Lex-group-for-hex-string
                • Lex-hex-digit
                • Lex-group-escape-sequence-body
                • Lex-whitespace-char
                • Lex-string-literal
                • Lex-literal
                • Lex-identifier-start
                • Lex-hex-string
                • Lex-single-quoted-printable
                • Lex-double-quoted-printable
                • Lex-group-optional-underbar-and-two-hex-digits
                • Lex-escape-sequence
                • Lex-token
                • Lex-not-star-or-slash
                • Lex-not-lf-or-cr
                • Lex-group-squoted-or-escape
                • Lex-group-dquoted-or-escape
                • Lex-optional-sequence-of-2hex-digits
                • Lex-decimal-number
                • Lex-lexeme
                • Lex-identifier-rest
                • Lex-end-of-line-comment
                • Lex-nonzero-decimal-digit
                • Lex-repetition-*-optional-underbar-and-two-hex-digits
                • Lex-not-star
                • Lex-comment
                • Lex-boolean
                • Lex-block-comment
                • Lex-uppercase-letter
                • Lex-lowercase-letter
                • Lex-identifier
                • Lex-hex-number
                • Lex-decimal-digit
                • Lex-squote
                • Lex-repetition-4-hex-digits
                • Lex-optional-underbar
                • Lex-dquote
                • Lex-repetition-*-squoted-or-escape
                • Lex-repetition-*-dquoted-or-escape
                • Lex-repetition-*-whitespace-char
                • Lex-repetition-*-identifier-rest
                • Lex-repetition-2-hex-digits
                • Lex-lf
                • Lex-cr
                • Lex-repetition-*-not-lf-or-cr
                • Lex-repetition-*-decimal-digit
                • Lexemeize-yul
                • Lex-repetition-*-lexeme
                  • Lex-repetition-*-hex-digit
                  • *defparse-yul-group-table*
                  • Lex-whitespace
                  • Lexemeize-yul-bytes
                  • *defparse-yul-repetition-table*
                  • *defparse-yul-option-table*
                • Parser
                • Grammar-old
                • Grammar
                • Tokenizer
              • Static-soundness
              • Static-semantics
              • Errors
            • Yul-json
          • Zcash
          • ACL2-programming-language
          • Prime-fields
          • Json
          • Syntheto
          • File-io-light
          • Cryptography
          • Number-theory
          • Lists-light
          • Axe
          • Builtins
          • Solidity
          • Helpers
          • Htclient
          • Typed-lists-light
          • Arithmetic-light
        • X86isa
        • Axe
        • Execloader
      • Math
      • Testing-utilities
    • Lexer

    Lex-repetition-*-lexeme

    Parse a *lexeme.

    Signature
    (lex-repetition-*-lexeme abnf::input) 
      → 
    (mv abnf::trees abnf::rest-input)
    Arguments
    abnf::input — Guard (nat-listp abnf::input).
    Returns
    abnf::trees — Type (abnf::tree-listp abnf::trees).
    abnf::rest-input — Type (nat-listp abnf::rest-input).

    Definitions and Theorems

    Function: lex-repetition-*-lexeme

    (defun lex-repetition-*-lexeme (abnf::input)
      (declare (xargs :guard (nat-listp abnf::input)))
      (let ((__function__ 'lex-repetition-*-lexeme))
        (declare (ignorable __function__))
        (b* (((mv abnf::tree abnf::input)
              (lex-lexeme abnf::input))
             ((when (reserrp abnf::tree))
              (mv nil abnf::input))
             ((mv abnf::trees abnf::input)
              (lex-repetition-*-lexeme abnf::input)))
          (mv (cons abnf::tree abnf::trees)
              abnf::input))))

    Theorem: tree-listp-of-lex-repetition-*-lexeme.trees

    (defthm tree-listp-of-lex-repetition-*-lexeme.trees
      (b* (((mv abnf::?trees abnf::?rest-input)
            (lex-repetition-*-lexeme abnf::input)))
        (abnf::tree-listp abnf::trees))
      :rule-classes :rewrite)

    Theorem: nat-listp-of-lex-repetition-*-lexeme.rest-input

    (defthm nat-listp-of-lex-repetition-*-lexeme.rest-input
      (b* (((mv abnf::?trees abnf::?rest-input)
            (lex-repetition-*-lexeme abnf::input)))
        (nat-listp abnf::rest-input))
      :rule-classes :rewrite)

    Theorem: len-of-lex-repetition-*-lexeme

    (defthm len-of-lex-repetition-*-lexeme
      (b* (((mv abnf::?trees abnf::?rest-input)
            (lex-repetition-*-lexeme abnf::input)))
        (<= (len abnf::rest-input)
            (len abnf::input)))
      :rule-classes :linear)

    Theorem: lex-repetition-*-lexeme-of-nat-list-fix-input

    (defthm lex-repetition-*-lexeme-of-nat-list-fix-input
      (equal (lex-repetition-*-lexeme (nat-list-fix abnf::input))
             (lex-repetition-*-lexeme abnf::input)))

    Theorem: lex-repetition-*-lexeme-nat-list-equiv-congruence-on-input

    (defthm lex-repetition-*-lexeme-nat-list-equiv-congruence-on-input
      (implies (acl2::nat-list-equiv abnf::input input-equiv)
               (equal (lex-repetition-*-lexeme abnf::input)
                      (lex-repetition-*-lexeme input-equiv)))
      :rule-classes :congruence)