• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • Std
    • Proof-automation
    • Macro-libraries
      • B*
      • Defunc
      • Fty
      • Apt
      • Std/util
        • Defprojection
        • Deflist
        • Defaggregate
          • Tag
          • Prod-cons
            • Prod-consp
              • Prod-cons-with-hint
              • Prod-hons
              • Prod-cdr
              • Prod-car
            • Defaggrify-defrec
          • Define
          • Defmapping
          • Defenum
          • Add-io-pairs
          • Defalist
          • Defmapappend
          • Returns-specifiers
          • Defarbrec
          • Defines
          • Define-sk
          • Error-value-tuples
          • Defmax-nat
          • Defmin-int
          • Deftutorial
          • Extended-formals
          • Defrule
          • Defval
          • Defsurj
          • Defiso
          • Defconstrained-recognizer
          • Deffixer
          • Defmvtypes
          • Defconsts
          • Defthm-unsigned-byte-p
          • Support
          • Defthm-signed-byte-p
          • Defthm-natp
          • Defund-sk
          • Defmacro+
          • Defsum
          • Defthm-commutative
          • Definj
          • Defirrelevant
          • Defredundant
        • Defdata
        • Defrstobj
        • Seq
        • Match-tree
        • Defrstobj
        • With-supporters
        • Def-partial-measure
        • Template-subst
        • Soft
        • Defthm-domain
        • Event-macros
        • Def-universal-equiv
        • Def-saved-obligs
        • With-supporters-after
        • Definec
        • Sig
        • Outer-local
        • Data-structures
      • ACL2
      • Interfacing-tools
      • Hardware-verification
      • Software-verification
      • Math
      • Testing-utilities
    • Prod-cons

    Prod-consp

    Special recognizer for conses, except that to save space we require that (nil . nil) be represented just as nil.

    Definitions and Theorems

    Function: prod-consp

    (defun prod-consp (x)
      (declare (xargs :guard t))
      (if (consp x)
          (and (or (car x) (cdr x)) t)
        (not x)))

    Theorem: booleanp-of-prod-consp

    (defthm booleanp-of-prod-consp
      (booleanp (prod-consp x))
      :rule-classes :type-prescription)

    Theorem: prod-consp-compound-recognizer

    (defthm prod-consp-compound-recognizer
      (implies (prod-consp x)
               (or (consp x) (not x)))
      :rule-classes :compound-recognizer)