• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
      • Apt
      • Zfc
      • Acre
      • Milawa
      • Smtlink
      • Abnf
        • Deftreeops
        • Defdefparse
        • Defgrammar
        • Tree-utilities
        • Notation
        • Grammar-parser
        • Meta-circular-validation
        • Parsing-primitives-defresult
        • Parsing-primitives-seq
        • Operations
          • In-terminal-set
          • Well-formedness
          • Closure
          • Plugging
          • Ambiguity
          • Renaming
          • Numeric-range-retrieval
            • Num-range
              • Num-range-fix
              • Num-range-equiv
              • Make-num-range
              • Change-num-range
              • Num-range->min
              • Num-range->max
              • Num-range->base
              • Num-range-p
              • Num-val-num-ranges
              • Rulelist-num-ranges
              • Rule-num-ranges
              • Element-num-ranges
              • Num-range-set
              • Alternation-num-ranges
              • Concatenation-num-ranges
              • Repetition-num-ranges
            • Rule-utilities
            • Removal
            • Character-value-retrieval
          • 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
    • Num-range

    Num-range-p

    Recognizer for num-range structures.

    Signature
    (num-range-p x) → *

    Definitions and Theorems

    Function: num-range-p

    (defun num-range-p (x)
      (declare (xargs :guard t))
      (let ((__function__ 'num-range-p))
        (declare (ignorable __function__))
        (and (mbe :logic (and (alistp x)
                              (equal (strip-cars x) '(base min max)))
                  :exec (fty::alist-with-carsp x '(base min max)))
             (b* ((base (cdr (std::da-nth 0 x)))
                  (min (cdr (std::da-nth 1 x)))
                  (max (cdr (std::da-nth 2 x))))
               (and (num-base-p base)
                    (natp min)
                    (natp max))))))

    Theorem: consp-when-num-range-p

    (defthm consp-when-num-range-p
      (implies (num-range-p x) (consp x))
      :rule-classes :compound-recognizer)