• 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
          • Grammar
          • Parser
          • Tokenizer
            • Tokenize-pfcs
            • Filter-and-reduce-lexeme-tree-to-subtoken-trees
            • Check-and-deref-tree-token?
            • Check-and-deref-tree-lexeme?
            • Tokenize-pfcs-bytes
            • Is-tree-rulename?
          • R1cs-bridge
          • Parser-interface
        • Legacy-defrstobj
        • C
        • Proof-checker-array
        • Soft
        • Farray
        • Rp-rewriter
        • Instant-runoff-voting
        • Imp-language
        • Sidekick
        • Ethereum
        • Leftist-trees
        • Java
        • Riscv
        • Taspi
        • Bitcoin
        • Zcash
        • Des
        • X86isa
        • Sha-2
        • Yul
        • Proof-checker-itp13
        • Regex
        • ACL2-programming-language
        • Json
        • Jfkr
        • Equational
        • Cryptography
        • Axe
        • Poseidon
        • Where-do-i-place-my-book
        • 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
    • 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 look at 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::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)