• Top
    • Documentation
    • Books
    • Boolean-reasoning
      • Ipasir
      • Aignet
      • Aig
        • Aig-constructors
          • Aig-and
            • Aig-and-main
            • Aig-and-pass6a
            • Aig-and-pass5
            • Aig-and-pass3
            • Aig-and-pass4a
            • Aig-and-pass6
            • Aig-and-pass2a
            • Aig-and-pass2
            • Aig-and-pass4
            • Aig-and-dumb
              • Aig-negation-p
              • Aig-and-pass1
              • Aig-binary-and
              • Aig-and-macro-exec-part
              • Aig-and-macro-logic-part
            • Aig-or-list
            • Aig-and-list
            • 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
      • Std
      • Proof-automation
      • Macro-libraries
      • ACL2
      • Interfacing-tools
      • Hardware-verification
      • Software-verification
      • Math
      • Testing-utilities
    • Aig-and

    Aig-and-dumb

    (aig-and-dumb x y) is a simpler alternative to aig-and.

    Signature
    (aig-and-dumb x y) → aig

    This does far fewer reductions than aig-and. We fold constants and collapse x & x and x & ~x, but that's it.

    Definitions and Theorems

    Function: aig-and-dumb

    (defun aig-and-dumb (x y)
      (declare (xargs :guard t))
      (let ((__function__ 'aig-and-dumb))
        (declare (ignorable __function__))
        (cond ((or (eq x nil) (eq y nil)) nil)
              ((eq x t) y)
              ((eq y t) x)
              ((hons-equal x y) x)
              ((aig-negation-p x y) nil)
              (t (hons x y)))))

    Theorem: aig-eval-of-aig-and-dumb

    (defthm aig-eval-of-aig-and-dumb
      (equal (aig-eval (aig-and-dumb x y) env)
             (and (aig-eval x env)
                  (aig-eval y env))))

    Theorem: aig-and-dumb-of-constants

    (defthm aig-and-dumb-of-constants
      (and (equal (aig-and-dumb nil x) nil)
           (equal (aig-and-dumb x nil) nil)
           (equal (aig-and-dumb x t) x)
           (equal (aig-and-dumb t x) x)))