# Sets¶

Handlers for predicates related to set membership: integer, rational, etc.

Handler for Q.algebraic key.

Handler for Q.antihermitian Test that an expression belongs to the field of anti-Hermitian operators, that is, operators in the form x*I, where x is Hermitian

Antihermitian + Antihermitian -> Antihermitian Antihermitian + !Antihermitian -> !Antihermitian

static Mul(expr, assumptions)[source]

As long as there is at most only one noncommutative term: Hermitian*Hermitian -> !Antihermitian Hermitian*Antihermitian -> Antihermitian Antihermitian*Antihermitian -> !Antihermitian

static Pow(expr, assumptions)[source]

Hermitian**Integer -> !Antihermitian Antihermitian**Even -> !Antihermitian Antihermitian**Odd -> Antihermitian

Handler for Q.complex Test that an expression belongs to the field of complex numbers

Handler for Q.extended_real Test that an expression belongs to the field of extended real numbers, that is real numbers union {Infinity, -Infinity}

Handler for Q.hermitian Test that an expression belongs to the field of Hermitian operators

Hermitian + Hermitian -> Hermitian Hermitian + !Hermitian -> !Hermitian

static Mul(expr, assumptions)[source]

As long as there is at most only one noncommutative term: Hermitian*Hermitian -> Hermitian Hermitian*Antihermitian -> !Hermitian Antihermitian*Antihermitian -> Hermitian

static Pow(expr, assumptions)[source]

Hermitian**Integer -> Hermitian

Handler for Q.imaginary Test that an expression belongs to the field of imaginary numbers, that is, numbers in the form x*I, where x is real

Imaginary + Imaginary -> Imaginary Imaginary + Complex -> ? Imaginary + Real -> !Imaginary

static Mul(expr, assumptions)[source]

Real*Imaginary -> Imaginary Imaginary*Imaginary -> Real

static Pow(expr, assumptions)[source]

Imaginary**integer -> Imaginary if integer % 2 == 1 Imaginary**integer -> real if integer % 2 == 0 Imaginary**Imaginary -> ? Imaginary**Real -> ?

Handler for Q.integer Test that an expression belongs to the field of integer numbers

Integer + Integer -> Integer Integer + !Integer -> !Integer !Integer + !Integer -> ?

static Mul(expr, assumptions)[source]

Integer*Integer -> Integer Integer*Irrational -> !Integer Odd/Even -> !Integer Integer*Rational -> ?

static Pow(expr, assumptions)

Integer + Integer -> Integer Integer + !Integer -> !Integer !Integer + !Integer -> ?

Handler for Q.rational Test that an expression belongs to the field of rational numbers

Rational + Rational -> Rational Rational + !Rational -> !Rational !Rational + !Rational -> ?

static Mul(expr, assumptions)

Rational + Rational -> Rational Rational + !Rational -> !Rational !Rational + !Rational -> ?

static Pow(expr, assumptions)[source]

Rational ** Integer -> Rational Irrational ** Rational -> Irrational Rational ** Irrational -> ?

Handler for Q.real Test that an expression belongs to the field of real numbers

Real + Real -> Real Real + (Complex & !Real) -> !Real

static Mul(expr, assumptions)[source]

Real*Real -> Real Real*Imaginary -> !Real Imaginary*Imaginary -> Real

static Pow(expr, assumptions)[source]

Real**Integer -> Real Positive**Real -> Real Real**(Integer/Even) -> Real if base is nonnegative Real**(Integer/Odd) -> Real Real**Imaginary -> ? Imaginary**Real -> ? Real**Real -> ?

Order

Term rewriting