Context stringlengths 57 6.04k | file_name stringlengths 21 79 | start int64 14 1.49k | end int64 18 1.5k | theorem stringlengths 25 1.55k | proof stringlengths 5 7.36k | rank int64 0 2.4k |
|---|---|---|---|---|---|---|
import Mathlib.Algebra.CharP.Invertible
import Mathlib.Analysis.NormedSpace.LinearIsometry
import Mathlib.Analysis.Normed.Group.AddTorsor
import Mathlib.Analysis.NormedSpace.Basic
import Mathlib.LinearAlgebra.AffineSpace.Restrict
import Mathlib.Tactic.FailIfNoProgress
#align_import analysis.normed_space.affine_isometry from "leanprover-community/mathlib"@"f0c8bf9245297a541f468be517f1bde6195105e9"
open Function Set
variable (π : Type*) {V Vβ Vβ' Vβ Vβ Vβ : Type*} {Pβ Pβ' : Type*} (P Pβ : Type*) {Pβ Pβ : Type*}
[NormedField π]
[SeminormedAddCommGroup V] [NormedSpace π V] [PseudoMetricSpace P] [NormedAddTorsor V P]
[SeminormedAddCommGroup Vβ] [NormedSpace π Vβ] [PseudoMetricSpace Pβ] [NormedAddTorsor Vβ Pβ]
[SeminormedAddCommGroup Vβ'] [NormedSpace π Vβ'] [MetricSpace Pβ'] [NormedAddTorsor Vβ' Pβ']
[SeminormedAddCommGroup Vβ] [NormedSpace π Vβ] [PseudoMetricSpace Pβ] [NormedAddTorsor Vβ Pβ]
[SeminormedAddCommGroup Vβ] [NormedSpace π Vβ] [PseudoMetricSpace Pβ] [NormedAddTorsor Vβ Pβ]
[SeminormedAddCommGroup Vβ] [NormedSpace π Vβ] [PseudoMetricSpace Pβ] [NormedAddTorsor Vβ Pβ]
structure AffineIsometry extends P βα΅[π] Pβ where
norm_map : β x : V, βlinear xβ = βxβ
#align affine_isometry AffineIsometry
variable {π P Pβ}
@[inherit_doc]
notation:25 -- `βα΅α΅’` would be more consistent with the linear isometry notation, but it is uglier
P " βα΅β±[" π:25 "] " Pβ:0 => AffineIsometry π P Pβ
variable (π P Pβ)
structure AffineIsometryEquiv extends P βα΅[π] Pβ where
norm_map : β x, βlinear xβ = βxβ
#align affine_isometry_equiv AffineIsometryEquiv
variable {π P Pβ}
-- `βα΅α΅’` would be more consistent with the linear isometry equiv notation, but it is uglier
notation:25 P " βα΅β±[" π:25 "] " Pβ:0 => AffineIsometryEquiv π P Pβ
namespace AffineIsometryEquiv
variable (e : P βα΅β±[π] Pβ)
protected def linearIsometryEquiv : V ββα΅’[π] Vβ :=
{ e.linear with norm_map' := e.norm_map }
#align affine_isometry_equiv.linear_isometry_equiv AffineIsometryEquiv.linearIsometryEquiv
@[simp]
| Mathlib/Analysis/NormedSpace/AffineIsometry.lean | 329 | 331 | theorem linear_eq_linear_isometry : e.linear = e.linearIsometryEquiv.toLinearEquiv := by |
ext
rfl
| 1,634 |
import Mathlib.Topology.Instances.RealVectorSpace
import Mathlib.Analysis.NormedSpace.AffineIsometry
#align_import analysis.normed_space.mazur_ulam from "leanprover-community/mathlib"@"78261225eb5cedc61c5c74ecb44e5b385d13b733"
variable {E PE F PF : Type*} [NormedAddCommGroup E] [NormedSpace β E] [MetricSpace PE]
[NormedAddTorsor E PE] [NormedAddCommGroup F] [NormedSpace β F] [MetricSpace PF]
[NormedAddTorsor F PF]
open Set AffineMap AffineIsometryEquiv
noncomputable section
namespace IsometryEquiv
| Mathlib/Analysis/NormedSpace/MazurUlam.lean | 45 | 83 | theorem midpoint_fixed {x y : PE} :
β e : PE βα΅’ PE, e x = x β e y = y β e (midpoint β x y) = midpoint β x y := by |
set z := midpoint β x y
-- Consider the set of `e : E βα΅’ E` such that `e x = x` and `e y = y`
set s := { e : PE βα΅’ PE | e x = x β§ e y = y }
haveI : Nonempty s := β¨β¨IsometryEquiv.refl PE, rfl, rflβ©β©
-- On the one hand, `e` cannot send the midpoint `z` of `[x, y]` too far
have h_bdd : BddAbove (range fun e : s => dist ((e : PE βα΅’ PE) z) z) := by
refine β¨dist x z + dist x z, forall_mem_range.2 <| Subtype.forall.2 ?_β©
rintro e β¨hx, _β©
calc
dist (e z) z β€ dist (e z) x + dist x z := dist_triangle (e z) x z
_ = dist (e x) (e z) + dist x z := by rw [hx, dist_comm]
_ = dist x z + dist x z := by erw [e.dist_eq x z]
-- On the other hand, consider the map `f : (E βα΅’ E) β (E βα΅’ E)`
-- sending each `e` to `R β eβ»ΒΉ β R β e`, where `R` is the point reflection in the
-- midpoint `z` of `[x, y]`.
set R : PE βα΅’ PE := (pointReflection β z).toIsometryEquiv
set f : PE βα΅’ PE β PE βα΅’ PE := fun e => ((e.trans R).trans e.symm).trans R
-- Note that `f` doubles the value of `dist (e z) z`
have hf_dist : β e, dist (f e z) z = 2 * dist (e z) z := by
intro e
dsimp [f, R]
rw [dist_pointReflection_fixed, β e.dist_eq, e.apply_symm_apply,
dist_pointReflection_self_real, dist_comm]
-- Also note that `f` maps `s` to itself
have hf_maps_to : MapsTo f s s := by
rintro e β¨hx, hyβ©
constructor <;> simp [f, R, z, hx, hy, e.symm_apply_eq.2 hx.symm, e.symm_apply_eq.2 hy.symm]
-- Therefore, `dist (e z) z = 0` for all `e β s`.
set c := β¨ e : s, dist ((e : PE βα΅’ PE) z) z
have : c β€ c / 2 := by
apply ciSup_le
rintro β¨e, heβ©
simp only [Subtype.coe_mk, le_div_iff' (zero_lt_two' β), β hf_dist]
exact le_ciSup h_bdd β¨f e, hf_maps_to heβ©
replace : c β€ 0 := by linarith
refine fun e hx hy => dist_le_zero.1 (le_trans ?_ this)
exact le_ciSup h_bdd β¨e, hx, hyβ©
| 1,635 |
import Mathlib.Topology.Instances.RealVectorSpace
import Mathlib.Analysis.NormedSpace.AffineIsometry
#align_import analysis.normed_space.mazur_ulam from "leanprover-community/mathlib"@"78261225eb5cedc61c5c74ecb44e5b385d13b733"
variable {E PE F PF : Type*} [NormedAddCommGroup E] [NormedSpace β E] [MetricSpace PE]
[NormedAddTorsor E PE] [NormedAddCommGroup F] [NormedSpace β F] [MetricSpace PF]
[NormedAddTorsor F PF]
open Set AffineMap AffineIsometryEquiv
noncomputable section
namespace IsometryEquiv
theorem midpoint_fixed {x y : PE} :
β e : PE βα΅’ PE, e x = x β e y = y β e (midpoint β x y) = midpoint β x y := by
set z := midpoint β x y
-- Consider the set of `e : E βα΅’ E` such that `e x = x` and `e y = y`
set s := { e : PE βα΅’ PE | e x = x β§ e y = y }
haveI : Nonempty s := β¨β¨IsometryEquiv.refl PE, rfl, rflβ©β©
-- On the one hand, `e` cannot send the midpoint `z` of `[x, y]` too far
have h_bdd : BddAbove (range fun e : s => dist ((e : PE βα΅’ PE) z) z) := by
refine β¨dist x z + dist x z, forall_mem_range.2 <| Subtype.forall.2 ?_β©
rintro e β¨hx, _β©
calc
dist (e z) z β€ dist (e z) x + dist x z := dist_triangle (e z) x z
_ = dist (e x) (e z) + dist x z := by rw [hx, dist_comm]
_ = dist x z + dist x z := by erw [e.dist_eq x z]
-- On the other hand, consider the map `f : (E βα΅’ E) β (E βα΅’ E)`
-- sending each `e` to `R β eβ»ΒΉ β R β e`, where `R` is the point reflection in the
-- midpoint `z` of `[x, y]`.
set R : PE βα΅’ PE := (pointReflection β z).toIsometryEquiv
set f : PE βα΅’ PE β PE βα΅’ PE := fun e => ((e.trans R).trans e.symm).trans R
-- Note that `f` doubles the value of `dist (e z) z`
have hf_dist : β e, dist (f e z) z = 2 * dist (e z) z := by
intro e
dsimp [f, R]
rw [dist_pointReflection_fixed, β e.dist_eq, e.apply_symm_apply,
dist_pointReflection_self_real, dist_comm]
-- Also note that `f` maps `s` to itself
have hf_maps_to : MapsTo f s s := by
rintro e β¨hx, hyβ©
constructor <;> simp [f, R, z, hx, hy, e.symm_apply_eq.2 hx.symm, e.symm_apply_eq.2 hy.symm]
-- Therefore, `dist (e z) z = 0` for all `e β s`.
set c := β¨ e : s, dist ((e : PE βα΅’ PE) z) z
have : c β€ c / 2 := by
apply ciSup_le
rintro β¨e, heβ©
simp only [Subtype.coe_mk, le_div_iff' (zero_lt_two' β), β hf_dist]
exact le_ciSup h_bdd β¨f e, hf_maps_to heβ©
replace : c β€ 0 := by linarith
refine fun e hx hy => dist_le_zero.1 (le_trans ?_ this)
exact le_ciSup h_bdd β¨e, hx, hyβ©
#align isometry_equiv.midpoint_fixed IsometryEquiv.midpoint_fixed
| Mathlib/Analysis/NormedSpace/MazurUlam.lean | 87 | 96 | theorem map_midpoint (f : PE βα΅’ PF) (x y : PE) : f (midpoint β x y) = midpoint β (f x) (f y) := by |
set e : PE βα΅’ PE :=
((f.trans <| (pointReflection β <| midpoint β (f x) (f y)).toIsometryEquiv).trans f.symm).trans
(pointReflection β <| midpoint β x y).toIsometryEquiv
have hx : e x = x := by simp [e]
have hy : e y = y := by simp [e]
have hm := e.midpoint_fixed hx hy
simp only [e, trans_apply] at hm
rwa [β eq_symm_apply, toIsometryEquiv_symm, pointReflection_symm, coe_toIsometryEquiv,
coe_toIsometryEquiv, pointReflection_self, symm_apply_eq, @pointReflection_fixed_iff] at hm
| 1,635 |
import Mathlib.Analysis.NormedSpace.AffineIsometry
import Mathlib.Topology.Algebra.ContinuousAffineMap
import Mathlib.Analysis.NormedSpace.OperatorNorm.NormedSpace
#align_import analysis.normed_space.continuous_affine_map from "leanprover-community/mathlib"@"17ef379e997badd73e5eabb4d38f11919ab3c4b3"
namespace ContinuousAffineMap
variable {π R V W Wβ P Q Qβ : Type*}
variable [NormedAddCommGroup V] [MetricSpace P] [NormedAddTorsor V P]
variable [NormedAddCommGroup W] [MetricSpace Q] [NormedAddTorsor W Q]
variable [NormedAddCommGroup Wβ] [MetricSpace Qβ] [NormedAddTorsor Wβ Qβ]
variable [NormedField R] [NormedSpace R V] [NormedSpace R W] [NormedSpace R Wβ]
variable [NontriviallyNormedField π] [NormedSpace π V] [NormedSpace π W] [NormedSpace π Wβ]
def contLinear (f : P βᴬ[R] Q) : V βL[R] W :=
{ f.linear with
toFun := f.linear
cont := by rw [AffineMap.continuous_linear_iff]; exact f.cont }
#align continuous_affine_map.cont_linear ContinuousAffineMap.contLinear
@[simp]
theorem coe_contLinear (f : P βᴬ[R] Q) : (f.contLinear : V β W) = f.linear :=
rfl
#align continuous_affine_map.coe_cont_linear ContinuousAffineMap.coe_contLinear
@[simp]
| Mathlib/Analysis/NormedSpace/ContinuousAffineMap.lean | 66 | 67 | theorem coe_contLinear_eq_linear (f : P βᴬ[R] Q) :
(f.contLinear : V ββ[R] W) = (f : P βα΅[R] Q).linear := by | ext; rfl
| 1,636 |
import Mathlib.Analysis.NormedSpace.AffineIsometry
import Mathlib.Topology.Algebra.ContinuousAffineMap
import Mathlib.Analysis.NormedSpace.OperatorNorm.NormedSpace
#align_import analysis.normed_space.continuous_affine_map from "leanprover-community/mathlib"@"17ef379e997badd73e5eabb4d38f11919ab3c4b3"
namespace ContinuousAffineMap
variable {π R V W Wβ P Q Qβ : Type*}
variable [NormedAddCommGroup V] [MetricSpace P] [NormedAddTorsor V P]
variable [NormedAddCommGroup W] [MetricSpace Q] [NormedAddTorsor W Q]
variable [NormedAddCommGroup Wβ] [MetricSpace Qβ] [NormedAddTorsor Wβ Qβ]
variable [NormedField R] [NormedSpace R V] [NormedSpace R W] [NormedSpace R Wβ]
variable [NontriviallyNormedField π] [NormedSpace π V] [NormedSpace π W] [NormedSpace π Wβ]
def contLinear (f : P βᴬ[R] Q) : V βL[R] W :=
{ f.linear with
toFun := f.linear
cont := by rw [AffineMap.continuous_linear_iff]; exact f.cont }
#align continuous_affine_map.cont_linear ContinuousAffineMap.contLinear
@[simp]
theorem coe_contLinear (f : P βᴬ[R] Q) : (f.contLinear : V β W) = f.linear :=
rfl
#align continuous_affine_map.coe_cont_linear ContinuousAffineMap.coe_contLinear
@[simp]
theorem coe_contLinear_eq_linear (f : P βᴬ[R] Q) :
(f.contLinear : V ββ[R] W) = (f : P βα΅[R] Q).linear := by ext; rfl
#align continuous_affine_map.coe_cont_linear_eq_linear ContinuousAffineMap.coe_contLinear_eq_linear
@[simp]
theorem coe_mk_const_linear_eq_linear (f : P βα΅[R] Q) (h) :
((β¨f, hβ© : P βᴬ[R] Q).contLinear : V β W) = f.linear :=
rfl
#align continuous_affine_map.coe_mk_const_linear_eq_linear ContinuousAffineMap.coe_mk_const_linear_eq_linear
theorem coe_linear_eq_coe_contLinear (f : P βᴬ[R] Q) :
((f : P βα΅[R] Q).linear : V β W) = (βf.contLinear : V β W) :=
rfl
#align continuous_affine_map.coe_linear_eq_coe_cont_linear ContinuousAffineMap.coe_linear_eq_coe_contLinear
@[simp]
theorem comp_contLinear (f : P βᴬ[R] Q) (g : Q βᴬ[R] Qβ) :
(g.comp f).contLinear = g.contLinear.comp f.contLinear :=
rfl
#align continuous_affine_map.comp_cont_linear ContinuousAffineMap.comp_contLinear
@[simp]
theorem map_vadd (f : P βᴬ[R] Q) (p : P) (v : V) : f (v +α΅₯ p) = f.contLinear v +α΅₯ f p :=
f.map_vadd' p v
#align continuous_affine_map.map_vadd ContinuousAffineMap.map_vadd
@[simp]
theorem contLinear_map_vsub (f : P βᴬ[R] Q) (pβ pβ : P) : f.contLinear (pβ -α΅₯ pβ) = f pβ -α΅₯ f pβ :=
f.toAffineMap.linearMap_vsub pβ pβ
#align continuous_affine_map.cont_linear_map_vsub ContinuousAffineMap.contLinear_map_vsub
@[simp]
theorem const_contLinear (q : Q) : (const R P q).contLinear = 0 :=
rfl
#align continuous_affine_map.const_cont_linear ContinuousAffineMap.const_contLinear
| Mathlib/Analysis/NormedSpace/ContinuousAffineMap.lean | 102 | 114 | theorem contLinear_eq_zero_iff_exists_const (f : P βᴬ[R] Q) :
f.contLinear = 0 β β q, f = const R P q := by |
have hβ : f.contLinear = 0 β (f : P βα΅[R] Q).linear = 0 := by
refine β¨fun h => ?_, fun h => ?_β© <;> ext
Β· rw [β coe_contLinear_eq_linear, h]; rfl
Β· rw [β coe_linear_eq_coe_contLinear, h]; rfl
have hβ : β q : Q, f = const R P q β (f : P βα΅[R] Q) = AffineMap.const R P q := by
intro q
refine β¨fun h => ?_, fun h => ?_β© <;> ext
Β· rw [h]; rfl
Β· rw [β coe_to_affineMap, h]; rfl
simp_rw [hβ, hβ]
exact (f : P βα΅[R] Q).linear_eq_zero_iff_exists_const
| 1,636 |
import Mathlib.Analysis.NormedSpace.AffineIsometry
import Mathlib.Topology.Algebra.ContinuousAffineMap
import Mathlib.Analysis.NormedSpace.OperatorNorm.NormedSpace
#align_import analysis.normed_space.continuous_affine_map from "leanprover-community/mathlib"@"17ef379e997badd73e5eabb4d38f11919ab3c4b3"
namespace ContinuousAffineMap
variable {π R V W Wβ P Q Qβ : Type*}
variable [NormedAddCommGroup V] [MetricSpace P] [NormedAddTorsor V P]
variable [NormedAddCommGroup W] [MetricSpace Q] [NormedAddTorsor W Q]
variable [NormedAddCommGroup Wβ] [MetricSpace Qβ] [NormedAddTorsor Wβ Qβ]
variable [NormedField R] [NormedSpace R V] [NormedSpace R W] [NormedSpace R Wβ]
variable [NontriviallyNormedField π] [NormedSpace π V] [NormedSpace π W] [NormedSpace π Wβ]
def contLinear (f : P βᴬ[R] Q) : V βL[R] W :=
{ f.linear with
toFun := f.linear
cont := by rw [AffineMap.continuous_linear_iff]; exact f.cont }
#align continuous_affine_map.cont_linear ContinuousAffineMap.contLinear
@[simp]
theorem coe_contLinear (f : P βᴬ[R] Q) : (f.contLinear : V β W) = f.linear :=
rfl
#align continuous_affine_map.coe_cont_linear ContinuousAffineMap.coe_contLinear
@[simp]
theorem coe_contLinear_eq_linear (f : P βᴬ[R] Q) :
(f.contLinear : V ββ[R] W) = (f : P βα΅[R] Q).linear := by ext; rfl
#align continuous_affine_map.coe_cont_linear_eq_linear ContinuousAffineMap.coe_contLinear_eq_linear
@[simp]
theorem coe_mk_const_linear_eq_linear (f : P βα΅[R] Q) (h) :
((β¨f, hβ© : P βᴬ[R] Q).contLinear : V β W) = f.linear :=
rfl
#align continuous_affine_map.coe_mk_const_linear_eq_linear ContinuousAffineMap.coe_mk_const_linear_eq_linear
theorem coe_linear_eq_coe_contLinear (f : P βᴬ[R] Q) :
((f : P βα΅[R] Q).linear : V β W) = (βf.contLinear : V β W) :=
rfl
#align continuous_affine_map.coe_linear_eq_coe_cont_linear ContinuousAffineMap.coe_linear_eq_coe_contLinear
@[simp]
theorem comp_contLinear (f : P βᴬ[R] Q) (g : Q βᴬ[R] Qβ) :
(g.comp f).contLinear = g.contLinear.comp f.contLinear :=
rfl
#align continuous_affine_map.comp_cont_linear ContinuousAffineMap.comp_contLinear
@[simp]
theorem map_vadd (f : P βᴬ[R] Q) (p : P) (v : V) : f (v +α΅₯ p) = f.contLinear v +α΅₯ f p :=
f.map_vadd' p v
#align continuous_affine_map.map_vadd ContinuousAffineMap.map_vadd
@[simp]
theorem contLinear_map_vsub (f : P βᴬ[R] Q) (pβ pβ : P) : f.contLinear (pβ -α΅₯ pβ) = f pβ -α΅₯ f pβ :=
f.toAffineMap.linearMap_vsub pβ pβ
#align continuous_affine_map.cont_linear_map_vsub ContinuousAffineMap.contLinear_map_vsub
@[simp]
theorem const_contLinear (q : Q) : (const R P q).contLinear = 0 :=
rfl
#align continuous_affine_map.const_cont_linear ContinuousAffineMap.const_contLinear
theorem contLinear_eq_zero_iff_exists_const (f : P βᴬ[R] Q) :
f.contLinear = 0 β β q, f = const R P q := by
have hβ : f.contLinear = 0 β (f : P βα΅[R] Q).linear = 0 := by
refine β¨fun h => ?_, fun h => ?_β© <;> ext
Β· rw [β coe_contLinear_eq_linear, h]; rfl
Β· rw [β coe_linear_eq_coe_contLinear, h]; rfl
have hβ : β q : Q, f = const R P q β (f : P βα΅[R] Q) = AffineMap.const R P q := by
intro q
refine β¨fun h => ?_, fun h => ?_β© <;> ext
Β· rw [h]; rfl
Β· rw [β coe_to_affineMap, h]; rfl
simp_rw [hβ, hβ]
exact (f : P βα΅[R] Q).linear_eq_zero_iff_exists_const
#align continuous_affine_map.cont_linear_eq_zero_iff_exists_const ContinuousAffineMap.contLinear_eq_zero_iff_exists_const
@[simp]
| Mathlib/Analysis/NormedSpace/ContinuousAffineMap.lean | 118 | 120 | theorem to_affine_map_contLinear (f : V βL[R] W) : f.toContinuousAffineMap.contLinear = f := by |
ext
rfl
| 1,636 |
import Mathlib.Analysis.NormedSpace.AffineIsometry
import Mathlib.Topology.Algebra.ContinuousAffineMap
import Mathlib.Analysis.NormedSpace.OperatorNorm.NormedSpace
#align_import analysis.normed_space.continuous_affine_map from "leanprover-community/mathlib"@"17ef379e997badd73e5eabb4d38f11919ab3c4b3"
namespace ContinuousAffineMap
variable {π R V W Wβ P Q Qβ : Type*}
variable [NormedAddCommGroup V] [MetricSpace P] [NormedAddTorsor V P]
variable [NormedAddCommGroup W] [MetricSpace Q] [NormedAddTorsor W Q]
variable [NormedAddCommGroup Wβ] [MetricSpace Qβ] [NormedAddTorsor Wβ Qβ]
variable [NormedField R] [NormedSpace R V] [NormedSpace R W] [NormedSpace R Wβ]
variable [NontriviallyNormedField π] [NormedSpace π V] [NormedSpace π W] [NormedSpace π Wβ]
def contLinear (f : P βᴬ[R] Q) : V βL[R] W :=
{ f.linear with
toFun := f.linear
cont := by rw [AffineMap.continuous_linear_iff]; exact f.cont }
#align continuous_affine_map.cont_linear ContinuousAffineMap.contLinear
@[simp]
theorem coe_contLinear (f : P βᴬ[R] Q) : (f.contLinear : V β W) = f.linear :=
rfl
#align continuous_affine_map.coe_cont_linear ContinuousAffineMap.coe_contLinear
@[simp]
theorem coe_contLinear_eq_linear (f : P βᴬ[R] Q) :
(f.contLinear : V ββ[R] W) = (f : P βα΅[R] Q).linear := by ext; rfl
#align continuous_affine_map.coe_cont_linear_eq_linear ContinuousAffineMap.coe_contLinear_eq_linear
@[simp]
theorem coe_mk_const_linear_eq_linear (f : P βα΅[R] Q) (h) :
((β¨f, hβ© : P βᴬ[R] Q).contLinear : V β W) = f.linear :=
rfl
#align continuous_affine_map.coe_mk_const_linear_eq_linear ContinuousAffineMap.coe_mk_const_linear_eq_linear
theorem coe_linear_eq_coe_contLinear (f : P βᴬ[R] Q) :
((f : P βα΅[R] Q).linear : V β W) = (βf.contLinear : V β W) :=
rfl
#align continuous_affine_map.coe_linear_eq_coe_cont_linear ContinuousAffineMap.coe_linear_eq_coe_contLinear
@[simp]
theorem comp_contLinear (f : P βᴬ[R] Q) (g : Q βᴬ[R] Qβ) :
(g.comp f).contLinear = g.contLinear.comp f.contLinear :=
rfl
#align continuous_affine_map.comp_cont_linear ContinuousAffineMap.comp_contLinear
@[simp]
theorem map_vadd (f : P βᴬ[R] Q) (p : P) (v : V) : f (v +α΅₯ p) = f.contLinear v +α΅₯ f p :=
f.map_vadd' p v
#align continuous_affine_map.map_vadd ContinuousAffineMap.map_vadd
@[simp]
theorem contLinear_map_vsub (f : P βᴬ[R] Q) (pβ pβ : P) : f.contLinear (pβ -α΅₯ pβ) = f pβ -α΅₯ f pβ :=
f.toAffineMap.linearMap_vsub pβ pβ
#align continuous_affine_map.cont_linear_map_vsub ContinuousAffineMap.contLinear_map_vsub
@[simp]
theorem const_contLinear (q : Q) : (const R P q).contLinear = 0 :=
rfl
#align continuous_affine_map.const_cont_linear ContinuousAffineMap.const_contLinear
theorem contLinear_eq_zero_iff_exists_const (f : P βᴬ[R] Q) :
f.contLinear = 0 β β q, f = const R P q := by
have hβ : f.contLinear = 0 β (f : P βα΅[R] Q).linear = 0 := by
refine β¨fun h => ?_, fun h => ?_β© <;> ext
Β· rw [β coe_contLinear_eq_linear, h]; rfl
Β· rw [β coe_linear_eq_coe_contLinear, h]; rfl
have hβ : β q : Q, f = const R P q β (f : P βα΅[R] Q) = AffineMap.const R P q := by
intro q
refine β¨fun h => ?_, fun h => ?_β© <;> ext
Β· rw [h]; rfl
Β· rw [β coe_to_affineMap, h]; rfl
simp_rw [hβ, hβ]
exact (f : P βα΅[R] Q).linear_eq_zero_iff_exists_const
#align continuous_affine_map.cont_linear_eq_zero_iff_exists_const ContinuousAffineMap.contLinear_eq_zero_iff_exists_const
@[simp]
theorem to_affine_map_contLinear (f : V βL[R] W) : f.toContinuousAffineMap.contLinear = f := by
ext
rfl
#align continuous_affine_map.to_affine_map_cont_linear ContinuousAffineMap.to_affine_map_contLinear
@[simp]
theorem zero_contLinear : (0 : P βᴬ[R] W).contLinear = 0 :=
rfl
#align continuous_affine_map.zero_cont_linear ContinuousAffineMap.zero_contLinear
@[simp]
theorem add_contLinear (f g : P βᴬ[R] W) : (f + g).contLinear = f.contLinear + g.contLinear :=
rfl
#align continuous_affine_map.add_cont_linear ContinuousAffineMap.add_contLinear
@[simp]
theorem sub_contLinear (f g : P βᴬ[R] W) : (f - g).contLinear = f.contLinear - g.contLinear :=
rfl
#align continuous_affine_map.sub_cont_linear ContinuousAffineMap.sub_contLinear
@[simp]
theorem neg_contLinear (f : P βᴬ[R] W) : (-f).contLinear = -f.contLinear :=
rfl
#align continuous_affine_map.neg_cont_linear ContinuousAffineMap.neg_contLinear
@[simp]
theorem smul_contLinear (t : R) (f : P βᴬ[R] W) : (t β’ f).contLinear = t β’ f.contLinear :=
rfl
#align continuous_affine_map.smul_cont_linear ContinuousAffineMap.smul_contLinear
| Mathlib/Analysis/NormedSpace/ContinuousAffineMap.lean | 148 | 151 | theorem decomp (f : V βᴬ[R] W) : (f : V β W) = f.contLinear + Function.const V (f 0) := by |
rcases f with β¨f, hβ©
rw [coe_mk_const_linear_eq_linear, coe_mk, f.decomp, Pi.add_apply, LinearMap.map_zero, zero_add,
β Function.const_def]
| 1,636 |
import Mathlib.Analysis.NormedSpace.ContinuousAffineMap
import Mathlib.Analysis.Calculus.ContDiff.Basic
#align_import analysis.calculus.affine_map from "leanprover-community/mathlib"@"839b92fedff9981cf3fe1c1f623e04b0d127f57c"
namespace ContinuousAffineMap
variable {π V W : Type*} [NontriviallyNormedField π]
variable [NormedAddCommGroup V] [NormedSpace π V]
variable [NormedAddCommGroup W] [NormedSpace π W]
| Mathlib/Analysis/Calculus/AffineMap.lean | 30 | 33 | theorem contDiff {n : ββ} (f : V βᴬ[π] W) : ContDiff π n f := by |
rw [f.decomp]
apply f.contLinear.contDiff.add
exact contDiff_const
| 1,637 |
import Mathlib.Analysis.Normed.Group.Hom
import Mathlib.Analysis.NormedSpace.Basic
import Mathlib.Analysis.NormedSpace.LinearIsometry
import Mathlib.Algebra.Star.SelfAdjoint
import Mathlib.Algebra.Star.Subalgebra
import Mathlib.Algebra.Star.Unitary
import Mathlib.Topology.Algebra.Module.Star
#align_import analysis.normed_space.star.basic from "leanprover-community/mathlib"@"aa6669832974f87406a3d9d70fc5707a60546207"
open Topology
local postfix:max "β" => star
class NormedStarGroup (E : Type*) [SeminormedAddCommGroup E] [StarAddMonoid E] : Prop where
norm_star : β x : E, βxββ = βxβ
#align normed_star_group NormedStarGroup
export NormedStarGroup (norm_star)
attribute [simp] norm_star
variable {π E Ξ± : Type*}
instance RingHomIsometric.starRingEnd [NormedCommRing E] [StarRing E] [NormedStarGroup E] :
RingHomIsometric (starRingEnd E) :=
β¨@norm_star _ _ _ _β©
#align ring_hom_isometric.star_ring_end RingHomIsometric.starRingEnd
class CstarRing (E : Type*) [NonUnitalNormedRing E] [StarRing E] : Prop where
norm_star_mul_self : β {x : E}, βxβ * xβ = βxβ * βxβ
#align cstar_ring CstarRing
instance : CstarRing β where norm_star_mul_self {x} := by simp only [star, id, norm_mul]
namespace CstarRing
section NonUnital
variable [NonUnitalNormedRing E] [StarRing E] [CstarRing E]
-- see Note [lower instance priority]
instance (priority := 100) to_normedStarGroup : NormedStarGroup E :=
β¨by
intro x
by_cases htriv : x = 0
Β· simp only [htriv, star_zero]
Β· have hnt : 0 < βxβ := norm_pos_iff.mpr htriv
have hnt_star : 0 < βxββ :=
norm_pos_iff.mpr ((AddEquiv.map_ne_zero_iff starAddEquiv (M := E)).mpr htriv)
have hβ :=
calc
βxβ * βxβ = βxβ * xβ := norm_star_mul_self.symm
_ β€ βxββ * βxβ := norm_mul_le _ _
have hβ :=
calc
βxββ * βxββ = βx * xββ := by rw [β norm_star_mul_self, star_star]
_ β€ βxβ * βxββ := norm_mul_le _ _
exact le_antisymm (le_of_mul_le_mul_right hβ hnt_star) (le_of_mul_le_mul_right hβ hnt)β©
#align cstar_ring.to_normed_star_group CstarRing.to_normedStarGroup
| Mathlib/Analysis/NormedSpace/Star/Basic.lean | 118 | 120 | theorem norm_self_mul_star {x : E} : βx * xββ = βxβ * βxβ := by |
nth_rw 1 [β star_star x]
simp only [norm_star_mul_self, norm_star]
| 1,638 |
import Mathlib.Analysis.Normed.Group.Hom
import Mathlib.Analysis.NormedSpace.Basic
import Mathlib.Analysis.NormedSpace.LinearIsometry
import Mathlib.Algebra.Star.SelfAdjoint
import Mathlib.Algebra.Star.Subalgebra
import Mathlib.Algebra.Star.Unitary
import Mathlib.Topology.Algebra.Module.Star
#align_import analysis.normed_space.star.basic from "leanprover-community/mathlib"@"aa6669832974f87406a3d9d70fc5707a60546207"
open Topology
local postfix:max "β" => star
class NormedStarGroup (E : Type*) [SeminormedAddCommGroup E] [StarAddMonoid E] : Prop where
norm_star : β x : E, βxββ = βxβ
#align normed_star_group NormedStarGroup
export NormedStarGroup (norm_star)
attribute [simp] norm_star
variable {π E Ξ± : Type*}
instance RingHomIsometric.starRingEnd [NormedCommRing E] [StarRing E] [NormedStarGroup E] :
RingHomIsometric (starRingEnd E) :=
β¨@norm_star _ _ _ _β©
#align ring_hom_isometric.star_ring_end RingHomIsometric.starRingEnd
class CstarRing (E : Type*) [NonUnitalNormedRing E] [StarRing E] : Prop where
norm_star_mul_self : β {x : E}, βxβ * xβ = βxβ * βxβ
#align cstar_ring CstarRing
instance : CstarRing β where norm_star_mul_self {x} := by simp only [star, id, norm_mul]
namespace CstarRing
section NonUnital
variable [NonUnitalNormedRing E] [StarRing E] [CstarRing E]
-- see Note [lower instance priority]
instance (priority := 100) to_normedStarGroup : NormedStarGroup E :=
β¨by
intro x
by_cases htriv : x = 0
Β· simp only [htriv, star_zero]
Β· have hnt : 0 < βxβ := norm_pos_iff.mpr htriv
have hnt_star : 0 < βxββ :=
norm_pos_iff.mpr ((AddEquiv.map_ne_zero_iff starAddEquiv (M := E)).mpr htriv)
have hβ :=
calc
βxβ * βxβ = βxβ * xβ := norm_star_mul_self.symm
_ β€ βxββ * βxβ := norm_mul_le _ _
have hβ :=
calc
βxββ * βxββ = βx * xββ := by rw [β norm_star_mul_self, star_star]
_ β€ βxβ * βxββ := norm_mul_le _ _
exact le_antisymm (le_of_mul_le_mul_right hβ hnt_star) (le_of_mul_le_mul_right hβ hnt)β©
#align cstar_ring.to_normed_star_group CstarRing.to_normedStarGroup
theorem norm_self_mul_star {x : E} : βx * xββ = βxβ * βxβ := by
nth_rw 1 [β star_star x]
simp only [norm_star_mul_self, norm_star]
#align cstar_ring.norm_self_mul_star CstarRing.norm_self_mul_star
| Mathlib/Analysis/NormedSpace/Star/Basic.lean | 123 | 123 | theorem norm_star_mul_self' {x : E} : βxβ * xβ = βxββ * βxβ := by | rw [norm_star_mul_self, norm_star]
| 1,638 |
import Mathlib.Analysis.Normed.Group.Hom
import Mathlib.Analysis.NormedSpace.Basic
import Mathlib.Analysis.NormedSpace.LinearIsometry
import Mathlib.Algebra.Star.SelfAdjoint
import Mathlib.Algebra.Star.Subalgebra
import Mathlib.Algebra.Star.Unitary
import Mathlib.Topology.Algebra.Module.Star
#align_import analysis.normed_space.star.basic from "leanprover-community/mathlib"@"aa6669832974f87406a3d9d70fc5707a60546207"
open Topology
local postfix:max "β" => star
class NormedStarGroup (E : Type*) [SeminormedAddCommGroup E] [StarAddMonoid E] : Prop where
norm_star : β x : E, βxββ = βxβ
#align normed_star_group NormedStarGroup
export NormedStarGroup (norm_star)
attribute [simp] norm_star
variable {π E Ξ± : Type*}
instance RingHomIsometric.starRingEnd [NormedCommRing E] [StarRing E] [NormedStarGroup E] :
RingHomIsometric (starRingEnd E) :=
β¨@norm_star _ _ _ _β©
#align ring_hom_isometric.star_ring_end RingHomIsometric.starRingEnd
class CstarRing (E : Type*) [NonUnitalNormedRing E] [StarRing E] : Prop where
norm_star_mul_self : β {x : E}, βxβ * xβ = βxβ * βxβ
#align cstar_ring CstarRing
instance : CstarRing β where norm_star_mul_self {x} := by simp only [star, id, norm_mul]
namespace CstarRing
section NonUnital
variable [NonUnitalNormedRing E] [StarRing E] [CstarRing E]
-- see Note [lower instance priority]
instance (priority := 100) to_normedStarGroup : NormedStarGroup E :=
β¨by
intro x
by_cases htriv : x = 0
Β· simp only [htriv, star_zero]
Β· have hnt : 0 < βxβ := norm_pos_iff.mpr htriv
have hnt_star : 0 < βxββ :=
norm_pos_iff.mpr ((AddEquiv.map_ne_zero_iff starAddEquiv (M := E)).mpr htriv)
have hβ :=
calc
βxβ * βxβ = βxβ * xβ := norm_star_mul_self.symm
_ β€ βxββ * βxβ := norm_mul_le _ _
have hβ :=
calc
βxββ * βxββ = βx * xββ := by rw [β norm_star_mul_self, star_star]
_ β€ βxβ * βxββ := norm_mul_le _ _
exact le_antisymm (le_of_mul_le_mul_right hβ hnt_star) (le_of_mul_le_mul_right hβ hnt)β©
#align cstar_ring.to_normed_star_group CstarRing.to_normedStarGroup
theorem norm_self_mul_star {x : E} : βx * xββ = βxβ * βxβ := by
nth_rw 1 [β star_star x]
simp only [norm_star_mul_self, norm_star]
#align cstar_ring.norm_self_mul_star CstarRing.norm_self_mul_star
theorem norm_star_mul_self' {x : E} : βxβ * xβ = βxββ * βxβ := by rw [norm_star_mul_self, norm_star]
#align cstar_ring.norm_star_mul_self' CstarRing.norm_star_mul_self'
theorem nnnorm_self_mul_star {x : E} : βx * xβββ = βxββ * βxββ :=
Subtype.ext norm_self_mul_star
#align cstar_ring.nnnorm_self_mul_star CstarRing.nnnorm_self_mul_star
theorem nnnorm_star_mul_self {x : E} : βxβ * xββ = βxββ * βxββ :=
Subtype.ext norm_star_mul_self
#align cstar_ring.nnnorm_star_mul_self CstarRing.nnnorm_star_mul_self
@[simp]
| Mathlib/Analysis/NormedSpace/Star/Basic.lean | 135 | 137 | theorem star_mul_self_eq_zero_iff (x : E) : xβ * x = 0 β x = 0 := by |
rw [β norm_eq_zero, norm_star_mul_self]
exact mul_self_eq_zero.trans norm_eq_zero
| 1,638 |
import Mathlib.Analysis.Normed.Group.Hom
import Mathlib.Analysis.NormedSpace.Basic
import Mathlib.Analysis.NormedSpace.LinearIsometry
import Mathlib.Algebra.Star.SelfAdjoint
import Mathlib.Algebra.Star.Subalgebra
import Mathlib.Algebra.Star.Unitary
import Mathlib.Topology.Algebra.Module.Star
#align_import analysis.normed_space.star.basic from "leanprover-community/mathlib"@"aa6669832974f87406a3d9d70fc5707a60546207"
open Topology
local postfix:max "β" => star
class NormedStarGroup (E : Type*) [SeminormedAddCommGroup E] [StarAddMonoid E] : Prop where
norm_star : β x : E, βxββ = βxβ
#align normed_star_group NormedStarGroup
export NormedStarGroup (norm_star)
attribute [simp] norm_star
variable {π E Ξ± : Type*}
instance RingHomIsometric.starRingEnd [NormedCommRing E] [StarRing E] [NormedStarGroup E] :
RingHomIsometric (starRingEnd E) :=
β¨@norm_star _ _ _ _β©
#align ring_hom_isometric.star_ring_end RingHomIsometric.starRingEnd
class CstarRing (E : Type*) [NonUnitalNormedRing E] [StarRing E] : Prop where
norm_star_mul_self : β {x : E}, βxβ * xβ = βxβ * βxβ
#align cstar_ring CstarRing
instance : CstarRing β where norm_star_mul_self {x} := by simp only [star, id, norm_mul]
namespace CstarRing
section NonUnital
variable [NonUnitalNormedRing E] [StarRing E] [CstarRing E]
-- see Note [lower instance priority]
instance (priority := 100) to_normedStarGroup : NormedStarGroup E :=
β¨by
intro x
by_cases htriv : x = 0
Β· simp only [htriv, star_zero]
Β· have hnt : 0 < βxβ := norm_pos_iff.mpr htriv
have hnt_star : 0 < βxββ :=
norm_pos_iff.mpr ((AddEquiv.map_ne_zero_iff starAddEquiv (M := E)).mpr htriv)
have hβ :=
calc
βxβ * βxβ = βxβ * xβ := norm_star_mul_self.symm
_ β€ βxββ * βxβ := norm_mul_le _ _
have hβ :=
calc
βxββ * βxββ = βx * xββ := by rw [β norm_star_mul_self, star_star]
_ β€ βxβ * βxββ := norm_mul_le _ _
exact le_antisymm (le_of_mul_le_mul_right hβ hnt_star) (le_of_mul_le_mul_right hβ hnt)β©
#align cstar_ring.to_normed_star_group CstarRing.to_normedStarGroup
theorem norm_self_mul_star {x : E} : βx * xββ = βxβ * βxβ := by
nth_rw 1 [β star_star x]
simp only [norm_star_mul_self, norm_star]
#align cstar_ring.norm_self_mul_star CstarRing.norm_self_mul_star
theorem norm_star_mul_self' {x : E} : βxβ * xβ = βxββ * βxβ := by rw [norm_star_mul_self, norm_star]
#align cstar_ring.norm_star_mul_self' CstarRing.norm_star_mul_self'
theorem nnnorm_self_mul_star {x : E} : βx * xβββ = βxββ * βxββ :=
Subtype.ext norm_self_mul_star
#align cstar_ring.nnnorm_self_mul_star CstarRing.nnnorm_self_mul_star
theorem nnnorm_star_mul_self {x : E} : βxβ * xββ = βxββ * βxββ :=
Subtype.ext norm_star_mul_self
#align cstar_ring.nnnorm_star_mul_self CstarRing.nnnorm_star_mul_self
@[simp]
theorem star_mul_self_eq_zero_iff (x : E) : xβ * x = 0 β x = 0 := by
rw [β norm_eq_zero, norm_star_mul_self]
exact mul_self_eq_zero.trans norm_eq_zero
#align cstar_ring.star_mul_self_eq_zero_iff CstarRing.star_mul_self_eq_zero_iff
| Mathlib/Analysis/NormedSpace/Star/Basic.lean | 140 | 141 | theorem star_mul_self_ne_zero_iff (x : E) : xβ * x β 0 β x β 0 := by |
simp only [Ne, star_mul_self_eq_zero_iff]
| 1,638 |
import Mathlib.Analysis.Normed.Group.Hom
import Mathlib.Analysis.NormedSpace.Basic
import Mathlib.Analysis.NormedSpace.LinearIsometry
import Mathlib.Algebra.Star.SelfAdjoint
import Mathlib.Algebra.Star.Subalgebra
import Mathlib.Algebra.Star.Unitary
import Mathlib.Topology.Algebra.Module.Star
#align_import analysis.normed_space.star.basic from "leanprover-community/mathlib"@"aa6669832974f87406a3d9d70fc5707a60546207"
open Topology
local postfix:max "β" => star
class NormedStarGroup (E : Type*) [SeminormedAddCommGroup E] [StarAddMonoid E] : Prop where
norm_star : β x : E, βxββ = βxβ
#align normed_star_group NormedStarGroup
export NormedStarGroup (norm_star)
attribute [simp] norm_star
variable {π E Ξ± : Type*}
instance RingHomIsometric.starRingEnd [NormedCommRing E] [StarRing E] [NormedStarGroup E] :
RingHomIsometric (starRingEnd E) :=
β¨@norm_star _ _ _ _β©
#align ring_hom_isometric.star_ring_end RingHomIsometric.starRingEnd
class CstarRing (E : Type*) [NonUnitalNormedRing E] [StarRing E] : Prop where
norm_star_mul_self : β {x : E}, βxβ * xβ = βxβ * βxβ
#align cstar_ring CstarRing
instance : CstarRing β where norm_star_mul_self {x} := by simp only [star, id, norm_mul]
namespace CstarRing
section NonUnital
variable [NonUnitalNormedRing E] [StarRing E] [CstarRing E]
-- see Note [lower instance priority]
instance (priority := 100) to_normedStarGroup : NormedStarGroup E :=
β¨by
intro x
by_cases htriv : x = 0
Β· simp only [htriv, star_zero]
Β· have hnt : 0 < βxβ := norm_pos_iff.mpr htriv
have hnt_star : 0 < βxββ :=
norm_pos_iff.mpr ((AddEquiv.map_ne_zero_iff starAddEquiv (M := E)).mpr htriv)
have hβ :=
calc
βxβ * βxβ = βxβ * xβ := norm_star_mul_self.symm
_ β€ βxββ * βxβ := norm_mul_le _ _
have hβ :=
calc
βxββ * βxββ = βx * xββ := by rw [β norm_star_mul_self, star_star]
_ β€ βxβ * βxββ := norm_mul_le _ _
exact le_antisymm (le_of_mul_le_mul_right hβ hnt_star) (le_of_mul_le_mul_right hβ hnt)β©
#align cstar_ring.to_normed_star_group CstarRing.to_normedStarGroup
theorem norm_self_mul_star {x : E} : βx * xββ = βxβ * βxβ := by
nth_rw 1 [β star_star x]
simp only [norm_star_mul_self, norm_star]
#align cstar_ring.norm_self_mul_star CstarRing.norm_self_mul_star
theorem norm_star_mul_self' {x : E} : βxβ * xβ = βxββ * βxβ := by rw [norm_star_mul_self, norm_star]
#align cstar_ring.norm_star_mul_self' CstarRing.norm_star_mul_self'
theorem nnnorm_self_mul_star {x : E} : βx * xβββ = βxββ * βxββ :=
Subtype.ext norm_self_mul_star
#align cstar_ring.nnnorm_self_mul_star CstarRing.nnnorm_self_mul_star
theorem nnnorm_star_mul_self {x : E} : βxβ * xββ = βxββ * βxββ :=
Subtype.ext norm_star_mul_self
#align cstar_ring.nnnorm_star_mul_self CstarRing.nnnorm_star_mul_self
@[simp]
theorem star_mul_self_eq_zero_iff (x : E) : xβ * x = 0 β x = 0 := by
rw [β norm_eq_zero, norm_star_mul_self]
exact mul_self_eq_zero.trans norm_eq_zero
#align cstar_ring.star_mul_self_eq_zero_iff CstarRing.star_mul_self_eq_zero_iff
theorem star_mul_self_ne_zero_iff (x : E) : xβ * x β 0 β x β 0 := by
simp only [Ne, star_mul_self_eq_zero_iff]
#align cstar_ring.star_mul_self_ne_zero_iff CstarRing.star_mul_self_ne_zero_iff
@[simp]
| Mathlib/Analysis/NormedSpace/Star/Basic.lean | 145 | 146 | theorem mul_star_self_eq_zero_iff (x : E) : x * xβ = 0 β x = 0 := by |
simpa only [star_eq_zero, star_star] using @star_mul_self_eq_zero_iff _ _ _ _ (star x)
| 1,638 |
import Mathlib.Analysis.Normed.Group.Hom
import Mathlib.Analysis.NormedSpace.Basic
import Mathlib.Analysis.NormedSpace.LinearIsometry
import Mathlib.Algebra.Star.SelfAdjoint
import Mathlib.Algebra.Star.Subalgebra
import Mathlib.Algebra.Star.Unitary
import Mathlib.Topology.Algebra.Module.Star
#align_import analysis.normed_space.star.basic from "leanprover-community/mathlib"@"aa6669832974f87406a3d9d70fc5707a60546207"
open Topology
local postfix:max "β" => star
class NormedStarGroup (E : Type*) [SeminormedAddCommGroup E] [StarAddMonoid E] : Prop where
norm_star : β x : E, βxββ = βxβ
#align normed_star_group NormedStarGroup
export NormedStarGroup (norm_star)
attribute [simp] norm_star
variable {π E Ξ± : Type*}
instance RingHomIsometric.starRingEnd [NormedCommRing E] [StarRing E] [NormedStarGroup E] :
RingHomIsometric (starRingEnd E) :=
β¨@norm_star _ _ _ _β©
#align ring_hom_isometric.star_ring_end RingHomIsometric.starRingEnd
class CstarRing (E : Type*) [NonUnitalNormedRing E] [StarRing E] : Prop where
norm_star_mul_self : β {x : E}, βxβ * xβ = βxβ * βxβ
#align cstar_ring CstarRing
instance : CstarRing β where norm_star_mul_self {x} := by simp only [star, id, norm_mul]
namespace CstarRing
section NonUnital
variable [NonUnitalNormedRing E] [StarRing E] [CstarRing E]
-- see Note [lower instance priority]
instance (priority := 100) to_normedStarGroup : NormedStarGroup E :=
β¨by
intro x
by_cases htriv : x = 0
Β· simp only [htriv, star_zero]
Β· have hnt : 0 < βxβ := norm_pos_iff.mpr htriv
have hnt_star : 0 < βxββ :=
norm_pos_iff.mpr ((AddEquiv.map_ne_zero_iff starAddEquiv (M := E)).mpr htriv)
have hβ :=
calc
βxβ * βxβ = βxβ * xβ := norm_star_mul_self.symm
_ β€ βxββ * βxβ := norm_mul_le _ _
have hβ :=
calc
βxββ * βxββ = βx * xββ := by rw [β norm_star_mul_self, star_star]
_ β€ βxβ * βxββ := norm_mul_le _ _
exact le_antisymm (le_of_mul_le_mul_right hβ hnt_star) (le_of_mul_le_mul_right hβ hnt)β©
#align cstar_ring.to_normed_star_group CstarRing.to_normedStarGroup
theorem norm_self_mul_star {x : E} : βx * xββ = βxβ * βxβ := by
nth_rw 1 [β star_star x]
simp only [norm_star_mul_self, norm_star]
#align cstar_ring.norm_self_mul_star CstarRing.norm_self_mul_star
theorem norm_star_mul_self' {x : E} : βxβ * xβ = βxββ * βxβ := by rw [norm_star_mul_self, norm_star]
#align cstar_ring.norm_star_mul_self' CstarRing.norm_star_mul_self'
theorem nnnorm_self_mul_star {x : E} : βx * xβββ = βxββ * βxββ :=
Subtype.ext norm_self_mul_star
#align cstar_ring.nnnorm_self_mul_star CstarRing.nnnorm_self_mul_star
theorem nnnorm_star_mul_self {x : E} : βxβ * xββ = βxββ * βxββ :=
Subtype.ext norm_star_mul_self
#align cstar_ring.nnnorm_star_mul_self CstarRing.nnnorm_star_mul_self
@[simp]
theorem star_mul_self_eq_zero_iff (x : E) : xβ * x = 0 β x = 0 := by
rw [β norm_eq_zero, norm_star_mul_self]
exact mul_self_eq_zero.trans norm_eq_zero
#align cstar_ring.star_mul_self_eq_zero_iff CstarRing.star_mul_self_eq_zero_iff
theorem star_mul_self_ne_zero_iff (x : E) : xβ * x β 0 β x β 0 := by
simp only [Ne, star_mul_self_eq_zero_iff]
#align cstar_ring.star_mul_self_ne_zero_iff CstarRing.star_mul_self_ne_zero_iff
@[simp]
theorem mul_star_self_eq_zero_iff (x : E) : x * xβ = 0 β x = 0 := by
simpa only [star_eq_zero, star_star] using @star_mul_self_eq_zero_iff _ _ _ _ (star x)
#align cstar_ring.mul_star_self_eq_zero_iff CstarRing.mul_star_self_eq_zero_iff
| Mathlib/Analysis/NormedSpace/Star/Basic.lean | 149 | 150 | theorem mul_star_self_ne_zero_iff (x : E) : x * xβ β 0 β x β 0 := by |
simp only [Ne, mul_star_self_eq_zero_iff]
| 1,638 |
import Mathlib.Analysis.Normed.Group.Hom
import Mathlib.Analysis.NormedSpace.Basic
import Mathlib.Analysis.NormedSpace.LinearIsometry
import Mathlib.Algebra.Star.SelfAdjoint
import Mathlib.Algebra.Star.Subalgebra
import Mathlib.Algebra.Star.Unitary
import Mathlib.Topology.Algebra.Module.Star
#align_import analysis.normed_space.star.basic from "leanprover-community/mathlib"@"aa6669832974f87406a3d9d70fc5707a60546207"
open Topology
local postfix:max "β" => star
class NormedStarGroup (E : Type*) [SeminormedAddCommGroup E] [StarAddMonoid E] : Prop where
norm_star : β x : E, βxββ = βxβ
#align normed_star_group NormedStarGroup
export NormedStarGroup (norm_star)
attribute [simp] norm_star
variable {π E Ξ± : Type*}
instance RingHomIsometric.starRingEnd [NormedCommRing E] [StarRing E] [NormedStarGroup E] :
RingHomIsometric (starRingEnd E) :=
β¨@norm_star _ _ _ _β©
#align ring_hom_isometric.star_ring_end RingHomIsometric.starRingEnd
class CstarRing (E : Type*) [NonUnitalNormedRing E] [StarRing E] : Prop where
norm_star_mul_self : β {x : E}, βxβ * xβ = βxβ * βxβ
#align cstar_ring CstarRing
instance : CstarRing β where norm_star_mul_self {x} := by simp only [star, id, norm_mul]
namespace CstarRing
section Unital
variable [NormedRing E] [StarRing E] [CstarRing E]
@[simp, nolint simpNF] -- Porting note (#10959): simp cannot prove this
| Mathlib/Analysis/NormedSpace/Star/Basic.lean | 203 | 205 | theorem norm_one [Nontrivial E] : β(1 : E)β = 1 := by |
have : 0 < β(1 : E)β := norm_pos_iff.mpr one_ne_zero
rw [β mul_left_inj' this.ne', β norm_star_mul_self, mul_one, star_one, one_mul]
| 1,638 |
import Mathlib.Analysis.Normed.Group.Hom
import Mathlib.Analysis.NormedSpace.Basic
import Mathlib.Analysis.NormedSpace.LinearIsometry
import Mathlib.Algebra.Star.SelfAdjoint
import Mathlib.Algebra.Star.Subalgebra
import Mathlib.Algebra.Star.Unitary
import Mathlib.Topology.Algebra.Module.Star
#align_import analysis.normed_space.star.basic from "leanprover-community/mathlib"@"aa6669832974f87406a3d9d70fc5707a60546207"
open Topology
local postfix:max "β" => star
class NormedStarGroup (E : Type*) [SeminormedAddCommGroup E] [StarAddMonoid E] : Prop where
norm_star : β x : E, βxββ = βxβ
#align normed_star_group NormedStarGroup
export NormedStarGroup (norm_star)
attribute [simp] norm_star
variable {π E Ξ± : Type*}
instance RingHomIsometric.starRingEnd [NormedCommRing E] [StarRing E] [NormedStarGroup E] :
RingHomIsometric (starRingEnd E) :=
β¨@norm_star _ _ _ _β©
#align ring_hom_isometric.star_ring_end RingHomIsometric.starRingEnd
class CstarRing (E : Type*) [NonUnitalNormedRing E] [StarRing E] : Prop where
norm_star_mul_self : β {x : E}, βxβ * xβ = βxβ * βxβ
#align cstar_ring CstarRing
instance : CstarRing β where norm_star_mul_self {x} := by simp only [star, id, norm_mul]
namespace CstarRing
section Unital
variable [NormedRing E] [StarRing E] [CstarRing E]
@[simp, nolint simpNF] -- Porting note (#10959): simp cannot prove this
theorem norm_one [Nontrivial E] : β(1 : E)β = 1 := by
have : 0 < β(1 : E)β := norm_pos_iff.mpr one_ne_zero
rw [β mul_left_inj' this.ne', β norm_star_mul_self, mul_one, star_one, one_mul]
#align cstar_ring.norm_one CstarRing.norm_one
-- see Note [lower instance priority]
instance (priority := 100) [Nontrivial E] : NormOneClass E :=
β¨norm_oneβ©
| Mathlib/Analysis/NormedSpace/Star/Basic.lean | 212 | 214 | theorem norm_coe_unitary [Nontrivial E] (U : unitary E) : β(U : E)β = 1 := by |
rw [β sq_eq_sq (norm_nonneg _) zero_le_one, one_pow 2, sq, β CstarRing.norm_star_mul_self,
unitary.coe_star_mul_self, CstarRing.norm_one]
| 1,638 |
import Mathlib.Analysis.NormedSpace.Star.Basic
import Mathlib.Analysis.NormedSpace.Unitization
#align_import analysis.normed_space.star.mul from "leanprover-community/mathlib"@"b2ff9a3d7a15fd5b0f060b135421d6a89a999c2f"
open ContinuousLinearMap
local postfix:max "β" => star
variable (π : Type*) {E : Type*}
variable [DenselyNormedField π] [NonUnitalNormedRing E] [StarRing E] [CstarRing E]
variable [NormedSpace π E] [IsScalarTower π E E] [SMulCommClass π E E]
variable (E)
instance CstarRing.instRegularNormedAlgebra : RegularNormedAlgebra π E where
isometry_mul' := AddMonoidHomClass.isometry_of_norm (mul π E) fun a => NNReal.eq_iff.mpr <|
show βmul π E aββ = βaββ by
rw [β sSup_closed_unit_ball_eq_nnnorm]
refine csSup_eq_of_forall_le_of_forall_lt_exists_gt ?_ ?_ fun r hr => ?_
Β· exact (Metric.nonempty_closedBall.mpr zero_le_one).image _
Β· rintro - β¨x, hx, rflβ©
exact
((mul π E a).unit_le_opNorm x <| mem_closedBall_zero_iff.mp hx).trans
(opNorm_mul_apply_le π E a)
Β· have ha : 0 < βaββ := zero_le'.trans_lt hr
rw [β inv_inv βaββ, NNReal.lt_inv_iff_mul_lt (inv_ne_zero ha.ne')] at hr
obtain β¨k, hkβ, hkββ© :=
NormedField.exists_lt_nnnorm_lt π (mul_lt_mul_of_pos_right hr <| inv_pos.2 ha)
refine β¨_, β¨k β’ star a, ?_, rflβ©, ?_β©
Β· simpa only [mem_closedBall_zero_iff, norm_smul, one_mul, norm_star] using
(NNReal.le_inv_iff_mul_le ha.ne').1 (one_mul βaβββ»ΒΉ βΈ hkβ.le : βkββ β€ βaβββ»ΒΉ)
Β· simp only [map_smul, nnnorm_smul, mul_apply', mul_smul_comm, CstarRing.nnnorm_self_mul_star]
rwa [β NNReal.div_lt_iff (mul_pos ha ha).ne', div_eq_mul_inv, mul_inv, β mul_assoc]
section CStarProperty
variable [StarRing π] [CstarRing π] [StarModule π E]
variable {E}
| Mathlib/Analysis/NormedSpace/Star/Unitization.lean | 87 | 124 | theorem Unitization.norm_splitMul_snd_sq (x : Unitization π E) :
β(Unitization.splitMul π E x).sndβ ^ 2 β€ β(Unitization.splitMul π E (star x * x)).sndβ := by |
/- The key idea is that we can use `sSup_closed_unit_ball_eq_norm` to make this about
applying this linear map to elements of norm at most one. There is a bit of `sqrt` and `sq`
shuffling that needs to occur, which is primarily just an annoyance. -/
refine (Real.le_sqrt (norm_nonneg _) (norm_nonneg _)).mp ?_
simp only [Unitization.splitMul_apply]
rw [β sSup_closed_unit_ball_eq_norm]
refine csSup_le ((Metric.nonempty_closedBall.2 zero_le_one).image _) ?_
rintro - β¨b, hb, rflβ©
simp only
-- rewrite to a more convenient form; this is where we use the Cβ-property
rw [β Real.sqrt_sq (norm_nonneg _), Real.sqrt_le_sqrt_iff (norm_nonneg _), sq,
β CstarRing.norm_star_mul_self, ContinuousLinearMap.add_apply, star_add, mul_apply',
Algebra.algebraMap_eq_smul_one, ContinuousLinearMap.smul_apply,
ContinuousLinearMap.one_apply, star_mul, star_smul, add_mul, smul_mul_assoc, β mul_smul_comm,
mul_assoc, β mul_add, β sSup_closed_unit_ball_eq_norm]
refine (norm_mul_le _ _).trans ?_
calc
_ β€ βstar x.fst β’ (x.fst β’ b + x.snd * b) + star x.snd * (x.fst β’ b + x.snd * b)β := by
nth_rewrite 2 [β one_mul β_ + _β]
gcongr
exact (norm_star b).symm βΈ mem_closedBall_zero_iff.1 hb
_ β€ sSup (_ '' Metric.closedBall 0 1) := le_csSup ?_ β¨b, hb, ?_β©
-- now we just check the side conditions for `le_csSup`. There is nothing of interest here.
Β· refine β¨β(star x * x).fstβ + β(star x * x).sndβ, ?_β©
rintro _ β¨y, hy, rflβ©
refine (norm_add_le _ _).trans ?_
gcongr
Β· rw [Algebra.algebraMap_eq_smul_one]
refine (norm_smul _ _).trans_le ?_
simpa only [mul_one] using
mul_le_mul_of_nonneg_left (mem_closedBall_zero_iff.1 hy) (norm_nonneg (star x * x).fst)
Β· exact (unit_le_opNorm _ y <| mem_closedBall_zero_iff.1 hy).trans (opNorm_mul_apply_le _ _ _)
Β· simp only [ContinuousLinearMap.add_apply, mul_apply', Unitization.snd_star, Unitization.snd_mul,
Unitization.fst_mul, Unitization.fst_star, Algebra.algebraMap_eq_smul_one, smul_apply,
one_apply, smul_add, mul_add, add_mul]
simp only [smul_smul, smul_mul_assoc, β add_assoc, β mul_assoc, mul_smul_comm]
| 1,639 |
import Mathlib.Algebra.Module.MinimalAxioms
import Mathlib.Topology.ContinuousFunction.Algebra
import Mathlib.Analysis.Normed.Order.Lattice
import Mathlib.Analysis.NormedSpace.OperatorNorm.Basic
import Mathlib.Analysis.NormedSpace.Star.Basic
import Mathlib.Analysis.NormedSpace.ContinuousLinearMap
import Mathlib.Topology.Bornology.BoundedOperation
#align_import topology.continuous_function.bounded from "leanprover-community/mathlib"@"5dc275ec639221ca4d5f56938eb966f6ad9bc89f"
noncomputable section
open scoped Classical
open Topology Bornology NNReal uniformity UniformConvergence
open Set Filter Metric Function
universe u v w
variable {F : Type*} {Ξ± : Type u} {Ξ² : Type v} {Ξ³ : Type w}
structure BoundedContinuousFunction (Ξ± : Type u) (Ξ² : Type v) [TopologicalSpace Ξ±]
[PseudoMetricSpace Ξ²] extends ContinuousMap Ξ± Ξ² : Type max u v where
map_bounded' : β C, β x y, dist (toFun x) (toFun y) β€ C
#align bounded_continuous_function BoundedContinuousFunction
scoped[BoundedContinuousFunction] infixr:25 " βα΅ " => BoundedContinuousFunction
section
-- Porting note: Changed type of `Ξ± Ξ²` from `Type*` to `outParam Type*`.
class BoundedContinuousMapClass (F : Type*) (Ξ± Ξ² : outParam Type*) [TopologicalSpace Ξ±]
[PseudoMetricSpace Ξ²] [FunLike F Ξ± Ξ²] extends ContinuousMapClass F Ξ± Ξ² : Prop where
map_bounded (f : F) : β C, β x y, dist (f x) (f y) β€ C
#align bounded_continuous_map_class BoundedContinuousMapClass
end
export BoundedContinuousMapClass (map_bounded)
namespace BoundedContinuousFunction
section Basics
variable [TopologicalSpace Ξ±] [PseudoMetricSpace Ξ²] [PseudoMetricSpace Ξ³]
variable {f g : Ξ± βα΅ Ξ²} {x : Ξ±} {C : β}
instance instFunLike : FunLike (Ξ± βα΅ Ξ²) Ξ± Ξ² where
coe f := f.toFun
coe_injective' f g h := by
obtain β¨β¨_, _β©, _β© := f
obtain β¨β¨_, _β©, _β© := g
congr
instance instBoundedContinuousMapClass : BoundedContinuousMapClass (Ξ± βα΅ Ξ²) Ξ± Ξ² where
map_continuous f := f.continuous_toFun
map_bounded f := f.map_bounded'
instance instCoeTC [FunLike F Ξ± Ξ²] [BoundedContinuousMapClass F Ξ± Ξ²] : CoeTC F (Ξ± βα΅ Ξ²) :=
β¨fun f =>
{ toFun := f
continuous_toFun := map_continuous f
map_bounded' := map_bounded f }β©
@[simp]
theorem coe_to_continuous_fun (f : Ξ± βα΅ Ξ²) : (f.toContinuousMap : Ξ± β Ξ²) = f := rfl
#align bounded_continuous_function.coe_to_continuous_fun BoundedContinuousFunction.coe_to_continuous_fun
def Simps.apply (h : Ξ± βα΅ Ξ²) : Ξ± β Ξ² := h
#align bounded_continuous_function.simps.apply BoundedContinuousFunction.Simps.apply
initialize_simps_projections BoundedContinuousFunction (toContinuousMap_toFun β apply)
protected theorem bounded (f : Ξ± βα΅ Ξ²) : β C, β x y : Ξ±, dist (f x) (f y) β€ C :=
f.map_bounded'
#align bounded_continuous_function.bounded BoundedContinuousFunction.bounded
protected theorem continuous (f : Ξ± βα΅ Ξ²) : Continuous f :=
f.toContinuousMap.continuous
#align bounded_continuous_function.continuous BoundedContinuousFunction.continuous
@[ext]
theorem ext (h : β x, f x = g x) : f = g :=
DFunLike.ext _ _ h
#align bounded_continuous_function.ext BoundedContinuousFunction.ext
theorem isBounded_range (f : Ξ± βα΅ Ξ²) : IsBounded (range f) :=
isBounded_range_iff.2 f.bounded
#align bounded_continuous_function.bounded_range BoundedContinuousFunction.isBounded_range
theorem isBounded_image (f : Ξ± βα΅ Ξ²) (s : Set Ξ±) : IsBounded (f '' s) :=
f.isBounded_range.subset <| image_subset_range _ _
#align bounded_continuous_function.bounded_image BoundedContinuousFunction.isBounded_image
theorem eq_of_empty [h : IsEmpty Ξ±] (f g : Ξ± βα΅ Ξ²) : f = g :=
ext <| h.elim
#align bounded_continuous_function.eq_of_empty BoundedContinuousFunction.eq_of_empty
def mkOfBound (f : C(Ξ±, Ξ²)) (C : β) (h : β x y : Ξ±, dist (f x) (f y) β€ C) : Ξ± βα΅ Ξ² :=
β¨f, β¨C, hβ©β©
#align bounded_continuous_function.mk_of_bound BoundedContinuousFunction.mkOfBound
@[simp]
theorem mkOfBound_coe {f} {C} {h} : (mkOfBound f C h : Ξ± β Ξ²) = (f : Ξ± β Ξ²) := rfl
#align bounded_continuous_function.mk_of_bound_coe BoundedContinuousFunction.mkOfBound_coe
def mkOfCompact [CompactSpace Ξ±] (f : C(Ξ±, Ξ²)) : Ξ± βα΅ Ξ² :=
β¨f, isBounded_range_iff.1 (isCompact_range f.continuous).isBoundedβ©
#align bounded_continuous_function.mk_of_compact BoundedContinuousFunction.mkOfCompact
@[simp]
theorem mkOfCompact_apply [CompactSpace Ξ±] (f : C(Ξ±, Ξ²)) (a : Ξ±) : mkOfCompact f a = f a := rfl
#align bounded_continuous_function.mk_of_compact_apply BoundedContinuousFunction.mkOfCompact_apply
@[simps]
def mkOfDiscrete [DiscreteTopology Ξ±] (f : Ξ± β Ξ²) (C : β) (h : β x y : Ξ±, dist (f x) (f y) β€ C) :
Ξ± βα΅ Ξ² :=
β¨β¨f, continuous_of_discreteTopologyβ©, β¨C, hβ©β©
#align bounded_continuous_function.mk_of_discrete BoundedContinuousFunction.mkOfDiscrete
instance instDist : Dist (Ξ± βα΅ Ξ²) :=
β¨fun f g => sInf { C | 0 β€ C β§ β x : Ξ±, dist (f x) (g x) β€ C }β©
theorem dist_eq : dist f g = sInf { C | 0 β€ C β§ β x : Ξ±, dist (f x) (g x) β€ C } := rfl
#align bounded_continuous_function.dist_eq BoundedContinuousFunction.dist_eq
| Mathlib/Topology/ContinuousFunction/Bounded.lean | 158 | 162 | theorem dist_set_exists : β C, 0 β€ C β§ β x : Ξ±, dist (f x) (g x) β€ C := by |
rcases isBounded_iff.1 (f.isBounded_range.union g.isBounded_range) with β¨C, hCβ©
refine β¨max 0 C, le_max_left _ _, fun x => (hC ?_ ?_).trans (le_max_right _ _)β©
<;> [left; right]
<;> apply mem_range_self
| 1,640 |
import Mathlib.Topology.ContinuousFunction.Bounded
import Mathlib.Topology.Sets.Compacts
#align_import measure_theory.integral.riesz_markov_kakutani from "leanprover-community/mathlib"@"b2ff9a3d7a15fd5b0f060b135421d6a89a999c2f"
noncomputable section
open BoundedContinuousFunction NNReal ENNReal
open Set Function TopologicalSpace
variable {X : Type*} [TopologicalSpace X]
variable (Ξ : (X βα΅ ββ₯0) ββ[ββ₯0] ββ₯0)
def rieszContentAux : Compacts X β ββ₯0 := fun K =>
sInf (Ξ '' { f : X βα΅ ββ₯0 | β x β K, (1 : ββ₯0) β€ f x })
#align riesz_content_aux rieszContentAux
section RieszMonotone
| Mathlib/MeasureTheory/Integral/RieszMarkovKakutani.lean | 51 | 56 | theorem rieszContentAux_image_nonempty (K : Compacts X) :
(Ξ '' { f : X βα΅ ββ₯0 | β x β K, (1 : ββ₯0) β€ f x }).Nonempty := by |
rw [image_nonempty]
use (1 : X βα΅ ββ₯0)
intro x _
simp only [BoundedContinuousFunction.coe_one, Pi.one_apply]; rfl
| 1,641 |
import Mathlib.Topology.ContinuousFunction.Bounded
import Mathlib.Topology.UniformSpace.Compact
import Mathlib.Topology.CompactOpen
import Mathlib.Topology.Sets.Compacts
import Mathlib.Analysis.Normed.Group.InfiniteSum
#align_import topology.continuous_function.compact from "leanprover-community/mathlib"@"d3af0609f6db8691dffdc3e1fb7feb7da72698f2"
noncomputable section
open scoped Classical
open Topology NNReal BoundedContinuousFunction
open Set Filter Metric
open BoundedContinuousFunction
namespace ContinuousMap
variable {Ξ± Ξ² E : Type*} [TopologicalSpace Ξ±] [CompactSpace Ξ±] [MetricSpace Ξ²]
[NormedAddCommGroup E]
section
variable (Ξ± Ξ²)
@[simps (config := .asFn)]
def equivBoundedOfCompact : C(Ξ±, Ξ²) β (Ξ± βα΅ Ξ²) :=
β¨mkOfCompact, BoundedContinuousFunction.toContinuousMap, fun f => by
ext
rfl, fun f => by
ext
rflβ©
#align continuous_map.equiv_bounded_of_compact ContinuousMap.equivBoundedOfCompact
theorem uniformInducing_equivBoundedOfCompact : UniformInducing (equivBoundedOfCompact Ξ± Ξ²) :=
UniformInducing.mk'
(by
simp only [hasBasis_compactConvergenceUniformity.mem_iff, uniformity_basis_dist_le.mem_iff]
exact fun s =>
β¨fun β¨β¨a, bβ©, β¨_, β¨Ξ΅, hΞ΅, hbβ©β©, hsβ© =>
β¨{ p | β x, (p.1 x, p.2 x) β b }, β¨Ξ΅, hΞ΅, fun _ h x => hb ((dist_le hΞ΅.le).mp h x)β©,
fun f g h => hs fun x _ => h xβ©,
fun β¨_, β¨Ξ΅, hΞ΅, htβ©, hsβ© =>
β¨β¨Set.univ, { p | dist p.1 p.2 β€ Ξ΅ }β©, β¨isCompact_univ, β¨Ξ΅, hΞ΅, fun _ h => hβ©β©,
fun β¨f, gβ© h => hs _ _ (ht ((dist_le hΞ΅.le).mpr fun x => h x (mem_univ x)))β©β©)
#align continuous_map.uniform_inducing_equiv_bounded_of_compact ContinuousMap.uniformInducing_equivBoundedOfCompact
theorem uniformEmbedding_equivBoundedOfCompact : UniformEmbedding (equivBoundedOfCompact Ξ± Ξ²) :=
{ uniformInducing_equivBoundedOfCompact Ξ± Ξ² with inj := (equivBoundedOfCompact Ξ± Ξ²).injective }
#align continuous_map.uniform_embedding_equiv_bounded_of_compact ContinuousMap.uniformEmbedding_equivBoundedOfCompact
-- Porting note: the following `simps` received a "maximum recursion depth" error
-- @[simps! (config := .asFn) apply symm_apply]
def addEquivBoundedOfCompact [AddMonoid Ξ²] [LipschitzAdd Ξ²] : C(Ξ±, Ξ²) β+ (Ξ± βα΅ Ξ²) :=
({ toContinuousMapAddHom Ξ± Ξ², (equivBoundedOfCompact Ξ± Ξ²).symm with } : (Ξ± βα΅ Ξ²) β+ C(Ξ±, Ξ²)).symm
#align continuous_map.add_equiv_bounded_of_compact ContinuousMap.addEquivBoundedOfCompact
-- Porting note: added this `simp` lemma manually because of the `simps` error above
@[simp]
theorem addEquivBoundedOfCompact_symm_apply [AddMonoid Ξ²] [LipschitzAdd Ξ²] :
β((addEquivBoundedOfCompact Ξ± Ξ²).symm) = toContinuousMapAddHom Ξ± Ξ² :=
rfl
-- Porting note: added this `simp` lemma manually because of the `simps` error above
@[simp]
theorem addEquivBoundedOfCompact_apply [AddMonoid Ξ²] [LipschitzAdd Ξ²] :
β(addEquivBoundedOfCompact Ξ± Ξ²) = mkOfCompact :=
rfl
instance metricSpace : MetricSpace C(Ξ±, Ξ²) :=
(uniformEmbedding_equivBoundedOfCompact Ξ± Ξ²).comapMetricSpace _
#align continuous_map.metric_space ContinuousMap.metricSpace
@[simps! (config := .asFn) toEquiv apply symm_apply]
def isometryEquivBoundedOfCompact : C(Ξ±, Ξ²) βα΅’ (Ξ± βα΅ Ξ²) where
isometry_toFun _ _ := rfl
toEquiv := equivBoundedOfCompact Ξ± Ξ²
#align continuous_map.isometry_equiv_bounded_of_compact ContinuousMap.isometryEquivBoundedOfCompact
end
@[simp]
theorem _root_.BoundedContinuousFunction.dist_mkOfCompact (f g : C(Ξ±, Ξ²)) :
dist (mkOfCompact f) (mkOfCompact g) = dist f g :=
rfl
#align bounded_continuous_function.dist_mk_of_compact BoundedContinuousFunction.dist_mkOfCompact
@[simp]
theorem _root_.BoundedContinuousFunction.dist_toContinuousMap (f g : Ξ± βα΅ Ξ²) :
dist f.toContinuousMap g.toContinuousMap = dist f g :=
rfl
#align bounded_continuous_function.dist_to_continuous_map BoundedContinuousFunction.dist_toContinuousMap
open BoundedContinuousFunction
section
variable {f g : C(Ξ±, Ξ²)} {C : β}
| Mathlib/Topology/ContinuousFunction/Compact.lean | 132 | 133 | theorem dist_apply_le_dist (x : Ξ±) : dist (f x) (g x) β€ dist f g := by |
simp only [β dist_mkOfCompact, dist_coe_le_dist, β mkOfCompact_apply]
| 1,642 |
import Mathlib.Topology.ContinuousFunction.Bounded
import Mathlib.Topology.UniformSpace.Compact
import Mathlib.Topology.CompactOpen
import Mathlib.Topology.Sets.Compacts
import Mathlib.Analysis.Normed.Group.InfiniteSum
#align_import topology.continuous_function.compact from "leanprover-community/mathlib"@"d3af0609f6db8691dffdc3e1fb7feb7da72698f2"
noncomputable section
open scoped Classical
open Topology NNReal BoundedContinuousFunction
open Set Filter Metric
open BoundedContinuousFunction
namespace ContinuousMap
variable {Ξ± Ξ² E : Type*} [TopologicalSpace Ξ±] [CompactSpace Ξ±] [MetricSpace Ξ²]
[NormedAddCommGroup E]
section
variable (Ξ± Ξ²)
@[simps (config := .asFn)]
def equivBoundedOfCompact : C(Ξ±, Ξ²) β (Ξ± βα΅ Ξ²) :=
β¨mkOfCompact, BoundedContinuousFunction.toContinuousMap, fun f => by
ext
rfl, fun f => by
ext
rflβ©
#align continuous_map.equiv_bounded_of_compact ContinuousMap.equivBoundedOfCompact
theorem uniformInducing_equivBoundedOfCompact : UniformInducing (equivBoundedOfCompact Ξ± Ξ²) :=
UniformInducing.mk'
(by
simp only [hasBasis_compactConvergenceUniformity.mem_iff, uniformity_basis_dist_le.mem_iff]
exact fun s =>
β¨fun β¨β¨a, bβ©, β¨_, β¨Ξ΅, hΞ΅, hbβ©β©, hsβ© =>
β¨{ p | β x, (p.1 x, p.2 x) β b }, β¨Ξ΅, hΞ΅, fun _ h x => hb ((dist_le hΞ΅.le).mp h x)β©,
fun f g h => hs fun x _ => h xβ©,
fun β¨_, β¨Ξ΅, hΞ΅, htβ©, hsβ© =>
β¨β¨Set.univ, { p | dist p.1 p.2 β€ Ξ΅ }β©, β¨isCompact_univ, β¨Ξ΅, hΞ΅, fun _ h => hβ©β©,
fun β¨f, gβ© h => hs _ _ (ht ((dist_le hΞ΅.le).mpr fun x => h x (mem_univ x)))β©β©)
#align continuous_map.uniform_inducing_equiv_bounded_of_compact ContinuousMap.uniformInducing_equivBoundedOfCompact
theorem uniformEmbedding_equivBoundedOfCompact : UniformEmbedding (equivBoundedOfCompact Ξ± Ξ²) :=
{ uniformInducing_equivBoundedOfCompact Ξ± Ξ² with inj := (equivBoundedOfCompact Ξ± Ξ²).injective }
#align continuous_map.uniform_embedding_equiv_bounded_of_compact ContinuousMap.uniformEmbedding_equivBoundedOfCompact
-- Porting note: the following `simps` received a "maximum recursion depth" error
-- @[simps! (config := .asFn) apply symm_apply]
def addEquivBoundedOfCompact [AddMonoid Ξ²] [LipschitzAdd Ξ²] : C(Ξ±, Ξ²) β+ (Ξ± βα΅ Ξ²) :=
({ toContinuousMapAddHom Ξ± Ξ², (equivBoundedOfCompact Ξ± Ξ²).symm with } : (Ξ± βα΅ Ξ²) β+ C(Ξ±, Ξ²)).symm
#align continuous_map.add_equiv_bounded_of_compact ContinuousMap.addEquivBoundedOfCompact
-- Porting note: added this `simp` lemma manually because of the `simps` error above
@[simp]
theorem addEquivBoundedOfCompact_symm_apply [AddMonoid Ξ²] [LipschitzAdd Ξ²] :
β((addEquivBoundedOfCompact Ξ± Ξ²).symm) = toContinuousMapAddHom Ξ± Ξ² :=
rfl
-- Porting note: added this `simp` lemma manually because of the `simps` error above
@[simp]
theorem addEquivBoundedOfCompact_apply [AddMonoid Ξ²] [LipschitzAdd Ξ²] :
β(addEquivBoundedOfCompact Ξ± Ξ²) = mkOfCompact :=
rfl
instance metricSpace : MetricSpace C(Ξ±, Ξ²) :=
(uniformEmbedding_equivBoundedOfCompact Ξ± Ξ²).comapMetricSpace _
#align continuous_map.metric_space ContinuousMap.metricSpace
@[simps! (config := .asFn) toEquiv apply symm_apply]
def isometryEquivBoundedOfCompact : C(Ξ±, Ξ²) βα΅’ (Ξ± βα΅ Ξ²) where
isometry_toFun _ _ := rfl
toEquiv := equivBoundedOfCompact Ξ± Ξ²
#align continuous_map.isometry_equiv_bounded_of_compact ContinuousMap.isometryEquivBoundedOfCompact
end
@[simp]
theorem _root_.BoundedContinuousFunction.dist_mkOfCompact (f g : C(Ξ±, Ξ²)) :
dist (mkOfCompact f) (mkOfCompact g) = dist f g :=
rfl
#align bounded_continuous_function.dist_mk_of_compact BoundedContinuousFunction.dist_mkOfCompact
@[simp]
theorem _root_.BoundedContinuousFunction.dist_toContinuousMap (f g : Ξ± βα΅ Ξ²) :
dist f.toContinuousMap g.toContinuousMap = dist f g :=
rfl
#align bounded_continuous_function.dist_to_continuous_map BoundedContinuousFunction.dist_toContinuousMap
open BoundedContinuousFunction
section
variable {f g : C(Ξ±, Ξ²)} {C : β}
theorem dist_apply_le_dist (x : Ξ±) : dist (f x) (g x) β€ dist f g := by
simp only [β dist_mkOfCompact, dist_coe_le_dist, β mkOfCompact_apply]
#align continuous_map.dist_apply_le_dist ContinuousMap.dist_apply_le_dist
| Mathlib/Topology/ContinuousFunction/Compact.lean | 137 | 138 | theorem dist_le (C0 : (0 : β) β€ C) : dist f g β€ C β β x : Ξ±, dist (f x) (g x) β€ C := by |
simp only [β dist_mkOfCompact, BoundedContinuousFunction.dist_le C0, mkOfCompact_apply]
| 1,642 |
import Mathlib.Topology.ContinuousFunction.Bounded
import Mathlib.Topology.UniformSpace.Compact
import Mathlib.Topology.CompactOpen
import Mathlib.Topology.Sets.Compacts
import Mathlib.Analysis.Normed.Group.InfiniteSum
#align_import topology.continuous_function.compact from "leanprover-community/mathlib"@"d3af0609f6db8691dffdc3e1fb7feb7da72698f2"
noncomputable section
open scoped Classical
open Topology NNReal BoundedContinuousFunction
open Set Filter Metric
open BoundedContinuousFunction
namespace ContinuousMap
variable {Ξ± Ξ² E : Type*} [TopologicalSpace Ξ±] [CompactSpace Ξ±] [MetricSpace Ξ²]
[NormedAddCommGroup E]
section
variable (Ξ± Ξ²)
@[simps (config := .asFn)]
def equivBoundedOfCompact : C(Ξ±, Ξ²) β (Ξ± βα΅ Ξ²) :=
β¨mkOfCompact, BoundedContinuousFunction.toContinuousMap, fun f => by
ext
rfl, fun f => by
ext
rflβ©
#align continuous_map.equiv_bounded_of_compact ContinuousMap.equivBoundedOfCompact
theorem uniformInducing_equivBoundedOfCompact : UniformInducing (equivBoundedOfCompact Ξ± Ξ²) :=
UniformInducing.mk'
(by
simp only [hasBasis_compactConvergenceUniformity.mem_iff, uniformity_basis_dist_le.mem_iff]
exact fun s =>
β¨fun β¨β¨a, bβ©, β¨_, β¨Ξ΅, hΞ΅, hbβ©β©, hsβ© =>
β¨{ p | β x, (p.1 x, p.2 x) β b }, β¨Ξ΅, hΞ΅, fun _ h x => hb ((dist_le hΞ΅.le).mp h x)β©,
fun f g h => hs fun x _ => h xβ©,
fun β¨_, β¨Ξ΅, hΞ΅, htβ©, hsβ© =>
β¨β¨Set.univ, { p | dist p.1 p.2 β€ Ξ΅ }β©, β¨isCompact_univ, β¨Ξ΅, hΞ΅, fun _ h => hβ©β©,
fun β¨f, gβ© h => hs _ _ (ht ((dist_le hΞ΅.le).mpr fun x => h x (mem_univ x)))β©β©)
#align continuous_map.uniform_inducing_equiv_bounded_of_compact ContinuousMap.uniformInducing_equivBoundedOfCompact
theorem uniformEmbedding_equivBoundedOfCompact : UniformEmbedding (equivBoundedOfCompact Ξ± Ξ²) :=
{ uniformInducing_equivBoundedOfCompact Ξ± Ξ² with inj := (equivBoundedOfCompact Ξ± Ξ²).injective }
#align continuous_map.uniform_embedding_equiv_bounded_of_compact ContinuousMap.uniformEmbedding_equivBoundedOfCompact
-- Porting note: the following `simps` received a "maximum recursion depth" error
-- @[simps! (config := .asFn) apply symm_apply]
def addEquivBoundedOfCompact [AddMonoid Ξ²] [LipschitzAdd Ξ²] : C(Ξ±, Ξ²) β+ (Ξ± βα΅ Ξ²) :=
({ toContinuousMapAddHom Ξ± Ξ², (equivBoundedOfCompact Ξ± Ξ²).symm with } : (Ξ± βα΅ Ξ²) β+ C(Ξ±, Ξ²)).symm
#align continuous_map.add_equiv_bounded_of_compact ContinuousMap.addEquivBoundedOfCompact
-- Porting note: added this `simp` lemma manually because of the `simps` error above
@[simp]
theorem addEquivBoundedOfCompact_symm_apply [AddMonoid Ξ²] [LipschitzAdd Ξ²] :
β((addEquivBoundedOfCompact Ξ± Ξ²).symm) = toContinuousMapAddHom Ξ± Ξ² :=
rfl
-- Porting note: added this `simp` lemma manually because of the `simps` error above
@[simp]
theorem addEquivBoundedOfCompact_apply [AddMonoid Ξ²] [LipschitzAdd Ξ²] :
β(addEquivBoundedOfCompact Ξ± Ξ²) = mkOfCompact :=
rfl
instance metricSpace : MetricSpace C(Ξ±, Ξ²) :=
(uniformEmbedding_equivBoundedOfCompact Ξ± Ξ²).comapMetricSpace _
#align continuous_map.metric_space ContinuousMap.metricSpace
@[simps! (config := .asFn) toEquiv apply symm_apply]
def isometryEquivBoundedOfCompact : C(Ξ±, Ξ²) βα΅’ (Ξ± βα΅ Ξ²) where
isometry_toFun _ _ := rfl
toEquiv := equivBoundedOfCompact Ξ± Ξ²
#align continuous_map.isometry_equiv_bounded_of_compact ContinuousMap.isometryEquivBoundedOfCompact
end
@[simp]
theorem _root_.BoundedContinuousFunction.dist_mkOfCompact (f g : C(Ξ±, Ξ²)) :
dist (mkOfCompact f) (mkOfCompact g) = dist f g :=
rfl
#align bounded_continuous_function.dist_mk_of_compact BoundedContinuousFunction.dist_mkOfCompact
@[simp]
theorem _root_.BoundedContinuousFunction.dist_toContinuousMap (f g : Ξ± βα΅ Ξ²) :
dist f.toContinuousMap g.toContinuousMap = dist f g :=
rfl
#align bounded_continuous_function.dist_to_continuous_map BoundedContinuousFunction.dist_toContinuousMap
open BoundedContinuousFunction
section
variable {f g : C(Ξ±, Ξ²)} {C : β}
theorem dist_apply_le_dist (x : Ξ±) : dist (f x) (g x) β€ dist f g := by
simp only [β dist_mkOfCompact, dist_coe_le_dist, β mkOfCompact_apply]
#align continuous_map.dist_apply_le_dist ContinuousMap.dist_apply_le_dist
theorem dist_le (C0 : (0 : β) β€ C) : dist f g β€ C β β x : Ξ±, dist (f x) (g x) β€ C := by
simp only [β dist_mkOfCompact, BoundedContinuousFunction.dist_le C0, mkOfCompact_apply]
#align continuous_map.dist_le ContinuousMap.dist_le
| Mathlib/Topology/ContinuousFunction/Compact.lean | 141 | 143 | theorem dist_le_iff_of_nonempty [Nonempty Ξ±] : dist f g β€ C β β x, dist (f x) (g x) β€ C := by |
simp only [β dist_mkOfCompact, BoundedContinuousFunction.dist_le_iff_of_nonempty,
mkOfCompact_apply]
| 1,642 |
import Mathlib.Topology.ContinuousFunction.Bounded
import Mathlib.Topology.UniformSpace.Compact
import Mathlib.Topology.CompactOpen
import Mathlib.Topology.Sets.Compacts
import Mathlib.Analysis.Normed.Group.InfiniteSum
#align_import topology.continuous_function.compact from "leanprover-community/mathlib"@"d3af0609f6db8691dffdc3e1fb7feb7da72698f2"
noncomputable section
open scoped Classical
open Topology NNReal BoundedContinuousFunction
open Set Filter Metric
open BoundedContinuousFunction
namespace ContinuousMap
variable {Ξ± Ξ² E : Type*} [TopologicalSpace Ξ±] [CompactSpace Ξ±] [MetricSpace Ξ²]
[NormedAddCommGroup E]
section
variable (Ξ± Ξ²)
@[simps (config := .asFn)]
def equivBoundedOfCompact : C(Ξ±, Ξ²) β (Ξ± βα΅ Ξ²) :=
β¨mkOfCompact, BoundedContinuousFunction.toContinuousMap, fun f => by
ext
rfl, fun f => by
ext
rflβ©
#align continuous_map.equiv_bounded_of_compact ContinuousMap.equivBoundedOfCompact
theorem uniformInducing_equivBoundedOfCompact : UniformInducing (equivBoundedOfCompact Ξ± Ξ²) :=
UniformInducing.mk'
(by
simp only [hasBasis_compactConvergenceUniformity.mem_iff, uniformity_basis_dist_le.mem_iff]
exact fun s =>
β¨fun β¨β¨a, bβ©, β¨_, β¨Ξ΅, hΞ΅, hbβ©β©, hsβ© =>
β¨{ p | β x, (p.1 x, p.2 x) β b }, β¨Ξ΅, hΞ΅, fun _ h x => hb ((dist_le hΞ΅.le).mp h x)β©,
fun f g h => hs fun x _ => h xβ©,
fun β¨_, β¨Ξ΅, hΞ΅, htβ©, hsβ© =>
β¨β¨Set.univ, { p | dist p.1 p.2 β€ Ξ΅ }β©, β¨isCompact_univ, β¨Ξ΅, hΞ΅, fun _ h => hβ©β©,
fun β¨f, gβ© h => hs _ _ (ht ((dist_le hΞ΅.le).mpr fun x => h x (mem_univ x)))β©β©)
#align continuous_map.uniform_inducing_equiv_bounded_of_compact ContinuousMap.uniformInducing_equivBoundedOfCompact
theorem uniformEmbedding_equivBoundedOfCompact : UniformEmbedding (equivBoundedOfCompact Ξ± Ξ²) :=
{ uniformInducing_equivBoundedOfCompact Ξ± Ξ² with inj := (equivBoundedOfCompact Ξ± Ξ²).injective }
#align continuous_map.uniform_embedding_equiv_bounded_of_compact ContinuousMap.uniformEmbedding_equivBoundedOfCompact
-- Porting note: the following `simps` received a "maximum recursion depth" error
-- @[simps! (config := .asFn) apply symm_apply]
def addEquivBoundedOfCompact [AddMonoid Ξ²] [LipschitzAdd Ξ²] : C(Ξ±, Ξ²) β+ (Ξ± βα΅ Ξ²) :=
({ toContinuousMapAddHom Ξ± Ξ², (equivBoundedOfCompact Ξ± Ξ²).symm with } : (Ξ± βα΅ Ξ²) β+ C(Ξ±, Ξ²)).symm
#align continuous_map.add_equiv_bounded_of_compact ContinuousMap.addEquivBoundedOfCompact
-- Porting note: added this `simp` lemma manually because of the `simps` error above
@[simp]
theorem addEquivBoundedOfCompact_symm_apply [AddMonoid Ξ²] [LipschitzAdd Ξ²] :
β((addEquivBoundedOfCompact Ξ± Ξ²).symm) = toContinuousMapAddHom Ξ± Ξ² :=
rfl
-- Porting note: added this `simp` lemma manually because of the `simps` error above
@[simp]
theorem addEquivBoundedOfCompact_apply [AddMonoid Ξ²] [LipschitzAdd Ξ²] :
β(addEquivBoundedOfCompact Ξ± Ξ²) = mkOfCompact :=
rfl
instance metricSpace : MetricSpace C(Ξ±, Ξ²) :=
(uniformEmbedding_equivBoundedOfCompact Ξ± Ξ²).comapMetricSpace _
#align continuous_map.metric_space ContinuousMap.metricSpace
@[simps! (config := .asFn) toEquiv apply symm_apply]
def isometryEquivBoundedOfCompact : C(Ξ±, Ξ²) βα΅’ (Ξ± βα΅ Ξ²) where
isometry_toFun _ _ := rfl
toEquiv := equivBoundedOfCompact Ξ± Ξ²
#align continuous_map.isometry_equiv_bounded_of_compact ContinuousMap.isometryEquivBoundedOfCompact
end
@[simp]
theorem _root_.BoundedContinuousFunction.dist_mkOfCompact (f g : C(Ξ±, Ξ²)) :
dist (mkOfCompact f) (mkOfCompact g) = dist f g :=
rfl
#align bounded_continuous_function.dist_mk_of_compact BoundedContinuousFunction.dist_mkOfCompact
@[simp]
theorem _root_.BoundedContinuousFunction.dist_toContinuousMap (f g : Ξ± βα΅ Ξ²) :
dist f.toContinuousMap g.toContinuousMap = dist f g :=
rfl
#align bounded_continuous_function.dist_to_continuous_map BoundedContinuousFunction.dist_toContinuousMap
open BoundedContinuousFunction
section
variable {f g : C(Ξ±, Ξ²)} {C : β}
theorem dist_apply_le_dist (x : Ξ±) : dist (f x) (g x) β€ dist f g := by
simp only [β dist_mkOfCompact, dist_coe_le_dist, β mkOfCompact_apply]
#align continuous_map.dist_apply_le_dist ContinuousMap.dist_apply_le_dist
theorem dist_le (C0 : (0 : β) β€ C) : dist f g β€ C β β x : Ξ±, dist (f x) (g x) β€ C := by
simp only [β dist_mkOfCompact, BoundedContinuousFunction.dist_le C0, mkOfCompact_apply]
#align continuous_map.dist_le ContinuousMap.dist_le
theorem dist_le_iff_of_nonempty [Nonempty Ξ±] : dist f g β€ C β β x, dist (f x) (g x) β€ C := by
simp only [β dist_mkOfCompact, BoundedContinuousFunction.dist_le_iff_of_nonempty,
mkOfCompact_apply]
#align continuous_map.dist_le_iff_of_nonempty ContinuousMap.dist_le_iff_of_nonempty
| Mathlib/Topology/ContinuousFunction/Compact.lean | 146 | 147 | theorem dist_lt_iff_of_nonempty [Nonempty Ξ±] : dist f g < C β β x : Ξ±, dist (f x) (g x) < C := by |
simp only [β dist_mkOfCompact, dist_lt_iff_of_nonempty_compact, mkOfCompact_apply]
| 1,642 |
import Mathlib.Topology.ContinuousFunction.Bounded
import Mathlib.Topology.UniformSpace.Compact
import Mathlib.Topology.CompactOpen
import Mathlib.Topology.Sets.Compacts
import Mathlib.Analysis.Normed.Group.InfiniteSum
#align_import topology.continuous_function.compact from "leanprover-community/mathlib"@"d3af0609f6db8691dffdc3e1fb7feb7da72698f2"
noncomputable section
open scoped Classical
open Topology NNReal BoundedContinuousFunction
open Set Filter Metric
open BoundedContinuousFunction
namespace ContinuousMap
variable {Ξ± Ξ² E : Type*} [TopologicalSpace Ξ±] [CompactSpace Ξ±] [MetricSpace Ξ²]
[NormedAddCommGroup E]
section
variable (Ξ± Ξ²)
@[simps (config := .asFn)]
def equivBoundedOfCompact : C(Ξ±, Ξ²) β (Ξ± βα΅ Ξ²) :=
β¨mkOfCompact, BoundedContinuousFunction.toContinuousMap, fun f => by
ext
rfl, fun f => by
ext
rflβ©
#align continuous_map.equiv_bounded_of_compact ContinuousMap.equivBoundedOfCompact
theorem uniformInducing_equivBoundedOfCompact : UniformInducing (equivBoundedOfCompact Ξ± Ξ²) :=
UniformInducing.mk'
(by
simp only [hasBasis_compactConvergenceUniformity.mem_iff, uniformity_basis_dist_le.mem_iff]
exact fun s =>
β¨fun β¨β¨a, bβ©, β¨_, β¨Ξ΅, hΞ΅, hbβ©β©, hsβ© =>
β¨{ p | β x, (p.1 x, p.2 x) β b }, β¨Ξ΅, hΞ΅, fun _ h x => hb ((dist_le hΞ΅.le).mp h x)β©,
fun f g h => hs fun x _ => h xβ©,
fun β¨_, β¨Ξ΅, hΞ΅, htβ©, hsβ© =>
β¨β¨Set.univ, { p | dist p.1 p.2 β€ Ξ΅ }β©, β¨isCompact_univ, β¨Ξ΅, hΞ΅, fun _ h => hβ©β©,
fun β¨f, gβ© h => hs _ _ (ht ((dist_le hΞ΅.le).mpr fun x => h x (mem_univ x)))β©β©)
#align continuous_map.uniform_inducing_equiv_bounded_of_compact ContinuousMap.uniformInducing_equivBoundedOfCompact
theorem uniformEmbedding_equivBoundedOfCompact : UniformEmbedding (equivBoundedOfCompact Ξ± Ξ²) :=
{ uniformInducing_equivBoundedOfCompact Ξ± Ξ² with inj := (equivBoundedOfCompact Ξ± Ξ²).injective }
#align continuous_map.uniform_embedding_equiv_bounded_of_compact ContinuousMap.uniformEmbedding_equivBoundedOfCompact
-- Porting note: the following `simps` received a "maximum recursion depth" error
-- @[simps! (config := .asFn) apply symm_apply]
def addEquivBoundedOfCompact [AddMonoid Ξ²] [LipschitzAdd Ξ²] : C(Ξ±, Ξ²) β+ (Ξ± βα΅ Ξ²) :=
({ toContinuousMapAddHom Ξ± Ξ², (equivBoundedOfCompact Ξ± Ξ²).symm with } : (Ξ± βα΅ Ξ²) β+ C(Ξ±, Ξ²)).symm
#align continuous_map.add_equiv_bounded_of_compact ContinuousMap.addEquivBoundedOfCompact
-- Porting note: added this `simp` lemma manually because of the `simps` error above
@[simp]
theorem addEquivBoundedOfCompact_symm_apply [AddMonoid Ξ²] [LipschitzAdd Ξ²] :
β((addEquivBoundedOfCompact Ξ± Ξ²).symm) = toContinuousMapAddHom Ξ± Ξ² :=
rfl
-- Porting note: added this `simp` lemma manually because of the `simps` error above
@[simp]
theorem addEquivBoundedOfCompact_apply [AddMonoid Ξ²] [LipschitzAdd Ξ²] :
β(addEquivBoundedOfCompact Ξ± Ξ²) = mkOfCompact :=
rfl
instance metricSpace : MetricSpace C(Ξ±, Ξ²) :=
(uniformEmbedding_equivBoundedOfCompact Ξ± Ξ²).comapMetricSpace _
#align continuous_map.metric_space ContinuousMap.metricSpace
@[simps! (config := .asFn) toEquiv apply symm_apply]
def isometryEquivBoundedOfCompact : C(Ξ±, Ξ²) βα΅’ (Ξ± βα΅ Ξ²) where
isometry_toFun _ _ := rfl
toEquiv := equivBoundedOfCompact Ξ± Ξ²
#align continuous_map.isometry_equiv_bounded_of_compact ContinuousMap.isometryEquivBoundedOfCompact
end
@[simp]
theorem _root_.BoundedContinuousFunction.dist_mkOfCompact (f g : C(Ξ±, Ξ²)) :
dist (mkOfCompact f) (mkOfCompact g) = dist f g :=
rfl
#align bounded_continuous_function.dist_mk_of_compact BoundedContinuousFunction.dist_mkOfCompact
@[simp]
theorem _root_.BoundedContinuousFunction.dist_toContinuousMap (f g : Ξ± βα΅ Ξ²) :
dist f.toContinuousMap g.toContinuousMap = dist f g :=
rfl
#align bounded_continuous_function.dist_to_continuous_map BoundedContinuousFunction.dist_toContinuousMap
open BoundedContinuousFunction
section
variable {f g : C(Ξ±, Ξ²)} {C : β}
theorem dist_apply_le_dist (x : Ξ±) : dist (f x) (g x) β€ dist f g := by
simp only [β dist_mkOfCompact, dist_coe_le_dist, β mkOfCompact_apply]
#align continuous_map.dist_apply_le_dist ContinuousMap.dist_apply_le_dist
theorem dist_le (C0 : (0 : β) β€ C) : dist f g β€ C β β x : Ξ±, dist (f x) (g x) β€ C := by
simp only [β dist_mkOfCompact, BoundedContinuousFunction.dist_le C0, mkOfCompact_apply]
#align continuous_map.dist_le ContinuousMap.dist_le
theorem dist_le_iff_of_nonempty [Nonempty Ξ±] : dist f g β€ C β β x, dist (f x) (g x) β€ C := by
simp only [β dist_mkOfCompact, BoundedContinuousFunction.dist_le_iff_of_nonempty,
mkOfCompact_apply]
#align continuous_map.dist_le_iff_of_nonempty ContinuousMap.dist_le_iff_of_nonempty
theorem dist_lt_iff_of_nonempty [Nonempty Ξ±] : dist f g < C β β x : Ξ±, dist (f x) (g x) < C := by
simp only [β dist_mkOfCompact, dist_lt_iff_of_nonempty_compact, mkOfCompact_apply]
#align continuous_map.dist_lt_iff_of_nonempty ContinuousMap.dist_lt_iff_of_nonempty
theorem dist_lt_of_nonempty [Nonempty Ξ±] (w : β x : Ξ±, dist (f x) (g x) < C) : dist f g < C :=
dist_lt_iff_of_nonempty.2 w
#align continuous_map.dist_lt_of_nonempty ContinuousMap.dist_lt_of_nonempty
| Mathlib/Topology/ContinuousFunction/Compact.lean | 154 | 156 | theorem dist_lt_iff (C0 : (0 : β) < C) : dist f g < C β β x : Ξ±, dist (f x) (g x) < C := by |
rw [β dist_mkOfCompact, dist_lt_iff_of_compact C0]
simp only [mkOfCompact_apply]
| 1,642 |
import Mathlib.Data.ENNReal.Basic
import Mathlib.Topology.ContinuousFunction.Bounded
import Mathlib.Topology.MetricSpace.Thickening
#align_import topology.metric_space.thickened_indicator from "leanprover-community/mathlib"@"f2ce6086713c78a7f880485f7917ea547a215982"
open scoped Classical
open NNReal ENNReal Topology BoundedContinuousFunction
open NNReal ENNReal Set Metric EMetric Filter
noncomputable section thickenedIndicator
variable {Ξ± : Type*} [PseudoEMetricSpace Ξ±]
def thickenedIndicatorAux (Ξ΄ : β) (E : Set Ξ±) : Ξ± β ββ₯0β :=
fun x : Ξ± => (1 : ββ₯0β) - infEdist x E / ENNReal.ofReal Ξ΄
#align thickened_indicator_aux thickenedIndicatorAux
| Mathlib/Topology/MetricSpace/ThickenedIndicator.lean | 58 | 66 | theorem continuous_thickenedIndicatorAux {Ξ΄ : β} (Ξ΄_pos : 0 < Ξ΄) (E : Set Ξ±) :
Continuous (thickenedIndicatorAux Ξ΄ E) := by |
unfold thickenedIndicatorAux
let f := fun x : Ξ± => (β¨1, infEdist x E / ENNReal.ofReal Ξ΄β© : ββ₯0 Γ ββ₯0β)
let sub := fun p : ββ₯0 Γ ββ₯0β => (p.1 : ββ₯0β) - p.2
rw [show (fun x : Ξ± => (1 : ββ₯0β) - infEdist x E / ENNReal.ofReal Ξ΄) = sub β f by rfl]
apply (@ENNReal.continuous_nnreal_sub 1).comp
apply (ENNReal.continuous_div_const (ENNReal.ofReal Ξ΄) _).comp continuous_infEdist
set_option tactic.skipAssignedInstances false in norm_num [Ξ΄_pos]
| 1,643 |
import Mathlib.Data.ENNReal.Basic
import Mathlib.Topology.ContinuousFunction.Bounded
import Mathlib.Topology.MetricSpace.Thickening
#align_import topology.metric_space.thickened_indicator from "leanprover-community/mathlib"@"f2ce6086713c78a7f880485f7917ea547a215982"
open scoped Classical
open NNReal ENNReal Topology BoundedContinuousFunction
open NNReal ENNReal Set Metric EMetric Filter
noncomputable section thickenedIndicator
variable {Ξ± : Type*} [PseudoEMetricSpace Ξ±]
def thickenedIndicatorAux (Ξ΄ : β) (E : Set Ξ±) : Ξ± β ββ₯0β :=
fun x : Ξ± => (1 : ββ₯0β) - infEdist x E / ENNReal.ofReal Ξ΄
#align thickened_indicator_aux thickenedIndicatorAux
theorem continuous_thickenedIndicatorAux {Ξ΄ : β} (Ξ΄_pos : 0 < Ξ΄) (E : Set Ξ±) :
Continuous (thickenedIndicatorAux Ξ΄ E) := by
unfold thickenedIndicatorAux
let f := fun x : Ξ± => (β¨1, infEdist x E / ENNReal.ofReal Ξ΄β© : ββ₯0 Γ ββ₯0β)
let sub := fun p : ββ₯0 Γ ββ₯0β => (p.1 : ββ₯0β) - p.2
rw [show (fun x : Ξ± => (1 : ββ₯0β) - infEdist x E / ENNReal.ofReal Ξ΄) = sub β f by rfl]
apply (@ENNReal.continuous_nnreal_sub 1).comp
apply (ENNReal.continuous_div_const (ENNReal.ofReal Ξ΄) _).comp continuous_infEdist
set_option tactic.skipAssignedInstances false in norm_num [Ξ΄_pos]
#align continuous_thickened_indicator_aux continuous_thickenedIndicatorAux
| Mathlib/Topology/MetricSpace/ThickenedIndicator.lean | 69 | 71 | theorem thickenedIndicatorAux_le_one (Ξ΄ : β) (E : Set Ξ±) (x : Ξ±) :
thickenedIndicatorAux Ξ΄ E x β€ 1 := by |
apply @tsub_le_self _ _ _ _ (1 : ββ₯0β)
| 1,643 |
import Mathlib.Data.ENNReal.Basic
import Mathlib.Topology.ContinuousFunction.Bounded
import Mathlib.Topology.MetricSpace.Thickening
#align_import topology.metric_space.thickened_indicator from "leanprover-community/mathlib"@"f2ce6086713c78a7f880485f7917ea547a215982"
open scoped Classical
open NNReal ENNReal Topology BoundedContinuousFunction
open NNReal ENNReal Set Metric EMetric Filter
noncomputable section thickenedIndicator
variable {Ξ± : Type*} [PseudoEMetricSpace Ξ±]
def thickenedIndicatorAux (Ξ΄ : β) (E : Set Ξ±) : Ξ± β ββ₯0β :=
fun x : Ξ± => (1 : ββ₯0β) - infEdist x E / ENNReal.ofReal Ξ΄
#align thickened_indicator_aux thickenedIndicatorAux
theorem continuous_thickenedIndicatorAux {Ξ΄ : β} (Ξ΄_pos : 0 < Ξ΄) (E : Set Ξ±) :
Continuous (thickenedIndicatorAux Ξ΄ E) := by
unfold thickenedIndicatorAux
let f := fun x : Ξ± => (β¨1, infEdist x E / ENNReal.ofReal Ξ΄β© : ββ₯0 Γ ββ₯0β)
let sub := fun p : ββ₯0 Γ ββ₯0β => (p.1 : ββ₯0β) - p.2
rw [show (fun x : Ξ± => (1 : ββ₯0β) - infEdist x E / ENNReal.ofReal Ξ΄) = sub β f by rfl]
apply (@ENNReal.continuous_nnreal_sub 1).comp
apply (ENNReal.continuous_div_const (ENNReal.ofReal Ξ΄) _).comp continuous_infEdist
set_option tactic.skipAssignedInstances false in norm_num [Ξ΄_pos]
#align continuous_thickened_indicator_aux continuous_thickenedIndicatorAux
theorem thickenedIndicatorAux_le_one (Ξ΄ : β) (E : Set Ξ±) (x : Ξ±) :
thickenedIndicatorAux Ξ΄ E x β€ 1 := by
apply @tsub_le_self _ _ _ _ (1 : ββ₯0β)
#align thickened_indicator_aux_le_one thickenedIndicatorAux_le_one
theorem thickenedIndicatorAux_lt_top {Ξ΄ : β} {E : Set Ξ±} {x : Ξ±} :
thickenedIndicatorAux Ξ΄ E x < β :=
lt_of_le_of_lt (thickenedIndicatorAux_le_one _ _ _) one_lt_top
#align thickened_indicator_aux_lt_top thickenedIndicatorAux_lt_top
| Mathlib/Topology/MetricSpace/ThickenedIndicator.lean | 79 | 81 | theorem thickenedIndicatorAux_closure_eq (Ξ΄ : β) (E : Set Ξ±) :
thickenedIndicatorAux Ξ΄ (closure E) = thickenedIndicatorAux Ξ΄ E := by |
simp (config := { unfoldPartialApp := true }) only [thickenedIndicatorAux, infEdist_closure]
| 1,643 |
import Mathlib.Data.ENNReal.Basic
import Mathlib.Topology.ContinuousFunction.Bounded
import Mathlib.Topology.MetricSpace.Thickening
#align_import topology.metric_space.thickened_indicator from "leanprover-community/mathlib"@"f2ce6086713c78a7f880485f7917ea547a215982"
open scoped Classical
open NNReal ENNReal Topology BoundedContinuousFunction
open NNReal ENNReal Set Metric EMetric Filter
noncomputable section thickenedIndicator
variable {Ξ± : Type*} [PseudoEMetricSpace Ξ±]
def thickenedIndicatorAux (Ξ΄ : β) (E : Set Ξ±) : Ξ± β ββ₯0β :=
fun x : Ξ± => (1 : ββ₯0β) - infEdist x E / ENNReal.ofReal Ξ΄
#align thickened_indicator_aux thickenedIndicatorAux
theorem continuous_thickenedIndicatorAux {Ξ΄ : β} (Ξ΄_pos : 0 < Ξ΄) (E : Set Ξ±) :
Continuous (thickenedIndicatorAux Ξ΄ E) := by
unfold thickenedIndicatorAux
let f := fun x : Ξ± => (β¨1, infEdist x E / ENNReal.ofReal Ξ΄β© : ββ₯0 Γ ββ₯0β)
let sub := fun p : ββ₯0 Γ ββ₯0β => (p.1 : ββ₯0β) - p.2
rw [show (fun x : Ξ± => (1 : ββ₯0β) - infEdist x E / ENNReal.ofReal Ξ΄) = sub β f by rfl]
apply (@ENNReal.continuous_nnreal_sub 1).comp
apply (ENNReal.continuous_div_const (ENNReal.ofReal Ξ΄) _).comp continuous_infEdist
set_option tactic.skipAssignedInstances false in norm_num [Ξ΄_pos]
#align continuous_thickened_indicator_aux continuous_thickenedIndicatorAux
theorem thickenedIndicatorAux_le_one (Ξ΄ : β) (E : Set Ξ±) (x : Ξ±) :
thickenedIndicatorAux Ξ΄ E x β€ 1 := by
apply @tsub_le_self _ _ _ _ (1 : ββ₯0β)
#align thickened_indicator_aux_le_one thickenedIndicatorAux_le_one
theorem thickenedIndicatorAux_lt_top {Ξ΄ : β} {E : Set Ξ±} {x : Ξ±} :
thickenedIndicatorAux Ξ΄ E x < β :=
lt_of_le_of_lt (thickenedIndicatorAux_le_one _ _ _) one_lt_top
#align thickened_indicator_aux_lt_top thickenedIndicatorAux_lt_top
theorem thickenedIndicatorAux_closure_eq (Ξ΄ : β) (E : Set Ξ±) :
thickenedIndicatorAux Ξ΄ (closure E) = thickenedIndicatorAux Ξ΄ E := by
simp (config := { unfoldPartialApp := true }) only [thickenedIndicatorAux, infEdist_closure]
#align thickened_indicator_aux_closure_eq thickenedIndicatorAux_closure_eq
| Mathlib/Topology/MetricSpace/ThickenedIndicator.lean | 84 | 86 | theorem thickenedIndicatorAux_one (Ξ΄ : β) (E : Set Ξ±) {x : Ξ±} (x_in_E : x β E) :
thickenedIndicatorAux Ξ΄ E x = 1 := by |
simp [thickenedIndicatorAux, infEdist_zero_of_mem x_in_E, tsub_zero]
| 1,643 |
import Mathlib.Data.ENNReal.Basic
import Mathlib.Topology.ContinuousFunction.Bounded
import Mathlib.Topology.MetricSpace.Thickening
#align_import topology.metric_space.thickened_indicator from "leanprover-community/mathlib"@"f2ce6086713c78a7f880485f7917ea547a215982"
open scoped Classical
open NNReal ENNReal Topology BoundedContinuousFunction
open NNReal ENNReal Set Metric EMetric Filter
noncomputable section thickenedIndicator
variable {Ξ± : Type*} [PseudoEMetricSpace Ξ±]
def thickenedIndicatorAux (Ξ΄ : β) (E : Set Ξ±) : Ξ± β ββ₯0β :=
fun x : Ξ± => (1 : ββ₯0β) - infEdist x E / ENNReal.ofReal Ξ΄
#align thickened_indicator_aux thickenedIndicatorAux
theorem continuous_thickenedIndicatorAux {Ξ΄ : β} (Ξ΄_pos : 0 < Ξ΄) (E : Set Ξ±) :
Continuous (thickenedIndicatorAux Ξ΄ E) := by
unfold thickenedIndicatorAux
let f := fun x : Ξ± => (β¨1, infEdist x E / ENNReal.ofReal Ξ΄β© : ββ₯0 Γ ββ₯0β)
let sub := fun p : ββ₯0 Γ ββ₯0β => (p.1 : ββ₯0β) - p.2
rw [show (fun x : Ξ± => (1 : ββ₯0β) - infEdist x E / ENNReal.ofReal Ξ΄) = sub β f by rfl]
apply (@ENNReal.continuous_nnreal_sub 1).comp
apply (ENNReal.continuous_div_const (ENNReal.ofReal Ξ΄) _).comp continuous_infEdist
set_option tactic.skipAssignedInstances false in norm_num [Ξ΄_pos]
#align continuous_thickened_indicator_aux continuous_thickenedIndicatorAux
theorem thickenedIndicatorAux_le_one (Ξ΄ : β) (E : Set Ξ±) (x : Ξ±) :
thickenedIndicatorAux Ξ΄ E x β€ 1 := by
apply @tsub_le_self _ _ _ _ (1 : ββ₯0β)
#align thickened_indicator_aux_le_one thickenedIndicatorAux_le_one
theorem thickenedIndicatorAux_lt_top {Ξ΄ : β} {E : Set Ξ±} {x : Ξ±} :
thickenedIndicatorAux Ξ΄ E x < β :=
lt_of_le_of_lt (thickenedIndicatorAux_le_one _ _ _) one_lt_top
#align thickened_indicator_aux_lt_top thickenedIndicatorAux_lt_top
theorem thickenedIndicatorAux_closure_eq (Ξ΄ : β) (E : Set Ξ±) :
thickenedIndicatorAux Ξ΄ (closure E) = thickenedIndicatorAux Ξ΄ E := by
simp (config := { unfoldPartialApp := true }) only [thickenedIndicatorAux, infEdist_closure]
#align thickened_indicator_aux_closure_eq thickenedIndicatorAux_closure_eq
theorem thickenedIndicatorAux_one (Ξ΄ : β) (E : Set Ξ±) {x : Ξ±} (x_in_E : x β E) :
thickenedIndicatorAux Ξ΄ E x = 1 := by
simp [thickenedIndicatorAux, infEdist_zero_of_mem x_in_E, tsub_zero]
#align thickened_indicator_aux_one thickenedIndicatorAux_one
| Mathlib/Topology/MetricSpace/ThickenedIndicator.lean | 89 | 91 | theorem thickenedIndicatorAux_one_of_mem_closure (Ξ΄ : β) (E : Set Ξ±) {x : Ξ±}
(x_mem : x β closure E) : thickenedIndicatorAux Ξ΄ E x = 1 := by |
rw [β thickenedIndicatorAux_closure_eq, thickenedIndicatorAux_one Ξ΄ (closure E) x_mem]
| 1,643 |
import Mathlib.Data.ENNReal.Basic
import Mathlib.Topology.ContinuousFunction.Bounded
import Mathlib.Topology.MetricSpace.Thickening
#align_import topology.metric_space.thickened_indicator from "leanprover-community/mathlib"@"f2ce6086713c78a7f880485f7917ea547a215982"
open scoped Classical
open NNReal ENNReal Topology BoundedContinuousFunction
open NNReal ENNReal Set Metric EMetric Filter
noncomputable section thickenedIndicator
variable {Ξ± : Type*} [PseudoEMetricSpace Ξ±]
def thickenedIndicatorAux (Ξ΄ : β) (E : Set Ξ±) : Ξ± β ββ₯0β :=
fun x : Ξ± => (1 : ββ₯0β) - infEdist x E / ENNReal.ofReal Ξ΄
#align thickened_indicator_aux thickenedIndicatorAux
theorem continuous_thickenedIndicatorAux {Ξ΄ : β} (Ξ΄_pos : 0 < Ξ΄) (E : Set Ξ±) :
Continuous (thickenedIndicatorAux Ξ΄ E) := by
unfold thickenedIndicatorAux
let f := fun x : Ξ± => (β¨1, infEdist x E / ENNReal.ofReal Ξ΄β© : ββ₯0 Γ ββ₯0β)
let sub := fun p : ββ₯0 Γ ββ₯0β => (p.1 : ββ₯0β) - p.2
rw [show (fun x : Ξ± => (1 : ββ₯0β) - infEdist x E / ENNReal.ofReal Ξ΄) = sub β f by rfl]
apply (@ENNReal.continuous_nnreal_sub 1).comp
apply (ENNReal.continuous_div_const (ENNReal.ofReal Ξ΄) _).comp continuous_infEdist
set_option tactic.skipAssignedInstances false in norm_num [Ξ΄_pos]
#align continuous_thickened_indicator_aux continuous_thickenedIndicatorAux
theorem thickenedIndicatorAux_le_one (Ξ΄ : β) (E : Set Ξ±) (x : Ξ±) :
thickenedIndicatorAux Ξ΄ E x β€ 1 := by
apply @tsub_le_self _ _ _ _ (1 : ββ₯0β)
#align thickened_indicator_aux_le_one thickenedIndicatorAux_le_one
theorem thickenedIndicatorAux_lt_top {Ξ΄ : β} {E : Set Ξ±} {x : Ξ±} :
thickenedIndicatorAux Ξ΄ E x < β :=
lt_of_le_of_lt (thickenedIndicatorAux_le_one _ _ _) one_lt_top
#align thickened_indicator_aux_lt_top thickenedIndicatorAux_lt_top
theorem thickenedIndicatorAux_closure_eq (Ξ΄ : β) (E : Set Ξ±) :
thickenedIndicatorAux Ξ΄ (closure E) = thickenedIndicatorAux Ξ΄ E := by
simp (config := { unfoldPartialApp := true }) only [thickenedIndicatorAux, infEdist_closure]
#align thickened_indicator_aux_closure_eq thickenedIndicatorAux_closure_eq
theorem thickenedIndicatorAux_one (Ξ΄ : β) (E : Set Ξ±) {x : Ξ±} (x_in_E : x β E) :
thickenedIndicatorAux Ξ΄ E x = 1 := by
simp [thickenedIndicatorAux, infEdist_zero_of_mem x_in_E, tsub_zero]
#align thickened_indicator_aux_one thickenedIndicatorAux_one
theorem thickenedIndicatorAux_one_of_mem_closure (Ξ΄ : β) (E : Set Ξ±) {x : Ξ±}
(x_mem : x β closure E) : thickenedIndicatorAux Ξ΄ E x = 1 := by
rw [β thickenedIndicatorAux_closure_eq, thickenedIndicatorAux_one Ξ΄ (closure E) x_mem]
#align thickened_indicator_aux_one_of_mem_closure thickenedIndicatorAux_one_of_mem_closure
| Mathlib/Topology/MetricSpace/ThickenedIndicator.lean | 94 | 102 | theorem thickenedIndicatorAux_zero {Ξ΄ : β} (Ξ΄_pos : 0 < Ξ΄) (E : Set Ξ±) {x : Ξ±}
(x_out : x β thickening Ξ΄ E) : thickenedIndicatorAux Ξ΄ E x = 0 := by |
rw [thickening, mem_setOf_eq, not_lt] at x_out
unfold thickenedIndicatorAux
apply le_antisymm _ bot_le
have key := tsub_le_tsub
(@rfl _ (1 : ββ₯0β)).le (ENNReal.div_le_div x_out (@rfl _ (ENNReal.ofReal Ξ΄ : ββ₯0β)).le)
rw [ENNReal.div_self (ne_of_gt (ENNReal.ofReal_pos.mpr Ξ΄_pos)) ofReal_ne_top] at key
simpa using key
| 1,643 |
import Mathlib.Data.ENNReal.Basic
import Mathlib.Topology.ContinuousFunction.Bounded
import Mathlib.Topology.MetricSpace.Thickening
#align_import topology.metric_space.thickened_indicator from "leanprover-community/mathlib"@"f2ce6086713c78a7f880485f7917ea547a215982"
open scoped Classical
open NNReal ENNReal Topology BoundedContinuousFunction
open NNReal ENNReal Set Metric EMetric Filter
noncomputable section thickenedIndicator
variable {Ξ± : Type*} [PseudoEMetricSpace Ξ±]
def thickenedIndicatorAux (Ξ΄ : β) (E : Set Ξ±) : Ξ± β ββ₯0β :=
fun x : Ξ± => (1 : ββ₯0β) - infEdist x E / ENNReal.ofReal Ξ΄
#align thickened_indicator_aux thickenedIndicatorAux
theorem continuous_thickenedIndicatorAux {Ξ΄ : β} (Ξ΄_pos : 0 < Ξ΄) (E : Set Ξ±) :
Continuous (thickenedIndicatorAux Ξ΄ E) := by
unfold thickenedIndicatorAux
let f := fun x : Ξ± => (β¨1, infEdist x E / ENNReal.ofReal Ξ΄β© : ββ₯0 Γ ββ₯0β)
let sub := fun p : ββ₯0 Γ ββ₯0β => (p.1 : ββ₯0β) - p.2
rw [show (fun x : Ξ± => (1 : ββ₯0β) - infEdist x E / ENNReal.ofReal Ξ΄) = sub β f by rfl]
apply (@ENNReal.continuous_nnreal_sub 1).comp
apply (ENNReal.continuous_div_const (ENNReal.ofReal Ξ΄) _).comp continuous_infEdist
set_option tactic.skipAssignedInstances false in norm_num [Ξ΄_pos]
#align continuous_thickened_indicator_aux continuous_thickenedIndicatorAux
theorem thickenedIndicatorAux_le_one (Ξ΄ : β) (E : Set Ξ±) (x : Ξ±) :
thickenedIndicatorAux Ξ΄ E x β€ 1 := by
apply @tsub_le_self _ _ _ _ (1 : ββ₯0β)
#align thickened_indicator_aux_le_one thickenedIndicatorAux_le_one
theorem thickenedIndicatorAux_lt_top {Ξ΄ : β} {E : Set Ξ±} {x : Ξ±} :
thickenedIndicatorAux Ξ΄ E x < β :=
lt_of_le_of_lt (thickenedIndicatorAux_le_one _ _ _) one_lt_top
#align thickened_indicator_aux_lt_top thickenedIndicatorAux_lt_top
theorem thickenedIndicatorAux_closure_eq (Ξ΄ : β) (E : Set Ξ±) :
thickenedIndicatorAux Ξ΄ (closure E) = thickenedIndicatorAux Ξ΄ E := by
simp (config := { unfoldPartialApp := true }) only [thickenedIndicatorAux, infEdist_closure]
#align thickened_indicator_aux_closure_eq thickenedIndicatorAux_closure_eq
theorem thickenedIndicatorAux_one (Ξ΄ : β) (E : Set Ξ±) {x : Ξ±} (x_in_E : x β E) :
thickenedIndicatorAux Ξ΄ E x = 1 := by
simp [thickenedIndicatorAux, infEdist_zero_of_mem x_in_E, tsub_zero]
#align thickened_indicator_aux_one thickenedIndicatorAux_one
theorem thickenedIndicatorAux_one_of_mem_closure (Ξ΄ : β) (E : Set Ξ±) {x : Ξ±}
(x_mem : x β closure E) : thickenedIndicatorAux Ξ΄ E x = 1 := by
rw [β thickenedIndicatorAux_closure_eq, thickenedIndicatorAux_one Ξ΄ (closure E) x_mem]
#align thickened_indicator_aux_one_of_mem_closure thickenedIndicatorAux_one_of_mem_closure
theorem thickenedIndicatorAux_zero {Ξ΄ : β} (Ξ΄_pos : 0 < Ξ΄) (E : Set Ξ±) {x : Ξ±}
(x_out : x β thickening Ξ΄ E) : thickenedIndicatorAux Ξ΄ E x = 0 := by
rw [thickening, mem_setOf_eq, not_lt] at x_out
unfold thickenedIndicatorAux
apply le_antisymm _ bot_le
have key := tsub_le_tsub
(@rfl _ (1 : ββ₯0β)).le (ENNReal.div_le_div x_out (@rfl _ (ENNReal.ofReal Ξ΄ : ββ₯0β)).le)
rw [ENNReal.div_self (ne_of_gt (ENNReal.ofReal_pos.mpr Ξ΄_pos)) ofReal_ne_top] at key
simpa using key
#align thickened_indicator_aux_zero thickenedIndicatorAux_zero
theorem thickenedIndicatorAux_mono {Ξ΄β Ξ΄β : β} (hle : Ξ΄β β€ Ξ΄β) (E : Set Ξ±) :
thickenedIndicatorAux Ξ΄β E β€ thickenedIndicatorAux Ξ΄β E :=
fun _ => tsub_le_tsub (@rfl ββ₯0β 1).le (ENNReal.div_le_div rfl.le (ofReal_le_ofReal hle))
#align thickened_indicator_aux_mono thickenedIndicatorAux_mono
| Mathlib/Topology/MetricSpace/ThickenedIndicator.lean | 110 | 115 | theorem indicator_le_thickenedIndicatorAux (Ξ΄ : β) (E : Set Ξ±) :
(E.indicator fun _ => (1 : ββ₯0β)) β€ thickenedIndicatorAux Ξ΄ E := by |
intro a
by_cases h : a β E
Β· simp only [h, indicator_of_mem, thickenedIndicatorAux_one Ξ΄ E h, le_refl]
Β· simp only [h, indicator_of_not_mem, not_false_iff, zero_le]
| 1,643 |
import Mathlib.Data.ENNReal.Basic
import Mathlib.Topology.ContinuousFunction.Bounded
import Mathlib.Topology.MetricSpace.Thickening
#align_import topology.metric_space.thickened_indicator from "leanprover-community/mathlib"@"f2ce6086713c78a7f880485f7917ea547a215982"
open scoped Classical
open NNReal ENNReal Topology BoundedContinuousFunction
open NNReal ENNReal Set Metric EMetric Filter
noncomputable section thickenedIndicator
variable {Ξ± : Type*} [PseudoEMetricSpace Ξ±]
def thickenedIndicatorAux (Ξ΄ : β) (E : Set Ξ±) : Ξ± β ββ₯0β :=
fun x : Ξ± => (1 : ββ₯0β) - infEdist x E / ENNReal.ofReal Ξ΄
#align thickened_indicator_aux thickenedIndicatorAux
theorem continuous_thickenedIndicatorAux {Ξ΄ : β} (Ξ΄_pos : 0 < Ξ΄) (E : Set Ξ±) :
Continuous (thickenedIndicatorAux Ξ΄ E) := by
unfold thickenedIndicatorAux
let f := fun x : Ξ± => (β¨1, infEdist x E / ENNReal.ofReal Ξ΄β© : ββ₯0 Γ ββ₯0β)
let sub := fun p : ββ₯0 Γ ββ₯0β => (p.1 : ββ₯0β) - p.2
rw [show (fun x : Ξ± => (1 : ββ₯0β) - infEdist x E / ENNReal.ofReal Ξ΄) = sub β f by rfl]
apply (@ENNReal.continuous_nnreal_sub 1).comp
apply (ENNReal.continuous_div_const (ENNReal.ofReal Ξ΄) _).comp continuous_infEdist
set_option tactic.skipAssignedInstances false in norm_num [Ξ΄_pos]
#align continuous_thickened_indicator_aux continuous_thickenedIndicatorAux
theorem thickenedIndicatorAux_le_one (Ξ΄ : β) (E : Set Ξ±) (x : Ξ±) :
thickenedIndicatorAux Ξ΄ E x β€ 1 := by
apply @tsub_le_self _ _ _ _ (1 : ββ₯0β)
#align thickened_indicator_aux_le_one thickenedIndicatorAux_le_one
theorem thickenedIndicatorAux_lt_top {Ξ΄ : β} {E : Set Ξ±} {x : Ξ±} :
thickenedIndicatorAux Ξ΄ E x < β :=
lt_of_le_of_lt (thickenedIndicatorAux_le_one _ _ _) one_lt_top
#align thickened_indicator_aux_lt_top thickenedIndicatorAux_lt_top
theorem thickenedIndicatorAux_closure_eq (Ξ΄ : β) (E : Set Ξ±) :
thickenedIndicatorAux Ξ΄ (closure E) = thickenedIndicatorAux Ξ΄ E := by
simp (config := { unfoldPartialApp := true }) only [thickenedIndicatorAux, infEdist_closure]
#align thickened_indicator_aux_closure_eq thickenedIndicatorAux_closure_eq
theorem thickenedIndicatorAux_one (Ξ΄ : β) (E : Set Ξ±) {x : Ξ±} (x_in_E : x β E) :
thickenedIndicatorAux Ξ΄ E x = 1 := by
simp [thickenedIndicatorAux, infEdist_zero_of_mem x_in_E, tsub_zero]
#align thickened_indicator_aux_one thickenedIndicatorAux_one
theorem thickenedIndicatorAux_one_of_mem_closure (Ξ΄ : β) (E : Set Ξ±) {x : Ξ±}
(x_mem : x β closure E) : thickenedIndicatorAux Ξ΄ E x = 1 := by
rw [β thickenedIndicatorAux_closure_eq, thickenedIndicatorAux_one Ξ΄ (closure E) x_mem]
#align thickened_indicator_aux_one_of_mem_closure thickenedIndicatorAux_one_of_mem_closure
theorem thickenedIndicatorAux_zero {Ξ΄ : β} (Ξ΄_pos : 0 < Ξ΄) (E : Set Ξ±) {x : Ξ±}
(x_out : x β thickening Ξ΄ E) : thickenedIndicatorAux Ξ΄ E x = 0 := by
rw [thickening, mem_setOf_eq, not_lt] at x_out
unfold thickenedIndicatorAux
apply le_antisymm _ bot_le
have key := tsub_le_tsub
(@rfl _ (1 : ββ₯0β)).le (ENNReal.div_le_div x_out (@rfl _ (ENNReal.ofReal Ξ΄ : ββ₯0β)).le)
rw [ENNReal.div_self (ne_of_gt (ENNReal.ofReal_pos.mpr Ξ΄_pos)) ofReal_ne_top] at key
simpa using key
#align thickened_indicator_aux_zero thickenedIndicatorAux_zero
theorem thickenedIndicatorAux_mono {Ξ΄β Ξ΄β : β} (hle : Ξ΄β β€ Ξ΄β) (E : Set Ξ±) :
thickenedIndicatorAux Ξ΄β E β€ thickenedIndicatorAux Ξ΄β E :=
fun _ => tsub_le_tsub (@rfl ββ₯0β 1).le (ENNReal.div_le_div rfl.le (ofReal_le_ofReal hle))
#align thickened_indicator_aux_mono thickenedIndicatorAux_mono
theorem indicator_le_thickenedIndicatorAux (Ξ΄ : β) (E : Set Ξ±) :
(E.indicator fun _ => (1 : ββ₯0β)) β€ thickenedIndicatorAux Ξ΄ E := by
intro a
by_cases h : a β E
Β· simp only [h, indicator_of_mem, thickenedIndicatorAux_one Ξ΄ E h, le_refl]
Β· simp only [h, indicator_of_not_mem, not_false_iff, zero_le]
#align indicator_le_thickened_indicator_aux indicator_le_thickenedIndicatorAux
theorem thickenedIndicatorAux_subset (Ξ΄ : β) {Eβ Eβ : Set Ξ±} (subset : Eβ β Eβ) :
thickenedIndicatorAux Ξ΄ Eβ β€ thickenedIndicatorAux Ξ΄ Eβ :=
fun _ => tsub_le_tsub (@rfl ββ₯0β 1).le (ENNReal.div_le_div (infEdist_anti subset) rfl.le)
#align thickened_indicator_aux_subset thickenedIndicatorAux_subset
| Mathlib/Topology/MetricSpace/ThickenedIndicator.lean | 130 | 153 | theorem thickenedIndicatorAux_tendsto_indicator_closure {Ξ΄seq : β β β}
(Ξ΄seq_lim : Tendsto Ξ΄seq atTop (π 0)) (E : Set Ξ±) :
Tendsto (fun n => thickenedIndicatorAux (Ξ΄seq n) E) atTop
(π (indicator (closure E) fun _ => (1 : ββ₯0β))) := by |
rw [tendsto_pi_nhds]
intro x
by_cases x_mem_closure : x β closure E
Β· simp_rw [thickenedIndicatorAux_one_of_mem_closure _ E x_mem_closure]
rw [show (indicator (closure E) fun _ => (1 : ββ₯0β)) x = 1 by
simp only [x_mem_closure, indicator_of_mem]]
exact tendsto_const_nhds
Β· rw [show (closure E).indicator (fun _ => (1 : ββ₯0β)) x = 0 by
simp only [x_mem_closure, indicator_of_not_mem, not_false_iff]]
rcases exists_real_pos_lt_infEdist_of_not_mem_closure x_mem_closure with β¨Ξ΅, β¨Ξ΅_pos, Ξ΅_ltβ©β©
rw [Metric.tendsto_nhds] at Ξ΄seq_lim
specialize Ξ΄seq_lim Ξ΅ Ξ΅_pos
simp only [dist_zero_right, Real.norm_eq_abs, eventually_atTop, ge_iff_le] at Ξ΄seq_lim
rcases Ξ΄seq_lim with β¨N, hNβ©
apply @tendsto_atTop_of_eventually_const _ _ _ _ _ _ _ N
intro n n_large
have key : x β thickening Ξ΅ E := by simpa only [thickening, mem_setOf_eq, not_lt] using Ξ΅_lt.le
refine le_antisymm ?_ bot_le
apply (thickenedIndicatorAux_mono (lt_of_abs_lt (hN n n_large)).le E x).trans
exact (thickenedIndicatorAux_zero Ξ΅_pos E key).le
| 1,643 |
import Mathlib.Data.Real.Sqrt
import Mathlib.Analysis.NormedSpace.Star.Basic
import Mathlib.Analysis.NormedSpace.ContinuousLinearMap
import Mathlib.Analysis.NormedSpace.Basic
#align_import data.is_R_or_C.basic from "leanprover-community/mathlib"@"baa88307f3e699fa7054ef04ec79fa4f056169cb"
section
local notation "π" => algebraMap β _
open ComplexConjugate
class RCLike (K : semiOutParam Type*) extends DenselyNormedField K, StarRing K,
NormedAlgebra β K, CompleteSpace K where
re : K β+ β
im : K β+ β
I : K
I_re_ax : re I = 0
I_mul_I_ax : I = 0 β¨ I * I = -1
re_add_im_ax : β z : K, π (re z) + π (im z) * I = z
ofReal_re_ax : β r : β, re (π r) = r
ofReal_im_ax : β r : β, im (π r) = 0
mul_re_ax : β z w : K, re (z * w) = re z * re w - im z * im w
mul_im_ax : β z w : K, im (z * w) = re z * im w + im z * re w
conj_re_ax : β z : K, re (conj z) = re z
conj_im_ax : β z : K, im (conj z) = -im z
conj_I_ax : conj I = -I
norm_sq_eq_def_ax : β z : K, βzβ ^ 2 = re z * re z + im z * im z
mul_im_I_ax : β z : K, im z * im I = im z
[toPartialOrder : PartialOrder K]
le_iff_re_im {z w : K} : z β€ w β re z β€ re w β§ im z = im w
-- note we cannot put this in the `extends` clause
[toDecidableEq : DecidableEq K]
#align is_R_or_C RCLike
scoped[ComplexOrder] attribute [instance 100] RCLike.toPartialOrder
attribute [instance 100] RCLike.toDecidableEq
end
variable {K E : Type*} [RCLike K]
namespace RCLike
open ComplexConjugate
@[coe] abbrev ofReal : β β K := Algebra.cast
noncomputable instance (priority := 900) algebraMapCoe : CoeTC β K :=
β¨ofRealβ©
#align is_R_or_C.algebra_map_coe RCLike.algebraMapCoe
theorem ofReal_alg (x : β) : (x : K) = x β’ (1 : K) :=
Algebra.algebraMap_eq_smul_one x
#align is_R_or_C.of_real_alg RCLike.ofReal_alg
theorem real_smul_eq_coe_mul (r : β) (z : K) : r β’ z = (r : K) * z :=
Algebra.smul_def r z
#align is_R_or_C.real_smul_eq_coe_mul RCLike.real_smul_eq_coe_mul
| Mathlib/Analysis/RCLike/Basic.lean | 105 | 106 | theorem real_smul_eq_coe_smul [AddCommGroup E] [Module K E] [Module β E] [IsScalarTower β K E]
(r : β) (x : E) : r β’ x = (r : K) β’ x := by | rw [RCLike.ofReal_alg, smul_one_smul]
| 1,644 |
import Mathlib.Data.Real.Sqrt
import Mathlib.Analysis.NormedSpace.Star.Basic
import Mathlib.Analysis.NormedSpace.ContinuousLinearMap
import Mathlib.Analysis.NormedSpace.Basic
#align_import data.is_R_or_C.basic from "leanprover-community/mathlib"@"baa88307f3e699fa7054ef04ec79fa4f056169cb"
section
local notation "π" => algebraMap β _
open ComplexConjugate
class RCLike (K : semiOutParam Type*) extends DenselyNormedField K, StarRing K,
NormedAlgebra β K, CompleteSpace K where
re : K β+ β
im : K β+ β
I : K
I_re_ax : re I = 0
I_mul_I_ax : I = 0 β¨ I * I = -1
re_add_im_ax : β z : K, π (re z) + π (im z) * I = z
ofReal_re_ax : β r : β, re (π r) = r
ofReal_im_ax : β r : β, im (π r) = 0
mul_re_ax : β z w : K, re (z * w) = re z * re w - im z * im w
mul_im_ax : β z w : K, im (z * w) = re z * im w + im z * re w
conj_re_ax : β z : K, re (conj z) = re z
conj_im_ax : β z : K, im (conj z) = -im z
conj_I_ax : conj I = -I
norm_sq_eq_def_ax : β z : K, βzβ ^ 2 = re z * re z + im z * im z
mul_im_I_ax : β z : K, im z * im I = im z
[toPartialOrder : PartialOrder K]
le_iff_re_im {z w : K} : z β€ w β re z β€ re w β§ im z = im w
-- note we cannot put this in the `extends` clause
[toDecidableEq : DecidableEq K]
#align is_R_or_C RCLike
scoped[ComplexOrder] attribute [instance 100] RCLike.toPartialOrder
attribute [instance 100] RCLike.toDecidableEq
end
variable {K E : Type*} [RCLike K]
namespace RCLike
open ComplexConjugate
@[coe] abbrev ofReal : β β K := Algebra.cast
noncomputable instance (priority := 900) algebraMapCoe : CoeTC β K :=
β¨ofRealβ©
#align is_R_or_C.algebra_map_coe RCLike.algebraMapCoe
theorem ofReal_alg (x : β) : (x : K) = x β’ (1 : K) :=
Algebra.algebraMap_eq_smul_one x
#align is_R_or_C.of_real_alg RCLike.ofReal_alg
theorem real_smul_eq_coe_mul (r : β) (z : K) : r β’ z = (r : K) * z :=
Algebra.smul_def r z
#align is_R_or_C.real_smul_eq_coe_mul RCLike.real_smul_eq_coe_mul
theorem real_smul_eq_coe_smul [AddCommGroup E] [Module K E] [Module β E] [IsScalarTower β K E]
(r : β) (x : E) : r β’ x = (r : K) β’ x := by rw [RCLike.ofReal_alg, smul_one_smul]
#align is_R_or_C.real_smul_eq_coe_smul RCLike.real_smul_eq_coe_smul
theorem algebraMap_eq_ofReal : β(algebraMap β K) = ofReal :=
rfl
#align is_R_or_C.algebra_map_eq_of_real RCLike.algebraMap_eq_ofReal
@[simp, rclike_simps]
theorem re_add_im (z : K) : (re z : K) + im z * I = z :=
RCLike.re_add_im_ax z
#align is_R_or_C.re_add_im RCLike.re_add_im
@[simp, norm_cast, rclike_simps]
theorem ofReal_re : β r : β, re (r : K) = r :=
RCLike.ofReal_re_ax
#align is_R_or_C.of_real_re RCLike.ofReal_re
@[simp, norm_cast, rclike_simps]
theorem ofReal_im : β r : β, im (r : K) = 0 :=
RCLike.ofReal_im_ax
#align is_R_or_C.of_real_im RCLike.ofReal_im
@[simp, rclike_simps]
theorem mul_re : β z w : K, re (z * w) = re z * re w - im z * im w :=
RCLike.mul_re_ax
#align is_R_or_C.mul_re RCLike.mul_re
@[simp, rclike_simps]
theorem mul_im : β z w : K, im (z * w) = re z * im w + im z * re w :=
RCLike.mul_im_ax
#align is_R_or_C.mul_im RCLike.mul_im
theorem ext_iff {z w : K} : z = w β re z = re w β§ im z = im w :=
β¨fun h => h βΈ β¨rfl, rflβ©, fun β¨hβ, hββ© => re_add_im z βΈ re_add_im w βΈ hβ βΈ hβ βΈ rflβ©
#align is_R_or_C.ext_iff RCLike.ext_iff
theorem ext {z w : K} (hre : re z = re w) (him : im z = im w) : z = w :=
ext_iff.2 β¨hre, himβ©
#align is_R_or_C.ext RCLike.ext
@[norm_cast]
theorem ofReal_zero : ((0 : β) : K) = 0 :=
algebraMap.coe_zero
#align is_R_or_C.of_real_zero RCLike.ofReal_zero
@[rclike_simps]
theorem zero_re' : re (0 : K) = (0 : β) :=
map_zero re
#align is_R_or_C.zero_re' RCLike.zero_re'
@[norm_cast]
theorem ofReal_one : ((1 : β) : K) = 1 :=
map_one (algebraMap β K)
#align is_R_or_C.of_real_one RCLike.ofReal_one
@[simp, rclike_simps]
| Mathlib/Analysis/RCLike/Basic.lean | 162 | 162 | theorem one_re : re (1 : K) = 1 := by | rw [β ofReal_one, ofReal_re]
| 1,644 |
import Mathlib.Data.Real.Sqrt
import Mathlib.Analysis.NormedSpace.Star.Basic
import Mathlib.Analysis.NormedSpace.ContinuousLinearMap
import Mathlib.Analysis.NormedSpace.Basic
#align_import data.is_R_or_C.basic from "leanprover-community/mathlib"@"baa88307f3e699fa7054ef04ec79fa4f056169cb"
section
local notation "π" => algebraMap β _
open ComplexConjugate
class RCLike (K : semiOutParam Type*) extends DenselyNormedField K, StarRing K,
NormedAlgebra β K, CompleteSpace K where
re : K β+ β
im : K β+ β
I : K
I_re_ax : re I = 0
I_mul_I_ax : I = 0 β¨ I * I = -1
re_add_im_ax : β z : K, π (re z) + π (im z) * I = z
ofReal_re_ax : β r : β, re (π r) = r
ofReal_im_ax : β r : β, im (π r) = 0
mul_re_ax : β z w : K, re (z * w) = re z * re w - im z * im w
mul_im_ax : β z w : K, im (z * w) = re z * im w + im z * re w
conj_re_ax : β z : K, re (conj z) = re z
conj_im_ax : β z : K, im (conj z) = -im z
conj_I_ax : conj I = -I
norm_sq_eq_def_ax : β z : K, βzβ ^ 2 = re z * re z + im z * im z
mul_im_I_ax : β z : K, im z * im I = im z
[toPartialOrder : PartialOrder K]
le_iff_re_im {z w : K} : z β€ w β re z β€ re w β§ im z = im w
-- note we cannot put this in the `extends` clause
[toDecidableEq : DecidableEq K]
#align is_R_or_C RCLike
scoped[ComplexOrder] attribute [instance 100] RCLike.toPartialOrder
attribute [instance 100] RCLike.toDecidableEq
end
variable {K E : Type*} [RCLike K]
namespace RCLike
open ComplexConjugate
@[coe] abbrev ofReal : β β K := Algebra.cast
noncomputable instance (priority := 900) algebraMapCoe : CoeTC β K :=
β¨ofRealβ©
#align is_R_or_C.algebra_map_coe RCLike.algebraMapCoe
theorem ofReal_alg (x : β) : (x : K) = x β’ (1 : K) :=
Algebra.algebraMap_eq_smul_one x
#align is_R_or_C.of_real_alg RCLike.ofReal_alg
theorem real_smul_eq_coe_mul (r : β) (z : K) : r β’ z = (r : K) * z :=
Algebra.smul_def r z
#align is_R_or_C.real_smul_eq_coe_mul RCLike.real_smul_eq_coe_mul
theorem real_smul_eq_coe_smul [AddCommGroup E] [Module K E] [Module β E] [IsScalarTower β K E]
(r : β) (x : E) : r β’ x = (r : K) β’ x := by rw [RCLike.ofReal_alg, smul_one_smul]
#align is_R_or_C.real_smul_eq_coe_smul RCLike.real_smul_eq_coe_smul
theorem algebraMap_eq_ofReal : β(algebraMap β K) = ofReal :=
rfl
#align is_R_or_C.algebra_map_eq_of_real RCLike.algebraMap_eq_ofReal
@[simp, rclike_simps]
theorem re_add_im (z : K) : (re z : K) + im z * I = z :=
RCLike.re_add_im_ax z
#align is_R_or_C.re_add_im RCLike.re_add_im
@[simp, norm_cast, rclike_simps]
theorem ofReal_re : β r : β, re (r : K) = r :=
RCLike.ofReal_re_ax
#align is_R_or_C.of_real_re RCLike.ofReal_re
@[simp, norm_cast, rclike_simps]
theorem ofReal_im : β r : β, im (r : K) = 0 :=
RCLike.ofReal_im_ax
#align is_R_or_C.of_real_im RCLike.ofReal_im
@[simp, rclike_simps]
theorem mul_re : β z w : K, re (z * w) = re z * re w - im z * im w :=
RCLike.mul_re_ax
#align is_R_or_C.mul_re RCLike.mul_re
@[simp, rclike_simps]
theorem mul_im : β z w : K, im (z * w) = re z * im w + im z * re w :=
RCLike.mul_im_ax
#align is_R_or_C.mul_im RCLike.mul_im
theorem ext_iff {z w : K} : z = w β re z = re w β§ im z = im w :=
β¨fun h => h βΈ β¨rfl, rflβ©, fun β¨hβ, hββ© => re_add_im z βΈ re_add_im w βΈ hβ βΈ hβ βΈ rflβ©
#align is_R_or_C.ext_iff RCLike.ext_iff
theorem ext {z w : K} (hre : re z = re w) (him : im z = im w) : z = w :=
ext_iff.2 β¨hre, himβ©
#align is_R_or_C.ext RCLike.ext
@[norm_cast]
theorem ofReal_zero : ((0 : β) : K) = 0 :=
algebraMap.coe_zero
#align is_R_or_C.of_real_zero RCLike.ofReal_zero
@[rclike_simps]
theorem zero_re' : re (0 : K) = (0 : β) :=
map_zero re
#align is_R_or_C.zero_re' RCLike.zero_re'
@[norm_cast]
theorem ofReal_one : ((1 : β) : K) = 1 :=
map_one (algebraMap β K)
#align is_R_or_C.of_real_one RCLike.ofReal_one
@[simp, rclike_simps]
theorem one_re : re (1 : K) = 1 := by rw [β ofReal_one, ofReal_re]
#align is_R_or_C.one_re RCLike.one_re
@[simp, rclike_simps]
| Mathlib/Analysis/RCLike/Basic.lean | 166 | 166 | theorem one_im : im (1 : K) = 0 := by | rw [β ofReal_one, ofReal_im]
| 1,644 |
import Mathlib.Algebra.Algebra.RestrictScalars
import Mathlib.Analysis.NormedSpace.OperatorNorm.Basic
import Mathlib.Analysis.RCLike.Basic
#align_import analysis.normed_space.extend from "leanprover-community/mathlib"@"3f655f5297b030a87d641ad4e825af8d9679eb0b"
open RCLike
open ComplexConjugate
variable {π : Type*} [RCLike π] {F : Type*} [SeminormedAddCommGroup F] [NormedSpace π F]
namespace LinearMap
variable [Module β F] [IsScalarTower β π F]
noncomputable def extendToπ' (fr : F ββ[β] β) : F ββ[π] π := by
let fc : F β π := fun x => (fr x : π) - (I : π) * fr ((I : π) β’ x)
have add : β x y : F, fc (x + y) = fc x + fc y := by
intro x y
simp only [fc, smul_add, LinearMap.map_add, ofReal_add]
rw [mul_add]
abel
have A : β (c : β) (x : F), (fr ((c : π) β’ x) : π) = (c : π) * (fr x : π) := by
intro c x
rw [β ofReal_mul]
congr 1
rw [RCLike.ofReal_alg, smul_assoc, fr.map_smul, Algebra.id.smul_eq_mul, one_smul]
have smul_β : β (c : β) (x : F), fc ((c : π) β’ x) = (c : π) * fc x := by
intro c x
dsimp only [fc]
rw [A c x, smul_smul, mul_comm I (c : π), β smul_smul, A, mul_sub]
ring
have smul_I : β x : F, fc ((I : π) β’ x) = (I : π) * fc x := by
intro x
dsimp only [fc]
cases' @I_mul_I_ax π _ with h h
Β· simp [h]
rw [mul_sub, β mul_assoc, smul_smul, h]
simp only [neg_mul, LinearMap.map_neg, one_mul, one_smul, mul_neg, ofReal_neg, neg_smul,
sub_neg_eq_add, add_comm]
have smul_π : β (c : π) (x : F), fc (c β’ x) = c β’ fc x := by
intro c x
rw [β re_add_im c, add_smul, add_smul, add, smul_β, β smul_smul, smul_β, smul_I, β mul_assoc]
rfl
exact
{ toFun := fc
map_add' := add
map_smul' := smul_π }
#align linear_map.extend_to_π' LinearMap.extendToπ'
theorem extendToπ'_apply (fr : F ββ[β] β) (x : F) :
fr.extendToπ' x = (fr x : π) - (I : π) * (fr ((I : π) β’ x) : π) := rfl
#align linear_map.extend_to_π'_apply LinearMap.extendToπ'_apply
@[simp]
| Mathlib/Analysis/NormedSpace/Extend.lean | 88 | 90 | theorem extendToπ'_apply_re (fr : F ββ[β] β) (x : F) : re (fr.extendToπ' x : π) = fr x := by |
simp only [extendToπ'_apply, map_sub, zero_mul, mul_zero, sub_zero,
rclike_simps]
| 1,645 |
import Mathlib.Algebra.Algebra.RestrictScalars
import Mathlib.Analysis.NormedSpace.OperatorNorm.Basic
import Mathlib.Analysis.RCLike.Basic
#align_import analysis.normed_space.extend from "leanprover-community/mathlib"@"3f655f5297b030a87d641ad4e825af8d9679eb0b"
open RCLike
open ComplexConjugate
variable {π : Type*} [RCLike π] {F : Type*} [SeminormedAddCommGroup F] [NormedSpace π F]
namespace LinearMap
variable [Module β F] [IsScalarTower β π F]
noncomputable def extendToπ' (fr : F ββ[β] β) : F ββ[π] π := by
let fc : F β π := fun x => (fr x : π) - (I : π) * fr ((I : π) β’ x)
have add : β x y : F, fc (x + y) = fc x + fc y := by
intro x y
simp only [fc, smul_add, LinearMap.map_add, ofReal_add]
rw [mul_add]
abel
have A : β (c : β) (x : F), (fr ((c : π) β’ x) : π) = (c : π) * (fr x : π) := by
intro c x
rw [β ofReal_mul]
congr 1
rw [RCLike.ofReal_alg, smul_assoc, fr.map_smul, Algebra.id.smul_eq_mul, one_smul]
have smul_β : β (c : β) (x : F), fc ((c : π) β’ x) = (c : π) * fc x := by
intro c x
dsimp only [fc]
rw [A c x, smul_smul, mul_comm I (c : π), β smul_smul, A, mul_sub]
ring
have smul_I : β x : F, fc ((I : π) β’ x) = (I : π) * fc x := by
intro x
dsimp only [fc]
cases' @I_mul_I_ax π _ with h h
Β· simp [h]
rw [mul_sub, β mul_assoc, smul_smul, h]
simp only [neg_mul, LinearMap.map_neg, one_mul, one_smul, mul_neg, ofReal_neg, neg_smul,
sub_neg_eq_add, add_comm]
have smul_π : β (c : π) (x : F), fc (c β’ x) = c β’ fc x := by
intro c x
rw [β re_add_im c, add_smul, add_smul, add, smul_β, β smul_smul, smul_β, smul_I, β mul_assoc]
rfl
exact
{ toFun := fc
map_add' := add
map_smul' := smul_π }
#align linear_map.extend_to_π' LinearMap.extendToπ'
theorem extendToπ'_apply (fr : F ββ[β] β) (x : F) :
fr.extendToπ' x = (fr x : π) - (I : π) * (fr ((I : π) β’ x) : π) := rfl
#align linear_map.extend_to_π'_apply LinearMap.extendToπ'_apply
@[simp]
theorem extendToπ'_apply_re (fr : F ββ[β] β) (x : F) : re (fr.extendToπ' x : π) = fr x := by
simp only [extendToπ'_apply, map_sub, zero_mul, mul_zero, sub_zero,
rclike_simps]
#align linear_map.extend_to_π'_apply_re LinearMap.extendToπ'_apply_re
| Mathlib/Analysis/NormedSpace/Extend.lean | 93 | 99 | theorem norm_extendToπ'_apply_sq (fr : F ββ[β] β) (x : F) :
β(fr.extendToπ' x : π)β ^ 2 = fr (conj (fr.extendToπ' x : π) β’ x) :=
calc
β(fr.extendToπ' x : π)β ^ 2 = re (conj (fr.extendToπ' x) * fr.extendToπ' x : π) := by |
rw [RCLike.conj_mul, β ofReal_pow, ofReal_re]
_ = fr (conj (fr.extendToπ' x : π) β’ x) := by
rw [β smul_eq_mul, β map_smul, extendToπ'_apply_re]
| 1,645 |
import Mathlib.Analysis.LocallyConvex.Bounded
import Mathlib.Analysis.RCLike.Basic
#align_import analysis.locally_convex.continuous_of_bounded from "leanprover-community/mathlib"@"3f655f5297b030a87d641ad4e825af8d9679eb0b"
open TopologicalSpace Bornology Filter Topology Pointwise
variable {π π' E F : Type*}
variable [AddCommGroup E] [UniformSpace E] [UniformAddGroup E]
variable [AddCommGroup F] [UniformSpace F]
section RCLike
open TopologicalSpace Bornology
variable [FirstCountableTopology E]
variable [RCLike π] [Module π E] [ContinuousSMul π E]
variable [RCLike π'] [Module π' F] [ContinuousSMul π' F]
variable {Ο : π β+* π'}
| Mathlib/Analysis/LocallyConvex/ContinuousOfBounded.lean | 96 | 166 | theorem LinearMap.continuousAt_zero_of_locally_bounded (f : E βββ[Ο] F)
(hf : β s, IsVonNBounded π s β IsVonNBounded π' (f '' s)) : ContinuousAt f 0 := by |
-- Assume that f is not continuous at 0
by_contra h
-- We use a decreasing balanced basis for 0 : E and a balanced basis for 0 : F
-- and reformulate non-continuity in terms of these bases
rcases (nhds_basis_balanced π E).exists_antitone_subbasis with β¨b, bE1, bEβ©
simp only [_root_.id] at bE
have bE' : (π (0 : E)).HasBasis (fun x : β => x β 0) fun n : β => (n : π)β»ΒΉ β’ b n := by
refine bE.1.to_hasBasis ?_ ?_
Β· intro n _
use n + 1
simp only [Ne, Nat.succ_ne_zero, not_false_iff, Nat.cast_add, Nat.cast_one, true_and_iff]
-- `b (n + 1) β b n` follows from `Antitone`.
have h : b (n + 1) β b n := bE.2 (by simp)
refine _root_.trans ?_ h
rintro y β¨x, hx, hyβ©
-- Since `b (n + 1)` is balanced `(n+1)β»ΒΉ b (n + 1) β b (n + 1)`
rw [β hy]
refine (bE1 (n + 1)).2.smul_mem ?_ hx
have h' : 0 < (n : β) + 1 := n.cast_add_one_pos
rw [norm_inv, β Nat.cast_one, β Nat.cast_add, RCLike.norm_natCast, Nat.cast_add,
Nat.cast_one, inv_le h' zero_lt_one]
simp
intro n hn
-- The converse direction follows from continuity of the scalar multiplication
have hcont : ContinuousAt (fun x : E => (n : π) β’ x) 0 :=
(continuous_const_smul (n : π)).continuousAt
simp only [ContinuousAt, map_zero, smul_zero] at hcont
rw [bE.1.tendsto_left_iff] at hcont
rcases hcont (b n) (bE1 n).1 with β¨i, _, hiβ©
refine β¨i, trivial, fun x hx => β¨(n : π) β’ x, hi hx, ?_β©β©
simp [β mul_smul, hn]
rw [ContinuousAt, map_zero, bE'.tendsto_iff (nhds_basis_balanced π' F)] at h
push_neg at h
rcases h with β¨V, β¨hV, -β©, hβ©
simp only [_root_.id, forall_true_left] at h
-- There exists `u : β β E` such that for all `n : β` we have `u n β nβ»ΒΉ β’ b n` and `f (u n) β V`
choose! u hu hu' using h
-- The sequence `(fun n β¦ n β’ u n)` converges to `0`
have h_tendsto : Tendsto (fun n : β => (n : π) β’ u n) atTop (π (0 : E)) := by
apply bE.tendsto
intro n
by_cases h : n = 0
Β· rw [h, Nat.cast_zero, zero_smul]
exact mem_of_mem_nhds (bE.1.mem_of_mem <| by trivial)
rcases hu n h with β¨y, hy, hu1β©
convert hy
rw [β hu1, β mul_smul]
simp only [h, mul_inv_cancel, Ne, Nat.cast_eq_zero, not_false_iff, one_smul]
-- The image `(fun n β¦ n β’ u n)` is von Neumann bounded:
have h_bounded : IsVonNBounded π (Set.range fun n : β => (n : π) β’ u n) :=
h_tendsto.cauchySeq.totallyBounded_range.isVonNBounded π
-- Since `range u` is bounded, `V` absorbs it
rcases (hf _ h_bounded hV).exists_pos with β¨r, hr, h'β©
cases' exists_nat_gt r with n hn
-- We now find a contradiction between `f (u n) β V` and the absorbing property
have h1 : r β€ β(n : π')β := by
rw [RCLike.norm_natCast]
exact hn.le
have hn' : 0 < β(n : π')β := lt_of_lt_of_le hr h1
rw [norm_pos_iff, Ne, Nat.cast_eq_zero] at hn'
have h'' : f (u n) β V := by
simp only [Set.image_subset_iff] at h'
specialize h' (n : π') h1 (Set.mem_range_self n)
simp only [Set.mem_preimage, LinearMap.map_smulββ, map_natCast] at h'
rcases h' with β¨y, hy, h'β©
apply_fun fun y : F => (n : π')β»ΒΉ β’ y at h'
simp only [hn', inv_smul_smulβ, Ne, Nat.cast_eq_zero, not_false_iff] at h'
rwa [β h']
exact hu' n hn' h''
| 1,646 |
import Mathlib.Analysis.Convex.Topology
import Mathlib.Analysis.NormedSpace.Pointwise
import Mathlib.Analysis.Seminorm
import Mathlib.Analysis.LocallyConvex.Bounded
import Mathlib.Analysis.RCLike.Basic
#align_import analysis.convex.gauge from "leanprover-community/mathlib"@"373b03b5b9d0486534edbe94747f23cb3712f93d"
open NormedField Set
open scoped Pointwise Topology NNReal
noncomputable section
variable {π E F : Type*}
section AddCommGroup
variable [AddCommGroup E] [Module β E]
def gauge (s : Set E) (x : E) : β :=
sInf { r : β | 0 < r β§ x β r β’ s }
#align gauge gauge
variable {s t : Set E} {x : E} {a : β}
theorem gauge_def : gauge s x = sInf ({ r β Set.Ioi (0 : β) | x β r β’ s }) :=
rfl
#align gauge_def gauge_def
| Mathlib/Analysis/Convex/Gauge.lean | 66 | 68 | theorem gauge_def' : gauge s x = sInf {r β Set.Ioi (0 : β) | rβ»ΒΉ β’ x β s} := by |
congrm sInf {r | ?_}
exact and_congr_right fun hr => mem_smul_set_iff_inv_smul_memβ hr.ne' _ _
| 1,647 |
import Mathlib.Analysis.Convex.Topology
import Mathlib.Analysis.NormedSpace.Pointwise
import Mathlib.Analysis.Seminorm
import Mathlib.Analysis.LocallyConvex.Bounded
import Mathlib.Analysis.RCLike.Basic
#align_import analysis.convex.gauge from "leanprover-community/mathlib"@"373b03b5b9d0486534edbe94747f23cb3712f93d"
open NormedField Set
open scoped Pointwise Topology NNReal
noncomputable section
variable {π E F : Type*}
section AddCommGroup
variable [AddCommGroup E] [Module β E]
def gauge (s : Set E) (x : E) : β :=
sInf { r : β | 0 < r β§ x β r β’ s }
#align gauge gauge
variable {s t : Set E} {x : E} {a : β}
theorem gauge_def : gauge s x = sInf ({ r β Set.Ioi (0 : β) | x β r β’ s }) :=
rfl
#align gauge_def gauge_def
theorem gauge_def' : gauge s x = sInf {r β Set.Ioi (0 : β) | rβ»ΒΉ β’ x β s} := by
congrm sInf {r | ?_}
exact and_congr_right fun hr => mem_smul_set_iff_inv_smul_memβ hr.ne' _ _
#align gauge_def' gauge_def'
private theorem gauge_set_bddBelow : BddBelow { r : β | 0 < r β§ x β r β’ s } :=
β¨0, fun _ hr => hr.1.leβ©
theorem Absorbent.gauge_set_nonempty (absorbs : Absorbent β s) :
{ r : β | 0 < r β§ x β r β’ s }.Nonempty :=
let β¨r, hrβ, hrββ© := (absorbs x).exists_pos
β¨r, hrβ, hrβ r (Real.norm_of_nonneg hrβ.le).ge rflβ©
#align absorbent.gauge_set_nonempty Absorbent.gauge_set_nonempty
theorem gauge_mono (hs : Absorbent β s) (h : s β t) : gauge t β€ gauge s := fun _ =>
csInf_le_csInf gauge_set_bddBelow hs.gauge_set_nonempty fun _ hr => β¨hr.1, smul_set_mono h hr.2β©
#align gauge_mono gauge_mono
| Mathlib/Analysis/Convex/Gauge.lean | 86 | 89 | theorem exists_lt_of_gauge_lt (absorbs : Absorbent β s) (h : gauge s x < a) :
β b, 0 < b β§ b < a β§ x β b β’ s := by |
obtain β¨b, β¨hb, hxβ©, hbaβ© := exists_lt_of_csInf_lt absorbs.gauge_set_nonempty h
exact β¨b, hb, hba, hxβ©
| 1,647 |
import Mathlib.Analysis.Convex.Topology
import Mathlib.Analysis.NormedSpace.Pointwise
import Mathlib.Analysis.Seminorm
import Mathlib.Analysis.LocallyConvex.Bounded
import Mathlib.Analysis.RCLike.Basic
#align_import analysis.convex.gauge from "leanprover-community/mathlib"@"373b03b5b9d0486534edbe94747f23cb3712f93d"
open NormedField Set
open scoped Pointwise Topology NNReal
noncomputable section
variable {π E F : Type*}
section AddCommGroup
variable [AddCommGroup E] [Module β E]
def gauge (s : Set E) (x : E) : β :=
sInf { r : β | 0 < r β§ x β r β’ s }
#align gauge gauge
variable {s t : Set E} {x : E} {a : β}
theorem gauge_def : gauge s x = sInf ({ r β Set.Ioi (0 : β) | x β r β’ s }) :=
rfl
#align gauge_def gauge_def
theorem gauge_def' : gauge s x = sInf {r β Set.Ioi (0 : β) | rβ»ΒΉ β’ x β s} := by
congrm sInf {r | ?_}
exact and_congr_right fun hr => mem_smul_set_iff_inv_smul_memβ hr.ne' _ _
#align gauge_def' gauge_def'
private theorem gauge_set_bddBelow : BddBelow { r : β | 0 < r β§ x β r β’ s } :=
β¨0, fun _ hr => hr.1.leβ©
theorem Absorbent.gauge_set_nonempty (absorbs : Absorbent β s) :
{ r : β | 0 < r β§ x β r β’ s }.Nonempty :=
let β¨r, hrβ, hrββ© := (absorbs x).exists_pos
β¨r, hrβ, hrβ r (Real.norm_of_nonneg hrβ.le).ge rflβ©
#align absorbent.gauge_set_nonempty Absorbent.gauge_set_nonempty
theorem gauge_mono (hs : Absorbent β s) (h : s β t) : gauge t β€ gauge s := fun _ =>
csInf_le_csInf gauge_set_bddBelow hs.gauge_set_nonempty fun _ hr => β¨hr.1, smul_set_mono h hr.2β©
#align gauge_mono gauge_mono
theorem exists_lt_of_gauge_lt (absorbs : Absorbent β s) (h : gauge s x < a) :
β b, 0 < b β§ b < a β§ x β b β’ s := by
obtain β¨b, β¨hb, hxβ©, hbaβ© := exists_lt_of_csInf_lt absorbs.gauge_set_nonempty h
exact β¨b, hb, hba, hxβ©
#align exists_lt_of_gauge_lt exists_lt_of_gauge_lt
@[simp]
| Mathlib/Analysis/Convex/Gauge.lean | 95 | 99 | theorem gauge_zero : gauge s 0 = 0 := by |
rw [gauge_def']
by_cases h : (0 : E) β s
Β· simp only [smul_zero, sep_true, h, csInf_Ioi]
Β· simp only [smul_zero, sep_false, h, Real.sInf_empty]
| 1,647 |
import Mathlib.Analysis.Convex.Topology
import Mathlib.Analysis.NormedSpace.Pointwise
import Mathlib.Analysis.Seminorm
import Mathlib.Analysis.LocallyConvex.Bounded
import Mathlib.Analysis.RCLike.Basic
#align_import analysis.convex.gauge from "leanprover-community/mathlib"@"373b03b5b9d0486534edbe94747f23cb3712f93d"
open NormedField Set
open scoped Pointwise Topology NNReal
noncomputable section
variable {π E F : Type*}
section AddCommGroup
variable [AddCommGroup E] [Module β E]
def gauge (s : Set E) (x : E) : β :=
sInf { r : β | 0 < r β§ x β r β’ s }
#align gauge gauge
variable {s t : Set E} {x : E} {a : β}
theorem gauge_def : gauge s x = sInf ({ r β Set.Ioi (0 : β) | x β r β’ s }) :=
rfl
#align gauge_def gauge_def
theorem gauge_def' : gauge s x = sInf {r β Set.Ioi (0 : β) | rβ»ΒΉ β’ x β s} := by
congrm sInf {r | ?_}
exact and_congr_right fun hr => mem_smul_set_iff_inv_smul_memβ hr.ne' _ _
#align gauge_def' gauge_def'
private theorem gauge_set_bddBelow : BddBelow { r : β | 0 < r β§ x β r β’ s } :=
β¨0, fun _ hr => hr.1.leβ©
theorem Absorbent.gauge_set_nonempty (absorbs : Absorbent β s) :
{ r : β | 0 < r β§ x β r β’ s }.Nonempty :=
let β¨r, hrβ, hrββ© := (absorbs x).exists_pos
β¨r, hrβ, hrβ r (Real.norm_of_nonneg hrβ.le).ge rflβ©
#align absorbent.gauge_set_nonempty Absorbent.gauge_set_nonempty
theorem gauge_mono (hs : Absorbent β s) (h : s β t) : gauge t β€ gauge s := fun _ =>
csInf_le_csInf gauge_set_bddBelow hs.gauge_set_nonempty fun _ hr => β¨hr.1, smul_set_mono h hr.2β©
#align gauge_mono gauge_mono
theorem exists_lt_of_gauge_lt (absorbs : Absorbent β s) (h : gauge s x < a) :
β b, 0 < b β§ b < a β§ x β b β’ s := by
obtain β¨b, β¨hb, hxβ©, hbaβ© := exists_lt_of_csInf_lt absorbs.gauge_set_nonempty h
exact β¨b, hb, hba, hxβ©
#align exists_lt_of_gauge_lt exists_lt_of_gauge_lt
@[simp]
theorem gauge_zero : gauge s 0 = 0 := by
rw [gauge_def']
by_cases h : (0 : E) β s
Β· simp only [smul_zero, sep_true, h, csInf_Ioi]
Β· simp only [smul_zero, sep_false, h, Real.sInf_empty]
#align gauge_zero gauge_zero
@[simp]
| Mathlib/Analysis/Convex/Gauge.lean | 103 | 110 | theorem gauge_zero' : gauge (0 : Set E) = 0 := by |
ext x
rw [gauge_def']
obtain rfl | hx := eq_or_ne x 0
Β· simp only [csInf_Ioi, mem_zero, Pi.zero_apply, eq_self_iff_true, sep_true, smul_zero]
Β· simp only [mem_zero, Pi.zero_apply, inv_eq_zero, smul_eq_zero]
convert Real.sInf_empty
exact eq_empty_iff_forall_not_mem.2 fun r hr => hr.2.elim (ne_of_gt hr.1) hx
| 1,647 |
import Mathlib.Analysis.Convex.Topology
import Mathlib.Analysis.NormedSpace.Pointwise
import Mathlib.Analysis.Seminorm
import Mathlib.Analysis.LocallyConvex.Bounded
import Mathlib.Analysis.RCLike.Basic
#align_import analysis.convex.gauge from "leanprover-community/mathlib"@"373b03b5b9d0486534edbe94747f23cb3712f93d"
open NormedField Set
open scoped Pointwise Topology NNReal
noncomputable section
variable {π E F : Type*}
section AddCommGroup
variable [AddCommGroup E] [Module β E]
def gauge (s : Set E) (x : E) : β :=
sInf { r : β | 0 < r β§ x β r β’ s }
#align gauge gauge
variable {s t : Set E} {x : E} {a : β}
theorem gauge_def : gauge s x = sInf ({ r β Set.Ioi (0 : β) | x β r β’ s }) :=
rfl
#align gauge_def gauge_def
theorem gauge_def' : gauge s x = sInf {r β Set.Ioi (0 : β) | rβ»ΒΉ β’ x β s} := by
congrm sInf {r | ?_}
exact and_congr_right fun hr => mem_smul_set_iff_inv_smul_memβ hr.ne' _ _
#align gauge_def' gauge_def'
private theorem gauge_set_bddBelow : BddBelow { r : β | 0 < r β§ x β r β’ s } :=
β¨0, fun _ hr => hr.1.leβ©
theorem Absorbent.gauge_set_nonempty (absorbs : Absorbent β s) :
{ r : β | 0 < r β§ x β r β’ s }.Nonempty :=
let β¨r, hrβ, hrββ© := (absorbs x).exists_pos
β¨r, hrβ, hrβ r (Real.norm_of_nonneg hrβ.le).ge rflβ©
#align absorbent.gauge_set_nonempty Absorbent.gauge_set_nonempty
theorem gauge_mono (hs : Absorbent β s) (h : s β t) : gauge t β€ gauge s := fun _ =>
csInf_le_csInf gauge_set_bddBelow hs.gauge_set_nonempty fun _ hr => β¨hr.1, smul_set_mono h hr.2β©
#align gauge_mono gauge_mono
theorem exists_lt_of_gauge_lt (absorbs : Absorbent β s) (h : gauge s x < a) :
β b, 0 < b β§ b < a β§ x β b β’ s := by
obtain β¨b, β¨hb, hxβ©, hbaβ© := exists_lt_of_csInf_lt absorbs.gauge_set_nonempty h
exact β¨b, hb, hba, hxβ©
#align exists_lt_of_gauge_lt exists_lt_of_gauge_lt
@[simp]
theorem gauge_zero : gauge s 0 = 0 := by
rw [gauge_def']
by_cases h : (0 : E) β s
Β· simp only [smul_zero, sep_true, h, csInf_Ioi]
Β· simp only [smul_zero, sep_false, h, Real.sInf_empty]
#align gauge_zero gauge_zero
@[simp]
theorem gauge_zero' : gauge (0 : Set E) = 0 := by
ext x
rw [gauge_def']
obtain rfl | hx := eq_or_ne x 0
Β· simp only [csInf_Ioi, mem_zero, Pi.zero_apply, eq_self_iff_true, sep_true, smul_zero]
Β· simp only [mem_zero, Pi.zero_apply, inv_eq_zero, smul_eq_zero]
convert Real.sInf_empty
exact eq_empty_iff_forall_not_mem.2 fun r hr => hr.2.elim (ne_of_gt hr.1) hx
#align gauge_zero' gauge_zero'
@[simp]
| Mathlib/Analysis/Convex/Gauge.lean | 114 | 116 | theorem gauge_empty : gauge (β
: Set E) = 0 := by |
ext
simp only [gauge_def', Real.sInf_empty, mem_empty_iff_false, Pi.zero_apply, sep_false]
| 1,647 |
import Mathlib.Analysis.Convex.Topology
import Mathlib.Analysis.NormedSpace.Pointwise
import Mathlib.Analysis.Seminorm
import Mathlib.Analysis.LocallyConvex.Bounded
import Mathlib.Analysis.RCLike.Basic
#align_import analysis.convex.gauge from "leanprover-community/mathlib"@"373b03b5b9d0486534edbe94747f23cb3712f93d"
open NormedField Set
open scoped Pointwise Topology NNReal
noncomputable section
variable {π E F : Type*}
section AddCommGroup
variable [AddCommGroup E] [Module β E]
def gauge (s : Set E) (x : E) : β :=
sInf { r : β | 0 < r β§ x β r β’ s }
#align gauge gauge
variable {s t : Set E} {x : E} {a : β}
theorem gauge_def : gauge s x = sInf ({ r β Set.Ioi (0 : β) | x β r β’ s }) :=
rfl
#align gauge_def gauge_def
theorem gauge_def' : gauge s x = sInf {r β Set.Ioi (0 : β) | rβ»ΒΉ β’ x β s} := by
congrm sInf {r | ?_}
exact and_congr_right fun hr => mem_smul_set_iff_inv_smul_memβ hr.ne' _ _
#align gauge_def' gauge_def'
private theorem gauge_set_bddBelow : BddBelow { r : β | 0 < r β§ x β r β’ s } :=
β¨0, fun _ hr => hr.1.leβ©
theorem Absorbent.gauge_set_nonempty (absorbs : Absorbent β s) :
{ r : β | 0 < r β§ x β r β’ s }.Nonempty :=
let β¨r, hrβ, hrββ© := (absorbs x).exists_pos
β¨r, hrβ, hrβ r (Real.norm_of_nonneg hrβ.le).ge rflβ©
#align absorbent.gauge_set_nonempty Absorbent.gauge_set_nonempty
theorem gauge_mono (hs : Absorbent β s) (h : s β t) : gauge t β€ gauge s := fun _ =>
csInf_le_csInf gauge_set_bddBelow hs.gauge_set_nonempty fun _ hr => β¨hr.1, smul_set_mono h hr.2β©
#align gauge_mono gauge_mono
theorem exists_lt_of_gauge_lt (absorbs : Absorbent β s) (h : gauge s x < a) :
β b, 0 < b β§ b < a β§ x β b β’ s := by
obtain β¨b, β¨hb, hxβ©, hbaβ© := exists_lt_of_csInf_lt absorbs.gauge_set_nonempty h
exact β¨b, hb, hba, hxβ©
#align exists_lt_of_gauge_lt exists_lt_of_gauge_lt
@[simp]
theorem gauge_zero : gauge s 0 = 0 := by
rw [gauge_def']
by_cases h : (0 : E) β s
Β· simp only [smul_zero, sep_true, h, csInf_Ioi]
Β· simp only [smul_zero, sep_false, h, Real.sInf_empty]
#align gauge_zero gauge_zero
@[simp]
theorem gauge_zero' : gauge (0 : Set E) = 0 := by
ext x
rw [gauge_def']
obtain rfl | hx := eq_or_ne x 0
Β· simp only [csInf_Ioi, mem_zero, Pi.zero_apply, eq_self_iff_true, sep_true, smul_zero]
Β· simp only [mem_zero, Pi.zero_apply, inv_eq_zero, smul_eq_zero]
convert Real.sInf_empty
exact eq_empty_iff_forall_not_mem.2 fun r hr => hr.2.elim (ne_of_gt hr.1) hx
#align gauge_zero' gauge_zero'
@[simp]
theorem gauge_empty : gauge (β
: Set E) = 0 := by
ext
simp only [gauge_def', Real.sInf_empty, mem_empty_iff_false, Pi.zero_apply, sep_false]
#align gauge_empty gauge_empty
| Mathlib/Analysis/Convex/Gauge.lean | 119 | 121 | theorem gauge_of_subset_zero (h : s β 0) : gauge s = 0 := by |
obtain rfl | rfl := subset_singleton_iff_eq.1 h
exacts [gauge_empty, gauge_zero']
| 1,647 |
import Mathlib.Analysis.Convex.Topology
import Mathlib.Analysis.NormedSpace.Pointwise
import Mathlib.Analysis.Seminorm
import Mathlib.Analysis.LocallyConvex.Bounded
import Mathlib.Analysis.RCLike.Basic
#align_import analysis.convex.gauge from "leanprover-community/mathlib"@"373b03b5b9d0486534edbe94747f23cb3712f93d"
open NormedField Set
open scoped Pointwise Topology NNReal
noncomputable section
variable {π E F : Type*}
section AddCommGroup
variable [AddCommGroup E] [Module β E]
def gauge (s : Set E) (x : E) : β :=
sInf { r : β | 0 < r β§ x β r β’ s }
#align gauge gauge
variable {s t : Set E} {x : E} {a : β}
theorem gauge_def : gauge s x = sInf ({ r β Set.Ioi (0 : β) | x β r β’ s }) :=
rfl
#align gauge_def gauge_def
theorem gauge_def' : gauge s x = sInf {r β Set.Ioi (0 : β) | rβ»ΒΉ β’ x β s} := by
congrm sInf {r | ?_}
exact and_congr_right fun hr => mem_smul_set_iff_inv_smul_memβ hr.ne' _ _
#align gauge_def' gauge_def'
private theorem gauge_set_bddBelow : BddBelow { r : β | 0 < r β§ x β r β’ s } :=
β¨0, fun _ hr => hr.1.leβ©
theorem Absorbent.gauge_set_nonempty (absorbs : Absorbent β s) :
{ r : β | 0 < r β§ x β r β’ s }.Nonempty :=
let β¨r, hrβ, hrββ© := (absorbs x).exists_pos
β¨r, hrβ, hrβ r (Real.norm_of_nonneg hrβ.le).ge rflβ©
#align absorbent.gauge_set_nonempty Absorbent.gauge_set_nonempty
theorem gauge_mono (hs : Absorbent β s) (h : s β t) : gauge t β€ gauge s := fun _ =>
csInf_le_csInf gauge_set_bddBelow hs.gauge_set_nonempty fun _ hr => β¨hr.1, smul_set_mono h hr.2β©
#align gauge_mono gauge_mono
theorem exists_lt_of_gauge_lt (absorbs : Absorbent β s) (h : gauge s x < a) :
β b, 0 < b β§ b < a β§ x β b β’ s := by
obtain β¨b, β¨hb, hxβ©, hbaβ© := exists_lt_of_csInf_lt absorbs.gauge_set_nonempty h
exact β¨b, hb, hba, hxβ©
#align exists_lt_of_gauge_lt exists_lt_of_gauge_lt
@[simp]
theorem gauge_zero : gauge s 0 = 0 := by
rw [gauge_def']
by_cases h : (0 : E) β s
Β· simp only [smul_zero, sep_true, h, csInf_Ioi]
Β· simp only [smul_zero, sep_false, h, Real.sInf_empty]
#align gauge_zero gauge_zero
@[simp]
theorem gauge_zero' : gauge (0 : Set E) = 0 := by
ext x
rw [gauge_def']
obtain rfl | hx := eq_or_ne x 0
Β· simp only [csInf_Ioi, mem_zero, Pi.zero_apply, eq_self_iff_true, sep_true, smul_zero]
Β· simp only [mem_zero, Pi.zero_apply, inv_eq_zero, smul_eq_zero]
convert Real.sInf_empty
exact eq_empty_iff_forall_not_mem.2 fun r hr => hr.2.elim (ne_of_gt hr.1) hx
#align gauge_zero' gauge_zero'
@[simp]
theorem gauge_empty : gauge (β
: Set E) = 0 := by
ext
simp only [gauge_def', Real.sInf_empty, mem_empty_iff_false, Pi.zero_apply, sep_false]
#align gauge_empty gauge_empty
theorem gauge_of_subset_zero (h : s β 0) : gauge s = 0 := by
obtain rfl | rfl := subset_singleton_iff_eq.1 h
exacts [gauge_empty, gauge_zero']
#align gauge_of_subset_zero gauge_of_subset_zero
theorem gauge_nonneg (x : E) : 0 β€ gauge s x :=
Real.sInf_nonneg _ fun _ hx => hx.1.le
#align gauge_nonneg gauge_nonneg
| Mathlib/Analysis/Convex/Gauge.lean | 129 | 131 | theorem gauge_neg (symmetric : β x β s, -x β s) (x : E) : gauge s (-x) = gauge s x := by |
have : β x, -x β s β x β s := fun x => β¨fun h => by simpa using symmetric _ h, symmetric xβ©
simp_rw [gauge_def', smul_neg, this]
| 1,647 |
import Mathlib.Analysis.Convex.Topology
import Mathlib.Analysis.NormedSpace.Pointwise
import Mathlib.Analysis.Seminorm
import Mathlib.Analysis.LocallyConvex.Bounded
import Mathlib.Analysis.RCLike.Basic
#align_import analysis.convex.gauge from "leanprover-community/mathlib"@"373b03b5b9d0486534edbe94747f23cb3712f93d"
open NormedField Set
open scoped Pointwise Topology NNReal
noncomputable section
variable {π E F : Type*}
section AddCommGroup
variable [AddCommGroup E] [Module β E]
def gauge (s : Set E) (x : E) : β :=
sInf { r : β | 0 < r β§ x β r β’ s }
#align gauge gauge
variable {s t : Set E} {x : E} {a : β}
theorem gauge_def : gauge s x = sInf ({ r β Set.Ioi (0 : β) | x β r β’ s }) :=
rfl
#align gauge_def gauge_def
theorem gauge_def' : gauge s x = sInf {r β Set.Ioi (0 : β) | rβ»ΒΉ β’ x β s} := by
congrm sInf {r | ?_}
exact and_congr_right fun hr => mem_smul_set_iff_inv_smul_memβ hr.ne' _ _
#align gauge_def' gauge_def'
private theorem gauge_set_bddBelow : BddBelow { r : β | 0 < r β§ x β r β’ s } :=
β¨0, fun _ hr => hr.1.leβ©
theorem Absorbent.gauge_set_nonempty (absorbs : Absorbent β s) :
{ r : β | 0 < r β§ x β r β’ s }.Nonempty :=
let β¨r, hrβ, hrββ© := (absorbs x).exists_pos
β¨r, hrβ, hrβ r (Real.norm_of_nonneg hrβ.le).ge rflβ©
#align absorbent.gauge_set_nonempty Absorbent.gauge_set_nonempty
theorem gauge_mono (hs : Absorbent β s) (h : s β t) : gauge t β€ gauge s := fun _ =>
csInf_le_csInf gauge_set_bddBelow hs.gauge_set_nonempty fun _ hr => β¨hr.1, smul_set_mono h hr.2β©
#align gauge_mono gauge_mono
theorem exists_lt_of_gauge_lt (absorbs : Absorbent β s) (h : gauge s x < a) :
β b, 0 < b β§ b < a β§ x β b β’ s := by
obtain β¨b, β¨hb, hxβ©, hbaβ© := exists_lt_of_csInf_lt absorbs.gauge_set_nonempty h
exact β¨b, hb, hba, hxβ©
#align exists_lt_of_gauge_lt exists_lt_of_gauge_lt
@[simp]
theorem gauge_zero : gauge s 0 = 0 := by
rw [gauge_def']
by_cases h : (0 : E) β s
Β· simp only [smul_zero, sep_true, h, csInf_Ioi]
Β· simp only [smul_zero, sep_false, h, Real.sInf_empty]
#align gauge_zero gauge_zero
@[simp]
theorem gauge_zero' : gauge (0 : Set E) = 0 := by
ext x
rw [gauge_def']
obtain rfl | hx := eq_or_ne x 0
Β· simp only [csInf_Ioi, mem_zero, Pi.zero_apply, eq_self_iff_true, sep_true, smul_zero]
Β· simp only [mem_zero, Pi.zero_apply, inv_eq_zero, smul_eq_zero]
convert Real.sInf_empty
exact eq_empty_iff_forall_not_mem.2 fun r hr => hr.2.elim (ne_of_gt hr.1) hx
#align gauge_zero' gauge_zero'
@[simp]
theorem gauge_empty : gauge (β
: Set E) = 0 := by
ext
simp only [gauge_def', Real.sInf_empty, mem_empty_iff_false, Pi.zero_apply, sep_false]
#align gauge_empty gauge_empty
theorem gauge_of_subset_zero (h : s β 0) : gauge s = 0 := by
obtain rfl | rfl := subset_singleton_iff_eq.1 h
exacts [gauge_empty, gauge_zero']
#align gauge_of_subset_zero gauge_of_subset_zero
theorem gauge_nonneg (x : E) : 0 β€ gauge s x :=
Real.sInf_nonneg _ fun _ hx => hx.1.le
#align gauge_nonneg gauge_nonneg
theorem gauge_neg (symmetric : β x β s, -x β s) (x : E) : gauge s (-x) = gauge s x := by
have : β x, -x β s β x β s := fun x => β¨fun h => by simpa using symmetric _ h, symmetric xβ©
simp_rw [gauge_def', smul_neg, this]
#align gauge_neg gauge_neg
| Mathlib/Analysis/Convex/Gauge.lean | 134 | 135 | theorem gauge_neg_set_neg (x : E) : gauge (-s) (-x) = gauge s x := by |
simp_rw [gauge_def', smul_neg, neg_mem_neg]
| 1,647 |
import Mathlib.Analysis.Convex.Topology
import Mathlib.Analysis.NormedSpace.Pointwise
import Mathlib.Analysis.Seminorm
import Mathlib.Analysis.LocallyConvex.Bounded
import Mathlib.Analysis.RCLike.Basic
#align_import analysis.convex.gauge from "leanprover-community/mathlib"@"373b03b5b9d0486534edbe94747f23cb3712f93d"
open NormedField Set
open scoped Pointwise Topology NNReal
noncomputable section
variable {π E F : Type*}
section AddCommGroup
variable [AddCommGroup E] [Module β E]
def gauge (s : Set E) (x : E) : β :=
sInf { r : β | 0 < r β§ x β r β’ s }
#align gauge gauge
variable {s t : Set E} {x : E} {a : β}
theorem gauge_def : gauge s x = sInf ({ r β Set.Ioi (0 : β) | x β r β’ s }) :=
rfl
#align gauge_def gauge_def
theorem gauge_def' : gauge s x = sInf {r β Set.Ioi (0 : β) | rβ»ΒΉ β’ x β s} := by
congrm sInf {r | ?_}
exact and_congr_right fun hr => mem_smul_set_iff_inv_smul_memβ hr.ne' _ _
#align gauge_def' gauge_def'
private theorem gauge_set_bddBelow : BddBelow { r : β | 0 < r β§ x β r β’ s } :=
β¨0, fun _ hr => hr.1.leβ©
theorem Absorbent.gauge_set_nonempty (absorbs : Absorbent β s) :
{ r : β | 0 < r β§ x β r β’ s }.Nonempty :=
let β¨r, hrβ, hrββ© := (absorbs x).exists_pos
β¨r, hrβ, hrβ r (Real.norm_of_nonneg hrβ.le).ge rflβ©
#align absorbent.gauge_set_nonempty Absorbent.gauge_set_nonempty
theorem gauge_mono (hs : Absorbent β s) (h : s β t) : gauge t β€ gauge s := fun _ =>
csInf_le_csInf gauge_set_bddBelow hs.gauge_set_nonempty fun _ hr => β¨hr.1, smul_set_mono h hr.2β©
#align gauge_mono gauge_mono
theorem exists_lt_of_gauge_lt (absorbs : Absorbent β s) (h : gauge s x < a) :
β b, 0 < b β§ b < a β§ x β b β’ s := by
obtain β¨b, β¨hb, hxβ©, hbaβ© := exists_lt_of_csInf_lt absorbs.gauge_set_nonempty h
exact β¨b, hb, hba, hxβ©
#align exists_lt_of_gauge_lt exists_lt_of_gauge_lt
@[simp]
theorem gauge_zero : gauge s 0 = 0 := by
rw [gauge_def']
by_cases h : (0 : E) β s
Β· simp only [smul_zero, sep_true, h, csInf_Ioi]
Β· simp only [smul_zero, sep_false, h, Real.sInf_empty]
#align gauge_zero gauge_zero
@[simp]
theorem gauge_zero' : gauge (0 : Set E) = 0 := by
ext x
rw [gauge_def']
obtain rfl | hx := eq_or_ne x 0
Β· simp only [csInf_Ioi, mem_zero, Pi.zero_apply, eq_self_iff_true, sep_true, smul_zero]
Β· simp only [mem_zero, Pi.zero_apply, inv_eq_zero, smul_eq_zero]
convert Real.sInf_empty
exact eq_empty_iff_forall_not_mem.2 fun r hr => hr.2.elim (ne_of_gt hr.1) hx
#align gauge_zero' gauge_zero'
@[simp]
theorem gauge_empty : gauge (β
: Set E) = 0 := by
ext
simp only [gauge_def', Real.sInf_empty, mem_empty_iff_false, Pi.zero_apply, sep_false]
#align gauge_empty gauge_empty
theorem gauge_of_subset_zero (h : s β 0) : gauge s = 0 := by
obtain rfl | rfl := subset_singleton_iff_eq.1 h
exacts [gauge_empty, gauge_zero']
#align gauge_of_subset_zero gauge_of_subset_zero
theorem gauge_nonneg (x : E) : 0 β€ gauge s x :=
Real.sInf_nonneg _ fun _ hx => hx.1.le
#align gauge_nonneg gauge_nonneg
theorem gauge_neg (symmetric : β x β s, -x β s) (x : E) : gauge s (-x) = gauge s x := by
have : β x, -x β s β x β s := fun x => β¨fun h => by simpa using symmetric _ h, symmetric xβ©
simp_rw [gauge_def', smul_neg, this]
#align gauge_neg gauge_neg
theorem gauge_neg_set_neg (x : E) : gauge (-s) (-x) = gauge s x := by
simp_rw [gauge_def', smul_neg, neg_mem_neg]
#align gauge_neg_set_neg gauge_neg_set_neg
| Mathlib/Analysis/Convex/Gauge.lean | 138 | 139 | theorem gauge_neg_set_eq_gauge_neg (x : E) : gauge (-s) x = gauge s (-x) := by |
rw [β gauge_neg_set_neg, neg_neg]
| 1,647 |
import Mathlib.Analysis.Convex.Topology
import Mathlib.Analysis.NormedSpace.Pointwise
import Mathlib.Analysis.Seminorm
import Mathlib.Analysis.LocallyConvex.Bounded
import Mathlib.Analysis.RCLike.Basic
#align_import analysis.convex.gauge from "leanprover-community/mathlib"@"373b03b5b9d0486534edbe94747f23cb3712f93d"
open NormedField Set
open scoped Pointwise Topology NNReal
noncomputable section
variable {π E F : Type*}
section AddCommGroup
variable [AddCommGroup E] [Module β E]
def gauge (s : Set E) (x : E) : β :=
sInf { r : β | 0 < r β§ x β r β’ s }
#align gauge gauge
variable {s t : Set E} {x : E} {a : β}
theorem gauge_def : gauge s x = sInf ({ r β Set.Ioi (0 : β) | x β r β’ s }) :=
rfl
#align gauge_def gauge_def
theorem gauge_def' : gauge s x = sInf {r β Set.Ioi (0 : β) | rβ»ΒΉ β’ x β s} := by
congrm sInf {r | ?_}
exact and_congr_right fun hr => mem_smul_set_iff_inv_smul_memβ hr.ne' _ _
#align gauge_def' gauge_def'
private theorem gauge_set_bddBelow : BddBelow { r : β | 0 < r β§ x β r β’ s } :=
β¨0, fun _ hr => hr.1.leβ©
theorem Absorbent.gauge_set_nonempty (absorbs : Absorbent β s) :
{ r : β | 0 < r β§ x β r β’ s }.Nonempty :=
let β¨r, hrβ, hrββ© := (absorbs x).exists_pos
β¨r, hrβ, hrβ r (Real.norm_of_nonneg hrβ.le).ge rflβ©
#align absorbent.gauge_set_nonempty Absorbent.gauge_set_nonempty
theorem gauge_mono (hs : Absorbent β s) (h : s β t) : gauge t β€ gauge s := fun _ =>
csInf_le_csInf gauge_set_bddBelow hs.gauge_set_nonempty fun _ hr => β¨hr.1, smul_set_mono h hr.2β©
#align gauge_mono gauge_mono
theorem exists_lt_of_gauge_lt (absorbs : Absorbent β s) (h : gauge s x < a) :
β b, 0 < b β§ b < a β§ x β b β’ s := by
obtain β¨b, β¨hb, hxβ©, hbaβ© := exists_lt_of_csInf_lt absorbs.gauge_set_nonempty h
exact β¨b, hb, hba, hxβ©
#align exists_lt_of_gauge_lt exists_lt_of_gauge_lt
@[simp]
theorem gauge_zero : gauge s 0 = 0 := by
rw [gauge_def']
by_cases h : (0 : E) β s
Β· simp only [smul_zero, sep_true, h, csInf_Ioi]
Β· simp only [smul_zero, sep_false, h, Real.sInf_empty]
#align gauge_zero gauge_zero
@[simp]
theorem gauge_zero' : gauge (0 : Set E) = 0 := by
ext x
rw [gauge_def']
obtain rfl | hx := eq_or_ne x 0
Β· simp only [csInf_Ioi, mem_zero, Pi.zero_apply, eq_self_iff_true, sep_true, smul_zero]
Β· simp only [mem_zero, Pi.zero_apply, inv_eq_zero, smul_eq_zero]
convert Real.sInf_empty
exact eq_empty_iff_forall_not_mem.2 fun r hr => hr.2.elim (ne_of_gt hr.1) hx
#align gauge_zero' gauge_zero'
@[simp]
theorem gauge_empty : gauge (β
: Set E) = 0 := by
ext
simp only [gauge_def', Real.sInf_empty, mem_empty_iff_false, Pi.zero_apply, sep_false]
#align gauge_empty gauge_empty
theorem gauge_of_subset_zero (h : s β 0) : gauge s = 0 := by
obtain rfl | rfl := subset_singleton_iff_eq.1 h
exacts [gauge_empty, gauge_zero']
#align gauge_of_subset_zero gauge_of_subset_zero
theorem gauge_nonneg (x : E) : 0 β€ gauge s x :=
Real.sInf_nonneg _ fun _ hx => hx.1.le
#align gauge_nonneg gauge_nonneg
theorem gauge_neg (symmetric : β x β s, -x β s) (x : E) : gauge s (-x) = gauge s x := by
have : β x, -x β s β x β s := fun x => β¨fun h => by simpa using symmetric _ h, symmetric xβ©
simp_rw [gauge_def', smul_neg, this]
#align gauge_neg gauge_neg
theorem gauge_neg_set_neg (x : E) : gauge (-s) (-x) = gauge s x := by
simp_rw [gauge_def', smul_neg, neg_mem_neg]
#align gauge_neg_set_neg gauge_neg_set_neg
theorem gauge_neg_set_eq_gauge_neg (x : E) : gauge (-s) x = gauge s (-x) := by
rw [β gauge_neg_set_neg, neg_neg]
#align gauge_neg_set_eq_gauge_neg gauge_neg_set_eq_gauge_neg
| Mathlib/Analysis/Convex/Gauge.lean | 142 | 145 | theorem gauge_le_of_mem (ha : 0 β€ a) (hx : x β a β’ s) : gauge s x β€ a := by |
obtain rfl | ha' := ha.eq_or_lt
Β· rw [mem_singleton_iff.1 (zero_smul_set_subset _ hx), gauge_zero]
Β· exact csInf_le gauge_set_bddBelow β¨ha', hxβ©
| 1,647 |
import Mathlib.Analysis.Convex.Topology
import Mathlib.Analysis.NormedSpace.Pointwise
import Mathlib.Analysis.Seminorm
import Mathlib.Analysis.LocallyConvex.Bounded
import Mathlib.Analysis.RCLike.Basic
#align_import analysis.convex.gauge from "leanprover-community/mathlib"@"373b03b5b9d0486534edbe94747f23cb3712f93d"
open NormedField Set
open scoped Pointwise Topology NNReal
noncomputable section
variable {π E F : Type*}
section AddCommGroup
variable [AddCommGroup E] [Module β E]
def gauge (s : Set E) (x : E) : β :=
sInf { r : β | 0 < r β§ x β r β’ s }
#align gauge gauge
variable {s t : Set E} {x : E} {a : β}
theorem gauge_def : gauge s x = sInf ({ r β Set.Ioi (0 : β) | x β r β’ s }) :=
rfl
#align gauge_def gauge_def
theorem gauge_def' : gauge s x = sInf {r β Set.Ioi (0 : β) | rβ»ΒΉ β’ x β s} := by
congrm sInf {r | ?_}
exact and_congr_right fun hr => mem_smul_set_iff_inv_smul_memβ hr.ne' _ _
#align gauge_def' gauge_def'
private theorem gauge_set_bddBelow : BddBelow { r : β | 0 < r β§ x β r β’ s } :=
β¨0, fun _ hr => hr.1.leβ©
theorem Absorbent.gauge_set_nonempty (absorbs : Absorbent β s) :
{ r : β | 0 < r β§ x β r β’ s }.Nonempty :=
let β¨r, hrβ, hrββ© := (absorbs x).exists_pos
β¨r, hrβ, hrβ r (Real.norm_of_nonneg hrβ.le).ge rflβ©
#align absorbent.gauge_set_nonempty Absorbent.gauge_set_nonempty
theorem gauge_mono (hs : Absorbent β s) (h : s β t) : gauge t β€ gauge s := fun _ =>
csInf_le_csInf gauge_set_bddBelow hs.gauge_set_nonempty fun _ hr => β¨hr.1, smul_set_mono h hr.2β©
#align gauge_mono gauge_mono
theorem exists_lt_of_gauge_lt (absorbs : Absorbent β s) (h : gauge s x < a) :
β b, 0 < b β§ b < a β§ x β b β’ s := by
obtain β¨b, β¨hb, hxβ©, hbaβ© := exists_lt_of_csInf_lt absorbs.gauge_set_nonempty h
exact β¨b, hb, hba, hxβ©
#align exists_lt_of_gauge_lt exists_lt_of_gauge_lt
@[simp]
theorem gauge_zero : gauge s 0 = 0 := by
rw [gauge_def']
by_cases h : (0 : E) β s
Β· simp only [smul_zero, sep_true, h, csInf_Ioi]
Β· simp only [smul_zero, sep_false, h, Real.sInf_empty]
#align gauge_zero gauge_zero
@[simp]
theorem gauge_zero' : gauge (0 : Set E) = 0 := by
ext x
rw [gauge_def']
obtain rfl | hx := eq_or_ne x 0
Β· simp only [csInf_Ioi, mem_zero, Pi.zero_apply, eq_self_iff_true, sep_true, smul_zero]
Β· simp only [mem_zero, Pi.zero_apply, inv_eq_zero, smul_eq_zero]
convert Real.sInf_empty
exact eq_empty_iff_forall_not_mem.2 fun r hr => hr.2.elim (ne_of_gt hr.1) hx
#align gauge_zero' gauge_zero'
@[simp]
theorem gauge_empty : gauge (β
: Set E) = 0 := by
ext
simp only [gauge_def', Real.sInf_empty, mem_empty_iff_false, Pi.zero_apply, sep_false]
#align gauge_empty gauge_empty
theorem gauge_of_subset_zero (h : s β 0) : gauge s = 0 := by
obtain rfl | rfl := subset_singleton_iff_eq.1 h
exacts [gauge_empty, gauge_zero']
#align gauge_of_subset_zero gauge_of_subset_zero
theorem gauge_nonneg (x : E) : 0 β€ gauge s x :=
Real.sInf_nonneg _ fun _ hx => hx.1.le
#align gauge_nonneg gauge_nonneg
theorem gauge_neg (symmetric : β x β s, -x β s) (x : E) : gauge s (-x) = gauge s x := by
have : β x, -x β s β x β s := fun x => β¨fun h => by simpa using symmetric _ h, symmetric xβ©
simp_rw [gauge_def', smul_neg, this]
#align gauge_neg gauge_neg
theorem gauge_neg_set_neg (x : E) : gauge (-s) (-x) = gauge s x := by
simp_rw [gauge_def', smul_neg, neg_mem_neg]
#align gauge_neg_set_neg gauge_neg_set_neg
theorem gauge_neg_set_eq_gauge_neg (x : E) : gauge (-s) x = gauge s (-x) := by
rw [β gauge_neg_set_neg, neg_neg]
#align gauge_neg_set_eq_gauge_neg gauge_neg_set_eq_gauge_neg
theorem gauge_le_of_mem (ha : 0 β€ a) (hx : x β a β’ s) : gauge s x β€ a := by
obtain rfl | ha' := ha.eq_or_lt
Β· rw [mem_singleton_iff.1 (zero_smul_set_subset _ hx), gauge_zero]
Β· exact csInf_le gauge_set_bddBelow β¨ha', hxβ©
#align gauge_le_of_mem gauge_le_of_mem
| Mathlib/Analysis/Convex/Gauge.lean | 148 | 163 | theorem gauge_le_eq (hsβ : Convex β s) (hsβ : (0 : E) β s) (hsβ : Absorbent β s) (ha : 0 β€ a) :
{ x | gauge s x β€ a } = β (r : β) (_ : a < r), r β’ s := by |
ext x
simp_rw [Set.mem_iInter, Set.mem_setOf_eq]
refine β¨fun h r hr => ?_, fun h => le_of_forall_pos_lt_add fun Ξ΅ hΞ΅ => ?_β©
Β· have hr' := ha.trans_lt hr
rw [mem_smul_set_iff_inv_smul_memβ hr'.ne']
obtain β¨Ξ΄, Ξ΄_pos, hΞ΄r, hΞ΄β© := exists_lt_of_gauge_lt hsβ (h.trans_lt hr)
suffices (rβ»ΒΉ * Ξ΄) β’ Ξ΄β»ΒΉ β’ x β s by rwa [smul_smul, mul_inv_cancel_rightβ Ξ΄_pos.ne'] at this
rw [mem_smul_set_iff_inv_smul_memβ Ξ΄_pos.ne'] at hΞ΄
refine hsβ.smul_mem_of_zero_mem hsβ hΞ΄ β¨by positivity, ?_β©
rw [inv_mul_le_iff hr', mul_one]
exact hΞ΄r.le
Β· have hΞ΅' := (lt_add_iff_pos_right a).2 (half_pos hΞ΅)
exact
(gauge_le_of_mem (ha.trans hΞ΅'.le) <| h _ hΞ΅').trans_lt (add_lt_add_left (half_lt_self hΞ΅) _)
| 1,647 |
import Mathlib.Analysis.LocallyConvex.BalancedCoreHull
import Mathlib.Analysis.LocallyConvex.WithSeminorms
import Mathlib.Analysis.Convex.Gauge
#align_import analysis.locally_convex.abs_convex from "leanprover-community/mathlib"@"f2ce6086713c78a7f880485f7917ea547a215982"
open NormedField Set
open NNReal Pointwise Topology
variable {π E F G ΞΉ : Type*}
section NontriviallyNormedField
variable (π E) {s : Set E}
variable [NontriviallyNormedField π] [AddCommGroup E] [Module π E]
variable [Module β E] [SMulCommClass β π E]
variable [TopologicalSpace E] [LocallyConvexSpace β E] [ContinuousSMul π E]
| Mathlib/Analysis/LocallyConvex/AbsConvex.lean | 52 | 60 | theorem nhds_basis_abs_convex :
(π (0 : E)).HasBasis (fun s : Set E => s β π (0 : E) β§ Balanced π s β§ Convex β s) id := by |
refine
(LocallyConvexSpace.convex_basis_zero β E).to_hasBasis (fun s hs => ?_) fun s hs =>
β¨s, β¨hs.1, hs.2.2β©, rfl.subsetβ©
refine β¨convexHull β (balancedCore π s), ?_, convexHull_min (balancedCore_subset s) hs.2β©
refine β¨Filter.mem_of_superset (balancedCore_mem_nhds_zero hs.1) (subset_convexHull β _), ?_β©
refine β¨(balancedCore_balanced s).convexHull, ?_β©
exact convex_convexHull β (balancedCore π s)
| 1,648 |
import Mathlib.Analysis.LocallyConvex.BalancedCoreHull
import Mathlib.Analysis.LocallyConvex.WithSeminorms
import Mathlib.Analysis.Convex.Gauge
#align_import analysis.locally_convex.abs_convex from "leanprover-community/mathlib"@"f2ce6086713c78a7f880485f7917ea547a215982"
open NormedField Set
open NNReal Pointwise Topology
variable {π E F G ΞΉ : Type*}
section NontriviallyNormedField
variable (π E) {s : Set E}
variable [NontriviallyNormedField π] [AddCommGroup E] [Module π E]
variable [Module β E] [SMulCommClass β π E]
variable [TopologicalSpace E] [LocallyConvexSpace β E] [ContinuousSMul π E]
theorem nhds_basis_abs_convex :
(π (0 : E)).HasBasis (fun s : Set E => s β π (0 : E) β§ Balanced π s β§ Convex β s) id := by
refine
(LocallyConvexSpace.convex_basis_zero β E).to_hasBasis (fun s hs => ?_) fun s hs =>
β¨s, β¨hs.1, hs.2.2β©, rfl.subsetβ©
refine β¨convexHull β (balancedCore π s), ?_, convexHull_min (balancedCore_subset s) hs.2β©
refine β¨Filter.mem_of_superset (balancedCore_mem_nhds_zero hs.1) (subset_convexHull β _), ?_β©
refine β¨(balancedCore_balanced s).convexHull, ?_β©
exact convex_convexHull β (balancedCore π s)
#align nhds_basis_abs_convex nhds_basis_abs_convex
variable [ContinuousSMul β E] [TopologicalAddGroup E]
| Mathlib/Analysis/LocallyConvex/AbsConvex.lean | 65 | 74 | theorem nhds_basis_abs_convex_open :
(π (0 : E)).HasBasis (fun s => (0 : E) β s β§ IsOpen s β§ Balanced π s β§ Convex β s) id := by |
refine (nhds_basis_abs_convex π E).to_hasBasis ?_ ?_
Β· rintro s β¨hs_nhds, hs_balanced, hs_convexβ©
refine β¨interior s, ?_, interior_subsetβ©
exact
β¨mem_interior_iff_mem_nhds.mpr hs_nhds, isOpen_interior,
hs_balanced.interior (mem_interior_iff_mem_nhds.mpr hs_nhds), hs_convex.interiorβ©
rintro s β¨hs_zero, hs_open, hs_balanced, hs_convexβ©
exact β¨s, β¨hs_open.mem_nhds hs_zero, hs_balanced, hs_convexβ©, rfl.subsetβ©
| 1,648 |
import Mathlib.Analysis.RCLike.Basic
import Mathlib.Analysis.NormedSpace.OperatorNorm.Basic
import Mathlib.Analysis.NormedSpace.Pointwise
#align_import analysis.normed_space.is_R_or_C from "leanprover-community/mathlib"@"3f655f5297b030a87d641ad4e825af8d9679eb0b"
open Metric
variable {π : Type*} [RCLike π] {E : Type*} [NormedAddCommGroup E]
| Mathlib/Analysis/NormedSpace/RCLike.lean | 36 | 36 | theorem RCLike.norm_coe_norm {z : E} : β(βzβ : π)β = βzβ := by | simp
| 1,649 |
import Mathlib.Analysis.RCLike.Basic
import Mathlib.Analysis.NormedSpace.OperatorNorm.Basic
import Mathlib.Analysis.NormedSpace.Pointwise
#align_import analysis.normed_space.is_R_or_C from "leanprover-community/mathlib"@"3f655f5297b030a87d641ad4e825af8d9679eb0b"
open Metric
variable {π : Type*} [RCLike π] {E : Type*} [NormedAddCommGroup E]
theorem RCLike.norm_coe_norm {z : E} : β(βzβ : π)β = βzβ := by simp
#align is_R_or_C.norm_coe_norm RCLike.norm_coe_norm
variable [NormedSpace π E]
@[simp]
| Mathlib/Analysis/NormedSpace/RCLike.lean | 43 | 45 | theorem norm_smul_inv_norm {x : E} (hx : x β 0) : β(βxββ»ΒΉ : π) β’ xβ = 1 := by |
have : βxβ β 0 := by simp [hx]
field_simp [norm_smul]
| 1,649 |
import Mathlib.Analysis.RCLike.Basic
import Mathlib.Analysis.NormedSpace.OperatorNorm.Basic
import Mathlib.Analysis.NormedSpace.Pointwise
#align_import analysis.normed_space.is_R_or_C from "leanprover-community/mathlib"@"3f655f5297b030a87d641ad4e825af8d9679eb0b"
open Metric
variable {π : Type*} [RCLike π] {E : Type*} [NormedAddCommGroup E]
theorem RCLike.norm_coe_norm {z : E} : β(βzβ : π)β = βzβ := by simp
#align is_R_or_C.norm_coe_norm RCLike.norm_coe_norm
variable [NormedSpace π E]
@[simp]
theorem norm_smul_inv_norm {x : E} (hx : x β 0) : β(βxββ»ΒΉ : π) β’ xβ = 1 := by
have : βxβ β 0 := by simp [hx]
field_simp [norm_smul]
#align norm_smul_inv_norm norm_smul_inv_norm
| Mathlib/Analysis/NormedSpace/RCLike.lean | 49 | 52 | theorem norm_smul_inv_norm' {r : β} (r_nonneg : 0 β€ r) {x : E} (hx : x β 0) :
β((r : π) * (βxβ : π)β»ΒΉ) β’ xβ = r := by |
have : βxβ β 0 := by simp [hx]
field_simp [norm_smul, r_nonneg, rclike_simps]
| 1,649 |
import Mathlib.Analysis.RCLike.Basic
import Mathlib.Analysis.NormedSpace.OperatorNorm.Basic
import Mathlib.Analysis.NormedSpace.Pointwise
#align_import analysis.normed_space.is_R_or_C from "leanprover-community/mathlib"@"3f655f5297b030a87d641ad4e825af8d9679eb0b"
open Metric
variable {π : Type*} [RCLike π] {E : Type*} [NormedAddCommGroup E]
theorem RCLike.norm_coe_norm {z : E} : β(βzβ : π)β = βzβ := by simp
#align is_R_or_C.norm_coe_norm RCLike.norm_coe_norm
variable [NormedSpace π E]
@[simp]
theorem norm_smul_inv_norm {x : E} (hx : x β 0) : β(βxββ»ΒΉ : π) β’ xβ = 1 := by
have : βxβ β 0 := by simp [hx]
field_simp [norm_smul]
#align norm_smul_inv_norm norm_smul_inv_norm
theorem norm_smul_inv_norm' {r : β} (r_nonneg : 0 β€ r) {x : E} (hx : x β 0) :
β((r : π) * (βxβ : π)β»ΒΉ) β’ xβ = r := by
have : βxβ β 0 := by simp [hx]
field_simp [norm_smul, r_nonneg, rclike_simps]
#align norm_smul_inv_norm' norm_smul_inv_norm'
| Mathlib/Analysis/NormedSpace/RCLike.lean | 55 | 75 | theorem LinearMap.bound_of_sphere_bound {r : β} (r_pos : 0 < r) (c : β) (f : E ββ[π] π)
(h : β z β sphere (0 : E) r, βf zβ β€ c) (z : E) : βf zβ β€ c / r * βzβ := by |
by_cases z_zero : z = 0
Β· rw [z_zero]
simp only [LinearMap.map_zero, norm_zero, mul_zero]
exact le_rfl
set zβ := ((r : π) * (βzβ : π)β»ΒΉ) β’ z with hzβ
have norm_f_zβ : βf zββ β€ c := by
apply h
rw [mem_sphere_zero_iff_norm]
exact norm_smul_inv_norm' r_pos.le z_zero
have r_ne_zero : (r : π) β 0 := RCLike.ofReal_ne_zero.mpr r_pos.ne'
have eq : f z = βzβ / r * f zβ := by
rw [hzβ, LinearMap.map_smul, smul_eq_mul]
rw [β mul_assoc, β mul_assoc, div_mul_cancelβ _ r_ne_zero, mul_inv_cancel, one_mul]
simp only [z_zero, RCLike.ofReal_eq_zero, norm_eq_zero, Ne, not_false_iff]
rw [eq, norm_mul, norm_div, RCLike.norm_coe_norm, RCLike.norm_of_nonneg r_pos.le,
div_mul_eq_mul_div, div_mul_eq_mul_div, mul_comm]
apply div_le_div _ _ r_pos rfl.ge
Β· exact mul_nonneg ((norm_nonneg _).trans norm_f_zβ) (norm_nonneg z)
apply mul_le_mul norm_f_zβ rfl.le (norm_nonneg z) ((norm_nonneg _).trans norm_f_zβ)
| 1,649 |
import Mathlib.Analysis.RCLike.Basic
import Mathlib.Analysis.NormedSpace.OperatorNorm.Basic
import Mathlib.Analysis.NormedSpace.Pointwise
#align_import analysis.normed_space.is_R_or_C from "leanprover-community/mathlib"@"3f655f5297b030a87d641ad4e825af8d9679eb0b"
open Metric
variable {π : Type*} [RCLike π] {E : Type*} [NormedAddCommGroup E]
theorem RCLike.norm_coe_norm {z : E} : β(βzβ : π)β = βzβ := by simp
#align is_R_or_C.norm_coe_norm RCLike.norm_coe_norm
variable [NormedSpace π E]
@[simp]
theorem norm_smul_inv_norm {x : E} (hx : x β 0) : β(βxββ»ΒΉ : π) β’ xβ = 1 := by
have : βxβ β 0 := by simp [hx]
field_simp [norm_smul]
#align norm_smul_inv_norm norm_smul_inv_norm
theorem norm_smul_inv_norm' {r : β} (r_nonneg : 0 β€ r) {x : E} (hx : x β 0) :
β((r : π) * (βxβ : π)β»ΒΉ) β’ xβ = r := by
have : βxβ β 0 := by simp [hx]
field_simp [norm_smul, r_nonneg, rclike_simps]
#align norm_smul_inv_norm' norm_smul_inv_norm'
theorem LinearMap.bound_of_sphere_bound {r : β} (r_pos : 0 < r) (c : β) (f : E ββ[π] π)
(h : β z β sphere (0 : E) r, βf zβ β€ c) (z : E) : βf zβ β€ c / r * βzβ := by
by_cases z_zero : z = 0
Β· rw [z_zero]
simp only [LinearMap.map_zero, norm_zero, mul_zero]
exact le_rfl
set zβ := ((r : π) * (βzβ : π)β»ΒΉ) β’ z with hzβ
have norm_f_zβ : βf zββ β€ c := by
apply h
rw [mem_sphere_zero_iff_norm]
exact norm_smul_inv_norm' r_pos.le z_zero
have r_ne_zero : (r : π) β 0 := RCLike.ofReal_ne_zero.mpr r_pos.ne'
have eq : f z = βzβ / r * f zβ := by
rw [hzβ, LinearMap.map_smul, smul_eq_mul]
rw [β mul_assoc, β mul_assoc, div_mul_cancelβ _ r_ne_zero, mul_inv_cancel, one_mul]
simp only [z_zero, RCLike.ofReal_eq_zero, norm_eq_zero, Ne, not_false_iff]
rw [eq, norm_mul, norm_div, RCLike.norm_coe_norm, RCLike.norm_of_nonneg r_pos.le,
div_mul_eq_mul_div, div_mul_eq_mul_div, mul_comm]
apply div_le_div _ _ r_pos rfl.ge
Β· exact mul_nonneg ((norm_nonneg _).trans norm_f_zβ) (norm_nonneg z)
apply mul_le_mul norm_f_zβ rfl.le (norm_nonneg z) ((norm_nonneg _).trans norm_f_zβ)
#align linear_map.bound_of_sphere_bound LinearMap.bound_of_sphere_bound
theorem LinearMap.bound_of_ball_bound' {r : β} (r_pos : 0 < r) (c : β) (f : E ββ[π] π)
(h : β z β closedBall (0 : E) r, βf zβ β€ c) (z : E) : βf zβ β€ c / r * βzβ :=
f.bound_of_sphere_bound r_pos c (fun z hz => h z hz.le) z
#align linear_map.bound_of_ball_bound' LinearMap.bound_of_ball_bound'
| Mathlib/Analysis/NormedSpace/RCLike.lean | 85 | 93 | theorem ContinuousLinearMap.opNorm_bound_of_ball_bound {r : β} (r_pos : 0 < r) (c : β)
(f : E βL[π] π) (h : β z β closedBall (0 : E) r, βf zβ β€ c) : βfβ β€ c / r := by |
apply ContinuousLinearMap.opNorm_le_bound
Β· apply div_nonneg _ r_pos.le
exact
(norm_nonneg _).trans
(h 0 (by simp only [norm_zero, mem_closedBall, dist_zero_left, r_pos.le]))
apply LinearMap.bound_of_ball_bound' r_pos
exact fun z hz => h z hz
| 1,649 |
import Mathlib.Algebra.DirectSum.Basic
import Mathlib.LinearAlgebra.DFinsupp
import Mathlib.LinearAlgebra.Basis
#align_import algebra.direct_sum.module from "leanprover-community/mathlib"@"6623e6af705e97002a9054c1c05a980180276fc1"
universe u v w uβ
namespace DirectSum
open DirectSum
section General
variable {R : Type u} [Semiring R]
variable {ΞΉ : Type v} [dec_ΞΉ : DecidableEq ΞΉ]
variable {M : ΞΉ β Type w} [β i, AddCommMonoid (M i)] [β i, Module R (M i)]
instance : Module R (β¨ i, M i) :=
DFinsupp.module
instance {S : Type*} [Semiring S] [β i, Module S (M i)] [β i, SMulCommClass R S (M i)] :
SMulCommClass R S (β¨ i, M i) :=
DFinsupp.smulCommClass
instance {S : Type*} [Semiring S] [SMul R S] [β i, Module S (M i)] [β i, IsScalarTower R S (M i)] :
IsScalarTower R S (β¨ i, M i) :=
DFinsupp.isScalarTower
instance [β i, Module Rα΅α΅α΅ (M i)] [β i, IsCentralScalar R (M i)] : IsCentralScalar R (β¨ i, M i) :=
DFinsupp.isCentralScalar
theorem smul_apply (b : R) (v : β¨ i, M i) (i : ΞΉ) : (b β’ v) i = b β’ v i :=
DFinsupp.smul_apply _ _ _
#align direct_sum.smul_apply DirectSum.smul_apply
variable (R ΞΉ M)
def lmk : β s : Finset ΞΉ, (β i : (βs : Set ΞΉ), M i.val) ββ[R] β¨ i, M i :=
DFinsupp.lmk
#align direct_sum.lmk DirectSum.lmk
def lof : β i : ΞΉ, M i ββ[R] β¨ i, M i :=
DFinsupp.lsingle
#align direct_sum.lof DirectSum.lof
theorem lof_eq_of (i : ΞΉ) (b : M i) : lof R ΞΉ M i b = of M i b := rfl
#align direct_sum.lof_eq_of DirectSum.lof_eq_of
variable {ΞΉ M}
theorem single_eq_lof (i : ΞΉ) (b : M i) : DFinsupp.single i b = lof R ΞΉ M i b := rfl
#align direct_sum.single_eq_lof DirectSum.single_eq_lof
theorem mk_smul (s : Finset ΞΉ) (c : R) (x) : mk M s (c β’ x) = c β’ mk M s x :=
(lmk R ΞΉ M s).map_smul c x
#align direct_sum.mk_smul DirectSum.mk_smul
theorem of_smul (i : ΞΉ) (c : R) (x) : of M i (c β’ x) = c β’ of M i x :=
(lof R ΞΉ M i).map_smul c x
#align direct_sum.of_smul DirectSum.of_smul
variable {R}
theorem support_smul [β (i : ΞΉ) (x : M i), Decidable (x β 0)] (c : R) (v : β¨ i, M i) :
(c β’ v).support β v.support :=
DFinsupp.support_smul _ _
#align direct_sum.support_smul DirectSum.support_smul
variable {N : Type uβ} [AddCommMonoid N] [Module R N]
variable (Ο : β i, M i ββ[R] N)
variable (R ΞΉ N)
def toModule : (β¨ i, M i) ββ[R] N :=
DFunLike.coe (DFinsupp.lsum β) Ο
#align direct_sum.to_module DirectSum.toModule
theorem coe_toModule_eq_coe_toAddMonoid :
(toModule R ΞΉ N Ο : (β¨ i, M i) β N) = toAddMonoid fun i β¦ (Ο i).toAddMonoidHom := rfl
#align direct_sum.coe_to_module_eq_coe_to_add_monoid DirectSum.coe_toModule_eq_coe_toAddMonoid
variable {ΞΉ N Ο}
@[simp]
theorem toModule_lof (i) (x : M i) : toModule R ΞΉ N Ο (lof R ΞΉ M i x) = Ο i x :=
toAddMonoid_of (fun i β¦ (Ο i).toAddMonoidHom) i x
#align direct_sum.to_module_lof DirectSum.toModule_lof
variable (Ο : (β¨ i, M i) ββ[R] N)
theorem toModule.unique (f : β¨ i, M i) : Ο f = toModule R ΞΉ N (fun i β¦ Ο.comp <| lof R ΞΉ M i) f :=
toAddMonoid.unique Ο.toAddMonoidHom f
#align direct_sum.to_module.unique DirectSum.toModule.unique
variable {Ο} {Ο' : (β¨ i, M i) ββ[R] N}
@[ext]
theorem linearMap_ext β¦Ο Ο' : (β¨ i, M i) ββ[R] Nβ¦
(H : β i, Ο.comp (lof R ΞΉ M i) = Ο'.comp (lof R ΞΉ M i)) : Ο = Ο' :=
DFinsupp.lhom_ext' H
#align direct_sum.linear_map_ext DirectSum.linearMap_ext
def lsetToSet (S T : Set ΞΉ) (H : S β T) : (β¨ i : S, M i) ββ[R] β¨ i : T, M i :=
toModule R _ _ fun i β¦ lof R T (fun i : Subtype T β¦ M i) β¨i, H i.propβ©
#align direct_sum.lset_to_set DirectSum.lsetToSet
variable (ΞΉ M)
@[simps apply]
def linearEquivFunOnFintype [Fintype ΞΉ] : (β¨ i, M i) ββ[R] β i, M i :=
{ DFinsupp.equivFunOnFintype with
toFun := (β)
map_add' := fun f g β¦ by
ext
rw [add_apply, Pi.add_apply]
map_smul' := fun c f β¦ by
simp_rw [RingHom.id_apply]
rw [DFinsupp.coe_smul] }
#align direct_sum.linear_equiv_fun_on_fintype DirectSum.linearEquivFunOnFintype
variable {ΞΉ M}
@[simp]
| Mathlib/Algebra/DirectSum/Module.lean | 164 | 168 | theorem linearEquivFunOnFintype_lof [Fintype ΞΉ] [DecidableEq ΞΉ] (i : ΞΉ) (m : M i) :
(linearEquivFunOnFintype R ΞΉ M) (lof R ΞΉ M i m) = Pi.single i m := by |
ext a
change (DFinsupp.equivFunOnFintype (lof R ΞΉ M i m)) a = _
convert _root_.congr_fun (DFinsupp.equivFunOnFintype_single i m) a
| 1,650 |
import Mathlib.Data.Finset.Order
import Mathlib.Algebra.DirectSum.Module
import Mathlib.RingTheory.FreeCommRing
import Mathlib.RingTheory.Ideal.Maps
import Mathlib.RingTheory.Ideal.Quotient
import Mathlib.Tactic.SuppressCompilation
#align_import algebra.direct_limit from "leanprover-community/mathlib"@"f0c8bf9245297a541f468be517f1bde6195105e9"
suppress_compilation
universe u v v' v'' w uβ
open Submodule
variable {R : Type u} [Ring R]
variable {ΞΉ : Type v}
variable [Preorder ΞΉ]
variable (G : ΞΉ β Type w)
class DirectedSystem (f : β i j, i β€ j β G i β G j) : Prop where
map_self' : β i x h, f i i h x = x
map_map' : β {i j k} (hij hjk x), f j k hjk (f i j hij x) = f i k (le_trans hij hjk) x
#align directed_system DirectedSystem
section
variable {G} (f : β i j, i β€ j β G i β G j) [DirectedSystem G fun i j h => f i j h]
theorem DirectedSystem.map_self i x h : f i i h x = x :=
DirectedSystem.map_self' i x h
theorem DirectedSystem.map_map {i j k} (hij hjk x) :
f j k hjk (f i j hij x) = f i k (le_trans hij hjk) x :=
DirectedSystem.map_map' hij hjk x
end
namespace Module
variable [β i, AddCommGroup (G i)] [β i, Module R (G i)]
variable {G} (f : β i j, i β€ j β G i ββ[R] G j)
nonrec theorem DirectedSystem.map_self [DirectedSystem G fun i j h => f i j h] (i x h) :
f i i h x = x :=
DirectedSystem.map_self (fun i j h => f i j h) i x h
#align module.directed_system.map_self Module.DirectedSystem.map_self
nonrec theorem DirectedSystem.map_map [DirectedSystem G fun i j h => f i j h] {i j k} (hij hjk x) :
f j k hjk (f i j hij x) = f i k (le_trans hij hjk) x :=
DirectedSystem.map_map (fun i j h => f i j h) hij hjk x
#align module.directed_system.map_map Module.DirectedSystem.map_map
variable (G)
variable [DecidableEq ΞΉ]
def DirectLimit : Type max v w :=
DirectSum ΞΉ G β§Έ
(span R <|
{ a |
β (i j : _) (H : i β€ j) (x : _),
DirectSum.lof R ΞΉ G i x - DirectSum.lof R ΞΉ G j (f i j H x) = a })
#align module.direct_limit Module.DirectLimit
namespace DirectLimit
instance addCommGroup : AddCommGroup (DirectLimit G f) :=
Quotient.addCommGroup _
instance module : Module R (DirectLimit G f) :=
Quotient.module _
instance inhabited : Inhabited (DirectLimit G f) :=
β¨0β©
instance unique [IsEmpty ΞΉ] : Unique (DirectLimit G f) :=
inferInstanceAs <| Unique (Quotient _)
variable (R ΞΉ)
def of (i) : G i ββ[R] DirectLimit G f :=
(mkQ _).comp <| DirectSum.lof R ΞΉ G i
#align module.direct_limit.of Module.DirectLimit.of
variable {R ΞΉ G f}
@[simp]
theorem of_f {i j hij x} : of R ΞΉ G f j (f i j hij x) = of R ΞΉ G f i x :=
Eq.symm <| (Submodule.Quotient.eq _).2 <| subset_span β¨i, j, hij, x, rflβ©
#align module.direct_limit.of_f Module.DirectLimit.of_f
theorem exists_of [Nonempty ΞΉ] [IsDirected ΞΉ (Β· β€ Β·)] (z : DirectLimit G f) :
β i x, of R ΞΉ G f i x = z :=
Nonempty.elim (by infer_instance) fun ind : ΞΉ =>
Quotient.inductionOn' z fun z =>
DirectSum.induction_on z β¨ind, 0, LinearMap.map_zero _β© (fun i x => β¨i, x, rflβ©)
fun p q β¨i, x, ihxβ© β¨j, y, ihyβ© =>
let β¨k, hik, hjkβ© := exists_ge_ge i j
β¨k, f i k hik x + f j k hjk y, by
rw [LinearMap.map_add, of_f, of_f, ihx, ihy]
rfl β©
#align module.direct_limit.exists_of Module.DirectLimit.exists_of
@[elab_as_elim]
protected theorem induction_on [Nonempty ΞΉ] [IsDirected ΞΉ (Β· β€ Β·)] {C : DirectLimit G f β Prop}
(z : DirectLimit G f) (ih : β i x, C (of R ΞΉ G f i x)) : C z :=
let β¨i, x, hβ© := exists_of z
h βΈ ih i x
#align module.direct_limit.induction_on Module.DirectLimit.induction_on
variable {P : Type uβ} [AddCommGroup P] [Module R P] (g : β i, G i ββ[R] P)
variable (Hg : β i j hij x, g j (f i j hij x) = g i x)
variable (R ΞΉ G f)
def lift : DirectLimit G f ββ[R] P :=
liftQ _ (DirectSum.toModule R ΞΉ P g)
(span_le.2 fun a β¨i, j, hij, x, hxβ© => by
rw [β hx, SetLike.mem_coe, LinearMap.sub_mem_ker_iff, DirectSum.toModule_lof,
DirectSum.toModule_lof, Hg])
#align module.direct_limit.lift Module.DirectLimit.lift
variable {R ΞΉ G f}
theorem lift_of {i} (x) : lift R ΞΉ G f g Hg (of R ΞΉ G f i x) = g i x :=
DirectSum.toModule_lof R _ _
#align module.direct_limit.lift_of Module.DirectLimit.lift_of
| Mathlib/Algebra/DirectLimit.lean | 164 | 170 | theorem lift_unique [IsDirected ΞΉ (Β· β€ Β·)] (F : DirectLimit G f ββ[R] P) (x) :
F x =
lift R ΞΉ G f (fun i => F.comp <| of R ΞΉ G f i)
(fun i j hij x => by rw [LinearMap.comp_apply, of_f]; rfl) x := by |
cases isEmpty_or_nonempty ΞΉ
Β· simp_rw [Subsingleton.elim x 0, _root_.map_zero]
Β· exact DirectLimit.induction_on x fun i x => by rw [lift_of]; rfl
| 1,651 |
import Mathlib.Init.Align
import Mathlib.Data.Fintype.Order
import Mathlib.Algebra.DirectLimit
import Mathlib.ModelTheory.Quotients
import Mathlib.ModelTheory.FinitelyGenerated
#align_import model_theory.direct_limit from "leanprover-community/mathlib"@"f53b23994ac4c13afa38d31195c588a1121d1860"
universe v w w' uβ uβ
open FirstOrder
namespace FirstOrder
namespace Language
open Structure Set
variable {L : Language} {ΞΉ : Type v} [Preorder ΞΉ]
variable {G : ΞΉ β Type w} [β i, L.Structure (G i)]
variable (f : β i j, i β€ j β G i βͺ[L] G j)
namespace DirectedSystem
nonrec theorem map_self [DirectedSystem G fun i j h => f i j h] (i x h) : f i i h x = x :=
DirectedSystem.map_self (fun i j h => f i j h) i x h
#align first_order.language.directed_system.map_self FirstOrder.Language.DirectedSystem.map_self
nonrec theorem map_map [DirectedSystem G fun i j h => f i j h] {i j k} (hij hjk x) :
f j k hjk (f i j hij x) = f i k (le_trans hij hjk) x :=
DirectedSystem.map_map (fun i j h => f i j h) hij hjk x
#align first_order.language.directed_system.map_map FirstOrder.Language.DirectedSystem.map_map
variable {G' : β β Type w} [β i, L.Structure (G' i)] (f' : β n : β, G' n βͺ[L] G' (n + 1))
def natLERec (m n : β) (h : m β€ n) : G' m βͺ[L] G' n :=
Nat.leRecOn h (@fun k g => (f' k).comp g) (Embedding.refl L _)
#align first_order.language.directed_system.nat_le_rec FirstOrder.Language.DirectedSystem.natLERec
@[simp]
| Mathlib/ModelTheory/DirectLimit.lean | 67 | 76 | theorem coe_natLERec (m n : β) (h : m β€ n) :
(natLERec f' m n h : G' m β G' n) = Nat.leRecOn h (@fun k => f' k) := by |
obtain β¨k, rflβ© := Nat.exists_eq_add_of_le h
ext x
induction' k with k ih
Β· -- This used to be `rw`, but we need `erw` after leanprover/lean4#2644
erw [natLERec, Nat.leRecOn_self, Embedding.refl_apply, Nat.leRecOn_self]
Β· -- This used to be `rw`, but we need `erw` after leanprover/lean4#2644
erw [Nat.leRecOn_succ le_self_add, natLERec, Nat.leRecOn_succ le_self_add, β natLERec,
Embedding.comp_apply, ih]
| 1,652 |
import Mathlib.ModelTheory.FinitelyGenerated
import Mathlib.ModelTheory.DirectLimit
import Mathlib.ModelTheory.Bundled
#align_import model_theory.fraisse from "leanprover-community/mathlib"@"0602c59878ff3d5f71dea69c2d32ccf2e93e5398"
universe u v w w'
open scoped FirstOrder
open Set CategoryTheory
namespace FirstOrder
namespace Language
open Structure Substructure
variable (L : Language.{u, v})
def age (M : Type w) [L.Structure M] : Set (Bundled.{w} L.Structure) :=
{N | Structure.FG L N β§ Nonempty (N βͺ[L] M)}
#align first_order.language.age FirstOrder.Language.age
variable {L} (K : Set (Bundled.{w} L.Structure))
def Hereditary : Prop :=
β M : Bundled.{w} L.Structure, M β K β L.age M β K
#align first_order.language.hereditary FirstOrder.Language.Hereditary
def JointEmbedding : Prop :=
DirectedOn (fun M N : Bundled.{w} L.Structure => Nonempty (M βͺ[L] N)) K
#align first_order.language.joint_embedding FirstOrder.Language.JointEmbedding
def Amalgamation : Prop :=
β (M N P : Bundled.{w} L.Structure) (MN : M βͺ[L] N) (MP : M βͺ[L] P),
M β K β N β K β P β K β β (Q : Bundled.{w} L.Structure) (NQ : N βͺ[L] Q) (PQ : P βͺ[L] Q),
Q β K β§ NQ.comp MN = PQ.comp MP
#align first_order.language.amalgamation FirstOrder.Language.Amalgamation
class IsFraisse : Prop where
is_nonempty : K.Nonempty
FG : β M : Bundled.{w} L.Structure, M β K β Structure.FG L M
is_equiv_invariant : β M N : Bundled.{w} L.Structure, Nonempty (M β[L] N) β (M β K β N β K)
is_essentially_countable : (Quotient.mk' '' K).Countable
hereditary : Hereditary K
jointEmbedding : JointEmbedding K
amalgamation : Amalgamation K
#align first_order.language.is_fraisse FirstOrder.Language.IsFraisse
variable {K} (L) (M : Type w) [Structure L M]
theorem age.is_equiv_invariant (N P : Bundled.{w} L.Structure) (h : Nonempty (N β[L] P)) :
N β L.age M β P β L.age M :=
and_congr h.some.fg_iff
β¨Nonempty.map fun x => Embedding.comp x h.some.symm.toEmbedding,
Nonempty.map fun x => Embedding.comp x h.some.toEmbeddingβ©
#align first_order.language.age.is_equiv_invariant FirstOrder.Language.age.is_equiv_invariant
variable {L} {M} {N : Type w} [Structure L N]
theorem Embedding.age_subset_age (MN : M βͺ[L] N) : L.age M β L.age N := fun _ =>
And.imp_right (Nonempty.map MN.comp)
#align first_order.language.embedding.age_subset_age FirstOrder.Language.Embedding.age_subset_age
theorem Equiv.age_eq_age (MN : M β[L] N) : L.age M = L.age N :=
le_antisymm MN.toEmbedding.age_subset_age MN.symm.toEmbedding.age_subset_age
#align first_order.language.equiv.age_eq_age FirstOrder.Language.Equiv.age_eq_age
theorem Structure.FG.mem_age_of_equiv {M N : Bundled L.Structure} (h : Structure.FG L M)
(MN : Nonempty (M β[L] N)) : N β L.age M :=
β¨MN.some.fg_iff.1 h, β¨MN.some.symm.toEmbeddingβ©β©
set_option linter.uppercaseLean3 false in
#align first_order.language.Structure.fg.mem_age_of_equiv FirstOrder.Language.Structure.FG.mem_age_of_equiv
theorem Hereditary.is_equiv_invariant_of_fg (h : Hereditary K)
(fg : β M : Bundled.{w} L.Structure, M β K β Structure.FG L M) (M N : Bundled.{w} L.Structure)
(hn : Nonempty (M β[L] N)) : M β K β N β K :=
β¨fun MK => h M MK ((fg M MK).mem_age_of_equiv hn),
fun NK => h N NK ((fg N NK).mem_age_of_equiv β¨hn.some.symmβ©)β©
#align first_order.language.hereditary.is_equiv_invariant_of_fg FirstOrder.Language.Hereditary.is_equiv_invariant_of_fg
variable (M)
theorem age.nonempty : (L.age M).Nonempty :=
β¨Bundled.of (Substructure.closure L (β
: Set M)),
(fg_iff_structure_fg _).1 (fg_closure Set.finite_empty), β¨Substructure.subtype _β©β©
#align first_order.language.age.nonempty FirstOrder.Language.age.nonempty
theorem age.hereditary : Hereditary (L.age M) := fun _ hN _ hP => hN.2.some.age_subset_age hP
#align first_order.language.age.hereditary FirstOrder.Language.age.hereditary
theorem age.jointEmbedding : JointEmbedding (L.age M) := fun _ hN _ hP =>
β¨Bundled.of (β₯(hN.2.some.toHom.range β hP.2.some.toHom.range)),
β¨(fg_iff_structure_fg _).1 ((hN.1.range hN.2.some.toHom).sup (hP.1.range hP.2.some.toHom)),
β¨Substructure.subtype _β©β©,
β¨Embedding.comp (inclusion le_sup_left) hN.2.some.equivRange.toEmbeddingβ©,
β¨Embedding.comp (inclusion le_sup_right) hP.2.some.equivRange.toEmbeddingβ©β©
#align first_order.language.age.joint_embedding FirstOrder.Language.age.jointEmbedding
| Mathlib/ModelTheory/Fraisse.lean | 169 | 182 | theorem age.countable_quotient [h : Countable M] : (Quotient.mk' '' L.age M).Countable := by |
classical
refine (congr_arg _ (Set.ext <| Quotient.forall.2 fun N => ?_)).mp
(countable_range fun s : Finset M => β¦β¨closure L (s : Set M), inferInstanceβ©β§)
constructor
Β· rintro β¨s, hsβ©
use Bundled.of (closure L (s : Set M))
exact β¨β¨(fg_iff_structure_fg _).1 (fg_closure s.finite_toSet), β¨Substructure.subtype _β©β©, hsβ©
Β· simp only [mem_range, Quotient.eq]
rintro β¨P, β¨β¨s, hsβ©, β¨PMβ©β©, hP2β©
have : P β N := by apply Quotient.eq'.mp; rw [hP2]; rfl -- Porting note: added
refine β¨s.image PM, Setoid.trans (b := P) ?_ thisβ©
rw [β Embedding.coe_toHom, Finset.coe_image, closure_image PM.toHom, hs, β Hom.range_eq_map]
exact β¨PM.equivRange.symmβ©
| 1,653 |
import Mathlib.Algebra.DirectSum.Module
import Mathlib.Algebra.Module.Submodule.Basic
#align_import algebra.direct_sum.decomposition from "leanprover-community/mathlib"@"4e861f25ba5ceef42ba0712d8ffeb32f38ad6441"
variable {ΞΉ R M Ο : Type*}
open DirectSum
namespace DirectSum
section AddCommMonoid
variable [DecidableEq ΞΉ] [AddCommMonoid M]
variable [SetLike Ο M] [AddSubmonoidClass Ο M] (β³ : ΞΉ β Ο)
class Decomposition where
decompose' : M β β¨ i, β³ i
left_inv : Function.LeftInverse (DirectSum.coeAddMonoidHom β³) decompose'
right_inv : Function.RightInverse (DirectSum.coeAddMonoidHom β³) decompose'
#align direct_sum.decomposition DirectSum.Decomposition
instance : Subsingleton (Decomposition β³) :=
β¨fun x y β¦ by
cases' x with x xl xr
cases' y with y yl yr
congr
exact Function.LeftInverse.eq_rightInverse xr ylβ©
abbrev Decomposition.ofAddHom (decompose : M β+ β¨ i, β³ i)
(h_left_inv : (DirectSum.coeAddMonoidHom β³).comp decompose = .id _)
(h_right_inv : decompose.comp (DirectSum.coeAddMonoidHom β³) = .id _) : Decomposition β³ where
decompose' := decompose
left_inv := DFunLike.congr_fun h_left_inv
right_inv := DFunLike.congr_fun h_right_inv
noncomputable def IsInternal.chooseDecomposition (h : IsInternal β³) :
DirectSum.Decomposition β³ where
decompose' := (Equiv.ofBijective _ h).symm
left_inv := (Equiv.ofBijective _ h).right_inv
right_inv := (Equiv.ofBijective _ h).left_inv
variable [Decomposition β³]
protected theorem Decomposition.isInternal : DirectSum.IsInternal β³ :=
β¨Decomposition.right_inv.injective, Decomposition.left_inv.surjectiveβ©
#align direct_sum.decomposition.is_internal DirectSum.Decomposition.isInternal
def decompose : M β β¨ i, β³ i where
toFun := Decomposition.decompose'
invFun := DirectSum.coeAddMonoidHom β³
left_inv := Decomposition.left_inv
right_inv := Decomposition.right_inv
#align direct_sum.decompose DirectSum.decompose
protected theorem Decomposition.inductionOn {p : M β Prop} (h_zero : p 0)
(h_homogeneous : β {i} (m : β³ i), p (m : M)) (h_add : β m m' : M, p m β p m' β p (m + m')) :
β m, p m := by
let β³' : ΞΉ β AddSubmonoid M := fun i β¦
(β¨β¨β³ i, fun x y β¦ AddMemClass.add_mem x yβ©, (ZeroMemClass.zero_mem _)β© : AddSubmonoid M)
haveI t : DirectSum.Decomposition β³' :=
{ decompose' := DirectSum.decompose β³
left_inv := fun _ β¦ (decompose β³).left_inv _
right_inv := fun _ β¦ (decompose β³).right_inv _ }
have mem : β m, m β iSup β³' := fun _m β¦
(DirectSum.IsInternal.addSubmonoid_iSup_eq_top β³' (Decomposition.isInternal β³')).symm βΈ trivial
-- Porting note: needs to use @ even though no implicit argument is provided
exact fun m β¦ @AddSubmonoid.iSup_induction _ _ _ β³' _ _ (mem m)
(fun i m h β¦ h_homogeneous β¨m, hβ©) h_zero h_add
-- exact fun m β¦
-- AddSubmonoid.iSup_induction β³' (mem m) (fun i m h β¦ h_homogeneous β¨m, hβ©) h_zero h_add
#align direct_sum.decomposition.induction_on DirectSum.Decomposition.inductionOn
@[simp]
theorem Decomposition.decompose'_eq : Decomposition.decompose' = decompose β³ := rfl
#align direct_sum.decomposition.decompose'_eq DirectSum.Decomposition.decompose'_eq
@[simp]
theorem decompose_symm_of {i : ΞΉ} (x : β³ i) : (decompose β³).symm (DirectSum.of _ i x) = x :=
DirectSum.coeAddMonoidHom_of β³ _ _
#align direct_sum.decompose_symm_of DirectSum.decompose_symm_of
@[simp]
| Mathlib/Algebra/DirectSum/Decomposition.lean | 127 | 128 | theorem decompose_coe {i : ΞΉ} (x : β³ i) : decompose β³ (x : M) = DirectSum.of _ i x := by |
rw [β decompose_symm_of _, Equiv.apply_symm_apply]
| 1,654 |
import Mathlib.Algebra.DirectSum.Module
import Mathlib.Algebra.Module.Submodule.Basic
#align_import algebra.direct_sum.decomposition from "leanprover-community/mathlib"@"4e861f25ba5ceef42ba0712d8ffeb32f38ad6441"
variable {ΞΉ R M Ο : Type*}
open DirectSum
namespace DirectSum
section AddCommMonoid
variable [DecidableEq ΞΉ] [AddCommMonoid M]
variable [SetLike Ο M] [AddSubmonoidClass Ο M] (β³ : ΞΉ β Ο)
class Decomposition where
decompose' : M β β¨ i, β³ i
left_inv : Function.LeftInverse (DirectSum.coeAddMonoidHom β³) decompose'
right_inv : Function.RightInverse (DirectSum.coeAddMonoidHom β³) decompose'
#align direct_sum.decomposition DirectSum.Decomposition
instance : Subsingleton (Decomposition β³) :=
β¨fun x y β¦ by
cases' x with x xl xr
cases' y with y yl yr
congr
exact Function.LeftInverse.eq_rightInverse xr ylβ©
abbrev Decomposition.ofAddHom (decompose : M β+ β¨ i, β³ i)
(h_left_inv : (DirectSum.coeAddMonoidHom β³).comp decompose = .id _)
(h_right_inv : decompose.comp (DirectSum.coeAddMonoidHom β³) = .id _) : Decomposition β³ where
decompose' := decompose
left_inv := DFunLike.congr_fun h_left_inv
right_inv := DFunLike.congr_fun h_right_inv
noncomputable def IsInternal.chooseDecomposition (h : IsInternal β³) :
DirectSum.Decomposition β³ where
decompose' := (Equiv.ofBijective _ h).symm
left_inv := (Equiv.ofBijective _ h).right_inv
right_inv := (Equiv.ofBijective _ h).left_inv
variable [Decomposition β³]
protected theorem Decomposition.isInternal : DirectSum.IsInternal β³ :=
β¨Decomposition.right_inv.injective, Decomposition.left_inv.surjectiveβ©
#align direct_sum.decomposition.is_internal DirectSum.Decomposition.isInternal
def decompose : M β β¨ i, β³ i where
toFun := Decomposition.decompose'
invFun := DirectSum.coeAddMonoidHom β³
left_inv := Decomposition.left_inv
right_inv := Decomposition.right_inv
#align direct_sum.decompose DirectSum.decompose
protected theorem Decomposition.inductionOn {p : M β Prop} (h_zero : p 0)
(h_homogeneous : β {i} (m : β³ i), p (m : M)) (h_add : β m m' : M, p m β p m' β p (m + m')) :
β m, p m := by
let β³' : ΞΉ β AddSubmonoid M := fun i β¦
(β¨β¨β³ i, fun x y β¦ AddMemClass.add_mem x yβ©, (ZeroMemClass.zero_mem _)β© : AddSubmonoid M)
haveI t : DirectSum.Decomposition β³' :=
{ decompose' := DirectSum.decompose β³
left_inv := fun _ β¦ (decompose β³).left_inv _
right_inv := fun _ β¦ (decompose β³).right_inv _ }
have mem : β m, m β iSup β³' := fun _m β¦
(DirectSum.IsInternal.addSubmonoid_iSup_eq_top β³' (Decomposition.isInternal β³')).symm βΈ trivial
-- Porting note: needs to use @ even though no implicit argument is provided
exact fun m β¦ @AddSubmonoid.iSup_induction _ _ _ β³' _ _ (mem m)
(fun i m h β¦ h_homogeneous β¨m, hβ©) h_zero h_add
-- exact fun m β¦
-- AddSubmonoid.iSup_induction β³' (mem m) (fun i m h β¦ h_homogeneous β¨m, hβ©) h_zero h_add
#align direct_sum.decomposition.induction_on DirectSum.Decomposition.inductionOn
@[simp]
theorem Decomposition.decompose'_eq : Decomposition.decompose' = decompose β³ := rfl
#align direct_sum.decomposition.decompose'_eq DirectSum.Decomposition.decompose'_eq
@[simp]
theorem decompose_symm_of {i : ΞΉ} (x : β³ i) : (decompose β³).symm (DirectSum.of _ i x) = x :=
DirectSum.coeAddMonoidHom_of β³ _ _
#align direct_sum.decompose_symm_of DirectSum.decompose_symm_of
@[simp]
theorem decompose_coe {i : ΞΉ} (x : β³ i) : decompose β³ (x : M) = DirectSum.of _ i x := by
rw [β decompose_symm_of _, Equiv.apply_symm_apply]
#align direct_sum.decompose_coe DirectSum.decompose_coe
theorem decompose_of_mem {x : M} {i : ΞΉ} (hx : x β β³ i) :
decompose β³ x = DirectSum.of (fun i β¦ β³ i) i β¨x, hxβ© :=
decompose_coe _ β¨x, hxβ©
#align direct_sum.decompose_of_mem DirectSum.decompose_of_mem
| Mathlib/Algebra/DirectSum/Decomposition.lean | 136 | 137 | theorem decompose_of_mem_same {x : M} {i : ΞΉ} (hx : x β β³ i) : (decompose β³ x i : M) = x := by |
rw [decompose_of_mem _ hx, DirectSum.of_eq_same, Subtype.coe_mk]
| 1,654 |
import Mathlib.Algebra.DirectSum.Module
import Mathlib.Algebra.Module.Submodule.Basic
#align_import algebra.direct_sum.decomposition from "leanprover-community/mathlib"@"4e861f25ba5ceef42ba0712d8ffeb32f38ad6441"
variable {ΞΉ R M Ο : Type*}
open DirectSum
namespace DirectSum
section AddCommMonoid
variable [DecidableEq ΞΉ] [AddCommMonoid M]
variable [SetLike Ο M] [AddSubmonoidClass Ο M] (β³ : ΞΉ β Ο)
class Decomposition where
decompose' : M β β¨ i, β³ i
left_inv : Function.LeftInverse (DirectSum.coeAddMonoidHom β³) decompose'
right_inv : Function.RightInverse (DirectSum.coeAddMonoidHom β³) decompose'
#align direct_sum.decomposition DirectSum.Decomposition
instance : Subsingleton (Decomposition β³) :=
β¨fun x y β¦ by
cases' x with x xl xr
cases' y with y yl yr
congr
exact Function.LeftInverse.eq_rightInverse xr ylβ©
abbrev Decomposition.ofAddHom (decompose : M β+ β¨ i, β³ i)
(h_left_inv : (DirectSum.coeAddMonoidHom β³).comp decompose = .id _)
(h_right_inv : decompose.comp (DirectSum.coeAddMonoidHom β³) = .id _) : Decomposition β³ where
decompose' := decompose
left_inv := DFunLike.congr_fun h_left_inv
right_inv := DFunLike.congr_fun h_right_inv
noncomputable def IsInternal.chooseDecomposition (h : IsInternal β³) :
DirectSum.Decomposition β³ where
decompose' := (Equiv.ofBijective _ h).symm
left_inv := (Equiv.ofBijective _ h).right_inv
right_inv := (Equiv.ofBijective _ h).left_inv
variable [Decomposition β³]
protected theorem Decomposition.isInternal : DirectSum.IsInternal β³ :=
β¨Decomposition.right_inv.injective, Decomposition.left_inv.surjectiveβ©
#align direct_sum.decomposition.is_internal DirectSum.Decomposition.isInternal
def decompose : M β β¨ i, β³ i where
toFun := Decomposition.decompose'
invFun := DirectSum.coeAddMonoidHom β³
left_inv := Decomposition.left_inv
right_inv := Decomposition.right_inv
#align direct_sum.decompose DirectSum.decompose
protected theorem Decomposition.inductionOn {p : M β Prop} (h_zero : p 0)
(h_homogeneous : β {i} (m : β³ i), p (m : M)) (h_add : β m m' : M, p m β p m' β p (m + m')) :
β m, p m := by
let β³' : ΞΉ β AddSubmonoid M := fun i β¦
(β¨β¨β³ i, fun x y β¦ AddMemClass.add_mem x yβ©, (ZeroMemClass.zero_mem _)β© : AddSubmonoid M)
haveI t : DirectSum.Decomposition β³' :=
{ decompose' := DirectSum.decompose β³
left_inv := fun _ β¦ (decompose β³).left_inv _
right_inv := fun _ β¦ (decompose β³).right_inv _ }
have mem : β m, m β iSup β³' := fun _m β¦
(DirectSum.IsInternal.addSubmonoid_iSup_eq_top β³' (Decomposition.isInternal β³')).symm βΈ trivial
-- Porting note: needs to use @ even though no implicit argument is provided
exact fun m β¦ @AddSubmonoid.iSup_induction _ _ _ β³' _ _ (mem m)
(fun i m h β¦ h_homogeneous β¨m, hβ©) h_zero h_add
-- exact fun m β¦
-- AddSubmonoid.iSup_induction β³' (mem m) (fun i m h β¦ h_homogeneous β¨m, hβ©) h_zero h_add
#align direct_sum.decomposition.induction_on DirectSum.Decomposition.inductionOn
@[simp]
theorem Decomposition.decompose'_eq : Decomposition.decompose' = decompose β³ := rfl
#align direct_sum.decomposition.decompose'_eq DirectSum.Decomposition.decompose'_eq
@[simp]
theorem decompose_symm_of {i : ΞΉ} (x : β³ i) : (decompose β³).symm (DirectSum.of _ i x) = x :=
DirectSum.coeAddMonoidHom_of β³ _ _
#align direct_sum.decompose_symm_of DirectSum.decompose_symm_of
@[simp]
theorem decompose_coe {i : ΞΉ} (x : β³ i) : decompose β³ (x : M) = DirectSum.of _ i x := by
rw [β decompose_symm_of _, Equiv.apply_symm_apply]
#align direct_sum.decompose_coe DirectSum.decompose_coe
theorem decompose_of_mem {x : M} {i : ΞΉ} (hx : x β β³ i) :
decompose β³ x = DirectSum.of (fun i β¦ β³ i) i β¨x, hxβ© :=
decompose_coe _ β¨x, hxβ©
#align direct_sum.decompose_of_mem DirectSum.decompose_of_mem
theorem decompose_of_mem_same {x : M} {i : ΞΉ} (hx : x β β³ i) : (decompose β³ x i : M) = x := by
rw [decompose_of_mem _ hx, DirectSum.of_eq_same, Subtype.coe_mk]
#align direct_sum.decompose_of_mem_same DirectSum.decompose_of_mem_same
| Mathlib/Algebra/DirectSum/Decomposition.lean | 140 | 142 | theorem decompose_of_mem_ne {x : M} {i j : ΞΉ} (hx : x β β³ i) (hij : i β j) :
(decompose β³ x j : M) = 0 := by |
rw [decompose_of_mem _ hx, DirectSum.of_eq_of_ne _ _ _ _ hij, ZeroMemClass.coe_zero]
| 1,654 |
import Mathlib.Algebra.DirectSum.Module
import Mathlib.Algebra.Module.Submodule.Basic
#align_import algebra.direct_sum.decomposition from "leanprover-community/mathlib"@"4e861f25ba5ceef42ba0712d8ffeb32f38ad6441"
variable {ΞΉ R M Ο : Type*}
open DirectSum
namespace DirectSum
section AddCommMonoid
variable [DecidableEq ΞΉ] [AddCommMonoid M]
variable [SetLike Ο M] [AddSubmonoidClass Ο M] (β³ : ΞΉ β Ο)
class Decomposition where
decompose' : M β β¨ i, β³ i
left_inv : Function.LeftInverse (DirectSum.coeAddMonoidHom β³) decompose'
right_inv : Function.RightInverse (DirectSum.coeAddMonoidHom β³) decompose'
#align direct_sum.decomposition DirectSum.Decomposition
instance : Subsingleton (Decomposition β³) :=
β¨fun x y β¦ by
cases' x with x xl xr
cases' y with y yl yr
congr
exact Function.LeftInverse.eq_rightInverse xr ylβ©
abbrev Decomposition.ofAddHom (decompose : M β+ β¨ i, β³ i)
(h_left_inv : (DirectSum.coeAddMonoidHom β³).comp decompose = .id _)
(h_right_inv : decompose.comp (DirectSum.coeAddMonoidHom β³) = .id _) : Decomposition β³ where
decompose' := decompose
left_inv := DFunLike.congr_fun h_left_inv
right_inv := DFunLike.congr_fun h_right_inv
noncomputable def IsInternal.chooseDecomposition (h : IsInternal β³) :
DirectSum.Decomposition β³ where
decompose' := (Equiv.ofBijective _ h).symm
left_inv := (Equiv.ofBijective _ h).right_inv
right_inv := (Equiv.ofBijective _ h).left_inv
variable [Decomposition β³]
protected theorem Decomposition.isInternal : DirectSum.IsInternal β³ :=
β¨Decomposition.right_inv.injective, Decomposition.left_inv.surjectiveβ©
#align direct_sum.decomposition.is_internal DirectSum.Decomposition.isInternal
def decompose : M β β¨ i, β³ i where
toFun := Decomposition.decompose'
invFun := DirectSum.coeAddMonoidHom β³
left_inv := Decomposition.left_inv
right_inv := Decomposition.right_inv
#align direct_sum.decompose DirectSum.decompose
protected theorem Decomposition.inductionOn {p : M β Prop} (h_zero : p 0)
(h_homogeneous : β {i} (m : β³ i), p (m : M)) (h_add : β m m' : M, p m β p m' β p (m + m')) :
β m, p m := by
let β³' : ΞΉ β AddSubmonoid M := fun i β¦
(β¨β¨β³ i, fun x y β¦ AddMemClass.add_mem x yβ©, (ZeroMemClass.zero_mem _)β© : AddSubmonoid M)
haveI t : DirectSum.Decomposition β³' :=
{ decompose' := DirectSum.decompose β³
left_inv := fun _ β¦ (decompose β³).left_inv _
right_inv := fun _ β¦ (decompose β³).right_inv _ }
have mem : β m, m β iSup β³' := fun _m β¦
(DirectSum.IsInternal.addSubmonoid_iSup_eq_top β³' (Decomposition.isInternal β³')).symm βΈ trivial
-- Porting note: needs to use @ even though no implicit argument is provided
exact fun m β¦ @AddSubmonoid.iSup_induction _ _ _ β³' _ _ (mem m)
(fun i m h β¦ h_homogeneous β¨m, hβ©) h_zero h_add
-- exact fun m β¦
-- AddSubmonoid.iSup_induction β³' (mem m) (fun i m h β¦ h_homogeneous β¨m, hβ©) h_zero h_add
#align direct_sum.decomposition.induction_on DirectSum.Decomposition.inductionOn
@[simp]
theorem Decomposition.decompose'_eq : Decomposition.decompose' = decompose β³ := rfl
#align direct_sum.decomposition.decompose'_eq DirectSum.Decomposition.decompose'_eq
@[simp]
theorem decompose_symm_of {i : ΞΉ} (x : β³ i) : (decompose β³).symm (DirectSum.of _ i x) = x :=
DirectSum.coeAddMonoidHom_of β³ _ _
#align direct_sum.decompose_symm_of DirectSum.decompose_symm_of
@[simp]
theorem decompose_coe {i : ΞΉ} (x : β³ i) : decompose β³ (x : M) = DirectSum.of _ i x := by
rw [β decompose_symm_of _, Equiv.apply_symm_apply]
#align direct_sum.decompose_coe DirectSum.decompose_coe
theorem decompose_of_mem {x : M} {i : ΞΉ} (hx : x β β³ i) :
decompose β³ x = DirectSum.of (fun i β¦ β³ i) i β¨x, hxβ© :=
decompose_coe _ β¨x, hxβ©
#align direct_sum.decompose_of_mem DirectSum.decompose_of_mem
theorem decompose_of_mem_same {x : M} {i : ΞΉ} (hx : x β β³ i) : (decompose β³ x i : M) = x := by
rw [decompose_of_mem _ hx, DirectSum.of_eq_same, Subtype.coe_mk]
#align direct_sum.decompose_of_mem_same DirectSum.decompose_of_mem_same
theorem decompose_of_mem_ne {x : M} {i j : ΞΉ} (hx : x β β³ i) (hij : i β j) :
(decompose β³ x j : M) = 0 := by
rw [decompose_of_mem _ hx, DirectSum.of_eq_of_ne _ _ _ _ hij, ZeroMemClass.coe_zero]
#align direct_sum.decompose_of_mem_ne DirectSum.decompose_of_mem_ne
| Mathlib/Algebra/DirectSum/Decomposition.lean | 145 | 147 | theorem degree_eq_of_mem_mem {x : M} {i j : ΞΉ} (hxi : x β β³ i) (hxj : x β β³ j) (hx : x β 0) :
i = j := by |
contrapose! hx; rw [β decompose_of_mem_same β³ hxj, decompose_of_mem_ne β³ hxi hx]
| 1,654 |
import Mathlib.RingTheory.GradedAlgebra.Basic
import Mathlib.Algebra.GradedMulAction
import Mathlib.Algebra.DirectSum.Decomposition
import Mathlib.Algebra.Module.BigOperators
#align_import algebra.module.graded_module from "leanprover-community/mathlib"@"59cdeb0da2480abbc235b7e611ccd9a7e5603d7c"
section
open DirectSum
variable {ΞΉA ΞΉB : Type*} (A : ΞΉA β Type*) (M : ΞΉB β Type*)
namespace DirectSum
open GradedMonoid
class GdistribMulAction [AddMonoid ΞΉA] [VAdd ΞΉA ΞΉB] [GMonoid A] [β i, AddMonoid (M i)]
extends GMulAction A M where
smul_add {i j} (a : A i) (b c : M j) : smul a (b + c) = smul a b + smul a c
smul_zero {i j} (a : A i) : smul a (0 : M j) = 0
#align direct_sum.gdistrib_mul_action DirectSum.GdistribMulAction
class Gmodule [AddMonoid ΞΉA] [VAdd ΞΉA ΞΉB] [β i, AddMonoid (A i)] [β i, AddMonoid (M i)] [GMonoid A]
extends GdistribMulAction A M where
add_smul {i j} (a a' : A i) (b : M j) : smul (a + a') b = smul a b + smul a' b
zero_smul {i j} (b : M j) : smul (0 : A i) b = 0
#align direct_sum.gmodule DirectSum.Gmodule
instance GSemiring.toGmodule [AddMonoid ΞΉA] [β i : ΞΉA, AddCommMonoid (A i)]
[h : GSemiring A] : Gmodule A A :=
{ GMonoid.toGMulAction A with
smul_add := fun _ _ _ => h.mul_add _ _ _
smul_zero := fun _ => h.mul_zero _
add_smul := fun _ _ => h.add_mul _ _
zero_smul := fun _ => h.zero_mul _ }
#align direct_sum.gsemiring.to_gmodule DirectSum.GSemiring.toGmodule
variable [AddMonoid ΞΉA] [VAdd ΞΉA ΞΉB] [β i : ΞΉA, AddCommMonoid (A i)] [β i, AddCommMonoid (M i)]
@[simps]
def gsmulHom [GMonoid A] [Gmodule A M] {i j} : A i β+ M j β+ M (i +α΅₯ j) where
toFun a :=
{ toFun := fun b => GSMul.smul a b
map_zero' := GdistribMulAction.smul_zero _
map_add' := GdistribMulAction.smul_add _ }
map_zero' := AddMonoidHom.ext fun a => Gmodule.zero_smul a
map_add' _aβ _aβ := AddMonoidHom.ext fun _b => Gmodule.add_smul _ _ _
#align direct_sum.gsmul_hom DirectSum.gsmulHom
namespace Gmodule
def smulAddMonoidHom [DecidableEq ΞΉA] [DecidableEq ΞΉB] [GMonoid A] [Gmodule A M] :
(β¨ i, A i) β+ (β¨ i, M i) β+ β¨ i, M i :=
toAddMonoid fun _i =>
AddMonoidHom.flip <|
toAddMonoid fun _j => AddMonoidHom.flip <| (of M _).compHom.comp <| gsmulHom A M
#align direct_sum.gmodule.smul_add_monoid_hom DirectSum.Gmodule.smulAddMonoidHom
section
open GradedMonoid DirectSum Gmodule
instance [DecidableEq ΞΉA] [DecidableEq ΞΉB] [GMonoid A] [Gmodule A M] :
SMul (β¨ i, A i) (β¨ i, M i) where
smul x y := smulAddMonoidHom A M x y
@[simp]
theorem smul_def [DecidableEq ΞΉA] [DecidableEq ΞΉB] [GMonoid A] [Gmodule A M]
(x : β¨ i, A i) (y : β¨ i, M i) :
x β’ y = smulAddMonoidHom _ _ x y := rfl
#align direct_sum.gmodule.smul_def DirectSum.Gmodule.smul_def
@[simp]
| Mathlib/Algebra/Module/GradedModule.lean | 99 | 102 | theorem smulAddMonoidHom_apply_of_of [DecidableEq ΞΉA] [DecidableEq ΞΉB] [GMonoid A] [Gmodule A M]
{i j} (x : A i) (y : M j) :
smulAddMonoidHom A M (DirectSum.of A i x) (of M j y) = of M (i +α΅₯ j) (GSMul.smul x y) := by |
simp [smulAddMonoidHom]
| 1,655 |
import Mathlib.LinearAlgebra.TensorProduct.Tower
import Mathlib.Algebra.DirectSum.Module
#align_import linear_algebra.direct_sum.tensor_product from "leanprover-community/mathlib"@"9b9d125b7be0930f564a68f1d73ace10cf46064d"
suppress_compilation
universe u vβ vβ wβ wβ' wβ wβ'
section Ring
namespace TensorProduct
open TensorProduct
open DirectSum
open LinearMap
attribute [local ext] TensorProduct.ext
variable (R : Type u) [CommSemiring R] (S) [Semiring S] [Algebra R S]
variable {ΞΉβ : Type vβ} {ΞΉβ : Type vβ}
variable [DecidableEq ΞΉβ] [DecidableEq ΞΉβ]
variable (Mβ : ΞΉβ β Type wβ) (Mβ' : Type wβ') (Mβ : ΞΉβ β Type wβ) (Mβ' : Type wβ')
variable [β iβ, AddCommMonoid (Mβ iβ)] [AddCommMonoid Mβ']
variable [β iβ, AddCommMonoid (Mβ iβ)] [AddCommMonoid Mβ']
variable [β iβ, Module R (Mβ iβ)] [Module R Mβ'] [β iβ, Module R (Mβ iβ)] [Module R Mβ']
variable [β iβ, Module S (Mβ iβ)] [β iβ, IsScalarTower R S (Mβ iβ)]
protected def directSum :
((β¨ iβ, Mβ iβ) β[R] β¨ iβ, Mβ iβ) ββ[S] β¨ i : ΞΉβ Γ ΞΉβ, Mβ i.1 β[R] Mβ i.2 := by
-- Porting note: entirely rewritten to allow unification to happen one step at a time
refine LinearEquiv.ofLinear (R := S) (Rβ := S) ?toFun ?invFun ?left ?right
Β· refine AlgebraTensorModule.lift ?_
refine DirectSum.toModule S _ _ fun iβ => ?_
refine LinearMap.flip ?_
refine DirectSum.toModule R _ _ fun iβ => LinearMap.flip <| ?_
refine AlgebraTensorModule.curry ?_
exact DirectSum.lof S (ΞΉβ Γ ΞΉβ) (fun i => Mβ i.1 β[R] Mβ i.2) (iβ, iβ)
Β· refine DirectSum.toModule S _ _ fun i => ?_
exact AlgebraTensorModule.map (DirectSum.lof S _ Mβ i.1) (DirectSum.lof R _ Mβ i.2)
Β· refine DirectSum.linearMap_ext S fun β¨iβ, iββ© => ?_
refine TensorProduct.AlgebraTensorModule.ext fun mβ mβ => ?_
-- Porting note: seems much nicer than the `repeat` lean 3 proof.
simp only [coe_comp, Function.comp_apply, toModule_lof, AlgebraTensorModule.map_tmul,
AlgebraTensorModule.lift_apply, lift.tmul, coe_restrictScalars, flip_apply,
AlgebraTensorModule.curry_apply, curry_apply, id_comp]
Β· -- `(_)` prevents typeclass search timing out on problems that can be solved immediately by
-- unification
apply TensorProduct.AlgebraTensorModule.curry_injective
refine DirectSum.linearMap_ext _ fun iβ => ?_
refine LinearMap.ext fun xβ => ?_
refine DirectSum.linearMap_ext _ fun iβ => ?_
refine LinearMap.ext fun xβ => ?_
-- Porting note: seems much nicer than the `repeat` lean 3 proof.
simp only [coe_comp, Function.comp_apply, AlgebraTensorModule.curry_apply, curry_apply,
coe_restrictScalars, AlgebraTensorModule.lift_apply, lift.tmul, toModule_lof, flip_apply,
AlgebraTensorModule.map_tmul, id_coe, id_eq]
#align tensor_product.direct_sum TensorProduct.directSum
def directSumLeft : (β¨ iβ, Mβ iβ) β[R] Mβ' ββ[R] β¨ i, Mβ i β[R] Mβ' :=
LinearEquiv.ofLinear
(lift <|
DirectSum.toModule R _ _ fun i =>
(mk R _ _).comprβ <| DirectSum.lof R ΞΉβ (fun i => Mβ i β[R] Mβ') _)
(DirectSum.toModule R _ _ fun i => rTensor _ (DirectSum.lof R ΞΉβ _ _))
(DirectSum.linearMap_ext R fun i =>
TensorProduct.ext <|
LinearMap.extβ fun mβ mβ => by
dsimp only [comp_apply, comprβ_apply, id_apply, mk_apply]
simp_rw [DirectSum.toModule_lof, rTensor_tmul, lift.tmul, DirectSum.toModule_lof,
comprβ_apply, mk_apply])
(TensorProduct.ext <|
DirectSum.linearMap_ext R fun i =>
LinearMap.extβ fun mβ mβ => by
dsimp only [comp_apply, comprβ_apply, id_apply, mk_apply]
simp_rw [lift.tmul, DirectSum.toModule_lof, comprβ_apply,
mk_apply, DirectSum.toModule_lof, rTensor_tmul])
#align tensor_product.direct_sum_left TensorProduct.directSumLeft
def directSumRight : (Mβ' β[R] β¨ i, Mβ i) ββ[R] β¨ i, Mβ' β[R] Mβ i :=
TensorProduct.comm R _ _ βͺβ«β directSumLeft R Mβ Mβ' βͺβ«β
DFinsupp.mapRange.linearEquiv fun _ => TensorProduct.comm R _ _
#align tensor_product.direct_sum_right TensorProduct.directSumRight
variable {Mβ Mβ' Mβ Mβ'}
@[simp]
| Mathlib/LinearAlgebra/DirectSum/TensorProduct.lean | 150 | 153 | theorem directSum_lof_tmul_lof (iβ : ΞΉβ) (mβ : Mβ iβ) (iβ : ΞΉβ) (mβ : Mβ iβ) :
TensorProduct.directSum R S Mβ Mβ (DirectSum.lof S ΞΉβ Mβ iβ mβ ββ DirectSum.lof R ΞΉβ Mβ iβ mβ) =
DirectSum.lof S (ΞΉβ Γ ΞΉβ) (fun i => Mβ i.1 β[R] Mβ i.2) (iβ, iβ) (mβ ββ mβ) := by |
simp [TensorProduct.directSum]
| 1,656 |
import Mathlib.Algebra.DirectSum.Finsupp
import Mathlib.LinearAlgebra.Finsupp
import Mathlib.LinearAlgebra.DirectSum.TensorProduct
#align_import linear_algebra.direct_sum.finsupp from "leanprover-community/mathlib"@"9b9d125b7be0930f564a68f1d73ace10cf46064d"
noncomputable section
open DirectSum TensorProduct
open Set LinearMap Submodule
section TensorProduct
variable (R : Type*) [CommSemiring R]
(M : Type*) [AddCommMonoid M] [Module R M]
(N : Type*) [AddCommMonoid N] [Module R N]
namespace TensorProduct
variable (ΞΉ : Type*) [DecidableEq ΞΉ]
noncomputable def finsuppLeft :
(ΞΉ ββ M) β[R] N ββ[R] ΞΉ ββ M β[R] N :=
congr (finsuppLEquivDirectSum R M ΞΉ) (.refl R N) βͺβ«β
directSumLeft R (fun _ β¦ M) N βͺβ«β (finsuppLEquivDirectSum R _ ΞΉ).symm
variable {R M N ΞΉ}
lemma finsuppLeft_apply_tmul (p : ΞΉ ββ M) (n : N) :
finsuppLeft R M N ΞΉ (p ββ[R] n) = p.sum fun i m β¦ Finsupp.single i (m ββ[R] n) := by
apply p.induction_linear
Β· simp
Β· intros f g hf hg; simp [add_tmul, map_add, hf, hg, Finsupp.sum_add_index]
Β· simp [finsuppLeft]
@[simp]
lemma finsuppLeft_apply_tmul_apply (p : ΞΉ ββ M) (n : N) (i : ΞΉ) :
finsuppLeft R M N ΞΉ (p ββ[R] n) i = p i ββ[R] n := by
rw [finsuppLeft_apply_tmul, Finsupp.sum_apply,
Finsupp.sum_eq_single i (fun _ _ β¦ Finsupp.single_eq_of_ne) (by simp), Finsupp.single_eq_same]
| Mathlib/LinearAlgebra/DirectSum/Finsupp.lean | 102 | 107 | theorem finsuppLeft_apply (t : (ΞΉ ββ M) β[R] N) (i : ΞΉ) :
finsuppLeft R M N ΞΉ t i = rTensor N (Finsupp.lapply i) t := by |
induction t using TensorProduct.induction_on with
| zero => simp
| tmul f n => simp only [finsuppLeft_apply_tmul_apply, rTensor_tmul, Finsupp.lapply_apply]
| add x y hx hy => simp [map_add, hx, hy]
| 1,657 |
import Mathlib.Algebra.DirectSum.Finsupp
import Mathlib.LinearAlgebra.Finsupp
import Mathlib.LinearAlgebra.DirectSum.TensorProduct
#align_import linear_algebra.direct_sum.finsupp from "leanprover-community/mathlib"@"9b9d125b7be0930f564a68f1d73ace10cf46064d"
noncomputable section
open DirectSum TensorProduct
open Set LinearMap Submodule
section TensorProduct
variable (R : Type*) [CommSemiring R]
(M : Type*) [AddCommMonoid M] [Module R M]
(N : Type*) [AddCommMonoid N] [Module R N]
namespace TensorProduct
variable (ΞΉ : Type*) [DecidableEq ΞΉ]
noncomputable def finsuppLeft :
(ΞΉ ββ M) β[R] N ββ[R] ΞΉ ββ M β[R] N :=
congr (finsuppLEquivDirectSum R M ΞΉ) (.refl R N) βͺβ«β
directSumLeft R (fun _ β¦ M) N βͺβ«β (finsuppLEquivDirectSum R _ ΞΉ).symm
variable {R M N ΞΉ}
lemma finsuppLeft_apply_tmul (p : ΞΉ ββ M) (n : N) :
finsuppLeft R M N ΞΉ (p ββ[R] n) = p.sum fun i m β¦ Finsupp.single i (m ββ[R] n) := by
apply p.induction_linear
Β· simp
Β· intros f g hf hg; simp [add_tmul, map_add, hf, hg, Finsupp.sum_add_index]
Β· simp [finsuppLeft]
@[simp]
lemma finsuppLeft_apply_tmul_apply (p : ΞΉ ββ M) (n : N) (i : ΞΉ) :
finsuppLeft R M N ΞΉ (p ββ[R] n) i = p i ββ[R] n := by
rw [finsuppLeft_apply_tmul, Finsupp.sum_apply,
Finsupp.sum_eq_single i (fun _ _ β¦ Finsupp.single_eq_of_ne) (by simp), Finsupp.single_eq_same]
theorem finsuppLeft_apply (t : (ΞΉ ββ M) β[R] N) (i : ΞΉ) :
finsuppLeft R M N ΞΉ t i = rTensor N (Finsupp.lapply i) t := by
induction t using TensorProduct.induction_on with
| zero => simp
| tmul f n => simp only [finsuppLeft_apply_tmul_apply, rTensor_tmul, Finsupp.lapply_apply]
| add x y hx hy => simp [map_add, hx, hy]
@[simp]
lemma finsuppLeft_symm_apply_single (i : ΞΉ) (m : M) (n : N) :
(finsuppLeft R M N ΞΉ).symm (Finsupp.single i (m ββ[R] n)) =
Finsupp.single i m ββ[R] n := by
simp [finsuppLeft, Finsupp.lsum]
variable (R M N ΞΉ)
noncomputable def finsuppRight :
M β[R] (ΞΉ ββ N) ββ[R] ΞΉ ββ M β[R] N :=
congr (.refl R M) (finsuppLEquivDirectSum R N ΞΉ) βͺβ«β
directSumRight R M (fun _ : ΞΉ β¦ N) βͺβ«β (finsuppLEquivDirectSum R _ ΞΉ).symm
variable {R M N ΞΉ}
lemma finsuppRight_apply_tmul (m : M) (p : ΞΉ ββ N) :
finsuppRight R M N ΞΉ (m ββ[R] p) = p.sum fun i n β¦ Finsupp.single i (m ββ[R] n) := by
apply p.induction_linear
Β· simp
Β· intros f g hf hg; simp [tmul_add, map_add, hf, hg, Finsupp.sum_add_index]
Β· simp [finsuppRight]
@[simp]
lemma finsuppRight_apply_tmul_apply (m : M) (p : ΞΉ ββ N) (i : ΞΉ) :
finsuppRight R M N ΞΉ (m ββ[R] p) i = m ββ[R] p i := by
rw [finsuppRight_apply_tmul, Finsupp.sum_apply,
Finsupp.sum_eq_single i (fun _ _ β¦ Finsupp.single_eq_of_ne) (by simp), Finsupp.single_eq_same]
| Mathlib/LinearAlgebra/DirectSum/Finsupp.lean | 137 | 142 | theorem finsuppRight_apply (t : M β[R] (ΞΉ ββ N)) (i : ΞΉ) :
finsuppRight R M N ΞΉ t i = lTensor M (Finsupp.lapply i) t := by |
induction t using TensorProduct.induction_on with
| zero => simp
| tmul m f => simp [finsuppRight_apply_tmul_apply]
| add x y hx hy => simp [map_add, hx, hy]
| 1,657 |
import Mathlib.Algebra.DirectSum.Finsupp
import Mathlib.LinearAlgebra.Finsupp
import Mathlib.LinearAlgebra.DirectSum.TensorProduct
#align_import linear_algebra.direct_sum.finsupp from "leanprover-community/mathlib"@"9b9d125b7be0930f564a68f1d73ace10cf46064d"
noncomputable section
open DirectSum TensorProduct
open Set LinearMap Submodule
variable (R S M N ΞΉ ΞΊ : Type*)
[CommSemiring R] [AddCommMonoid M] [Module R M] [AddCommMonoid N] [Module R N]
[Semiring S] [Algebra R S] [Module S M] [IsScalarTower R S M]
open scoped Classical in
def finsuppTensorFinsupp : (ΞΉ ββ M) β[R] (ΞΊ ββ N) ββ[S] ΞΉ Γ ΞΊ ββ M β[R] N :=
TensorProduct.AlgebraTensorModule.congr
(finsuppLEquivDirectSum S M ΞΉ) (finsuppLEquivDirectSum R N ΞΊ) βͺβ«β
((TensorProduct.directSum R S (fun _ : ΞΉ => M) fun _ : ΞΊ => N) βͺβ«β
(finsuppLEquivDirectSum S (M β[R] N) (ΞΉ Γ ΞΊ)).symm)
#align finsupp_tensor_finsupp finsuppTensorFinsupp
@[simp]
| Mathlib/LinearAlgebra/DirectSum/Finsupp.lean | 256 | 259 | theorem finsuppTensorFinsupp_single (i : ΞΉ) (m : M) (k : ΞΊ) (n : N) :
finsuppTensorFinsupp R S M N ΞΉ ΞΊ (Finsupp.single i m ββ Finsupp.single k n) =
Finsupp.single (i, k) (m ββ n) := by |
simp [finsuppTensorFinsupp]
| 1,657 |
import Mathlib.Algebra.DirectSum.Finsupp
import Mathlib.LinearAlgebra.Finsupp
import Mathlib.LinearAlgebra.DirectSum.TensorProduct
#align_import linear_algebra.direct_sum.finsupp from "leanprover-community/mathlib"@"9b9d125b7be0930f564a68f1d73ace10cf46064d"
noncomputable section
open DirectSum TensorProduct
open Set LinearMap Submodule
variable (R S M N ΞΉ ΞΊ : Type*)
[CommSemiring R] [AddCommMonoid M] [Module R M] [AddCommMonoid N] [Module R N]
[Semiring S] [Algebra R S] [Module S M] [IsScalarTower R S M]
open scoped Classical in
def finsuppTensorFinsupp : (ΞΉ ββ M) β[R] (ΞΊ ββ N) ββ[S] ΞΉ Γ ΞΊ ββ M β[R] N :=
TensorProduct.AlgebraTensorModule.congr
(finsuppLEquivDirectSum S M ΞΉ) (finsuppLEquivDirectSum R N ΞΊ) βͺβ«β
((TensorProduct.directSum R S (fun _ : ΞΉ => M) fun _ : ΞΊ => N) βͺβ«β
(finsuppLEquivDirectSum S (M β[R] N) (ΞΉ Γ ΞΊ)).symm)
#align finsupp_tensor_finsupp finsuppTensorFinsupp
@[simp]
theorem finsuppTensorFinsupp_single (i : ΞΉ) (m : M) (k : ΞΊ) (n : N) :
finsuppTensorFinsupp R S M N ΞΉ ΞΊ (Finsupp.single i m ββ Finsupp.single k n) =
Finsupp.single (i, k) (m ββ n) := by
simp [finsuppTensorFinsupp]
#align finsupp_tensor_finsupp_single finsuppTensorFinsupp_single
@[simp]
| Mathlib/LinearAlgebra/DirectSum/Finsupp.lean | 263 | 277 | theorem finsuppTensorFinsupp_apply (f : ΞΉ ββ M) (g : ΞΊ ββ N) (i : ΞΉ) (k : ΞΊ) :
finsuppTensorFinsupp R S M N ΞΉ ΞΊ (f ββ g) (i, k) = f i ββ g k := by |
apply Finsupp.induction_linear f
Β· simp
Β· intro fβ fβ hfβ hfβ
simp [add_tmul, hfβ, hfβ]
intro i' m
apply Finsupp.induction_linear g
Β· simp
Β· intro gβ gβ hgβ hgβ
simp [tmul_add, hgβ, hgβ]
intro k' n
classical
simp_rw [finsuppTensorFinsupp_single, Finsupp.single_apply, Prod.mk.inj_iff, ite_and]
split_ifs <;> simp
| 1,657 |
import Mathlib.Algebra.DirectSum.Finsupp
import Mathlib.LinearAlgebra.Finsupp
import Mathlib.LinearAlgebra.DirectSum.TensorProduct
#align_import linear_algebra.direct_sum.finsupp from "leanprover-community/mathlib"@"9b9d125b7be0930f564a68f1d73ace10cf46064d"
noncomputable section
open DirectSum TensorProduct
open Set LinearMap Submodule
variable (R S M N ΞΉ ΞΊ : Type*)
[CommSemiring R] [AddCommMonoid M] [Module R M] [AddCommMonoid N] [Module R N]
[Semiring S] [Algebra R S] [Module S M] [IsScalarTower R S M]
open scoped Classical in
def finsuppTensorFinsupp : (ΞΉ ββ M) β[R] (ΞΊ ββ N) ββ[S] ΞΉ Γ ΞΊ ββ M β[R] N :=
TensorProduct.AlgebraTensorModule.congr
(finsuppLEquivDirectSum S M ΞΉ) (finsuppLEquivDirectSum R N ΞΊ) βͺβ«β
((TensorProduct.directSum R S (fun _ : ΞΉ => M) fun _ : ΞΊ => N) βͺβ«β
(finsuppLEquivDirectSum S (M β[R] N) (ΞΉ Γ ΞΊ)).symm)
#align finsupp_tensor_finsupp finsuppTensorFinsupp
@[simp]
theorem finsuppTensorFinsupp_single (i : ΞΉ) (m : M) (k : ΞΊ) (n : N) :
finsuppTensorFinsupp R S M N ΞΉ ΞΊ (Finsupp.single i m ββ Finsupp.single k n) =
Finsupp.single (i, k) (m ββ n) := by
simp [finsuppTensorFinsupp]
#align finsupp_tensor_finsupp_single finsuppTensorFinsupp_single
@[simp]
theorem finsuppTensorFinsupp_apply (f : ΞΉ ββ M) (g : ΞΊ ββ N) (i : ΞΉ) (k : ΞΊ) :
finsuppTensorFinsupp R S M N ΞΉ ΞΊ (f ββ g) (i, k) = f i ββ g k := by
apply Finsupp.induction_linear f
Β· simp
Β· intro fβ fβ hfβ hfβ
simp [add_tmul, hfβ, hfβ]
intro i' m
apply Finsupp.induction_linear g
Β· simp
Β· intro gβ gβ hgβ hgβ
simp [tmul_add, hgβ, hgβ]
intro k' n
classical
simp_rw [finsuppTensorFinsupp_single, Finsupp.single_apply, Prod.mk.inj_iff, ite_and]
split_ifs <;> simp
#align finsupp_tensor_finsupp_apply finsuppTensorFinsupp_apply
@[simp]
theorem finsuppTensorFinsupp_symm_single (i : ΞΉ Γ ΞΊ) (m : M) (n : N) :
(finsuppTensorFinsupp R S M N ΞΉ ΞΊ).symm (Finsupp.single i (m ββ n)) =
Finsupp.single i.1 m ββ Finsupp.single i.2 n :=
Prod.casesOn i fun _ _ =>
(LinearEquiv.symm_apply_eq _).2 (finsuppTensorFinsupp_single _ _ _ _ _ _ _ _ _ _).symm
#align finsupp_tensor_finsupp_symm_single finsuppTensorFinsupp_symm_single
def finsuppTensorFinsuppLid : (ΞΉ ββ R) β[R] (ΞΊ ββ N) ββ[R] ΞΉ Γ ΞΊ ββ N :=
finsuppTensorFinsupp R R R N ΞΉ ΞΊ βͺβ«β Finsupp.lcongr (Equiv.refl _) (TensorProduct.lid R N)
@[simp]
| Mathlib/LinearAlgebra/DirectSum/Finsupp.lean | 293 | 295 | theorem finsuppTensorFinsuppLid_apply_apply (f : ΞΉ ββ R) (g : ΞΊ ββ N) (a : ΞΉ) (b : ΞΊ) :
finsuppTensorFinsuppLid R N ΞΉ ΞΊ (f ββ[R] g) (a, b) = f a β’ g b := by |
simp [finsuppTensorFinsuppLid]
| 1,657 |
import Mathlib.Algebra.DirectSum.Finsupp
import Mathlib.LinearAlgebra.Finsupp
import Mathlib.LinearAlgebra.DirectSum.TensorProduct
#align_import linear_algebra.direct_sum.finsupp from "leanprover-community/mathlib"@"9b9d125b7be0930f564a68f1d73ace10cf46064d"
noncomputable section
open DirectSum TensorProduct
open Set LinearMap Submodule
variable (R S M N ΞΉ ΞΊ : Type*)
[CommSemiring R] [AddCommMonoid M] [Module R M] [AddCommMonoid N] [Module R N]
[Semiring S] [Algebra R S] [Module S M] [IsScalarTower R S M]
open scoped Classical in
def finsuppTensorFinsupp : (ΞΉ ββ M) β[R] (ΞΊ ββ N) ββ[S] ΞΉ Γ ΞΊ ββ M β[R] N :=
TensorProduct.AlgebraTensorModule.congr
(finsuppLEquivDirectSum S M ΞΉ) (finsuppLEquivDirectSum R N ΞΊ) βͺβ«β
((TensorProduct.directSum R S (fun _ : ΞΉ => M) fun _ : ΞΊ => N) βͺβ«β
(finsuppLEquivDirectSum S (M β[R] N) (ΞΉ Γ ΞΊ)).symm)
#align finsupp_tensor_finsupp finsuppTensorFinsupp
@[simp]
theorem finsuppTensorFinsupp_single (i : ΞΉ) (m : M) (k : ΞΊ) (n : N) :
finsuppTensorFinsupp R S M N ΞΉ ΞΊ (Finsupp.single i m ββ Finsupp.single k n) =
Finsupp.single (i, k) (m ββ n) := by
simp [finsuppTensorFinsupp]
#align finsupp_tensor_finsupp_single finsuppTensorFinsupp_single
@[simp]
theorem finsuppTensorFinsupp_apply (f : ΞΉ ββ M) (g : ΞΊ ββ N) (i : ΞΉ) (k : ΞΊ) :
finsuppTensorFinsupp R S M N ΞΉ ΞΊ (f ββ g) (i, k) = f i ββ g k := by
apply Finsupp.induction_linear f
Β· simp
Β· intro fβ fβ hfβ hfβ
simp [add_tmul, hfβ, hfβ]
intro i' m
apply Finsupp.induction_linear g
Β· simp
Β· intro gβ gβ hgβ hgβ
simp [tmul_add, hgβ, hgβ]
intro k' n
classical
simp_rw [finsuppTensorFinsupp_single, Finsupp.single_apply, Prod.mk.inj_iff, ite_and]
split_ifs <;> simp
#align finsupp_tensor_finsupp_apply finsuppTensorFinsupp_apply
@[simp]
theorem finsuppTensorFinsupp_symm_single (i : ΞΉ Γ ΞΊ) (m : M) (n : N) :
(finsuppTensorFinsupp R S M N ΞΉ ΞΊ).symm (Finsupp.single i (m ββ n)) =
Finsupp.single i.1 m ββ Finsupp.single i.2 n :=
Prod.casesOn i fun _ _ =>
(LinearEquiv.symm_apply_eq _).2 (finsuppTensorFinsupp_single _ _ _ _ _ _ _ _ _ _).symm
#align finsupp_tensor_finsupp_symm_single finsuppTensorFinsupp_symm_single
def finsuppTensorFinsuppLid : (ΞΉ ββ R) β[R] (ΞΊ ββ N) ββ[R] ΞΉ Γ ΞΊ ββ N :=
finsuppTensorFinsupp R R R N ΞΉ ΞΊ βͺβ«β Finsupp.lcongr (Equiv.refl _) (TensorProduct.lid R N)
@[simp]
theorem finsuppTensorFinsuppLid_apply_apply (f : ΞΉ ββ R) (g : ΞΊ ββ N) (a : ΞΉ) (b : ΞΊ) :
finsuppTensorFinsuppLid R N ΞΉ ΞΊ (f ββ[R] g) (a, b) = f a β’ g b := by
simp [finsuppTensorFinsuppLid]
@[simp]
| Mathlib/LinearAlgebra/DirectSum/Finsupp.lean | 298 | 301 | theorem finsuppTensorFinsuppLid_single_tmul_single (a : ΞΉ) (b : ΞΊ) (r : R) (n : N) :
finsuppTensorFinsuppLid R N ΞΉ ΞΊ (Finsupp.single a r ββ[R] Finsupp.single b n) =
Finsupp.single (a, b) (r β’ n) := by |
simp [finsuppTensorFinsuppLid]
| 1,657 |
import Mathlib.Algebra.DirectSum.Finsupp
import Mathlib.LinearAlgebra.Finsupp
import Mathlib.LinearAlgebra.DirectSum.TensorProduct
#align_import linear_algebra.direct_sum.finsupp from "leanprover-community/mathlib"@"9b9d125b7be0930f564a68f1d73ace10cf46064d"
noncomputable section
open DirectSum TensorProduct
open Set LinearMap Submodule
variable (R S M N ΞΉ ΞΊ : Type*)
[CommSemiring R] [AddCommMonoid M] [Module R M] [AddCommMonoid N] [Module R N]
[Semiring S] [Algebra R S] [Module S M] [IsScalarTower R S M]
open scoped Classical in
def finsuppTensorFinsupp : (ΞΉ ββ M) β[R] (ΞΊ ββ N) ββ[S] ΞΉ Γ ΞΊ ββ M β[R] N :=
TensorProduct.AlgebraTensorModule.congr
(finsuppLEquivDirectSum S M ΞΉ) (finsuppLEquivDirectSum R N ΞΊ) βͺβ«β
((TensorProduct.directSum R S (fun _ : ΞΉ => M) fun _ : ΞΊ => N) βͺβ«β
(finsuppLEquivDirectSum S (M β[R] N) (ΞΉ Γ ΞΊ)).symm)
#align finsupp_tensor_finsupp finsuppTensorFinsupp
@[simp]
theorem finsuppTensorFinsupp_single (i : ΞΉ) (m : M) (k : ΞΊ) (n : N) :
finsuppTensorFinsupp R S M N ΞΉ ΞΊ (Finsupp.single i m ββ Finsupp.single k n) =
Finsupp.single (i, k) (m ββ n) := by
simp [finsuppTensorFinsupp]
#align finsupp_tensor_finsupp_single finsuppTensorFinsupp_single
@[simp]
theorem finsuppTensorFinsupp_apply (f : ΞΉ ββ M) (g : ΞΊ ββ N) (i : ΞΉ) (k : ΞΊ) :
finsuppTensorFinsupp R S M N ΞΉ ΞΊ (f ββ g) (i, k) = f i ββ g k := by
apply Finsupp.induction_linear f
Β· simp
Β· intro fβ fβ hfβ hfβ
simp [add_tmul, hfβ, hfβ]
intro i' m
apply Finsupp.induction_linear g
Β· simp
Β· intro gβ gβ hgβ hgβ
simp [tmul_add, hgβ, hgβ]
intro k' n
classical
simp_rw [finsuppTensorFinsupp_single, Finsupp.single_apply, Prod.mk.inj_iff, ite_and]
split_ifs <;> simp
#align finsupp_tensor_finsupp_apply finsuppTensorFinsupp_apply
@[simp]
theorem finsuppTensorFinsupp_symm_single (i : ΞΉ Γ ΞΊ) (m : M) (n : N) :
(finsuppTensorFinsupp R S M N ΞΉ ΞΊ).symm (Finsupp.single i (m ββ n)) =
Finsupp.single i.1 m ββ Finsupp.single i.2 n :=
Prod.casesOn i fun _ _ =>
(LinearEquiv.symm_apply_eq _).2 (finsuppTensorFinsupp_single _ _ _ _ _ _ _ _ _ _).symm
#align finsupp_tensor_finsupp_symm_single finsuppTensorFinsupp_symm_single
def finsuppTensorFinsuppLid : (ΞΉ ββ R) β[R] (ΞΊ ββ N) ββ[R] ΞΉ Γ ΞΊ ββ N :=
finsuppTensorFinsupp R R R N ΞΉ ΞΊ βͺβ«β Finsupp.lcongr (Equiv.refl _) (TensorProduct.lid R N)
@[simp]
theorem finsuppTensorFinsuppLid_apply_apply (f : ΞΉ ββ R) (g : ΞΊ ββ N) (a : ΞΉ) (b : ΞΊ) :
finsuppTensorFinsuppLid R N ΞΉ ΞΊ (f ββ[R] g) (a, b) = f a β’ g b := by
simp [finsuppTensorFinsuppLid]
@[simp]
theorem finsuppTensorFinsuppLid_single_tmul_single (a : ΞΉ) (b : ΞΊ) (r : R) (n : N) :
finsuppTensorFinsuppLid R N ΞΉ ΞΊ (Finsupp.single a r ββ[R] Finsupp.single b n) =
Finsupp.single (a, b) (r β’ n) := by
simp [finsuppTensorFinsuppLid]
@[simp]
theorem finsuppTensorFinsuppLid_symm_single_smul (i : ΞΉ Γ ΞΊ) (r : R) (n : N) :
(finsuppTensorFinsuppLid R N ΞΉ ΞΊ).symm (Finsupp.single i (r β’ n)) =
Finsupp.single i.1 r ββ Finsupp.single i.2 n :=
Prod.casesOn i fun _ _ =>
(LinearEquiv.symm_apply_eq _).2 (finsuppTensorFinsuppLid_single_tmul_single ..).symm
def finsuppTensorFinsuppRid : (ΞΉ ββ M) β[R] (ΞΊ ββ R) ββ[R] ΞΉ Γ ΞΊ ββ M :=
finsuppTensorFinsupp R R M R ΞΉ ΞΊ βͺβ«β Finsupp.lcongr (Equiv.refl _) (TensorProduct.rid R M)
@[simp]
| Mathlib/LinearAlgebra/DirectSum/Finsupp.lean | 315 | 317 | theorem finsuppTensorFinsuppRid_apply_apply (f : ΞΉ ββ M) (g : ΞΊ ββ R) (a : ΞΉ) (b : ΞΊ) :
finsuppTensorFinsuppRid R M ΞΉ ΞΊ (f ββ[R] g) (a, b) = g b β’ f a := by |
simp [finsuppTensorFinsuppRid]
| 1,657 |
import Mathlib.Algebra.DirectSum.Finsupp
import Mathlib.LinearAlgebra.Finsupp
import Mathlib.LinearAlgebra.DirectSum.TensorProduct
#align_import linear_algebra.direct_sum.finsupp from "leanprover-community/mathlib"@"9b9d125b7be0930f564a68f1d73ace10cf46064d"
noncomputable section
open DirectSum TensorProduct
open Set LinearMap Submodule
variable (R S M N ΞΉ ΞΊ : Type*)
[CommSemiring R] [AddCommMonoid M] [Module R M] [AddCommMonoid N] [Module R N]
[Semiring S] [Algebra R S] [Module S M] [IsScalarTower R S M]
open scoped Classical in
def finsuppTensorFinsupp : (ΞΉ ββ M) β[R] (ΞΊ ββ N) ββ[S] ΞΉ Γ ΞΊ ββ M β[R] N :=
TensorProduct.AlgebraTensorModule.congr
(finsuppLEquivDirectSum S M ΞΉ) (finsuppLEquivDirectSum R N ΞΊ) βͺβ«β
((TensorProduct.directSum R S (fun _ : ΞΉ => M) fun _ : ΞΊ => N) βͺβ«β
(finsuppLEquivDirectSum S (M β[R] N) (ΞΉ Γ ΞΊ)).symm)
#align finsupp_tensor_finsupp finsuppTensorFinsupp
@[simp]
theorem finsuppTensorFinsupp_single (i : ΞΉ) (m : M) (k : ΞΊ) (n : N) :
finsuppTensorFinsupp R S M N ΞΉ ΞΊ (Finsupp.single i m ββ Finsupp.single k n) =
Finsupp.single (i, k) (m ββ n) := by
simp [finsuppTensorFinsupp]
#align finsupp_tensor_finsupp_single finsuppTensorFinsupp_single
@[simp]
theorem finsuppTensorFinsupp_apply (f : ΞΉ ββ M) (g : ΞΊ ββ N) (i : ΞΉ) (k : ΞΊ) :
finsuppTensorFinsupp R S M N ΞΉ ΞΊ (f ββ g) (i, k) = f i ββ g k := by
apply Finsupp.induction_linear f
Β· simp
Β· intro fβ fβ hfβ hfβ
simp [add_tmul, hfβ, hfβ]
intro i' m
apply Finsupp.induction_linear g
Β· simp
Β· intro gβ gβ hgβ hgβ
simp [tmul_add, hgβ, hgβ]
intro k' n
classical
simp_rw [finsuppTensorFinsupp_single, Finsupp.single_apply, Prod.mk.inj_iff, ite_and]
split_ifs <;> simp
#align finsupp_tensor_finsupp_apply finsuppTensorFinsupp_apply
@[simp]
theorem finsuppTensorFinsupp_symm_single (i : ΞΉ Γ ΞΊ) (m : M) (n : N) :
(finsuppTensorFinsupp R S M N ΞΉ ΞΊ).symm (Finsupp.single i (m ββ n)) =
Finsupp.single i.1 m ββ Finsupp.single i.2 n :=
Prod.casesOn i fun _ _ =>
(LinearEquiv.symm_apply_eq _).2 (finsuppTensorFinsupp_single _ _ _ _ _ _ _ _ _ _).symm
#align finsupp_tensor_finsupp_symm_single finsuppTensorFinsupp_symm_single
def finsuppTensorFinsuppLid : (ΞΉ ββ R) β[R] (ΞΊ ββ N) ββ[R] ΞΉ Γ ΞΊ ββ N :=
finsuppTensorFinsupp R R R N ΞΉ ΞΊ βͺβ«β Finsupp.lcongr (Equiv.refl _) (TensorProduct.lid R N)
@[simp]
theorem finsuppTensorFinsuppLid_apply_apply (f : ΞΉ ββ R) (g : ΞΊ ββ N) (a : ΞΉ) (b : ΞΊ) :
finsuppTensorFinsuppLid R N ΞΉ ΞΊ (f ββ[R] g) (a, b) = f a β’ g b := by
simp [finsuppTensorFinsuppLid]
@[simp]
theorem finsuppTensorFinsuppLid_single_tmul_single (a : ΞΉ) (b : ΞΊ) (r : R) (n : N) :
finsuppTensorFinsuppLid R N ΞΉ ΞΊ (Finsupp.single a r ββ[R] Finsupp.single b n) =
Finsupp.single (a, b) (r β’ n) := by
simp [finsuppTensorFinsuppLid]
@[simp]
theorem finsuppTensorFinsuppLid_symm_single_smul (i : ΞΉ Γ ΞΊ) (r : R) (n : N) :
(finsuppTensorFinsuppLid R N ΞΉ ΞΊ).symm (Finsupp.single i (r β’ n)) =
Finsupp.single i.1 r ββ Finsupp.single i.2 n :=
Prod.casesOn i fun _ _ =>
(LinearEquiv.symm_apply_eq _).2 (finsuppTensorFinsuppLid_single_tmul_single ..).symm
def finsuppTensorFinsuppRid : (ΞΉ ββ M) β[R] (ΞΊ ββ R) ββ[R] ΞΉ Γ ΞΊ ββ M :=
finsuppTensorFinsupp R R M R ΞΉ ΞΊ βͺβ«β Finsupp.lcongr (Equiv.refl _) (TensorProduct.rid R M)
@[simp]
theorem finsuppTensorFinsuppRid_apply_apply (f : ΞΉ ββ M) (g : ΞΊ ββ R) (a : ΞΉ) (b : ΞΊ) :
finsuppTensorFinsuppRid R M ΞΉ ΞΊ (f ββ[R] g) (a, b) = g b β’ f a := by
simp [finsuppTensorFinsuppRid]
@[simp]
| Mathlib/LinearAlgebra/DirectSum/Finsupp.lean | 320 | 323 | theorem finsuppTensorFinsuppRid_single_tmul_single (a : ΞΉ) (b : ΞΊ) (m : M) (r : R) :
finsuppTensorFinsuppRid R M ΞΉ ΞΊ (Finsupp.single a m ββ[R] Finsupp.single b r) =
Finsupp.single (a, b) (r β’ m) := by |
simp [finsuppTensorFinsuppRid]
| 1,657 |
import Mathlib.Algebra.Category.ModuleCat.Monoidal.Basic
import Mathlib.CategoryTheory.Monoidal.Functorial
import Mathlib.CategoryTheory.Monoidal.Types.Basic
import Mathlib.LinearAlgebra.DirectSum.Finsupp
import Mathlib.CategoryTheory.Linear.LinearFunctor
#align_import algebra.category.Module.adjunctions from "leanprover-community/mathlib"@"95a87616d63b3cb49d3fe678d416fbe9c4217bf4"
set_option linter.uppercaseLean3 false -- `Module`
noncomputable section
open CategoryTheory
namespace ModuleCat
universe u
open scoped Classical
variable (R : Type u)
section
variable [Ring R]
@[simps]
def free : Type u β₯€ ModuleCat R where
obj X := ModuleCat.of R (X ββ R)
map {X Y} f := Finsupp.lmapDomain _ _ f
map_id := by intros; exact Finsupp.lmapDomain_id _ _
map_comp := by intros; exact Finsupp.lmapDomain_comp _ _ _ _
#align Module.free ModuleCat.free
def adj : free R β£ forget (ModuleCat.{u} R) :=
Adjunction.mkOfHomEquiv
{ homEquiv := fun X M => (Finsupp.lift M R X).toEquiv.symm
homEquiv_naturality_left_symm := fun {_ _} M f g =>
Finsupp.lhom_ext' fun x =>
LinearMap.ext_ring
(Finsupp.sum_mapDomain_index_addMonoidHom fun y => (smulAddHom R M).flip (g y)).symm }
#align Module.adj ModuleCat.adj
instance : (forget (ModuleCat.{u} R)).IsRightAdjoint :=
(adj R).isRightAdjoint
end
namespace Free
open MonoidalCategory
variable [CommRing R]
attribute [local ext] TensorProduct.ext
def Ξ΅ : π_ (ModuleCat.{u} R) βΆ (free R).obj (π_ (Type u)) :=
Finsupp.lsingle PUnit.unit
#align Module.free.Ξ΅ ModuleCat.Free.Ξ΅
-- This lemma has always been bad, but lean4#2644 made `simp` start noticing
@[simp, nolint simpNF]
theorem Ξ΅_apply (r : R) : Ξ΅ R r = Finsupp.single PUnit.unit r :=
rfl
#align Module.free.Ξ΅_apply ModuleCat.Free.Ξ΅_apply
def ΞΌ (Ξ± Ξ² : Type u) : (free R).obj Ξ± β (free R).obj Ξ² β
(free R).obj (Ξ± β Ξ²) :=
(finsuppTensorFinsupp' R Ξ± Ξ²).toModuleIso
#align Module.free.ΞΌ ModuleCat.Free.ΞΌ
| Mathlib/Algebra/Category/ModuleCat/Adjunctions.lean | 89 | 109 | theorem ΞΌ_natural {X Y X' Y' : Type u} (f : X βΆ Y) (g : X' βΆ Y') :
((free R).map f β (free R).map g) β« (ΞΌ R Y Y').hom = (ΞΌ R X X').hom β« (free R).map (f β g) := by |
-- Porting note (#11041): broken ext
apply TensorProduct.ext
apply Finsupp.lhom_ext'
intro x
apply LinearMap.ext_ring
apply Finsupp.lhom_ext'
intro x'
apply LinearMap.ext_ring
apply Finsupp.ext
intro β¨y, y'β©
-- Porting note (#10934): used to be dsimp [ΞΌ]
change (finsuppTensorFinsupp' R Y Y')
(Finsupp.mapDomain f (Finsupp.single x 1) ββ[R] Finsupp.mapDomain g (Finsupp.single x' 1)) _
= (Finsupp.mapDomain (f β g) (finsuppTensorFinsupp' R X X'
(Finsupp.single x 1 ββ[R] Finsupp.single x' 1))) _
-- extra `rfl` after leanprover/lean4#2466
simp_rw [Finsupp.mapDomain_single, finsuppTensorFinsupp'_single_tmul_single, mul_one,
Finsupp.mapDomain_single, CategoryTheory.tensor_apply]; rfl
| 1,658 |
import Mathlib.Algebra.Category.ModuleCat.Monoidal.Basic
import Mathlib.CategoryTheory.Monoidal.Functorial
import Mathlib.CategoryTheory.Monoidal.Types.Basic
import Mathlib.LinearAlgebra.DirectSum.Finsupp
import Mathlib.CategoryTheory.Linear.LinearFunctor
#align_import algebra.category.Module.adjunctions from "leanprover-community/mathlib"@"95a87616d63b3cb49d3fe678d416fbe9c4217bf4"
set_option linter.uppercaseLean3 false -- `Module`
noncomputable section
open CategoryTheory
namespace ModuleCat
universe u
open scoped Classical
variable (R : Type u)
section
variable [Ring R]
@[simps]
def free : Type u β₯€ ModuleCat R where
obj X := ModuleCat.of R (X ββ R)
map {X Y} f := Finsupp.lmapDomain _ _ f
map_id := by intros; exact Finsupp.lmapDomain_id _ _
map_comp := by intros; exact Finsupp.lmapDomain_comp _ _ _ _
#align Module.free ModuleCat.free
def adj : free R β£ forget (ModuleCat.{u} R) :=
Adjunction.mkOfHomEquiv
{ homEquiv := fun X M => (Finsupp.lift M R X).toEquiv.symm
homEquiv_naturality_left_symm := fun {_ _} M f g =>
Finsupp.lhom_ext' fun x =>
LinearMap.ext_ring
(Finsupp.sum_mapDomain_index_addMonoidHom fun y => (smulAddHom R M).flip (g y)).symm }
#align Module.adj ModuleCat.adj
instance : (forget (ModuleCat.{u} R)).IsRightAdjoint :=
(adj R).isRightAdjoint
end
namespace Free
open MonoidalCategory
variable [CommRing R]
attribute [local ext] TensorProduct.ext
def Ξ΅ : π_ (ModuleCat.{u} R) βΆ (free R).obj (π_ (Type u)) :=
Finsupp.lsingle PUnit.unit
#align Module.free.Ξ΅ ModuleCat.Free.Ξ΅
-- This lemma has always been bad, but lean4#2644 made `simp` start noticing
@[simp, nolint simpNF]
theorem Ξ΅_apply (r : R) : Ξ΅ R r = Finsupp.single PUnit.unit r :=
rfl
#align Module.free.Ξ΅_apply ModuleCat.Free.Ξ΅_apply
def ΞΌ (Ξ± Ξ² : Type u) : (free R).obj Ξ± β (free R).obj Ξ² β
(free R).obj (Ξ± β Ξ²) :=
(finsuppTensorFinsupp' R Ξ± Ξ²).toModuleIso
#align Module.free.ΞΌ ModuleCat.Free.ΞΌ
theorem ΞΌ_natural {X Y X' Y' : Type u} (f : X βΆ Y) (g : X' βΆ Y') :
((free R).map f β (free R).map g) β« (ΞΌ R Y Y').hom = (ΞΌ R X X').hom β« (free R).map (f β g) := by
-- Porting note (#11041): broken ext
apply TensorProduct.ext
apply Finsupp.lhom_ext'
intro x
apply LinearMap.ext_ring
apply Finsupp.lhom_ext'
intro x'
apply LinearMap.ext_ring
apply Finsupp.ext
intro β¨y, y'β©
-- Porting note (#10934): used to be dsimp [ΞΌ]
change (finsuppTensorFinsupp' R Y Y')
(Finsupp.mapDomain f (Finsupp.single x 1) ββ[R] Finsupp.mapDomain g (Finsupp.single x' 1)) _
= (Finsupp.mapDomain (f β g) (finsuppTensorFinsupp' R X X'
(Finsupp.single x 1 ββ[R] Finsupp.single x' 1))) _
-- extra `rfl` after leanprover/lean4#2466
simp_rw [Finsupp.mapDomain_single, finsuppTensorFinsupp'_single_tmul_single, mul_one,
Finsupp.mapDomain_single, CategoryTheory.tensor_apply]; rfl
#align Module.free.ΞΌ_natural ModuleCat.Free.ΞΌ_natural
| Mathlib/Algebra/Category/ModuleCat/Adjunctions.lean | 112 | 129 | theorem left_unitality (X : Type u) :
(Ξ»_ ((free R).obj X)).hom =
(Ξ΅ R β π ((free R).obj X)) β« (ΞΌ R (π_ (Type u)) X).hom β« map (free R).obj (Ξ»_ X).hom := by |
-- Porting note (#11041): broken ext
apply TensorProduct.ext
apply LinearMap.ext_ring
apply Finsupp.lhom_ext'
intro x
apply LinearMap.ext_ring
apply Finsupp.ext
intro x'
-- Porting note (#10934): used to be dsimp [Ξ΅, ΞΌ]
let q : X ββ R := ((Ξ»_ (of R (X ββ R))).hom) (1 ββ[R] Finsupp.single x 1)
change q x' = Finsupp.mapDomain (Ξ»_ X).hom (finsuppTensorFinsupp' R (π_ (Type u)) X
(Finsupp.single PUnit.unit 1 ββ[R] Finsupp.single x 1)) x'
simp_rw [q, finsuppTensorFinsupp'_single_tmul_single,
ModuleCat.MonoidalCategory.leftUnitor_hom_apply, mul_one,
Finsupp.mapDomain_single, CategoryTheory.leftUnitor_hom_apply, one_smul]
| 1,658 |
import Mathlib.Algebra.Category.ModuleCat.Monoidal.Basic
import Mathlib.CategoryTheory.Monoidal.Functorial
import Mathlib.CategoryTheory.Monoidal.Types.Basic
import Mathlib.LinearAlgebra.DirectSum.Finsupp
import Mathlib.CategoryTheory.Linear.LinearFunctor
#align_import algebra.category.Module.adjunctions from "leanprover-community/mathlib"@"95a87616d63b3cb49d3fe678d416fbe9c4217bf4"
set_option linter.uppercaseLean3 false -- `Module`
noncomputable section
open CategoryTheory
namespace ModuleCat
universe u
open scoped Classical
variable (R : Type u)
section
variable [Ring R]
@[simps]
def free : Type u β₯€ ModuleCat R where
obj X := ModuleCat.of R (X ββ R)
map {X Y} f := Finsupp.lmapDomain _ _ f
map_id := by intros; exact Finsupp.lmapDomain_id _ _
map_comp := by intros; exact Finsupp.lmapDomain_comp _ _ _ _
#align Module.free ModuleCat.free
def adj : free R β£ forget (ModuleCat.{u} R) :=
Adjunction.mkOfHomEquiv
{ homEquiv := fun X M => (Finsupp.lift M R X).toEquiv.symm
homEquiv_naturality_left_symm := fun {_ _} M f g =>
Finsupp.lhom_ext' fun x =>
LinearMap.ext_ring
(Finsupp.sum_mapDomain_index_addMonoidHom fun y => (smulAddHom R M).flip (g y)).symm }
#align Module.adj ModuleCat.adj
instance : (forget (ModuleCat.{u} R)).IsRightAdjoint :=
(adj R).isRightAdjoint
end
namespace Free
open MonoidalCategory
variable [CommRing R]
attribute [local ext] TensorProduct.ext
def Ξ΅ : π_ (ModuleCat.{u} R) βΆ (free R).obj (π_ (Type u)) :=
Finsupp.lsingle PUnit.unit
#align Module.free.Ξ΅ ModuleCat.Free.Ξ΅
-- This lemma has always been bad, but lean4#2644 made `simp` start noticing
@[simp, nolint simpNF]
theorem Ξ΅_apply (r : R) : Ξ΅ R r = Finsupp.single PUnit.unit r :=
rfl
#align Module.free.Ξ΅_apply ModuleCat.Free.Ξ΅_apply
def ΞΌ (Ξ± Ξ² : Type u) : (free R).obj Ξ± β (free R).obj Ξ² β
(free R).obj (Ξ± β Ξ²) :=
(finsuppTensorFinsupp' R Ξ± Ξ²).toModuleIso
#align Module.free.ΞΌ ModuleCat.Free.ΞΌ
theorem ΞΌ_natural {X Y X' Y' : Type u} (f : X βΆ Y) (g : X' βΆ Y') :
((free R).map f β (free R).map g) β« (ΞΌ R Y Y').hom = (ΞΌ R X X').hom β« (free R).map (f β g) := by
-- Porting note (#11041): broken ext
apply TensorProduct.ext
apply Finsupp.lhom_ext'
intro x
apply LinearMap.ext_ring
apply Finsupp.lhom_ext'
intro x'
apply LinearMap.ext_ring
apply Finsupp.ext
intro β¨y, y'β©
-- Porting note (#10934): used to be dsimp [ΞΌ]
change (finsuppTensorFinsupp' R Y Y')
(Finsupp.mapDomain f (Finsupp.single x 1) ββ[R] Finsupp.mapDomain g (Finsupp.single x' 1)) _
= (Finsupp.mapDomain (f β g) (finsuppTensorFinsupp' R X X'
(Finsupp.single x 1 ββ[R] Finsupp.single x' 1))) _
-- extra `rfl` after leanprover/lean4#2466
simp_rw [Finsupp.mapDomain_single, finsuppTensorFinsupp'_single_tmul_single, mul_one,
Finsupp.mapDomain_single, CategoryTheory.tensor_apply]; rfl
#align Module.free.ΞΌ_natural ModuleCat.Free.ΞΌ_natural
theorem left_unitality (X : Type u) :
(Ξ»_ ((free R).obj X)).hom =
(Ξ΅ R β π ((free R).obj X)) β« (ΞΌ R (π_ (Type u)) X).hom β« map (free R).obj (Ξ»_ X).hom := by
-- Porting note (#11041): broken ext
apply TensorProduct.ext
apply LinearMap.ext_ring
apply Finsupp.lhom_ext'
intro x
apply LinearMap.ext_ring
apply Finsupp.ext
intro x'
-- Porting note (#10934): used to be dsimp [Ξ΅, ΞΌ]
let q : X ββ R := ((Ξ»_ (of R (X ββ R))).hom) (1 ββ[R] Finsupp.single x 1)
change q x' = Finsupp.mapDomain (Ξ»_ X).hom (finsuppTensorFinsupp' R (π_ (Type u)) X
(Finsupp.single PUnit.unit 1 ββ[R] Finsupp.single x 1)) x'
simp_rw [q, finsuppTensorFinsupp'_single_tmul_single,
ModuleCat.MonoidalCategory.leftUnitor_hom_apply, mul_one,
Finsupp.mapDomain_single, CategoryTheory.leftUnitor_hom_apply, one_smul]
#align Module.free.left_unitality ModuleCat.Free.left_unitality
| Mathlib/Algebra/Category/ModuleCat/Adjunctions.lean | 132 | 149 | theorem right_unitality (X : Type u) :
(Ο_ ((free R).obj X)).hom =
(π ((free R).obj X) β Ξ΅ R) β« (ΞΌ R X (π_ (Type u))).hom β« map (free R).obj (Ο_ X).hom := by |
-- Porting note (#11041): broken ext
apply TensorProduct.ext
apply Finsupp.lhom_ext'
intro x
apply LinearMap.ext_ring
apply LinearMap.ext_ring
apply Finsupp.ext
intro x'
-- Porting note (#10934): used to be dsimp [Ξ΅, ΞΌ]
let q : X ββ R := ((Ο_ (of R (X ββ R))).hom) (Finsupp.single x 1 ββ[R] 1)
change q x' = Finsupp.mapDomain (Ο_ X).hom (finsuppTensorFinsupp' R X (π_ (Type u))
(Finsupp.single x 1 ββ[R] Finsupp.single PUnit.unit 1)) x'
simp_rw [q, finsuppTensorFinsupp'_single_tmul_single,
ModuleCat.MonoidalCategory.rightUnitor_hom_apply, mul_one,
Finsupp.mapDomain_single, CategoryTheory.rightUnitor_hom_apply, one_smul]
| 1,658 |
import Mathlib.LinearAlgebra.BilinearMap
import Mathlib.LinearAlgebra.BilinearForm.Basic
import Mathlib.LinearAlgebra.Basis
import Mathlib.Algebra.Algebra.Bilinear
open LinearMap (BilinForm)
universe u v w
variable {R : Type*} {M : Type*} [CommSemiring R] [AddCommMonoid M] [Module R M]
variable {Rβ : Type*} {Mβ : Type*} [CommRing Rβ] [AddCommGroup Mβ] [Module Rβ Mβ]
variable {V : Type*} {K : Type*} [Field K] [AddCommGroup V] [Module K V]
variable {B : BilinForm R M} {Bβ : BilinForm Rβ Mβ}
namespace LinearMap
namespace BilinForm
section ToLin'
def toLinHomAuxβ (A : BilinForm R M) (x : M) : M ββ[R] R := A x
#align bilin_form.to_lin_hom_auxβ LinearMap.BilinForm.toLinHomAuxβ
@[deprecated (since := "2024-04-26")]
def toLinHomAuxβ (A : BilinForm R M) : M ββ[R] M ββ[R] R := A
#align bilin_form.to_lin_hom_auxβ LinearMap.BilinForm.toLinHomAuxβ
@[deprecated (since := "2024-04-26")]
def toLinHom : BilinForm R M ββ[R] M ββ[R] M ββ[R] R := LinearMap.id
#align bilin_form.to_lin_hom LinearMap.BilinForm.toLinHom
set_option linter.deprecated false in
@[deprecated (since := "2024-04-26")]
theorem toLin'_apply (A : BilinForm R M) (x : M) : toLinHom (M := M) A x = A x :=
rfl
#align bilin_form.to_lin'_apply LinearMap.BilinForm.toLin'_apply
variable (B)
theorem sum_left {Ξ±} (t : Finset Ξ±) (g : Ξ± β M) (w : M) :
B (β i β t, g i) w = β i β t, B (g i) w :=
B.map_sumβ t g w
#align bilin_form.sum_left LinearMap.BilinForm.sum_left
variable (w : M)
theorem sum_right {Ξ±} (t : Finset Ξ±) (w : M) (g : Ξ± β M) :
B w (β i β t, g i) = β i β t, B w (g i) := map_sum _ _ _
#align bilin_form.sum_right LinearMap.BilinForm.sum_right
| Mathlib/LinearAlgebra/BilinearForm/Hom.lean | 90 | 92 | theorem sum_apply {Ξ±} (t : Finset Ξ±) (B : Ξ± β BilinForm R M) (v w : M) :
(β i β t, B i) v w = β i β t, B i v w := by |
simp only [coeFn_sum, Finset.sum_apply]
| 1,659 |
import Mathlib.LinearAlgebra.Basis
import Mathlib.LinearAlgebra.Multilinear.Basic
#align_import linear_algebra.multilinear.basis from "leanprover-community/mathlib"@"ce11c3c2a285bbe6937e26d9792fda4e51f3fe1a"
open MultilinearMap
variable {R : Type*} {ΞΉ : Type*} {n : β} {M : Fin n β Type*} {Mβ : Type*} {Mβ : Type*}
variable [CommSemiring R] [AddCommMonoid Mβ] [AddCommMonoid Mβ] [β i, AddCommMonoid (M i)]
variable [β i, Module R (M i)] [Module R Mβ] [Module R Mβ]
| Mathlib/LinearAlgebra/Multilinear/Basis.lean | 32 | 49 | theorem Basis.ext_multilinear_fin {f g : MultilinearMap R M Mβ} {ΞΉβ : Fin n β Type*}
(e : β i, Basis (ΞΉβ i) R (M i))
(h : β v : β i, ΞΉβ i, (f fun i => e i (v i)) = g fun i => e i (v i)) : f = g := by |
induction' n with m hm
Β· ext x
convert h finZeroElim
Β· apply Function.LeftInverse.injective uncurry_curryLeft
refine Basis.ext (e 0) ?_
intro i
apply hm (Fin.tail e)
intro j
convert h (Fin.cons i j)
iterate 2
rw [curryLeft_apply]
congr 1 with x
refine Fin.cases rfl (fun x => ?_) x
dsimp [Fin.tail]
rw [Fin.cons_succ, Fin.cons_succ]
| 1,660 |
import Mathlib.LinearAlgebra.Basis
import Mathlib.LinearAlgebra.Multilinear.Basic
#align_import linear_algebra.multilinear.basis from "leanprover-community/mathlib"@"ce11c3c2a285bbe6937e26d9792fda4e51f3fe1a"
open MultilinearMap
variable {R : Type*} {ΞΉ : Type*} {n : β} {M : Fin n β Type*} {Mβ : Type*} {Mβ : Type*}
variable [CommSemiring R] [AddCommMonoid Mβ] [AddCommMonoid Mβ] [β i, AddCommMonoid (M i)]
variable [β i, Module R (M i)] [Module R Mβ] [Module R Mβ]
theorem Basis.ext_multilinear_fin {f g : MultilinearMap R M Mβ} {ΞΉβ : Fin n β Type*}
(e : β i, Basis (ΞΉβ i) R (M i))
(h : β v : β i, ΞΉβ i, (f fun i => e i (v i)) = g fun i => e i (v i)) : f = g := by
induction' n with m hm
Β· ext x
convert h finZeroElim
Β· apply Function.LeftInverse.injective uncurry_curryLeft
refine Basis.ext (e 0) ?_
intro i
apply hm (Fin.tail e)
intro j
convert h (Fin.cons i j)
iterate 2
rw [curryLeft_apply]
congr 1 with x
refine Fin.cases rfl (fun x => ?_) x
dsimp [Fin.tail]
rw [Fin.cons_succ, Fin.cons_succ]
#align basis.ext_multilinear_fin Basis.ext_multilinear_fin
| Mathlib/LinearAlgebra/Multilinear/Basis.lean | 56 | 61 | theorem Basis.ext_multilinear [Finite ΞΉ] {f g : MultilinearMap R (fun _ : ΞΉ => Mβ) Mβ} {ΞΉβ : Type*}
(e : Basis ΞΉβ R Mβ) (h : β v : ΞΉ β ΞΉβ, (f fun i => e (v i)) = g fun i => e (v i)) : f = g := by |
cases nonempty_fintype ΞΉ
exact
(domDomCongr_eq_iff (Fintype.equivFin ΞΉ) f g).mp
(Basis.ext_multilinear_fin (fun _ => e) fun i => h (i β _))
| 1,660 |
import Mathlib.Data.Matrix.Basis
import Mathlib.LinearAlgebra.Basis
import Mathlib.LinearAlgebra.Pi
#align_import linear_algebra.std_basis from "leanprover-community/mathlib"@"13bce9a6b6c44f6b4c91ac1c1d2a816e2533d395"
open Function Set Submodule
namespace LinearMap
variable (R : Type*) {ΞΉ : Type*} [Semiring R] (Ο : ΞΉ β Type*) [β i, AddCommMonoid (Ο i)]
[β i, Module R (Ο i)] [DecidableEq ΞΉ]
def stdBasis : β i : ΞΉ, Ο i ββ[R] β i, Ο i :=
single
#align linear_map.std_basis LinearMap.stdBasis
theorem stdBasis_apply (i : ΞΉ) (b : Ο i) : stdBasis R Ο i b = update (0 : (a : ΞΉ) β Ο a) i b :=
rfl
#align linear_map.std_basis_apply LinearMap.stdBasis_apply
@[simp]
| Mathlib/LinearAlgebra/StdBasis.lean | 55 | 57 | theorem stdBasis_apply' (i i' : ΞΉ) : (stdBasis R (fun _x : ΞΉ => R) i) 1 i' = ite (i = i') 1 0 := by |
rw [LinearMap.stdBasis_apply, Function.update_apply, Pi.zero_apply]
congr 1; rw [eq_iff_iff, eq_comm]
| 1,661 |
import Mathlib.Data.Matrix.Basis
import Mathlib.LinearAlgebra.Basis
import Mathlib.LinearAlgebra.Pi
#align_import linear_algebra.std_basis from "leanprover-community/mathlib"@"13bce9a6b6c44f6b4c91ac1c1d2a816e2533d395"
open Function Set Submodule
namespace LinearMap
variable (R : Type*) {ΞΉ : Type*} [Semiring R] (Ο : ΞΉ β Type*) [β i, AddCommMonoid (Ο i)]
[β i, Module R (Ο i)] [DecidableEq ΞΉ]
def stdBasis : β i : ΞΉ, Ο i ββ[R] β i, Ο i :=
single
#align linear_map.std_basis LinearMap.stdBasis
theorem stdBasis_apply (i : ΞΉ) (b : Ο i) : stdBasis R Ο i b = update (0 : (a : ΞΉ) β Ο a) i b :=
rfl
#align linear_map.std_basis_apply LinearMap.stdBasis_apply
@[simp]
theorem stdBasis_apply' (i i' : ΞΉ) : (stdBasis R (fun _x : ΞΉ => R) i) 1 i' = ite (i = i') 1 0 := by
rw [LinearMap.stdBasis_apply, Function.update_apply, Pi.zero_apply]
congr 1; rw [eq_iff_iff, eq_comm]
#align linear_map.std_basis_apply' LinearMap.stdBasis_apply'
theorem coe_stdBasis (i : ΞΉ) : β(stdBasis R Ο i) = Pi.single i :=
rfl
#align linear_map.coe_std_basis LinearMap.coe_stdBasis
@[simp]
theorem stdBasis_same (i : ΞΉ) (b : Ο i) : stdBasis R Ο i b i = b :=
Pi.single_eq_same i b
#align linear_map.std_basis_same LinearMap.stdBasis_same
theorem stdBasis_ne (i j : ΞΉ) (h : j β i) (b : Ο i) : stdBasis R Ο i b j = 0 :=
Pi.single_eq_of_ne h b
#align linear_map.std_basis_ne LinearMap.stdBasis_ne
| Mathlib/LinearAlgebra/StdBasis.lean | 73 | 77 | theorem stdBasis_eq_pi_diag (i : ΞΉ) : stdBasis R Ο i = pi (diag i) := by |
ext x j
-- Porting note: made types explicit
convert (update_apply (R := R) (Ο := Ο) (ΞΉ := ΞΉ) 0 x i j _).symm
rfl
| 1,661 |
import Mathlib.Data.Matrix.Basis
import Mathlib.LinearAlgebra.Basis
import Mathlib.LinearAlgebra.Pi
#align_import linear_algebra.std_basis from "leanprover-community/mathlib"@"13bce9a6b6c44f6b4c91ac1c1d2a816e2533d395"
open Function Set Submodule
namespace LinearMap
variable (R : Type*) {ΞΉ : Type*} [Semiring R] (Ο : ΞΉ β Type*) [β i, AddCommMonoid (Ο i)]
[β i, Module R (Ο i)] [DecidableEq ΞΉ]
def stdBasis : β i : ΞΉ, Ο i ββ[R] β i, Ο i :=
single
#align linear_map.std_basis LinearMap.stdBasis
theorem stdBasis_apply (i : ΞΉ) (b : Ο i) : stdBasis R Ο i b = update (0 : (a : ΞΉ) β Ο a) i b :=
rfl
#align linear_map.std_basis_apply LinearMap.stdBasis_apply
@[simp]
theorem stdBasis_apply' (i i' : ΞΉ) : (stdBasis R (fun _x : ΞΉ => R) i) 1 i' = ite (i = i') 1 0 := by
rw [LinearMap.stdBasis_apply, Function.update_apply, Pi.zero_apply]
congr 1; rw [eq_iff_iff, eq_comm]
#align linear_map.std_basis_apply' LinearMap.stdBasis_apply'
theorem coe_stdBasis (i : ΞΉ) : β(stdBasis R Ο i) = Pi.single i :=
rfl
#align linear_map.coe_std_basis LinearMap.coe_stdBasis
@[simp]
theorem stdBasis_same (i : ΞΉ) (b : Ο i) : stdBasis R Ο i b i = b :=
Pi.single_eq_same i b
#align linear_map.std_basis_same LinearMap.stdBasis_same
theorem stdBasis_ne (i j : ΞΉ) (h : j β i) (b : Ο i) : stdBasis R Ο i b j = 0 :=
Pi.single_eq_of_ne h b
#align linear_map.std_basis_ne LinearMap.stdBasis_ne
theorem stdBasis_eq_pi_diag (i : ΞΉ) : stdBasis R Ο i = pi (diag i) := by
ext x j
-- Porting note: made types explicit
convert (update_apply (R := R) (Ο := Ο) (ΞΉ := ΞΉ) 0 x i j _).symm
rfl
#align linear_map.std_basis_eq_pi_diag LinearMap.stdBasis_eq_pi_diag
theorem ker_stdBasis (i : ΞΉ) : ker (stdBasis R Ο i) = β₯ :=
ker_eq_bot_of_injective <| Pi.single_injective _ _
#align linear_map.ker_std_basis LinearMap.ker_stdBasis
| Mathlib/LinearAlgebra/StdBasis.lean | 84 | 85 | theorem proj_comp_stdBasis (i j : ΞΉ) : (proj i).comp (stdBasis R Ο j) = diag j i := by |
rw [stdBasis_eq_pi_diag, proj_pi]
| 1,661 |
import Mathlib.Data.Matrix.Basis
import Mathlib.LinearAlgebra.Basis
import Mathlib.LinearAlgebra.Pi
#align_import linear_algebra.std_basis from "leanprover-community/mathlib"@"13bce9a6b6c44f6b4c91ac1c1d2a816e2533d395"
open Function Set Submodule
namespace LinearMap
variable (R : Type*) {ΞΉ : Type*} [Semiring R] (Ο : ΞΉ β Type*) [β i, AddCommMonoid (Ο i)]
[β i, Module R (Ο i)] [DecidableEq ΞΉ]
def stdBasis : β i : ΞΉ, Ο i ββ[R] β i, Ο i :=
single
#align linear_map.std_basis LinearMap.stdBasis
theorem stdBasis_apply (i : ΞΉ) (b : Ο i) : stdBasis R Ο i b = update (0 : (a : ΞΉ) β Ο a) i b :=
rfl
#align linear_map.std_basis_apply LinearMap.stdBasis_apply
@[simp]
theorem stdBasis_apply' (i i' : ΞΉ) : (stdBasis R (fun _x : ΞΉ => R) i) 1 i' = ite (i = i') 1 0 := by
rw [LinearMap.stdBasis_apply, Function.update_apply, Pi.zero_apply]
congr 1; rw [eq_iff_iff, eq_comm]
#align linear_map.std_basis_apply' LinearMap.stdBasis_apply'
theorem coe_stdBasis (i : ΞΉ) : β(stdBasis R Ο i) = Pi.single i :=
rfl
#align linear_map.coe_std_basis LinearMap.coe_stdBasis
@[simp]
theorem stdBasis_same (i : ΞΉ) (b : Ο i) : stdBasis R Ο i b i = b :=
Pi.single_eq_same i b
#align linear_map.std_basis_same LinearMap.stdBasis_same
theorem stdBasis_ne (i j : ΞΉ) (h : j β i) (b : Ο i) : stdBasis R Ο i b j = 0 :=
Pi.single_eq_of_ne h b
#align linear_map.std_basis_ne LinearMap.stdBasis_ne
theorem stdBasis_eq_pi_diag (i : ΞΉ) : stdBasis R Ο i = pi (diag i) := by
ext x j
-- Porting note: made types explicit
convert (update_apply (R := R) (Ο := Ο) (ΞΉ := ΞΉ) 0 x i j _).symm
rfl
#align linear_map.std_basis_eq_pi_diag LinearMap.stdBasis_eq_pi_diag
theorem ker_stdBasis (i : ΞΉ) : ker (stdBasis R Ο i) = β₯ :=
ker_eq_bot_of_injective <| Pi.single_injective _ _
#align linear_map.ker_std_basis LinearMap.ker_stdBasis
theorem proj_comp_stdBasis (i j : ΞΉ) : (proj i).comp (stdBasis R Ο j) = diag j i := by
rw [stdBasis_eq_pi_diag, proj_pi]
#align linear_map.proj_comp_std_basis LinearMap.proj_comp_stdBasis
theorem proj_stdBasis_same (i : ΞΉ) : (proj i).comp (stdBasis R Ο i) = id :=
LinearMap.ext <| stdBasis_same R Ο i
#align linear_map.proj_std_basis_same LinearMap.proj_stdBasis_same
theorem proj_stdBasis_ne (i j : ΞΉ) (h : i β j) : (proj i).comp (stdBasis R Ο j) = 0 :=
LinearMap.ext <| stdBasis_ne R Ο _ _ h
#align linear_map.proj_std_basis_ne LinearMap.proj_stdBasis_ne
| Mathlib/LinearAlgebra/StdBasis.lean | 96 | 103 | theorem iSup_range_stdBasis_le_iInf_ker_proj (I J : Set ΞΉ) (h : Disjoint I J) :
β¨ i β I, range (stdBasis R Ο i) β€ β¨
i β J, ker (proj i : (β i, Ο i) ββ[R] Ο i) := by |
refine iSup_le fun i => iSup_le fun hi => range_le_iff_comap.2 ?_
simp only [β ker_comp, eq_top_iff, SetLike.le_def, mem_ker, comap_iInf, mem_iInf]
rintro b - j hj
rw [proj_stdBasis_ne R Ο j i, zero_apply]
rintro rfl
exact h.le_bot β¨hi, hjβ©
| 1,661 |
import Mathlib.Data.Matrix.Basis
import Mathlib.LinearAlgebra.Basis
import Mathlib.LinearAlgebra.Pi
#align_import linear_algebra.std_basis from "leanprover-community/mathlib"@"13bce9a6b6c44f6b4c91ac1c1d2a816e2533d395"
open Function Set Submodule
namespace LinearMap
variable (R : Type*) {ΞΉ : Type*} [Semiring R] (Ο : ΞΉ β Type*) [β i, AddCommMonoid (Ο i)]
[β i, Module R (Ο i)] [DecidableEq ΞΉ]
def stdBasis : β i : ΞΉ, Ο i ββ[R] β i, Ο i :=
single
#align linear_map.std_basis LinearMap.stdBasis
theorem stdBasis_apply (i : ΞΉ) (b : Ο i) : stdBasis R Ο i b = update (0 : (a : ΞΉ) β Ο a) i b :=
rfl
#align linear_map.std_basis_apply LinearMap.stdBasis_apply
@[simp]
theorem stdBasis_apply' (i i' : ΞΉ) : (stdBasis R (fun _x : ΞΉ => R) i) 1 i' = ite (i = i') 1 0 := by
rw [LinearMap.stdBasis_apply, Function.update_apply, Pi.zero_apply]
congr 1; rw [eq_iff_iff, eq_comm]
#align linear_map.std_basis_apply' LinearMap.stdBasis_apply'
theorem coe_stdBasis (i : ΞΉ) : β(stdBasis R Ο i) = Pi.single i :=
rfl
#align linear_map.coe_std_basis LinearMap.coe_stdBasis
@[simp]
theorem stdBasis_same (i : ΞΉ) (b : Ο i) : stdBasis R Ο i b i = b :=
Pi.single_eq_same i b
#align linear_map.std_basis_same LinearMap.stdBasis_same
theorem stdBasis_ne (i j : ΞΉ) (h : j β i) (b : Ο i) : stdBasis R Ο i b j = 0 :=
Pi.single_eq_of_ne h b
#align linear_map.std_basis_ne LinearMap.stdBasis_ne
theorem stdBasis_eq_pi_diag (i : ΞΉ) : stdBasis R Ο i = pi (diag i) := by
ext x j
-- Porting note: made types explicit
convert (update_apply (R := R) (Ο := Ο) (ΞΉ := ΞΉ) 0 x i j _).symm
rfl
#align linear_map.std_basis_eq_pi_diag LinearMap.stdBasis_eq_pi_diag
theorem ker_stdBasis (i : ΞΉ) : ker (stdBasis R Ο i) = β₯ :=
ker_eq_bot_of_injective <| Pi.single_injective _ _
#align linear_map.ker_std_basis LinearMap.ker_stdBasis
theorem proj_comp_stdBasis (i j : ΞΉ) : (proj i).comp (stdBasis R Ο j) = diag j i := by
rw [stdBasis_eq_pi_diag, proj_pi]
#align linear_map.proj_comp_std_basis LinearMap.proj_comp_stdBasis
theorem proj_stdBasis_same (i : ΞΉ) : (proj i).comp (stdBasis R Ο i) = id :=
LinearMap.ext <| stdBasis_same R Ο i
#align linear_map.proj_std_basis_same LinearMap.proj_stdBasis_same
theorem proj_stdBasis_ne (i j : ΞΉ) (h : i β j) : (proj i).comp (stdBasis R Ο j) = 0 :=
LinearMap.ext <| stdBasis_ne R Ο _ _ h
#align linear_map.proj_std_basis_ne LinearMap.proj_stdBasis_ne
theorem iSup_range_stdBasis_le_iInf_ker_proj (I J : Set ΞΉ) (h : Disjoint I J) :
β¨ i β I, range (stdBasis R Ο i) β€ β¨
i β J, ker (proj i : (β i, Ο i) ββ[R] Ο i) := by
refine iSup_le fun i => iSup_le fun hi => range_le_iff_comap.2 ?_
simp only [β ker_comp, eq_top_iff, SetLike.le_def, mem_ker, comap_iInf, mem_iInf]
rintro b - j hj
rw [proj_stdBasis_ne R Ο j i, zero_apply]
rintro rfl
exact h.le_bot β¨hi, hjβ©
#align linear_map.supr_range_std_basis_le_infi_ker_proj LinearMap.iSup_range_stdBasis_le_iInf_ker_proj
theorem iInf_ker_proj_le_iSup_range_stdBasis {I : Finset ΞΉ} {J : Set ΞΉ} (hu : Set.univ β βI βͺ J) :
β¨
i β J, ker (proj i : (β i, Ο i) ββ[R] Ο i) β€ β¨ i β I, range (stdBasis R Ο i) :=
SetLike.le_def.2
(by
intro b hb
simp only [mem_iInf, mem_ker, proj_apply] at hb
rw [β
show (β i β I, stdBasis R Ο i (b i)) = b by
ext i
rw [Finset.sum_apply, β stdBasis_same R Ο i (b i)]
refine Finset.sum_eq_single i (fun j _ ne => stdBasis_ne _ _ _ _ ne.symm _) ?_
intro hiI
rw [stdBasis_same]
exact hb _ ((hu trivial).resolve_left hiI)]
exact sum_mem_biSup fun i _ => mem_range_self (stdBasis R Ο i) (b i))
#align linear_map.infi_ker_proj_le_supr_range_std_basis LinearMap.iInf_ker_proj_le_iSup_range_stdBasis
| Mathlib/LinearAlgebra/StdBasis.lean | 123 | 129 | theorem iSup_range_stdBasis_eq_iInf_ker_proj {I J : Set ΞΉ} (hd : Disjoint I J)
(hu : Set.univ β I βͺ J) (hI : Set.Finite I) :
β¨ i β I, range (stdBasis R Ο i) = β¨
i β J, ker (proj i : (β i, Ο i) ββ[R] Ο i) := by |
refine le_antisymm (iSup_range_stdBasis_le_iInf_ker_proj _ _ _ _ hd) ?_
have : Set.univ β βhI.toFinset βͺ J := by rwa [hI.coe_toFinset]
refine le_trans (iInf_ker_proj_le_iSup_range_stdBasis R Ο this) (iSup_mono fun i => ?_)
rw [Set.Finite.mem_toFinset]
| 1,661 |
import Mathlib.Data.Matrix.Basis
import Mathlib.LinearAlgebra.Basis
import Mathlib.LinearAlgebra.Pi
#align_import linear_algebra.std_basis from "leanprover-community/mathlib"@"13bce9a6b6c44f6b4c91ac1c1d2a816e2533d395"
open Function Set Submodule
namespace LinearMap
variable (R : Type*) {ΞΉ : Type*} [Semiring R] (Ο : ΞΉ β Type*) [β i, AddCommMonoid (Ο i)]
[β i, Module R (Ο i)] [DecidableEq ΞΉ]
def stdBasis : β i : ΞΉ, Ο i ββ[R] β i, Ο i :=
single
#align linear_map.std_basis LinearMap.stdBasis
theorem stdBasis_apply (i : ΞΉ) (b : Ο i) : stdBasis R Ο i b = update (0 : (a : ΞΉ) β Ο a) i b :=
rfl
#align linear_map.std_basis_apply LinearMap.stdBasis_apply
@[simp]
theorem stdBasis_apply' (i i' : ΞΉ) : (stdBasis R (fun _x : ΞΉ => R) i) 1 i' = ite (i = i') 1 0 := by
rw [LinearMap.stdBasis_apply, Function.update_apply, Pi.zero_apply]
congr 1; rw [eq_iff_iff, eq_comm]
#align linear_map.std_basis_apply' LinearMap.stdBasis_apply'
theorem coe_stdBasis (i : ΞΉ) : β(stdBasis R Ο i) = Pi.single i :=
rfl
#align linear_map.coe_std_basis LinearMap.coe_stdBasis
@[simp]
theorem stdBasis_same (i : ΞΉ) (b : Ο i) : stdBasis R Ο i b i = b :=
Pi.single_eq_same i b
#align linear_map.std_basis_same LinearMap.stdBasis_same
theorem stdBasis_ne (i j : ΞΉ) (h : j β i) (b : Ο i) : stdBasis R Ο i b j = 0 :=
Pi.single_eq_of_ne h b
#align linear_map.std_basis_ne LinearMap.stdBasis_ne
theorem stdBasis_eq_pi_diag (i : ΞΉ) : stdBasis R Ο i = pi (diag i) := by
ext x j
-- Porting note: made types explicit
convert (update_apply (R := R) (Ο := Ο) (ΞΉ := ΞΉ) 0 x i j _).symm
rfl
#align linear_map.std_basis_eq_pi_diag LinearMap.stdBasis_eq_pi_diag
theorem ker_stdBasis (i : ΞΉ) : ker (stdBasis R Ο i) = β₯ :=
ker_eq_bot_of_injective <| Pi.single_injective _ _
#align linear_map.ker_std_basis LinearMap.ker_stdBasis
theorem proj_comp_stdBasis (i j : ΞΉ) : (proj i).comp (stdBasis R Ο j) = diag j i := by
rw [stdBasis_eq_pi_diag, proj_pi]
#align linear_map.proj_comp_std_basis LinearMap.proj_comp_stdBasis
theorem proj_stdBasis_same (i : ΞΉ) : (proj i).comp (stdBasis R Ο i) = id :=
LinearMap.ext <| stdBasis_same R Ο i
#align linear_map.proj_std_basis_same LinearMap.proj_stdBasis_same
theorem proj_stdBasis_ne (i j : ΞΉ) (h : i β j) : (proj i).comp (stdBasis R Ο j) = 0 :=
LinearMap.ext <| stdBasis_ne R Ο _ _ h
#align linear_map.proj_std_basis_ne LinearMap.proj_stdBasis_ne
theorem iSup_range_stdBasis_le_iInf_ker_proj (I J : Set ΞΉ) (h : Disjoint I J) :
β¨ i β I, range (stdBasis R Ο i) β€ β¨
i β J, ker (proj i : (β i, Ο i) ββ[R] Ο i) := by
refine iSup_le fun i => iSup_le fun hi => range_le_iff_comap.2 ?_
simp only [β ker_comp, eq_top_iff, SetLike.le_def, mem_ker, comap_iInf, mem_iInf]
rintro b - j hj
rw [proj_stdBasis_ne R Ο j i, zero_apply]
rintro rfl
exact h.le_bot β¨hi, hjβ©
#align linear_map.supr_range_std_basis_le_infi_ker_proj LinearMap.iSup_range_stdBasis_le_iInf_ker_proj
theorem iInf_ker_proj_le_iSup_range_stdBasis {I : Finset ΞΉ} {J : Set ΞΉ} (hu : Set.univ β βI βͺ J) :
β¨
i β J, ker (proj i : (β i, Ο i) ββ[R] Ο i) β€ β¨ i β I, range (stdBasis R Ο i) :=
SetLike.le_def.2
(by
intro b hb
simp only [mem_iInf, mem_ker, proj_apply] at hb
rw [β
show (β i β I, stdBasis R Ο i (b i)) = b by
ext i
rw [Finset.sum_apply, β stdBasis_same R Ο i (b i)]
refine Finset.sum_eq_single i (fun j _ ne => stdBasis_ne _ _ _ _ ne.symm _) ?_
intro hiI
rw [stdBasis_same]
exact hb _ ((hu trivial).resolve_left hiI)]
exact sum_mem_biSup fun i _ => mem_range_self (stdBasis R Ο i) (b i))
#align linear_map.infi_ker_proj_le_supr_range_std_basis LinearMap.iInf_ker_proj_le_iSup_range_stdBasis
theorem iSup_range_stdBasis_eq_iInf_ker_proj {I J : Set ΞΉ} (hd : Disjoint I J)
(hu : Set.univ β I βͺ J) (hI : Set.Finite I) :
β¨ i β I, range (stdBasis R Ο i) = β¨
i β J, ker (proj i : (β i, Ο i) ββ[R] Ο i) := by
refine le_antisymm (iSup_range_stdBasis_le_iInf_ker_proj _ _ _ _ hd) ?_
have : Set.univ β βhI.toFinset βͺ J := by rwa [hI.coe_toFinset]
refine le_trans (iInf_ker_proj_le_iSup_range_stdBasis R Ο this) (iSup_mono fun i => ?_)
rw [Set.Finite.mem_toFinset]
#align linear_map.supr_range_std_basis_eq_infi_ker_proj LinearMap.iSup_range_stdBasis_eq_iInf_ker_proj
| Mathlib/LinearAlgebra/StdBasis.lean | 132 | 137 | theorem iSup_range_stdBasis [Finite ΞΉ] : β¨ i, range (stdBasis R Ο i) = β€ := by |
cases nonempty_fintype ΞΉ
convert top_unique (iInf_emptyset.ge.trans <| iInf_ker_proj_le_iSup_range_stdBasis R Ο _)
Β· rename_i i
exact ((@iSup_pos _ _ _ fun _ => range <| stdBasis R Ο i) <| Finset.mem_univ i).symm
Β· rw [Finset.coe_univ, Set.union_empty]
| 1,661 |
import Mathlib.Algebra.MvPolynomial.Basic
import Mathlib.Data.Finset.PiAntidiagonal
import Mathlib.LinearAlgebra.StdBasis
import Mathlib.Tactic.Linarith
#align_import ring_theory.power_series.basic from "leanprover-community/mathlib"@"2d5739b61641ee4e7e53eca5688a08f66f2e6a60"
noncomputable section
open Finset (antidiagonal mem_antidiagonal)
def MvPowerSeries (Ο : Type*) (R : Type*) :=
(Ο ββ β) β R
#align mv_power_series MvPowerSeries
namespace MvPowerSeries
open Finsupp
variable {Ο R : Type*}
instance [Inhabited R] : Inhabited (MvPowerSeries Ο R) :=
β¨fun _ => defaultβ©
instance [Zero R] : Zero (MvPowerSeries Ο R) :=
Pi.instZero
instance [AddMonoid R] : AddMonoid (MvPowerSeries Ο R) :=
Pi.addMonoid
instance [AddGroup R] : AddGroup (MvPowerSeries Ο R) :=
Pi.addGroup
instance [AddCommMonoid R] : AddCommMonoid (MvPowerSeries Ο R) :=
Pi.addCommMonoid
instance [AddCommGroup R] : AddCommGroup (MvPowerSeries Ο R) :=
Pi.addCommGroup
instance [Nontrivial R] : Nontrivial (MvPowerSeries Ο R) :=
Function.nontrivial
instance {A} [Semiring R] [AddCommMonoid A] [Module R A] : Module R (MvPowerSeries Ο A) :=
Pi.module _ _ _
instance {A S} [Semiring R] [Semiring S] [AddCommMonoid A] [Module R A] [Module S A] [SMul R S]
[IsScalarTower R S A] : IsScalarTower R S (MvPowerSeries Ο A) :=
Pi.isScalarTower
section Semiring
variable (R) [Semiring R]
def monomial (n : Ο ββ β) : R ββ[R] MvPowerSeries Ο R :=
letI := Classical.decEq Ο
LinearMap.stdBasis R (fun _ β¦ R) n
#align mv_power_series.monomial MvPowerSeries.monomial
def coeff (n : Ο ββ β) : MvPowerSeries Ο R ββ[R] R :=
LinearMap.proj n
#align mv_power_series.coeff MvPowerSeries.coeff
variable {R}
@[ext]
theorem ext {Ο Ο} (h : β n : Ο ββ β, coeff R n Ο = coeff R n Ο) : Ο = Ο :=
funext h
#align mv_power_series.ext MvPowerSeries.ext
theorem ext_iff {Ο Ο : MvPowerSeries Ο R} : Ο = Ο β β n : Ο ββ β, coeff R n Ο = coeff R n Ο :=
Function.funext_iff
#align mv_power_series.ext_iff MvPowerSeries.ext_iff
| Mathlib/RingTheory/MvPowerSeries/Basic.lean | 127 | 131 | theorem monomial_def [DecidableEq Ο] (n : Ο ββ β) :
(monomial R n) = LinearMap.stdBasis R (fun _ β¦ R) n := by |
rw [monomial]
-- unify the `Decidable` arguments
convert rfl
| 1,662 |
import Mathlib.Algebra.MvPolynomial.Basic
import Mathlib.Data.Finset.PiAntidiagonal
import Mathlib.LinearAlgebra.StdBasis
import Mathlib.Tactic.Linarith
#align_import ring_theory.power_series.basic from "leanprover-community/mathlib"@"2d5739b61641ee4e7e53eca5688a08f66f2e6a60"
noncomputable section
open Finset (antidiagonal mem_antidiagonal)
def MvPowerSeries (Ο : Type*) (R : Type*) :=
(Ο ββ β) β R
#align mv_power_series MvPowerSeries
namespace MvPowerSeries
open Finsupp
variable {Ο R : Type*}
instance [Inhabited R] : Inhabited (MvPowerSeries Ο R) :=
β¨fun _ => defaultβ©
instance [Zero R] : Zero (MvPowerSeries Ο R) :=
Pi.instZero
instance [AddMonoid R] : AddMonoid (MvPowerSeries Ο R) :=
Pi.addMonoid
instance [AddGroup R] : AddGroup (MvPowerSeries Ο R) :=
Pi.addGroup
instance [AddCommMonoid R] : AddCommMonoid (MvPowerSeries Ο R) :=
Pi.addCommMonoid
instance [AddCommGroup R] : AddCommGroup (MvPowerSeries Ο R) :=
Pi.addCommGroup
instance [Nontrivial R] : Nontrivial (MvPowerSeries Ο R) :=
Function.nontrivial
instance {A} [Semiring R] [AddCommMonoid A] [Module R A] : Module R (MvPowerSeries Ο A) :=
Pi.module _ _ _
instance {A S} [Semiring R] [Semiring S] [AddCommMonoid A] [Module R A] [Module S A] [SMul R S]
[IsScalarTower R S A] : IsScalarTower R S (MvPowerSeries Ο A) :=
Pi.isScalarTower
section Semiring
variable (R) [Semiring R]
def monomial (n : Ο ββ β) : R ββ[R] MvPowerSeries Ο R :=
letI := Classical.decEq Ο
LinearMap.stdBasis R (fun _ β¦ R) n
#align mv_power_series.monomial MvPowerSeries.monomial
def coeff (n : Ο ββ β) : MvPowerSeries Ο R ββ[R] R :=
LinearMap.proj n
#align mv_power_series.coeff MvPowerSeries.coeff
variable {R}
@[ext]
theorem ext {Ο Ο} (h : β n : Ο ββ β, coeff R n Ο = coeff R n Ο) : Ο = Ο :=
funext h
#align mv_power_series.ext MvPowerSeries.ext
theorem ext_iff {Ο Ο : MvPowerSeries Ο R} : Ο = Ο β β n : Ο ββ β, coeff R n Ο = coeff R n Ο :=
Function.funext_iff
#align mv_power_series.ext_iff MvPowerSeries.ext_iff
theorem monomial_def [DecidableEq Ο] (n : Ο ββ β) :
(monomial R n) = LinearMap.stdBasis R (fun _ β¦ R) n := by
rw [monomial]
-- unify the `Decidable` arguments
convert rfl
#align mv_power_series.monomial_def MvPowerSeries.monomial_def
| Mathlib/RingTheory/MvPowerSeries/Basic.lean | 134 | 140 | theorem coeff_monomial [DecidableEq Ο] (m n : Ο ββ β) (a : R) :
coeff R m (monomial R n a) = if m = n then a else 0 := by |
-- This used to be `rw`, but we need `erw` after leanprover/lean4#2644
erw [coeff, monomial_def, LinearMap.proj_apply (i := m)]
dsimp only
-- This used to be `rw`, but we need `erw` after leanprover/lean4#2644
erw [LinearMap.stdBasis_apply, Function.update_apply, Pi.zero_apply]
| 1,662 |
import Mathlib.Algebra.MvPolynomial.Basic
import Mathlib.Data.Finset.PiAntidiagonal
import Mathlib.LinearAlgebra.StdBasis
import Mathlib.Tactic.Linarith
#align_import ring_theory.power_series.basic from "leanprover-community/mathlib"@"2d5739b61641ee4e7e53eca5688a08f66f2e6a60"
noncomputable section
open Finset (antidiagonal mem_antidiagonal)
def MvPowerSeries (Ο : Type*) (R : Type*) :=
(Ο ββ β) β R
#align mv_power_series MvPowerSeries
namespace MvPowerSeries
open Finsupp
variable {Ο R : Type*}
instance [Inhabited R] : Inhabited (MvPowerSeries Ο R) :=
β¨fun _ => defaultβ©
instance [Zero R] : Zero (MvPowerSeries Ο R) :=
Pi.instZero
instance [AddMonoid R] : AddMonoid (MvPowerSeries Ο R) :=
Pi.addMonoid
instance [AddGroup R] : AddGroup (MvPowerSeries Ο R) :=
Pi.addGroup
instance [AddCommMonoid R] : AddCommMonoid (MvPowerSeries Ο R) :=
Pi.addCommMonoid
instance [AddCommGroup R] : AddCommGroup (MvPowerSeries Ο R) :=
Pi.addCommGroup
instance [Nontrivial R] : Nontrivial (MvPowerSeries Ο R) :=
Function.nontrivial
instance {A} [Semiring R] [AddCommMonoid A] [Module R A] : Module R (MvPowerSeries Ο A) :=
Pi.module _ _ _
instance {A S} [Semiring R] [Semiring S] [AddCommMonoid A] [Module R A] [Module S A] [SMul R S]
[IsScalarTower R S A] : IsScalarTower R S (MvPowerSeries Ο A) :=
Pi.isScalarTower
section Semiring
variable (R) [Semiring R]
def monomial (n : Ο ββ β) : R ββ[R] MvPowerSeries Ο R :=
letI := Classical.decEq Ο
LinearMap.stdBasis R (fun _ β¦ R) n
#align mv_power_series.monomial MvPowerSeries.monomial
def coeff (n : Ο ββ β) : MvPowerSeries Ο R ββ[R] R :=
LinearMap.proj n
#align mv_power_series.coeff MvPowerSeries.coeff
variable {R}
@[ext]
theorem ext {Ο Ο} (h : β n : Ο ββ β, coeff R n Ο = coeff R n Ο) : Ο = Ο :=
funext h
#align mv_power_series.ext MvPowerSeries.ext
theorem ext_iff {Ο Ο : MvPowerSeries Ο R} : Ο = Ο β β n : Ο ββ β, coeff R n Ο = coeff R n Ο :=
Function.funext_iff
#align mv_power_series.ext_iff MvPowerSeries.ext_iff
theorem monomial_def [DecidableEq Ο] (n : Ο ββ β) :
(monomial R n) = LinearMap.stdBasis R (fun _ β¦ R) n := by
rw [monomial]
-- unify the `Decidable` arguments
convert rfl
#align mv_power_series.monomial_def MvPowerSeries.monomial_def
theorem coeff_monomial [DecidableEq Ο] (m n : Ο ββ β) (a : R) :
coeff R m (monomial R n a) = if m = n then a else 0 := by
-- This used to be `rw`, but we need `erw` after leanprover/lean4#2644
erw [coeff, monomial_def, LinearMap.proj_apply (i := m)]
dsimp only
-- This used to be `rw`, but we need `erw` after leanprover/lean4#2644
erw [LinearMap.stdBasis_apply, Function.update_apply, Pi.zero_apply]
#align mv_power_series.coeff_monomial MvPowerSeries.coeff_monomial
@[simp]
| Mathlib/RingTheory/MvPowerSeries/Basic.lean | 144 | 147 | theorem coeff_monomial_same (n : Ο ββ β) (a : R) : coeff R n (monomial R n a) = a := by |
classical
rw [monomial_def]
exact LinearMap.stdBasis_same R (fun _ β¦ R) n a
| 1,662 |
import Mathlib.Algebra.MvPolynomial.Basic
import Mathlib.Data.Finset.PiAntidiagonal
import Mathlib.LinearAlgebra.StdBasis
import Mathlib.Tactic.Linarith
#align_import ring_theory.power_series.basic from "leanprover-community/mathlib"@"2d5739b61641ee4e7e53eca5688a08f66f2e6a60"
noncomputable section
open Finset (antidiagonal mem_antidiagonal)
def MvPowerSeries (Ο : Type*) (R : Type*) :=
(Ο ββ β) β R
#align mv_power_series MvPowerSeries
namespace MvPowerSeries
open Finsupp
variable {Ο R : Type*}
instance [Inhabited R] : Inhabited (MvPowerSeries Ο R) :=
β¨fun _ => defaultβ©
instance [Zero R] : Zero (MvPowerSeries Ο R) :=
Pi.instZero
instance [AddMonoid R] : AddMonoid (MvPowerSeries Ο R) :=
Pi.addMonoid
instance [AddGroup R] : AddGroup (MvPowerSeries Ο R) :=
Pi.addGroup
instance [AddCommMonoid R] : AddCommMonoid (MvPowerSeries Ο R) :=
Pi.addCommMonoid
instance [AddCommGroup R] : AddCommGroup (MvPowerSeries Ο R) :=
Pi.addCommGroup
instance [Nontrivial R] : Nontrivial (MvPowerSeries Ο R) :=
Function.nontrivial
instance {A} [Semiring R] [AddCommMonoid A] [Module R A] : Module R (MvPowerSeries Ο A) :=
Pi.module _ _ _
instance {A S} [Semiring R] [Semiring S] [AddCommMonoid A] [Module R A] [Module S A] [SMul R S]
[IsScalarTower R S A] : IsScalarTower R S (MvPowerSeries Ο A) :=
Pi.isScalarTower
section Semiring
variable (R) [Semiring R]
def monomial (n : Ο ββ β) : R ββ[R] MvPowerSeries Ο R :=
letI := Classical.decEq Ο
LinearMap.stdBasis R (fun _ β¦ R) n
#align mv_power_series.monomial MvPowerSeries.monomial
def coeff (n : Ο ββ β) : MvPowerSeries Ο R ββ[R] R :=
LinearMap.proj n
#align mv_power_series.coeff MvPowerSeries.coeff
variable {R}
@[ext]
theorem ext {Ο Ο} (h : β n : Ο ββ β, coeff R n Ο = coeff R n Ο) : Ο = Ο :=
funext h
#align mv_power_series.ext MvPowerSeries.ext
theorem ext_iff {Ο Ο : MvPowerSeries Ο R} : Ο = Ο β β n : Ο ββ β, coeff R n Ο = coeff R n Ο :=
Function.funext_iff
#align mv_power_series.ext_iff MvPowerSeries.ext_iff
theorem monomial_def [DecidableEq Ο] (n : Ο ββ β) :
(monomial R n) = LinearMap.stdBasis R (fun _ β¦ R) n := by
rw [monomial]
-- unify the `Decidable` arguments
convert rfl
#align mv_power_series.monomial_def MvPowerSeries.monomial_def
theorem coeff_monomial [DecidableEq Ο] (m n : Ο ββ β) (a : R) :
coeff R m (monomial R n a) = if m = n then a else 0 := by
-- This used to be `rw`, but we need `erw` after leanprover/lean4#2644
erw [coeff, monomial_def, LinearMap.proj_apply (i := m)]
dsimp only
-- This used to be `rw`, but we need `erw` after leanprover/lean4#2644
erw [LinearMap.stdBasis_apply, Function.update_apply, Pi.zero_apply]
#align mv_power_series.coeff_monomial MvPowerSeries.coeff_monomial
@[simp]
theorem coeff_monomial_same (n : Ο ββ β) (a : R) : coeff R n (monomial R n a) = a := by
classical
rw [monomial_def]
exact LinearMap.stdBasis_same R (fun _ β¦ R) n a
#align mv_power_series.coeff_monomial_same MvPowerSeries.coeff_monomial_same
| Mathlib/RingTheory/MvPowerSeries/Basic.lean | 150 | 153 | theorem coeff_monomial_ne {m n : Ο ββ β} (h : m β n) (a : R) : coeff R m (monomial R n a) = 0 := by |
classical
rw [monomial_def]
exact LinearMap.stdBasis_ne R (fun _ β¦ R) _ _ h a
| 1,662 |
import Mathlib.RingTheory.MvPowerSeries.Basic
import Mathlib.Data.Finsupp.Interval
noncomputable section
open Finset (antidiagonal mem_antidiagonal)
namespace MvPowerSeries
open Finsupp
variable {Ο R : Type*}
section Trunc
variable [CommSemiring R] (n : Ο ββ β)
def truncFun (Ο : MvPowerSeries Ο R) : MvPolynomial Ο R :=
β m β Finset.Iio n, MvPolynomial.monomial m (coeff R m Ο)
#align mv_power_series.trunc_fun MvPowerSeries.truncFun
| Mathlib/RingTheory/MvPowerSeries/Trunc.lean | 43 | 46 | theorem coeff_truncFun (m : Ο ββ β) (Ο : MvPowerSeries Ο R) :
(truncFun n Ο).coeff m = if m < n then coeff R m Ο else 0 := by |
classical
simp [truncFun, MvPolynomial.coeff_sum]
| 1,663 |
import Mathlib.RingTheory.MvPowerSeries.Basic
import Mathlib.Data.Finsupp.Interval
noncomputable section
open Finset (antidiagonal mem_antidiagonal)
namespace MvPowerSeries
open Finsupp
variable {Ο R : Type*}
section Trunc
variable [CommSemiring R] (n : Ο ββ β)
def truncFun (Ο : MvPowerSeries Ο R) : MvPolynomial Ο R :=
β m β Finset.Iio n, MvPolynomial.monomial m (coeff R m Ο)
#align mv_power_series.trunc_fun MvPowerSeries.truncFun
theorem coeff_truncFun (m : Ο ββ β) (Ο : MvPowerSeries Ο R) :
(truncFun n Ο).coeff m = if m < n then coeff R m Ο else 0 := by
classical
simp [truncFun, MvPolynomial.coeff_sum]
#align mv_power_series.coeff_trunc_fun MvPowerSeries.coeff_truncFun
variable (R)
def trunc : MvPowerSeries Ο R β+ MvPolynomial Ο R where
toFun := truncFun n
map_zero' := by
classical
ext
simp [coeff_truncFun]
map_add' := by
classical
intros x y
ext m
simp only [coeff_truncFun, MvPolynomial.coeff_add]
split_ifs
Β· rw [map_add]
Β· rw [zero_add]
#align mv_power_series.trunc MvPowerSeries.trunc
variable {R}
| Mathlib/RingTheory/MvPowerSeries/Trunc.lean | 71 | 73 | theorem coeff_trunc (m : Ο ββ β) (Ο : MvPowerSeries Ο R) :
(trunc R n Ο).coeff m = if m < n then coeff R m Ο else 0 := by |
classical simp [trunc, coeff_truncFun]
| 1,663 |
import Mathlib.LinearAlgebra.DFinsupp
import Mathlib.LinearAlgebra.StdBasis
#align_import linear_algebra.finsupp_vector_space from "leanprover-community/mathlib"@"59628387770d82eb6f6dd7b7107308aa2509ec95"
noncomputable section
open Set LinearMap Submodule
open scoped Cardinal
universe u v w
namespace Finsupp
section Ring
variable {R : Type*} {M : Type*} {ΞΉ : Type*}
variable [Ring R] [AddCommGroup M] [Module R M]
| Mathlib/LinearAlgebra/FinsuppVectorSpace.lean | 34 | 51 | theorem linearIndependent_single {Ο : ΞΉ β Type*} {f : β ΞΉ, Ο ΞΉ β M}
(hf : β i, LinearIndependent R (f i)) :
LinearIndependent R fun ix : Ξ£i, Ο i => single ix.1 (f ix.1 ix.2) := by |
apply @linearIndependent_iUnion_finite R _ _ _ _ ΞΉ Ο fun i x => single i (f i x)
Β· intro i
have h_disjoint : Disjoint (span R (range (f i))) (ker (lsingle i)) := by
rw [ker_lsingle]
exact disjoint_bot_right
apply (hf i).map h_disjoint
Β· intro i t _ hit
refine (disjoint_lsingle_lsingle {i} t (disjoint_singleton_left.2 hit)).mono ?_ ?_
Β· rw [span_le]
simp only [iSup_singleton]
rw [range_coe]
apply range_comp_subset_range _ (lsingle i)
Β· refine iSupβ_mono fun i hi => ?_
rw [span_le, range_coe]
apply range_comp_subset_range _ (lsingle i)
| 1,664 |
import Mathlib.LinearAlgebra.DFinsupp
import Mathlib.LinearAlgebra.StdBasis
#align_import linear_algebra.finsupp_vector_space from "leanprover-community/mathlib"@"59628387770d82eb6f6dd7b7107308aa2509ec95"
noncomputable section
open Set LinearMap Submodule
open scoped Cardinal
universe u v w
namespace Finsupp
namespace Basis
variable {R M n : Type*}
variable [DecidableEq n]
variable [Semiring R] [AddCommMonoid M] [Module R M]
| Mathlib/LinearAlgebra/FinsuppVectorSpace.lean | 161 | 164 | theorem _root_.Finset.sum_single_ite [Fintype n] (a : R) (i : n) :
(β x : n, Finsupp.single x (if i = x then a else 0)) = Finsupp.single i a := by |
simp only [apply_ite (Finsupp.single _), Finsupp.single_zero, Finset.sum_ite_eq,
if_pos (Finset.mem_univ _)]
| 1,664 |
import Mathlib.LinearAlgebra.DFinsupp
import Mathlib.LinearAlgebra.StdBasis
#align_import linear_algebra.finsupp_vector_space from "leanprover-community/mathlib"@"59628387770d82eb6f6dd7b7107308aa2509ec95"
noncomputable section
open Set LinearMap Submodule
open scoped Cardinal
universe u v w
namespace Finsupp
namespace Basis
variable {R M n : Type*}
variable [DecidableEq n]
variable [Semiring R] [AddCommMonoid M] [Module R M]
theorem _root_.Finset.sum_single_ite [Fintype n] (a : R) (i : n) :
(β x : n, Finsupp.single x (if i = x then a else 0)) = Finsupp.single i a := by
simp only [apply_ite (Finsupp.single _), Finsupp.single_zero, Finset.sum_ite_eq,
if_pos (Finset.mem_univ _)]
#align finset.sum_single_ite Finset.sum_single_ite
| Mathlib/LinearAlgebra/FinsuppVectorSpace.lean | 167 | 170 | theorem equivFun_symm_stdBasis [Finite n] (b : Basis n R M) (i : n) :
b.equivFun.symm (LinearMap.stdBasis R (fun _ => R) i 1) = b i := by |
cases nonempty_fintype n
simp
| 1,664 |
import Mathlib.Algebra.Category.ModuleCat.EpiMono
import Mathlib.Algebra.Module.Projective
import Mathlib.CategoryTheory.Preadditive.Projective
import Mathlib.LinearAlgebra.FinsuppVectorSpace
import Mathlib.Data.Finsupp.Basic
#align_import algebra.category.Module.projective from "leanprover-community/mathlib"@"201a3f4a0e59b5f836fe8a6c1a462ee674327211"
universe v u u'
open CategoryTheory
open CategoryTheory.Limits
open LinearMap
open ModuleCat
open scoped Module
| Mathlib/Algebra/Category/ModuleCat/Projective.lean | 31 | 41 | theorem IsProjective.iff_projective {R : Type u} [Ring R] {P : Type max u v} [AddCommGroup P]
[Module R P] : Module.Projective R P β Projective (ModuleCat.of R P) := by |
refine β¨fun h => ?_, fun h => ?_β©
Β· letI : Module.Projective R (ModuleCat.of R P) := h
exact β¨fun E X epi => Module.projective_lifting_property _ _
((ModuleCat.epi_iff_surjective _).mp epi)β©
Β· refine Module.Projective.of_lifting_property.{u,v} ?_
intro E X mE mX sE sX f g s
haveI : Epi (βf) := (ModuleCat.epi_iff_surjective (βf)).mpr s
letI : Projective (ModuleCat.of R P) := h
exact β¨Projective.factorThru (βg) (βf), Projective.factorThru_comp (βg) (βf)β©
| 1,665 |
import Mathlib.Algebra.Category.ModuleCat.Projective
import Mathlib.AlgebraicTopology.ExtraDegeneracy
import Mathlib.CategoryTheory.Abelian.Ext
import Mathlib.RepresentationTheory.Rep
#align_import representation_theory.group_cohomology.resolution from "leanprover-community/mathlib"@"cec81510e48e579bde6acd8568c06a87af045b63"
noncomputable section
universe u v w
variable {k G : Type u} [CommRing k] {n : β}
open CategoryTheory
local notation "GβΏ" => Fin n β G
set_option quotPrecheck false
local notation "GβΏβΊΒΉ" => Fin (n + 1) β G
namespace groupCohomology.resolution
open Finsupp hiding lift
open MonoidalCategory
open Fin (partialProd)
section Basis
variable (k G n) [Group G]
section Action
open Action
def actionDiagonalSucc (G : Type u) [Group G] :
β n : β, diagonal G (n + 1) β
leftRegular G β Action.mk (Fin n β G) 1
| 0 =>
diagonalOneIsoLeftRegular G βͺβ«
(Ο_ _).symm βͺβ« tensorIso (Iso.refl _) (tensorUnitIso (Equiv.equivOfUnique PUnit _).toIso)
| n + 1 =>
diagonalSucc _ _ βͺβ«
tensorIso (Iso.refl _) (actionDiagonalSucc G n) βͺβ«
leftRegularTensorIso _ _ βͺβ«
tensorIso (Iso.refl _)
(mkIso (Equiv.piFinSuccAbove (fun _ => G) 0).symm.toIso fun _ => rfl)
set_option linter.uppercaseLean3 false in
#align group_cohomology.resolution.Action_diagonal_succ groupCohomology.resolution.actionDiagonalSucc
| Mathlib/RepresentationTheory/GroupCohomology/Resolution.lean | 108 | 124 | theorem actionDiagonalSucc_hom_apply {G : Type u} [Group G] {n : β} (f : Fin (n + 1) β G) :
(actionDiagonalSucc G n).hom.hom f = (f 0, fun i => (f (Fin.castSucc i))β»ΒΉ * f i.succ) := by |
induction' n with n hn
Β· exact Prod.ext rfl (funext fun x => Fin.elim0 x)
Β· refine Prod.ext rfl (funext fun x => ?_)
/- Porting note (#11039): broken proof was
Β· dsimp only [actionDiagonalSucc]
simp only [Iso.trans_hom, comp_hom, types_comp_apply, diagonalSucc_hom_hom,
leftRegularTensorIso_hom_hom, tensorIso_hom, mkIso_hom_hom, Equiv.toIso_hom,
Action.tensorHom, Equiv.piFinSuccAbove_symm_apply, tensor_apply, types_id_apply,
tensor_rho, MonoidHom.one_apply, End.one_def, hn fun j : Fin (n + 1) => f j.succ,
Fin.insertNth_zero']
refine' Fin.cases (Fin.cons_zero _ _) (fun i => _) x
Β· simp only [Fin.cons_succ, mul_left_inj, inv_inj, Fin.castSucc_fin_succ] -/
dsimp [actionDiagonalSucc]
erw [hn (fun (j : Fin (n + 1)) => f j.succ)]
exact Fin.cases rfl (fun i => rfl) x
| 1,666 |
import Mathlib.Algebra.Category.ModuleCat.Projective
import Mathlib.AlgebraicTopology.ExtraDegeneracy
import Mathlib.CategoryTheory.Abelian.Ext
import Mathlib.RepresentationTheory.Rep
#align_import representation_theory.group_cohomology.resolution from "leanprover-community/mathlib"@"cec81510e48e579bde6acd8568c06a87af045b63"
noncomputable section
universe u v w
variable {k G : Type u} [CommRing k] {n : β}
open CategoryTheory
local notation "GβΏ" => Fin n β G
set_option quotPrecheck false
local notation "GβΏβΊΒΉ" => Fin (n + 1) β G
namespace groupCohomology.resolution
open Finsupp hiding lift
open MonoidalCategory
open Fin (partialProd)
section Basis
variable (k G n) [Group G]
section Action
open Action
def actionDiagonalSucc (G : Type u) [Group G] :
β n : β, diagonal G (n + 1) β
leftRegular G β Action.mk (Fin n β G) 1
| 0 =>
diagonalOneIsoLeftRegular G βͺβ«
(Ο_ _).symm βͺβ« tensorIso (Iso.refl _) (tensorUnitIso (Equiv.equivOfUnique PUnit _).toIso)
| n + 1 =>
diagonalSucc _ _ βͺβ«
tensorIso (Iso.refl _) (actionDiagonalSucc G n) βͺβ«
leftRegularTensorIso _ _ βͺβ«
tensorIso (Iso.refl _)
(mkIso (Equiv.piFinSuccAbove (fun _ => G) 0).symm.toIso fun _ => rfl)
set_option linter.uppercaseLean3 false in
#align group_cohomology.resolution.Action_diagonal_succ groupCohomology.resolution.actionDiagonalSucc
theorem actionDiagonalSucc_hom_apply {G : Type u} [Group G] {n : β} (f : Fin (n + 1) β G) :
(actionDiagonalSucc G n).hom.hom f = (f 0, fun i => (f (Fin.castSucc i))β»ΒΉ * f i.succ) := by
induction' n with n hn
Β· exact Prod.ext rfl (funext fun x => Fin.elim0 x)
Β· refine Prod.ext rfl (funext fun x => ?_)
dsimp [actionDiagonalSucc]
erw [hn (fun (j : Fin (n + 1)) => f j.succ)]
exact Fin.cases rfl (fun i => rfl) x
set_option linter.uppercaseLean3 false in
#align group_cohomology.resolution.Action_diagonal_succ_hom_apply groupCohomology.resolution.actionDiagonalSucc_hom_apply
| Mathlib/RepresentationTheory/GroupCohomology/Resolution.lean | 128 | 153 | theorem actionDiagonalSucc_inv_apply {G : Type u} [Group G] {n : β} (g : G) (f : Fin n β G) :
(actionDiagonalSucc G n).inv.hom (g, f) = (g β’ Fin.partialProd f : Fin (n + 1) β G) := by |
revert g
induction' n with n hn
Β· intro g
funext (x : Fin 1)
simp only [Subsingleton.elim x 0, Pi.smul_apply, Fin.partialProd_zero, smul_eq_mul, mul_one]
rfl
Β· intro g
/- Porting note (#11039): broken proof was
ext
dsimp only [actionDiagonalSucc]
simp only [Iso.trans_inv, comp_hom, hn, diagonalSucc_inv_hom, types_comp_apply, tensorIso_inv,
Iso.refl_inv, Action.tensorHom, id_hom, tensor_apply, types_id_apply,
leftRegularTensorIso_inv_hom, tensor_rho, leftRegular_Ο_apply, Pi.smul_apply, smul_eq_mul]
refine' Fin.cases _ _ x
Β· simp only [Fin.cons_zero, Fin.partialProd_zero, mul_one]
Β· intro i
simpa only [Fin.cons_succ, Pi.smul_apply, smul_eq_mul, Fin.partialProd_succ', mul_assoc] -/
funext x
dsimp [actionDiagonalSucc]
erw [hn, Equiv.piFinSuccAbove_symm_apply]
refine Fin.cases ?_ (fun i => ?_) x
Β· simp only [Fin.insertNth_zero, Fin.cons_zero, Fin.partialProd_zero, mul_one]
Β· simp only [Fin.cons_succ, Pi.smul_apply, smul_eq_mul, Fin.partialProd_succ', β mul_assoc]
rfl
| 1,666 |
import Mathlib.LinearAlgebra.DirectSum.Finsupp
import Mathlib.LinearAlgebra.FinsuppVectorSpace
#align_import linear_algebra.tensor_product_basis from "leanprover-community/mathlib"@"f784cc6142443d9ee623a20788c282112c322081"
noncomputable section
open Set LinearMap Submodule
section CommSemiring
variable {R : Type*} {S : Type*} {M : Type*} {N : Type*} {ΞΉ : Type*} {ΞΊ : Type*}
[CommSemiring R] [Semiring S] [Algebra R S] [AddCommMonoid M] [Module R M] [Module S M]
[IsScalarTower R S M] [AddCommMonoid N] [Module R N]
def Basis.tensorProduct (b : Basis ΞΉ S M) (c : Basis ΞΊ R N) :
Basis (ΞΉ Γ ΞΊ) S (TensorProduct R M N) :=
Finsupp.basisSingleOne.map
((TensorProduct.AlgebraTensorModule.congr b.repr c.repr).trans <|
(finsuppTensorFinsupp R S _ _ _ _).trans <|
Finsupp.lcongr (Equiv.refl _) (TensorProduct.AlgebraTensorModule.rid R S S)).symm
#align basis.tensor_product Basis.tensorProduct
@[simp]
| Mathlib/LinearAlgebra/TensorProduct/Basis.lean | 39 | 41 | theorem Basis.tensorProduct_apply (b : Basis ΞΉ R M) (c : Basis ΞΊ R N) (i : ΞΉ) (j : ΞΊ) :
Basis.tensorProduct b c (i, j) = b i ββ c j := by |
simp [Basis.tensorProduct]
| 1,667 |
import Mathlib.LinearAlgebra.DirectSum.Finsupp
import Mathlib.LinearAlgebra.FinsuppVectorSpace
#align_import linear_algebra.tensor_product_basis from "leanprover-community/mathlib"@"f784cc6142443d9ee623a20788c282112c322081"
noncomputable section
open Set LinearMap Submodule
section CommSemiring
variable {R : Type*} {S : Type*} {M : Type*} {N : Type*} {ΞΉ : Type*} {ΞΊ : Type*}
[CommSemiring R] [Semiring S] [Algebra R S] [AddCommMonoid M] [Module R M] [Module S M]
[IsScalarTower R S M] [AddCommMonoid N] [Module R N]
def Basis.tensorProduct (b : Basis ΞΉ S M) (c : Basis ΞΊ R N) :
Basis (ΞΉ Γ ΞΊ) S (TensorProduct R M N) :=
Finsupp.basisSingleOne.map
((TensorProduct.AlgebraTensorModule.congr b.repr c.repr).trans <|
(finsuppTensorFinsupp R S _ _ _ _).trans <|
Finsupp.lcongr (Equiv.refl _) (TensorProduct.AlgebraTensorModule.rid R S S)).symm
#align basis.tensor_product Basis.tensorProduct
@[simp]
theorem Basis.tensorProduct_apply (b : Basis ΞΉ R M) (c : Basis ΞΊ R N) (i : ΞΉ) (j : ΞΊ) :
Basis.tensorProduct b c (i, j) = b i ββ c j := by
simp [Basis.tensorProduct]
#align basis.tensor_product_apply Basis.tensorProduct_apply
| Mathlib/LinearAlgebra/TensorProduct/Basis.lean | 44 | 46 | theorem Basis.tensorProduct_apply' (b : Basis ΞΉ R M) (c : Basis ΞΊ R N) (i : ΞΉ Γ ΞΊ) :
Basis.tensorProduct b c i = b i.1 ββ c i.2 := by |
simp [Basis.tensorProduct]
| 1,667 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.