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

All Samples(109)  |  Call(98)  |  Derive(0)  |  Import(11)

src/s/y/sympy-0.7.5/sympy/assumptions/ask.py   sympy(Download)
"""Module for querying SymPy objects about assumptions."""
from __future__ import print_function, division
 
from sympy.core import sympify
from sympy.logic.boolalg import (to_cnf, And, Not, Or, Implies, Equivalent,
                    if not attr.startswith('__')]
known_facts = And(
    Implies(Q.real, Q.complex),
    Implies(Q.real, Q.hermitian),
    Equivalent(Q.even, Q.integer & ~Q.odd),
    Equivalent(Q.extended_real, Q.real | Q.infinity),
    Equivalent(Q.odd, Q.integer & ~Q.even),
    Equivalent(Q.prime, Q.integer & Q.positive & ~Q.composite),
    Implies(Q.integer, Q.rational),
    Implies(Q.rational, Q.algebraic),

src/s/y/sympy-HEAD/sympy/assumptions/ask.py   sympy(Download)
"""Module for querying SymPy objects about assumptions."""
from __future__ import print_function, division
 
from sympy.core import sympify
from sympy.logic.boolalg import to_cnf, And, Not, Or, Implies, Equivalent, BooleanFunction
                    if not attr.startswith('__')]
known_facts = And(
    Implies(Q.real, Q.complex),
    Implies(Q.real, Q.hermitian),
    Equivalent(Q.even, Q.integer & ~Q.odd),
    Equivalent(Q.extended_real, Q.real | Q.infinity),
    Equivalent(Q.odd, Q.integer & ~Q.even),
    Equivalent(Q.prime, Q.integer & Q.positive & ~Q.composite),
    Implies(Q.integer, Q.rational),
    Implies(Q.rational, Q.algebraic),

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,
    assert A | B == Or(A, B)
    assert (A & B) | C == Or(And(A, B), C)
    assert A >> B == Implies(A, B)
    assert A << B == Implies(B, A)
    assert ~A == Not(A)
def test_Implies():
 
    raises(ValueError, lambda: Implies(A, B, C))
    assert Implies(True, True) is true
    assert Implies(True, False) is false

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,
    assert A | B == Or(A, B)
    assert (A & B) | C == Or(And(A, B), C)
    assert A >> B == Implies(A, B)
    assert A << B == Implies(B, A)
    assert ~A == Not(A)
def test_Implies():
 
    raises(ValueError, lambda: Implies(A, B, C))
    assert Implies(True, True) is True
    assert Implies(True, False) is False

src/s/y/sympy-0.7.5/sympy/logic/inference.py   sympy(Download)
"""Inference in propositional logic"""
from __future__ import print_function, division
 
from sympy.logic.boolalg import And, Or, Not, Implies, Equivalent, \
    conjuncts, to_cnf

src/s/y/sympy-HEAD/sympy/logic/inference.py   sympy(Download)
"""Inference in propositional logic"""
from __future__ import print_function, division
 
from sympy.logic.boolalg import And, Or, Not, Implies, Equivalent, \
    conjuncts, to_cnf

src/s/y/sympy-polys-HEAD/sympy/logic/inference.py   sympy-polys(Download)
"""Inference in propositional logic"""
from sympy.logic.boolalg import And, Or, Not, Implies, Equivalent, \
    conjuncts, to_cnf
from sympy.core.basic import C
from sympy.core.sympify import sympify

src/s/y/sympy-HEAD/sympy/core/tests/test_args.py   sympy(Download)
def test_sympy__logic__boolalg__Implies():
    from sympy.logic.boolalg import Implies
    assert _test_args(Implies(x, y))
 
 

src/s/y/sympy-0.7.5/sympy/logic/tests/test_inference.py   sympy(Download)
"""For more tests on satisfiability, see test_dimacs"""
 
from sympy import symbols, Q
from sympy.logic.boolalg import Or, Equivalent, Implies, And
from sympy.logic.inference import is_literal, literal_symbol, \
def test_satisfiable_non_symbols():
    x, y = symbols('x y')
    assumptions = Q.zero(x*y)
    facts = Implies(Q.zero(x*y), Q.zero(x) | Q.zero(y))
    query = ~Q.zero(x) & ~Q.zero(y)

src/s/y/sympy-HEAD/sympy/logic/tests/test_inference.py   sympy(Download)
"""For more tests on satisfiability, see test_dimacs"""
 
from sympy import symbols
from sympy.logic.boolalg import Or, Equivalent, Implies
from sympy.logic.inference import is_literal, literal_symbol, \

  1 | 2  Next