• Top
    • Documentation
    • Books
    • 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-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-ite-fn
            • 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-ite

    Aig-ite-fn

    Signature
    (aig-ite-fn a b c) → aig

    Definitions and Theorems

    Function: aig-ite-fn

    (defun aig-ite-fn (a b c)
      (declare (xargs :guard t))
      (let ((__function__ 'aig-ite-fn))
        (declare (ignorable __function__))
        (cond ((eq a t) b)
              ((eq a nil) c)
              ((hons-equal b c) b)
              ((eq b t) (aig-or a c))
              (t (aig-or (aig-and a b)
                         (aig-and (aig-not a) c))))))

    Theorem: aig-eval-ite

    (defthm aig-eval-ite
      (iff (aig-eval (aig-ite-fn a b c) env)
           (if (aig-eval a env)
               (aig-eval b env)
             (aig-eval c env))))

    Theorem: aig-ite-of-constants

    (defthm aig-ite-of-constants
      (and (equal (aig-ite-fn t b c) b)
           (equal (aig-ite-fn nil b c) c)))