Dual numbers #
The dual numbers over R
are of the form a + bε
, where a
and b
are typically elements of a
commutative ring R
, and ε
is a symbol satisfying ε^2 = 0
. They are a special case of
TrivSqZeroExt R M
with M = R
.
Notation #
In the DualNumber
locale:
R[ε]
is a shorthand forDualNumber R
ε
is a shorthand forDualNumber.eps
Main definitions #
Implementation notes #
Rather than duplicating the API of TrivSqZeroExt
, this file reuses the functions there.
References #
- https://en.wikipedia.org/wiki/Dual_number
The type of dual numbers, numbers of the form $a + bε$ where $ε^2 = 0$.
Instances For
The unit element $ε$ that squares to zero.
Instances For
A version of TrivSqZeroExt.snd_mul
with *
instead of •
.
For two algebra morphisms out of R[ε]
to agree, it suffices for them to agree on ε
.
A universal property of the dual numbers, providing a unique R[ε] →ₐ[R] A
for every element
of A
which squares to 0
.
This isomorphism is named to match the very similar Complex.lift
.