• Top
    • Documentation
    • Books
    • Recursion-and-induction
    • Boolean-reasoning
      • Ipasir
      • Aignet
      • Aig
        • Aig-constructors
          • Aig-and
          • Aig-or-list
          • Aig-and-list
          • Aig-or
          • Aig-not
            • Aig-implies
            • Aig-implies-lists
            • Aig-xor
            • Aig-iff
            • Aig-xor-lists
            • Aig-orc2-lists
            • Aig-or-lists
            • Aig-nor-lists
            • Aig-nand-lists
            • Aig-iff-lists
            • Aig-andc2-lists
            • Aig-andc1-lists
            • Aig-and-lists
            • Aig-not-list
            • Aig-ite
            • Aig-nand
            • Aig-orc1-lists
            • Aig-orc1
            • 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
      • Testing-utilities
      • Math
    • Aig-constructors

    Aig-not

    (aig-not x) constructs an AIG representing (not x).

    Signature
    (aig-not x) → aig

    This could be implemented as (hons x nil), but we at least take care to fold constants and avoid creating double negatives.

    Definitions and Theorems

    Function: aig-not

    (defun aig-not (x)
           (declare (xargs :guard t))
           (let ((__function__ 'aig-not))
                (declare (ignorable __function__))
                (cond ((eq x nil) t)
                      ((eq x t) nil)
                      ((and (not (aig-atom-p x))
                            (eq (cdr x) nil))
                       (car x))
                      (t (hons x nil)))))

    Theorem: aig-eval-not

    (defthm aig-eval-not
            (equal (aig-eval (aig-not x) env)
                   (not (aig-eval x env))))