# ElementaryFunctionStructurePackage(R, F)ΒΆ

- R: Join(IntegralDomain, Comparable, RetractableTo Integer, LinearlyExplicitOver Integer)
- F: Join(AlgebraicallyClosedField, TranscendentalFunctionCategory, FunctionSpace R)

ElementaryFunctionStructurePackage provides functions to test the algebraic independence of various elementary functions, using the Risch structure theorem (real and complex versions). It also provides transformations on elementary functions which are not considered simplifications.

- irootDep: Kernel F -> Union(vec: Vector Fraction Integer, func: F, fail: Boolean)
`irootDep(k)`

is a local function with a conditional implementation.

- normalize: (F, Symbol) -> F
`normalize(f, x)`

is normalize([`f`

], [`x`

])

- normalize: (List F, List Symbol) -> List F
`normalize([f1, ..., fn], lx)`

rewrites`f1, ..., fn`

using the least possible number of real algebraically independent kernels. Additionally, it tries to ensure that any expression in resulting kernels which syntactically depends on a variable`x`

from`lx`

has nonzero derivative with respect to`x`

.

- normalize: F -> F
`normalize(f)`

rewrites`f`

using the least possible number of real algebraically independent kernels.

- realElementary: (F, Symbol) -> F
`realElementary(f, x)`

rewrites the kernels of`f`

involving`x`

in terms of the 4 fundamental real transcendental elementary functions:`log, exp, tan, atan`

.

- realElementary: F -> F
`realElementary(f)`

rewrites`f`

in terms of the 4 fundamental real transcendental elementary functions:`log, exp, tan, atan`

.

- realLiouvillian: (F, Symbol) -> F
`realLiouvillian(f, x)`

rewrites`f`

elementary kernels of`f`

in terms 4 fundamental real elementary functions:`log, exp, tan, atan`

. Additionally, it rewrites Liouvillian functions of`x`

as indefinite integrals to support better normalization.

- realLiouvillian: F -> F
`realLiouvillian(f)`

rewrites`f`

elementary kernels of`f`

in terms 4 fundamental real elementary functions:`log, exp, tan, atan`

. Additionally, it rewrites Liouvillian functions as indefinite integrals to support better normalization.

- rischNormalize: (F, List Symbol) -> Record(func: F, kers: List Kernel F, vals: List F)
`rischNormalize(f, lx)`

is rischNormalize([`f`

],`lx`

)

- rischNormalize: (F, Symbol) -> Record(func: F, kers: List Kernel F, vals: List F)
`rischNormalize(f, x)`

is rischNormalize([`f`

], [`x`

]) rischNormalize(`f`

,`x`

) returns`[g, [k1, ..., kn], [h1, ..., hn]]`

such that`g = normalize(f, x)`

and each`ki`

was rewritten as`hi`

during the normalization.

- rischNormalize: (List F, List Symbol) -> Record(funcs: List F, kers: List Kernel F, vals: List F)
`rischNormalize(lf, lx)`

returns`[lg, [k1, ..., kn], [h1, ..., hn]]`

such that`lg = normalize(lf, lx)`

and each`ki`

was rewritten as`hi`

during the normalization.

- rmap: (Kernel F -> F, F) -> F
`rmap(f, e)`

rewrites`e`

replacing each kernel`k`

in`e`

by`f`

(`k`

)

- rootNormalize: (F, Kernel F) -> F
`rootNormalize(f, k)`

returns`f`

rewriting either`k`

which must be an`n`

th-root in terms of radicals already in`f`

, or some radicals in`f`

in terms of`k`

.