• 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-pass1

    Level 1 simplifications.

    Signature
    (aig-and-pass1 x y) → (mv hit ans)

    See also aig-and-dumb, which tries to apply these same reductions, but otherwise just gives up, and doesn't report whether it has succeded or not.

    Definitions and Theorems

    Function: aig-and-pass1$inline

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

    Theorem: aig-and-pass1-correct

    (defthm aig-and-pass1-correct
      (b* (((mv ?hit ?ans)
            (aig-and-pass1$inline x y)))
        (implies hit
                 (equal (aig-eval ans env)
                        (and (aig-eval x env)
                             (aig-eval y env)))))
      :rule-classes nil)