Dual numbers #
THIS FILE IS SYNCHRONIZED WITH MATHLIB4. Any changes to this file require a corresponding PR to mathlib4.
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
triv_sq_zero_ext R M
with M = R
.
Notation #
In the dual_number
locale:
R[ε]
is a shorthand fordual_number R
ε
is a shorthand fordual_number.eps
Main definitions #
Implementation notes #
Rather than duplicating the API of triv_sq_zero_ext
, this file reuses the functions there.
References #
The type of dual numbers, numbers of the form $a + bε$ where $ε^2 = 0$.
The unit element $ε$ that squares to zero.
Equations
A version of triv_sq_zero_ext.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
.
Equations
- dual_number.lift = (show {e // e * e = 0} ≃ {f // ∀ (x y : R), ⇑f x * ⇑f y = 0}, from (linear_map.ring_lmap_equiv_self R ℕ A).symm.to_equiv.subtype_equiv dual_number.lift._proof_7).trans triv_sq_zero_ext.lift