def test_ITE():
    (A, B, C) = list(map(Boolean, symbols('A,B,C')))
    assert (ITE(True, False, True) == False)
    assert (ITE(True, True, False) == True)
    assert (ITE(False, True, False) == False)
    assert (ITE(False, False, True) == True)
    A = True
    assert (ITE(A, B, C) == B)
    A = False
    assert (ITE(A, B, C) == C)
    B = True
    assert (ITE(And(A, B), B, C) == C)
    assert (ITE(Or(A, False), And(B, True), False) == False)
def test_ITE():
    (A, B, C) = list(map(Boolean, symbols('A,B,C')))
    assert (ITE(True, False, True) == False)
    assert (ITE(True, True, False) == True)
    assert (ITE(False, True, False) == False)
    assert (ITE(False, False, True) == True)
    A = True
    assert (ITE(A, B, C) == B)
    A = False
    assert (ITE(A, B, C) == C)
    B = True
    assert (ITE(And(A, B), B, C) == C)
    assert (ITE(Or(A, False), And(B, True), False) == False)