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

Commit 382acc1

Browse files
committed
feat(geometry/manifold): generalize some lemmas from smooth to cont_mdiff (#15560)
Also add `*_within_at`, `*_at`, and `*_on` versions.
1 parent 6fed037 commit 382acc1

File tree

2 files changed

+182
-36
lines changed

2 files changed

+182
-36
lines changed

src/geometry/manifold/algebra/monoid.lean

Lines changed: 138 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -89,10 +89,49 @@ lemma has_continuous_mul_of_smooth : has_continuous_mul G :=
8989

9090
end
9191

92+
section
93+
94+
variables {f g : M → G} {s : set M} {x : M} {n : with_top ℕ}
95+
96+
@[to_additive]
97+
lemma cont_mdiff_within_at.mul (hf : cont_mdiff_within_at I' I n f s x)
98+
(hg : cont_mdiff_within_at I' I n g s x) : cont_mdiff_within_at I' I n (f * g) s x :=
99+
((smooth_mul I).smooth_at.of_le le_top).comp_cont_mdiff_within_at x (hf.prod_mk hg)
100+
101+
@[to_additive]
102+
lemma cont_mdiff_at.mul (hf : cont_mdiff_at I' I n f x) (hg : cont_mdiff_at I' I n g x) :
103+
cont_mdiff_at I' I n (f * g) x :=
104+
hf.mul hg
105+
106+
@[to_additive]
107+
lemma cont_mdiff_on.mul (hf : cont_mdiff_on I' I n f s) (hg : cont_mdiff_on I' I n g s) :
108+
cont_mdiff_on I' I n (f * g) s :=
109+
λ x hx, (hf x hx).mul (hg x hx)
110+
111+
@[to_additive]
112+
lemma cont_mdiff.mul (hf : cont_mdiff I' I n f) (hg : cont_mdiff I' I n g) :
113+
cont_mdiff I' I n (f * g) :=
114+
λ x, (hf x).mul (hg x)
115+
116+
@[to_additive]
117+
lemma smooth_within_at.mul (hf : smooth_within_at I' I f s x)
118+
(hg : smooth_within_at I' I g s x) : smooth_within_at I' I (f * g) s x :=
119+
hf.mul hg
120+
121+
@[to_additive]
122+
lemma smooth_at.mul (hf : smooth_at I' I f x) (hg : smooth_at I' I g x) :
123+
smooth_at I' I (f * g) x :=
124+
hf.mul hg
125+
92126
@[to_additive]
93-
lemma smooth.mul {f : M → G} {g : M → G} (hf : smooth I' I f) (hg : smooth I' I g) :
127+
lemma smooth_on.mul (hf : smooth_on I' I f s) (hg : smooth_on I' I g s) :
128+
smooth_on I' I (f * g) s :=
129+
hf.mul hg
130+
131+
@[to_additive]
132+
lemma smooth.mul (hf : smooth I' I f) (hg : smooth I' I g) :
94133
smooth I' I (f * g) :=
95-
(smooth_mul I).comp (hf.prod_mk hg)
134+
hf.mul hg
96135

97136
@[to_additive]
98137
lemma smooth_mul_left {a : G} : smooth I I (λ b : G, a * b) :=
@@ -102,11 +141,7 @@ smooth_const.mul smooth_id
102141
lemma smooth_mul_right {a : G} : smooth I I (λ b : G, b * a) :=
103142
smooth_id.mul smooth_const
104143

105-
@[to_additive]
106-
lemma smooth_on.mul {f : M → G} {g : M → G} {s : set M}
107-
(hf : smooth_on I' I f s) (hg : smooth_on I' I g s) :
108-
smooth_on I' I (f * g) s :=
109-
((smooth_mul I).comp_smooth_on (hf.prod_mk hg) : _)
144+
end
110145

111146
variables (I) (g h : G)
112147

@@ -213,44 +248,125 @@ section comm_monoid
213248

214249
open_locale big_operators
215250

216-
variables {𝕜 : Type*} [nondiscrete_normed_field 𝕜]
251+
variables {ι 𝕜 : Type*} [nondiscrete_normed_field 𝕜]
217252
{H : Type*} [topological_space H]
218253
{E : Type*} [normed_group E] [normed_space 𝕜 E] {I : model_with_corners 𝕜 E H}
219254
{G : Type*} [comm_monoid G] [topological_space G] [charted_space H G] [has_smooth_mul I G]
220255
{E' : Type*} [normed_group E'] [normed_space 𝕜 E']
221256
{H' : Type*} [topological_space H'] {I' : model_with_corners 𝕜 E' H'}
222-
{M : Type*} [topological_space M] [charted_space H' M]
257+
{M : Type*} [topological_space M] [charted_space H' M] {s : set M} {x : M}
258+
{t : finset ι} {f : ι → M → G} {n : with_top ℕ} {p : ι → Prop}
259+
260+
@[to_additive]
261+
lemma cont_mdiff_within_at_finset_prod' (h : ∀ i ∈ t, cont_mdiff_within_at I' I n (f i) s x) :
262+
cont_mdiff_within_at I' I n (∏ i in t, f i) s x :=
263+
finset.prod_induction f (λ f, cont_mdiff_within_at I' I n f s x)
264+
(λ f g hf hg, hf.mul hg) cont_mdiff_within_at_const h
265+
266+
@[to_additive]
267+
lemma cont_mdiff_at_finset_prod' (h : ∀ i ∈ t, cont_mdiff_at I' I n (f i) x) :
268+
cont_mdiff_at I' I n (∏ i in t, f i) x :=
269+
cont_mdiff_within_at_finset_prod' h
270+
271+
@[to_additive]
272+
lemma cont_mdiff_on_finset_prod' (h : ∀ i ∈ t, cont_mdiff_on I' I n (f i) s) :
273+
cont_mdiff_on I' I n (∏ i in t, f i) s :=
274+
λ x hx, cont_mdiff_within_at_finset_prod' $ λ i hi, h i hi x hx
275+
276+
@[to_additive]
277+
lemma cont_mdiff_finset_prod' (h : ∀ i ∈ t, cont_mdiff I' I n (f i)) :
278+
cont_mdiff I' I n (∏ i in t, f i) :=
279+
λ x, cont_mdiff_at_finset_prod' $ λ i hi, h i hi x
280+
281+
@[to_additive]
282+
lemma cont_mdiff_within_at_finset_prod (h : ∀ i ∈ t, cont_mdiff_within_at I' I n (f i) s x) :
283+
cont_mdiff_within_at I' I n (λ x, ∏ i in t, f i x) s x :=
284+
by { simp only [← finset.prod_apply], exact cont_mdiff_within_at_finset_prod' h }
285+
286+
@[to_additive]
287+
lemma cont_mdiff_at_finset_prod (h : ∀ i ∈ t, cont_mdiff_at I' I n (f i) x) :
288+
cont_mdiff_at I' I n (λ x, ∏ i in t, f i x) x :=
289+
cont_mdiff_within_at_finset_prod h
290+
291+
@[to_additive]
292+
lemma cont_mdiff_on_finset_prod (h : ∀ i ∈ t, cont_mdiff_on I' I n (f i) s) :
293+
cont_mdiff_on I' I n (λ x, ∏ i in t, f i x) s :=
294+
λ x hx, cont_mdiff_within_at_finset_prod $ λ i hi, h i hi x hx
295+
296+
@[to_additive]
297+
lemma cont_mdiff_finset_prod (h : ∀ i ∈ t, cont_mdiff I' I n (f i)) :
298+
cont_mdiff I' I n (λ x, ∏ i in t, f i x) :=
299+
λ x, cont_mdiff_at_finset_prod $ λ i hi, h i hi x
300+
301+
@[to_additive]
302+
lemma smooth_within_at_finset_prod' (h : ∀ i ∈ t, smooth_within_at I' I (f i) s x) :
303+
smooth_within_at I' I (∏ i in t, f i) s x :=
304+
cont_mdiff_within_at_finset_prod' h
305+
306+
@[to_additive]
307+
lemma smooth_at_finset_prod' (h : ∀ i ∈ t, smooth_at I' I (f i) x) :
308+
smooth_at I' I (∏ i in t, f i) x :=
309+
cont_mdiff_at_finset_prod' h
310+
311+
@[to_additive]
312+
lemma smooth_on_finset_prod' (h : ∀ i ∈ t, smooth_on I' I (f i) s) :
313+
smooth_on I' I (∏ i in t, f i) s :=
314+
cont_mdiff_on_finset_prod' h
223315

224316
@[to_additive]
225-
lemma smooth_finset_prod' {ι} {s : finset ι} {f : ι → M → G} (h : ∀ i ∈ s, smooth I' I (f i)) :
226-
smooth I' I (∏ i in s, f i) :=
227-
finset.prod_induction _ _ (λ f g hf hg, hf.mul hg)
228-
(@smooth_const _ _ _ _ _ _ _ I' _ _ _ _ _ _ _ _ I _ _ _ 1) h
317+
lemma smooth_finset_prod' (h : ∀ i ∈ t, smooth I' I (f i)) : smooth I' I (∏ i in t, f i) :=
318+
cont_mdiff_finset_prod' h
229319

230320
@[to_additive]
231-
lemma smooth_finset_prod {ι} {s : finset ι} {f : ι → M → G} (h : ∀ i ∈ s, smooth I' I (f i)) :
232-
smooth I' I (λ x, ∏ i in s, f i x) :=
233-
by { simp only [← finset.prod_apply], exact smooth_finset_prod' h }
321+
lemma smooth_within_at_finset_prod (h : ∀ i ∈ t, smooth_within_at I' I (f i) s x) :
322+
smooth_within_at I' I (λ x, ∏ i in t, f i x) s x :=
323+
cont_mdiff_within_at_finset_prod h
324+
325+
@[to_additive]
326+
lemma smooth_at_finset_prod (h : ∀ i ∈ t, smooth_at I' I (f i) x) :
327+
smooth_at I' I (λ x, ∏ i in t, f i x) x :=
328+
cont_mdiff_at_finset_prod h
329+
330+
@[to_additive]
331+
lemma smooth_on_finset_prod (h : ∀ i ∈ t, smooth_on I' I (f i) s) :
332+
smooth_on I' I (λ x, ∏ i in t, f i x) s :=
333+
cont_mdiff_on_finset_prod h
334+
335+
@[to_additive]
336+
lemma smooth_finset_prod (h : ∀ i ∈ t, smooth I' I (f i)) :
337+
smooth I' I (λ x, ∏ i in t, f i x) :=
338+
cont_mdiff_finset_prod h
234339

235340
open function filter
236341

237342
@[to_additive]
238-
lemma smooth_finprod {ι} {f : ι → M → G} (h : ∀ i, smooth I' I (f i))
343+
lemma cont_mdiff_finprod (h : ∀ i, cont_mdiff I' I n (f i))
239344
(hfin : locally_finite (λ i, mul_support (f i))) :
240-
smooth I' I (λ x, ∏ᶠ i, f i x) :=
345+
cont_mdiff I' I n (λ x, ∏ᶠ i, f i x) :=
241346
begin
242347
intro x,
243348
rcases finprod_eventually_eq_prod hfin x with ⟨s, hs⟩,
244-
exact (smooth_finset_prod (λ i hi, h i) x).congr_of_eventually_eq hs,
349+
exact (cont_mdiff_finset_prod (λ i hi, h i) x).congr_of_eventually_eq hs,
245350
end
246351

247352
@[to_additive]
248-
lemma smooth_finprod_cond {ι} {f : ι → M → G} {p : ι → Prop} (hc : ∀ i, p i → smooth I' I (f i))
353+
lemma cont_mdiff_finprod_cond (hc : ∀ i, p i → cont_mdiff I' I n (f i))
249354
(hf : locally_finite (λ i, mul_support (f i))) :
250-
smooth I' I (λ x, ∏ᶠ i (hi : p i), f i x) :=
355+
cont_mdiff I' I n (λ x, ∏ᶠ i (hi : p i), f i x) :=
251356
begin
252357
simp only [← finprod_subtype_eq_finprod_cond],
253-
exact smooth_finprod (λ i, hc i i.2) (hf.comp_injective subtype.coe_injective)
358+
exact cont_mdiff_finprod (λ i, hc i i.2) (hf.comp_injective subtype.coe_injective)
254359
end
255360

361+
@[to_additive]
362+
lemma smooth_finprod (h : ∀ i, smooth I' I (f i)) (hfin : locally_finite (λ i, mul_support (f i))) :
363+
smooth I' I (λ x, ∏ᶠ i, f i x) :=
364+
cont_mdiff_finprod h hfin
365+
366+
@[to_additive]
367+
lemma smooth_finprod_cond (hc : ∀ i, p i → smooth I' I (f i))
368+
(hf : locally_finite (λ i, mul_support (f i))) :
369+
smooth I' I (λ x, ∏ᶠ i (hi : p i), f i x) :=
370+
cont_mdiff_finprod_cond hc hf
371+
256372
end comm_monoid

src/geometry/manifold/cont_mdiff.lean

Lines changed: 44 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -232,16 +232,15 @@ lemma cont_mdiff_within_at_univ :
232232
cont_mdiff_within_at I I' n f univ x ↔ cont_mdiff_at I I' n f x :=
233233
iff.rfl
234234

235-
lemma smooth_at_univ :
235+
lemma smooth_within_at_univ :
236236
smooth_within_at I I' f univ x ↔ smooth_at I I' f x := cont_mdiff_within_at_univ
237237

238238
lemma cont_mdiff_on_univ :
239239
cont_mdiff_on I I' n f univ ↔ cont_mdiff I I' n f :=
240240
by simp only [cont_mdiff_on, cont_mdiff, cont_mdiff_within_at_univ,
241241
forall_prop_of_true, mem_univ]
242242

243-
lemma smooth_on_univ :
244-
smooth_on I I' f univ ↔ smooth I I' f := cont_mdiff_on_univ
243+
lemma smooth_on_univ : smooth_on I I' f univ ↔ smooth I I' f := cont_mdiff_on_univ
245244

246245
/-- One can reformulate smoothness within a set at a point as continuity within this set at this
247246
point, and smoothness in the corresponding extended chart. -/
@@ -625,6 +624,13 @@ lemma smooth_within_at.smooth_at
625624
smooth_at I I' f x :=
626625
cont_mdiff_within_at.cont_mdiff_at h ht
627626

627+
lemma cont_mdiff_on.cont_mdiff_at (h : cont_mdiff_on I I' n f s) (hx : s ∈ 𝓝 x) :
628+
cont_mdiff_at I I' n f x :=
629+
(h x (mem_of_mem_nhds hx)).cont_mdiff_at hx
630+
631+
lemma smooth_on.smooth_at (h : smooth_on I I' f s) (hx : s ∈ 𝓝 x) : smooth_at I I' f x :=
632+
h.cont_mdiff_at hx
633+
628634
include Is
629635

630636
lemma cont_mdiff_on_ext_chart_at :
@@ -1925,17 +1931,41 @@ variables {V : Type*} [normed_group V] [normed_space 𝕜 V]
19251931
lemma smooth_smul : smooth (𝓘(𝕜).prod 𝓘(𝕜, V)) 𝓘(𝕜, V) (λp : 𝕜 × V, p.1 • p.2) :=
19261932
smooth_iff.2 ⟨continuous_smul, λ x y, cont_diff_smul.cont_diff_on⟩
19271933

1928-
lemma smooth.smul {N : Type*} [topological_space N] [charted_space H N]
1929-
{f : N → 𝕜} {g : N → V} (hf : smooth I 𝓘(𝕜) f) (hg : smooth I 𝓘(𝕜, V) g) :
1930-
smooth I 𝓘(𝕜, V) (λ p, f p • g p) :=
1931-
smooth_smul.comp (hf.prod_mk hg)
1934+
lemma cont_mdiff_within_at.smul {f : M → 𝕜} {g : M → V} (hf : cont_mdiff_within_at I 𝓘(𝕜) n f s x)
1935+
(hg : cont_mdiff_within_at I 𝓘(𝕜, V) n g s x) :
1936+
cont_mdiff_within_at I 𝓘(𝕜, V) n (λ p, f p • g p) s x :=
1937+
(smooth_smul.of_le le_top).cont_mdiff_at.comp_cont_mdiff_within_at x (hf.prod_mk hg)
1938+
1939+
lemma cont_mdiff_at.smul {f : M → 𝕜} {g : M → V} (hf : cont_mdiff_at I 𝓘(𝕜) n f x)
1940+
(hg : cont_mdiff_at I 𝓘(𝕜, V) n g x) :
1941+
cont_mdiff_at I 𝓘(𝕜, V) n (λ p, f p • g p) x :=
1942+
hf.smul hg
1943+
1944+
lemma cont_mdiff_on.smul {f : M → 𝕜} {g : M → V} (hf : cont_mdiff_on I 𝓘(𝕜) n f s)
1945+
(hg : cont_mdiff_on I 𝓘(𝕜, V) n g s) :
1946+
cont_mdiff_on I 𝓘(𝕜, V) n (λ p, f p • g p) s :=
1947+
λ x hx, (hf x hx).smul (hg x hx)
1948+
1949+
lemma cont_mdiff.smul {f : M → 𝕜} {g : M → V} (hf : cont_mdiff I 𝓘(𝕜) n f)
1950+
(hg : cont_mdiff I 𝓘(𝕜, V) n g) :
1951+
cont_mdiff I 𝓘(𝕜, V) n (λ p, f p • g p) :=
1952+
λ x, (hf x).smul (hg x)
1953+
1954+
lemma smooth_within_at.smul {f : M → 𝕜} {g : M → V} (hf : smooth_within_at I 𝓘(𝕜) f s x)
1955+
(hg : smooth_within_at I 𝓘(𝕜, V) g s x) :
1956+
smooth_within_at I 𝓘(𝕜, V) (λ p, f p • g p) s x :=
1957+
hf.smul hg
1958+
1959+
lemma smooth_at.smul {f : M → 𝕜} {g : M → V} (hf : smooth_at I 𝓘(𝕜) f x)
1960+
(hg : smooth_at I 𝓘(𝕜, V) g x) :
1961+
smooth_at I 𝓘(𝕜, V) (λ p, f p • g p) x :=
1962+
hf.smul hg
19321963

1933-
lemma smooth_on.smul {N : Type*} [topological_space N] [charted_space H N]
1934-
{f : N → 𝕜} {g : N → V} {s : set N} (hf : smooth_on I 𝓘(𝕜) f s) (hg : smooth_on I 𝓘(𝕜, V) g s) :
1964+
lemma smooth_on.smul {f : M → 𝕜} {g : M → V} (hf : smooth_on I 𝓘(𝕜) f s)
1965+
(hg : smooth_on I 𝓘(𝕜, V) g s) :
19351966
smooth_on I 𝓘(𝕜, V) (λ p, f p • g p) s :=
1936-
smooth_smul.comp_smooth_on (hf.prod_mk hg)
1967+
hf.smul hg
19371968

1938-
lemma smooth_at.smul {N : Type*} [topological_space N] [charted_space H N]
1939-
{f : N → 𝕜} {g : N → V} {x : N} (hf : smooth_at I 𝓘(𝕜) f x) (hg : smooth_at I 𝓘(𝕜, V) g x) :
1940-
smooth_at I 𝓘(𝕜, V) (λ p, f p • g p) x :=
1941-
smooth_smul.smooth_at.comp _ (hf.prod_mk hg)
1969+
lemma smooth.smul {f : M → 𝕜} {g : M → V} (hf : smooth I 𝓘(𝕜) f) (hg : smooth I 𝓘(𝕜, V) g) :
1970+
smooth I 𝓘(𝕜, V) (λ p, f p • g p) :=
1971+
hf.smul hg

0 commit comments

Comments
 (0)