Maintainer bastiaan.heeren@ou.nl provisional portable (depends on ghc) None Haskell98

Domain.Math.Power.Rules

Description

Synopsis

# Power rules

Calculate power, e.g., 2^2 => 4

root n x, ...
BHR: not used. Better to turn this into OrList (Relation Expr)

(a^x)^y = a^(x*y)

a*x^y b*x^q = ab * x^(y-q)

(a0 * a1 ... * an)^x = a0^x * a1^x ... * an^x

(ab)^y = (a^y b^y)

Use with care, will match any fraction!

a^x = 1/a^(-x)

c d*a^(-x)*b^(-y)...p^r... = c*a^x*b^y...d*p^r...

a^(xy) => (a^x)^(1y)

all of the above simplification rules

a^0 = 1

a^x b^x = (ab)^x

e/a = e*a^(-1) where a is an variable

c/a^x = c*a^x^(-1)

n => a^e (with e /= 1)

root n x

a*x^y * b*x^q = a*b * x^(y+q)

# Root rules

Root rules ----------------------------------------------------------------

a^(p/q) = root (a^p) q

root a q = a^(1/q)

# Log rules

Logarithmic relation rules -----------------------------------------------

# Common rules

Common rules --------------------------------------------------------------

ab * cd = a*c / b*d (b or d may be one)

(-a)^x = -(a^x)