• Top
    • Documentation
    • Books
    • Boolean-reasoning
      • Ipasir
      • Aignet
      • Aig
        • Aig-constructors
          • Aig-and
          • Aig-or-list
          • Aig-and-list
            • Member-eql-without-truelistp
            • Aig-and-list-aux
          • Aig-or
          • Aig-not
          • Aig-implies
          • Aig-implies-lists
          • Aig-xor-lists
          • Aig-xor
          • Aig-orc2-lists
          • Aig-or-lists
          • Aig-nor-lists
          • Aig-nand-lists
          • Aig-iff-lists
          • Aig-iff
          • Aig-andc2-lists
          • Aig-andc1-lists
          • Aig-and-lists
          • Aig-not-list
          • Aig-ite
          • Aig-orc1-lists
          • Aig-orc1
          • Aig-nand
          • Aig-orc2
          • Aig-nor
          • Aig-andc2
          • Aig-andc1
        • Aig-vars
        • Aig-sat
        • Bddify
        • Aig-substitution
        • Aig-other
        • Aig-semantics
        • Aig-and-count
      • Satlink
      • Truth
      • Ubdds
      • Bdd
      • Faig
      • Bed
      • 4v
    • Projects
    • Debugging
    • Community
    • Std
    • Proof-automation
    • Macro-libraries
    • ACL2
    • Interfacing-tools
    • Hardware-verification
    • Software-verification
    • Math
    • Testing-utilities
  • Aig-constructors

Aig-and-list

(aig-and-list x) ands together all of the AIGs in the list x.

Signature
(aig-and-list x) → aig

As a dumb attempt at optimization, we try to avoid consing if we see that there's a nil anywhere in the list. This won't win very often, but it is quite cheap and it can win big when it does win by avoiding a lot of AIG construction.

Definitions and Theorems

Function: aig-and-list

(defun aig-and-list (x)
  (declare (xargs :guard t))
  (let ((__function__ 'aig-and-list))
    (declare (ignorable __function__))
    (mbe :logic
         (if (atom x)
             t
           (aig-and (car x)
                    (aig-and-list (cdr x))))
         :exec (cond ((atom x) t)
                     ((member-eql-without-truelistp nil x)
                      nil)
                     (t (aig-and-list-aux x))))))

Theorem: aig-and-list-aux-removal

(defthm aig-and-list-aux-removal
  (equal (aig-and-list-aux x)
         (aig-and-list x)))

Subtopics

Member-eql-without-truelistp
Aig-and-list-aux