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

Commit 40e97d3

Browse files
committed
feat(topology/algebra/module): ker, range, cod_restrict, subtype_val, coprod (#2525)
Also move `smul_right` to `general_ring` and define some maps/equivalences useful for the inverse/implicit function theorem.
1 parent 11ccc1b commit 40e97d3

File tree

2 files changed

+188
-22
lines changed

2 files changed

+188
-22
lines changed

src/algebra/group/units.lean

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,8 @@ variables [monoid α]
3939

4040
@[to_additive] instance : has_coe (units α) α := ⟨val⟩
4141

42+
@[simp, to_additive] lemma coe_mk (a : α) (b h₁ h₂) : ↑(units.mk a b h₁ h₂) = a := rfl
43+
4244
@[ext, to_additive] theorem ext :
4345
function.injective (coe : units α → α)
4446
| ⟨v, i₁, vi₁, iv₁⟩ ⟨v', i₂, vi₂, iv₂⟩ e :=

src/topology/algebra/module.lean

Lines changed: 186 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
/-
22
Copyright (c) 2019 Sébastien Gouëzel. All rights reserved.
33
Released under Apache 2.0 license as described in the file LICENSE.
4-
Authors: Jan-David Salchow, Sébastien Gouëzel, Jean Lo
5-
4+
Authors: Jan-David Salchow, Sébastien Gouëzel, Jean Lo, Yury Kudryashov
65
-/
76
import topology.algebra.ring
87
import ring_theory.algebra
@@ -173,6 +172,7 @@ notation M ` →L[`:25 R `] ` M₂ := continuous_linear_map R M M₂
173172
/-- Continuous linear equivalences between modules. We only put the type classes that are necessary
174173
for the definition, although in applications `M` and `M₂` will be topological modules over the
175174
topological ring `R`. -/
175+
@[nolint has_inhabited_instance]
176176
structure continuous_linear_equiv
177177
(R : Type*) [ring R]
178178
(M : Type*) [topological_space M] [add_comm_group M]
@@ -339,6 +339,51 @@ rfl
339339
f₁.prod f₂ x = (f₁ x, f₂ x) :=
340340
rfl
341341

342+
/-- Kernel of a continuous linear map. -/
343+
def ker (f : M →L[R] M₂) : submodule R M := (f : M →ₗ[R] M₂).ker
344+
345+
@[norm_cast] lemma ker_coe : (f : M →ₗ[R] M₂).ker = f.ker := rfl
346+
347+
@[simp] lemma mem_ker {f : M →L[R] M₂} {x} : x ∈ f.ker ↔ f x = 0 := linear_map.mem_ker
348+
349+
lemma is_closed_ker [t1_space M₂] : is_closed (f.ker : set M) :=
350+
continuous_iff_is_closed.1 f.cont _ is_closed_singleton
351+
352+
@[simp] lemma apply_ker (x : f.ker) : f x = 0 := mem_ker.1 x.2
353+
354+
/-- Range of a continuous linear map. -/
355+
def range (f : M →L[R] M₂) : submodule R M₂ := (f : M →ₗ[R] M₂).range
356+
357+
lemma range_coe : (f.range : set M₂) = set.range f := linear_map.range_coe _
358+
lemma mem_range {f : M →L[R] M₂} {y} : y ∈ f.range ↔ ∃ x, f x = y := linear_map.mem_range
359+
360+
/-- Restrict codomain of a continuous linear map. -/
361+
def cod_restrict (f : M →L[R] M₂) (p : submodule R M₂) (h : ∀ x, f x ∈ p) :
362+
M →L[R] p :=
363+
{ cont := continuous_subtype_mk h f.continuous,
364+
to_linear_map := (f : M →ₗ[R] M₂).cod_restrict p h}
365+
366+
@[norm_cast] lemma coe_cod_restrict (f : M →L[R] M₂) (p : submodule R M₂) (h : ∀ x, f x ∈ p) :
367+
(f.cod_restrict p h : M →ₗ[R] p) = (f : M →ₗ[R] M₂).cod_restrict p h :=
368+
rfl
369+
370+
@[simp] lemma coe_cod_restrict_apply (f : M →L[R] M₂) (p : submodule R M₂) (h : ∀ x, f x ∈ p) (x) :
371+
(f.cod_restrict p h x : M₂) = f x :=
372+
rfl
373+
374+
/-- Embedding of a submodule into the ambient space as a continuous linear map. -/
375+
def subtype_val (p : submodule R M) : p →L[R] M :=
376+
{ cont := continuous_subtype_val,
377+
to_linear_map := p.subtype }
378+
379+
@[simp, norm_cast] lemma coe_subtype_val (p : submodule R M) :
380+
(subtype_val p : p →ₗ[R] M) = p.subtype :=
381+
rfl
382+
383+
@[simp, norm_cast] lemma subtype_val_apply (p : submodule R M) (x : p) :
384+
(subtype_val p : p → M) x = x :=
385+
rfl
386+
342387
variables (R M M₂)
343388

344389
/-- `prod.fst` as a `continuous_linear_map`. -/
@@ -367,35 +412,46 @@ def prod_map (f₁ : M →L[R] M₂) (f₂ : M₃ →L[R] M₄) : (M × M₃)
367412
(f₁.prod_map f₂ : (M × M₃) →ₗ[R] (M₂ × M₄)) = ((f₁ : M →ₗ[R] M₂).prod_map (f₂ : M₃ →ₗ[R] M₄)) :=
368413
rfl
369414

370-
@[simp, norm_cast] lemma prod_map_apply (f₁ : M →L[R] M₂) (f₂ : M₃ →L[R] M₄) (x) :
371-
f₁.prod_map f₂ x = (f₁ x.1, f₂ x.2) :=
415+
@[simp, norm_cast] lemma coe_prod_map' (f₁ : M →L[R] M₂) (f₂ : M₃ →L[R] M₄) :
416+
⇑(f₁.prod_map f₂) = prod.map f₁ f₂ :=
372417
rfl
373418

374-
end general_ring
419+
/-- The continuous linear map given by `(x, y) ↦ f₁ x + f₂ y`. -/
420+
def coprod [topological_add_monoid M₃] (f₁ : M →L[R] M₃) (f₂ : M₂ →L[R] M₃) :
421+
(M × M₂) →L[R] M₃ :=
422+
⟨linear_map.coprod f₁ f₂, (f₁.cont.comp continuous_fst).add (f₂.cont.comp continuous_snd)⟩
375423

376-
section comm_ring
377-
378-
variables
379-
{R : Type*} [comm_ring R] [topological_space R]
380-
{M : Type*} [topological_space M] [add_comm_group M]
381-
{M₂ : Type*} [topological_space M₂] [add_comm_group M₂]
382-
{M₃ : Type*} [topological_space M₃] [add_comm_group M₃]
383-
[module R M] [module R M₂] [module R M₃] [topological_module R M₃]
424+
@[norm_cast, simp] lemma coe_coprod [topological_add_monoid M₃]
425+
(f₁ : M →L[R] M₃) (f₂ : M₂ →L[R] M₃) :
426+
(f₁.coprod f₂ : (M × M₂) →ₗ[R] M₃) = linear_map.coprod f₁ f₂ :=
427+
rfl
384428

385-
instance : has_scalar R (M →L[R] M₃) :=
386-
⟨λ c f, ⟨c • f, continuous_const.smul f.2⟩⟩
429+
@[simp] lemma coprod_apply [topological_add_monoid M₃] (f₁ : M →L[R] M₃) (f₂ : M₂ →L[R] M₃) (x) :
430+
f₁.coprod f₂ x = f₁ x.1 + f₂ x.2 := rfl
387431

388-
variables (c : R) (h : M₂ →L[R] M₃) (f g : M →L[R] M₂) (x y z : M)
432+
/-- Given a right inverse `f₂ : M₂ →L[R] M` to `f₁ : M →L[R] M₂`,
433+
`proj_ker_of_right_inverse f₁ f₂ h` is the projection `M →L[R] f₁.ker` along `f₂.range`. -/
434+
def proj_ker_of_right_inverse [topological_add_group M] (f₁ : M →L[R] M₂) (f₂ : M₂ →L[R] M)
435+
(h : function.right_inverse f₂ f₁) :
436+
M →L[R] f₁.ker :=
437+
(id R M - f₂.comp f₁).cod_restrict f₁.ker $ λ x, by simp [h (f₁ x)]
389438

390-
@[simp] lemma smul_comp : (c • h).comp f = c • (h.comp f) := rfl
439+
@[simp] lemma coe_proj_ker_of_right_inverse_apply [topological_add_group M]
440+
(f₁ : M →L[R] M₂) (f₂ : M₂ →L[R] M) (h : function.right_inverse f₂ f₁) (x : M) :
441+
(f₁.proj_ker_of_right_inverse f₂ h x : M) = x - f₂ (f₁ x) :=
442+
rfl
391443

392-
variable [topological_module R M₂]
444+
@[simp] lemma proj_ker_of_right_inverse_apply_idem [topological_add_group M]
445+
(f₁ : M →L[R] M₂) (f₂ : M₂ →L[R] M) (h : function.right_inverse f₂ f₁) (x : f₁.ker) :
446+
f₁.proj_ker_of_right_inverse f₂ h x = x :=
447+
subtype.coe_ext.2 $ by simp
393448

394-
@[simp] lemma smul_apply : (c • f) x = c • (f x) := rfl
395-
@[simp, norm_cast] lemma coe_apply : (((c • f) : M →L[R] M₂) : M →ₗ[R] M₂) = c • (f : M →ₗ[R] M₂) := rfl
396-
@[norm_cast] lemma coe_apply' : (((c • f) : M →L[R] M₂) : M → M₂) = c • (f : M → M₂) := rfl
449+
@[simp] lemma proj_ker_of_right_inverse_comp_inv [topological_add_group M]
450+
(f₁ : M →L[R] M₂) (f₂ : M₂ →L[R] M) (h : function.right_inverse f₂ f₁) (y : M₂) :
451+
f₁.proj_ker_of_right_inverse f₂ h (f₂ y) = 0 :=
452+
subtype.coe_ext.2 $ by simp [h y]
397453

398-
@[simp] lemma comp_smul : h.comp (c • f) = c • (h.comp f) := by { ext, simp }
454+
variables [topological_space R] [topological_module R M₂]
399455

400456
/-- The linear map `λ x, c x • f`. Associates to a scalar-valued linear map and an element of
401457
`M₂` the `M₂`-valued linear map obtained by multiplying the two (a.k.a. tensoring by `M₂`) -/
@@ -420,6 +476,36 @@ lemma smul_right_one_eq_iff {f f' : M₂} :
420476
by simp at this; assumption,
421477
by cc⟩
422478

479+
lemma smul_right_comp [topological_module R R] {x : M₂} {c : R} :
480+
(smul_right 1 x : R →L[R] M₂).comp (smul_right 1 c : R →L[R] R) = smul_right 1 (c • x) :=
481+
by { ext, simp [mul_smul] }
482+
483+
end general_ring
484+
485+
section comm_ring
486+
487+
variables
488+
{R : Type*} [comm_ring R] [topological_space R]
489+
{M : Type*} [topological_space M] [add_comm_group M]
490+
{M₂ : Type*} [topological_space M₂] [add_comm_group M₂]
491+
{M₃ : Type*} [topological_space M₃] [add_comm_group M₃]
492+
[module R M] [module R M₂] [module R M₃] [topological_module R M₃]
493+
494+
instance : has_scalar R (M →L[R] M₃) :=
495+
⟨λ c f, ⟨c • f, continuous_const.smul f.2⟩⟩
496+
497+
variables (c : R) (h : M₂ →L[R] M₃) (f g : M →L[R] M₂) (x y z : M)
498+
499+
@[simp] lemma smul_comp : (c • h).comp f = c • (h.comp f) := rfl
500+
501+
variable [topological_module R M₂]
502+
503+
@[simp] lemma smul_apply : (c • f) x = c • (f x) := rfl
504+
@[simp, norm_cast] lemma coe_apply : (((c • f) : M →L[R] M₂) : M →ₗ[R] M₂) = c • (f : M →ₗ[R] M₂) := rfl
505+
@[norm_cast] lemma coe_apply' : (((c • f) : M →L[R] M₂) : M → M₂) = c • (f : M → M₂) := rfl
506+
507+
@[simp] lemma comp_smul : h.comp (c • f) = c • (h.comp f) := by { ext, simp }
508+
423509
variable [topological_add_group M₂]
424510

425511
instance : module R (M →L[R] M₂) :=
@@ -518,6 +604,10 @@ lemma comp_continuous_iff
518604
continuous (e ∘ f) ↔ continuous f :=
519605
e.to_homeomorph.comp_continuous_iff _
520606

607+
/-- An extensionality lemma for `R ≃L[R] M`. -/
608+
lemma ext₁ [topological_space R] {f g : R ≃L[R] M} (h : f 1 = g 1) : f = g :=
609+
ext $ funext $ λ x, mul_one x ▸ by rw [← smul_eq_mul, map_smul, h, map_smul]
610+
521611
section
522612
variables (R M)
523613

@@ -623,4 +713,78 @@ by { ext x, refl }
623713
@[simp] theorem symm_symm_apply (e : M ≃L[R] M₂) (x : M) : e.symm.symm x = e x :=
624714
rfl
625715

716+
/-- Create a `continuous_linear_equiv` from two `continuous_linear_map`s that are
717+
inverse of each other. -/
718+
def equiv_of_inverse (f₁ : M →L[R] M₂) (f₂ : M₂ →L[R] M) (h₁ : function.left_inverse f₂ f₁)
719+
(h₂ : function.right_inverse f₂ f₁) :
720+
M ≃L[R] M₂ :=
721+
{ to_fun := f₁,
722+
continuous_to_fun := f₁.continuous,
723+
inv_fun := f₂,
724+
continuous_inv_fun := f₂.continuous,
725+
left_inv := h₁,
726+
right_inv := h₂,
727+
.. f₁ }
728+
729+
@[simp] lemma equiv_of_inverse_apply (f₁ : M →L[R] M₂) (f₂ h₁ h₂ x) :
730+
equiv_of_inverse f₁ f₂ h₁ h₂ x = f₁ x :=
731+
rfl
732+
733+
@[simp] lemma symm_equiv_of_inverse (f₁ : M →L[R] M₂) (f₂ h₁ h₂) :
734+
(equiv_of_inverse f₁ f₂ h₁ h₂).symm = equiv_of_inverse f₂ f₁ h₂ h₁ :=
735+
rfl
736+
737+
section
738+
variables (R) [topological_space R] [topological_module R R]
739+
740+
/-- Continuous linear equivalences `R ≃L[R] R` are enumerated by `units R`. -/
741+
def units_equiv_aut : units R ≃ (R ≃L[R] R) :=
742+
{ to_fun := λ u, equiv_of_inverse
743+
(continuous_linear_map.smul_right 1 ↑u)
744+
(continuous_linear_map.smul_right 1 ↑u⁻¹)
745+
(λ x, by simp) (λ x, by simp),
746+
inv_fun := λ e, ⟨e 1, e.symm 1,
747+
by rw [← smul_eq_mul, ← map_smul, smul_eq_mul, mul_one, symm_apply_apply],
748+
by rw [← smul_eq_mul, ← map_smul, smul_eq_mul, mul_one, apply_symm_apply]⟩,
749+
left_inv := λ u, units.ext $ by simp,
750+
right_inv := λ e, ext₁ $ by simp }
751+
752+
variable {R}
753+
754+
@[simp] lemma units_equiv_aut_apply (u : units R) (x : R) : units_equiv_aut R u x = x * u := rfl
755+
756+
@[simp] lemma units_equiv_aut_apply_symm (u : units R) (x : R) :
757+
(units_equiv_aut R u).symm x = x * ↑u⁻¹ := rfl
758+
759+
@[simp] lemma units_equiv_aut_symm_apply (e : R ≃L[R] R) :
760+
↑((units_equiv_aut R).symm e) = e 1 :=
761+
rfl
762+
763+
end
764+
765+
variables [topological_add_group M]
766+
767+
open continuous_linear_map (id fst snd subtype_val mem_ker)
768+
769+
/-- A pair of continuous linear maps such that `f₁ ∘ f₂ = id` generates a continuous
770+
linear equivalence `e` between `M` and `M₂ × f₁.ker` such that `(e x).2 = x` for `x ∈ f₁.ker`,
771+
`(e x).1 = f₁ x`, and `(e (f₂ y)).2 = 0`. The map is given by `e x = (f₁ x, x - f₂ (f₁ x))`. -/
772+
def equiv_of_right_inverse (f₁ : M →L[R] M₂) (f₂ : M₂ →L[R] M) (h : function.right_inverse f₂ f₁) :
773+
M ≃L[R] M₂ × f₁.ker :=
774+
equiv_of_inverse (f₁.prod (f₁.proj_ker_of_right_inverse f₂ h)) (f₂.coprod (subtype_val f₁.ker))
775+
(λ x, by simp)
776+
(λ ⟨x, y⟩, by simp [h x])
777+
778+
@[simp] lemma fst_equiv_of_right_inverse (f₁ : M →L[R] M₂) (f₂ : M₂ →L[R] M)
779+
(h : function.right_inverse f₂ f₁) (x : M) :
780+
(equiv_of_right_inverse f₁ f₂ h x).1 = f₁ x := rfl
781+
782+
@[simp] lemma snd_equiv_of_right_inverse (f₁ : M →L[R] M₂) (f₂ : M₂ →L[R] M)
783+
(h : function.right_inverse f₂ f₁) (x : M) :
784+
((equiv_of_right_inverse f₁ f₂ h x).2 : M) = x - f₂ (f₁ x) := rfl
785+
786+
@[simp] lemma equiv_of_right_inverse_symm_apply (f₁ : M →L[R] M₂) (f₂ : M₂ →L[R] M)
787+
(h : function.right_inverse f₂ f₁) (y : M₂ × f₁.ker) :
788+
(equiv_of_right_inverse f₁ f₂ h).symm y = f₂ y.1 + y.2 := rfl
789+
626790
end continuous_linear_equiv

0 commit comments

Comments
 (0)