• 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
                • Keywords-grammar-validation
                  • Reserved-keywordp-when-grammar-reserved-keywordp
                    • Contextual-keywordp-when-grammar-contextual-keywordp
                    • Reserved-keyword-tree
                    • Contextual-keyword-tree
                    • Grammar-reserved-keywordp
                    • Grammar-contextual-keywordp
                    • Grammar-contextual-keywordp-when-contextual-keywordp
                    • Grammar-reserved-keywordp-when-reserved-keywordp
                    • Reserved-keywordp-is-grammar-reserved-keywordp
                    • Contextual-keywordp-is-grammar-contextual-keywordp
                  • Reserved-keywordp
                  • Contextual-keywordp
                  • *reserved-keywords*
                  • *contextual-keywords*
                • Integer-literals
                • String-literals
                • Octal-digits
                • 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
    • Keywords-grammar-validation

    Reserved-keywordp-when-grammar-reserved-keywordp

    Proof of reserved-keywordp from grammar-reserved-keywordp.

    This is proved via a lemma asserting that a terminated tree rooted at reserved-keyword has leaves that satisfy reserved-keywordp. The lemma is proved by exhaustively opening abnf-tree-with-root-p, which splits into many cases corresponding to the many alternatives of the reserved-keyword 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-reserved-keywordp.

    Definitions and Theorems

    Theorem: reserved-keywordp-when-grammar-reserved-keywordp

    (defthm reserved-keywordp-when-grammar-reserved-keywordp
      (implies (grammar-reserved-keywordp x)
               (reserved-keywordp x)))