• 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
        • Riscv
        • Bitcoin
        • Zcash
        • Yul
          • Transformations
          • Language
            • Abstract-syntax
            • Dynamic-semantics
            • Concrete-syntax
              • Lexer
              • Parser
              • Grammar-old
              • Grammar
              • Tokenizer
                • Tokenize-yul
                • Filter-and-reduce-lexeme-tree-to-subtoken-trees
                • Check-and-deref-tree-token?
                • Check-and-deref-tree-lexeme?
                • Tokenize-yul-bytes
                • Is-tree-rulename?
              • Static-soundness
              • Static-semantics
              • Errors
            • Yul-json
          • 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
    • Tokenizer

    Is-tree-rulename?

    True if tree is nonleaf for rule rulename-string.

    Signature
    (is-tree-rulename? tree rulename-string) → yes/no
    Arguments
    tree — Guard (abnf::treep tree).
    rulename-string — Guard (stringp rulename-string).
    Returns
    yes/no — Type (booleanp yes/no).

    Does not details of the internal structure.

    Definitions and Theorems

    Function: is-tree-rulename?

    (defun is-tree-rulename? (tree rulename-string)
      (declare (xargs :guard (and (abnf::treep tree)
                                  (stringp rulename-string))))
      (let ((__function__ 'is-tree-rulename?))
        (declare (ignorable __function__))
        (and (abnf::treep tree)
             (abnf::tree-case tree :nonleaf)
             (equal (abnf::tree-nonleaf->rulename? tree)
                    (abnf::rulename rulename-string)))))

    Theorem: booleanp-of-is-tree-rulename?

    (defthm booleanp-of-is-tree-rulename?
      (b* ((yes/no (is-tree-rulename? tree rulename-string)))
        (booleanp yes/no))
      :rule-classes :rewrite)