Skip to content
This repository was archived by the owner on Jul 24, 2024. It is now read-only.

Commit 806c0bb

Browse files
committed
feat(analysis/normed_space/triv_sq_zero_ext): exponential of dual numbers (#18200)
In order for convergence to be well-defined, we put the product topology on `triv_zero_sq_ext R M` via its obvious internal representation as a product. [Zulip thread](https://leanprover.zulipchat.com/#narrow/stream/116395-maths/topic/Exponentials.20in.20seminormed.20algebras/near/321870256).
1 parent dc6c365 commit 806c0bb

3 files changed

Lines changed: 295 additions & 0 deletions

File tree

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
/-
2+
Copyright (c) 2023 Eric Wieser. All rights reserved.
3+
Released under Apache 2.0 license as described in the file LICENSE.
4+
Authors: Eric Wieser
5+
-/
6+
import algebra.dual_number
7+
import analysis.normed_space.triv_sq_zero_ext
8+
9+
/-!
10+
# Results on `dual_number R` related to the norm
11+
12+
These are just restatements of similar statements about `triv_sq_zero_ext R M`.
13+
14+
## Main results
15+
16+
* `exp_eps`
17+
18+
-/
19+
20+
namespace dual_number
21+
open triv_sq_zero_ext
22+
23+
variables (𝕜 : Type*) {R : Type*}
24+
25+
variables [is_R_or_C 𝕜] [normed_comm_ring R] [normed_algebra 𝕜 R]
26+
variables [topological_ring R] [complete_space R] [t2_space R]
27+
28+
@[simp] lemma exp_eps : exp 𝕜 (eps : dual_number R) = 1 + eps :=
29+
exp_inr _ _
30+
31+
@[simp] lemma exp_smul_eps (r : R) : exp 𝕜 (r • eps : dual_number R) = 1 + r • eps :=
32+
by rw [eps, ←inr_smul, exp_inr]
33+
34+
end dual_number
Lines changed: 116 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,116 @@
1+
/-
2+
Copyright (c) 2023 Eric Wieser. All rights reserved.
3+
Released under Apache 2.0 license as described in the file LICENSE.
4+
Authors: Eric Wieser
5+
-/
6+
import analysis.normed_space.basic
7+
import analysis.normed_space.exponential
8+
import topology.instances.triv_sq_zero_ext
9+
10+
/-!
11+
# Results on `triv_sq_zero_ext R M` related to the norm
12+
13+
For now, this file contains results about `exp` for this type.
14+
15+
TODO: actually define a sensible norm on `triv_sq_zero_ext R M`, so that we have access to lemmas
16+
like `exp_add`.
17+
18+
## Main results
19+
20+
* `triv_sq_zero_ext.fst_exp`
21+
* `triv_sq_zero_ext.snd_exp`
22+
* `triv_sq_zero_ext.exp_inl`
23+
* `triv_sq_zero_ext.exp_inr`
24+
25+
-/
26+
27+
variables (𝕜 : Type*) {R M : Type*}
28+
29+
local notation `tsze` := triv_sq_zero_ext
30+
31+
namespace triv_sq_zero_ext
32+
33+
section topology
34+
variables [topological_space R] [topological_space M]
35+
36+
37+
/-- If `exp R x.fst` converges to `e` then `exp R x` converges to `inl e + inr (e • x.snd)`. -/
38+
lemma has_sum_exp_series [field 𝕜] [char_zero 𝕜] [comm_ring R]
39+
[add_comm_group M] [algebra 𝕜 R] [module R M] [module 𝕜 M] [is_scalar_tower 𝕜 R M]
40+
[topological_ring R] [topological_add_group M] [has_continuous_smul R M]
41+
(x : tsze R M) {e : R} (h : has_sum (λ n, exp_series 𝕜 R n (λ _, x.fst)) e) :
42+
has_sum (λ n, exp_series 𝕜 (tsze R M) n (λ _, x)) (inl e + inr (e • x.snd)) :=
43+
begin
44+
simp_rw [exp_series_apply_eq] at *,
45+
conv
46+
{ congr,
47+
funext,
48+
rw [←inl_fst_add_inr_snd_eq (x ^ _), fst_pow, snd_pow, smul_add, ←inr_smul,
49+
←inl_smul, nsmul_eq_smul_cast 𝕜 n, smul_smul, inv_mul_eq_div, ←inv_div, ←smul_assoc], },
50+
refine (has_sum_inl M h).add (has_sum_inr M _),
51+
apply has_sum.smul_const,
52+
rw [←has_sum_nat_add_iff' 1], swap, apply_instance,
53+
rw [finset.range_one, finset.sum_singleton, nat.cast_zero, div_zero, inv_zero, zero_smul,
54+
sub_zero],
55+
simp_rw [←nat.succ_eq_add_one, nat.pred_succ, nat.factorial_succ, nat.cast_mul,
56+
←nat.succ_eq_add_one,
57+
mul_div_cancel_left _ ((@nat.cast_ne_zero 𝕜 _ _ _).mpr $ nat.succ_ne_zero _)],
58+
exact h,
59+
end
60+
61+
end topology
62+
63+
section normed_ring
64+
variables [is_R_or_C 𝕜] [normed_comm_ring R] [add_comm_group M]
65+
variables [normed_algebra 𝕜 R] [module R M] [module 𝕜 M] [is_scalar_tower 𝕜 R M]
66+
variables [topological_space M] [topological_ring R]
67+
variables [topological_add_group M] [has_continuous_smul R M]
68+
variables [complete_space R] [t2_space R] [t2_space M]
69+
70+
lemma exp_def (x : tsze R M) : exp 𝕜 x = inl (exp 𝕜 x.fst) + inr (exp 𝕜 x.fst • x.snd) :=
71+
begin
72+
simp_rw [exp, formal_multilinear_series.sum],
73+
refine (has_sum_exp_series 𝕜 x _).tsum_eq,
74+
exact exp_series_has_sum_exp _,
75+
end
76+
77+
@[simp] lemma fst_exp (x : tsze R M) : fst (exp 𝕜 x) = exp 𝕜 x.fst :=
78+
by rw [exp_def, fst_add, fst_inl, fst_inr, add_zero]
79+
80+
@[simp] lemma snd_exp (x : tsze R M) : snd (exp 𝕜 x) = exp 𝕜 x.fst • x.snd :=
81+
by rw [exp_def, snd_add, snd_inl, snd_inr, zero_add]
82+
83+
@[simp] lemma exp_inl (x : R) : exp 𝕜 (inl x : tsze R M) = inl (exp 𝕜 x) :=
84+
by rw [exp_def, fst_inl, snd_inl, smul_zero, inr_zero, add_zero]
85+
86+
@[simp] lemma exp_inr (m : M) : exp 𝕜 (inr m : tsze R M) = 1 + inr m :=
87+
by rw [exp_def, fst_inr, exp_zero, snd_inr, one_smul, inl_one]
88+
89+
/-- Polar form of trivial-square-zero extension. -/
90+
lemma eq_smul_exp_of_invertible (x : tsze R M) [invertible x.fst] :
91+
x = x.fst • exp 𝕜 (⅟x.fst • inr x.snd) :=
92+
by rw [←inr_smul, exp_inr, smul_add, ←inl_one, ←inl_smul, ←inr_smul, smul_eq_mul, mul_one,
93+
smul_smul, mul_inv_of_self, one_smul, inl_fst_add_inr_snd_eq]
94+
95+
end normed_ring
96+
97+
98+
section normed_field
99+
variables [is_R_or_C 𝕜] [normed_field R] [add_comm_group M]
100+
variables [normed_algebra 𝕜 R] [module R M] [module 𝕜 M] [is_scalar_tower 𝕜 R M]
101+
variables [topological_space M] [topological_ring R]
102+
variables [topological_add_group M] [has_continuous_smul R M]
103+
variables [complete_space R] [t2_space R] [t2_space M]
104+
105+
/-- More convenient version of `triv_sq_zero_ext.eq_smul_exp_of_invertible` for when `R` is a
106+
field. -/
107+
lemma eq_smul_exp_of_ne_zero (x : tsze R M) (hx : x.fst ≠ 0) :
108+
x = x.fst • exp 𝕜 (x.fst⁻¹ • inr x.snd) :=
109+
begin
110+
letI : invertible x.fst := invertible_of_nonzero hx,
111+
exact eq_smul_exp_of_invertible _ _
112+
end
113+
114+
end normed_field
115+
116+
end triv_sq_zero_ext
Lines changed: 145 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,145 @@
1+
/-
2+
Copyright (c) 2023 Eric Wieser. All rights reserved.
3+
Released under Apache 2.0 license as described in the file LICENSE.
4+
Authors: Eric Wieser
5+
-/
6+
import algebra.triv_sq_zero_ext
7+
import topology.algebra.infinite_sum
8+
import topology.algebra.module.basic
9+
10+
/-!
11+
# Topology on `triv_sq_zero_ext R M`
12+
13+
The type `triv_sq_zero_ext R M` inherits the topology from `R × M`.
14+
15+
Note that this is not the topology induced by the seminorm on the dual numbers suggested by
16+
[this Math.SE answer](https://math.stackexchange.com/a/1056378/1896), which instead induces
17+
the topology pulled back through the projection map `triv_sq_zero_ext.fst : tsze R M → R`.
18+
Obviously, that topology is not Hausdorff and using it would result in `exp` converging to more than
19+
one value.
20+
21+
## Main results
22+
23+
* `triv_sq_zero_ext.topological_ring`: the ring operations are continuous
24+
25+
-/
26+
27+
variables {α S R M : Type*}
28+
29+
local notation `tsze` := triv_sq_zero_ext
30+
31+
namespace triv_sq_zero_ext
32+
variables [topological_space R] [topological_space M]
33+
34+
instance : topological_space (tsze R M) :=
35+
topological_space.induced fst ‹_› ⊓ topological_space.induced snd ‹_›
36+
37+
instance [t2_space R] [t2_space M] : t2_space (tsze R M) :=
38+
prod.t2_space
39+
40+
lemma nhds_def (x : tsze R M) : nhds x = (nhds x.fst).prod (nhds x.snd) :=
41+
by cases x; exact nhds_prod_eq
42+
lemma nhds_inl [has_zero M] (x : R) : nhds (inl x : tsze R M) = (nhds x).prod (nhds 0) := nhds_def _
43+
lemma nhds_inr [has_zero R] (m : M) : nhds (inr m : tsze R M) = (nhds 0).prod (nhds m) := nhds_def _
44+
45+
lemma continuous_fst : continuous (fst : tsze R M → R) := continuous_fst
46+
lemma continuous_snd : continuous (snd : tsze R M → M) := continuous_snd
47+
48+
lemma continuous_inl [has_zero M] : continuous (inl : R → tsze R M) :=
49+
continuous_id.prod_mk continuous_const
50+
lemma continuous_inr [has_zero R] : continuous (inr : M → tsze R M) :=
51+
continuous_const.prod_mk continuous_id
52+
53+
lemma embedding_inl [has_zero M] : embedding (inl : R → tsze R M) :=
54+
embedding_of_embedding_compose continuous_inl continuous_fst embedding_id
55+
lemma embedding_inr [has_zero R] : embedding (inr : M → tsze R M) :=
56+
embedding_of_embedding_compose continuous_inr continuous_snd embedding_id
57+
58+
variables (R M)
59+
60+
/-- `triv_sq_zero_ext.fst` as a continuous linear map. -/
61+
@[simps]
62+
def fst_clm [comm_semiring R] [add_comm_monoid M] [module R M] : tsze R M →L[R] R :=
63+
{ to_fun := fst,
64+
.. continuous_linear_map.fst R R M }
65+
66+
/-- `triv_sq_zero_ext.snd` as a continuous linear map. -/
67+
@[simps]
68+
def snd_clm [comm_semiring R] [add_comm_monoid M] [module R M] : tsze R M →L[R] M :=
69+
{ to_fun := snd,
70+
cont := continuous_snd,
71+
.. continuous_linear_map.snd R R M }
72+
73+
/-- `triv_sq_zero_ext.inl` as a continuous linear map. -/
74+
@[simps]
75+
def inl_clm [comm_semiring R] [add_comm_monoid M] [module R M] : R →L[R] tsze R M :=
76+
{ to_fun := inl,
77+
.. continuous_linear_map.inl R R M }
78+
79+
/-- `triv_sq_zero_ext.inr` as a continuous linear map. -/
80+
@[simps]
81+
def inr_clm [comm_semiring R] [add_comm_monoid M] [module R M] : M →L[R] tsze R M :=
82+
{ to_fun := inr,
83+
.. continuous_linear_map.inr R R M }
84+
85+
variables {R M}
86+
87+
instance [has_add R] [has_add M]
88+
[has_continuous_add R] [has_continuous_add M] :
89+
has_continuous_add (tsze R M) :=
90+
prod.has_continuous_add
91+
92+
instance [has_mul R] [has_add M] [has_smul R M]
93+
[has_continuous_mul R] [has_continuous_smul R M] [has_continuous_add M] :
94+
has_continuous_mul (tsze R M) :=
95+
⟨((continuous_fst.comp _root_.continuous_fst).mul (continuous_fst.comp _root_.continuous_snd))
96+
.prod_mk $
97+
((continuous_fst.comp _root_.continuous_fst).smul
98+
(continuous_snd.comp _root_.continuous_snd)).add
99+
((continuous_fst.comp _root_.continuous_snd).smul
100+
(continuous_snd.comp _root_.continuous_fst))⟩
101+
102+
instance [has_neg R] [has_neg M]
103+
[has_continuous_neg R] [has_continuous_neg M] :
104+
has_continuous_neg (tsze R M) :=
105+
prod.has_continuous_neg
106+
107+
instance [semiring R] [add_comm_monoid M] [module R M]
108+
[topological_semiring R] [has_continuous_add M] [has_continuous_smul R M] :
109+
topological_semiring (tsze R M) :=
110+
{}
111+
112+
instance [comm_ring R] [add_comm_group M] [module R M]
113+
[topological_ring R] [topological_add_group M] [has_continuous_smul R M] :
114+
topological_ring (tsze R M) :=
115+
{}
116+
117+
instance [has_smul S R] [has_smul S M]
118+
[has_continuous_const_smul S R] [has_continuous_const_smul S M] :
119+
has_continuous_const_smul S (tsze R M) :=
120+
prod.has_continuous_const_smul
121+
122+
instance [topological_space S] [has_smul S R] [has_smul S M]
123+
[has_continuous_smul S R] [has_continuous_smul S M] :
124+
has_continuous_smul S (tsze R M) :=
125+
prod.has_continuous_smul
126+
127+
variables (M)
128+
129+
lemma has_sum_inl [add_comm_monoid R] [add_comm_monoid M] {f : α → R} {a : R} (h : has_sum f a) :
130+
has_sum (λ x, inl (f x)) (inl a : tsze R M) :=
131+
h.map (⟨inl, inl_zero _, inl_add _⟩ : R →+ tsze R M) continuous_inl
132+
133+
lemma has_sum_inr [add_comm_monoid R] [add_comm_monoid M] {f : α → M} {a : M} (h : has_sum f a) :
134+
has_sum (λ x, inr (f x)) (inr a : tsze R M) :=
135+
h.map (⟨inr, inr_zero _, inr_add _⟩ : M →+ tsze R M) continuous_inr
136+
137+
lemma has_sum_fst [add_comm_monoid R] [add_comm_monoid M] {f : α → tsze R M} {a : tsze R M}
138+
(h : has_sum f a) : has_sum (λ x, fst (f x)) (fst a) :=
139+
h.map (⟨fst, fst_zero, fst_add⟩ : tsze R M →+ R) continuous_fst
140+
141+
lemma has_sum_snd [add_comm_monoid R] [add_comm_monoid M] {f : α → tsze R M} {a : tsze R M}
142+
(h : has_sum f a) : has_sum (λ x, snd (f x)) (snd a) :=
143+
h.map (⟨snd, snd_zero, snd_add⟩ : tsze R M →+ M) continuous_snd
144+
145+
end triv_sq_zero_ext

0 commit comments

Comments
 (0)