• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
      • Apt
      • Zfc
      • Acre
      • Milawa
      • Smtlink
      • Abnf
        • Deftreeops
        • Defdefparse
        • Defgrammar
        • Tree-utilities
        • Notation
          • Syntax-abstraction
          • Semantics
            • Tree-terminatedp
            • Tree->string
            • String-has-finite-parse-trees-p
            • Parse-trees-of-string-p
            • Tree-match-element-p
            • Parse-treep
            • Symbol
            • String-unambiguousp
            • Tree-match-num-val-p
            • Nat-match-insensitive-char-p
            • Nats-match-insensitive-chars-p
            • Tree-option
            • String-parsablep
            • Lookup-rulename
            • Nats-match-sensitive-chars-p
            • Numrep-match-repeat-range-p
            • Tree-match-char-val-p
            • Tree-list-match-repetition-p
            • String-ambiguousp
            • Parse
            • Tree-match-prose-val-p
            • Nat-match-sensitive-char-p
            • Theorems-about-terminated-trees-matching-elements
            • Tree-option-result
            • Tree-list-result
            • Tree-list-list-result
            • Tree-result
            • Tree-list-list-match-concatenation-p
            • Languagep
            • Terminal-string-for-rules-p
            • Tree-list-list-match-alternation-p
            • Tree-list-match-element-p
            • Parse!
            • String
            • Tree-set
            • Trees
              • Tree
                • Treep
                • Tree-case
                • Tree-equiv
                • Tree-nonleaf
                  • Tree-nonleaf->rulename?
                    • Tree-nonleaf->branches
                    • Make-tree-nonleaf
                    • Change-tree-nonleaf
                  • Tree-leafterm
                  • Tree-leafrule
                  • Tree-kind
                  • Tree-fix
                  • Tree-fix-when-nonleaf-norulename-nobranches
                  • Tree-count
                  • True-listp-of-car-of-tree-nonleaf->branches
                • Tree-list
                • Tree-list-list
            • Abstract-syntax
            • Core-rules
            • Concrete-syntax
          • Grammar-parser
          • Meta-circular-validation
          • Parsing-primitives-defresult
          • Parsing-primitives-seq
          • Operations
          • Examples
          • Differences-with-paper
          • Constructor-utilities
          • Grammar-printer
          • Parsing-tools
        • Vwsim
        • Isar
        • Wp-gen
        • Dimacs-reader
        • Pfcs
        • Legacy-defrstobj
        • Proof-checker-array
        • Soft
        • C
        • Farray
        • Rp-rewriter
        • Riscv
        • Instant-runoff-voting
        • Imp-language
        • Sidekick
        • Leftist-trees
        • Java
        • 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
      • Std
      • Community
      • Proof-automation
      • Macro-libraries
      • ACL2
      • Interfacing-tools
      • Hardware-verification
      • Software-verification
      • Math
      • Testing-utilities
    • Tree-nonleaf

    Tree-nonleaf->rulename?

    Get the rulename? field from a tree-nonleaf.

    Signature
    (tree-nonleaf->rulename? x) → rulename?
    Arguments
    x — Guard (treep x).
    Returns
    rulename? — Type (rulename-optionp rulename?).

    This is an ordinary field accessor created by fty::defprod.

    Definitions and Theorems

    Function: tree-nonleaf->rulename?$inline

    (defun tree-nonleaf->rulename?$inline (x)
      (declare (xargs :guard (treep x)))
      (declare (xargs :guard (equal (tree-kind x) :nonleaf)))
      (let ((__function__ 'tree-nonleaf->rulename?))
        (declare (ignorable __function__))
        (mbe :logic
             (b* ((x (and (equal (tree-kind x) :nonleaf) x)))
               (rulename-option-fix (std::da-nth 0 (cdr x))))
             :exec (std::da-nth 0 (cdr x)))))

    Theorem: rulename-optionp-of-tree-nonleaf->rulename?

    (defthm rulename-optionp-of-tree-nonleaf->rulename?
      (b* ((rulename? (tree-nonleaf->rulename?$inline x)))
        (rulename-optionp rulename?))
      :rule-classes :rewrite)

    Theorem: tree-nonleaf->rulename?$inline-of-tree-fix-x

    (defthm tree-nonleaf->rulename?$inline-of-tree-fix-x
      (equal (tree-nonleaf->rulename?$inline (tree-fix x))
             (tree-nonleaf->rulename?$inline x)))

    Theorem: tree-nonleaf->rulename?$inline-tree-equiv-congruence-on-x

    (defthm tree-nonleaf->rulename?$inline-tree-equiv-congruence-on-x
      (implies (tree-equiv x x-equiv)
               (equal (tree-nonleaf->rulename?$inline x)
                      (tree-nonleaf->rulename?$inline x-equiv)))
      :rule-classes :congruence)

    Theorem: tree-nonleaf->rulename?-when-wrong-kind

    (defthm tree-nonleaf->rulename?-when-wrong-kind
      (implies (not (equal (tree-kind x) :nonleaf))
               (equal (tree-nonleaf->rulename? x)
                      (rulename-option-fix nil))))