Skip to content

Commit cd76c19

Browse files
committed
feat: groups with zero with a smooth division away from zero (#6069)
We have currently (additive or multiplicative) Lie groups but no typeclass to express that division is smooth away from zero in fields. This PR adds such a typeclass, modelled on the one we already have in topological spaces.
1 parent 3380fd1 commit cd76c19

File tree

3 files changed

+195
-30
lines changed

3 files changed

+195
-30
lines changed

Mathlib/Geometry/Manifold/Algebra/LieGroup.lean

Lines changed: 117 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ the addition and negation operations are smooth. -/
4848
class LieAddGroup {𝕜 : Type _} [NontriviallyNormedField 𝕜] {H : Type _} [TopologicalSpace H]
4949
{E : Type _} [NormedAddCommGroup E] [NormedSpace 𝕜 E] (I : ModelWithCorners 𝕜 E H) (G : Type _)
5050
[AddGroup G] [TopologicalSpace G] [ChartedSpace H G] extends SmoothAdd I G : Prop where
51+
/-- Negation is smooth in an additive Lie group. -/
5152
smooth_neg : Smooth I I fun a : G => -a
5253
#align lie_add_group LieAddGroup
5354

@@ -58,6 +59,7 @@ the multiplication and inverse operations are smooth. -/
5859
class LieGroup {𝕜 : Type _} [NontriviallyNormedField 𝕜] {H : Type _} [TopologicalSpace H]
5960
{E : Type _} [NormedAddCommGroup E] [NormedSpace 𝕜 E] (I : ModelWithCorners 𝕜 E H) (G : Type _)
6061
[Group G] [TopologicalSpace G] [ChartedSpace H G] extends SmoothMul I G : Prop where
62+
/-- Inversion is smooth in a Lie group. -/
6163
smooth_inv : Smooth I I fun a : G => a⁻¹
6264
#align lie_group LieGroup
6365

@@ -226,3 +228,118 @@ instance normedSpaceLieAddGroup {𝕜 : Type _} [NontriviallyNormedField 𝕜] {
226228
[NormedAddCommGroup E] [NormedSpace 𝕜 E] : LieAddGroup 𝓘(𝕜, E) E where
227229
smooth_neg := contDiff_neg.contMDiff
228230
#align normed_space_lie_add_group normedSpaceLieAddGroup
231+
232+
section HasSmoothInv
233+
234+
-- See note [Design choices about smooth algebraic structures]
235+
/-- A smooth manifold with `0` and `Inv` such that `fun x ↦ x⁻¹` is smooth at all nonzero points.
236+
Any complete normed (semi)field has this property. -/
237+
class SmoothInv₀ {𝕜 : Type _} [NontriviallyNormedField 𝕜] {H : Type _} [TopologicalSpace H]
238+
{E : Type _} [NormedAddCommGroup E] [NormedSpace 𝕜 E] (I : ModelWithCorners 𝕜 E H) (G : Type _)
239+
[Inv G] [Zero G] [TopologicalSpace G] [ChartedSpace H G] : Prop where
240+
/-- Inversion is smooth away from `0`. -/
241+
smoothAt_inv₀ : ∀ ⦃x : G⦄, x ≠ 0 → SmoothAt I I (fun y ↦ y⁻¹) x
242+
243+
instance {𝕜 : Type _} [NontriviallyNormedField 𝕜] [CompleteSpace 𝕜] : SmoothInv₀ 𝓘(𝕜) 𝕜 :=
244+
{ smoothAt_inv₀ := by
245+
intro x hx
246+
change ContMDiffAt 𝓘(𝕜) 𝓘(𝕜) ⊤ Inv.inv x
247+
rw [contMDiffAt_iff_contDiffAt]
248+
exact contDiffAt_inv 𝕜 hx }
249+
250+
variable {𝕜 : Type _} [NontriviallyNormedField 𝕜] {H : Type _} [TopologicalSpace H] {E : Type _}
251+
[NormedAddCommGroup E] [NormedSpace 𝕜 E] (I : ModelWithCorners 𝕜 E H) {G : Type _}
252+
[TopologicalSpace G] [ChartedSpace H G] [Inv G] [Zero G] [SmoothInv₀ I G] {E' : Type _}
253+
[NormedAddCommGroup E'] [NormedSpace 𝕜 E'] {H' : Type _} [TopologicalSpace H']
254+
{I' : ModelWithCorners 𝕜 E' H'} {M : Type _} [TopologicalSpace M] [ChartedSpace H' M]
255+
{n : ℕ∞} {f g : M → G}
256+
257+
theorem smoothAt_inv₀ {x : G} (hx : x ≠ 0) : SmoothAt I I (fun y ↦ y⁻¹) x :=
258+
SmoothInv₀.smoothAt_inv₀ hx
259+
260+
/-- In a manifold with smooth inverse away from `0`, the inverse is continuous away from `0`.
261+
This is not an instance for technical reasons, see
262+
note [Design choices about smooth algebraic structures]. -/
263+
theorem hasContinuousInv₀_of_hasSmoothInv₀ : HasContinuousInv₀ G :=
264+
{ continuousAt_inv₀ := fun _ hx ↦ (smoothAt_inv₀ I hx).continuousAt }
265+
266+
theorem SmoothOn_inv₀ : SmoothOn I I (Inv.inv : G → G) {0}ᶜ := fun _x hx =>
267+
(smoothAt_inv₀ I hx).smoothWithinAt
268+
269+
variable {I}
270+
271+
theorem ContMDiffWithinAt.inv₀ (hf : ContMDiffWithinAt I' I n f s a) (ha : f a ≠ 0) :
272+
ContMDiffWithinAt I' I n (fun x => (f x)⁻¹) s a :=
273+
(smoothAt_inv₀ I ha).contMDiffAt.comp_contMDiffWithinAt a hf
274+
275+
theorem ContMDiffAt.inv₀ (hf : ContMDiffAt I' I n f a) (ha : f a ≠ 0) :
276+
ContMDiffAt I' I n (fun x ↦ (f x)⁻¹) a :=
277+
(smoothAt_inv₀ I ha).contMDiffAt.comp a hf
278+
279+
theorem ContMDiff.inv₀ (hf : ContMDiff I' I n f) (h0 : ∀ x, f x ≠ 0) :
280+
ContMDiff I' I n (fun x ↦ (f x)⁻¹) :=
281+
fun x ↦ ContMDiffAt.inv₀ (hf x) (h0 x)
282+
283+
theorem ContMDiffOn.inv₀ (hf : ContMDiffOn I' I n f s) (h0 : ∀ x ∈ s, f x ≠ 0) :
284+
ContMDiffOn I' I n (fun x => (f x)⁻¹) s :=
285+
fun x hx ↦ ContMDiffWithinAt.inv₀ (hf x hx) (h0 x hx)
286+
287+
theorem SmoothWithinAt.inv₀ (hf : SmoothWithinAt I' I f s a) (ha : f a ≠ 0) :
288+
SmoothWithinAt I' I (fun x => (f x)⁻¹) s a :=
289+
ContMDiffWithinAt.inv₀ hf ha
290+
291+
theorem SmoothAt.inv₀ (hf : SmoothAt I' I f a) (ha : f a ≠ 0) :
292+
SmoothAt I' I (fun x => (f x)⁻¹) a :=
293+
ContMDiffAt.inv₀ hf ha
294+
295+
theorem Smooth.inv₀ (hf : Smooth I' I f) (h0 : ∀ x, f x ≠ 0) : Smooth I' I fun x => (f x)⁻¹ :=
296+
ContMDiff.inv₀ hf h0
297+
298+
theorem SmoothOn.inv₀ (hf : SmoothOn I' I f s) (h0 : ∀ x ∈ s, f x ≠ 0) :
299+
SmoothOn I' I (fun x => (f x)⁻¹) s :=
300+
ContMDiffOn.inv₀ hf h0
301+
302+
end HasSmoothInv
303+
304+
section Div
305+
306+
variable {𝕜 : Type _} [NontriviallyNormedField 𝕜] {H : Type _} [TopologicalSpace H] {E : Type _}
307+
[NormedAddCommGroup E] [NormedSpace 𝕜 E] {I : ModelWithCorners 𝕜 E H} {G : Type _}
308+
[TopologicalSpace G] [ChartedSpace H G] [GroupWithZero G] [SmoothInv₀ I G] [SmoothMul I G]
309+
{E' : Type _} [NormedAddCommGroup E'] [NormedSpace 𝕜 E'] {H' : Type _} [TopologicalSpace H']
310+
{I' : ModelWithCorners 𝕜 E' H'} {M : Type _} [TopologicalSpace M] [ChartedSpace H' M]
311+
{f g : M → G}
312+
313+
theorem ContMDiffWithinAt.div₀
314+
(hf : ContMDiffWithinAt I' I n f s a) (hg : ContMDiffWithinAt I' I n g s a) (h₀ : g a ≠ 0) :
315+
ContMDiffWithinAt I' I n (f / g) s a := by
316+
simpa [div_eq_mul_inv] using hf.mul (hg.inv₀ h₀)
317+
318+
theorem ContMDiffOn.div₀ (hf : ContMDiffOn I' I n f s) (hg : ContMDiffOn I' I n g s)
319+
(h₀ : ∀ x ∈ s, g x ≠ 0) : ContMDiffOn I' I n (f / g) s := by
320+
simpa [div_eq_mul_inv] using hf.mul (hg.inv₀ h₀)
321+
322+
theorem ContMDiffAt.div₀ (hf : ContMDiffAt I' I n f a) (hg : ContMDiffAt I' I n g a)
323+
(h₀ : g a ≠ 0) : ContMDiffAt I' I n (f / g) a := by
324+
simpa [div_eq_mul_inv] using hf.mul (hg.inv₀ h₀)
325+
326+
theorem ContMDiff.div₀ (hf : ContMDiff I' I n f) (hg : ContMDiff I' I n g) (h₀ : ∀ x, g x ≠ 0) :
327+
ContMDiff I' I n (f / g) := by simpa only [div_eq_mul_inv] using hf.mul (hg.inv₀ h₀)
328+
329+
theorem SmoothWithinAt.div₀ (hf : SmoothWithinAt I' I f s a)
330+
(hg : SmoothWithinAt I' I g s a) (h₀ : g a ≠ 0) : SmoothWithinAt I' I (f / g) s a :=
331+
ContMDiffWithinAt.div₀ hf hg h₀
332+
333+
theorem SmoothOn.div₀ (hf : SmoothOn I' I f s) (hg : SmoothOn I' I g s) (h₀ : ∀ x ∈ s, g x ≠ 0) :
334+
SmoothOn I' I (f / g) s :=
335+
ContMDiffOn.div₀ hf hg h₀
336+
337+
theorem SmoothAt.div₀ (hf : SmoothAt I' I f a) (hg : SmoothAt I' I g a) (h₀ : g a ≠ 0) :
338+
SmoothAt I' I (f / g) a :=
339+
ContMDiffAt.div₀ hf hg h₀
340+
341+
theorem Smooth.div₀ (hf : Smooth I' I f) (hg : Smooth I' I g) (h₀ : ∀ x, g x ≠ 0) :
342+
Smooth I' I (f / g) :=
343+
ContMDiff.div₀ hf hg h₀
344+
345+
end Div

Mathlib/Geometry/Manifold/Algebra/Monoid.lean

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -469,3 +469,53 @@ instance hasSmoothAddSelf : SmoothAdd 𝓘(𝕜, E) E :=
469469
#align has_smooth_add_self hasSmoothAddSelf
470470

471471
end
472+
473+
section DivConst
474+
475+
variable {𝕜 : Type _} [NontriviallyNormedField 𝕜] {H : Type _} [TopologicalSpace H] {E : Type _}
476+
[NormedAddCommGroup E] [NormedSpace 𝕜 E] {I : ModelWithCorners 𝕜 E H}
477+
{G : Type _} [DivInvMonoid G] [TopologicalSpace G] [ChartedSpace H G] [SmoothMul I G]
478+
{E' : Type _} [NormedAddCommGroup E']
479+
[NormedSpace 𝕜 E'] {H' : Type _} [TopologicalSpace H'] {I' : ModelWithCorners 𝕜 E' H'}
480+
{M : Type _} [TopologicalSpace M] [ChartedSpace H' M]
481+
482+
variable {f : M → G} {s : Set M} {x : M} {n : ℕ∞} (c : G)
483+
484+
@[to_additive]
485+
theorem ContMDiffWithinAt.div_const (hf : ContMDiffWithinAt I' I n f s x) :
486+
ContMDiffWithinAt I' I n (fun x ↦ f x / c) s x := by
487+
simpa only [div_eq_mul_inv] using hf.mul contMDiffWithinAt_const
488+
489+
@[to_additive]
490+
nonrec theorem ContMDiffAt.div_const (hf : ContMDiffAt I' I n f x) :
491+
ContMDiffAt I' I n (fun x ↦ f x / c) x :=
492+
hf.div_const c
493+
494+
@[to_additive]
495+
theorem ContMDiffOn.div_const (hf : ContMDiffOn I' I n f s) :
496+
ContMDiffOn I' I n (fun x ↦ f x / c) s := fun x hx => (hf x hx).div_const c
497+
498+
@[to_additive]
499+
theorem ContMDiff.div_const (hf : ContMDiff I' I n f) :
500+
ContMDiff I' I n (fun x ↦ f x / c) := fun x => (hf x).div_const c
501+
502+
@[to_additive]
503+
nonrec theorem SmoothWithinAt.div_const (hf : SmoothWithinAt I' I f s x) :
504+
SmoothWithinAt I' I (fun x ↦ f x / c) s x :=
505+
hf.div_const c
506+
507+
@[to_additive]
508+
nonrec theorem SmoothAt.div_const (hf : SmoothAt I' I f x) :
509+
SmoothAt I' I (fun x ↦ f x / c) x :=
510+
hf.div_const c
511+
512+
@[to_additive]
513+
nonrec theorem SmoothOn.div_const (hf : SmoothOn I' I f s) :
514+
SmoothOn I' I (fun x ↦ f x / c) s :=
515+
hf.div_const c
516+
517+
@[to_additive]
518+
nonrec theorem Smooth.div_const (hf : Smooth I' I f) : Smooth I' I (fun x ↦ f x / c) :=
519+
hf.div_const c
520+
521+
end DivConst

Mathlib/Geometry/Manifold/ContMDiff.lean

Lines changed: 28 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -238,33 +238,51 @@ def Smooth (f : M → M') :=
238238
ContMDiff I I' ⊤ f
239239
#align smooth Smooth
240240

241-
/-! ### Basic properties of smooth functions between manifolds -/
241+
variable {I I'}
242242

243+
/-! ### Deducing smoothness from higher smoothness -/
243244

244-
variable {I I'}
245+
theorem ContMDiffWithinAt.of_le (hf : ContMDiffWithinAt I I' n f s x) (le : m ≤ n) :
246+
ContMDiffWithinAt I I' m f s x :=
247+
⟨hf.1, hf.2.of_le le⟩
248+
#align cont_mdiff_within_at.of_le ContMDiffWithinAt.of_le
249+
250+
theorem ContMDiffAt.of_le (hf : ContMDiffAt I I' n f x) (le : m ≤ n) : ContMDiffAt I I' m f x :=
251+
ContMDiffWithinAt.of_le hf le
252+
#align cont_mdiff_at.of_le ContMDiffAt.of_le
253+
254+
theorem ContMDiffOn.of_le (hf : ContMDiffOn I I' n f s) (le : m ≤ n) : ContMDiffOn I I' m f s :=
255+
fun x hx => (hf x hx).of_le le
256+
#align cont_mdiff_on.of_le ContMDiffOn.of_le
257+
258+
theorem ContMDiff.of_le (hf : ContMDiff I I' n f) (le : m ≤ n) : ContMDiff I I' m f := fun x =>
259+
(hf x).of_le le
260+
#align cont_mdiff.of_le ContMDiff.of_le
261+
262+
/-! ### Basic properties of smooth functions between manifolds -/
245263

246264
theorem ContMDiff.smooth (h : ContMDiff I I' ⊤ f) : Smooth I I' f :=
247265
h
248266
#align cont_mdiff.smooth ContMDiff.smooth
249267

250-
theorem Smooth.contMDiff (h : Smooth I I' f) : ContMDiff I I' f :=
251-
h
268+
theorem Smooth.contMDiff (h : Smooth I I' f) : ContMDiff I I' n f :=
269+
h.of_le le_top
252270
#align smooth.cont_mdiff Smooth.contMDiff
253271

254272
theorem ContMDiffOn.smoothOn (h : ContMDiffOn I I' ⊤ f s) : SmoothOn I I' f s :=
255273
h
256274
#align cont_mdiff_on.smooth_on ContMDiffOn.smoothOn
257275

258-
theorem SmoothOn.contMDiffOn (h : SmoothOn I I' f s) : ContMDiffOn I I' f s :=
259-
h
276+
theorem SmoothOn.contMDiffOn (h : SmoothOn I I' f s) : ContMDiffOn I I' n f s :=
277+
h.of_le le_top
260278
#align smooth_on.cont_mdiff_on SmoothOn.contMDiffOn
261279

262280
theorem ContMDiffAt.smoothAt (h : ContMDiffAt I I' ⊤ f x) : SmoothAt I I' f x :=
263281
h
264282
#align cont_mdiff_at.smooth_at ContMDiffAt.smoothAt
265283

266-
theorem SmoothAt.contMDiffAt (h : SmoothAt I I' f x) : ContMDiffAt I I' f x :=
267-
h
284+
theorem SmoothAt.contMDiffAt (h : SmoothAt I I' f x) : ContMDiffAt I I' n f x :=
285+
h.of_le le_top
268286
#align smooth_at.cont_mdiff_at SmoothAt.contMDiffAt
269287

270288
theorem ContMDiffWithinAt.smoothWithinAt (h : ContMDiffWithinAt I I' ⊤ f s x) :
@@ -273,8 +291,8 @@ theorem ContMDiffWithinAt.smoothWithinAt (h : ContMDiffWithinAt I I' ⊤ f s x)
273291
#align cont_mdiff_within_at.smooth_within_at ContMDiffWithinAt.smoothWithinAt
274292

275293
theorem SmoothWithinAt.contMDiffWithinAt (h : SmoothWithinAt I I' f s x) :
276-
ContMDiffWithinAt I I' f s x :=
277-
h
294+
ContMDiffWithinAt I I' n f s x :=
295+
h.of_le le_top
278296
#align smooth_within_at.cont_mdiff_within_at SmoothWithinAt.contMDiffWithinAt
279297

280298
theorem ContMDiff.contMDiffAt (h : ContMDiff I I' n f) : ContMDiffAt I I' n f x :=
@@ -629,25 +647,6 @@ theorem smooth_iff_target :
629647
contMDiff_iff_target
630648
#align smooth_iff_target smooth_iff_target
631649

632-
/-! ### Deducing smoothness from higher smoothness -/
633-
634-
theorem ContMDiffWithinAt.of_le (hf : ContMDiffWithinAt I I' n f s x) (le : m ≤ n) :
635-
ContMDiffWithinAt I I' m f s x :=
636-
⟨hf.1, hf.2.of_le le⟩
637-
#align cont_mdiff_within_at.of_le ContMDiffWithinAt.of_le
638-
639-
theorem ContMDiffAt.of_le (hf : ContMDiffAt I I' n f x) (le : m ≤ n) : ContMDiffAt I I' m f x :=
640-
ContMDiffWithinAt.of_le hf le
641-
#align cont_mdiff_at.of_le ContMDiffAt.of_le
642-
643-
theorem ContMDiffOn.of_le (hf : ContMDiffOn I I' n f s) (le : m ≤ n) : ContMDiffOn I I' m f s :=
644-
fun x hx => (hf x hx).of_le le
645-
#align cont_mdiff_on.of_le ContMDiffOn.of_le
646-
647-
theorem ContMDiff.of_le (hf : ContMDiff I I' n f) (le : m ≤ n) : ContMDiff I I' m f := fun x =>
648-
(hf x).of_le le
649-
#align cont_mdiff.of_le ContMDiff.of_le
650-
651650
/-! ### Deducing smoothness from smoothness one step beyond -/
652651

653652

@@ -2178,4 +2177,3 @@ theorem isLocalStructomorphOn_contDiffGroupoid_iff (f : LocalHomeomorph M M') :
21782177
#align is_local_structomorph_on_cont_diff_groupoid_iff isLocalStructomorphOn_contDiffGroupoid_iff
21792178

21802179
end
2181-

0 commit comments

Comments
 (0)