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

Commit 5a6c893

Browse files
committed
feat(topology/algebra/module): 2 new ext lemmas (#6211)
Add ext lemmas for maps `f : M × M₂ →L[R] M₃` and `f : R →L[R] M`.
1 parent c94577a commit 5a6c893

File tree

3 files changed

+58
-26
lines changed

3 files changed

+58
-26
lines changed

src/analysis/normed_space/bounded_linear_maps.lean

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -398,14 +398,12 @@ variables {𝕜}
398398
lemma is_bounded_bilinear_map.is_bounded_linear_map_deriv (h : is_bounded_bilinear_map 𝕜 f) :
399399
is_bounded_linear_map 𝕜 (λp : E × F, h.deriv p) :=
400400
begin
401-
rcases h.bound with ⟨C, Cpos, hC⟩,
401+
rcases h.bound with ⟨C, Cpos : 0 < C, hC⟩,
402402
refine is_linear_map.with_bound ⟨λp₁ p₂, _, λc p, _⟩ (C + C) (λp, _),
403-
{ ext q,
404-
simp [h.add_left, h.add_right], abel },
405-
{ ext q,
406-
simp [h.smul_left, h.smul_right, smul_add] },
403+
{ ext; simp [h.add_left, h.add_right]; abel },
404+
{ ext; simp [h.smul_left, h.smul_right, smul_add] },
407405
{ refine continuous_linear_map.op_norm_le_bound _
408-
(mul_nonneg (add_nonneg (le_of_lt Cpos) (le_of_lt Cpos)) (norm_nonneg _)) (λq, _),
406+
(mul_nonneg (add_nonneg Cpos.le Cpos.le) (norm_nonneg _)) (λq, _),
409407
calc ∥f (p.1, q.2) + f (q.1, p.2)∥
410408
≤ C * ∥p.1∥ * ∥q.2∥ + C * ∥q.1∥ * ∥p.2∥ : norm_add_le_of_le (hC _ _) (hC _ _)
411409
... ≤ C * ∥p∥ * ∥q∥ + C * ∥q∥ * ∥p∥ : by apply_rules [add_le_add, mul_le_mul, norm_nonneg,

src/linear_algebra/prod.lean

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -95,16 +95,20 @@ section
9595
variables (R M M₂)
9696

9797
/-- The left injection into a product is a linear map. -/
98-
def inl : M →ₗ[R] M × M₂ := by refine ⟨add_monoid_hom.inl _ _, _, _⟩; intros; simp
98+
def inl : M →ₗ[R] M × M₂ := prod linear_map.id 0
9999

100100
/-- The right injection into a product is a linear map. -/
101-
def inr : M₂ →ₗ[R] M × M₂ := by refine ⟨add_monoid_hom.inr _ _, _, _⟩; intros; simp
101+
def inr : M₂ →ₗ[R] M × M₂ := prod 0 linear_map.id
102102

103103
end
104104

105105
@[simp] theorem inl_apply (x : M) : inl R M M₂ x = (x, 0) := rfl
106106
@[simp] theorem inr_apply (x : M₂) : inr R M M₂ x = (0, x) := rfl
107107

108+
theorem inl_eq_prod : inl R M M₂ = prod linear_map.id 0 := rfl
109+
110+
theorem inr_eq_prod : inr R M M₂ = prod 0 linear_map.id := rfl
111+
108112
theorem inl_injective : function.injective (inl R M M₂) :=
109113
λ _, by simp
110114

@@ -138,10 +142,6 @@ theorem fst_eq_coprod : fst R M M₂ = coprod linear_map.id 0 := by ext; simp
138142

139143
theorem snd_eq_coprod : snd R M M₂ = coprod 0 linear_map.id := by ext; simp
140144

141-
theorem inl_eq_prod : inl R M M₂ = prod linear_map.id 0 := rfl
142-
143-
theorem inr_eq_prod : inr R M M₂ = prod 0 linear_map.id := rfl
144-
145145
/-- Taking the product of two maps with the same codomain is equivalent to taking the product of
146146
their domains. -/
147147
@[simps] def coprod_equiv [semimodule S M₃] [smul_comm_class R S M₃] :
@@ -155,6 +155,10 @@ their domains. -/
155155
map_smul' := λ r a,
156156
by { ext, simp only [smul_add, smul_apply, prod.smul_snd, prod.smul_fst, coprod_apply] } }
157157

158+
theorem prod_ext_iff {f g : M × M₂ →ₗ[R] M₃} :
159+
f = g ↔ f.comp (inl _ _ _) = g.comp (inl _ _ _) ∧ f.comp (inr _ _ _) = g.comp (inr _ _ _) :=
160+
(coprod_equiv ℕ).symm.injective.eq_iff.symm.trans prod.ext_iff
161+
158162
/--
159163
Split equality of linear maps from a product into linear maps over each component, to allow `ext`
160164
to apply lemmas specific to `M →ₗ M₃` and `M₂ →ₗ M₃`.
@@ -164,10 +168,7 @@ See note [partially-applied ext lemmas]. -/
164168
(hl : f.comp (inl _ _ _) = g.comp (inl _ _ _))
165169
(hr : f.comp (inr _ _ _) = g.comp (inr _ _ _)) :
166170
f = g :=
167-
begin
168-
refine (coprod_equiv ℕ).symm.injective _,
169-
simp only [coprod_equiv_symm_apply, hl, hr],
170-
end
171+
prod_ext_iff.2 ⟨hl, hr⟩
171172

172173
/-- `prod.map` of two linear maps. -/
173174
def prod_map (f : M →ₗ[R] M₃) (g : M₂ →ₗ[R] M₄) : (M × M₂) →ₗ[R] (M₃ × M₄) :=

src/topology/algebra/module.lean

Lines changed: 43 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -309,6 +309,12 @@ lemma map_sum {ι : Type*} (s : finset ι) (g : ι → M) :
309309

310310
@[simp, norm_cast] lemma coe_coe : ((f : M →ₗ[R] M₂) : (M → M₂)) = (f : M → M₂) := rfl
311311

312+
@[ext] theorem ext_ring [topological_space R] {f g : R →L[R] M} (h : f 1 = g 1) : f = g :=
313+
coe_inj.1 $ linear_map.ext_ring h
314+
315+
theorem ext_ring_iff [topological_space R] {f g : R →L[R] M} : f = g ↔ f 1 = g 1 :=
316+
⟨λ h, h ▸ rfl, ext_ring⟩
317+
312318
/-- If two continuous linear maps are equal on a set `s`, then they are equal on the closure
313319
of the `submodule.span` of this set. -/
314320
lemma eq_on_closure_span [t2_space M₂] {s : set M} {f g : M →L[R] M₂} (h : set.eq_on f g s) :
@@ -440,6 +446,24 @@ rfl
440446
f₁.prod f₂ x = (f₁ x, f₂ x) :=
441447
rfl
442448

449+
section
450+
451+
variables (R M M₂)
452+
453+
/-- The left injection into a product is a continuous linear map. -/
454+
def inl : M →L[R] M × M₂ := (id R M).prod 0
455+
456+
/-- The right injection into a product is a continuous linear map. -/
457+
def inr : M₂ →L[R] M × M₂ := (0 : M₂ →L[R] M).prod (id R M₂)
458+
459+
end
460+
461+
@[simp] lemma inl_apply (x : M) : inl R M M₂ x = (x, 0) := rfl
462+
@[simp] lemma inr_apply (x : M₂) : inr R M M₂ x = (0, x) := rfl
463+
464+
@[simp, norm_cast] lemma coe_inl : (inl R M M₂ : M →ₗ[R] M × M₂) = linear_map.inl R M M₂ := rfl
465+
@[simp, norm_cast] lemma coe_inr : (inr R M M₂ : M₂ →ₗ[R] M × M₂) = linear_map.inr R M M₂ := rfl
466+
443467
instance [topological_space R] [topological_semimodule R M] [topological_semimodule R M₂] :
444468
topological_semimodule R (M × M₂) :=
445469
⟨(continuous_fst.smul (continuous_fst.comp continuous_snd)).prod_mk
@@ -595,10 +619,7 @@ by ext; simp [← continuous_linear_map.map_smul_of_tower]
595619
@[simp]
596620
lemma smul_right_one_eq_iff {f f' : M₂} :
597621
smul_right (1 : R →L[R] R) f = smul_right (1 : R →L[R] R) f' ↔ f = f' :=
598-
⟨λ h, have (smul_right (1 : R →L[R] R) f : R → M₂) 1 = (smul_right (1 : R →L[R] R) f' : R → M₂) 1,
599-
by rw h,
600-
by simp at this; assumption,
601-
λ h, by rw h⟩
622+
by simp only [ext_ring_iff, smul_right_apply, one_apply, one_smul]
602623

603624
lemma smul_right_comp [topological_semimodule R R] {x : M₂} {c : R} :
604625
(smul_right (1 : R →L[R] R) x).comp (smul_right (1 : R →L[R] R) c) =
@@ -772,6 +793,21 @@ lemma smul_apply : (c • f) x = c • (f x) := rfl
772793
@[simp] lemma comp_smul [linear_map.compatible_smul M₂ M₃ S R] : h.comp (c • f) = c • (h.comp f) :=
773794
by { ext x, exact h.map_smul_of_tower c (f x) }
774795

796+
/-- `continuous_linear_map.prod` as an `equiv`. -/
797+
@[simps apply] def prod_equiv : ((M →L[R] M₂) × (M →L[R] M₃)) ≃ (M →L[R] M₂ × M₃) :=
798+
{ to_fun := λ f, f.1.prod f.2,
799+
inv_fun := λ f, ⟨(fst _ _ _).comp f, (snd _ _ _).comp f⟩,
800+
left_inv := λ f, by ext; refl,
801+
right_inv := λ f, by ext; refl }
802+
803+
lemma prod_ext_iff {f g : M × M₂ →L[R] M₃} :
804+
f = g ↔ f.comp (inl _ _ _) = g.comp (inl _ _ _) ∧ f.comp (inr _ _ _) = g.comp (inr _ _ _) :=
805+
by { simp only [← coe_inj, linear_map.prod_ext_iff], refl }
806+
807+
@[ext] lemma prod_ext {f g : M × M₂ →L[R] M₃} (hl : f.comp (inl _ _ _) = g.comp (inl _ _ _))
808+
(hr : f.comp (inr _ _ _) = g.comp (inr _ _ _)) : f = g :=
809+
prod_ext_iff.2 ⟨hl, hr⟩
810+
775811
variables [has_continuous_add M₂]
776812

777813
instance : semimodule S (M →L[R] M₂) :=
@@ -785,13 +821,10 @@ instance : semimodule S (M →L[R] M₂) :=
785821
variables (S) [has_continuous_add M₃]
786822

787823
/-- `continuous_linear_map.prod` as a `linear_equiv`. -/
788-
def prodₗ : ((M →L[R] M₂) × (M →L[R] M₃)) ≃ₗ[S] (M →L[R] M₂ × M₃) :=
789-
{ to_fun := λ f, f.1.prod f.2,
790-
inv_fun := λ f, ⟨(fst _ _ _).comp f, (snd _ _ _).comp f⟩,
791-
map_add' := λ f g, rfl,
824+
@[simps apply] def prodₗ : ((M →L[R] M₂) × (M →L[R] M₃)) ≃ₗ[S] (M →L[R] M₂ × M₃) :=
825+
{ map_add' := λ f g, rfl,
792826
map_smul' := λ c f, rfl,
793-
left_inv := λ f, by ext; refl,
794-
right_inv := λ f, by ext; refl }
827+
.. prod_equiv }
795828

796829
end smul
797830

0 commit comments

Comments
 (0)