Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(16)  |  Call(14)  |  Derive(0)  |  Import(2)

src/s/y/sympy-0.7.5/sympy/logic/tests/test_boolalg.py   sympy(Download)
from sympy import (symbols, sympify, Dummy, simplify, Equality, S, Interval,
                   oo, EmptySet)
from sympy.logic.boolalg import (
    And, Boolean, Equivalent, ITE, Implies, Nand, Nor, Not, Or, POSform,
    SOPform, Xor, conjuncts, disjuncts, distribute_or_over_and,
    # test simplification
    ans = And(A, Or(B, C))
    assert simplify_logic('A & (B | C)') == ans
    assert simplify_logic('(A & B) | (A & C)') == ans
    assert simplify_logic(Implies(A, B)) == Or(Not(A), B)
    assert simplify_logic(Equivalent(A, B)) == \

src/s/y/sympy-HEAD/sympy/logic/tests/test_boolalg.py   sympy(Download)
from sympy import symbols, sympify, Dummy, simplify
from sympy.logic.boolalg import (
    And, Boolean, Equivalent, ITE, Implies, Nand, Nor, Not, Or, POSform,
    SOPform, Xor, conjuncts, disjuncts, distribute_or_over_and,
    distribute_and_over_or, eliminate_implications, is_cnf, is_dnf,
    # test simplification
    ans = And(A, Or(B, C))
    assert simplify_logic('A & (B | C)') == ans
    assert simplify_logic('(A & B) | (A & C)') == ans
    assert simplify_logic(Implies(A, B)) == Or(Not(A), B)
    assert simplify_logic(Equivalent(A, B)) == \