• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
      • Apt
      • Zfc
      • Acre
      • Milawa
      • Smtlink
      • Abnf
        • Deftreeops
        • Defdefparse
        • Defgrammar
        • Tree-utilities
        • Notation
        • Grammar-parser
          • Grammar-parser-implementation
          • Grammar-parser-correctness
            • Grammar-parser-completeness
              • Grammar-parser-disambiguation
              • Grammar-parser-constraints-from-tree-matching
              • Grammar-parser-constraints-from-parsing
              • Grammar-parser-disambiguating-restrictions
                • Tree-rule-/-*cwsp-cnl-restriction-p
                • Tree-*cwsp-cnl-restriction-p
                • Tree-list-*-rule-/-*cwsp-cnl-restriction-p
                • Tree-cwsp-restriction-p
                • Tree-rulelist-restriction-p
                • Grammar-parser-parsing-failure-propagation
                • Parse-alt/conc/rep/elem/group/option-when-tree-/-tree-list-match-lemmas
                • Parse-grammar-when-tree-match
                • Parse-*-in-either-range-when-tree-list-match
                • Parse-in-either-range-when-tree-match
                • Parse-element-when-tree-match-induction-step-1+2+3+4+5
                • Pred-concatenation
                • Pred-conc-rest
                • Pred-alternation
                • Pred-alt-rest
                • Pred-conc-rest-comp
                • Pred-alt-rest-comp
                • Parse-elements-when-tree-match
                • Pred-repetition
                • Pred-element
                • Parse-*-rule-/-*cwsp-cnl-when-tree-list-match-and-restriction
                • Parse-option-when-tree-match-induction-step-3
                • Parse-option-when-tree-match-induction-step-2
                • Parse-option-when-tree-match-induction-step-1+2+3
                • Parse-group-when-tree-match-induction-step-3
                • Parse-group-when-tree-match-induction-step-2
                • Parse-group-when-tree-match-induction-step-1+2+3
                • Parse-bin/dec/hex-val-when-tree-match
                • Parse-alt-rest-when-tree-list-match
                • Parse-alt-rest-comp-when-tree-match-induction-step-2
                • Parse-alt-rest-comp-when-tree-match-induction-step-1
                • Parse-*bit-when-tree-list-match
                • Parse-*-dot-1*bit-when-tree-list-match
                • Parse-rulelist-when-tree-match-and-restriction
                • Parse-exact-when-tree-match
                • Parse-element-when-tree-match-induction-step-3
                • Parse-element-when-tree-match-induction-step-2
                • Parse-element-when-tree-match-induction-step-1
                • Parse-conc-rest-when-tree-list-match
                • Parse-conc-rest-comp-when-tree-match-induction-step-2
                • Parse-conc-rest-comp-when-tree-match-induction-step-1+2
                • Parse-conc-rest-comp-when-tree-match-induction-step-1
                • Parse-bin-val-rest-when-tree-match
                • Parse-alternation-when-tree-match
                • Parse-alt-rest-comp-when-tree-match-induction-step-1+2
                • Parse-alt-rest-comp-when-tree-match
                • Parse-1*-dot-1*bit-when-tree-list-match
                • Pred-option
                • Pred-group
                • Parse-?%i-when-tree-match
                • Parse-*digit-when-tree-list-match
                • Parse-*cwsp-when-tree-list-match
                • Parse-wsp-when-tree-match
                • Parse-repetition-when-tree-match-induction-step-2
                • Parse-repetition-when-tree-match-induction-step-1+2
                • Parse-repetition-when-tree-match-induction-step-1
                • Parse-repetition-when-tree-match
                • Parse-option-when-tree-match-induction-step-1
                • Parse-ichar-when-tree-match
                • Parse-htab-when-tree-match
                • Parse-hex-val-when-tree-match
                • Parse-group-when-tree-match-induction-step-1
                • Parse-equal-/-equal-slash-when-tree-match
                • Parse-element-when-tree-match-induction-step-5
                • Parse-element-when-tree-match-induction-step-4
                • Parse-element-when-tree-match
                • Parse-dot-1*bit-when-tree-match
                • Parse-dec-val-when-tree-match
                • Parse-cr-when-tree-match
                • Parse-concatenation-when-tree-match-induction-step-2
                • Parse-concatenation-when-tree-match
                • Parse-conc-rest-comp-when-tree-match
                • Parse-cnl-when-tree-match
                • Parse-bin-val-when-tree-match
                • Parse-alternation-when-tree-match-induction-step-2
                • Parse-alpha-when-tree-match
                • Parse-1*cwsp-when-tree-list-match
                • Parse-1*bit-when-tree-list-match
                • Parse-*wsp/vchar-when-tree-list-match
                • Parse-*hexdig-when-tree-list-match
                • Parse-*digit-star-*digit-when-tree-match
                • Parse-*cwsp-cnl-when-tree-match
                • Parse-*-dot-1*hexdig-when-tree-list-match
                • Parse-*-dot-1*digit-when-tree-list-match
                • Parse-*-alpha/digit/dash-when-tree-list-match
                • Parse-sp-when-tree-match
                • Parse-rule-/-*cwsp-cnl-when-tree-match
                • Parse-rule-when-tree-match
                • Parse-num-val-when-tree-match
                • Parse-lf-when-tree-match
                • Parse-in-range-when-tree-match
                • Parse-ichar2-when-tree-match
                • Parse-hex-val-rest-when-tree-match
                • Parse-defined-as-when-tree-match
                • Parse-dec-val-rest-when-tree-match
                • Parse-crlf-when-tree-match
                • Parse-conc-rest-when-tree-list-match-induction-step-2
                • Parse-case-sensitive-string-when-tree-match
                • Parse-case-insensitive-string-when-tree-match
                • Parse-bit-when-tree-match
                • Parse-alt-rest-when-tree-list-match-induction-step-2
                • Parse-1*hexdig-when-tree-list-match
                • Parse-1*digit-when-tree-list-match
                • Parse-1*-dot-1*hexdig-when-tree-list-match
                • Parse-1*-dot-1*digit-when-tree-list-match
                • Parse-?repeat-when-tree-match
                • Parse-wsp/vchar-when-tree-match
                • Parse-vchar-when-tree-match
                • Parse-rulename-when-tree-match
                • Parse-repeat-when-tree-match
                • Parse-quoted-string-when-tree-match
                • Parse-prose-val-when-tree-match
                • Parse-option-when-tree-match
                • Parse-hexdig-when-tree-match
                • Parse-group-when-tree-match
                • Parse-element-when-tree-match-induction-step-6
                • Parse-element-when-tree-match-base-case
                • Parse-dquote-when-tree-match
                • Parse-dot-1*hexdig-when-tree-match
                • Parse-dot-1*digit-when-tree-match
                • Parse-digit-when-tree-match
                • Parse-dash-1*hexdig-when-tree-match
                • Parse-dash-1*digit-when-tree-match
                • Parse-dash-1*bit-when-tree-match
                • Parse-cwsp-when-tree-match
                • Parse-concatenation-when-tree-match-induction-step-1
                • Parse-conc-rest-when-tree-list-match-induction-step-1
                • Parse-conc-rest-comp-when-tree-match-base-case
                • Parse-comment-when-tree-match
                • Parse-cnl-wsp-when-tree-match
                • Parse-char-val-when-tree-match
                • Parse-alternation-when-tree-match-induction-step-1
                • Parse-alt-rest-when-tree-list-match-induction-step-1
                • Parse-alt-rest-comp-when-tree-match-base-case
                • Parse-alpha/digit/dash-when-tree-match
                • Parse-option-when-tree-match-base-case
                • Parse-group-when-tree-match-base-case
                • Parse-any-of-cons
              • Grammar-parser-soundness
          • 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
        • 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
    • Grammar-parser-disambiguating-restrictions

    Tree-rulelist-restriction-p

    Restrictions on the rulelist trees generated by the parser.

    Signature
    (tree-rulelist-restriction-p tree) → yes/no
    Arguments
    tree — Guard (treep tree).
    Returns
    yes/no — Type (booleanp yes/no).

    This lifts the restriction captured by tree-list-*-rule-/-*cwsp-cnl-restriction-p from *( rule / (*c-wsp c-nl) ) to rulelist. The restriction only applies to the subtrees after the first one.

    Definitions and Theorems

    Function: tree-rulelist-restriction-p

    (defun tree-rulelist-restriction-p (tree)
     (declare (xargs :guard (treep tree)))
     (declare
      (xargs
           :guard
           (and (tree-match-element-p tree (element-rulename *rulelist*)
                                      *grammar*)
                (tree-terminatedp tree))))
     (b* ((subtrees (car (tree-nonleaf->branches tree))))
      (or (not (consp subtrees))
          (tree-list-*-rule-/-*cwsp-cnl-restriction-p (cdr subtrees)))))

    Theorem: booleanp-of-tree-rulelist-restriction-p

    (defthm booleanp-of-tree-rulelist-restriction-p
      (b* ((yes/no (tree-rulelist-restriction-p tree)))
        (booleanp yes/no))
      :rule-classes :rewrite)