• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
      • Apt
      • Zfc
      • Acre
      • Milawa
      • Smtlink
      • Abnf
        • Deftreeops
        • Defdefparse
        • Defgrammar
        • Tree-utilities
          • Check-tree-nonleaf-num-range-4
          • Check-tree-nonleaf-num-range-3
          • Check-tree-num-range-4
          • Check-tree-nonleaf-num-range-2
          • Check-tree-num-range-3
          • Check-tree-num-range-2
          • Tree-list-tuple10
          • Check-tree-nonleaf-num-range
          • Tree-list-tuple9
          • Tree-list-tuple8
          • Tree-list-tuple7
          • Tree-list-tuple6
          • Check-tree-nonleaf-num-seq
            • Check-tree-num-range
            • Tree-list-tuple5
            • Check-tree-nonleaf-10
            • Check-tree-nonleaf-9
            • Check-tree-nonleaf-8
            • Check-tree-nonleaf-7
            • Check-tree-list-list-10
            • Tree-list-tuple4
            • Check-tree-nonleaf-6
            • Check-tree-nonleaf-5
            • Check-tree-list-list-9
            • Check-tree-nonleaf-4
            • Check-tree-nonleaf-3
            • Check-tree-nonleaf-2
            • Check-tree-nonleaf
            • Check-tree-list-list-8
            • Check-tree-nonleaf-1-1
            • Check-tree-nonleaf-1
            • Check-tree-list-list-7
            • Tree-list-tuple3
            • Pass
            • Check-tree-list-list-6
            • Check-tree-list-list-5
            • Tree=>string
            • Tree-list-tuple2
            • Check-tree-list-list-4
            • Check-tree-list-list-3
            • Check-tree-ichars
            • Check-tree-schars
            • Check-tree-num-seq
            • Check-tree-list-list-2
            • Tree-list-tuple9-result
            • Tree-list-tuple8-result
            • Tree-list-tuple7-result
            • Tree-list-tuple6-result
            • Tree-list-tuple5-result
            • Tree-list-tuple4-result
            • Tree-list-tuple3-result
            • Tree-list-tuple2-result
            • Tree-list-tuple10-result
            • Pass-result
            • Check-tree-list-list-1
            • Tree-info-for-error
            • Check-tree-list-1
            • Check-tree-nonleaf?
            • Check-tree-leafterm
          • Notation
          • 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
        • Instant-runoff-voting
        • Imp-language
        • Sidekick
        • Leftist-trees
        • Java
        • Riscv
        • 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
      • Community
      • Std
      • Proof-automation
      • Macro-libraries
      • ACL2
      • Interfacing-tools
      • Hardware-verification
      • Software-verification
      • Math
      • Testing-utilities
    • Tree-utilities

    Check-tree-nonleaf-num-seq

    Check if an ABNF tree is a non-leaf tree with a given optional rule name or no rule name as root and a list of one list of one subtree, where the subtree is a leaf tree whose natural numbers match a given sequence of natural numbers.

    Signature
    (check-tree-nonleaf-num-seq tree rulename? nats) → pass
    Arguments
    tree — Guard (treep tree).
    rulename? — Guard (acl2::maybe-stringp rulename?).
    nats — Guard (nat-listp nats).
    Returns
    pass — Type (pass-resultp pass).

    Definitions and Theorems

    Function: check-tree-nonleaf-num-seq

    (defun check-tree-nonleaf-num-seq (tree rulename? nats)
      (declare (xargs :guard (and (treep tree)
                                  (acl2::maybe-stringp rulename?)
                                  (nat-listp nats))))
      (let ((__function__ 'check-tree-nonleaf-num-seq))
        (declare (ignorable __function__))
        (b* (((okf tree)
              (check-tree-nonleaf-1-1 tree rulename?)))
          (check-tree-num-seq tree nats))))

    Theorem: pass-resultp-of-check-tree-nonleaf-num-seq

    (defthm pass-resultp-of-check-tree-nonleaf-num-seq
      (b* ((pass (check-tree-nonleaf-num-seq tree rulename? nats)))
        (pass-resultp pass))
      :rule-classes :rewrite)

    Theorem: check-tree-nonleaf-num-seq-of-tree-fix-tree

    (defthm check-tree-nonleaf-num-seq-of-tree-fix-tree
      (equal (check-tree-nonleaf-num-seq (tree-fix tree)
                                         rulename? nats)
             (check-tree-nonleaf-num-seq tree rulename? nats)))

    Theorem: check-tree-nonleaf-num-seq-tree-equiv-congruence-on-tree

    (defthm check-tree-nonleaf-num-seq-tree-equiv-congruence-on-tree
     (implies
         (tree-equiv tree tree-equiv)
         (equal (check-tree-nonleaf-num-seq tree rulename? nats)
                (check-tree-nonleaf-num-seq tree-equiv rulename? nats)))
     :rule-classes :congruence)

    Theorem: check-tree-nonleaf-num-seq-of-maybe-string-fix-rulename?

    (defthm check-tree-nonleaf-num-seq-of-maybe-string-fix-rulename?
      (equal (check-tree-nonleaf-num-seq
                  tree (acl2::maybe-string-fix rulename?)
                  nats)
             (check-tree-nonleaf-num-seq tree rulename? nats)))

    Theorem: check-tree-nonleaf-num-seq-maybe-string-equiv-congruence-on-rulename?

    (defthm
     check-tree-nonleaf-num-seq-maybe-string-equiv-congruence-on-rulename?
     (implies
         (acl2::maybe-string-equiv rulename? rulename?-equiv)
         (equal (check-tree-nonleaf-num-seq tree rulename? nats)
                (check-tree-nonleaf-num-seq tree rulename?-equiv nats)))
     :rule-classes :congruence)

    Theorem: check-tree-nonleaf-num-seq-of-nat-list-fix-nats

    (defthm check-tree-nonleaf-num-seq-of-nat-list-fix-nats
     (equal
         (check-tree-nonleaf-num-seq tree rulename? (nat-list-fix nats))
         (check-tree-nonleaf-num-seq tree rulename? nats)))

    Theorem: check-tree-nonleaf-num-seq-nat-list-equiv-congruence-on-nats

    (defthm check-tree-nonleaf-num-seq-nat-list-equiv-congruence-on-nats
     (implies
         (acl2::nat-list-equiv nats nats-equiv)
         (equal (check-tree-nonleaf-num-seq tree rulename? nats)
                (check-tree-nonleaf-num-seq tree rulename? nats-equiv)))
     :rule-classes :congruence)