nTheory
Handlers for keys related to number theory: prime, even, odd, etc.
-
class
sympy.assumptions.handlers.ntheory.
AskCompositeHandler
[source]
-
class
sympy.assumptions.handlers.ntheory.
AskEvenHandler
[source]
-
static
Add
(expr, assumptions)[source]
Even + Odd -> Odd
Even + Even -> Even
Odd + Odd -> Even
-
static
Mul
(expr, assumptions)[source]
Even * Integer -> Even
Even * Odd -> Even
Integer * Odd -> ?
Odd * Odd -> Odd
Even * Even -> Even
Integer * Integer -> Even if Integer + Integer = Odd
-
class
sympy.assumptions.handlers.ntheory.
AskOddHandler
[source]
Handler for key ‘odd’
Test that an expression represents an odd number
-
class
sympy.assumptions.handlers.ntheory.
AskPrimeHandler
[source]
Handler for key ‘prime’
Test that an expression represents a prime number. When the
expression is a number the result, when True, is subject to
the limitations of isprime() which is used to return the result.
-
static
Pow
(expr, assumptions)[source]
Integer**Integer -> !Prime