[−][src]Trait maths_traits::algebra::ring_like::Exponential
A unary operation mapping addition into multiplication
Rigourously, and exponential operation is a mapping E:R->R
such that:
E(x+y) = E(x)*E(y)
wheneverx*y = y*x
E(x) != 0
In addition to these base properties, this trait also stipulates that this function not map every element to 1, so as to rule out the trivial case.
Furthmore, to clear up ambiguity, it is important to note that different variations on this definition exists. For instance:
- As already mentioned, some may allow the mapping to be non-trivial
- Some may also allow
E(x) = 0
- For the Real and Complex exponentials, there are a multitude of equivalent definitions that have no true effect on the mapping
More importantly though, most authors specify that the E(x+y) = E(x)*E(y)
for all x
and y
(such as on Wikipedia)
However, doing so disallows both the Matrix exponential and Quaternion exponential as well
as the Clifford Algebra exponential, all of which are, frankly, the only reason to make the exponential
its own separate trait.
Effects on Ring structure
It is worth noting that any ring that has a non-trivial exponential operation must automatically
have a characteristic of 0 (that is, 1+1+1+...+1
will never equal zero) and hence, has an
embedding of the Integers within it.
This fact is easily proven as follows:
- assume
char(R) = n != 0
- then, for any
x
inR
,nx = x+...+x = 0
, and, the Frobenious automorphism gives that(x+y)ⁿ = xⁿ + yⁿ
- Hence,
(E(x) - 1)ⁿ = E(x)ⁿ - 1 = E(nx) - 1 = E(0) - 1 = 0
- Thus, we have that that
E(x) = 1
contradicting our assumtions
Additionally, any element that is the output of the expoenential must be an invertible element,
since
1 = E(0) = E(x-x) = E(x)*E(-x)
implying E(x) = E(x)⁻¹
Uniqueness
In general, this characterization of the exponential function is not unique. However, in the vast majority of cases, there is a canonical version that all others derive from or there is only one non-trivial case.
For example, most real-algebras have infinitely many exponentials, but we get a canonical form
stipulating that the function satisfy the classic differential equation E'(x) = E(x)
or some
variant.
Required methods
fn exp(self) -> Self
The exponential of this ring element
Here, exp(x)
is defined such that:
exp(x+y) = exp(x)*exp(y)
for allx
andy
wherex*y=y*x
exp(x) != 0
exp(x)
is continuous (if applicable)d/dx exp(x)|ₓ₌₁ = 1
(if applicable)
For most structures, this function is equivalent to the infinite series Σ xn/n!
fn try_ln(self) -> Option<Self>
An inverse of exp(x) where ln(1) = 0
This returns a None
value whenever the inverse does not exist for the given input.
Uniqueness and Continuity
Do note, however, that for almost all non-Real structures, this function
is not unique and can never be continuous. Of course, some of this ambiguity is resolved by
stipulating that ln(1) = 0
, but even so, some remains,
and so, it is entirely up to the implementor to any specific canonical form if applicable.
For example, the Complex numbers, the natural logarithm must be discontinuous somewhere, and there are infinitely many choices as to where that is. However, usually, this ambiguity is removed by taking the imaginary component of the result between -π and π and setting the discontinuity to be on the negative real axis