• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
      • Apt
      • Zfc
      • Acre
      • Milawa
      • Smtlink
      • Abnf
        • Deftreeops
        • Defdefparse
        • Defgrammar
        • Tree-utilities
        • Notation
          • Syntax-abstraction
          • Semantics
          • Abstract-syntax
            • Convenience-constructors
            • Num-val
            • Char-val
            • Repeat-range
            • Rulename
            • Rule
              • Rule-fix
              • Rulep
                • Rule-equiv
                • Make-rule
                • Rule->incremental
                • Change-rule
                • Rule->definiens
                • Rule->name
              • Rulename-option
              • Num-base
              • Rule-option
              • Prose-val
              • Rulelist
              • Char-val-set
              • Rulename-set
              • Rulename-list
              • Grammar
              • Alt/conc/rep/elem
            • 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
        • Instant-runoff-voting
        • Imp-language
        • Sidekick
        • Leftist-trees
        • Java
        • Taspi
        • Bitcoin
        • Riscv
        • 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
        • Bigmems
        • Builtins
        • Execloader
        • Aleo
        • Solidity
        • Paco
        • Concurrent-programs
        • Bls12-377-curves
      • Debugging
      • Std
      • Proof-automation
      • Macro-libraries
      • ACL2
      • Interfacing-tools
      • Hardware-verification
      • Software-verification
      • Math
      • Testing-utilities
    • Rule

    Rulep

    Recognizer for rule structures.

    Signature
    (rulep x) → *

    Definitions and Theorems

    Function: rulep

    (defun rulep (x)
      (declare (xargs :guard t))
      (let ((__function__ 'rulep))
        (declare (ignorable __function__))
        (and (consp x)
             (eq (car x) :rule)
             (true-listp (cdr x))
             (eql (len (cdr x)) 3)
             (b* ((name (std::da-nth 0 (cdr x)))
                  (incremental (std::da-nth 1 (cdr x)))
                  (definiens (std::da-nth 2 (cdr x))))
               (and (rulenamep name)
                    (booleanp incremental)
                    (alternationp definiens))))))

    Theorem: consp-when-rulep

    (defthm consp-when-rulep
      (implies (rulep x) (consp x))
      :rule-classes :compound-recognizer)