• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
      • Apt
      • Zfc
      • Acre
      • Milawa
      • Smtlink
      • Abnf
      • Vwsim
      • Isar
      • Wp-gen
      • Dimacs-reader
      • Pfcs
        • Proof-support
        • Semantics
        • Lifting
        • R1cs-subset
        • Well-formedness
        • Abstract-syntax
        • 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-carriage-return
            • Lex-line-feed
            • Lex-space
            • 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
        • Riscv
        • Taspi
        • 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
      • Community
      • Std
      • Proof-automation
      • Macro-libraries
      • ACL2
      • Interfacing-tools
      • Hardware-verification
      • Software-verification
      • Math
      • Testing-utilities
    • Lexer

    Lex-1*-digit

    Lex 1*digit.

    Signature
    (lex-1*-digit input) → (mv trees rest-input)
    Arguments
    input — Guard (nat-listp input).
    Returns
    trees — Type (abnf::tree-list-resultp trees).
    rest-input — Type (nat-listp rest-input).

    Definitions and Theorems

    Function: lex-1*-digit

    (defun lex-1*-digit (input)
      (declare (xargs :guard (nat-listp input)))
      (let ((__function__ 'lex-1*-digit))
        (declare (ignorable __function__))
        (b* (((mv tree-thing1 input-after-thing1)
              (lex-digit input))
             ((when (reserrp tree-thing1))
              (mv (reserrf-push tree-thing1)
                  (nat-list-fix input)))
             ((mv trees input-after-trees)
              (lex-*-digit input-after-thing1)))
          (mv (cons tree-thing1 trees)
              input-after-trees))))

    Theorem: tree-list-resultp-of-lex-1*-digit.trees

    (defthm tree-list-resultp-of-lex-1*-digit.trees
      (b* (((mv ?trees ?rest-input)
            (lex-1*-digit input)))
        (abnf::tree-list-resultp trees))
      :rule-classes :rewrite)

    Theorem: nat-listp-of-lex-1*-digit.rest-input

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

    Theorem: len-of-lex-1*-digit-<=

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

    Theorem: len-of-lex-1*-digit-<

    (defthm len-of-lex-1*-digit-<
      (b* (((mv ?trees ?rest-input)
            (lex-1*-digit input)))
        (implies (not (reserrp trees))
                 (< (len rest-input) (len input))))
      :rule-classes :linear)

    Theorem: lex-1*-digit-of-nat-list-fix-input

    (defthm lex-1*-digit-of-nat-list-fix-input
      (equal (lex-1*-digit (nat-list-fix input))
             (lex-1*-digit input)))

    Theorem: lex-1*-digit-nat-list-equiv-congruence-on-input

    (defthm lex-1*-digit-nat-list-equiv-congruence-on-input
      (implies (acl2::nat-list-equiv input input-equiv)
               (equal (lex-1*-digit input)
                      (lex-1*-digit input-equiv)))
      :rule-classes :congruence)