• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • Community
    • Std
    • Proof-automation
    • Macro-libraries
    • ACL2
    • Interfacing-tools
    • Hardware-verification
    • Software-verification
      • Kestrel-books
        • Crypto-hdwallet
        • Apt
        • Error-checking
        • Fty-extensions
        • Isar
        • Kestrel-utilities
        • Set
        • C
        • Soft
        • Bv
        • Imp-language
        • Ethereum
        • Event-macros
        • Java
          • Atj
          • Aij
          • Language
            • Syntax
              • Grammar
              • Unicode-escapes
              • Unicode-input-char
              • Escape-sequence
              • Identifiers
              • Primitive-types
              • Reference-types
              • Unicode-characters
              • Keywords
              • Integer-literals
              • String-literals
              • Octal-digits
                • Oct-digit
                • Octal-digits-grammar-validation
                  • Oct-digitp-when-grammar-oct-digitp
                    • Grammar-oct-digitp
                    • Oct-digit-tree
                    • Grammar-oct-digitp-when-oct-digitp
                    • Oct-digitp-is-grammar-oct-digitp
                  • Oct-digit-value
                  • Oct-digit-list
                  • Octal-digits-std/strings-theorems
                • Hexadecimal-digits
                • Decimal-digits
                • Binary-digits
                • Character-literals
                • Null-literal
                • Floating-point-literals
                • Boolean-literals
                • Package-names
                • Literals
              • Semantics
          • Riscv
          • Bitcoin
          • Zcash
          • Yul
          • ACL2-programming-language
          • Prime-fields
          • Json
          • Syntheto
          • File-io-light
          • Cryptography
          • Number-theory
          • Axe
          • Lists-light
          • Builtins
          • Solidity
          • Helpers
          • Htclient
          • Typed-lists-light
          • Arithmetic-light
        • X86isa
        • Axe
        • Execloader
      • Math
      • Testing-utilities
    • Octal-digits-grammar-validation

    Oct-digitp-when-grammar-oct-digitp

    Proof of oct-digitp from grammar-oct-digitp.

    This is proved via a lemma asserting that a terminated tree rooted at octal-digit has a string at the leaves whose only element satisfies oct-digitp (that this string is a singleton is proved in grammar-oct-digitp). The lemma is proved by exhaustively opening abnf-tree-with-root-p, which splits into cases corresponding to the alternatives of the octal-digit rule, thus prescribing the exact form of the tree in each case, and in particular its leaves. The theorem is then proved by instantiating the lemma to the witness tree of grammar-oct-digitp.

    Definitions and Theorems

    Theorem: oct-digitp-when-grammar-oct-digitp

    (defthm oct-digitp-when-grammar-oct-digitp
      (implies (grammar-oct-digitp x)
               (oct-digitp (car x))))