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.Data.Int.Order.Units import Mathlib.Data.ZMod.IntUnitsPower import Mathlib.RingTheory.TensorProduct.Basic import Mathlib.LinearAlgebra.DirectSum.TensorProduct import Mathlib.Algebra.DirectSum.Algebra suppress_compilation open scoped TensorProduct DirectSum variable {R ΞΉ A B : Type*} namespace TensorProduct variable [CommSemiring ΞΉ] [Module ΞΉ (Additive β„€Λ£)] [DecidableEq ΞΉ] variable (π’œ : ΞΉ β†’ Type*) (ℬ : ΞΉ β†’ Type*) variable [CommRing R] variable [βˆ€ i, AddCommGroup (π’œ i)] [βˆ€ i, AddCommGroup (ℬ i)] variable [βˆ€ i, Module R (π’œ i)] [βˆ€ i, Module R (ℬ i)] variable [DirectSum.GRing π’œ] [DirectSum.GRing ℬ] variable [DirectSum.GAlgebra R π’œ] [DirectSum.GAlgebra R ℬ] -- this helps with performance instance (i : ΞΉ Γ— ΞΉ) : Module R (π’œ (Prod.fst i) βŠ—[R] ℬ (Prod.snd i)) := TensorProduct.leftModule open DirectSum (lof) variable (R) section gradedComm local notation "π’œβ„¬" => (fun i : ΞΉ Γ— ΞΉ => π’œ (Prod.fst i) βŠ—[R] ℬ (Prod.snd i)) local notation "β„¬π’œ" => (fun i : ΞΉ Γ— ΞΉ => ℬ (Prod.fst i) βŠ—[R] π’œ (Prod.snd i)) def gradedCommAux : DirectSum _ π’œβ„¬ β†’β‚—[R] DirectSum _ β„¬π’œ := by refine DirectSum.toModule R _ _ fun i => ?_ have o := DirectSum.lof R _ β„¬π’œ i.swap have s : β„€Λ£ := ((-1 : β„€Λ£)^(i.1* i.2 : ΞΉ) : β„€Λ£) exact (s β€’ o) βˆ˜β‚— (TensorProduct.comm R _ _).toLinearMap @[simp]
Mathlib/LinearAlgebra/TensorProduct/Graded/External.lean
85
90
theorem gradedCommAux_lof_tmul (i j : ΞΉ) (a : π’œ i) (b : ℬ j) : gradedCommAux R π’œ ℬ (lof R _ π’œβ„¬ (i, j) (a βŠ—β‚œ b)) = (-1 : β„€Λ£)^(j * i) β€’ lof R _ β„¬π’œ (j, i) (b βŠ—β‚œ a) := by
rw [gradedCommAux] dsimp simp [mul_comm i j]
1,742
import Mathlib.Data.Int.Order.Units import Mathlib.Data.ZMod.IntUnitsPower import Mathlib.RingTheory.TensorProduct.Basic import Mathlib.LinearAlgebra.DirectSum.TensorProduct import Mathlib.Algebra.DirectSum.Algebra suppress_compilation open scoped TensorProduct DirectSum variable {R ΞΉ A B : Type*} namespace TensorProduct variable [CommSemiring ΞΉ] [Module ΞΉ (Additive β„€Λ£)] [DecidableEq ΞΉ] variable (π’œ : ΞΉ β†’ Type*) (ℬ : ΞΉ β†’ Type*) variable [CommRing R] variable [βˆ€ i, AddCommGroup (π’œ i)] [βˆ€ i, AddCommGroup (ℬ i)] variable [βˆ€ i, Module R (π’œ i)] [βˆ€ i, Module R (ℬ i)] variable [DirectSum.GRing π’œ] [DirectSum.GRing ℬ] variable [DirectSum.GAlgebra R π’œ] [DirectSum.GAlgebra R ℬ] -- this helps with performance instance (i : ΞΉ Γ— ΞΉ) : Module R (π’œ (Prod.fst i) βŠ—[R] ℬ (Prod.snd i)) := TensorProduct.leftModule open DirectSum (lof) variable (R) section gradedComm local notation "π’œβ„¬" => (fun i : ΞΉ Γ— ΞΉ => π’œ (Prod.fst i) βŠ—[R] ℬ (Prod.snd i)) local notation "β„¬π’œ" => (fun i : ΞΉ Γ— ΞΉ => ℬ (Prod.fst i) βŠ—[R] π’œ (Prod.snd i)) def gradedCommAux : DirectSum _ π’œβ„¬ β†’β‚—[R] DirectSum _ β„¬π’œ := by refine DirectSum.toModule R _ _ fun i => ?_ have o := DirectSum.lof R _ β„¬π’œ i.swap have s : β„€Λ£ := ((-1 : β„€Λ£)^(i.1* i.2 : ΞΉ) : β„€Λ£) exact (s β€’ o) βˆ˜β‚— (TensorProduct.comm R _ _).toLinearMap @[simp] theorem gradedCommAux_lof_tmul (i j : ΞΉ) (a : π’œ i) (b : ℬ j) : gradedCommAux R π’œ ℬ (lof R _ π’œβ„¬ (i, j) (a βŠ—β‚œ b)) = (-1 : β„€Λ£)^(j * i) β€’ lof R _ β„¬π’œ (j, i) (b βŠ—β‚œ a) := by rw [gradedCommAux] dsimp simp [mul_comm i j] @[simp]
Mathlib/LinearAlgebra/TensorProduct/Graded/External.lean
93
98
theorem gradedCommAux_comp_gradedCommAux : gradedCommAux R π’œ ℬ βˆ˜β‚— gradedCommAux R ℬ π’œ = LinearMap.id := by
ext i a b dsimp rw [gradedCommAux_lof_tmul, LinearMap.map_smul_of_tower, gradedCommAux_lof_tmul, smul_smul, mul_comm i.2 i.1, Int.units_mul_self, one_smul]
1,742
import Mathlib.Data.Int.Order.Units import Mathlib.Data.ZMod.IntUnitsPower import Mathlib.RingTheory.TensorProduct.Basic import Mathlib.LinearAlgebra.DirectSum.TensorProduct import Mathlib.Algebra.DirectSum.Algebra suppress_compilation open scoped TensorProduct DirectSum variable {R ΞΉ A B : Type*} namespace TensorProduct variable [CommSemiring ΞΉ] [Module ΞΉ (Additive β„€Λ£)] [DecidableEq ΞΉ] variable (π’œ : ΞΉ β†’ Type*) (ℬ : ΞΉ β†’ Type*) variable [CommRing R] variable [βˆ€ i, AddCommGroup (π’œ i)] [βˆ€ i, AddCommGroup (ℬ i)] variable [βˆ€ i, Module R (π’œ i)] [βˆ€ i, Module R (ℬ i)] variable [DirectSum.GRing π’œ] [DirectSum.GRing ℬ] variable [DirectSum.GAlgebra R π’œ] [DirectSum.GAlgebra R ℬ] -- this helps with performance instance (i : ΞΉ Γ— ΞΉ) : Module R (π’œ (Prod.fst i) βŠ—[R] ℬ (Prod.snd i)) := TensorProduct.leftModule open DirectSum (lof) variable (R) section gradedComm local notation "π’œβ„¬" => (fun i : ΞΉ Γ— ΞΉ => π’œ (Prod.fst i) βŠ—[R] ℬ (Prod.snd i)) local notation "β„¬π’œ" => (fun i : ΞΉ Γ— ΞΉ => ℬ (Prod.fst i) βŠ—[R] π’œ (Prod.snd i)) def gradedCommAux : DirectSum _ π’œβ„¬ β†’β‚—[R] DirectSum _ β„¬π’œ := by refine DirectSum.toModule R _ _ fun i => ?_ have o := DirectSum.lof R _ β„¬π’œ i.swap have s : β„€Λ£ := ((-1 : β„€Λ£)^(i.1* i.2 : ΞΉ) : β„€Λ£) exact (s β€’ o) βˆ˜β‚— (TensorProduct.comm R _ _).toLinearMap @[simp] theorem gradedCommAux_lof_tmul (i j : ΞΉ) (a : π’œ i) (b : ℬ j) : gradedCommAux R π’œ ℬ (lof R _ π’œβ„¬ (i, j) (a βŠ—β‚œ b)) = (-1 : β„€Λ£)^(j * i) β€’ lof R _ β„¬π’œ (j, i) (b βŠ—β‚œ a) := by rw [gradedCommAux] dsimp simp [mul_comm i j] @[simp] theorem gradedCommAux_comp_gradedCommAux : gradedCommAux R π’œ ℬ βˆ˜β‚— gradedCommAux R ℬ π’œ = LinearMap.id := by ext i a b dsimp rw [gradedCommAux_lof_tmul, LinearMap.map_smul_of_tower, gradedCommAux_lof_tmul, smul_smul, mul_comm i.2 i.1, Int.units_mul_self, one_smul] def gradedComm : (⨁ i, π’œ i) βŠ—[R] (⨁ i, ℬ i) ≃ₗ[R] (⨁ i, ℬ i) βŠ—[R] (⨁ i, π’œ i) := by refine TensorProduct.directSum R R π’œ ℬ β‰ͺ≫ₗ ?_ β‰ͺ≫ₗ (TensorProduct.directSum R R ℬ π’œ).symm exact LinearEquiv.ofLinear (gradedCommAux _ _ _) (gradedCommAux _ _ _) (gradedCommAux_comp_gradedCommAux _ _ _) (gradedCommAux_comp_gradedCommAux _ _ _) @[simp]
Mathlib/LinearAlgebra/TensorProduct/Graded/External.lean
111
114
theorem gradedComm_symm : (gradedComm R π’œ ℬ).symm = gradedComm R ℬ π’œ := by
rw [gradedComm, gradedComm, LinearEquiv.trans_symm, LinearEquiv.symm_symm] ext rfl
1,742
import Mathlib.Data.Int.Order.Units import Mathlib.Data.ZMod.IntUnitsPower import Mathlib.RingTheory.TensorProduct.Basic import Mathlib.LinearAlgebra.DirectSum.TensorProduct import Mathlib.Algebra.DirectSum.Algebra suppress_compilation open scoped TensorProduct DirectSum variable {R ΞΉ A B : Type*} namespace TensorProduct variable [CommSemiring ΞΉ] [Module ΞΉ (Additive β„€Λ£)] [DecidableEq ΞΉ] variable (π’œ : ΞΉ β†’ Type*) (ℬ : ΞΉ β†’ Type*) variable [CommRing R] variable [βˆ€ i, AddCommGroup (π’œ i)] [βˆ€ i, AddCommGroup (ℬ i)] variable [βˆ€ i, Module R (π’œ i)] [βˆ€ i, Module R (ℬ i)] variable [DirectSum.GRing π’œ] [DirectSum.GRing ℬ] variable [DirectSum.GAlgebra R π’œ] [DirectSum.GAlgebra R ℬ] -- this helps with performance instance (i : ΞΉ Γ— ΞΉ) : Module R (π’œ (Prod.fst i) βŠ—[R] ℬ (Prod.snd i)) := TensorProduct.leftModule open DirectSum (lof) variable (R) section gradedComm local notation "π’œβ„¬" => (fun i : ΞΉ Γ— ΞΉ => π’œ (Prod.fst i) βŠ—[R] ℬ (Prod.snd i)) local notation "β„¬π’œ" => (fun i : ΞΉ Γ— ΞΉ => ℬ (Prod.fst i) βŠ—[R] π’œ (Prod.snd i)) def gradedCommAux : DirectSum _ π’œβ„¬ β†’β‚—[R] DirectSum _ β„¬π’œ := by refine DirectSum.toModule R _ _ fun i => ?_ have o := DirectSum.lof R _ β„¬π’œ i.swap have s : β„€Λ£ := ((-1 : β„€Λ£)^(i.1* i.2 : ΞΉ) : β„€Λ£) exact (s β€’ o) βˆ˜β‚— (TensorProduct.comm R _ _).toLinearMap @[simp] theorem gradedCommAux_lof_tmul (i j : ΞΉ) (a : π’œ i) (b : ℬ j) : gradedCommAux R π’œ ℬ (lof R _ π’œβ„¬ (i, j) (a βŠ—β‚œ b)) = (-1 : β„€Λ£)^(j * i) β€’ lof R _ β„¬π’œ (j, i) (b βŠ—β‚œ a) := by rw [gradedCommAux] dsimp simp [mul_comm i j] @[simp] theorem gradedCommAux_comp_gradedCommAux : gradedCommAux R π’œ ℬ βˆ˜β‚— gradedCommAux R ℬ π’œ = LinearMap.id := by ext i a b dsimp rw [gradedCommAux_lof_tmul, LinearMap.map_smul_of_tower, gradedCommAux_lof_tmul, smul_smul, mul_comm i.2 i.1, Int.units_mul_self, one_smul] def gradedComm : (⨁ i, π’œ i) βŠ—[R] (⨁ i, ℬ i) ≃ₗ[R] (⨁ i, ℬ i) βŠ—[R] (⨁ i, π’œ i) := by refine TensorProduct.directSum R R π’œ ℬ β‰ͺ≫ₗ ?_ β‰ͺ≫ₗ (TensorProduct.directSum R R ℬ π’œ).symm exact LinearEquiv.ofLinear (gradedCommAux _ _ _) (gradedCommAux _ _ _) (gradedCommAux_comp_gradedCommAux _ _ _) (gradedCommAux_comp_gradedCommAux _ _ _) @[simp] theorem gradedComm_symm : (gradedComm R π’œ ℬ).symm = gradedComm R ℬ π’œ := by rw [gradedComm, gradedComm, LinearEquiv.trans_symm, LinearEquiv.symm_symm] ext rfl
Mathlib/LinearAlgebra/TensorProduct/Graded/External.lean
116
124
theorem gradedComm_of_tmul_of (i j : ΞΉ) (a : π’œ i) (b : ℬ j) : gradedComm R π’œ ℬ (lof R _ π’œ i a βŠ—β‚œ lof R _ ℬ j b) = (-1 : β„€Λ£)^(j * i) β€’ (lof R _ ℬ _ b βŠ—β‚œ lof R _ π’œ _ a) := by
rw [gradedComm] dsimp only [LinearEquiv.trans_apply, LinearEquiv.ofLinear_apply] rw [TensorProduct.directSum_lof_tmul_lof, gradedCommAux_lof_tmul, Units.smul_def, -- Note: #8386 specialized `map_smul` to `LinearEquiv.map_smul` to avoid timeouts. zsmul_eq_smul_cast R, LinearEquiv.map_smul, TensorProduct.directSum_symm_lof_tmul, ← zsmul_eq_smul_cast, ← Units.smul_def]
1,742
import Mathlib.Data.Int.Order.Units import Mathlib.Data.ZMod.IntUnitsPower import Mathlib.RingTheory.TensorProduct.Basic import Mathlib.LinearAlgebra.DirectSum.TensorProduct import Mathlib.Algebra.DirectSum.Algebra suppress_compilation open scoped TensorProduct DirectSum variable {R ΞΉ A B : Type*} namespace TensorProduct variable [CommSemiring ΞΉ] [Module ΞΉ (Additive β„€Λ£)] [DecidableEq ΞΉ] variable (π’œ : ΞΉ β†’ Type*) (ℬ : ΞΉ β†’ Type*) variable [CommRing R] variable [βˆ€ i, AddCommGroup (π’œ i)] [βˆ€ i, AddCommGroup (ℬ i)] variable [βˆ€ i, Module R (π’œ i)] [βˆ€ i, Module R (ℬ i)] variable [DirectSum.GRing π’œ] [DirectSum.GRing ℬ] variable [DirectSum.GAlgebra R π’œ] [DirectSum.GAlgebra R ℬ] -- this helps with performance instance (i : ΞΉ Γ— ΞΉ) : Module R (π’œ (Prod.fst i) βŠ—[R] ℬ (Prod.snd i)) := TensorProduct.leftModule open DirectSum (lof) variable (R) section gradedComm local notation "π’œβ„¬" => (fun i : ΞΉ Γ— ΞΉ => π’œ (Prod.fst i) βŠ—[R] ℬ (Prod.snd i)) local notation "β„¬π’œ" => (fun i : ΞΉ Γ— ΞΉ => ℬ (Prod.fst i) βŠ—[R] π’œ (Prod.snd i)) def gradedCommAux : DirectSum _ π’œβ„¬ β†’β‚—[R] DirectSum _ β„¬π’œ := by refine DirectSum.toModule R _ _ fun i => ?_ have o := DirectSum.lof R _ β„¬π’œ i.swap have s : β„€Λ£ := ((-1 : β„€Λ£)^(i.1* i.2 : ΞΉ) : β„€Λ£) exact (s β€’ o) βˆ˜β‚— (TensorProduct.comm R _ _).toLinearMap @[simp] theorem gradedCommAux_lof_tmul (i j : ΞΉ) (a : π’œ i) (b : ℬ j) : gradedCommAux R π’œ ℬ (lof R _ π’œβ„¬ (i, j) (a βŠ—β‚œ b)) = (-1 : β„€Λ£)^(j * i) β€’ lof R _ β„¬π’œ (j, i) (b βŠ—β‚œ a) := by rw [gradedCommAux] dsimp simp [mul_comm i j] @[simp] theorem gradedCommAux_comp_gradedCommAux : gradedCommAux R π’œ ℬ βˆ˜β‚— gradedCommAux R ℬ π’œ = LinearMap.id := by ext i a b dsimp rw [gradedCommAux_lof_tmul, LinearMap.map_smul_of_tower, gradedCommAux_lof_tmul, smul_smul, mul_comm i.2 i.1, Int.units_mul_self, one_smul] def gradedComm : (⨁ i, π’œ i) βŠ—[R] (⨁ i, ℬ i) ≃ₗ[R] (⨁ i, ℬ i) βŠ—[R] (⨁ i, π’œ i) := by refine TensorProduct.directSum R R π’œ ℬ β‰ͺ≫ₗ ?_ β‰ͺ≫ₗ (TensorProduct.directSum R R ℬ π’œ).symm exact LinearEquiv.ofLinear (gradedCommAux _ _ _) (gradedCommAux _ _ _) (gradedCommAux_comp_gradedCommAux _ _ _) (gradedCommAux_comp_gradedCommAux _ _ _) @[simp] theorem gradedComm_symm : (gradedComm R π’œ ℬ).symm = gradedComm R ℬ π’œ := by rw [gradedComm, gradedComm, LinearEquiv.trans_symm, LinearEquiv.symm_symm] ext rfl theorem gradedComm_of_tmul_of (i j : ΞΉ) (a : π’œ i) (b : ℬ j) : gradedComm R π’œ ℬ (lof R _ π’œ i a βŠ—β‚œ lof R _ ℬ j b) = (-1 : β„€Λ£)^(j * i) β€’ (lof R _ ℬ _ b βŠ—β‚œ lof R _ π’œ _ a) := by rw [gradedComm] dsimp only [LinearEquiv.trans_apply, LinearEquiv.ofLinear_apply] rw [TensorProduct.directSum_lof_tmul_lof, gradedCommAux_lof_tmul, Units.smul_def, -- Note: #8386 specialized `map_smul` to `LinearEquiv.map_smul` to avoid timeouts. zsmul_eq_smul_cast R, LinearEquiv.map_smul, TensorProduct.directSum_symm_lof_tmul, ← zsmul_eq_smul_cast, ← Units.smul_def]
Mathlib/LinearAlgebra/TensorProduct/Graded/External.lean
126
135
theorem gradedComm_tmul_of_zero (a : ⨁ i, π’œ i) (b : ℬ 0) : gradedComm R π’œ ℬ (a βŠ—β‚œ lof R _ ℬ 0 b) = lof R _ ℬ _ b βŠ—β‚œ a := by
suffices (gradedComm R π’œ ℬ).toLinearMap βˆ˜β‚— (TensorProduct.mk R (⨁ i, π’œ i) (⨁ i, ℬ i)).flip (lof R _ ℬ 0 b) = TensorProduct.mk R _ _ (lof R _ ℬ 0 b) from DFunLike.congr_fun this a ext i a dsimp rw [gradedComm_of_tmul_of, zero_mul, uzpow_zero, one_smul]
1,742
import Mathlib.Data.Int.Order.Units import Mathlib.Data.ZMod.IntUnitsPower import Mathlib.RingTheory.TensorProduct.Basic import Mathlib.LinearAlgebra.DirectSum.TensorProduct import Mathlib.Algebra.DirectSum.Algebra suppress_compilation open scoped TensorProduct DirectSum variable {R ΞΉ A B : Type*} namespace TensorProduct variable [CommSemiring ΞΉ] [Module ΞΉ (Additive β„€Λ£)] [DecidableEq ΞΉ] variable (π’œ : ΞΉ β†’ Type*) (ℬ : ΞΉ β†’ Type*) variable [CommRing R] variable [βˆ€ i, AddCommGroup (π’œ i)] [βˆ€ i, AddCommGroup (ℬ i)] variable [βˆ€ i, Module R (π’œ i)] [βˆ€ i, Module R (ℬ i)] variable [DirectSum.GRing π’œ] [DirectSum.GRing ℬ] variable [DirectSum.GAlgebra R π’œ] [DirectSum.GAlgebra R ℬ] -- this helps with performance instance (i : ΞΉ Γ— ΞΉ) : Module R (π’œ (Prod.fst i) βŠ—[R] ℬ (Prod.snd i)) := TensorProduct.leftModule open DirectSum (lof) variable (R) section gradedComm local notation "π’œβ„¬" => (fun i : ΞΉ Γ— ΞΉ => π’œ (Prod.fst i) βŠ—[R] ℬ (Prod.snd i)) local notation "β„¬π’œ" => (fun i : ΞΉ Γ— ΞΉ => ℬ (Prod.fst i) βŠ—[R] π’œ (Prod.snd i)) def gradedCommAux : DirectSum _ π’œβ„¬ β†’β‚—[R] DirectSum _ β„¬π’œ := by refine DirectSum.toModule R _ _ fun i => ?_ have o := DirectSum.lof R _ β„¬π’œ i.swap have s : β„€Λ£ := ((-1 : β„€Λ£)^(i.1* i.2 : ΞΉ) : β„€Λ£) exact (s β€’ o) βˆ˜β‚— (TensorProduct.comm R _ _).toLinearMap @[simp] theorem gradedCommAux_lof_tmul (i j : ΞΉ) (a : π’œ i) (b : ℬ j) : gradedCommAux R π’œ ℬ (lof R _ π’œβ„¬ (i, j) (a βŠ—β‚œ b)) = (-1 : β„€Λ£)^(j * i) β€’ lof R _ β„¬π’œ (j, i) (b βŠ—β‚œ a) := by rw [gradedCommAux] dsimp simp [mul_comm i j] @[simp] theorem gradedCommAux_comp_gradedCommAux : gradedCommAux R π’œ ℬ βˆ˜β‚— gradedCommAux R ℬ π’œ = LinearMap.id := by ext i a b dsimp rw [gradedCommAux_lof_tmul, LinearMap.map_smul_of_tower, gradedCommAux_lof_tmul, smul_smul, mul_comm i.2 i.1, Int.units_mul_self, one_smul] def gradedComm : (⨁ i, π’œ i) βŠ—[R] (⨁ i, ℬ i) ≃ₗ[R] (⨁ i, ℬ i) βŠ—[R] (⨁ i, π’œ i) := by refine TensorProduct.directSum R R π’œ ℬ β‰ͺ≫ₗ ?_ β‰ͺ≫ₗ (TensorProduct.directSum R R ℬ π’œ).symm exact LinearEquiv.ofLinear (gradedCommAux _ _ _) (gradedCommAux _ _ _) (gradedCommAux_comp_gradedCommAux _ _ _) (gradedCommAux_comp_gradedCommAux _ _ _) @[simp] theorem gradedComm_symm : (gradedComm R π’œ ℬ).symm = gradedComm R ℬ π’œ := by rw [gradedComm, gradedComm, LinearEquiv.trans_symm, LinearEquiv.symm_symm] ext rfl theorem gradedComm_of_tmul_of (i j : ΞΉ) (a : π’œ i) (b : ℬ j) : gradedComm R π’œ ℬ (lof R _ π’œ i a βŠ—β‚œ lof R _ ℬ j b) = (-1 : β„€Λ£)^(j * i) β€’ (lof R _ ℬ _ b βŠ—β‚œ lof R _ π’œ _ a) := by rw [gradedComm] dsimp only [LinearEquiv.trans_apply, LinearEquiv.ofLinear_apply] rw [TensorProduct.directSum_lof_tmul_lof, gradedCommAux_lof_tmul, Units.smul_def, -- Note: #8386 specialized `map_smul` to `LinearEquiv.map_smul` to avoid timeouts. zsmul_eq_smul_cast R, LinearEquiv.map_smul, TensorProduct.directSum_symm_lof_tmul, ← zsmul_eq_smul_cast, ← Units.smul_def] theorem gradedComm_tmul_of_zero (a : ⨁ i, π’œ i) (b : ℬ 0) : gradedComm R π’œ ℬ (a βŠ—β‚œ lof R _ ℬ 0 b) = lof R _ ℬ _ b βŠ—β‚œ a := by suffices (gradedComm R π’œ ℬ).toLinearMap βˆ˜β‚— (TensorProduct.mk R (⨁ i, π’œ i) (⨁ i, ℬ i)).flip (lof R _ ℬ 0 b) = TensorProduct.mk R _ _ (lof R _ ℬ 0 b) from DFunLike.congr_fun this a ext i a dsimp rw [gradedComm_of_tmul_of, zero_mul, uzpow_zero, one_smul]
Mathlib/LinearAlgebra/TensorProduct/Graded/External.lean
137
145
theorem gradedComm_of_zero_tmul (a : π’œ 0) (b : ⨁ i, ℬ i) : gradedComm R π’œ ℬ (lof R _ π’œ 0 a βŠ—β‚œ b) = b βŠ—β‚œ lof R _ π’œ _ a := by
suffices (gradedComm R π’œ ℬ).toLinearMap βˆ˜β‚— (TensorProduct.mk R (⨁ i, π’œ i) (⨁ i, ℬ i)) (lof R _ π’œ 0 a) = (TensorProduct.mk R _ _).flip (lof R _ π’œ 0 a) from DFunLike.congr_fun this b ext i b dsimp rw [gradedComm_of_tmul_of, mul_zero, uzpow_zero, one_smul]
1,742
import Mathlib.LinearAlgebra.TensorProduct.Graded.External import Mathlib.RingTheory.GradedAlgebra.Basic import Mathlib.GroupTheory.GroupAction.Ring suppress_compilation open scoped TensorProduct variable {R ΞΉ A B : Type*} variable [CommSemiring ΞΉ] [Module ΞΉ (Additive β„€Λ£)] [DecidableEq ΞΉ] variable [CommRing R] [Ring A] [Ring B] [Algebra R A] [Algebra R B] variable (π’œ : ΞΉ β†’ Submodule R A) (ℬ : ΞΉ β†’ Submodule R B) variable [GradedAlgebra π’œ] [GradedAlgebra ℬ] open DirectSum variable (R) in @[nolint unusedArguments] def GradedTensorProduct (π’œ : ΞΉ β†’ Submodule R A) (ℬ : ΞΉ β†’ Submodule R B) [GradedAlgebra π’œ] [GradedAlgebra ℬ] : Type _ := A βŠ—[R] B namespace GradedTensorProduct open TensorProduct @[inherit_doc GradedTensorProduct] scoped[TensorProduct] notation:100 π’œ " α΅βŠ—[" R "] " ℬ:100 => GradedTensorProduct R π’œ ℬ instance instAddCommGroupWithOne : AddCommGroupWithOne (π’œ α΅βŠ—[R] ℬ) := Algebra.TensorProduct.instAddCommGroupWithOne instance : Module R (π’œ α΅βŠ—[R] ℬ) := TensorProduct.leftModule variable (R) in def of : A βŠ—[R] B ≃ₗ[R] π’œ α΅βŠ—[R] ℬ := LinearEquiv.refl _ _ @[simp] theorem of_one : of R π’œ ℬ 1 = 1 := rfl @[simp] theorem of_symm_one : (of R π’œ ℬ).symm 1 = 1 := rfl -- for dsimp @[simp, nolint simpNF] theorem of_symm_of (x : A βŠ—[R] B) : (of R π’œ ℬ).symm (of R π’œ ℬ x) = x := rfl -- for dsimp @[simp, nolint simpNF] theorem symm_of_of (x : π’œ α΅βŠ—[R] ℬ) : of R π’œ ℬ ((of R π’œ ℬ).symm x) = x := rfl @[ext] theorem hom_ext {M} [AddCommMonoid M] [Module R M] ⦃f g : π’œ α΅βŠ—[R] ℬ β†’β‚—[R] M⦄ (h : f βˆ˜β‚— of R π’œ ℬ = (g βˆ˜β‚— of R π’œ ℬ : A βŠ—[R] B β†’β‚—[R] M)) : f = g := h variable (R) {π’œ ℬ} in abbrev tmul (a : A) (b : B) : π’œ α΅βŠ—[R] ℬ := of R π’œ ℬ (a βŠ—β‚œ b) @[inherit_doc] notation:100 x " α΅βŠ—β‚œ" y:100 => tmul _ x y @[inherit_doc] notation:100 x " α΅βŠ—β‚œ[" R "] " y:100 => tmul R x y variable (R) in noncomputable def auxEquiv : (π’œ α΅βŠ—[R] ℬ) ≃ₗ[R] (⨁ i, π’œ i) βŠ—[R] (⨁ i, ℬ i) := let fA := (decomposeAlgEquiv π’œ).toLinearEquiv let fB := (decomposeAlgEquiv ℬ).toLinearEquiv (of R π’œ ℬ).symm.trans (TensorProduct.congr fA fB) theorem auxEquiv_tmul (a : A) (b : B) : auxEquiv R π’œ ℬ (a α΅βŠ—β‚œ b) = decompose π’œ a βŠ—β‚œ decompose ℬ b := rfl
Mathlib/LinearAlgebra/TensorProduct/Graded/Internal.lean
133
135
theorem auxEquiv_one : auxEquiv R π’œ ℬ 1 = 1 := by
rw [← of_one, Algebra.TensorProduct.one_def, auxEquiv_tmul π’œ ℬ, DirectSum.decompose_one, DirectSum.decompose_one, Algebra.TensorProduct.one_def]
1,743
import Mathlib.LinearAlgebra.CliffordAlgebra.Grading import Mathlib.LinearAlgebra.TensorProduct.Graded.Internal import Mathlib.LinearAlgebra.QuadraticForm.Prod suppress_compilation variable {R M₁ Mβ‚‚ N : Type*} variable [CommRing R] [AddCommGroup M₁] [AddCommGroup Mβ‚‚] [AddCommGroup N] variable [Module R M₁] [Module R Mβ‚‚] [Module R N] variable (Q₁ : QuadraticForm R M₁) (Qβ‚‚ : QuadraticForm R Mβ‚‚) (Qβ‚™ : QuadraticForm R N) open scoped TensorProduct namespace CliffordAlgebra section map_mul_map variable {Q₁ Qβ‚‚ Qβ‚™} variable (f₁ : Q₁ β†’qα΅’ Qβ‚™) (fβ‚‚ : Qβ‚‚ β†’qα΅’ Qβ‚™) (hf : βˆ€ x y, Qβ‚™.IsOrtho (f₁ x) (fβ‚‚ y)) variable (m₁ : CliffordAlgebra Q₁) (mβ‚‚ : CliffordAlgebra Qβ‚‚) nonrec theorem map_mul_map_of_isOrtho_of_mem_evenOdd {i₁ iβ‚‚ : ZMod 2} (hm₁ : m₁ ∈ evenOdd Q₁ i₁) (hmβ‚‚ : mβ‚‚ ∈ evenOdd Qβ‚‚ iβ‚‚) : map f₁ m₁ * map fβ‚‚ mβ‚‚ = (-1 : β„€Λ£) ^ (iβ‚‚ * i₁) β€’ (map fβ‚‚ mβ‚‚ * map f₁ m₁) := by -- the strategy; for each variable, induct on powers of `ΞΉ`, then on the exponent of each -- power. induction hm₁ using Submodule.iSup_induction' with | zero => rw [map_zero, zero_mul, mul_zero, smul_zero] | add _ _ _ _ ihx ihy => rw [map_add, add_mul, mul_add, ihx, ihy, smul_add] | mem i₁' m₁' hm₁ => obtain ⟨i₁n, rfl⟩ := i₁' dsimp only at * induction hm₁ using Submodule.pow_induction_on_left' with | algebraMap => rw [AlgHom.commutes, Nat.cast_zero, mul_zero, uzpow_zero, one_smul, Algebra.commutes] | add _ _ _ _ _ ihx ihy => rw [map_add, add_mul, mul_add, ihx, ihy, smul_add] | mem_mul m₁ hm₁ i x₁ _hx₁ ih₁ => obtain ⟨v₁, rfl⟩ := hm₁ -- this is the first interesting goal rw [map_mul, mul_assoc, ih₁, mul_smul_comm, map_apply_ΞΉ, Nat.cast_succ, mul_add_one, uzpow_add, mul_smul, ← mul_assoc, ← mul_assoc, ← smul_mul_assoc ((-1) ^ iβ‚‚)] clear ih₁ congr 2 induction hmβ‚‚ using Submodule.iSup_induction' with | zero => rw [map_zero, zero_mul, mul_zero, smul_zero] | add _ _ _ _ ihx ihy => rw [map_add, add_mul, mul_add, ihx, ihy, smul_add] | mem iβ‚‚' mβ‚‚' hmβ‚‚ => clear mβ‚‚ obtain ⟨iβ‚‚n, rfl⟩ := iβ‚‚' dsimp only at * induction hmβ‚‚ using Submodule.pow_induction_on_left' with | algebraMap => rw [AlgHom.commutes, Nat.cast_zero, uzpow_zero, one_smul, Algebra.commutes] | add _ _ _ _ _ ihx ihy => rw [map_add, add_mul, mul_add, ihx, ihy, smul_add] | mem_mul mβ‚‚ hmβ‚‚ i xβ‚‚ _hxβ‚‚ ihβ‚‚ => obtain ⟨vβ‚‚, rfl⟩ := hmβ‚‚ -- this is the second interesting goal rw [map_mul, map_apply_ΞΉ, Nat.cast_succ, ← mul_assoc, ΞΉ_mul_ΞΉ_comm_of_isOrtho (hf _ _), neg_mul, mul_assoc, ihβ‚‚, mul_smul_comm, ← mul_assoc, ← Units.neg_smul, uzpow_add, uzpow_one, mul_neg_one] theorem commute_map_mul_map_of_isOrtho_of_mem_evenOdd_zero_left {iβ‚‚ : ZMod 2} (hm₁ : m₁ ∈ evenOdd Q₁ 0) (hmβ‚‚ : mβ‚‚ ∈ evenOdd Qβ‚‚ iβ‚‚) : Commute (map f₁ m₁) (map fβ‚‚ mβ‚‚) := (map_mul_map_of_isOrtho_of_mem_evenOdd _ _ hf _ _ hm₁ hmβ‚‚).trans <| by simp theorem commute_map_mul_map_of_isOrtho_of_mem_evenOdd_zero_right {i₁ : ZMod 2} (hm₁ : m₁ ∈ evenOdd Q₁ i₁) (hmβ‚‚ : mβ‚‚ ∈ evenOdd Qβ‚‚ 0) : Commute (map f₁ m₁) (map fβ‚‚ mβ‚‚) := (map_mul_map_of_isOrtho_of_mem_evenOdd _ _ hf _ _ hm₁ hmβ‚‚).trans <| by simp
Mathlib/LinearAlgebra/CliffordAlgebra/Prod.lean
101
104
theorem map_mul_map_eq_neg_of_isOrtho_of_mem_evenOdd_one (hm₁ : m₁ ∈ evenOdd Q₁ 1) (hmβ‚‚ : mβ‚‚ ∈ evenOdd Qβ‚‚ 1) : map f₁ m₁ * map fβ‚‚ mβ‚‚ = - map fβ‚‚ mβ‚‚ * map f₁ m₁ := by
simp [map_mul_map_of_isOrtho_of_mem_evenOdd _ _ hf _ _ hm₁ hmβ‚‚]
1,744
import Mathlib.Algebra.Algebra.Subalgebra.Basic import Mathlib.Topology.Algebra.Module.Basic import Mathlib.RingTheory.Adjoin.Basic #align_import topology.algebra.algebra from "leanprover-community/mathlib"@"43afc5ad87891456c57b5a183e3e617d67c2b1db" open scoped Classical open Set TopologicalSpace Algebra open scoped Classical universe u v w section TopologicalAlgebra variable (R : Type*) (A : Type u) variable [CommSemiring R] [Semiring A] [Algebra R A] variable [TopologicalSpace R] [TopologicalSpace A] @[continuity, fun_prop]
Mathlib/Topology/Algebra/Algebra.lean
42
44
theorem continuous_algebraMap [ContinuousSMul R A] : Continuous (algebraMap R A) := by
rw [algebraMap_eq_smul_one'] exact continuous_id.smul continuous_const
1,745
import Mathlib.Algebra.Algebra.Subalgebra.Basic import Mathlib.Topology.Algebra.Module.Basic import Mathlib.RingTheory.Adjoin.Basic #align_import topology.algebra.algebra from "leanprover-community/mathlib"@"43afc5ad87891456c57b5a183e3e617d67c2b1db" open scoped Classical open Set TopologicalSpace Algebra open scoped Classical universe u v w section TopologicalAlgebra variable (R : Type*) (A : Type u) variable [CommSemiring R] [Semiring A] [Algebra R A] variable [TopologicalSpace R] [TopologicalSpace A] @[continuity, fun_prop] theorem continuous_algebraMap [ContinuousSMul R A] : Continuous (algebraMap R A) := by rw [algebraMap_eq_smul_one'] exact continuous_id.smul continuous_const #align continuous_algebra_map continuous_algebraMap
Mathlib/Topology/Algebra/Algebra.lean
47
51
theorem continuous_algebraMap_iff_smul [TopologicalSemiring A] : Continuous (algebraMap R A) ↔ Continuous fun p : R Γ— A => p.1 β€’ p.2 := by
refine ⟨fun h => ?_, fun h => have : ContinuousSMul R A := ⟨h⟩; continuous_algebraMap _ _⟩ simp only [Algebra.smul_def] exact (h.comp continuous_fst).mul continuous_snd
1,745
import Mathlib.Algebra.Algebra.Subalgebra.Basic import Mathlib.Topology.Algebra.Module.Basic import Mathlib.RingTheory.Adjoin.Basic #align_import topology.algebra.algebra from "leanprover-community/mathlib"@"43afc5ad87891456c57b5a183e3e617d67c2b1db" open scoped Classical open Set TopologicalSpace Algebra open scoped Classical universe u v w section TopologicalAlgebra variable {R : Type*} [CommSemiring R] variable {A : Type u} [TopologicalSpace A] variable [Semiring A] [Algebra R A] #align subalgebra.has_continuous_smul SMulMemClass.continuousSMul variable [TopologicalSemiring A] def Subalgebra.topologicalClosure (s : Subalgebra R A) : Subalgebra R A := { s.toSubsemiring.topologicalClosure with carrier := closure (s : Set A) algebraMap_mem' := fun r => s.toSubsemiring.le_topologicalClosure (s.algebraMap_mem r) } #align subalgebra.topological_closure Subalgebra.topologicalClosure @[simp] theorem Subalgebra.topologicalClosure_coe (s : Subalgebra R A) : (s.topologicalClosure : Set A) = closure (s : Set A) := rfl #align subalgebra.topological_closure_coe Subalgebra.topologicalClosure_coe instance Subalgebra.topologicalSemiring (s : Subalgebra R A) : TopologicalSemiring s := s.toSubsemiring.topologicalSemiring #align subalgebra.topological_semiring Subalgebra.topologicalSemiring theorem Subalgebra.le_topologicalClosure (s : Subalgebra R A) : s ≀ s.topologicalClosure := subset_closure #align subalgebra.le_topological_closure Subalgebra.le_topologicalClosure
Mathlib/Topology/Algebra/Algebra.lean
110
111
theorem Subalgebra.isClosed_topologicalClosure (s : Subalgebra R A) : IsClosed (s.topologicalClosure : Set A) := by
convert @isClosed_closure A s _
1,745
import Mathlib.Algebra.Algebra.Subalgebra.Basic import Mathlib.Topology.Algebra.Module.Basic import Mathlib.RingTheory.Adjoin.Basic #align_import topology.algebra.algebra from "leanprover-community/mathlib"@"43afc5ad87891456c57b5a183e3e617d67c2b1db" open scoped Classical open Set TopologicalSpace Algebra open scoped Classical universe u v w section TopologicalAlgebra variable {R : Type*} [CommSemiring R] variable {A : Type u} [TopologicalSpace A] variable [Semiring A] [Algebra R A] #align subalgebra.has_continuous_smul SMulMemClass.continuousSMul variable [TopologicalSemiring A] def Subalgebra.topologicalClosure (s : Subalgebra R A) : Subalgebra R A := { s.toSubsemiring.topologicalClosure with carrier := closure (s : Set A) algebraMap_mem' := fun r => s.toSubsemiring.le_topologicalClosure (s.algebraMap_mem r) } #align subalgebra.topological_closure Subalgebra.topologicalClosure @[simp] theorem Subalgebra.topologicalClosure_coe (s : Subalgebra R A) : (s.topologicalClosure : Set A) = closure (s : Set A) := rfl #align subalgebra.topological_closure_coe Subalgebra.topologicalClosure_coe instance Subalgebra.topologicalSemiring (s : Subalgebra R A) : TopologicalSemiring s := s.toSubsemiring.topologicalSemiring #align subalgebra.topological_semiring Subalgebra.topologicalSemiring theorem Subalgebra.le_topologicalClosure (s : Subalgebra R A) : s ≀ s.topologicalClosure := subset_closure #align subalgebra.le_topological_closure Subalgebra.le_topologicalClosure theorem Subalgebra.isClosed_topologicalClosure (s : Subalgebra R A) : IsClosed (s.topologicalClosure : Set A) := by convert @isClosed_closure A s _ #align subalgebra.is_closed_topological_closure Subalgebra.isClosed_topologicalClosure theorem Subalgebra.topologicalClosure_minimal (s : Subalgebra R A) {t : Subalgebra R A} (h : s ≀ t) (ht : IsClosed (t : Set A)) : s.topologicalClosure ≀ t := closure_minimal h ht #align subalgebra.topological_closure_minimal Subalgebra.topologicalClosure_minimal def Subalgebra.commSemiringTopologicalClosure [T2Space A] (s : Subalgebra R A) (hs : βˆ€ x y : s, x * y = y * x) : CommSemiring s.topologicalClosure := { s.topologicalClosure.toSemiring, s.toSubmonoid.commMonoidTopologicalClosure hs with } #align subalgebra.comm_semiring_topological_closure Subalgebra.commSemiringTopologicalClosure
Mathlib/Topology/Algebra/Algebra.lean
130
137
theorem Subalgebra.topologicalClosure_comap_homeomorph (s : Subalgebra R A) {B : Type*} [TopologicalSpace B] [Ring B] [TopologicalRing B] [Algebra R B] (f : B →ₐ[R] A) (f' : B β‰ƒβ‚œ A) (w : (f : B β†’ A) = f') : s.topologicalClosure.comap f = (s.comap f).topologicalClosure := by
apply SetLike.ext' simp only [Subalgebra.topologicalClosure_coe] simp only [Subalgebra.coe_comap, Subsemiring.coe_comap, AlgHom.coe_toRingHom] rw [w] exact f'.preimage_closure _
1,745
import Mathlib.Algebra.Star.Subalgebra import Mathlib.Topology.Algebra.Algebra import Mathlib.Topology.Algebra.Star #align_import topology.algebra.star_subalgebra from "leanprover-community/mathlib"@"b7f5a77fa29ad9a3ccc484109b0d7534178e7ecd" open scoped Classical open Set TopologicalSpace open scoped Classical namespace StarSubalgebra section TopologicalStarAlgebra variable {R A B : Type*} [CommSemiring R] [StarRing R] variable [TopologicalSpace A] [Semiring A] [Algebra R A] [StarRing A] [StarModule R A] instance [TopologicalSemiring A] (s : StarSubalgebra R A) : TopologicalSemiring s := s.toSubalgebra.topologicalSemiring theorem embedding_inclusion {S₁ Sβ‚‚ : StarSubalgebra R A} (h : S₁ ≀ Sβ‚‚) : Embedding (inclusion h) := { induced := Eq.symm induced_compose inj := Subtype.map_injective h Function.injective_id } #align star_subalgebra.embedding_inclusion StarSubalgebra.embedding_inclusion theorem closedEmbedding_inclusion {S₁ Sβ‚‚ : StarSubalgebra R A} (h : S₁ ≀ Sβ‚‚) (hS₁ : IsClosed (S₁ : Set A)) : ClosedEmbedding (inclusion h) := { embedding_inclusion h with isClosed_range := isClosed_induced_iff.2 ⟨S₁, hS₁, by convert (Set.range_subtype_map id _).symm Β· rw [Set.image_id]; rfl Β· intro _ h' apply h h' ⟩ } #align star_subalgebra.closed_embedding_inclusion StarSubalgebra.closedEmbedding_inclusion variable [TopologicalSemiring A] [ContinuousStar A] variable [TopologicalSpace B] [Semiring B] [Algebra R B] [StarRing B] def topologicalClosure (s : StarSubalgebra R A) : StarSubalgebra R A := { s.toSubalgebra.topologicalClosure with carrier := closure (s : Set A) star_mem' := fun ha => map_mem_closure continuous_star ha fun x => (star_mem : x ∈ s β†’ star x ∈ s) } #align star_subalgebra.topological_closure StarSubalgebra.topologicalClosure theorem topologicalClosure_toSubalgebra_comm (s : StarSubalgebra R A) : s.topologicalClosure.toSubalgebra = s.toSubalgebra.topologicalClosure := SetLike.coe_injective rfl @[simp] theorem topologicalClosure_coe (s : StarSubalgebra R A) : (s.topologicalClosure : Set A) = closure (s : Set A) := rfl #align star_subalgebra.topological_closure_coe StarSubalgebra.topologicalClosure_coe theorem le_topologicalClosure (s : StarSubalgebra R A) : s ≀ s.topologicalClosure := subset_closure #align star_subalgebra.le_topological_closure StarSubalgebra.le_topologicalClosure theorem isClosed_topologicalClosure (s : StarSubalgebra R A) : IsClosed (s.topologicalClosure : Set A) := isClosed_closure #align star_subalgebra.is_closed_topological_closure StarSubalgebra.isClosed_topologicalClosure instance {A : Type*} [UniformSpace A] [CompleteSpace A] [Semiring A] [StarRing A] [TopologicalSemiring A] [ContinuousStar A] [Algebra R A] [StarModule R A] {S : StarSubalgebra R A} : CompleteSpace S.topologicalClosure := isClosed_closure.completeSpace_coe theorem topologicalClosure_minimal {s t : StarSubalgebra R A} (h : s ≀ t) (ht : IsClosed (t : Set A)) : s.topologicalClosure ≀ t := closure_minimal h ht #align star_subalgebra.topological_closure_minimal StarSubalgebra.topologicalClosure_minimal theorem topologicalClosure_mono : Monotone (topologicalClosure : _ β†’ StarSubalgebra R A) := fun _ Sβ‚‚ h => topologicalClosure_minimal (h.trans <| le_topologicalClosure Sβ‚‚) (isClosed_topologicalClosure Sβ‚‚) #align star_subalgebra.topological_closure_mono StarSubalgebra.topologicalClosure_mono theorem topologicalClosure_map_le [StarModule R B] [TopologicalSemiring B] [ContinuousStar B] (s : StarSubalgebra R A) (Ο† : A →⋆ₐ[R] B) (hΟ† : IsClosedMap Ο†) : (map Ο† s).topologicalClosure ≀ map Ο† s.topologicalClosure := hΟ†.closure_image_subset _ theorem map_topologicalClosure_le [StarModule R B] [TopologicalSemiring B] [ContinuousStar B] (s : StarSubalgebra R A) (Ο† : A →⋆ₐ[R] B) (hΟ† : Continuous Ο†) : map Ο† s.topologicalClosure ≀ (map Ο† s).topologicalClosure := image_closure_subset_closure_image hΟ† theorem topologicalClosure_map [StarModule R B] [TopologicalSemiring B] [ContinuousStar B] (s : StarSubalgebra R A) (Ο† : A →⋆ₐ[R] B) (hΟ† : ClosedEmbedding Ο†) : (map Ο† s).topologicalClosure = map Ο† s.topologicalClosure := SetLike.coe_injective <| hΟ†.closure_image_eq _
Mathlib/Topology/Algebra/StarSubalgebra.lean
122
127
theorem _root_.Subalgebra.topologicalClosure_star_comm (s : Subalgebra R A) : (star s).topologicalClosure = star s.topologicalClosure := by
suffices βˆ€ t : Subalgebra R A, (star t).topologicalClosure ≀ star t.topologicalClosure from le_antisymm (this s) (by simpa only [star_star] using Subalgebra.star_mono (this (star s))) exact fun t => (star t).topologicalClosure_minimal (Subalgebra.star_mono subset_closure) (isClosed_closure.preimage continuous_star)
1,746
import Mathlib.Algebra.Star.Subalgebra import Mathlib.Topology.Algebra.Algebra import Mathlib.Topology.Algebra.Star #align_import topology.algebra.star_subalgebra from "leanprover-community/mathlib"@"b7f5a77fa29ad9a3ccc484109b0d7534178e7ecd" open scoped Classical open Set TopologicalSpace open scoped Classical namespace StarSubalgebra section TopologicalStarAlgebra variable {R A B : Type*} [CommSemiring R] [StarRing R] variable [TopologicalSpace A] [Semiring A] [Algebra R A] [StarRing A] [StarModule R A] instance [TopologicalSemiring A] (s : StarSubalgebra R A) : TopologicalSemiring s := s.toSubalgebra.topologicalSemiring theorem embedding_inclusion {S₁ Sβ‚‚ : StarSubalgebra R A} (h : S₁ ≀ Sβ‚‚) : Embedding (inclusion h) := { induced := Eq.symm induced_compose inj := Subtype.map_injective h Function.injective_id } #align star_subalgebra.embedding_inclusion StarSubalgebra.embedding_inclusion theorem closedEmbedding_inclusion {S₁ Sβ‚‚ : StarSubalgebra R A} (h : S₁ ≀ Sβ‚‚) (hS₁ : IsClosed (S₁ : Set A)) : ClosedEmbedding (inclusion h) := { embedding_inclusion h with isClosed_range := isClosed_induced_iff.2 ⟨S₁, hS₁, by convert (Set.range_subtype_map id _).symm Β· rw [Set.image_id]; rfl Β· intro _ h' apply h h' ⟩ } #align star_subalgebra.closed_embedding_inclusion StarSubalgebra.closedEmbedding_inclusion variable [TopologicalSemiring A] [ContinuousStar A] variable [TopologicalSpace B] [Semiring B] [Algebra R B] [StarRing B] def topologicalClosure (s : StarSubalgebra R A) : StarSubalgebra R A := { s.toSubalgebra.topologicalClosure with carrier := closure (s : Set A) star_mem' := fun ha => map_mem_closure continuous_star ha fun x => (star_mem : x ∈ s β†’ star x ∈ s) } #align star_subalgebra.topological_closure StarSubalgebra.topologicalClosure theorem topologicalClosure_toSubalgebra_comm (s : StarSubalgebra R A) : s.topologicalClosure.toSubalgebra = s.toSubalgebra.topologicalClosure := SetLike.coe_injective rfl @[simp] theorem topologicalClosure_coe (s : StarSubalgebra R A) : (s.topologicalClosure : Set A) = closure (s : Set A) := rfl #align star_subalgebra.topological_closure_coe StarSubalgebra.topologicalClosure_coe theorem le_topologicalClosure (s : StarSubalgebra R A) : s ≀ s.topologicalClosure := subset_closure #align star_subalgebra.le_topological_closure StarSubalgebra.le_topologicalClosure theorem isClosed_topologicalClosure (s : StarSubalgebra R A) : IsClosed (s.topologicalClosure : Set A) := isClosed_closure #align star_subalgebra.is_closed_topological_closure StarSubalgebra.isClosed_topologicalClosure instance {A : Type*} [UniformSpace A] [CompleteSpace A] [Semiring A] [StarRing A] [TopologicalSemiring A] [ContinuousStar A] [Algebra R A] [StarModule R A] {S : StarSubalgebra R A} : CompleteSpace S.topologicalClosure := isClosed_closure.completeSpace_coe theorem topologicalClosure_minimal {s t : StarSubalgebra R A} (h : s ≀ t) (ht : IsClosed (t : Set A)) : s.topologicalClosure ≀ t := closure_minimal h ht #align star_subalgebra.topological_closure_minimal StarSubalgebra.topologicalClosure_minimal theorem topologicalClosure_mono : Monotone (topologicalClosure : _ β†’ StarSubalgebra R A) := fun _ Sβ‚‚ h => topologicalClosure_minimal (h.trans <| le_topologicalClosure Sβ‚‚) (isClosed_topologicalClosure Sβ‚‚) #align star_subalgebra.topological_closure_mono StarSubalgebra.topologicalClosure_mono theorem topologicalClosure_map_le [StarModule R B] [TopologicalSemiring B] [ContinuousStar B] (s : StarSubalgebra R A) (Ο† : A →⋆ₐ[R] B) (hΟ† : IsClosedMap Ο†) : (map Ο† s).topologicalClosure ≀ map Ο† s.topologicalClosure := hΟ†.closure_image_subset _ theorem map_topologicalClosure_le [StarModule R B] [TopologicalSemiring B] [ContinuousStar B] (s : StarSubalgebra R A) (Ο† : A →⋆ₐ[R] B) (hΟ† : Continuous Ο†) : map Ο† s.topologicalClosure ≀ (map Ο† s).topologicalClosure := image_closure_subset_closure_image hΟ† theorem topologicalClosure_map [StarModule R B] [TopologicalSemiring B] [ContinuousStar B] (s : StarSubalgebra R A) (Ο† : A →⋆ₐ[R] B) (hΟ† : ClosedEmbedding Ο†) : (map Ο† s).topologicalClosure = map Ο† s.topologicalClosure := SetLike.coe_injective <| hΟ†.closure_image_eq _ theorem _root_.Subalgebra.topologicalClosure_star_comm (s : Subalgebra R A) : (star s).topologicalClosure = star s.topologicalClosure := by suffices βˆ€ t : Subalgebra R A, (star t).topologicalClosure ≀ star t.topologicalClosure from le_antisymm (this s) (by simpa only [star_star] using Subalgebra.star_mono (this (star s))) exact fun t => (star t).topologicalClosure_minimal (Subalgebra.star_mono subset_closure) (isClosed_closure.preimage continuous_star) abbrev commSemiringTopologicalClosure [T2Space A] (s : StarSubalgebra R A) (hs : βˆ€ x y : s, x * y = y * x) : CommSemiring s.topologicalClosure := s.toSubalgebra.commSemiringTopologicalClosure hs #align star_subalgebra.comm_semiring_topological_closure StarSubalgebra.commSemiringTopologicalClosure abbrev commRingTopologicalClosure {R A} [CommRing R] [StarRing R] [TopologicalSpace A] [Ring A] [Algebra R A] [StarRing A] [StarModule R A] [TopologicalRing A] [ContinuousStar A] [T2Space A] (s : StarSubalgebra R A) (hs : βˆ€ x y : s, x * y = y * x) : CommRing s.topologicalClosure := s.toSubalgebra.commRingTopologicalClosure hs #align star_subalgebra.comm_ring_topological_closure StarSubalgebra.commRingTopologicalClosure
Mathlib/Topology/Algebra/StarSubalgebra.lean
146
163
theorem _root_.StarAlgHom.ext_topologicalClosure [T2Space B] {S : StarSubalgebra R A} {Ο† ψ : S.topologicalClosure →⋆ₐ[R] B} (hΟ† : Continuous Ο†) (hψ : Continuous ψ) (h : Ο†.comp (inclusion (le_topologicalClosure S)) = ψ.comp (inclusion (le_topologicalClosure S))) : Ο† = ψ := by
rw [DFunLike.ext'_iff] have : Dense (Set.range <| inclusion (le_topologicalClosure S)) := by refine embedding_subtype_val.toInducing.dense_iff.2 fun x => ?_ convert show ↑x ∈ closure (S : Set A) from x.prop rw [← Set.range_comp] exact Set.ext fun y => ⟨by rintro ⟨y, rfl⟩ exact y.prop, fun hy => ⟨⟨y, hy⟩, rfl⟩⟩ refine Continuous.ext_on this hΟ† hψ ?_ rintro _ ⟨x, rfl⟩ simpa only using DFunLike.congr_fun h x
1,746
import Mathlib.Algebra.GeomSum import Mathlib.Order.Filter.Archimedean import Mathlib.Order.Iterate import Mathlib.Topology.Algebra.Algebra import Mathlib.Topology.Algebra.InfiniteSum.Real #align_import analysis.specific_limits.basic from "leanprover-community/mathlib"@"57ac39bd365c2f80589a700f9fbb664d3a1a30c2" noncomputable section open scoped Classical open Set Function Filter Finset Metric open scoped Classical open Topology Nat uniformity NNReal ENNReal variable {Ξ± : Type*} {Ξ² : Type*} {ΞΉ : Type*} theorem tendsto_inverse_atTop_nhds_zero_nat : Tendsto (fun n : β„• ↦ (n : ℝ)⁻¹) atTop (𝓝 0) := tendsto_inv_atTop_zero.comp tendsto_natCast_atTop_atTop #align tendsto_inverse_at_top_nhds_0_nat tendsto_inverse_atTop_nhds_zero_nat @[deprecated (since := "2024-01-31")] alias tendsto_inverse_atTop_nhds_0_nat := tendsto_inverse_atTop_nhds_zero_nat
Mathlib/Analysis/SpecificLimits/Basic.lean
39
41
theorem tendsto_const_div_atTop_nhds_zero_nat (C : ℝ) : Tendsto (fun n : β„• ↦ C / n) atTop (𝓝 0) := by
simpa only [mul_zero] using tendsto_const_nhds.mul tendsto_inverse_atTop_nhds_zero_nat
1,747
import Mathlib.Algebra.GeomSum import Mathlib.Order.Filter.Archimedean import Mathlib.Order.Iterate import Mathlib.Topology.Algebra.Algebra import Mathlib.Topology.Algebra.InfiniteSum.Real #align_import analysis.specific_limits.basic from "leanprover-community/mathlib"@"57ac39bd365c2f80589a700f9fbb664d3a1a30c2" noncomputable section open scoped Classical open Set Function Filter Finset Metric open scoped Classical open Topology Nat uniformity NNReal ENNReal variable {Ξ± : Type*} {Ξ² : Type*} {ΞΉ : Type*} theorem tendsto_inverse_atTop_nhds_zero_nat : Tendsto (fun n : β„• ↦ (n : ℝ)⁻¹) atTop (𝓝 0) := tendsto_inv_atTop_zero.comp tendsto_natCast_atTop_atTop #align tendsto_inverse_at_top_nhds_0_nat tendsto_inverse_atTop_nhds_zero_nat @[deprecated (since := "2024-01-31")] alias tendsto_inverse_atTop_nhds_0_nat := tendsto_inverse_atTop_nhds_zero_nat theorem tendsto_const_div_atTop_nhds_zero_nat (C : ℝ) : Tendsto (fun n : β„• ↦ C / n) atTop (𝓝 0) := by simpa only [mul_zero] using tendsto_const_nhds.mul tendsto_inverse_atTop_nhds_zero_nat #align tendsto_const_div_at_top_nhds_0_nat tendsto_const_div_atTop_nhds_zero_nat @[deprecated (since := "2024-01-31")] alias tendsto_const_div_atTop_nhds_0_nat := tendsto_const_div_atTop_nhds_zero_nat theorem tendsto_one_div_atTop_nhds_zero_nat : Tendsto (fun n : β„• ↦ 1/(n : ℝ)) atTop (𝓝 0) := tendsto_const_div_atTop_nhds_zero_nat 1 @[deprecated (since := "2024-01-31")] alias tendsto_one_div_atTop_nhds_0_nat := tendsto_one_div_atTop_nhds_zero_nat
Mathlib/Analysis/SpecificLimits/Basic.lean
51
54
theorem NNReal.tendsto_inverse_atTop_nhds_zero_nat : Tendsto (fun n : β„• ↦ (n : ℝβ‰₯0)⁻¹) atTop (𝓝 0) := by
rw [← NNReal.tendsto_coe] exact _root_.tendsto_inverse_atTop_nhds_zero_nat
1,747
import Mathlib.Algebra.GeomSum import Mathlib.Order.Filter.Archimedean import Mathlib.Order.Iterate import Mathlib.Topology.Algebra.Algebra import Mathlib.Topology.Algebra.InfiniteSum.Real #align_import analysis.specific_limits.basic from "leanprover-community/mathlib"@"57ac39bd365c2f80589a700f9fbb664d3a1a30c2" noncomputable section open scoped Classical open Set Function Filter Finset Metric open scoped Classical open Topology Nat uniformity NNReal ENNReal variable {Ξ± : Type*} {Ξ² : Type*} {ΞΉ : Type*} theorem tendsto_inverse_atTop_nhds_zero_nat : Tendsto (fun n : β„• ↦ (n : ℝ)⁻¹) atTop (𝓝 0) := tendsto_inv_atTop_zero.comp tendsto_natCast_atTop_atTop #align tendsto_inverse_at_top_nhds_0_nat tendsto_inverse_atTop_nhds_zero_nat @[deprecated (since := "2024-01-31")] alias tendsto_inverse_atTop_nhds_0_nat := tendsto_inverse_atTop_nhds_zero_nat theorem tendsto_const_div_atTop_nhds_zero_nat (C : ℝ) : Tendsto (fun n : β„• ↦ C / n) atTop (𝓝 0) := by simpa only [mul_zero] using tendsto_const_nhds.mul tendsto_inverse_atTop_nhds_zero_nat #align tendsto_const_div_at_top_nhds_0_nat tendsto_const_div_atTop_nhds_zero_nat @[deprecated (since := "2024-01-31")] alias tendsto_const_div_atTop_nhds_0_nat := tendsto_const_div_atTop_nhds_zero_nat theorem tendsto_one_div_atTop_nhds_zero_nat : Tendsto (fun n : β„• ↦ 1/(n : ℝ)) atTop (𝓝 0) := tendsto_const_div_atTop_nhds_zero_nat 1 @[deprecated (since := "2024-01-31")] alias tendsto_one_div_atTop_nhds_0_nat := tendsto_one_div_atTop_nhds_zero_nat theorem NNReal.tendsto_inverse_atTop_nhds_zero_nat : Tendsto (fun n : β„• ↦ (n : ℝβ‰₯0)⁻¹) atTop (𝓝 0) := by rw [← NNReal.tendsto_coe] exact _root_.tendsto_inverse_atTop_nhds_zero_nat #align nnreal.tendsto_inverse_at_top_nhds_0_nat NNReal.tendsto_inverse_atTop_nhds_zero_nat @[deprecated (since := "2024-01-31")] alias NNReal.tendsto_inverse_atTop_nhds_0_nat := NNReal.tendsto_inverse_atTop_nhds_zero_nat
Mathlib/Analysis/SpecificLimits/Basic.lean
59
61
theorem NNReal.tendsto_const_div_atTop_nhds_zero_nat (C : ℝβ‰₯0) : Tendsto (fun n : β„• ↦ C / n) atTop (𝓝 0) := by
simpa using tendsto_const_nhds.mul NNReal.tendsto_inverse_atTop_nhds_zero_nat
1,747
import Mathlib.Algebra.GeomSum import Mathlib.Order.Filter.Archimedean import Mathlib.Order.Iterate import Mathlib.Topology.Algebra.Algebra import Mathlib.Topology.Algebra.InfiniteSum.Real #align_import analysis.specific_limits.basic from "leanprover-community/mathlib"@"57ac39bd365c2f80589a700f9fbb664d3a1a30c2" noncomputable section open scoped Classical open Set Function Filter Finset Metric open scoped Classical open Topology Nat uniformity NNReal ENNReal variable {Ξ± : Type*} {Ξ² : Type*} {ΞΉ : Type*} theorem tendsto_inverse_atTop_nhds_zero_nat : Tendsto (fun n : β„• ↦ (n : ℝ)⁻¹) atTop (𝓝 0) := tendsto_inv_atTop_zero.comp tendsto_natCast_atTop_atTop #align tendsto_inverse_at_top_nhds_0_nat tendsto_inverse_atTop_nhds_zero_nat @[deprecated (since := "2024-01-31")] alias tendsto_inverse_atTop_nhds_0_nat := tendsto_inverse_atTop_nhds_zero_nat theorem tendsto_const_div_atTop_nhds_zero_nat (C : ℝ) : Tendsto (fun n : β„• ↦ C / n) atTop (𝓝 0) := by simpa only [mul_zero] using tendsto_const_nhds.mul tendsto_inverse_atTop_nhds_zero_nat #align tendsto_const_div_at_top_nhds_0_nat tendsto_const_div_atTop_nhds_zero_nat @[deprecated (since := "2024-01-31")] alias tendsto_const_div_atTop_nhds_0_nat := tendsto_const_div_atTop_nhds_zero_nat theorem tendsto_one_div_atTop_nhds_zero_nat : Tendsto (fun n : β„• ↦ 1/(n : ℝ)) atTop (𝓝 0) := tendsto_const_div_atTop_nhds_zero_nat 1 @[deprecated (since := "2024-01-31")] alias tendsto_one_div_atTop_nhds_0_nat := tendsto_one_div_atTop_nhds_zero_nat theorem NNReal.tendsto_inverse_atTop_nhds_zero_nat : Tendsto (fun n : β„• ↦ (n : ℝβ‰₯0)⁻¹) atTop (𝓝 0) := by rw [← NNReal.tendsto_coe] exact _root_.tendsto_inverse_atTop_nhds_zero_nat #align nnreal.tendsto_inverse_at_top_nhds_0_nat NNReal.tendsto_inverse_atTop_nhds_zero_nat @[deprecated (since := "2024-01-31")] alias NNReal.tendsto_inverse_atTop_nhds_0_nat := NNReal.tendsto_inverse_atTop_nhds_zero_nat theorem NNReal.tendsto_const_div_atTop_nhds_zero_nat (C : ℝβ‰₯0) : Tendsto (fun n : β„• ↦ C / n) atTop (𝓝 0) := by simpa using tendsto_const_nhds.mul NNReal.tendsto_inverse_atTop_nhds_zero_nat #align nnreal.tendsto_const_div_at_top_nhds_0_nat NNReal.tendsto_const_div_atTop_nhds_zero_nat @[deprecated (since := "2024-01-31")] alias NNReal.tendsto_const_div_atTop_nhds_0_nat := NNReal.tendsto_const_div_atTop_nhds_zero_nat theorem tendsto_one_div_add_atTop_nhds_zero_nat : Tendsto (fun n : β„• ↦ 1 / ((n : ℝ) + 1)) atTop (𝓝 0) := suffices Tendsto (fun n : β„• ↦ 1 / (↑(n + 1) : ℝ)) atTop (𝓝 0) by simpa (tendsto_add_atTop_iff_nat 1).2 (_root_.tendsto_const_div_atTop_nhds_zero_nat 1) #align tendsto_one_div_add_at_top_nhds_0_nat tendsto_one_div_add_atTop_nhds_zero_nat @[deprecated (since := "2024-01-31")] alias tendsto_one_div_add_atTop_nhds_0_nat := tendsto_one_div_add_atTop_nhds_zero_nat
Mathlib/Analysis/SpecificLimits/Basic.lean
74
79
theorem NNReal.tendsto_algebraMap_inverse_atTop_nhds_zero_nat (π•œ : Type*) [Semiring π•œ] [Algebra ℝβ‰₯0 π•œ] [TopologicalSpace π•œ] [ContinuousSMul ℝβ‰₯0 π•œ] : Tendsto (algebraMap ℝβ‰₯0 π•œ ∘ fun n : β„• ↦ (n : ℝβ‰₯0)⁻¹) atTop (𝓝 0) := by
convert (continuous_algebraMap ℝβ‰₯0 π•œ).continuousAt.tendsto.comp tendsto_inverse_atTop_nhds_zero_nat rw [map_zero]
1,747
import Mathlib.Algebra.GeomSum import Mathlib.Order.Filter.Archimedean import Mathlib.Order.Iterate import Mathlib.Topology.Algebra.Algebra import Mathlib.Topology.Algebra.InfiniteSum.Real #align_import analysis.specific_limits.basic from "leanprover-community/mathlib"@"57ac39bd365c2f80589a700f9fbb664d3a1a30c2" noncomputable section open scoped Classical open Set Function Filter Finset Metric open scoped Classical open Topology Nat uniformity NNReal ENNReal variable {Ξ± : Type*} {Ξ² : Type*} {ΞΉ : Type*} theorem tendsto_inverse_atTop_nhds_zero_nat : Tendsto (fun n : β„• ↦ (n : ℝ)⁻¹) atTop (𝓝 0) := tendsto_inv_atTop_zero.comp tendsto_natCast_atTop_atTop #align tendsto_inverse_at_top_nhds_0_nat tendsto_inverse_atTop_nhds_zero_nat @[deprecated (since := "2024-01-31")] alias tendsto_inverse_atTop_nhds_0_nat := tendsto_inverse_atTop_nhds_zero_nat theorem tendsto_const_div_atTop_nhds_zero_nat (C : ℝ) : Tendsto (fun n : β„• ↦ C / n) atTop (𝓝 0) := by simpa only [mul_zero] using tendsto_const_nhds.mul tendsto_inverse_atTop_nhds_zero_nat #align tendsto_const_div_at_top_nhds_0_nat tendsto_const_div_atTop_nhds_zero_nat @[deprecated (since := "2024-01-31")] alias tendsto_const_div_atTop_nhds_0_nat := tendsto_const_div_atTop_nhds_zero_nat theorem tendsto_one_div_atTop_nhds_zero_nat : Tendsto (fun n : β„• ↦ 1/(n : ℝ)) atTop (𝓝 0) := tendsto_const_div_atTop_nhds_zero_nat 1 @[deprecated (since := "2024-01-31")] alias tendsto_one_div_atTop_nhds_0_nat := tendsto_one_div_atTop_nhds_zero_nat theorem NNReal.tendsto_inverse_atTop_nhds_zero_nat : Tendsto (fun n : β„• ↦ (n : ℝβ‰₯0)⁻¹) atTop (𝓝 0) := by rw [← NNReal.tendsto_coe] exact _root_.tendsto_inverse_atTop_nhds_zero_nat #align nnreal.tendsto_inverse_at_top_nhds_0_nat NNReal.tendsto_inverse_atTop_nhds_zero_nat @[deprecated (since := "2024-01-31")] alias NNReal.tendsto_inverse_atTop_nhds_0_nat := NNReal.tendsto_inverse_atTop_nhds_zero_nat theorem NNReal.tendsto_const_div_atTop_nhds_zero_nat (C : ℝβ‰₯0) : Tendsto (fun n : β„• ↦ C / n) atTop (𝓝 0) := by simpa using tendsto_const_nhds.mul NNReal.tendsto_inverse_atTop_nhds_zero_nat #align nnreal.tendsto_const_div_at_top_nhds_0_nat NNReal.tendsto_const_div_atTop_nhds_zero_nat @[deprecated (since := "2024-01-31")] alias NNReal.tendsto_const_div_atTop_nhds_0_nat := NNReal.tendsto_const_div_atTop_nhds_zero_nat theorem tendsto_one_div_add_atTop_nhds_zero_nat : Tendsto (fun n : β„• ↦ 1 / ((n : ℝ) + 1)) atTop (𝓝 0) := suffices Tendsto (fun n : β„• ↦ 1 / (↑(n + 1) : ℝ)) atTop (𝓝 0) by simpa (tendsto_add_atTop_iff_nat 1).2 (_root_.tendsto_const_div_atTop_nhds_zero_nat 1) #align tendsto_one_div_add_at_top_nhds_0_nat tendsto_one_div_add_atTop_nhds_zero_nat @[deprecated (since := "2024-01-31")] alias tendsto_one_div_add_atTop_nhds_0_nat := tendsto_one_div_add_atTop_nhds_zero_nat theorem NNReal.tendsto_algebraMap_inverse_atTop_nhds_zero_nat (π•œ : Type*) [Semiring π•œ] [Algebra ℝβ‰₯0 π•œ] [TopologicalSpace π•œ] [ContinuousSMul ℝβ‰₯0 π•œ] : Tendsto (algebraMap ℝβ‰₯0 π•œ ∘ fun n : β„• ↦ (n : ℝβ‰₯0)⁻¹) atTop (𝓝 0) := by convert (continuous_algebraMap ℝβ‰₯0 π•œ).continuousAt.tendsto.comp tendsto_inverse_atTop_nhds_zero_nat rw [map_zero] @[deprecated (since := "2024-01-31")] alias NNReal.tendsto_algebraMap_inverse_atTop_nhds_0_nat := NNReal.tendsto_algebraMap_inverse_atTop_nhds_zero_nat theorem tendsto_algebraMap_inverse_atTop_nhds_zero_nat (π•œ : Type*) [Semiring π•œ] [Algebra ℝ π•œ] [TopologicalSpace π•œ] [ContinuousSMul ℝ π•œ] : Tendsto (algebraMap ℝ π•œ ∘ fun n : β„• ↦ (n : ℝ)⁻¹) atTop (𝓝 0) := NNReal.tendsto_algebraMap_inverse_atTop_nhds_zero_nat π•œ @[deprecated (since := "2024-01-31")] alias tendsto_algebraMap_inverse_atTop_nhds_0_nat := _root_.tendsto_algebraMap_inverse_atTop_nhds_zero_nat
Mathlib/Analysis/SpecificLimits/Basic.lean
97
113
theorem tendsto_natCast_div_add_atTop {π•œ : Type*} [DivisionRing π•œ] [TopologicalSpace π•œ] [CharZero π•œ] [Algebra ℝ π•œ] [ContinuousSMul ℝ π•œ] [TopologicalDivisionRing π•œ] (x : π•œ) : Tendsto (fun n : β„• ↦ (n : π•œ) / (n + x)) atTop (𝓝 1) := by
convert Tendsto.congr' ((eventually_ne_atTop 0).mp (eventually_of_forall fun n hn ↦ _)) _ Β· exact fun n : β„• ↦ 1 / (1 + x / n) Β· field_simp [Nat.cast_ne_zero.mpr hn] Β· have : 𝓝 (1 : π•œ) = 𝓝 (1 / (1 + x * (0 : π•œ))) := by rw [mul_zero, add_zero, div_one] rw [this] refine tendsto_const_nhds.div (tendsto_const_nhds.add ?_) (by simp) simp_rw [div_eq_mul_inv] refine tendsto_const_nhds.mul ?_ have := ((continuous_algebraMap ℝ π•œ).tendsto _).comp tendsto_inverse_atTop_nhds_zero_nat rw [map_zero, Filter.tendsto_atTop'] at this refine Iff.mpr tendsto_atTop' ?_ intros simp_all only [comp_apply, map_invβ‚€, map_natCast]
1,747
import Mathlib.Analysis.SpecificLimits.Basic import Mathlib.Analysis.SpecialFunctions.Pow.Real #align_import analysis.specific_limits.floor_pow from "leanprover-community/mathlib"@"0b9eaaa7686280fad8cce467f5c3c57ee6ce77f8" open Filter Finset open Topology
Mathlib/Analysis/SpecificLimits/FloorPow.lean
28
182
theorem tendsto_div_of_monotone_of_exists_subseq_tendsto_div (u : β„• β†’ ℝ) (l : ℝ) (hmono : Monotone u) (hlim : βˆ€ a : ℝ, 1 < a β†’ βˆƒ c : β„• β†’ β„•, (βˆ€αΆ  n in atTop, (c (n + 1) : ℝ) ≀ a * c n) ∧ Tendsto c atTop atTop ∧ Tendsto (fun n => u (c n) / c n) atTop (𝓝 l)) : Tendsto (fun n => u n / n) atTop (𝓝 l) := by
/- To check the result up to some `Ξ΅ > 0`, we use a sequence `c` for which the ratio `c (N+1) / c N` is bounded by `1 + Ξ΅`. Sandwiching a given `n` between two consecutive values of `c`, say `c N` and `c (N+1)`, one can then bound `u n / n` from above by `u (c N) / c (N - 1)` and from below by `u (c (N - 1)) / c N` (using that `u` is monotone), which are both comparable to the limit `l` up to `1 + Ξ΅`. We give a version of this proof by clearing out denominators first, to avoid discussing the sign of different quantities. -/ have lnonneg : 0 ≀ l := by rcases hlim 2 one_lt_two with ⟨c, _, ctop, clim⟩ have : Tendsto (fun n => u 0 / c n) atTop (𝓝 0) := tendsto_const_nhds.div_atTop (tendsto_natCast_atTop_iff.2 ctop) apply le_of_tendsto_of_tendsto' this clim fun n => ?_ gcongr exact hmono (zero_le _) have A : βˆ€ Ξ΅ : ℝ, 0 < Ξ΅ β†’ βˆ€αΆ  n in atTop, u n - n * l ≀ Ξ΅ * (1 + Ξ΅ + l) * n := by intro Ξ΅ Ξ΅pos rcases hlim (1 + Ξ΅) ((lt_add_iff_pos_right _).2 Ξ΅pos) with ⟨c, cgrowth, ctop, clim⟩ have L : βˆ€αΆ  n in atTop, u (c n) - c n * l ≀ Ξ΅ * c n := by rw [← tendsto_sub_nhds_zero_iff, ← Asymptotics.isLittleO_one_iff ℝ, Asymptotics.isLittleO_iff] at clim filter_upwards [clim Ξ΅pos, ctop (Ioi_mem_atTop 0)] with n hn cnpos' have cnpos : 0 < c n := cnpos' calc u (c n) - c n * l = (u (c n) / c n - l) * c n := by simp only [cnpos.ne', Ne, Nat.cast_eq_zero, not_false_iff, field_simps] _ ≀ Ξ΅ * c n := by gcongr refine (le_abs_self _).trans ?_ simpa using hn obtain ⟨a, ha⟩ : βˆƒ a : β„•, βˆ€ b : β„•, a ≀ b β†’ (c (b + 1) : ℝ) ≀ (1 + Ξ΅) * c b ∧ u (c b) - c b * l ≀ Ξ΅ * c b := eventually_atTop.1 (cgrowth.and L) let M := ((Finset.range (a + 1)).image fun i => c i).max' (by simp) filter_upwards [Ici_mem_atTop M] with n hn have exN : βˆƒ N, n < c N := by rcases (tendsto_atTop.1 ctop (n + 1)).exists with ⟨N, hN⟩ exact ⟨N, by linarith only [hN]⟩ let N := Nat.find exN have ncN : n < c N := Nat.find_spec exN have aN : a + 1 ≀ N := by by_contra! h have cNM : c N ≀ M := by apply le_max' apply mem_image_of_mem exact mem_range.2 h exact lt_irrefl _ ((cNM.trans hn).trans_lt ncN) have Npos : 0 < N := lt_of_lt_of_le Nat.succ_pos' aN have cNn : c (N - 1) ≀ n := by have : N - 1 < N := Nat.pred_lt Npos.ne' simpa only [not_lt] using Nat.find_min exN this have IcN : (c N : ℝ) ≀ (1 + Ξ΅) * c (N - 1) := by have A : a ≀ N - 1 := by apply @Nat.le_of_add_le_add_right a 1 (N - 1) rw [Nat.sub_add_cancel Npos] exact aN have B : N - 1 + 1 = N := Nat.succ_pred_eq_of_pos Npos have := (ha _ A).1 rwa [B] at this calc u n - n * l ≀ u (c N) - c (N - 1) * l := by gcongr; exact hmono ncN.le _ = u (c N) - c N * l + (c N - c (N - 1)) * l := by ring _ ≀ Ξ΅ * c N + Ξ΅ * c (N - 1) * l := by gcongr Β· exact (ha N (a.le_succ.trans aN)).2 Β· linarith only [IcN] _ ≀ Ξ΅ * ((1 + Ξ΅) * c (N - 1)) + Ξ΅ * c (N - 1) * l := by gcongr _ = Ξ΅ * (1 + Ξ΅ + l) * c (N - 1) := by ring _ ≀ Ξ΅ * (1 + Ξ΅ + l) * n := by gcongr have B : βˆ€ Ξ΅ : ℝ, 0 < Ξ΅ β†’ βˆ€αΆ  n : β„• in atTop, (n : ℝ) * l - u n ≀ Ξ΅ * (1 + l) * n := by intro Ξ΅ Ξ΅pos rcases hlim (1 + Ξ΅) ((lt_add_iff_pos_right _).2 Ξ΅pos) with ⟨c, cgrowth, ctop, clim⟩ have L : βˆ€αΆ  n : β„• in atTop, (c n : ℝ) * l - u (c n) ≀ Ξ΅ * c n := by rw [← tendsto_sub_nhds_zero_iff, ← Asymptotics.isLittleO_one_iff ℝ, Asymptotics.isLittleO_iff] at clim filter_upwards [clim Ξ΅pos, ctop (Ioi_mem_atTop 0)] with n hn cnpos' have cnpos : 0 < c n := cnpos' calc (c n : ℝ) * l - u (c n) = -(u (c n) / c n - l) * c n := by simp only [cnpos.ne', Ne, Nat.cast_eq_zero, not_false_iff, neg_sub, field_simps] _ ≀ Ξ΅ * c n := by gcongr refine le_trans (neg_le_abs _) ?_ simpa using hn obtain ⟨a, ha⟩ : βˆƒ a : β„•, βˆ€ b : β„•, a ≀ b β†’ (c (b + 1) : ℝ) ≀ (1 + Ξ΅) * c b ∧ (c b : ℝ) * l - u (c b) ≀ Ξ΅ * c b := eventually_atTop.1 (cgrowth.and L) let M := ((Finset.range (a + 1)).image fun i => c i).max' (by simp) filter_upwards [Ici_mem_atTop M] with n hn have exN : βˆƒ N, n < c N := by rcases (tendsto_atTop.1 ctop (n + 1)).exists with ⟨N, hN⟩ exact ⟨N, by linarith only [hN]⟩ let N := Nat.find exN have ncN : n < c N := Nat.find_spec exN have aN : a + 1 ≀ N := by by_contra! h have cNM : c N ≀ M := by apply le_max' apply mem_image_of_mem exact mem_range.2 h exact lt_irrefl _ ((cNM.trans hn).trans_lt ncN) have Npos : 0 < N := lt_of_lt_of_le Nat.succ_pos' aN have aN' : a ≀ N - 1 := by apply @Nat.le_of_add_le_add_right a 1 (N - 1) rw [Nat.sub_add_cancel Npos] exact aN have cNn : c (N - 1) ≀ n := by have : N - 1 < N := Nat.pred_lt Npos.ne' simpa only [not_lt] using Nat.find_min exN this calc (n : ℝ) * l - u n ≀ c N * l - u (c (N - 1)) := by gcongr exact hmono cNn _ ≀ (1 + Ξ΅) * c (N - 1) * l - u (c (N - 1)) := by gcongr have B : N - 1 + 1 = N := Nat.succ_pred_eq_of_pos Npos simpa [B] using (ha _ aN').1 _ = c (N - 1) * l - u (c (N - 1)) + Ξ΅ * c (N - 1) * l := by ring _ ≀ Ξ΅ * c (N - 1) + Ξ΅ * c (N - 1) * l := add_le_add (ha _ aN').2 le_rfl _ = Ξ΅ * (1 + l) * c (N - 1) := by ring _ ≀ Ξ΅ * (1 + l) * n := by gcongr refine tendsto_order.2 ⟨fun d hd => ?_, fun d hd => ?_⟩ Β· obtain ⟨Ρ, hΞ΅, Ξ΅pos⟩ : βˆƒ Ξ΅ : ℝ, d + Ξ΅ * (1 + l) < l ∧ 0 < Ξ΅ := by have L : Tendsto (fun Ξ΅ => d + Ξ΅ * (1 + l)) (𝓝[>] 0) (𝓝 (d + 0 * (1 + l))) := by apply Tendsto.mono_left _ nhdsWithin_le_nhds exact tendsto_const_nhds.add (tendsto_id.mul tendsto_const_nhds) simp only [zero_mul, add_zero] at L exact (((tendsto_order.1 L).2 l hd).and self_mem_nhdsWithin).exists filter_upwards [B Ξ΅ Ξ΅pos, Ioi_mem_atTop 0] with n hn npos simp_rw [div_eq_inv_mul] calc d < (n : ℝ)⁻¹ * n * (l - Ξ΅ * (1 + l)) := by rw [inv_mul_cancel, one_mul] Β· linarith only [hΞ΅] Β· exact Nat.cast_ne_zero.2 (ne_of_gt npos) _ = (n : ℝ)⁻¹ * (n * l - Ξ΅ * (1 + l) * n) := by ring _ ≀ (n : ℝ)⁻¹ * u n := by gcongr; linarith only [hn] Β· obtain ⟨Ρ, hΞ΅, Ξ΅pos⟩ : βˆƒ Ξ΅ : ℝ, l + Ξ΅ * (1 + Ξ΅ + l) < d ∧ 0 < Ξ΅ := by have L : Tendsto (fun Ξ΅ => l + Ξ΅ * (1 + Ξ΅ + l)) (𝓝[>] 0) (𝓝 (l + 0 * (1 + 0 + l))) := by apply Tendsto.mono_left _ nhdsWithin_le_nhds exact tendsto_const_nhds.add (tendsto_id.mul ((tendsto_const_nhds.add tendsto_id).add tendsto_const_nhds)) simp only [zero_mul, add_zero] at L exact (((tendsto_order.1 L).2 d hd).and self_mem_nhdsWithin).exists filter_upwards [A Ξ΅ Ξ΅pos, Ioi_mem_atTop 0] with n hn (npos : 0 < n) calc u n / n ≀ (n * l + Ξ΅ * (1 + Ξ΅ + l) * n) / n := by gcongr; linarith only [hn] _ = (l + Ξ΅ * (1 + Ξ΅ + l)) := by field_simp; ring _ < d := hΞ΅
1,748
import Mathlib.Analysis.SpecificLimits.Basic import Mathlib.Analysis.RCLike.Basic open Set Algebra Filter open scoped Topology variable (π•œ : Type*) [RCLike π•œ]
Mathlib/Analysis/SpecificLimits/RCLike.lean
19
22
theorem RCLike.tendsto_inverse_atTop_nhds_zero_nat : Tendsto (fun n : β„• => (n : π•œ)⁻¹) atTop (𝓝 0) := by
convert tendsto_algebraMap_inverse_atTop_nhds_zero_nat π•œ simp
1,749
import Mathlib.Algebra.GroupPower.IterateHom import Mathlib.Analysis.SpecificLimits.Basic import Mathlib.Order.Iterate import Mathlib.Order.SemiconjSup import Mathlib.Tactic.Monotonicity import Mathlib.Topology.Order.MonotoneContinuity #align_import dynamics.circle.rotation_number.translation_number from "leanprover-community/mathlib"@"f2ce6086713c78a7f880485f7917ea547a215982" open scoped Classical open Filter Set Int Topology open Function hiding Commute structure CircleDeg1Lift extends ℝ β†’o ℝ : Type where map_add_one' : βˆ€ x, toFun (x + 1) = toFun x + 1 #align circle_deg1_lift CircleDeg1Lift namespace CircleDeg1Lift instance : FunLike CircleDeg1Lift ℝ ℝ where coe f := f.toFun coe_injective' | ⟨⟨_, _⟩, _⟩, ⟨⟨_, _⟩, _⟩, rfl => rfl instance : OrderHomClass CircleDeg1Lift ℝ ℝ where map_rel f _ _ h := f.monotone' h @[simp] theorem coe_mk (f h) : ⇑(mk f h) = f := rfl #align circle_deg1_lift.coe_mk CircleDeg1Lift.coe_mk variable (f g : CircleDeg1Lift) @[simp] theorem coe_toOrderHom : ⇑f.toOrderHom = f := rfl protected theorem monotone : Monotone f := f.monotone' #align circle_deg1_lift.monotone CircleDeg1Lift.monotone @[mono] theorem mono {x y} (h : x ≀ y) : f x ≀ f y := f.monotone h #align circle_deg1_lift.mono CircleDeg1Lift.mono theorem strictMono_iff_injective : StrictMono f ↔ Injective f := f.monotone.strictMono_iff_injective #align circle_deg1_lift.strict_mono_iff_injective CircleDeg1Lift.strictMono_iff_injective @[simp] theorem map_add_one : βˆ€ x, f (x + 1) = f x + 1 := f.map_add_one' #align circle_deg1_lift.map_add_one CircleDeg1Lift.map_add_one @[simp]
Mathlib/Dynamics/Circle/RotationNumber/TranslationNumber.lean
167
167
theorem map_one_add (x : ℝ) : f (1 + x) = 1 + f x := by
rw [add_comm, map_add_one, add_comm 1]
1,750
import Mathlib.Algebra.GroupPower.IterateHom import Mathlib.Analysis.SpecificLimits.Basic import Mathlib.Order.Iterate import Mathlib.Order.SemiconjSup import Mathlib.Tactic.Monotonicity import Mathlib.Topology.Order.MonotoneContinuity #align_import dynamics.circle.rotation_number.translation_number from "leanprover-community/mathlib"@"f2ce6086713c78a7f880485f7917ea547a215982" open scoped Classical open Filter Set Int Topology open Function hiding Commute structure CircleDeg1Lift extends ℝ β†’o ℝ : Type where map_add_one' : βˆ€ x, toFun (x + 1) = toFun x + 1 #align circle_deg1_lift CircleDeg1Lift namespace CircleDeg1Lift instance : FunLike CircleDeg1Lift ℝ ℝ where coe f := f.toFun coe_injective' | ⟨⟨_, _⟩, _⟩, ⟨⟨_, _⟩, _⟩, rfl => rfl instance : OrderHomClass CircleDeg1Lift ℝ ℝ where map_rel f _ _ h := f.monotone' h @[simp] theorem coe_mk (f h) : ⇑(mk f h) = f := rfl #align circle_deg1_lift.coe_mk CircleDeg1Lift.coe_mk variable (f g : CircleDeg1Lift) @[simp] theorem coe_toOrderHom : ⇑f.toOrderHom = f := rfl protected theorem monotone : Monotone f := f.monotone' #align circle_deg1_lift.monotone CircleDeg1Lift.monotone @[mono] theorem mono {x y} (h : x ≀ y) : f x ≀ f y := f.monotone h #align circle_deg1_lift.mono CircleDeg1Lift.mono theorem strictMono_iff_injective : StrictMono f ↔ Injective f := f.monotone.strictMono_iff_injective #align circle_deg1_lift.strict_mono_iff_injective CircleDeg1Lift.strictMono_iff_injective @[simp] theorem map_add_one : βˆ€ x, f (x + 1) = f x + 1 := f.map_add_one' #align circle_deg1_lift.map_add_one CircleDeg1Lift.map_add_one @[simp] theorem map_one_add (x : ℝ) : f (1 + x) = 1 + f x := by rw [add_comm, map_add_one, add_comm 1] #align circle_deg1_lift.map_one_add CircleDeg1Lift.map_one_add #noalign circle_deg1_lift.coe_inj -- Use `DFunLike.coe_inj` @[ext] theorem ext ⦃f g : CircleDeg1Lift⦄ (h : βˆ€ x, f x = g x) : f = g := DFunLike.ext f g h #align circle_deg1_lift.ext CircleDeg1Lift.ext theorem ext_iff {f g : CircleDeg1Lift} : f = g ↔ βˆ€ x, f x = g x := DFunLike.ext_iff #align circle_deg1_lift.ext_iff CircleDeg1Lift.ext_iff instance : Monoid CircleDeg1Lift where mul f g := { toOrderHom := f.1.comp g.1 map_add_one' := fun x => by simp [map_add_one] } one := ⟨.id, fun _ => rfl⟩ mul_one f := rfl one_mul f := rfl mul_assoc f₁ fβ‚‚ f₃ := DFunLike.coe_injective rfl instance : Inhabited CircleDeg1Lift := ⟨1⟩ @[simp] theorem coe_mul : ⇑(f * g) = f ∘ g := rfl #align circle_deg1_lift.coe_mul CircleDeg1Lift.coe_mul theorem mul_apply (x) : (f * g) x = f (g x) := rfl #align circle_deg1_lift.mul_apply CircleDeg1Lift.mul_apply @[simp] theorem coe_one : ⇑(1 : CircleDeg1Lift) = id := rfl #align circle_deg1_lift.coe_one CircleDeg1Lift.coe_one instance unitsHasCoeToFun : CoeFun CircleDeg1LiftΛ£ fun _ => ℝ β†’ ℝ := ⟨fun f => ⇑(f : CircleDeg1Lift)⟩ #align circle_deg1_lift.units_has_coe_to_fun CircleDeg1Lift.unitsHasCoeToFun #noalign circle_deg1_lift.units_coe -- now LHS = RHS @[simp]
Mathlib/Dynamics/Circle/RotationNumber/TranslationNumber.lean
213
214
theorem units_inv_apply_apply (f : CircleDeg1LiftΛ£) (x : ℝ) : (f⁻¹ : CircleDeg1LiftΛ£) (f x) = x := by
simp only [← mul_apply, f.inv_mul, coe_one, id]
1,750
import Mathlib.Algebra.GroupPower.IterateHom import Mathlib.Analysis.SpecificLimits.Basic import Mathlib.Order.Iterate import Mathlib.Order.SemiconjSup import Mathlib.Tactic.Monotonicity import Mathlib.Topology.Order.MonotoneContinuity #align_import dynamics.circle.rotation_number.translation_number from "leanprover-community/mathlib"@"f2ce6086713c78a7f880485f7917ea547a215982" open scoped Classical open Filter Set Int Topology open Function hiding Commute structure CircleDeg1Lift extends ℝ β†’o ℝ : Type where map_add_one' : βˆ€ x, toFun (x + 1) = toFun x + 1 #align circle_deg1_lift CircleDeg1Lift namespace CircleDeg1Lift instance : FunLike CircleDeg1Lift ℝ ℝ where coe f := f.toFun coe_injective' | ⟨⟨_, _⟩, _⟩, ⟨⟨_, _⟩, _⟩, rfl => rfl instance : OrderHomClass CircleDeg1Lift ℝ ℝ where map_rel f _ _ h := f.monotone' h @[simp] theorem coe_mk (f h) : ⇑(mk f h) = f := rfl #align circle_deg1_lift.coe_mk CircleDeg1Lift.coe_mk variable (f g : CircleDeg1Lift) @[simp] theorem coe_toOrderHom : ⇑f.toOrderHom = f := rfl protected theorem monotone : Monotone f := f.monotone' #align circle_deg1_lift.monotone CircleDeg1Lift.monotone @[mono] theorem mono {x y} (h : x ≀ y) : f x ≀ f y := f.monotone h #align circle_deg1_lift.mono CircleDeg1Lift.mono theorem strictMono_iff_injective : StrictMono f ↔ Injective f := f.monotone.strictMono_iff_injective #align circle_deg1_lift.strict_mono_iff_injective CircleDeg1Lift.strictMono_iff_injective @[simp] theorem map_add_one : βˆ€ x, f (x + 1) = f x + 1 := f.map_add_one' #align circle_deg1_lift.map_add_one CircleDeg1Lift.map_add_one @[simp] theorem map_one_add (x : ℝ) : f (1 + x) = 1 + f x := by rw [add_comm, map_add_one, add_comm 1] #align circle_deg1_lift.map_one_add CircleDeg1Lift.map_one_add #noalign circle_deg1_lift.coe_inj -- Use `DFunLike.coe_inj` @[ext] theorem ext ⦃f g : CircleDeg1Lift⦄ (h : βˆ€ x, f x = g x) : f = g := DFunLike.ext f g h #align circle_deg1_lift.ext CircleDeg1Lift.ext theorem ext_iff {f g : CircleDeg1Lift} : f = g ↔ βˆ€ x, f x = g x := DFunLike.ext_iff #align circle_deg1_lift.ext_iff CircleDeg1Lift.ext_iff instance : Monoid CircleDeg1Lift where mul f g := { toOrderHom := f.1.comp g.1 map_add_one' := fun x => by simp [map_add_one] } one := ⟨.id, fun _ => rfl⟩ mul_one f := rfl one_mul f := rfl mul_assoc f₁ fβ‚‚ f₃ := DFunLike.coe_injective rfl instance : Inhabited CircleDeg1Lift := ⟨1⟩ @[simp] theorem coe_mul : ⇑(f * g) = f ∘ g := rfl #align circle_deg1_lift.coe_mul CircleDeg1Lift.coe_mul theorem mul_apply (x) : (f * g) x = f (g x) := rfl #align circle_deg1_lift.mul_apply CircleDeg1Lift.mul_apply @[simp] theorem coe_one : ⇑(1 : CircleDeg1Lift) = id := rfl #align circle_deg1_lift.coe_one CircleDeg1Lift.coe_one instance unitsHasCoeToFun : CoeFun CircleDeg1LiftΛ£ fun _ => ℝ β†’ ℝ := ⟨fun f => ⇑(f : CircleDeg1Lift)⟩ #align circle_deg1_lift.units_has_coe_to_fun CircleDeg1Lift.unitsHasCoeToFun #noalign circle_deg1_lift.units_coe -- now LHS = RHS @[simp] theorem units_inv_apply_apply (f : CircleDeg1LiftΛ£) (x : ℝ) : (f⁻¹ : CircleDeg1LiftΛ£) (f x) = x := by simp only [← mul_apply, f.inv_mul, coe_one, id] #align circle_deg1_lift.units_inv_apply_apply CircleDeg1Lift.units_inv_apply_apply @[simp]
Mathlib/Dynamics/Circle/RotationNumber/TranslationNumber.lean
218
219
theorem units_apply_inv_apply (f : CircleDeg1LiftΛ£) (x : ℝ) : f ((f⁻¹ : CircleDeg1LiftΛ£) x) = x := by
simp only [← mul_apply, f.mul_inv, coe_one, id]
1,750
import Mathlib.Analysis.SpecificLimits.Basic #align_import analysis.hofer from "leanprover-community/mathlib"@"f2ce6086713c78a7f880485f7917ea547a215982" open scoped Classical open Topology open Filter Finset local notation "d" => dist #noalign pos_div_pow_pos
Mathlib/Analysis/Hofer.lean
33
104
theorem hofer {X : Type*} [MetricSpace X] [CompleteSpace X] (x : X) (Ξ΅ : ℝ) (Ξ΅_pos : 0 < Ξ΅) {Ο• : X β†’ ℝ} (cont : Continuous Ο•) (nonneg : βˆ€ y, 0 ≀ Ο• y) : βˆƒ Ξ΅' > 0, βˆƒ x' : X, Ξ΅' ≀ Ξ΅ ∧ d x' x ≀ 2 * Ξ΅ ∧ Ξ΅ * Ο• x ≀ Ξ΅' * Ο• x' ∧ βˆ€ y, d x' y ≀ Ξ΅' β†’ Ο• y ≀ 2 * Ο• x' := by
by_contra H have reformulation : βˆ€ (x') (k : β„•), Ξ΅ * Ο• x ≀ Ξ΅ / 2 ^ k * Ο• x' ↔ 2 ^ k * Ο• x ≀ Ο• x' := by intro x' k rw [div_mul_eq_mul_div, le_div_iff, mul_assoc, mul_le_mul_left Ξ΅_pos, mul_comm] positivity -- Now let's specialize to `Ξ΅/2^k` replace H : βˆ€ k : β„•, βˆ€ x', d x' x ≀ 2 * Ξ΅ ∧ 2 ^ k * Ο• x ≀ Ο• x' β†’ βˆƒ y, d x' y ≀ Ξ΅ / 2 ^ k ∧ 2 * Ο• x' < Ο• y := by intro k x' push_neg at H have := H (Ξ΅ / 2 ^ k) (by positivity) x' (by simp [Ξ΅_pos.le, one_le_two]) simpa [reformulation] using this clear reformulation haveI : Nonempty X := ⟨x⟩ choose! F hF using H -- Use the axiom of choice -- Now define u by induction starting at x, with u_{n+1} = F(n, u_n) let u : β„• β†’ X := fun n => Nat.recOn n x F -- The properties of F translate to properties of u have hu : βˆ€ n, d (u n) x ≀ 2 * Ξ΅ ∧ 2 ^ n * Ο• x ≀ Ο• (u n) β†’ d (u n) (u <| n + 1) ≀ Ξ΅ / 2 ^ n ∧ 2 * Ο• (u n) < Ο• (u <| n + 1) := by intro n exact hF n (u n) clear hF -- Key properties of u, to be proven by induction have key : βˆ€ n, d (u n) (u (n + 1)) ≀ Ξ΅ / 2 ^ n ∧ 2 * Ο• (u n) < Ο• (u (n + 1)) := by intro n induction' n using Nat.case_strong_induction_on with n IH Β· simpa [u, Ξ΅_pos.le] using hu 0 have A : d (u (n + 1)) x ≀ 2 * Ξ΅ := by rw [dist_comm] let r := range (n + 1) -- range (n+1) = {0, ..., n} calc d (u 0) (u (n + 1)) ≀ βˆ‘ i ∈ r, d (u i) (u <| i + 1) := dist_le_range_sum_dist u (n + 1) _ ≀ βˆ‘ i ∈ r, Ξ΅ / 2 ^ i := (sum_le_sum fun i i_in => (IH i <| Nat.lt_succ_iff.mp <| Finset.mem_range.mp i_in).1) _ = (βˆ‘ i ∈ r, (1 / 2 : ℝ) ^ i) * Ξ΅ := by rw [Finset.sum_mul] congr with i field_simp _ ≀ 2 * Ξ΅ := by gcongr; apply sum_geometric_two_le have B : 2 ^ (n + 1) * Ο• x ≀ Ο• (u (n + 1)) := by refine @geom_le (Ο• ∘ u) _ zero_le_two (n + 1) fun m hm => ?_ exact (IH _ <| Nat.lt_add_one_iff.1 hm).2.le exact hu (n + 1) ⟨A, B⟩ cases' forall_and.mp key with key₁ keyβ‚‚ clear hu key -- Hence u is Cauchy have cauchy_u : CauchySeq u := by refine cauchySeq_of_le_geometric _ Ξ΅ one_half_lt_one fun n => ?_ simpa only [one_div, inv_pow] using key₁ n -- So u converges to some y obtain ⟨y, limy⟩ : βˆƒ y, Tendsto u atTop (𝓝 y) := CompleteSpace.complete cauchy_u -- And Ο• ∘ u goes to +∞ have lim_top : Tendsto (Ο• ∘ u) atTop atTop := by let v n := (Ο• ∘ u) (n + 1) suffices Tendsto v atTop atTop by rwa [tendsto_add_atTop_iff_nat] at this have hvβ‚€ : 0 < v 0 := by calc 0 ≀ 2 * Ο• (u 0) := by specialize nonneg x; positivity _ < Ο• (u (0 + 1)) := keyβ‚‚ 0 apply tendsto_atTop_of_geom_le hvβ‚€ one_lt_two exact fun n => (keyβ‚‚ (n + 1)).le -- But Ο• ∘ u also needs to go to Ο•(y) have lim : Tendsto (Ο• ∘ u) atTop (𝓝 (Ο• y)) := Tendsto.comp cont.continuousAt limy -- So we have our contradiction! exact not_tendsto_atTop_of_tendsto_nhds lim lim_top
1,751
import Mathlib.Analysis.SpecificLimits.Basic import Mathlib.Data.Setoid.Basic import Mathlib.Dynamics.FixedPoints.Topology import Mathlib.Topology.MetricSpace.Lipschitz #align_import topology.metric_space.contracting from "leanprover-community/mathlib"@"f2ce6086713c78a7f880485f7917ea547a215982" open scoped Classical open NNReal Topology ENNReal Filter Function variable {Ξ± : Type*} def ContractingWith [EMetricSpace Ξ±] (K : ℝβ‰₯0) (f : Ξ± β†’ Ξ±) := K < 1 ∧ LipschitzWith K f #align contracting_with ContractingWith namespace ContractingWith variable [EMetricSpace Ξ±] [cs : CompleteSpace Ξ±] {K : ℝβ‰₯0} {f : Ξ± β†’ Ξ±} open EMetric Set theorem toLipschitzWith (hf : ContractingWith K f) : LipschitzWith K f := hf.2 #align contracting_with.to_lipschitz_with ContractingWith.toLipschitzWith
Mathlib/Topology/MetricSpace/Contracting.lean
53
53
theorem one_sub_K_pos' (hf : ContractingWith K f) : (0 : ℝβ‰₯0∞) < 1 - K := by
simp [hf.1]
1,752
import Mathlib.Analysis.SpecificLimits.Basic import Mathlib.Data.Setoid.Basic import Mathlib.Dynamics.FixedPoints.Topology import Mathlib.Topology.MetricSpace.Lipschitz #align_import topology.metric_space.contracting from "leanprover-community/mathlib"@"f2ce6086713c78a7f880485f7917ea547a215982" open scoped Classical open NNReal Topology ENNReal Filter Function variable {Ξ± : Type*} def ContractingWith [EMetricSpace Ξ±] (K : ℝβ‰₯0) (f : Ξ± β†’ Ξ±) := K < 1 ∧ LipschitzWith K f #align contracting_with ContractingWith namespace ContractingWith variable [EMetricSpace Ξ±] [cs : CompleteSpace Ξ±] {K : ℝβ‰₯0} {f : Ξ± β†’ Ξ±} open EMetric Set theorem toLipschitzWith (hf : ContractingWith K f) : LipschitzWith K f := hf.2 #align contracting_with.to_lipschitz_with ContractingWith.toLipschitzWith theorem one_sub_K_pos' (hf : ContractingWith K f) : (0 : ℝβ‰₯0∞) < 1 - K := by simp [hf.1] set_option linter.uppercaseLean3 false in #align contracting_with.one_sub_K_pos' ContractingWith.one_sub_K_pos' theorem one_sub_K_ne_zero (hf : ContractingWith K f) : (1 : ℝβ‰₯0∞) - K β‰  0 := ne_of_gt hf.one_sub_K_pos' set_option linter.uppercaseLean3 false in #align contracting_with.one_sub_K_ne_zero ContractingWith.one_sub_K_ne_zero
Mathlib/Topology/MetricSpace/Contracting.lean
62
64
theorem one_sub_K_ne_top : (1 : ℝβ‰₯0∞) - K β‰  ∞ := by
norm_cast exact ENNReal.coe_ne_top
1,752
import Mathlib.Analysis.SpecificLimits.Basic import Mathlib.Data.Setoid.Basic import Mathlib.Dynamics.FixedPoints.Topology import Mathlib.Topology.MetricSpace.Lipschitz #align_import topology.metric_space.contracting from "leanprover-community/mathlib"@"f2ce6086713c78a7f880485f7917ea547a215982" open scoped Classical open NNReal Topology ENNReal Filter Function variable {Ξ± : Type*} def ContractingWith [EMetricSpace Ξ±] (K : ℝβ‰₯0) (f : Ξ± β†’ Ξ±) := K < 1 ∧ LipschitzWith K f #align contracting_with ContractingWith namespace ContractingWith variable [EMetricSpace Ξ±] [cs : CompleteSpace Ξ±] {K : ℝβ‰₯0} {f : Ξ± β†’ Ξ±} open EMetric Set theorem toLipschitzWith (hf : ContractingWith K f) : LipschitzWith K f := hf.2 #align contracting_with.to_lipschitz_with ContractingWith.toLipschitzWith theorem one_sub_K_pos' (hf : ContractingWith K f) : (0 : ℝβ‰₯0∞) < 1 - K := by simp [hf.1] set_option linter.uppercaseLean3 false in #align contracting_with.one_sub_K_pos' ContractingWith.one_sub_K_pos' theorem one_sub_K_ne_zero (hf : ContractingWith K f) : (1 : ℝβ‰₯0∞) - K β‰  0 := ne_of_gt hf.one_sub_K_pos' set_option linter.uppercaseLean3 false in #align contracting_with.one_sub_K_ne_zero ContractingWith.one_sub_K_ne_zero theorem one_sub_K_ne_top : (1 : ℝβ‰₯0∞) - K β‰  ∞ := by norm_cast exact ENNReal.coe_ne_top set_option linter.uppercaseLean3 false in #align contracting_with.one_sub_K_ne_top ContractingWith.one_sub_K_ne_top
Mathlib/Topology/MetricSpace/Contracting.lean
68
76
theorem edist_inequality (hf : ContractingWith K f) {x y} (h : edist x y β‰  ∞) : edist x y ≀ (edist x (f x) + edist y (f y)) / (1 - K) := suffices edist x y ≀ edist x (f x) + edist y (f y) + K * edist x y by rwa [ENNReal.le_div_iff_mul_le (Or.inl hf.one_sub_K_ne_zero) (Or.inl one_sub_K_ne_top), mul_comm, ENNReal.sub_mul fun _ _ ↦ h, one_mul, tsub_le_iff_right] calc edist x y ≀ edist x (f x) + edist (f x) (f y) + edist (f y) y := edist_triangle4 _ _ _ _ _ = edist x (f x) + edist y (f y) + edist (f x) (f y) := by
rw [edist_comm y, add_right_comm] _ ≀ edist x (f x) + edist y (f y) + K * edist x y := add_le_add le_rfl (hf.2 _ _)
1,752
import Mathlib.Analysis.SpecificLimits.Basic import Mathlib.Data.Setoid.Basic import Mathlib.Dynamics.FixedPoints.Topology import Mathlib.Topology.MetricSpace.Lipschitz #align_import topology.metric_space.contracting from "leanprover-community/mathlib"@"f2ce6086713c78a7f880485f7917ea547a215982" open scoped Classical open NNReal Topology ENNReal Filter Function variable {Ξ± : Type*} def ContractingWith [EMetricSpace Ξ±] (K : ℝβ‰₯0) (f : Ξ± β†’ Ξ±) := K < 1 ∧ LipschitzWith K f #align contracting_with ContractingWith namespace ContractingWith variable [EMetricSpace Ξ±] [cs : CompleteSpace Ξ±] {K : ℝβ‰₯0} {f : Ξ± β†’ Ξ±} open EMetric Set theorem toLipschitzWith (hf : ContractingWith K f) : LipschitzWith K f := hf.2 #align contracting_with.to_lipschitz_with ContractingWith.toLipschitzWith theorem one_sub_K_pos' (hf : ContractingWith K f) : (0 : ℝβ‰₯0∞) < 1 - K := by simp [hf.1] set_option linter.uppercaseLean3 false in #align contracting_with.one_sub_K_pos' ContractingWith.one_sub_K_pos' theorem one_sub_K_ne_zero (hf : ContractingWith K f) : (1 : ℝβ‰₯0∞) - K β‰  0 := ne_of_gt hf.one_sub_K_pos' set_option linter.uppercaseLean3 false in #align contracting_with.one_sub_K_ne_zero ContractingWith.one_sub_K_ne_zero theorem one_sub_K_ne_top : (1 : ℝβ‰₯0∞) - K β‰  ∞ := by norm_cast exact ENNReal.coe_ne_top set_option linter.uppercaseLean3 false in #align contracting_with.one_sub_K_ne_top ContractingWith.one_sub_K_ne_top theorem edist_inequality (hf : ContractingWith K f) {x y} (h : edist x y β‰  ∞) : edist x y ≀ (edist x (f x) + edist y (f y)) / (1 - K) := suffices edist x y ≀ edist x (f x) + edist y (f y) + K * edist x y by rwa [ENNReal.le_div_iff_mul_le (Or.inl hf.one_sub_K_ne_zero) (Or.inl one_sub_K_ne_top), mul_comm, ENNReal.sub_mul fun _ _ ↦ h, one_mul, tsub_le_iff_right] calc edist x y ≀ edist x (f x) + edist (f x) (f y) + edist (f y) y := edist_triangle4 _ _ _ _ _ = edist x (f x) + edist y (f y) + edist (f x) (f y) := by rw [edist_comm y, add_right_comm] _ ≀ edist x (f x) + edist y (f y) + K * edist x y := add_le_add le_rfl (hf.2 _ _) #align contracting_with.edist_inequality ContractingWith.edist_inequality
Mathlib/Topology/MetricSpace/Contracting.lean
79
81
theorem edist_le_of_fixedPoint (hf : ContractingWith K f) {x y} (h : edist x y β‰  ∞) (hy : IsFixedPt f y) : edist x y ≀ edist x (f x) / (1 - K) := by
simpa only [hy.eq, edist_self, add_zero] using hf.edist_inequality h
1,752
import Mathlib.Analysis.SpecificLimits.Basic import Mathlib.Data.Setoid.Basic import Mathlib.Dynamics.FixedPoints.Topology import Mathlib.Topology.MetricSpace.Lipschitz #align_import topology.metric_space.contracting from "leanprover-community/mathlib"@"f2ce6086713c78a7f880485f7917ea547a215982" open scoped Classical open NNReal Topology ENNReal Filter Function variable {Ξ± : Type*} def ContractingWith [EMetricSpace Ξ±] (K : ℝβ‰₯0) (f : Ξ± β†’ Ξ±) := K < 1 ∧ LipschitzWith K f #align contracting_with ContractingWith namespace ContractingWith variable [EMetricSpace Ξ±] [cs : CompleteSpace Ξ±] {K : ℝβ‰₯0} {f : Ξ± β†’ Ξ±} open EMetric Set theorem toLipschitzWith (hf : ContractingWith K f) : LipschitzWith K f := hf.2 #align contracting_with.to_lipschitz_with ContractingWith.toLipschitzWith theorem one_sub_K_pos' (hf : ContractingWith K f) : (0 : ℝβ‰₯0∞) < 1 - K := by simp [hf.1] set_option linter.uppercaseLean3 false in #align contracting_with.one_sub_K_pos' ContractingWith.one_sub_K_pos' theorem one_sub_K_ne_zero (hf : ContractingWith K f) : (1 : ℝβ‰₯0∞) - K β‰  0 := ne_of_gt hf.one_sub_K_pos' set_option linter.uppercaseLean3 false in #align contracting_with.one_sub_K_ne_zero ContractingWith.one_sub_K_ne_zero theorem one_sub_K_ne_top : (1 : ℝβ‰₯0∞) - K β‰  ∞ := by norm_cast exact ENNReal.coe_ne_top set_option linter.uppercaseLean3 false in #align contracting_with.one_sub_K_ne_top ContractingWith.one_sub_K_ne_top theorem edist_inequality (hf : ContractingWith K f) {x y} (h : edist x y β‰  ∞) : edist x y ≀ (edist x (f x) + edist y (f y)) / (1 - K) := suffices edist x y ≀ edist x (f x) + edist y (f y) + K * edist x y by rwa [ENNReal.le_div_iff_mul_le (Or.inl hf.one_sub_K_ne_zero) (Or.inl one_sub_K_ne_top), mul_comm, ENNReal.sub_mul fun _ _ ↦ h, one_mul, tsub_le_iff_right] calc edist x y ≀ edist x (f x) + edist (f x) (f y) + edist (f y) y := edist_triangle4 _ _ _ _ _ = edist x (f x) + edist y (f y) + edist (f x) (f y) := by rw [edist_comm y, add_right_comm] _ ≀ edist x (f x) + edist y (f y) + K * edist x y := add_le_add le_rfl (hf.2 _ _) #align contracting_with.edist_inequality ContractingWith.edist_inequality theorem edist_le_of_fixedPoint (hf : ContractingWith K f) {x y} (h : edist x y β‰  ∞) (hy : IsFixedPt f y) : edist x y ≀ edist x (f x) / (1 - K) := by simpa only [hy.eq, edist_self, add_zero] using hf.edist_inequality h #align contracting_with.edist_le_of_fixed_point ContractingWith.edist_le_of_fixedPoint
Mathlib/Topology/MetricSpace/Contracting.lean
84
87
theorem eq_or_edist_eq_top_of_fixedPoints (hf : ContractingWith K f) {x y} (hx : IsFixedPt f x) (hy : IsFixedPt f y) : x = y ∨ edist x y = ∞ := by
refine or_iff_not_imp_right.2 fun h ↦ edist_le_zero.1 ?_ simpa only [hx.eq, edist_self, add_zero, ENNReal.zero_div] using hf.edist_le_of_fixedPoint h hy
1,752
import Mathlib.Analysis.NormedSpace.AddTorsor import Mathlib.LinearAlgebra.AffineSpace.Ordered import Mathlib.Topology.ContinuousFunction.Basic import Mathlib.Topology.GDelta import Mathlib.Analysis.NormedSpace.FunctionSeries import Mathlib.Analysis.SpecificLimits.Basic #align_import topology.urysohns_lemma from "leanprover-community/mathlib"@"f2ce6086713c78a7f880485f7917ea547a215982" variable {X : Type*} [TopologicalSpace X] open Set Filter TopologicalSpace Topology Filter open scoped Pointwise namespace Urysohns set_option linter.uppercaseLean3 false structure CU {X : Type*} [TopologicalSpace X] (P : Set X β†’ Prop) where protected C : Set X protected U : Set X protected P_C : P C protected closed_C : IsClosed C protected open_U : IsOpen U protected subset : C βŠ† U protected hP : βˆ€ {c u : Set X}, IsClosed c β†’ P c β†’ IsOpen u β†’ c βŠ† u β†’ βˆƒ v, IsOpen v ∧ c βŠ† v ∧ closure v βŠ† u ∧ P (closure v) #align urysohns.CU Urysohns.CU namespace CU variable {P : Set X β†’ Prop} @[simps C] def left (c : CU P) : CU P where C := c.C U := (c.hP c.closed_C c.P_C c.open_U c.subset).choose closed_C := c.closed_C P_C := c.P_C open_U := (c.hP c.closed_C c.P_C c.open_U c.subset).choose_spec.1 subset := (c.hP c.closed_C c.P_C c.open_U c.subset).choose_spec.2.1 hP := c.hP #align urysohns.CU.left Urysohns.CU.left @[simps U] def right (c : CU P) : CU P where C := closure (c.hP c.closed_C c.P_C c.open_U c.subset).choose U := c.U closed_C := isClosed_closure P_C := (c.hP c.closed_C c.P_C c.open_U c.subset).choose_spec.2.2.2 open_U := c.open_U subset := (c.hP c.closed_C c.P_C c.open_U c.subset).choose_spec.2.2.1 hP := c.hP #align urysohns.CU.right Urysohns.CU.right theorem left_U_subset_right_C (c : CU P) : c.left.U βŠ† c.right.C := subset_closure #align urysohns.CU.left_U_subset_right_C Urysohns.CU.left_U_subset_right_C theorem left_U_subset (c : CU P) : c.left.U βŠ† c.U := Subset.trans c.left_U_subset_right_C c.right.subset #align urysohns.CU.left_U_subset Urysohns.CU.left_U_subset theorem subset_right_C (c : CU P) : c.C βŠ† c.right.C := Subset.trans c.left.subset c.left_U_subset_right_C #align urysohns.CU.subset_right_C Urysohns.CU.subset_right_C noncomputable def approx : β„• β†’ CU P β†’ X β†’ ℝ | 0, c, x => indicator c.Uᢜ 1 x | n + 1, c, x => midpoint ℝ (approx n c.left x) (approx n c.right x) #align urysohns.CU.approx Urysohns.CU.approx
Mathlib/Topology/UrysohnsLemma.lean
161
166
theorem approx_of_mem_C (c : CU P) (n : β„•) {x : X} (hx : x ∈ c.C) : c.approx n x = 0 := by
induction' n with n ihn generalizing c · exact indicator_of_not_mem (fun (hU : x ∈ c.Uᢜ) => hU <| c.subset hx) _ · simp only [approx] rw [ihn, ihn, midpoint_self] exacts [c.subset_right_C hx, hx]
1,753
import Mathlib.Analysis.NormedSpace.AddTorsor import Mathlib.LinearAlgebra.AffineSpace.Ordered import Mathlib.Topology.ContinuousFunction.Basic import Mathlib.Topology.GDelta import Mathlib.Analysis.NormedSpace.FunctionSeries import Mathlib.Analysis.SpecificLimits.Basic #align_import topology.urysohns_lemma from "leanprover-community/mathlib"@"f2ce6086713c78a7f880485f7917ea547a215982" variable {X : Type*} [TopologicalSpace X] open Set Filter TopologicalSpace Topology Filter open scoped Pointwise namespace Urysohns set_option linter.uppercaseLean3 false structure CU {X : Type*} [TopologicalSpace X] (P : Set X β†’ Prop) where protected C : Set X protected U : Set X protected P_C : P C protected closed_C : IsClosed C protected open_U : IsOpen U protected subset : C βŠ† U protected hP : βˆ€ {c u : Set X}, IsClosed c β†’ P c β†’ IsOpen u β†’ c βŠ† u β†’ βˆƒ v, IsOpen v ∧ c βŠ† v ∧ closure v βŠ† u ∧ P (closure v) #align urysohns.CU Urysohns.CU namespace CU variable {P : Set X β†’ Prop} @[simps C] def left (c : CU P) : CU P where C := c.C U := (c.hP c.closed_C c.P_C c.open_U c.subset).choose closed_C := c.closed_C P_C := c.P_C open_U := (c.hP c.closed_C c.P_C c.open_U c.subset).choose_spec.1 subset := (c.hP c.closed_C c.P_C c.open_U c.subset).choose_spec.2.1 hP := c.hP #align urysohns.CU.left Urysohns.CU.left @[simps U] def right (c : CU P) : CU P where C := closure (c.hP c.closed_C c.P_C c.open_U c.subset).choose U := c.U closed_C := isClosed_closure P_C := (c.hP c.closed_C c.P_C c.open_U c.subset).choose_spec.2.2.2 open_U := c.open_U subset := (c.hP c.closed_C c.P_C c.open_U c.subset).choose_spec.2.2.1 hP := c.hP #align urysohns.CU.right Urysohns.CU.right theorem left_U_subset_right_C (c : CU P) : c.left.U βŠ† c.right.C := subset_closure #align urysohns.CU.left_U_subset_right_C Urysohns.CU.left_U_subset_right_C theorem left_U_subset (c : CU P) : c.left.U βŠ† c.U := Subset.trans c.left_U_subset_right_C c.right.subset #align urysohns.CU.left_U_subset Urysohns.CU.left_U_subset theorem subset_right_C (c : CU P) : c.C βŠ† c.right.C := Subset.trans c.left.subset c.left_U_subset_right_C #align urysohns.CU.subset_right_C Urysohns.CU.subset_right_C noncomputable def approx : β„• β†’ CU P β†’ X β†’ ℝ | 0, c, x => indicator c.Uᢜ 1 x | n + 1, c, x => midpoint ℝ (approx n c.left x) (approx n c.right x) #align urysohns.CU.approx Urysohns.CU.approx theorem approx_of_mem_C (c : CU P) (n : β„•) {x : X} (hx : x ∈ c.C) : c.approx n x = 0 := by induction' n with n ihn generalizing c Β· exact indicator_of_not_mem (fun (hU : x ∈ c.Uᢜ) => hU <| c.subset hx) _ Β· simp only [approx] rw [ihn, ihn, midpoint_self] exacts [c.subset_right_C hx, hx] #align urysohns.CU.approx_of_mem_C Urysohns.CU.approx_of_mem_C
Mathlib/Topology/UrysohnsLemma.lean
169
175
theorem approx_of_nmem_U (c : CU P) (n : β„•) {x : X} (hx : x βˆ‰ c.U) : c.approx n x = 1 := by
induction' n with n ihn generalizing c Β· rw [← mem_compl_iff] at hx exact indicator_of_mem hx _ Β· simp only [approx] rw [ihn, ihn, midpoint_self] exacts [hx, fun hU => hx <| c.left_U_subset hU]
1,753
import Mathlib.Analysis.NormedSpace.AddTorsor import Mathlib.LinearAlgebra.AffineSpace.Ordered import Mathlib.Topology.ContinuousFunction.Basic import Mathlib.Topology.GDelta import Mathlib.Analysis.NormedSpace.FunctionSeries import Mathlib.Analysis.SpecificLimits.Basic #align_import topology.urysohns_lemma from "leanprover-community/mathlib"@"f2ce6086713c78a7f880485f7917ea547a215982" variable {X : Type*} [TopologicalSpace X] open Set Filter TopologicalSpace Topology Filter open scoped Pointwise namespace Urysohns set_option linter.uppercaseLean3 false structure CU {X : Type*} [TopologicalSpace X] (P : Set X β†’ Prop) where protected C : Set X protected U : Set X protected P_C : P C protected closed_C : IsClosed C protected open_U : IsOpen U protected subset : C βŠ† U protected hP : βˆ€ {c u : Set X}, IsClosed c β†’ P c β†’ IsOpen u β†’ c βŠ† u β†’ βˆƒ v, IsOpen v ∧ c βŠ† v ∧ closure v βŠ† u ∧ P (closure v) #align urysohns.CU Urysohns.CU namespace CU variable {P : Set X β†’ Prop} @[simps C] def left (c : CU P) : CU P where C := c.C U := (c.hP c.closed_C c.P_C c.open_U c.subset).choose closed_C := c.closed_C P_C := c.P_C open_U := (c.hP c.closed_C c.P_C c.open_U c.subset).choose_spec.1 subset := (c.hP c.closed_C c.P_C c.open_U c.subset).choose_spec.2.1 hP := c.hP #align urysohns.CU.left Urysohns.CU.left @[simps U] def right (c : CU P) : CU P where C := closure (c.hP c.closed_C c.P_C c.open_U c.subset).choose U := c.U closed_C := isClosed_closure P_C := (c.hP c.closed_C c.P_C c.open_U c.subset).choose_spec.2.2.2 open_U := c.open_U subset := (c.hP c.closed_C c.P_C c.open_U c.subset).choose_spec.2.2.1 hP := c.hP #align urysohns.CU.right Urysohns.CU.right theorem left_U_subset_right_C (c : CU P) : c.left.U βŠ† c.right.C := subset_closure #align urysohns.CU.left_U_subset_right_C Urysohns.CU.left_U_subset_right_C theorem left_U_subset (c : CU P) : c.left.U βŠ† c.U := Subset.trans c.left_U_subset_right_C c.right.subset #align urysohns.CU.left_U_subset Urysohns.CU.left_U_subset theorem subset_right_C (c : CU P) : c.C βŠ† c.right.C := Subset.trans c.left.subset c.left_U_subset_right_C #align urysohns.CU.subset_right_C Urysohns.CU.subset_right_C noncomputable def approx : β„• β†’ CU P β†’ X β†’ ℝ | 0, c, x => indicator c.Uᢜ 1 x | n + 1, c, x => midpoint ℝ (approx n c.left x) (approx n c.right x) #align urysohns.CU.approx Urysohns.CU.approx theorem approx_of_mem_C (c : CU P) (n : β„•) {x : X} (hx : x ∈ c.C) : c.approx n x = 0 := by induction' n with n ihn generalizing c Β· exact indicator_of_not_mem (fun (hU : x ∈ c.Uᢜ) => hU <| c.subset hx) _ Β· simp only [approx] rw [ihn, ihn, midpoint_self] exacts [c.subset_right_C hx, hx] #align urysohns.CU.approx_of_mem_C Urysohns.CU.approx_of_mem_C theorem approx_of_nmem_U (c : CU P) (n : β„•) {x : X} (hx : x βˆ‰ c.U) : c.approx n x = 1 := by induction' n with n ihn generalizing c Β· rw [← mem_compl_iff] at hx exact indicator_of_mem hx _ Β· simp only [approx] rw [ihn, ihn, midpoint_self] exacts [hx, fun hU => hx <| c.left_U_subset hU] #align urysohns.CU.approx_of_nmem_U Urysohns.CU.approx_of_nmem_U
Mathlib/Topology/UrysohnsLemma.lean
178
182
theorem approx_nonneg (c : CU P) (n : β„•) (x : X) : 0 ≀ c.approx n x := by
induction' n with n ihn generalizing c Β· exact indicator_nonneg (fun _ _ => zero_le_one) _ Β· simp only [approx, midpoint_eq_smul_add, invOf_eq_inv] refine mul_nonneg (inv_nonneg.2 zero_le_two) (add_nonneg ?_ ?_) <;> apply ihn
1,753
import Mathlib.Analysis.NormedSpace.AddTorsor import Mathlib.LinearAlgebra.AffineSpace.Ordered import Mathlib.Topology.ContinuousFunction.Basic import Mathlib.Topology.GDelta import Mathlib.Analysis.NormedSpace.FunctionSeries import Mathlib.Analysis.SpecificLimits.Basic #align_import topology.urysohns_lemma from "leanprover-community/mathlib"@"f2ce6086713c78a7f880485f7917ea547a215982" variable {X : Type*} [TopologicalSpace X] open Set Filter TopologicalSpace Topology Filter open scoped Pointwise namespace Urysohns set_option linter.uppercaseLean3 false structure CU {X : Type*} [TopologicalSpace X] (P : Set X β†’ Prop) where protected C : Set X protected U : Set X protected P_C : P C protected closed_C : IsClosed C protected open_U : IsOpen U protected subset : C βŠ† U protected hP : βˆ€ {c u : Set X}, IsClosed c β†’ P c β†’ IsOpen u β†’ c βŠ† u β†’ βˆƒ v, IsOpen v ∧ c βŠ† v ∧ closure v βŠ† u ∧ P (closure v) #align urysohns.CU Urysohns.CU namespace CU variable {P : Set X β†’ Prop} @[simps C] def left (c : CU P) : CU P where C := c.C U := (c.hP c.closed_C c.P_C c.open_U c.subset).choose closed_C := c.closed_C P_C := c.P_C open_U := (c.hP c.closed_C c.P_C c.open_U c.subset).choose_spec.1 subset := (c.hP c.closed_C c.P_C c.open_U c.subset).choose_spec.2.1 hP := c.hP #align urysohns.CU.left Urysohns.CU.left @[simps U] def right (c : CU P) : CU P where C := closure (c.hP c.closed_C c.P_C c.open_U c.subset).choose U := c.U closed_C := isClosed_closure P_C := (c.hP c.closed_C c.P_C c.open_U c.subset).choose_spec.2.2.2 open_U := c.open_U subset := (c.hP c.closed_C c.P_C c.open_U c.subset).choose_spec.2.2.1 hP := c.hP #align urysohns.CU.right Urysohns.CU.right theorem left_U_subset_right_C (c : CU P) : c.left.U βŠ† c.right.C := subset_closure #align urysohns.CU.left_U_subset_right_C Urysohns.CU.left_U_subset_right_C theorem left_U_subset (c : CU P) : c.left.U βŠ† c.U := Subset.trans c.left_U_subset_right_C c.right.subset #align urysohns.CU.left_U_subset Urysohns.CU.left_U_subset theorem subset_right_C (c : CU P) : c.C βŠ† c.right.C := Subset.trans c.left.subset c.left_U_subset_right_C #align urysohns.CU.subset_right_C Urysohns.CU.subset_right_C noncomputable def approx : β„• β†’ CU P β†’ X β†’ ℝ | 0, c, x => indicator c.Uᢜ 1 x | n + 1, c, x => midpoint ℝ (approx n c.left x) (approx n c.right x) #align urysohns.CU.approx Urysohns.CU.approx theorem approx_of_mem_C (c : CU P) (n : β„•) {x : X} (hx : x ∈ c.C) : c.approx n x = 0 := by induction' n with n ihn generalizing c Β· exact indicator_of_not_mem (fun (hU : x ∈ c.Uᢜ) => hU <| c.subset hx) _ Β· simp only [approx] rw [ihn, ihn, midpoint_self] exacts [c.subset_right_C hx, hx] #align urysohns.CU.approx_of_mem_C Urysohns.CU.approx_of_mem_C theorem approx_of_nmem_U (c : CU P) (n : β„•) {x : X} (hx : x βˆ‰ c.U) : c.approx n x = 1 := by induction' n with n ihn generalizing c Β· rw [← mem_compl_iff] at hx exact indicator_of_mem hx _ Β· simp only [approx] rw [ihn, ihn, midpoint_self] exacts [hx, fun hU => hx <| c.left_U_subset hU] #align urysohns.CU.approx_of_nmem_U Urysohns.CU.approx_of_nmem_U theorem approx_nonneg (c : CU P) (n : β„•) (x : X) : 0 ≀ c.approx n x := by induction' n with n ihn generalizing c Β· exact indicator_nonneg (fun _ _ => zero_le_one) _ Β· simp only [approx, midpoint_eq_smul_add, invOf_eq_inv] refine mul_nonneg (inv_nonneg.2 zero_le_two) (add_nonneg ?_ ?_) <;> apply ihn #align urysohns.CU.approx_nonneg Urysohns.CU.approx_nonneg
Mathlib/Topology/UrysohnsLemma.lean
185
192
theorem approx_le_one (c : CU P) (n : β„•) (x : X) : c.approx n x ≀ 1 := by
induction' n with n ihn generalizing c Β· exact indicator_apply_le' (fun _ => le_rfl) fun _ => zero_le_one Β· simp only [approx, midpoint_eq_smul_add, invOf_eq_inv, smul_eq_mul, ← div_eq_inv_mul] have := add_le_add (ihn (left c)) (ihn (right c)) set_option tactic.skipAssignedInstances false in norm_num at this exact Iff.mpr (div_le_one zero_lt_two) this
1,753
import Mathlib.Analysis.NormedSpace.AddTorsor import Mathlib.LinearAlgebra.AffineSpace.Ordered import Mathlib.Topology.ContinuousFunction.Basic import Mathlib.Topology.GDelta import Mathlib.Analysis.NormedSpace.FunctionSeries import Mathlib.Analysis.SpecificLimits.Basic #align_import topology.urysohns_lemma from "leanprover-community/mathlib"@"f2ce6086713c78a7f880485f7917ea547a215982" variable {X : Type*} [TopologicalSpace X] open Set Filter TopologicalSpace Topology Filter open scoped Pointwise namespace Urysohns set_option linter.uppercaseLean3 false structure CU {X : Type*} [TopologicalSpace X] (P : Set X β†’ Prop) where protected C : Set X protected U : Set X protected P_C : P C protected closed_C : IsClosed C protected open_U : IsOpen U protected subset : C βŠ† U protected hP : βˆ€ {c u : Set X}, IsClosed c β†’ P c β†’ IsOpen u β†’ c βŠ† u β†’ βˆƒ v, IsOpen v ∧ c βŠ† v ∧ closure v βŠ† u ∧ P (closure v) #align urysohns.CU Urysohns.CU namespace CU variable {P : Set X β†’ Prop} @[simps C] def left (c : CU P) : CU P where C := c.C U := (c.hP c.closed_C c.P_C c.open_U c.subset).choose closed_C := c.closed_C P_C := c.P_C open_U := (c.hP c.closed_C c.P_C c.open_U c.subset).choose_spec.1 subset := (c.hP c.closed_C c.P_C c.open_U c.subset).choose_spec.2.1 hP := c.hP #align urysohns.CU.left Urysohns.CU.left @[simps U] def right (c : CU P) : CU P where C := closure (c.hP c.closed_C c.P_C c.open_U c.subset).choose U := c.U closed_C := isClosed_closure P_C := (c.hP c.closed_C c.P_C c.open_U c.subset).choose_spec.2.2.2 open_U := c.open_U subset := (c.hP c.closed_C c.P_C c.open_U c.subset).choose_spec.2.2.1 hP := c.hP #align urysohns.CU.right Urysohns.CU.right theorem left_U_subset_right_C (c : CU P) : c.left.U βŠ† c.right.C := subset_closure #align urysohns.CU.left_U_subset_right_C Urysohns.CU.left_U_subset_right_C theorem left_U_subset (c : CU P) : c.left.U βŠ† c.U := Subset.trans c.left_U_subset_right_C c.right.subset #align urysohns.CU.left_U_subset Urysohns.CU.left_U_subset theorem subset_right_C (c : CU P) : c.C βŠ† c.right.C := Subset.trans c.left.subset c.left_U_subset_right_C #align urysohns.CU.subset_right_C Urysohns.CU.subset_right_C noncomputable def approx : β„• β†’ CU P β†’ X β†’ ℝ | 0, c, x => indicator c.Uᢜ 1 x | n + 1, c, x => midpoint ℝ (approx n c.left x) (approx n c.right x) #align urysohns.CU.approx Urysohns.CU.approx theorem approx_of_mem_C (c : CU P) (n : β„•) {x : X} (hx : x ∈ c.C) : c.approx n x = 0 := by induction' n with n ihn generalizing c Β· exact indicator_of_not_mem (fun (hU : x ∈ c.Uᢜ) => hU <| c.subset hx) _ Β· simp only [approx] rw [ihn, ihn, midpoint_self] exacts [c.subset_right_C hx, hx] #align urysohns.CU.approx_of_mem_C Urysohns.CU.approx_of_mem_C theorem approx_of_nmem_U (c : CU P) (n : β„•) {x : X} (hx : x βˆ‰ c.U) : c.approx n x = 1 := by induction' n with n ihn generalizing c Β· rw [← mem_compl_iff] at hx exact indicator_of_mem hx _ Β· simp only [approx] rw [ihn, ihn, midpoint_self] exacts [hx, fun hU => hx <| c.left_U_subset hU] #align urysohns.CU.approx_of_nmem_U Urysohns.CU.approx_of_nmem_U theorem approx_nonneg (c : CU P) (n : β„•) (x : X) : 0 ≀ c.approx n x := by induction' n with n ihn generalizing c Β· exact indicator_nonneg (fun _ _ => zero_le_one) _ Β· simp only [approx, midpoint_eq_smul_add, invOf_eq_inv] refine mul_nonneg (inv_nonneg.2 zero_le_two) (add_nonneg ?_ ?_) <;> apply ihn #align urysohns.CU.approx_nonneg Urysohns.CU.approx_nonneg theorem approx_le_one (c : CU P) (n : β„•) (x : X) : c.approx n x ≀ 1 := by induction' n with n ihn generalizing c Β· exact indicator_apply_le' (fun _ => le_rfl) fun _ => zero_le_one Β· simp only [approx, midpoint_eq_smul_add, invOf_eq_inv, smul_eq_mul, ← div_eq_inv_mul] have := add_le_add (ihn (left c)) (ihn (right c)) set_option tactic.skipAssignedInstances false in norm_num at this exact Iff.mpr (div_le_one zero_lt_two) this #align urysohns.CU.approx_le_one Urysohns.CU.approx_le_one theorem bddAbove_range_approx (c : CU P) (x : X) : BddAbove (range fun n => c.approx n x) := ⟨1, fun _ ⟨n, hn⟩ => hn β–Έ c.approx_le_one n x⟩ #align urysohns.CU.bdd_above_range_approx Urysohns.CU.bddAbove_range_approx
Mathlib/Topology/UrysohnsLemma.lean
199
207
theorem approx_le_approx_of_U_sub_C {c₁ cβ‚‚ : CU P} (h : c₁.U βŠ† cβ‚‚.C) (n₁ nβ‚‚ : β„•) (x : X) : cβ‚‚.approx nβ‚‚ x ≀ c₁.approx n₁ x := by
by_cases hx : x ∈ c₁.U Β· calc approx nβ‚‚ cβ‚‚ x = 0 := approx_of_mem_C _ _ (h hx) _ ≀ approx n₁ c₁ x := approx_nonneg _ _ _ Β· calc approx nβ‚‚ cβ‚‚ x ≀ 1 := approx_le_one _ _ _ _ = approx n₁ c₁ x := (approx_of_nmem_U _ _ hx).symm
1,753
import Mathlib.CategoryTheory.Adjunction.Reflective import Mathlib.Topology.StoneCech import Mathlib.CategoryTheory.Monad.Limits import Mathlib.Topology.UrysohnsLemma import Mathlib.Topology.Category.TopCat.Limits.Basic import Mathlib.Data.Set.Subsingleton import Mathlib.CategoryTheory.Elementwise #align_import topology.category.CompHaus.basic from "leanprover-community/mathlib"@"178a32653e369dce2da68dc6b2694e385d484ef1" universe v u -- This was a global instance prior to #13170. We may experiment with removing it. attribute [local instance] CategoryTheory.ConcreteCategory.instFunLike open CategoryTheory structure CompHaus where toTop : TopCat -- Porting note: Renamed field. [is_compact : CompactSpace toTop] [is_hausdorff : T2Space toTop] set_option linter.uppercaseLean3 false in #align CompHaus CompHaus namespace CompHaus instance : Inhabited CompHaus := ⟨{ toTop := { Ξ± := PEmpty } }⟩ instance : CoeSort CompHaus Type* := ⟨fun X => X.toTop⟩ instance {X : CompHaus} : CompactSpace X := X.is_compact instance {X : CompHaus} : T2Space X := X.is_hausdorff instance category : Category CompHaus := InducedCategory.category toTop set_option linter.uppercaseLean3 false in #align CompHaus.category CompHaus.category instance concreteCategory : ConcreteCategory CompHaus := InducedCategory.concreteCategory _ set_option linter.uppercaseLean3 false in #align CompHaus.concrete_category CompHaus.concreteCategory variable (X : Type*) [TopologicalSpace X] [CompactSpace X] [T2Space X] def of : CompHaus where toTop := TopCat.of X is_compact := β€Ή_β€Ί is_hausdorff := β€Ή_β€Ί set_option linter.uppercaseLean3 false in #align CompHaus.of CompHaus.of @[simp] theorem coe_of : (CompHaus.of X : Type _) = X := rfl set_option linter.uppercaseLean3 false in #align CompHaus.coe_of CompHaus.coe_of -- Porting note (#10754): Adding instance instance (X : CompHaus.{u}) : TopologicalSpace ((forget CompHaus).obj X) := show TopologicalSpace X.toTop from inferInstance -- Porting note (#10754): Adding instance instance (X : CompHaus.{u}) : CompactSpace ((forget CompHaus).obj X) := show CompactSpace X.toTop from inferInstance -- Porting note (#10754): Adding instance instance (X : CompHaus.{u}) : T2Space ((forget CompHaus).obj X) := show T2Space X.toTop from inferInstance theorem isClosedMap {X Y : CompHaus.{u}} (f : X ⟢ Y) : IsClosedMap f := fun _ hC => (hC.isCompact.image f.continuous).isClosed set_option linter.uppercaseLean3 false in #align CompHaus.is_closed_map CompHaus.isClosedMap
Mathlib/Topology/Category/CompHaus/Basic.lean
123
135
theorem isIso_of_bijective {X Y : CompHaus.{u}} (f : X ⟢ Y) (bij : Function.Bijective f) : IsIso f := by
let E := Equiv.ofBijective _ bij have hE : Continuous E.symm := by rw [continuous_iff_isClosed] intro S hS rw [← E.image_eq_preimage] exact isClosedMap f S hS refine ⟨⟨⟨E.symm, hE⟩, ?_, ?_⟩⟩ Β· ext x apply E.symm_apply_apply Β· ext x apply E.apply_symm_apply
1,754
import Mathlib.CategoryTheory.Monad.Types import Mathlib.CategoryTheory.Monad.Limits import Mathlib.CategoryTheory.Equivalence import Mathlib.Topology.Category.CompHaus.Basic import Mathlib.Topology.Category.Profinite.Basic import Mathlib.Data.Set.Constructions #align_import topology.category.Compactum from "leanprover-community/mathlib"@"f2ce6086713c78a7f880485f7917ea547a215982" -- Porting note: "Compactum" is already upper case set_option linter.uppercaseLean3 false universe u open CategoryTheory Filter Ultrafilter TopologicalSpace CategoryTheory.Limits FiniteInter open scoped Classical open Topology local notation "Ξ²" => ofTypeMonad Ultrafilter def Compactum := Monad.Algebra Ξ² deriving Category, Inhabited #align Compactum Compactum namespace Compactum def forget : Compactum β₯€ Type* := Monad.forget _ --deriving CreatesLimits, Faithful -- Porting note: deriving fails, adding manually. Note `CreatesLimits` now noncomputable #align Compactum.forget Compactum.forget instance : forget.Faithful := show (Monad.forget _).Faithful from inferInstance noncomputable instance : CreatesLimits forget := show CreatesLimits <| Monad.forget _ from inferInstance def free : Type* β₯€ Compactum := Monad.free _ #align Compactum.free Compactum.free def adj : free ⊣ forget := Monad.adj _ #align Compactum.adj Compactum.adj -- Basic instances instance : ConcreteCategory Compactum where forget := forget -- Porting note: changed from forget to X.A instance : CoeSort Compactum Type* := ⟨fun X => X.A⟩ instance {X Y : Compactum} : CoeFun (X ⟢ Y) fun _ => X β†’ Y := ⟨fun f => f.f⟩ instance : HasLimits Compactum := hasLimits_of_hasLimits_createsLimits forget def str (X : Compactum) : Ultrafilter X β†’ X := X.a #align Compactum.str Compactum.str def join (X : Compactum) : Ultrafilter (Ultrafilter X) β†’ Ultrafilter X := (Ξ² ).ΞΌ.app _ #align Compactum.join Compactum.join def incl (X : Compactum) : X β†’ Ultrafilter X := (Ξ² ).Ξ·.app _ #align Compactum.incl Compactum.incl @[simp]
Mathlib/Topology/Category/Compactum.lean
143
146
theorem str_incl (X : Compactum) (x : X) : X.str (X.incl x) = x := by
change ((Ξ² ).Ξ·.app _ ≫ X.a) _ = _ rw [Monad.Algebra.unit] rfl
1,755
import Mathlib.CategoryTheory.Monad.Types import Mathlib.CategoryTheory.Monad.Limits import Mathlib.CategoryTheory.Equivalence import Mathlib.Topology.Category.CompHaus.Basic import Mathlib.Topology.Category.Profinite.Basic import Mathlib.Data.Set.Constructions #align_import topology.category.Compactum from "leanprover-community/mathlib"@"f2ce6086713c78a7f880485f7917ea547a215982" -- Porting note: "Compactum" is already upper case set_option linter.uppercaseLean3 false universe u open CategoryTheory Filter Ultrafilter TopologicalSpace CategoryTheory.Limits FiniteInter open scoped Classical open Topology local notation "Ξ²" => ofTypeMonad Ultrafilter def Compactum := Monad.Algebra Ξ² deriving Category, Inhabited #align Compactum Compactum namespace Compactum def forget : Compactum β₯€ Type* := Monad.forget _ --deriving CreatesLimits, Faithful -- Porting note: deriving fails, adding manually. Note `CreatesLimits` now noncomputable #align Compactum.forget Compactum.forget instance : forget.Faithful := show (Monad.forget _).Faithful from inferInstance noncomputable instance : CreatesLimits forget := show CreatesLimits <| Monad.forget _ from inferInstance def free : Type* β₯€ Compactum := Monad.free _ #align Compactum.free Compactum.free def adj : free ⊣ forget := Monad.adj _ #align Compactum.adj Compactum.adj -- Basic instances instance : ConcreteCategory Compactum where forget := forget -- Porting note: changed from forget to X.A instance : CoeSort Compactum Type* := ⟨fun X => X.A⟩ instance {X Y : Compactum} : CoeFun (X ⟢ Y) fun _ => X β†’ Y := ⟨fun f => f.f⟩ instance : HasLimits Compactum := hasLimits_of_hasLimits_createsLimits forget def str (X : Compactum) : Ultrafilter X β†’ X := X.a #align Compactum.str Compactum.str def join (X : Compactum) : Ultrafilter (Ultrafilter X) β†’ Ultrafilter X := (Ξ² ).ΞΌ.app _ #align Compactum.join Compactum.join def incl (X : Compactum) : X β†’ Ultrafilter X := (Ξ² ).Ξ·.app _ #align Compactum.incl Compactum.incl @[simp] theorem str_incl (X : Compactum) (x : X) : X.str (X.incl x) = x := by change ((Ξ² ).Ξ·.app _ ≫ X.a) _ = _ rw [Monad.Algebra.unit] rfl #align Compactum.str_incl Compactum.str_incl @[simp]
Mathlib/Topology/Category/Compactum.lean
150
154
theorem str_hom_commute (X Y : Compactum) (f : X ⟢ Y) (xs : Ultrafilter X) : f (X.str xs) = Y.str (map f xs) := by
change (X.a ≫ f.f) _ = _ rw [← f.h] rfl
1,755
import Mathlib.CategoryTheory.Monad.Types import Mathlib.CategoryTheory.Monad.Limits import Mathlib.CategoryTheory.Equivalence import Mathlib.Topology.Category.CompHaus.Basic import Mathlib.Topology.Category.Profinite.Basic import Mathlib.Data.Set.Constructions #align_import topology.category.Compactum from "leanprover-community/mathlib"@"f2ce6086713c78a7f880485f7917ea547a215982" -- Porting note: "Compactum" is already upper case set_option linter.uppercaseLean3 false universe u open CategoryTheory Filter Ultrafilter TopologicalSpace CategoryTheory.Limits FiniteInter open scoped Classical open Topology local notation "Ξ²" => ofTypeMonad Ultrafilter def Compactum := Monad.Algebra Ξ² deriving Category, Inhabited #align Compactum Compactum namespace Compactum def forget : Compactum β₯€ Type* := Monad.forget _ --deriving CreatesLimits, Faithful -- Porting note: deriving fails, adding manually. Note `CreatesLimits` now noncomputable #align Compactum.forget Compactum.forget instance : forget.Faithful := show (Monad.forget _).Faithful from inferInstance noncomputable instance : CreatesLimits forget := show CreatesLimits <| Monad.forget _ from inferInstance def free : Type* β₯€ Compactum := Monad.free _ #align Compactum.free Compactum.free def adj : free ⊣ forget := Monad.adj _ #align Compactum.adj Compactum.adj -- Basic instances instance : ConcreteCategory Compactum where forget := forget -- Porting note: changed from forget to X.A instance : CoeSort Compactum Type* := ⟨fun X => X.A⟩ instance {X Y : Compactum} : CoeFun (X ⟢ Y) fun _ => X β†’ Y := ⟨fun f => f.f⟩ instance : HasLimits Compactum := hasLimits_of_hasLimits_createsLimits forget def str (X : Compactum) : Ultrafilter X β†’ X := X.a #align Compactum.str Compactum.str def join (X : Compactum) : Ultrafilter (Ultrafilter X) β†’ Ultrafilter X := (Ξ² ).ΞΌ.app _ #align Compactum.join Compactum.join def incl (X : Compactum) : X β†’ Ultrafilter X := (Ξ² ).Ξ·.app _ #align Compactum.incl Compactum.incl @[simp] theorem str_incl (X : Compactum) (x : X) : X.str (X.incl x) = x := by change ((Ξ² ).Ξ·.app _ ≫ X.a) _ = _ rw [Monad.Algebra.unit] rfl #align Compactum.str_incl Compactum.str_incl @[simp] theorem str_hom_commute (X Y : Compactum) (f : X ⟢ Y) (xs : Ultrafilter X) : f (X.str xs) = Y.str (map f xs) := by change (X.a ≫ f.f) _ = _ rw [← f.h] rfl #align Compactum.str_hom_commute Compactum.str_hom_commute @[simp]
Mathlib/Topology/Category/Compactum.lean
158
162
theorem join_distrib (X : Compactum) (uux : Ultrafilter (Ultrafilter X)) : X.str (X.join uux) = X.str (map X.str uux) := by
change ((Ξ² ).ΞΌ.app _ ≫ X.a) _ = _ rw [Monad.Algebra.assoc] rfl
1,755
import Mathlib.CategoryTheory.Monad.Types import Mathlib.CategoryTheory.Monad.Limits import Mathlib.CategoryTheory.Equivalence import Mathlib.Topology.Category.CompHaus.Basic import Mathlib.Topology.Category.Profinite.Basic import Mathlib.Data.Set.Constructions #align_import topology.category.Compactum from "leanprover-community/mathlib"@"f2ce6086713c78a7f880485f7917ea547a215982" -- Porting note: "Compactum" is already upper case set_option linter.uppercaseLean3 false universe u open CategoryTheory Filter Ultrafilter TopologicalSpace CategoryTheory.Limits FiniteInter open scoped Classical open Topology local notation "Ξ²" => ofTypeMonad Ultrafilter def Compactum := Monad.Algebra Ξ² deriving Category, Inhabited #align Compactum Compactum namespace Compactum def forget : Compactum β₯€ Type* := Monad.forget _ --deriving CreatesLimits, Faithful -- Porting note: deriving fails, adding manually. Note `CreatesLimits` now noncomputable #align Compactum.forget Compactum.forget instance : forget.Faithful := show (Monad.forget _).Faithful from inferInstance noncomputable instance : CreatesLimits forget := show CreatesLimits <| Monad.forget _ from inferInstance def free : Type* β₯€ Compactum := Monad.free _ #align Compactum.free Compactum.free def adj : free ⊣ forget := Monad.adj _ #align Compactum.adj Compactum.adj -- Basic instances instance : ConcreteCategory Compactum where forget := forget -- Porting note: changed from forget to X.A instance : CoeSort Compactum Type* := ⟨fun X => X.A⟩ instance {X Y : Compactum} : CoeFun (X ⟢ Y) fun _ => X β†’ Y := ⟨fun f => f.f⟩ instance : HasLimits Compactum := hasLimits_of_hasLimits_createsLimits forget def str (X : Compactum) : Ultrafilter X β†’ X := X.a #align Compactum.str Compactum.str def join (X : Compactum) : Ultrafilter (Ultrafilter X) β†’ Ultrafilter X := (Ξ² ).ΞΌ.app _ #align Compactum.join Compactum.join def incl (X : Compactum) : X β†’ Ultrafilter X := (Ξ² ).Ξ·.app _ #align Compactum.incl Compactum.incl @[simp] theorem str_incl (X : Compactum) (x : X) : X.str (X.incl x) = x := by change ((Ξ² ).Ξ·.app _ ≫ X.a) _ = _ rw [Monad.Algebra.unit] rfl #align Compactum.str_incl Compactum.str_incl @[simp] theorem str_hom_commute (X Y : Compactum) (f : X ⟢ Y) (xs : Ultrafilter X) : f (X.str xs) = Y.str (map f xs) := by change (X.a ≫ f.f) _ = _ rw [← f.h] rfl #align Compactum.str_hom_commute Compactum.str_hom_commute @[simp] theorem join_distrib (X : Compactum) (uux : Ultrafilter (Ultrafilter X)) : X.str (X.join uux) = X.str (map X.str uux) := by change ((Ξ² ).ΞΌ.app _ ≫ X.a) _ = _ rw [Monad.Algebra.assoc] rfl #align Compactum.join_distrib Compactum.join_distrib -- Porting note: changes to X.A from X since Lean can't see through X to X.A below instance {X : Compactum} : TopologicalSpace X.A where IsOpen U := βˆ€ F : Ultrafilter X, X.str F ∈ U β†’ U ∈ F isOpen_univ _ _ := Filter.univ_sets _ isOpen_inter _ _ h3 h4 _ h6 := Filter.inter_sets _ (h3 _ h6.1) (h4 _ h6.2) isOpen_sUnion := fun _ h1 _ ⟨T, hT, h2⟩ => mem_of_superset (h1 T hT _ h2) (Set.subset_sUnion_of_mem hT)
Mathlib/Topology/Category/Compactum.lean
173
185
theorem isClosed_iff {X : Compactum} (S : Set X) : IsClosed S ↔ βˆ€ F : Ultrafilter X, S ∈ F β†’ X.str F ∈ S := by
rw [← isOpen_compl_iff] constructor Β· intro cond F h by_contra c specialize cond F c rw [compl_mem_iff_not_mem] at cond contradiction Β· intro h1 F h2 specialize h1 F cases' F.mem_or_compl_mem S with h h exacts [absurd (h1 h) h2, h]
1,755
import Mathlib.Topology.Category.CompHaus.Basic import Mathlib.CategoryTheory.Limits.Shapes.Pullbacks import Mathlib.CategoryTheory.Extensive import Mathlib.CategoryTheory.Limits.Preserves.Finite namespace CompHaus attribute [local instance] CategoryTheory.ConcreteCategory.instFunLike universe u w open CategoryTheory Limits section Pullbacks variable {X Y B : CompHaus.{u}} (f : X ⟢ B) (g : Y ⟢ B) def pullback : CompHaus.{u} := letI set := { xy : X Γ— Y | f xy.fst = g xy.snd } haveI : CompactSpace set := isCompact_iff_compactSpace.mp (isClosed_eq (f.continuous.comp continuous_fst) (g.continuous.comp continuous_snd)).isCompact CompHaus.of set def pullback.fst : pullback f g ⟢ X where toFun := fun ⟨⟨x,_⟩,_⟩ => x continuous_toFun := Continuous.comp continuous_fst continuous_subtype_val def pullback.snd : pullback f g ⟢ Y where toFun := fun ⟨⟨_,y⟩,_⟩ => y continuous_toFun := Continuous.comp continuous_snd continuous_subtype_val @[reassoc] lemma pullback.condition : pullback.fst f g ≫ f = pullback.snd f g ≫ g := by ext ⟨_,h⟩; exact h def pullback.lift {Z : CompHaus.{u}} (a : Z ⟢ X) (b : Z ⟢ Y) (w : a ≫ f = b ≫ g) : Z ⟢ pullback f g where toFun := fun z => ⟨⟨a z, b z⟩, by apply_fun (fun q => q z) at w; exact w⟩ continuous_toFun := by apply Continuous.subtype_mk rw [continuous_prod_mk] exact ⟨a.continuous, b.continuous⟩ @[reassoc (attr := simp)] lemma pullback.lift_fst {Z : CompHaus.{u}} (a : Z ⟢ X) (b : Z ⟢ Y) (w : a ≫ f = b ≫ g) : pullback.lift f g a b w ≫ pullback.fst f g = a := rfl @[reassoc (attr := simp)] lemma pullback.lift_snd {Z : CompHaus.{u}} (a : Z ⟢ X) (b : Z ⟢ Y) (w : a ≫ f = b ≫ g) : pullback.lift f g a b w ≫ pullback.snd f g = b := rfl lemma pullback.hom_ext {Z : CompHaus.{u}} (a b : Z ⟢ pullback f g) (hfst : a ≫ pullback.fst f g = b ≫ pullback.fst f g) (hsnd : a ≫ pullback.snd f g = b ≫ pullback.snd f g) : a = b := by ext z apply_fun (fun q => q z) at hfst hsnd apply Subtype.ext apply Prod.ext Β· exact hfst Β· exact hsnd @[simps! pt Ο€] def pullback.cone : Limits.PullbackCone f g := Limits.PullbackCone.mk (pullback.fst f g) (pullback.snd f g) (pullback.condition f g) @[simps! lift] def pullback.isLimit : Limits.IsLimit (pullback.cone f g) := Limits.PullbackCone.isLimitAux _ (fun s => pullback.lift f g s.fst s.snd s.condition) (fun _ => pullback.lift_fst _ _ _ _ _) (fun _ => pullback.lift_snd _ _ _ _ _) (fun _ _ hm => pullback.hom_ext _ _ _ _ (hm .left) (hm .right)) section Isos noncomputable def pullbackIsoPullback : CompHaus.pullback f g β‰… Limits.pullback f g := Limits.IsLimit.conePointUniqueUpToIso (pullback.isLimit f g) (Limits.limit.isLimit _) noncomputable def pullbackHomeoPullback : (CompHaus.pullback f g).toTop β‰ƒβ‚œ (Limits.pullback f g).toTop := CompHaus.homeoOfIso (pullbackIsoPullback f g)
Mathlib/Topology/Category/CompHaus/Limits.lean
131
134
theorem pullback_fst_eq : CompHaus.pullback.fst f g = (pullbackIsoPullback f g).hom ≫ Limits.pullback.fst := by
dsimp [pullbackIsoPullback] simp only [Limits.limit.conePointUniqueUpToIso_hom_comp, pullback.cone_pt, pullback.cone_Ο€]
1,756
import Mathlib.Topology.Category.CompHaus.Basic import Mathlib.CategoryTheory.Limits.Shapes.Pullbacks import Mathlib.CategoryTheory.Extensive import Mathlib.CategoryTheory.Limits.Preserves.Finite namespace CompHaus attribute [local instance] CategoryTheory.ConcreteCategory.instFunLike universe u w open CategoryTheory Limits section Pullbacks variable {X Y B : CompHaus.{u}} (f : X ⟢ B) (g : Y ⟢ B) def pullback : CompHaus.{u} := letI set := { xy : X Γ— Y | f xy.fst = g xy.snd } haveI : CompactSpace set := isCompact_iff_compactSpace.mp (isClosed_eq (f.continuous.comp continuous_fst) (g.continuous.comp continuous_snd)).isCompact CompHaus.of set def pullback.fst : pullback f g ⟢ X where toFun := fun ⟨⟨x,_⟩,_⟩ => x continuous_toFun := Continuous.comp continuous_fst continuous_subtype_val def pullback.snd : pullback f g ⟢ Y where toFun := fun ⟨⟨_,y⟩,_⟩ => y continuous_toFun := Continuous.comp continuous_snd continuous_subtype_val @[reassoc] lemma pullback.condition : pullback.fst f g ≫ f = pullback.snd f g ≫ g := by ext ⟨_,h⟩; exact h def pullback.lift {Z : CompHaus.{u}} (a : Z ⟢ X) (b : Z ⟢ Y) (w : a ≫ f = b ≫ g) : Z ⟢ pullback f g where toFun := fun z => ⟨⟨a z, b z⟩, by apply_fun (fun q => q z) at w; exact w⟩ continuous_toFun := by apply Continuous.subtype_mk rw [continuous_prod_mk] exact ⟨a.continuous, b.continuous⟩ @[reassoc (attr := simp)] lemma pullback.lift_fst {Z : CompHaus.{u}} (a : Z ⟢ X) (b : Z ⟢ Y) (w : a ≫ f = b ≫ g) : pullback.lift f g a b w ≫ pullback.fst f g = a := rfl @[reassoc (attr := simp)] lemma pullback.lift_snd {Z : CompHaus.{u}} (a : Z ⟢ X) (b : Z ⟢ Y) (w : a ≫ f = b ≫ g) : pullback.lift f g a b w ≫ pullback.snd f g = b := rfl lemma pullback.hom_ext {Z : CompHaus.{u}} (a b : Z ⟢ pullback f g) (hfst : a ≫ pullback.fst f g = b ≫ pullback.fst f g) (hsnd : a ≫ pullback.snd f g = b ≫ pullback.snd f g) : a = b := by ext z apply_fun (fun q => q z) at hfst hsnd apply Subtype.ext apply Prod.ext Β· exact hfst Β· exact hsnd @[simps! pt Ο€] def pullback.cone : Limits.PullbackCone f g := Limits.PullbackCone.mk (pullback.fst f g) (pullback.snd f g) (pullback.condition f g) @[simps! lift] def pullback.isLimit : Limits.IsLimit (pullback.cone f g) := Limits.PullbackCone.isLimitAux _ (fun s => pullback.lift f g s.fst s.snd s.condition) (fun _ => pullback.lift_fst _ _ _ _ _) (fun _ => pullback.lift_snd _ _ _ _ _) (fun _ _ hm => pullback.hom_ext _ _ _ _ (hm .left) (hm .right)) section Isos noncomputable def pullbackIsoPullback : CompHaus.pullback f g β‰… Limits.pullback f g := Limits.IsLimit.conePointUniqueUpToIso (pullback.isLimit f g) (Limits.limit.isLimit _) noncomputable def pullbackHomeoPullback : (CompHaus.pullback f g).toTop β‰ƒβ‚œ (Limits.pullback f g).toTop := CompHaus.homeoOfIso (pullbackIsoPullback f g) theorem pullback_fst_eq : CompHaus.pullback.fst f g = (pullbackIsoPullback f g).hom ≫ Limits.pullback.fst := by dsimp [pullbackIsoPullback] simp only [Limits.limit.conePointUniqueUpToIso_hom_comp, pullback.cone_pt, pullback.cone_Ο€]
Mathlib/Topology/Category/CompHaus/Limits.lean
136
139
theorem pullback_snd_eq : CompHaus.pullback.snd f g = (pullbackIsoPullback f g).hom ≫ Limits.pullback.snd := by
dsimp [pullbackIsoPullback] simp only [Limits.limit.conePointUniqueUpToIso_hom_comp, pullback.cone_pt, pullback.cone_Ο€]
1,756
import Mathlib.Topology.Category.CompHaus.Basic import Mathlib.CategoryTheory.Limits.Shapes.Pullbacks import Mathlib.CategoryTheory.Extensive import Mathlib.CategoryTheory.Limits.Preserves.Finite namespace CompHaus attribute [local instance] CategoryTheory.ConcreteCategory.instFunLike universe u w open CategoryTheory Limits section Pullbacks variable {X Y B : CompHaus.{u}} (f : X ⟢ B) (g : Y ⟢ B) def pullback : CompHaus.{u} := letI set := { xy : X Γ— Y | f xy.fst = g xy.snd } haveI : CompactSpace set := isCompact_iff_compactSpace.mp (isClosed_eq (f.continuous.comp continuous_fst) (g.continuous.comp continuous_snd)).isCompact CompHaus.of set def pullback.fst : pullback f g ⟢ X where toFun := fun ⟨⟨x,_⟩,_⟩ => x continuous_toFun := Continuous.comp continuous_fst continuous_subtype_val def pullback.snd : pullback f g ⟢ Y where toFun := fun ⟨⟨_,y⟩,_⟩ => y continuous_toFun := Continuous.comp continuous_snd continuous_subtype_val @[reassoc] lemma pullback.condition : pullback.fst f g ≫ f = pullback.snd f g ≫ g := by ext ⟨_,h⟩; exact h def pullback.lift {Z : CompHaus.{u}} (a : Z ⟢ X) (b : Z ⟢ Y) (w : a ≫ f = b ≫ g) : Z ⟢ pullback f g where toFun := fun z => ⟨⟨a z, b z⟩, by apply_fun (fun q => q z) at w; exact w⟩ continuous_toFun := by apply Continuous.subtype_mk rw [continuous_prod_mk] exact ⟨a.continuous, b.continuous⟩ @[reassoc (attr := simp)] lemma pullback.lift_fst {Z : CompHaus.{u}} (a : Z ⟢ X) (b : Z ⟢ Y) (w : a ≫ f = b ≫ g) : pullback.lift f g a b w ≫ pullback.fst f g = a := rfl @[reassoc (attr := simp)] lemma pullback.lift_snd {Z : CompHaus.{u}} (a : Z ⟢ X) (b : Z ⟢ Y) (w : a ≫ f = b ≫ g) : pullback.lift f g a b w ≫ pullback.snd f g = b := rfl lemma pullback.hom_ext {Z : CompHaus.{u}} (a b : Z ⟢ pullback f g) (hfst : a ≫ pullback.fst f g = b ≫ pullback.fst f g) (hsnd : a ≫ pullback.snd f g = b ≫ pullback.snd f g) : a = b := by ext z apply_fun (fun q => q z) at hfst hsnd apply Subtype.ext apply Prod.ext Β· exact hfst Β· exact hsnd @[simps! pt Ο€] def pullback.cone : Limits.PullbackCone f g := Limits.PullbackCone.mk (pullback.fst f g) (pullback.snd f g) (pullback.condition f g) @[simps! lift] def pullback.isLimit : Limits.IsLimit (pullback.cone f g) := Limits.PullbackCone.isLimitAux _ (fun s => pullback.lift f g s.fst s.snd s.condition) (fun _ => pullback.lift_fst _ _ _ _ _) (fun _ => pullback.lift_snd _ _ _ _ _) (fun _ _ hm => pullback.hom_ext _ _ _ _ (hm .left) (hm .right)) section FiniteCoproducts variable {Ξ± : Type w} [Finite Ξ±] (X : Ξ± β†’ CompHaus) def finiteCoproduct : CompHaus := CompHaus.of <| Ξ£ (a : Ξ±), X a def finiteCoproduct.ΞΉ (a : Ξ±) : X a ⟢ finiteCoproduct X where toFun := fun x => ⟨a,x⟩ continuous_toFun := continuous_sigmaMk (Οƒ := fun a => X a) def finiteCoproduct.desc {B : CompHaus} (e : (a : Ξ±) β†’ (X a ⟢ B)) : finiteCoproduct X ⟢ B where toFun := fun ⟨a,x⟩ => e a x continuous_toFun := by apply continuous_sigma intro a; exact (e a).continuous @[reassoc (attr := simp)] lemma finiteCoproduct.ΞΉ_desc {B : CompHaus} (e : (a : Ξ±) β†’ (X a ⟢ B)) (a : Ξ±) : finiteCoproduct.ΞΉ X a ≫ finiteCoproduct.desc X e = e a := rfl lemma finiteCoproduct.hom_ext {B : CompHaus} (f g : finiteCoproduct X ⟢ B) (h : βˆ€ a : Ξ±, finiteCoproduct.ΞΉ X a ≫ f = finiteCoproduct.ΞΉ X a ≫ g) : f = g := by ext ⟨a,x⟩ specialize h a apply_fun (fun q => q x) at h exact h abbrev finiteCoproduct.cofan : Limits.Cofan X := Cofan.mk (finiteCoproduct X) (finiteCoproduct.ΞΉ X) def finiteCoproduct.isColimit : Limits.IsColimit (finiteCoproduct.cofan X) := mkCofanColimit _ (fun s ↦ desc _ fun a ↦ s.inj a) (fun _ _ ↦ ΞΉ_desc _ _ _) fun _ _ hm ↦ finiteCoproduct.hom_ext _ _ _ fun a ↦ (DFunLike.ext _ _ fun t ↦ congrFun (congrArg DFunLike.coe (hm a)) t) section Iso noncomputable def coproductIsoCoproduct : finiteCoproduct X β‰… ∐ X := Limits.IsColimit.coconePointUniqueUpToIso (finiteCoproduct.isColimit X) (Limits.colimit.isColimit _)
Mathlib/Topology/Category/CompHaus/Limits.lean
205
207
theorem Sigma.ΞΉ_comp_toFiniteCoproduct (a : Ξ±) : (Limits.Sigma.ΞΉ X a) ≫ (coproductIsoCoproduct X).inv = finiteCoproduct.ΞΉ X a := by
simp [coproductIsoCoproduct]
1,756
import Mathlib.Analysis.SpecificLimits.Basic import Mathlib.Topology.UrysohnsLemma import Mathlib.Topology.ContinuousFunction.Bounded import Mathlib.Topology.Metrizable.Basic #align_import topology.metric_space.metrizable from "leanprover-community/mathlib"@"f2ce6086713c78a7f880485f7917ea547a215982" open Set Filter Metric open scoped Topology BoundedContinuousFunction namespace TopologicalSpace section RegularSpace variable (X : Type*) [TopologicalSpace X] [RegularSpace X] [SecondCountableTopology X]
Mathlib/Topology/Metrizable/Urysohn.lean
37
106
theorem exists_inducing_l_infty : βˆƒ f : X β†’ β„• →ᡇ ℝ, Inducing f := by
-- Choose a countable basis, and consider the set `s` of pairs of set `(U, V)` such that `U ∈ B`, -- `V ∈ B`, and `closure U βŠ† V`. rcases exists_countable_basis X with ⟨B, hBc, -, hB⟩ let s : Set (Set X Γ— Set X) := { UV ∈ B Γ—Λ’ B | closure UV.1 βŠ† UV.2 } -- `s` is a countable set. haveI : Encodable s := ((hBc.prod hBc).mono inter_subset_left).toEncodable -- We don't have the space of bounded (possibly discontinuous) functions, so we equip `s` -- with the discrete topology and deal with `s →ᡇ ℝ` instead. letI : TopologicalSpace s := βŠ₯ haveI : DiscreteTopology s := ⟨rfl⟩ rsuffices ⟨f, hf⟩ : βˆƒ f : X β†’ s →ᡇ ℝ, Inducing f Β· exact ⟨fun x => (f x).extend (Encodable.encode' s) 0, (BoundedContinuousFunction.isometry_extend (Encodable.encode' s) (0 : β„• →ᡇ ℝ)).embedding.toInducing.comp hf⟩ have hd : βˆ€ UV : s, Disjoint (closure UV.1.1) UV.1.2ᢜ := fun UV => disjoint_compl_right.mono_right (compl_subset_compl.2 UV.2.2) -- Choose a sequence of `Ξ΅β‚™ > 0`, `n : s`, that is bounded above by `1` and tends to zero -- along the `cofinite` filter. obtain ⟨Ρ, Ξ΅01, hΡ⟩ : βˆƒ Ξ΅ : s β†’ ℝ, (βˆ€ UV, Ξ΅ UV ∈ Ioc (0 : ℝ) 1) ∧ Tendsto Ξ΅ cofinite (𝓝 0) := by rcases posSumOfEncodable zero_lt_one s with ⟨Ρ, Ξ΅0, c, hΞ΅c, hc1⟩ refine ⟨Ρ, fun UV => ⟨Ρ0 UV, ?_⟩, hΞ΅c.summable.tendsto_cofinite_zero⟩ exact (le_hasSum hΞ΅c UV fun _ _ => (Ξ΅0 _).le).trans hc1 /- For each `UV = (U, V) ∈ s` we use Urysohn's lemma to choose a function `f UV` that is equal to zero on `U` and is equal to `Ξ΅ UV` on the complement to `V`. -/ have : βˆ€ UV : s, βˆƒ f : C(X, ℝ), EqOn f 0 UV.1.1 ∧ EqOn f (fun _ => Ξ΅ UV) UV.1.2ᢜ ∧ βˆ€ x, f x ∈ Icc 0 (Ξ΅ UV) := by intro UV rcases exists_continuous_zero_one_of_isClosed isClosed_closure (hB.isOpen UV.2.1.2).isClosed_compl (hd UV) with ⟨f, hfβ‚€, hf₁, hf01⟩ exact ⟨Ρ UV β€’ f, fun x hx => by simp [hfβ‚€ (subset_closure hx)], fun x hx => by simp [hf₁ hx], fun x => ⟨mul_nonneg (Ξ΅01 _).1.le (hf01 _).1, mul_le_of_le_one_right (Ξ΅01 _).1.le (hf01 _).2⟩⟩ choose f hf0 hfΞ΅ hf0Ξ΅ using this have hf01 : βˆ€ UV x, f UV x ∈ Icc (0 : ℝ) 1 := fun UV x => Icc_subset_Icc_right (Ξ΅01 _).2 (hf0Ξ΅ _ _) -- The embedding is given by `F x UV = f UV x`. set F : X β†’ s →ᡇ ℝ := fun x => ⟨⟨fun UV => f UV x, continuous_of_discreteTopology⟩, 1, fun UV₁ UVβ‚‚ => Real.dist_le_of_mem_Icc_01 (hf01 _ _) (hf01 _ _)⟩ have hF : βˆ€ x UV, F x UV = f UV x := fun _ _ => rfl refine ⟨F, inducing_iff_nhds.2 fun x => le_antisymm ?_ ?_⟩ Β· /- First we prove that `F` is continuous. Given `Ξ΄ > 0`, consider the set `T` of `(U, V) ∈ s` such that `Ξ΅ (U, V) β‰₯ Ξ΄`. Since `Ξ΅` tends to zero, `T` is finite. Since each `f` is continuous, we can choose a neighborhood such that `dist (F y (U, V)) (F x (U, V)) ≀ Ξ΄` for any `(U, V) ∈ T`. For `(U, V) βˆ‰ T`, the same inequality is true because both `F y (U, V)` and `F x (U, V)` belong to the interval `[0, Ξ΅ (U, V)]`. -/ refine (nhds_basis_closedBall.comap _).ge_iff.2 fun Ξ΄ Ξ΄0 => ?_ have h_fin : { UV : s | Ξ΄ ≀ Ξ΅ UV }.Finite := by simpa only [← not_lt] using hΞ΅ (gt_mem_nhds Ξ΄0) have : βˆ€αΆ  y in 𝓝 x, βˆ€ UV, Ξ΄ ≀ Ξ΅ UV β†’ dist (F y UV) (F x UV) ≀ Ξ΄ := by refine (eventually_all_finite h_fin).2 fun UV _ => ?_ exact (f UV).continuous.tendsto x (closedBall_mem_nhds _ Ξ΄0) refine this.mono fun y hy => (BoundedContinuousFunction.dist_le Ξ΄0.le).2 fun UV => ?_ rcases le_total Ξ΄ (Ξ΅ UV) with hle | hle exacts [hy _ hle, (Real.dist_le_of_mem_Icc (hf0Ξ΅ _ _) (hf0Ξ΅ _ _)).trans (by rwa [sub_zero])] Β· /- Finally, we prove that each neighborhood `V` of `x : X` includes a preimage of a neighborhood of `F x` under `F`. Without loss of generality, `V` belongs to `B`. Choose `U ∈ B` such that `x ∈ V` and `closure V βŠ† U`. Then the preimage of the `(Ξ΅ (U, V))`-neighborhood of `F x` is included by `V`. -/ refine ((nhds_basis_ball.comap _).le_basis_iff hB.nhds_hasBasis).2 ?_ rintro V ⟨hVB, hxV⟩ rcases hB.exists_closure_subset (hB.mem_nhds hVB hxV) with ⟨U, hUB, hxU, hUV⟩ set UV : β†₯s := ⟨(U, V), ⟨hUB, hVB⟩, hUV⟩ refine ⟨Ρ UV, (Ξ΅01 UV).1, fun y (hy : dist (F y) (F x) < Ξ΅ UV) => ?_⟩ replace hy : dist (F y UV) (F x UV) < Ξ΅ UV := (BoundedContinuousFunction.dist_coe_le_dist _).trans_lt hy contrapose! hy rw [hF, hF, hfΞ΅ UV hy, hf0 UV hxU, Pi.zero_apply, dist_zero_right] exact le_abs_self _
1,757
import Mathlib.Algebra.BigOperators.Finprod import Mathlib.SetTheory.Ordinal.Basic import Mathlib.Topology.ContinuousFunction.Algebra import Mathlib.Topology.Compactness.Paracompact import Mathlib.Topology.ShrinkingLemma import Mathlib.Topology.UrysohnsLemma #align_import topology.partition_of_unity from "leanprover-community/mathlib"@"f2ce6086713c78a7f880485f7917ea547a215982" universe u v open Function Set Filter open scoped Classical open Topology noncomputable section structure PartitionOfUnity (ΞΉ X : Type*) [TopologicalSpace X] (s : Set X := univ) where toFun : ΞΉ β†’ C(X, ℝ) locallyFinite' : LocallyFinite fun i => support (toFun i) nonneg' : 0 ≀ toFun sum_eq_one' : βˆ€ x ∈ s, βˆ‘αΆ  i, toFun i x = 1 sum_le_one' : βˆ€ x, βˆ‘αΆ  i, toFun i x ≀ 1 #align partition_of_unity PartitionOfUnity structure BumpCovering (ΞΉ X : Type*) [TopologicalSpace X] (s : Set X := univ) where toFun : ΞΉ β†’ C(X, ℝ) locallyFinite' : LocallyFinite fun i => support (toFun i) nonneg' : 0 ≀ toFun le_one' : toFun ≀ 1 eventuallyEq_one' : βˆ€ x ∈ s, βˆƒ i, toFun i =αΆ [𝓝 x] 1 #align bump_covering BumpCovering variable {ΞΉ : Type u} {X : Type v} [TopologicalSpace X] namespace PartitionOfUnity variable {E : Type*} [AddCommMonoid E] [SMulWithZero ℝ E] [TopologicalSpace E] [ContinuousSMul ℝ E] {s : Set X} (f : PartitionOfUnity ΞΉ X s) instance : FunLike (PartitionOfUnity ΞΉ X s) ΞΉ C(X, ℝ) where coe := toFun coe_injective' := fun f g h ↦ by cases f; cases g; congr protected theorem locallyFinite : LocallyFinite fun i => support (f i) := f.locallyFinite' #align partition_of_unity.locally_finite PartitionOfUnity.locallyFinite theorem locallyFinite_tsupport : LocallyFinite fun i => tsupport (f i) := f.locallyFinite.closure #align partition_of_unity.locally_finite_tsupport PartitionOfUnity.locallyFinite_tsupport theorem nonneg (i : ΞΉ) (x : X) : 0 ≀ f i x := f.nonneg' i x #align partition_of_unity.nonneg PartitionOfUnity.nonneg theorem sum_eq_one {x : X} (hx : x ∈ s) : βˆ‘αΆ  i, f i x = 1 := f.sum_eq_one' x hx #align partition_of_unity.sum_eq_one PartitionOfUnity.sum_eq_one
Mathlib/Topology/PartitionOfUnity.lean
161
164
theorem exists_pos {x : X} (hx : x ∈ s) : βˆƒ i, 0 < f i x := by
have H := f.sum_eq_one hx contrapose! H simpa only [fun i => (H i).antisymm (f.nonneg i x), finsum_zero] using zero_ne_one
1,758
import Mathlib.Algebra.BigOperators.Finprod import Mathlib.SetTheory.Ordinal.Basic import Mathlib.Topology.ContinuousFunction.Algebra import Mathlib.Topology.Compactness.Paracompact import Mathlib.Topology.ShrinkingLemma import Mathlib.Topology.UrysohnsLemma #align_import topology.partition_of_unity from "leanprover-community/mathlib"@"f2ce6086713c78a7f880485f7917ea547a215982" universe u v open Function Set Filter open scoped Classical open Topology noncomputable section structure PartitionOfUnity (ΞΉ X : Type*) [TopologicalSpace X] (s : Set X := univ) where toFun : ΞΉ β†’ C(X, ℝ) locallyFinite' : LocallyFinite fun i => support (toFun i) nonneg' : 0 ≀ toFun sum_eq_one' : βˆ€ x ∈ s, βˆ‘αΆ  i, toFun i x = 1 sum_le_one' : βˆ€ x, βˆ‘αΆ  i, toFun i x ≀ 1 #align partition_of_unity PartitionOfUnity structure BumpCovering (ΞΉ X : Type*) [TopologicalSpace X] (s : Set X := univ) where toFun : ΞΉ β†’ C(X, ℝ) locallyFinite' : LocallyFinite fun i => support (toFun i) nonneg' : 0 ≀ toFun le_one' : toFun ≀ 1 eventuallyEq_one' : βˆ€ x ∈ s, βˆƒ i, toFun i =αΆ [𝓝 x] 1 #align bump_covering BumpCovering variable {ΞΉ : Type u} {X : Type v} [TopologicalSpace X] namespace PartitionOfUnity variable {E : Type*} [AddCommMonoid E] [SMulWithZero ℝ E] [TopologicalSpace E] [ContinuousSMul ℝ E] {s : Set X} (f : PartitionOfUnity ΞΉ X s) instance : FunLike (PartitionOfUnity ΞΉ X s) ΞΉ C(X, ℝ) where coe := toFun coe_injective' := fun f g h ↦ by cases f; cases g; congr protected theorem locallyFinite : LocallyFinite fun i => support (f i) := f.locallyFinite' #align partition_of_unity.locally_finite PartitionOfUnity.locallyFinite theorem locallyFinite_tsupport : LocallyFinite fun i => tsupport (f i) := f.locallyFinite.closure #align partition_of_unity.locally_finite_tsupport PartitionOfUnity.locallyFinite_tsupport theorem nonneg (i : ΞΉ) (x : X) : 0 ≀ f i x := f.nonneg' i x #align partition_of_unity.nonneg PartitionOfUnity.nonneg theorem sum_eq_one {x : X} (hx : x ∈ s) : βˆ‘αΆ  i, f i x = 1 := f.sum_eq_one' x hx #align partition_of_unity.sum_eq_one PartitionOfUnity.sum_eq_one theorem exists_pos {x : X} (hx : x ∈ s) : βˆƒ i, 0 < f i x := by have H := f.sum_eq_one hx contrapose! H simpa only [fun i => (H i).antisymm (f.nonneg i x), finsum_zero] using zero_ne_one #align partition_of_unity.exists_pos PartitionOfUnity.exists_pos theorem sum_le_one (x : X) : βˆ‘αΆ  i, f i x ≀ 1 := f.sum_le_one' x #align partition_of_unity.sum_le_one PartitionOfUnity.sum_le_one theorem sum_nonneg (x : X) : 0 ≀ βˆ‘αΆ  i, f i x := finsum_nonneg fun i => f.nonneg i x #align partition_of_unity.sum_nonneg PartitionOfUnity.sum_nonneg theorem le_one (i : ΞΉ) (x : X) : f i x ≀ 1 := (single_le_finsum i (f.locallyFinite.point_finite x) fun j => f.nonneg j x).trans (f.sum_le_one x) #align partition_of_unity.le_one PartitionOfUnity.le_one section finsupport variable {s : Set X} (ρ : PartitionOfUnity ΞΉ X s) (xβ‚€ : X) def finsupport : Finset ΞΉ := (ρ.locallyFinite.point_finite xβ‚€).toFinset @[simp]
Mathlib/Topology/PartitionOfUnity.lean
188
190
theorem mem_finsupport (xβ‚€ : X) {i} : i ∈ ρ.finsupport xβ‚€ ↔ i ∈ support fun i ↦ ρ i xβ‚€ := by
simp only [finsupport, mem_support, Finite.mem_toFinset, mem_setOf_eq]
1,758
import Mathlib.Algebra.BigOperators.Finprod import Mathlib.SetTheory.Ordinal.Basic import Mathlib.Topology.ContinuousFunction.Algebra import Mathlib.Topology.Compactness.Paracompact import Mathlib.Topology.ShrinkingLemma import Mathlib.Topology.UrysohnsLemma #align_import topology.partition_of_unity from "leanprover-community/mathlib"@"f2ce6086713c78a7f880485f7917ea547a215982" universe u v open Function Set Filter open scoped Classical open Topology noncomputable section structure PartitionOfUnity (ΞΉ X : Type*) [TopologicalSpace X] (s : Set X := univ) where toFun : ΞΉ β†’ C(X, ℝ) locallyFinite' : LocallyFinite fun i => support (toFun i) nonneg' : 0 ≀ toFun sum_eq_one' : βˆ€ x ∈ s, βˆ‘αΆ  i, toFun i x = 1 sum_le_one' : βˆ€ x, βˆ‘αΆ  i, toFun i x ≀ 1 #align partition_of_unity PartitionOfUnity structure BumpCovering (ΞΉ X : Type*) [TopologicalSpace X] (s : Set X := univ) where toFun : ΞΉ β†’ C(X, ℝ) locallyFinite' : LocallyFinite fun i => support (toFun i) nonneg' : 0 ≀ toFun le_one' : toFun ≀ 1 eventuallyEq_one' : βˆ€ x ∈ s, βˆƒ i, toFun i =αΆ [𝓝 x] 1 #align bump_covering BumpCovering variable {ΞΉ : Type u} {X : Type v} [TopologicalSpace X] namespace PartitionOfUnity variable {E : Type*} [AddCommMonoid E] [SMulWithZero ℝ E] [TopologicalSpace E] [ContinuousSMul ℝ E] {s : Set X} (f : PartitionOfUnity ΞΉ X s) instance : FunLike (PartitionOfUnity ΞΉ X s) ΞΉ C(X, ℝ) where coe := toFun coe_injective' := fun f g h ↦ by cases f; cases g; congr protected theorem locallyFinite : LocallyFinite fun i => support (f i) := f.locallyFinite' #align partition_of_unity.locally_finite PartitionOfUnity.locallyFinite theorem locallyFinite_tsupport : LocallyFinite fun i => tsupport (f i) := f.locallyFinite.closure #align partition_of_unity.locally_finite_tsupport PartitionOfUnity.locallyFinite_tsupport theorem nonneg (i : ΞΉ) (x : X) : 0 ≀ f i x := f.nonneg' i x #align partition_of_unity.nonneg PartitionOfUnity.nonneg theorem sum_eq_one {x : X} (hx : x ∈ s) : βˆ‘αΆ  i, f i x = 1 := f.sum_eq_one' x hx #align partition_of_unity.sum_eq_one PartitionOfUnity.sum_eq_one theorem exists_pos {x : X} (hx : x ∈ s) : βˆƒ i, 0 < f i x := by have H := f.sum_eq_one hx contrapose! H simpa only [fun i => (H i).antisymm (f.nonneg i x), finsum_zero] using zero_ne_one #align partition_of_unity.exists_pos PartitionOfUnity.exists_pos theorem sum_le_one (x : X) : βˆ‘αΆ  i, f i x ≀ 1 := f.sum_le_one' x #align partition_of_unity.sum_le_one PartitionOfUnity.sum_le_one theorem sum_nonneg (x : X) : 0 ≀ βˆ‘αΆ  i, f i x := finsum_nonneg fun i => f.nonneg i x #align partition_of_unity.sum_nonneg PartitionOfUnity.sum_nonneg theorem le_one (i : ΞΉ) (x : X) : f i x ≀ 1 := (single_le_finsum i (f.locallyFinite.point_finite x) fun j => f.nonneg j x).trans (f.sum_le_one x) #align partition_of_unity.le_one PartitionOfUnity.le_one section finsupport variable {s : Set X} (ρ : PartitionOfUnity ΞΉ X s) (xβ‚€ : X) def finsupport : Finset ΞΉ := (ρ.locallyFinite.point_finite xβ‚€).toFinset @[simp] theorem mem_finsupport (xβ‚€ : X) {i} : i ∈ ρ.finsupport xβ‚€ ↔ i ∈ support fun i ↦ ρ i xβ‚€ := by simp only [finsupport, mem_support, Finite.mem_toFinset, mem_setOf_eq] @[simp]
Mathlib/Topology/PartitionOfUnity.lean
193
196
theorem coe_finsupport (xβ‚€ : X) : (ρ.finsupport xβ‚€ : Set ΞΉ) = support fun i ↦ ρ i xβ‚€ := by
ext rw [Finset.mem_coe, mem_finsupport]
1,758
import Mathlib.Algebra.BigOperators.Finprod import Mathlib.SetTheory.Ordinal.Basic import Mathlib.Topology.ContinuousFunction.Algebra import Mathlib.Topology.Compactness.Paracompact import Mathlib.Topology.ShrinkingLemma import Mathlib.Topology.UrysohnsLemma #align_import topology.partition_of_unity from "leanprover-community/mathlib"@"f2ce6086713c78a7f880485f7917ea547a215982" universe u v open Function Set Filter open scoped Classical open Topology noncomputable section structure PartitionOfUnity (ΞΉ X : Type*) [TopologicalSpace X] (s : Set X := univ) where toFun : ΞΉ β†’ C(X, ℝ) locallyFinite' : LocallyFinite fun i => support (toFun i) nonneg' : 0 ≀ toFun sum_eq_one' : βˆ€ x ∈ s, βˆ‘αΆ  i, toFun i x = 1 sum_le_one' : βˆ€ x, βˆ‘αΆ  i, toFun i x ≀ 1 #align partition_of_unity PartitionOfUnity structure BumpCovering (ΞΉ X : Type*) [TopologicalSpace X] (s : Set X := univ) where toFun : ΞΉ β†’ C(X, ℝ) locallyFinite' : LocallyFinite fun i => support (toFun i) nonneg' : 0 ≀ toFun le_one' : toFun ≀ 1 eventuallyEq_one' : βˆ€ x ∈ s, βˆƒ i, toFun i =αΆ [𝓝 x] 1 #align bump_covering BumpCovering variable {ΞΉ : Type u} {X : Type v} [TopologicalSpace X] namespace PartitionOfUnity variable {E : Type*} [AddCommMonoid E] [SMulWithZero ℝ E] [TopologicalSpace E] [ContinuousSMul ℝ E] {s : Set X} (f : PartitionOfUnity ΞΉ X s) instance : FunLike (PartitionOfUnity ΞΉ X s) ΞΉ C(X, ℝ) where coe := toFun coe_injective' := fun f g h ↦ by cases f; cases g; congr protected theorem locallyFinite : LocallyFinite fun i => support (f i) := f.locallyFinite' #align partition_of_unity.locally_finite PartitionOfUnity.locallyFinite theorem locallyFinite_tsupport : LocallyFinite fun i => tsupport (f i) := f.locallyFinite.closure #align partition_of_unity.locally_finite_tsupport PartitionOfUnity.locallyFinite_tsupport theorem nonneg (i : ΞΉ) (x : X) : 0 ≀ f i x := f.nonneg' i x #align partition_of_unity.nonneg PartitionOfUnity.nonneg theorem sum_eq_one {x : X} (hx : x ∈ s) : βˆ‘αΆ  i, f i x = 1 := f.sum_eq_one' x hx #align partition_of_unity.sum_eq_one PartitionOfUnity.sum_eq_one theorem exists_pos {x : X} (hx : x ∈ s) : βˆƒ i, 0 < f i x := by have H := f.sum_eq_one hx contrapose! H simpa only [fun i => (H i).antisymm (f.nonneg i x), finsum_zero] using zero_ne_one #align partition_of_unity.exists_pos PartitionOfUnity.exists_pos theorem sum_le_one (x : X) : βˆ‘αΆ  i, f i x ≀ 1 := f.sum_le_one' x #align partition_of_unity.sum_le_one PartitionOfUnity.sum_le_one theorem sum_nonneg (x : X) : 0 ≀ βˆ‘αΆ  i, f i x := finsum_nonneg fun i => f.nonneg i x #align partition_of_unity.sum_nonneg PartitionOfUnity.sum_nonneg theorem le_one (i : ΞΉ) (x : X) : f i x ≀ 1 := (single_le_finsum i (f.locallyFinite.point_finite x) fun j => f.nonneg j x).trans (f.sum_le_one x) #align partition_of_unity.le_one PartitionOfUnity.le_one section finsupport variable {s : Set X} (ρ : PartitionOfUnity ΞΉ X s) (xβ‚€ : X) def finsupport : Finset ΞΉ := (ρ.locallyFinite.point_finite xβ‚€).toFinset @[simp] theorem mem_finsupport (xβ‚€ : X) {i} : i ∈ ρ.finsupport xβ‚€ ↔ i ∈ support fun i ↦ ρ i xβ‚€ := by simp only [finsupport, mem_support, Finite.mem_toFinset, mem_setOf_eq] @[simp] theorem coe_finsupport (xβ‚€ : X) : (ρ.finsupport xβ‚€ : Set ΞΉ) = support fun i ↦ ρ i xβ‚€ := by ext rw [Finset.mem_coe, mem_finsupport] variable {xβ‚€ : X}
Mathlib/Topology/PartitionOfUnity.lean
200
201
theorem sum_finsupport (hxβ‚€ : xβ‚€ ∈ s) : βˆ‘ i ∈ ρ.finsupport xβ‚€, ρ i xβ‚€ = 1 := by
rw [← ρ.sum_eq_one hxβ‚€, finsum_eq_sum_of_support_subset _ (ρ.coe_finsupport xβ‚€).superset]
1,758
import Mathlib.Algebra.BigOperators.Finprod import Mathlib.SetTheory.Ordinal.Basic import Mathlib.Topology.ContinuousFunction.Algebra import Mathlib.Topology.Compactness.Paracompact import Mathlib.Topology.ShrinkingLemma import Mathlib.Topology.UrysohnsLemma #align_import topology.partition_of_unity from "leanprover-community/mathlib"@"f2ce6086713c78a7f880485f7917ea547a215982" universe u v open Function Set Filter open scoped Classical open Topology noncomputable section structure PartitionOfUnity (ΞΉ X : Type*) [TopologicalSpace X] (s : Set X := univ) where toFun : ΞΉ β†’ C(X, ℝ) locallyFinite' : LocallyFinite fun i => support (toFun i) nonneg' : 0 ≀ toFun sum_eq_one' : βˆ€ x ∈ s, βˆ‘αΆ  i, toFun i x = 1 sum_le_one' : βˆ€ x, βˆ‘αΆ  i, toFun i x ≀ 1 #align partition_of_unity PartitionOfUnity structure BumpCovering (ΞΉ X : Type*) [TopologicalSpace X] (s : Set X := univ) where toFun : ΞΉ β†’ C(X, ℝ) locallyFinite' : LocallyFinite fun i => support (toFun i) nonneg' : 0 ≀ toFun le_one' : toFun ≀ 1 eventuallyEq_one' : βˆ€ x ∈ s, βˆƒ i, toFun i =αΆ [𝓝 x] 1 #align bump_covering BumpCovering variable {ΞΉ : Type u} {X : Type v} [TopologicalSpace X] namespace PartitionOfUnity variable {E : Type*} [AddCommMonoid E] [SMulWithZero ℝ E] [TopologicalSpace E] [ContinuousSMul ℝ E] {s : Set X} (f : PartitionOfUnity ΞΉ X s) instance : FunLike (PartitionOfUnity ΞΉ X s) ΞΉ C(X, ℝ) where coe := toFun coe_injective' := fun f g h ↦ by cases f; cases g; congr protected theorem locallyFinite : LocallyFinite fun i => support (f i) := f.locallyFinite' #align partition_of_unity.locally_finite PartitionOfUnity.locallyFinite theorem locallyFinite_tsupport : LocallyFinite fun i => tsupport (f i) := f.locallyFinite.closure #align partition_of_unity.locally_finite_tsupport PartitionOfUnity.locallyFinite_tsupport theorem nonneg (i : ΞΉ) (x : X) : 0 ≀ f i x := f.nonneg' i x #align partition_of_unity.nonneg PartitionOfUnity.nonneg theorem sum_eq_one {x : X} (hx : x ∈ s) : βˆ‘αΆ  i, f i x = 1 := f.sum_eq_one' x hx #align partition_of_unity.sum_eq_one PartitionOfUnity.sum_eq_one theorem exists_pos {x : X} (hx : x ∈ s) : βˆƒ i, 0 < f i x := by have H := f.sum_eq_one hx contrapose! H simpa only [fun i => (H i).antisymm (f.nonneg i x), finsum_zero] using zero_ne_one #align partition_of_unity.exists_pos PartitionOfUnity.exists_pos theorem sum_le_one (x : X) : βˆ‘αΆ  i, f i x ≀ 1 := f.sum_le_one' x #align partition_of_unity.sum_le_one PartitionOfUnity.sum_le_one theorem sum_nonneg (x : X) : 0 ≀ βˆ‘αΆ  i, f i x := finsum_nonneg fun i => f.nonneg i x #align partition_of_unity.sum_nonneg PartitionOfUnity.sum_nonneg theorem le_one (i : ΞΉ) (x : X) : f i x ≀ 1 := (single_le_finsum i (f.locallyFinite.point_finite x) fun j => f.nonneg j x).trans (f.sum_le_one x) #align partition_of_unity.le_one PartitionOfUnity.le_one section finsupport variable {s : Set X} (ρ : PartitionOfUnity ΞΉ X s) (xβ‚€ : X) def finsupport : Finset ΞΉ := (ρ.locallyFinite.point_finite xβ‚€).toFinset @[simp] theorem mem_finsupport (xβ‚€ : X) {i} : i ∈ ρ.finsupport xβ‚€ ↔ i ∈ support fun i ↦ ρ i xβ‚€ := by simp only [finsupport, mem_support, Finite.mem_toFinset, mem_setOf_eq] @[simp] theorem coe_finsupport (xβ‚€ : X) : (ρ.finsupport xβ‚€ : Set ΞΉ) = support fun i ↦ ρ i xβ‚€ := by ext rw [Finset.mem_coe, mem_finsupport] variable {xβ‚€ : X} theorem sum_finsupport (hxβ‚€ : xβ‚€ ∈ s) : βˆ‘ i ∈ ρ.finsupport xβ‚€, ρ i xβ‚€ = 1 := by rw [← ρ.sum_eq_one hxβ‚€, finsum_eq_sum_of_support_subset _ (ρ.coe_finsupport xβ‚€).superset]
Mathlib/Topology/PartitionOfUnity.lean
203
212
theorem sum_finsupport' (hxβ‚€ : xβ‚€ ∈ s) {I : Finset ΞΉ} (hI : ρ.finsupport xβ‚€ βŠ† I) : βˆ‘ i ∈ I, ρ i xβ‚€ = 1 := by
classical rw [← Finset.sum_sdiff hI, ρ.sum_finsupport hxβ‚€] suffices βˆ‘ i ∈ I \ ρ.finsupport xβ‚€, (ρ i) xβ‚€ = βˆ‘ i ∈ I \ ρ.finsupport xβ‚€, 0 by rw [this, add_left_eq_self, Finset.sum_const_zero] apply Finset.sum_congr rfl rintro x hx simp only [Finset.mem_sdiff, ρ.mem_finsupport, mem_support, Classical.not_not] at hx exact hx.2
1,758
import Mathlib.Algebra.BigOperators.Finprod import Mathlib.SetTheory.Ordinal.Basic import Mathlib.Topology.ContinuousFunction.Algebra import Mathlib.Topology.Compactness.Paracompact import Mathlib.Topology.ShrinkingLemma import Mathlib.Topology.UrysohnsLemma #align_import topology.partition_of_unity from "leanprover-community/mathlib"@"f2ce6086713c78a7f880485f7917ea547a215982" universe u v open Function Set Filter open scoped Classical open Topology noncomputable section structure PartitionOfUnity (ΞΉ X : Type*) [TopologicalSpace X] (s : Set X := univ) where toFun : ΞΉ β†’ C(X, ℝ) locallyFinite' : LocallyFinite fun i => support (toFun i) nonneg' : 0 ≀ toFun sum_eq_one' : βˆ€ x ∈ s, βˆ‘αΆ  i, toFun i x = 1 sum_le_one' : βˆ€ x, βˆ‘αΆ  i, toFun i x ≀ 1 #align partition_of_unity PartitionOfUnity structure BumpCovering (ΞΉ X : Type*) [TopologicalSpace X] (s : Set X := univ) where toFun : ΞΉ β†’ C(X, ℝ) locallyFinite' : LocallyFinite fun i => support (toFun i) nonneg' : 0 ≀ toFun le_one' : toFun ≀ 1 eventuallyEq_one' : βˆ€ x ∈ s, βˆƒ i, toFun i =αΆ [𝓝 x] 1 #align bump_covering BumpCovering variable {ΞΉ : Type u} {X : Type v} [TopologicalSpace X] namespace PartitionOfUnity variable {E : Type*} [AddCommMonoid E] [SMulWithZero ℝ E] [TopologicalSpace E] [ContinuousSMul ℝ E] {s : Set X} (f : PartitionOfUnity ΞΉ X s) instance : FunLike (PartitionOfUnity ΞΉ X s) ΞΉ C(X, ℝ) where coe := toFun coe_injective' := fun f g h ↦ by cases f; cases g; congr protected theorem locallyFinite : LocallyFinite fun i => support (f i) := f.locallyFinite' #align partition_of_unity.locally_finite PartitionOfUnity.locallyFinite theorem locallyFinite_tsupport : LocallyFinite fun i => tsupport (f i) := f.locallyFinite.closure #align partition_of_unity.locally_finite_tsupport PartitionOfUnity.locallyFinite_tsupport theorem nonneg (i : ΞΉ) (x : X) : 0 ≀ f i x := f.nonneg' i x #align partition_of_unity.nonneg PartitionOfUnity.nonneg theorem sum_eq_one {x : X} (hx : x ∈ s) : βˆ‘αΆ  i, f i x = 1 := f.sum_eq_one' x hx #align partition_of_unity.sum_eq_one PartitionOfUnity.sum_eq_one theorem exists_pos {x : X} (hx : x ∈ s) : βˆƒ i, 0 < f i x := by have H := f.sum_eq_one hx contrapose! H simpa only [fun i => (H i).antisymm (f.nonneg i x), finsum_zero] using zero_ne_one #align partition_of_unity.exists_pos PartitionOfUnity.exists_pos theorem sum_le_one (x : X) : βˆ‘αΆ  i, f i x ≀ 1 := f.sum_le_one' x #align partition_of_unity.sum_le_one PartitionOfUnity.sum_le_one theorem sum_nonneg (x : X) : 0 ≀ βˆ‘αΆ  i, f i x := finsum_nonneg fun i => f.nonneg i x #align partition_of_unity.sum_nonneg PartitionOfUnity.sum_nonneg theorem le_one (i : ΞΉ) (x : X) : f i x ≀ 1 := (single_le_finsum i (f.locallyFinite.point_finite x) fun j => f.nonneg j x).trans (f.sum_le_one x) #align partition_of_unity.le_one PartitionOfUnity.le_one section finsupport variable {s : Set X} (ρ : PartitionOfUnity ΞΉ X s) (xβ‚€ : X) def finsupport : Finset ΞΉ := (ρ.locallyFinite.point_finite xβ‚€).toFinset @[simp] theorem mem_finsupport (xβ‚€ : X) {i} : i ∈ ρ.finsupport xβ‚€ ↔ i ∈ support fun i ↦ ρ i xβ‚€ := by simp only [finsupport, mem_support, Finite.mem_toFinset, mem_setOf_eq] @[simp] theorem coe_finsupport (xβ‚€ : X) : (ρ.finsupport xβ‚€ : Set ΞΉ) = support fun i ↦ ρ i xβ‚€ := by ext rw [Finset.mem_coe, mem_finsupport] variable {xβ‚€ : X} theorem sum_finsupport (hxβ‚€ : xβ‚€ ∈ s) : βˆ‘ i ∈ ρ.finsupport xβ‚€, ρ i xβ‚€ = 1 := by rw [← ρ.sum_eq_one hxβ‚€, finsum_eq_sum_of_support_subset _ (ρ.coe_finsupport xβ‚€).superset] theorem sum_finsupport' (hxβ‚€ : xβ‚€ ∈ s) {I : Finset ΞΉ} (hI : ρ.finsupport xβ‚€ βŠ† I) : βˆ‘ i ∈ I, ρ i xβ‚€ = 1 := by classical rw [← Finset.sum_sdiff hI, ρ.sum_finsupport hxβ‚€] suffices βˆ‘ i ∈ I \ ρ.finsupport xβ‚€, (ρ i) xβ‚€ = βˆ‘ i ∈ I \ ρ.finsupport xβ‚€, 0 by rw [this, add_left_eq_self, Finset.sum_const_zero] apply Finset.sum_congr rfl rintro x hx simp only [Finset.mem_sdiff, ρ.mem_finsupport, mem_support, Classical.not_not] at hx exact hx.2
Mathlib/Topology/PartitionOfUnity.lean
214
220
theorem sum_finsupport_smul_eq_finsum {M : Type*} [AddCommGroup M] [Module ℝ M] (Ο† : ΞΉ β†’ X β†’ M) : βˆ‘ i ∈ ρ.finsupport xβ‚€, ρ i xβ‚€ β€’ Ο† i xβ‚€ = βˆ‘αΆ  i, ρ i xβ‚€ β€’ Ο† i xβ‚€ := by
apply (finsum_eq_sum_of_support_subset _ _).symm have : (fun i ↦ (ρ i) xβ‚€ β€’ Ο† i xβ‚€) = (fun i ↦ (ρ i) xβ‚€) β€’ (fun i ↦ Ο† i xβ‚€) := funext fun _ => (Pi.smul_apply' _ _ _).symm rw [ρ.coe_finsupport xβ‚€, this, support_smul] exact inter_subset_left
1,758
import Mathlib.Algebra.BigOperators.Finprod import Mathlib.SetTheory.Ordinal.Basic import Mathlib.Topology.ContinuousFunction.Algebra import Mathlib.Topology.Compactness.Paracompact import Mathlib.Topology.ShrinkingLemma import Mathlib.Topology.UrysohnsLemma #align_import topology.partition_of_unity from "leanprover-community/mathlib"@"f2ce6086713c78a7f880485f7917ea547a215982" universe u v open Function Set Filter open scoped Classical open Topology noncomputable section structure PartitionOfUnity (ΞΉ X : Type*) [TopologicalSpace X] (s : Set X := univ) where toFun : ΞΉ β†’ C(X, ℝ) locallyFinite' : LocallyFinite fun i => support (toFun i) nonneg' : 0 ≀ toFun sum_eq_one' : βˆ€ x ∈ s, βˆ‘αΆ  i, toFun i x = 1 sum_le_one' : βˆ€ x, βˆ‘αΆ  i, toFun i x ≀ 1 #align partition_of_unity PartitionOfUnity structure BumpCovering (ΞΉ X : Type*) [TopologicalSpace X] (s : Set X := univ) where toFun : ΞΉ β†’ C(X, ℝ) locallyFinite' : LocallyFinite fun i => support (toFun i) nonneg' : 0 ≀ toFun le_one' : toFun ≀ 1 eventuallyEq_one' : βˆ€ x ∈ s, βˆƒ i, toFun i =αΆ [𝓝 x] 1 #align bump_covering BumpCovering variable {ΞΉ : Type u} {X : Type v} [TopologicalSpace X] namespace PartitionOfUnity variable {E : Type*} [AddCommMonoid E] [SMulWithZero ℝ E] [TopologicalSpace E] [ContinuousSMul ℝ E] {s : Set X} (f : PartitionOfUnity ΞΉ X s) instance : FunLike (PartitionOfUnity ΞΉ X s) ΞΉ C(X, ℝ) where coe := toFun coe_injective' := fun f g h ↦ by cases f; cases g; congr protected theorem locallyFinite : LocallyFinite fun i => support (f i) := f.locallyFinite' #align partition_of_unity.locally_finite PartitionOfUnity.locallyFinite theorem locallyFinite_tsupport : LocallyFinite fun i => tsupport (f i) := f.locallyFinite.closure #align partition_of_unity.locally_finite_tsupport PartitionOfUnity.locallyFinite_tsupport theorem nonneg (i : ΞΉ) (x : X) : 0 ≀ f i x := f.nonneg' i x #align partition_of_unity.nonneg PartitionOfUnity.nonneg theorem sum_eq_one {x : X} (hx : x ∈ s) : βˆ‘αΆ  i, f i x = 1 := f.sum_eq_one' x hx #align partition_of_unity.sum_eq_one PartitionOfUnity.sum_eq_one theorem exists_pos {x : X} (hx : x ∈ s) : βˆƒ i, 0 < f i x := by have H := f.sum_eq_one hx contrapose! H simpa only [fun i => (H i).antisymm (f.nonneg i x), finsum_zero] using zero_ne_one #align partition_of_unity.exists_pos PartitionOfUnity.exists_pos theorem sum_le_one (x : X) : βˆ‘αΆ  i, f i x ≀ 1 := f.sum_le_one' x #align partition_of_unity.sum_le_one PartitionOfUnity.sum_le_one theorem sum_nonneg (x : X) : 0 ≀ βˆ‘αΆ  i, f i x := finsum_nonneg fun i => f.nonneg i x #align partition_of_unity.sum_nonneg PartitionOfUnity.sum_nonneg theorem le_one (i : ΞΉ) (x : X) : f i x ≀ 1 := (single_le_finsum i (f.locallyFinite.point_finite x) fun j => f.nonneg j x).trans (f.sum_le_one x) #align partition_of_unity.le_one PartitionOfUnity.le_one section fintsupport -- partitions of unity have locally finite `tsupport` variable {s : Set X} (ρ : PartitionOfUnity ΞΉ X s) (xβ‚€ : X)
Mathlib/Topology/PartitionOfUnity.lean
229
234
theorem finite_tsupport : {i | xβ‚€ ∈ tsupport (ρ i)}.Finite := by
rcases ρ.locallyFinite xβ‚€ with ⟨t, t_in, ht⟩ apply ht.subset rintro i hi simp only [inter_comm] exact mem_closure_iff_nhds.mp hi t t_in
1,758
import Mathlib.Algebra.BigOperators.Finprod import Mathlib.SetTheory.Ordinal.Basic import Mathlib.Topology.ContinuousFunction.Algebra import Mathlib.Topology.Compactness.Paracompact import Mathlib.Topology.ShrinkingLemma import Mathlib.Topology.UrysohnsLemma #align_import topology.partition_of_unity from "leanprover-community/mathlib"@"f2ce6086713c78a7f880485f7917ea547a215982" universe u v open Function Set Filter open scoped Classical open Topology noncomputable section structure PartitionOfUnity (ΞΉ X : Type*) [TopologicalSpace X] (s : Set X := univ) where toFun : ΞΉ β†’ C(X, ℝ) locallyFinite' : LocallyFinite fun i => support (toFun i) nonneg' : 0 ≀ toFun sum_eq_one' : βˆ€ x ∈ s, βˆ‘αΆ  i, toFun i x = 1 sum_le_one' : βˆ€ x, βˆ‘αΆ  i, toFun i x ≀ 1 #align partition_of_unity PartitionOfUnity structure BumpCovering (ΞΉ X : Type*) [TopologicalSpace X] (s : Set X := univ) where toFun : ΞΉ β†’ C(X, ℝ) locallyFinite' : LocallyFinite fun i => support (toFun i) nonneg' : 0 ≀ toFun le_one' : toFun ≀ 1 eventuallyEq_one' : βˆ€ x ∈ s, βˆƒ i, toFun i =αΆ [𝓝 x] 1 #align bump_covering BumpCovering variable {ΞΉ : Type u} {X : Type v} [TopologicalSpace X] namespace PartitionOfUnity variable {E : Type*} [AddCommMonoid E] [SMulWithZero ℝ E] [TopologicalSpace E] [ContinuousSMul ℝ E] {s : Set X} (f : PartitionOfUnity ΞΉ X s) instance : FunLike (PartitionOfUnity ΞΉ X s) ΞΉ C(X, ℝ) where coe := toFun coe_injective' := fun f g h ↦ by cases f; cases g; congr protected theorem locallyFinite : LocallyFinite fun i => support (f i) := f.locallyFinite' #align partition_of_unity.locally_finite PartitionOfUnity.locallyFinite theorem locallyFinite_tsupport : LocallyFinite fun i => tsupport (f i) := f.locallyFinite.closure #align partition_of_unity.locally_finite_tsupport PartitionOfUnity.locallyFinite_tsupport theorem nonneg (i : ΞΉ) (x : X) : 0 ≀ f i x := f.nonneg' i x #align partition_of_unity.nonneg PartitionOfUnity.nonneg theorem sum_eq_one {x : X} (hx : x ∈ s) : βˆ‘αΆ  i, f i x = 1 := f.sum_eq_one' x hx #align partition_of_unity.sum_eq_one PartitionOfUnity.sum_eq_one theorem exists_pos {x : X} (hx : x ∈ s) : βˆƒ i, 0 < f i x := by have H := f.sum_eq_one hx contrapose! H simpa only [fun i => (H i).antisymm (f.nonneg i x), finsum_zero] using zero_ne_one #align partition_of_unity.exists_pos PartitionOfUnity.exists_pos theorem sum_le_one (x : X) : βˆ‘αΆ  i, f i x ≀ 1 := f.sum_le_one' x #align partition_of_unity.sum_le_one PartitionOfUnity.sum_le_one theorem sum_nonneg (x : X) : 0 ≀ βˆ‘αΆ  i, f i x := finsum_nonneg fun i => f.nonneg i x #align partition_of_unity.sum_nonneg PartitionOfUnity.sum_nonneg theorem le_one (i : ΞΉ) (x : X) : f i x ≀ 1 := (single_le_finsum i (f.locallyFinite.point_finite x) fun j => f.nonneg j x).trans (f.sum_le_one x) #align partition_of_unity.le_one PartitionOfUnity.le_one section fintsupport -- partitions of unity have locally finite `tsupport` variable {s : Set X} (ρ : PartitionOfUnity ΞΉ X s) (xβ‚€ : X) theorem finite_tsupport : {i | xβ‚€ ∈ tsupport (ρ i)}.Finite := by rcases ρ.locallyFinite xβ‚€ with ⟨t, t_in, ht⟩ apply ht.subset rintro i hi simp only [inter_comm] exact mem_closure_iff_nhds.mp hi t t_in def fintsupport (xβ‚€ : X) : Finset ΞΉ := (ρ.finite_tsupport xβ‚€).toFinset theorem mem_fintsupport_iff (i : ΞΉ) : i ∈ ρ.fintsupport xβ‚€ ↔ xβ‚€ ∈ tsupport (ρ i) := Finite.mem_toFinset _
Mathlib/Topology/PartitionOfUnity.lean
244
249
theorem eventually_fintsupport_subset : βˆ€αΆ  y in 𝓝 xβ‚€, ρ.fintsupport y βŠ† ρ.fintsupport xβ‚€ := by
apply (ρ.locallyFinite.closure.eventually_subset (fun _ ↦ isClosed_closure) xβ‚€).mono intro y hy z hz rw [PartitionOfUnity.mem_fintsupport_iff] at * exact hy hz
1,758
import Mathlib.Algebra.BigOperators.Finprod import Mathlib.SetTheory.Ordinal.Basic import Mathlib.Topology.ContinuousFunction.Algebra import Mathlib.Topology.Compactness.Paracompact import Mathlib.Topology.ShrinkingLemma import Mathlib.Topology.UrysohnsLemma #align_import topology.partition_of_unity from "leanprover-community/mathlib"@"f2ce6086713c78a7f880485f7917ea547a215982" universe u v open Function Set Filter open scoped Classical open Topology noncomputable section structure PartitionOfUnity (ΞΉ X : Type*) [TopologicalSpace X] (s : Set X := univ) where toFun : ΞΉ β†’ C(X, ℝ) locallyFinite' : LocallyFinite fun i => support (toFun i) nonneg' : 0 ≀ toFun sum_eq_one' : βˆ€ x ∈ s, βˆ‘αΆ  i, toFun i x = 1 sum_le_one' : βˆ€ x, βˆ‘αΆ  i, toFun i x ≀ 1 #align partition_of_unity PartitionOfUnity structure BumpCovering (ΞΉ X : Type*) [TopologicalSpace X] (s : Set X := univ) where toFun : ΞΉ β†’ C(X, ℝ) locallyFinite' : LocallyFinite fun i => support (toFun i) nonneg' : 0 ≀ toFun le_one' : toFun ≀ 1 eventuallyEq_one' : βˆ€ x ∈ s, βˆƒ i, toFun i =αΆ [𝓝 x] 1 #align bump_covering BumpCovering variable {ΞΉ : Type u} {X : Type v} [TopologicalSpace X] namespace PartitionOfUnity variable {E : Type*} [AddCommMonoid E] [SMulWithZero ℝ E] [TopologicalSpace E] [ContinuousSMul ℝ E] {s : Set X} (f : PartitionOfUnity ΞΉ X s) instance : FunLike (PartitionOfUnity ΞΉ X s) ΞΉ C(X, ℝ) where coe := toFun coe_injective' := fun f g h ↦ by cases f; cases g; congr protected theorem locallyFinite : LocallyFinite fun i => support (f i) := f.locallyFinite' #align partition_of_unity.locally_finite PartitionOfUnity.locallyFinite theorem locallyFinite_tsupport : LocallyFinite fun i => tsupport (f i) := f.locallyFinite.closure #align partition_of_unity.locally_finite_tsupport PartitionOfUnity.locallyFinite_tsupport theorem nonneg (i : ΞΉ) (x : X) : 0 ≀ f i x := f.nonneg' i x #align partition_of_unity.nonneg PartitionOfUnity.nonneg theorem sum_eq_one {x : X} (hx : x ∈ s) : βˆ‘αΆ  i, f i x = 1 := f.sum_eq_one' x hx #align partition_of_unity.sum_eq_one PartitionOfUnity.sum_eq_one theorem exists_pos {x : X} (hx : x ∈ s) : βˆƒ i, 0 < f i x := by have H := f.sum_eq_one hx contrapose! H simpa only [fun i => (H i).antisymm (f.nonneg i x), finsum_zero] using zero_ne_one #align partition_of_unity.exists_pos PartitionOfUnity.exists_pos theorem sum_le_one (x : X) : βˆ‘αΆ  i, f i x ≀ 1 := f.sum_le_one' x #align partition_of_unity.sum_le_one PartitionOfUnity.sum_le_one theorem sum_nonneg (x : X) : 0 ≀ βˆ‘αΆ  i, f i x := finsum_nonneg fun i => f.nonneg i x #align partition_of_unity.sum_nonneg PartitionOfUnity.sum_nonneg theorem le_one (i : ΞΉ) (x : X) : f i x ≀ 1 := (single_le_finsum i (f.locallyFinite.point_finite x) fun j => f.nonneg j x).trans (f.sum_le_one x) #align partition_of_unity.le_one PartitionOfUnity.le_one theorem continuous_smul {g : X β†’ E} {i : ΞΉ} (hg : βˆ€ x ∈ tsupport (f i), ContinuousAt g x) : Continuous fun x => f i x β€’ g x := continuous_of_tsupport fun x hx => ((f i).continuousAt x).smul <| hg x <| tsupport_smul_subset_left _ _ hx #align partition_of_unity.continuous_smul PartitionOfUnity.continuous_smul theorem continuous_finsum_smul [ContinuousAdd E] {g : ΞΉ β†’ X β†’ E} (hg : βˆ€ (i), βˆ€ x ∈ tsupport (f i), ContinuousAt (g i) x) : Continuous fun x => βˆ‘αΆ  i, f i x β€’ g i x := (continuous_finsum fun i => f.continuous_smul (hg i)) <| f.locallyFinite.subset fun _ => support_smul_subset_left _ _ #align partition_of_unity.continuous_finsum_smul PartitionOfUnity.continuous_finsum_smul def IsSubordinate (U : ΞΉ β†’ Set X) : Prop := βˆ€ i, tsupport (f i) βŠ† U i #align partition_of_unity.is_subordinate PartitionOfUnity.IsSubordinate variable {f}
Mathlib/Topology/PartitionOfUnity.lean
289
295
theorem exists_finset_nhd' {s : Set X} (ρ : PartitionOfUnity ΞΉ X s) (xβ‚€ : X) : βˆƒ I : Finset ΞΉ, (βˆ€αΆ  x in 𝓝[s] xβ‚€, βˆ‘ i ∈ I, ρ i x = 1) ∧ βˆ€αΆ  x in 𝓝 xβ‚€, support (ρ Β· x) βŠ† I := by
rcases ρ.locallyFinite.exists_finset_support xβ‚€ with ⟨I, hI⟩ refine ⟨I, eventually_nhdsWithin_iff.mpr (hI.mono fun x hx x_in ↦ ?_), hI⟩ have : βˆ‘αΆ  i : ΞΉ, ρ i x = βˆ‘ i ∈ I, ρ i x := finsum_eq_sum_of_support_subset _ hx rwa [eq_comm, ρ.sum_eq_one x_in] at this
1,758
import Mathlib.Algebra.BigOperators.Finprod import Mathlib.SetTheory.Ordinal.Basic import Mathlib.Topology.ContinuousFunction.Algebra import Mathlib.Topology.Compactness.Paracompact import Mathlib.Topology.ShrinkingLemma import Mathlib.Topology.UrysohnsLemma #align_import topology.partition_of_unity from "leanprover-community/mathlib"@"f2ce6086713c78a7f880485f7917ea547a215982" universe u v open Function Set Filter open scoped Classical open Topology noncomputable section structure PartitionOfUnity (ΞΉ X : Type*) [TopologicalSpace X] (s : Set X := univ) where toFun : ΞΉ β†’ C(X, ℝ) locallyFinite' : LocallyFinite fun i => support (toFun i) nonneg' : 0 ≀ toFun sum_eq_one' : βˆ€ x ∈ s, βˆ‘αΆ  i, toFun i x = 1 sum_le_one' : βˆ€ x, βˆ‘αΆ  i, toFun i x ≀ 1 #align partition_of_unity PartitionOfUnity structure BumpCovering (ΞΉ X : Type*) [TopologicalSpace X] (s : Set X := univ) where toFun : ΞΉ β†’ C(X, ℝ) locallyFinite' : LocallyFinite fun i => support (toFun i) nonneg' : 0 ≀ toFun le_one' : toFun ≀ 1 eventuallyEq_one' : βˆ€ x ∈ s, βˆƒ i, toFun i =αΆ [𝓝 x] 1 #align bump_covering BumpCovering variable {ΞΉ : Type u} {X : Type v} [TopologicalSpace X] namespace PartitionOfUnity variable {E : Type*} [AddCommMonoid E] [SMulWithZero ℝ E] [TopologicalSpace E] [ContinuousSMul ℝ E] {s : Set X} (f : PartitionOfUnity ΞΉ X s) instance : FunLike (PartitionOfUnity ΞΉ X s) ΞΉ C(X, ℝ) where coe := toFun coe_injective' := fun f g h ↦ by cases f; cases g; congr protected theorem locallyFinite : LocallyFinite fun i => support (f i) := f.locallyFinite' #align partition_of_unity.locally_finite PartitionOfUnity.locallyFinite theorem locallyFinite_tsupport : LocallyFinite fun i => tsupport (f i) := f.locallyFinite.closure #align partition_of_unity.locally_finite_tsupport PartitionOfUnity.locallyFinite_tsupport theorem nonneg (i : ΞΉ) (x : X) : 0 ≀ f i x := f.nonneg' i x #align partition_of_unity.nonneg PartitionOfUnity.nonneg theorem sum_eq_one {x : X} (hx : x ∈ s) : βˆ‘αΆ  i, f i x = 1 := f.sum_eq_one' x hx #align partition_of_unity.sum_eq_one PartitionOfUnity.sum_eq_one theorem exists_pos {x : X} (hx : x ∈ s) : βˆƒ i, 0 < f i x := by have H := f.sum_eq_one hx contrapose! H simpa only [fun i => (H i).antisymm (f.nonneg i x), finsum_zero] using zero_ne_one #align partition_of_unity.exists_pos PartitionOfUnity.exists_pos theorem sum_le_one (x : X) : βˆ‘αΆ  i, f i x ≀ 1 := f.sum_le_one' x #align partition_of_unity.sum_le_one PartitionOfUnity.sum_le_one theorem sum_nonneg (x : X) : 0 ≀ βˆ‘αΆ  i, f i x := finsum_nonneg fun i => f.nonneg i x #align partition_of_unity.sum_nonneg PartitionOfUnity.sum_nonneg theorem le_one (i : ΞΉ) (x : X) : f i x ≀ 1 := (single_le_finsum i (f.locallyFinite.point_finite x) fun j => f.nonneg j x).trans (f.sum_le_one x) #align partition_of_unity.le_one PartitionOfUnity.le_one theorem continuous_smul {g : X β†’ E} {i : ΞΉ} (hg : βˆ€ x ∈ tsupport (f i), ContinuousAt g x) : Continuous fun x => f i x β€’ g x := continuous_of_tsupport fun x hx => ((f i).continuousAt x).smul <| hg x <| tsupport_smul_subset_left _ _ hx #align partition_of_unity.continuous_smul PartitionOfUnity.continuous_smul theorem continuous_finsum_smul [ContinuousAdd E] {g : ΞΉ β†’ X β†’ E} (hg : βˆ€ (i), βˆ€ x ∈ tsupport (f i), ContinuousAt (g i) x) : Continuous fun x => βˆ‘αΆ  i, f i x β€’ g i x := (continuous_finsum fun i => f.continuous_smul (hg i)) <| f.locallyFinite.subset fun _ => support_smul_subset_left _ _ #align partition_of_unity.continuous_finsum_smul PartitionOfUnity.continuous_finsum_smul def IsSubordinate (U : ΞΉ β†’ Set X) : Prop := βˆ€ i, tsupport (f i) βŠ† U i #align partition_of_unity.is_subordinate PartitionOfUnity.IsSubordinate variable {f} theorem exists_finset_nhd' {s : Set X} (ρ : PartitionOfUnity ΞΉ X s) (xβ‚€ : X) : βˆƒ I : Finset ΞΉ, (βˆ€αΆ  x in 𝓝[s] xβ‚€, βˆ‘ i ∈ I, ρ i x = 1) ∧ βˆ€αΆ  x in 𝓝 xβ‚€, support (ρ Β· x) βŠ† I := by rcases ρ.locallyFinite.exists_finset_support xβ‚€ with ⟨I, hI⟩ refine ⟨I, eventually_nhdsWithin_iff.mpr (hI.mono fun x hx x_in ↦ ?_), hI⟩ have : βˆ‘αΆ  i : ΞΉ, ρ i x = βˆ‘ i ∈ I, ρ i x := finsum_eq_sum_of_support_subset _ hx rwa [eq_comm, ρ.sum_eq_one x_in] at this
Mathlib/Topology/PartitionOfUnity.lean
297
301
theorem exists_finset_nhd (ρ : PartitionOfUnity ΞΉ X univ) (xβ‚€ : X) : βˆƒ I : Finset ΞΉ, βˆ€αΆ  x in 𝓝 xβ‚€, βˆ‘ i ∈ I, ρ i x = 1 ∧ support (ρ Β· x) βŠ† I := by
rcases ρ.exists_finset_nhd' xβ‚€ with ⟨I, H⟩ use I rwa [nhdsWithin_univ, ← eventually_and] at H
1,758
import Mathlib.Analysis.SpecificLimits.Basic import Mathlib.Topology.MetricSpace.HausdorffDistance import Mathlib.Topology.Sets.Compacts #align_import topology.metric_space.closeds from "leanprover-community/mathlib"@"f2ce6086713c78a7f880485f7917ea547a215982" noncomputable section open scoped Classical open Topology ENNReal universe u open scoped Classical open Set Function TopologicalSpace Filter namespace EMetric section variable {Ξ± : Type u} [EMetricSpace Ξ±] {s : Set Ξ±} instance Closeds.emetricSpace : EMetricSpace (Closeds Ξ±) where edist s t := hausdorffEdist (s : Set Ξ±) t edist_self s := hausdorffEdist_self edist_comm s t := hausdorffEdist_comm edist_triangle s t u := hausdorffEdist_triangle eq_of_edist_eq_zero {s t} h := Closeds.ext <| (hausdorffEdist_zero_iff_eq_of_closed s.closed t.closed).1 h #align emetric.closeds.emetric_space EMetric.Closeds.emetricSpace
Mathlib/Topology/MetricSpace/Closeds.lean
56
69
theorem continuous_infEdist_hausdorffEdist : Continuous fun p : Ξ± Γ— Closeds Ξ± => infEdist p.1 p.2 := by
refine continuous_of_le_add_edist 2 (by simp) ?_ rintro ⟨x, s⟩ ⟨y, t⟩ calc infEdist x s ≀ infEdist x t + hausdorffEdist (t : Set Ξ±) s := infEdist_le_infEdist_add_hausdorffEdist _ ≀ infEdist y t + edist x y + hausdorffEdist (t : Set Ξ±) s := (add_le_add_right infEdist_le_infEdist_add_edist _) _ = infEdist y t + (edist x y + hausdorffEdist (s : Set Ξ±) t) := by rw [add_assoc, hausdorffEdist_comm] _ ≀ infEdist y t + (edist (x, s) (y, t) + edist (x, s) (y, t)) := (add_le_add_left (add_le_add (le_max_left _ _) (le_max_right _ _)) _) _ = infEdist y t + 2 * edist (x, s) (y, t) := by rw [← mul_two, mul_comm]
1,759
import Mathlib.Analysis.SpecificLimits.Basic import Mathlib.Topology.MetricSpace.HausdorffDistance import Mathlib.Topology.Sets.Compacts #align_import topology.metric_space.closeds from "leanprover-community/mathlib"@"f2ce6086713c78a7f880485f7917ea547a215982" noncomputable section open scoped Classical open Topology ENNReal universe u open scoped Classical open Set Function TopologicalSpace Filter namespace EMetric section variable {Ξ± : Type u} [EMetricSpace Ξ±] {s : Set Ξ±} instance Closeds.emetricSpace : EMetricSpace (Closeds Ξ±) where edist s t := hausdorffEdist (s : Set Ξ±) t edist_self s := hausdorffEdist_self edist_comm s t := hausdorffEdist_comm edist_triangle s t u := hausdorffEdist_triangle eq_of_edist_eq_zero {s t} h := Closeds.ext <| (hausdorffEdist_zero_iff_eq_of_closed s.closed t.closed).1 h #align emetric.closeds.emetric_space EMetric.Closeds.emetricSpace theorem continuous_infEdist_hausdorffEdist : Continuous fun p : Ξ± Γ— Closeds Ξ± => infEdist p.1 p.2 := by refine continuous_of_le_add_edist 2 (by simp) ?_ rintro ⟨x, s⟩ ⟨y, t⟩ calc infEdist x s ≀ infEdist x t + hausdorffEdist (t : Set Ξ±) s := infEdist_le_infEdist_add_hausdorffEdist _ ≀ infEdist y t + edist x y + hausdorffEdist (t : Set Ξ±) s := (add_le_add_right infEdist_le_infEdist_add_edist _) _ = infEdist y t + (edist x y + hausdorffEdist (s : Set Ξ±) t) := by rw [add_assoc, hausdorffEdist_comm] _ ≀ infEdist y t + (edist (x, s) (y, t) + edist (x, s) (y, t)) := (add_le_add_left (add_le_add (le_max_left _ _) (le_max_right _ _)) _) _ = infEdist y t + 2 * edist (x, s) (y, t) := by rw [← mul_two, mul_comm] set_option linter.uppercaseLean3 false in #align emetric.continuous_infEdist_hausdorffEdist EMetric.continuous_infEdist_hausdorffEdist
Mathlib/Topology/MetricSpace/Closeds.lean
74
84
theorem isClosed_subsets_of_isClosed (hs : IsClosed s) : IsClosed { t : Closeds Ξ± | (t : Set Ξ±) βŠ† s } := by
refine isClosed_of_closure_subset fun (t : Closeds Ξ±) (ht : t ∈ closure {t : Closeds Ξ± | (t : Set Ξ±) βŠ† s}) (x : Ξ±) (hx : x ∈ t) => ?_ have : x ∈ closure s := by refine mem_closure_iff.2 fun Ξ΅ Ξ΅pos => ?_ obtain ⟨u : Closeds Ξ±, hu : u ∈ {t : Closeds Ξ± | (t : Set Ξ±) βŠ† s}, Dtu : edist t u < Ρ⟩ := mem_closure_iff.1 ht Ξ΅ Ξ΅pos obtain ⟨y : Ξ±, hy : y ∈ u, Dxy : edist x y < Ρ⟩ := exists_edist_lt_of_hausdorffEdist_lt hx Dtu exact ⟨y, hu hy, Dxy⟩ rwa [hs.closure_eq] at this
1,759
import Mathlib.Algebra.BigOperators.Module import Mathlib.Algebra.Order.Field.Basic import Mathlib.Order.Filter.ModEq import Mathlib.Analysis.Asymptotics.Asymptotics import Mathlib.Analysis.SpecificLimits.Basic import Mathlib.Data.List.TFAE import Mathlib.Analysis.NormedSpace.Basic #align_import analysis.specific_limits.normed from "leanprover-community/mathlib"@"f2ce6086713c78a7f880485f7917ea547a215982" noncomputable section open scoped Classical open Set Function Filter Finset Metric Asymptotics open scoped Classical open Topology Nat uniformity NNReal ENNReal variable {Ξ± : Type*} {Ξ² : Type*} {ΞΉ : Type*} theorem tendsto_norm_atTop_atTop : Tendsto (norm : ℝ β†’ ℝ) atTop atTop := tendsto_abs_atTop_atTop #align tendsto_norm_at_top_at_top tendsto_norm_atTop_atTop theorem summable_of_absolute_convergence_real {f : β„• β†’ ℝ} : (βˆƒ r, Tendsto (fun n ↦ βˆ‘ i ∈ range n, |f i|) atTop (𝓝 r)) β†’ Summable f | ⟨r, hr⟩ => by refine .of_norm ⟨r, (hasSum_iff_tendsto_nat_of_nonneg ?_ _).2 ?_⟩ Β· exact fun i ↦ norm_nonneg _ Β· simpa only using hr #align summable_of_absolute_convergence_real summable_of_absolute_convergence_real theorem tendsto_norm_zero' {π•œ : Type*} [NormedAddCommGroup π•œ] : Tendsto (norm : π•œ β†’ ℝ) (𝓝[β‰ ] 0) (𝓝[>] 0) := tendsto_norm_zero.inf <| tendsto_principal_principal.2 fun _ hx ↦ norm_pos_iff.2 hx #align tendsto_norm_zero' tendsto_norm_zero' namespace NormedField theorem tendsto_norm_inverse_nhdsWithin_0_atTop {π•œ : Type*} [NormedDivisionRing π•œ] : Tendsto (fun x : π•œ ↦ β€–x⁻¹‖) (𝓝[β‰ ] 0) atTop := (tendsto_inv_zero_atTop.comp tendsto_norm_zero').congr fun x ↦ (norm_inv x).symm #align normed_field.tendsto_norm_inverse_nhds_within_0_at_top NormedField.tendsto_norm_inverse_nhdsWithin_0_atTop
Mathlib/Analysis/SpecificLimits/Normed.lean
62
68
theorem tendsto_norm_zpow_nhdsWithin_0_atTop {π•œ : Type*} [NormedDivisionRing π•œ] {m : β„€} (hm : m < 0) : Tendsto (fun x : π•œ ↦ β€–x ^ mβ€–) (𝓝[β‰ ] 0) atTop := by
rcases neg_surjective m with ⟨m, rfl⟩ rw [neg_lt_zero] at hm; lift m to β„• using hm.le; rw [Int.natCast_pos] at hm simp only [norm_pow, zpow_neg, zpow_natCast, ← inv_pow] exact (tendsto_pow_atTop hm.ne').comp NormedField.tendsto_norm_inverse_nhdsWithin_0_atTop
1,760
import Mathlib.Algebra.BigOperators.Module import Mathlib.Algebra.Order.Field.Basic import Mathlib.Order.Filter.ModEq import Mathlib.Analysis.Asymptotics.Asymptotics import Mathlib.Analysis.SpecificLimits.Basic import Mathlib.Data.List.TFAE import Mathlib.Analysis.NormedSpace.Basic #align_import analysis.specific_limits.normed from "leanprover-community/mathlib"@"f2ce6086713c78a7f880485f7917ea547a215982" noncomputable section open scoped Classical open Set Function Filter Finset Metric Asymptotics open scoped Classical open Topology Nat uniformity NNReal ENNReal variable {Ξ± : Type*} {Ξ² : Type*} {ΞΉ : Type*} theorem tendsto_norm_atTop_atTop : Tendsto (norm : ℝ β†’ ℝ) atTop atTop := tendsto_abs_atTop_atTop #align tendsto_norm_at_top_at_top tendsto_norm_atTop_atTop theorem summable_of_absolute_convergence_real {f : β„• β†’ ℝ} : (βˆƒ r, Tendsto (fun n ↦ βˆ‘ i ∈ range n, |f i|) atTop (𝓝 r)) β†’ Summable f | ⟨r, hr⟩ => by refine .of_norm ⟨r, (hasSum_iff_tendsto_nat_of_nonneg ?_ _).2 ?_⟩ Β· exact fun i ↦ norm_nonneg _ Β· simpa only using hr #align summable_of_absolute_convergence_real summable_of_absolute_convergence_real theorem tendsto_norm_zero' {π•œ : Type*} [NormedAddCommGroup π•œ] : Tendsto (norm : π•œ β†’ ℝ) (𝓝[β‰ ] 0) (𝓝[>] 0) := tendsto_norm_zero.inf <| tendsto_principal_principal.2 fun _ hx ↦ norm_pos_iff.2 hx #align tendsto_norm_zero' tendsto_norm_zero' namespace NormedField theorem tendsto_norm_inverse_nhdsWithin_0_atTop {π•œ : Type*} [NormedDivisionRing π•œ] : Tendsto (fun x : π•œ ↦ β€–x⁻¹‖) (𝓝[β‰ ] 0) atTop := (tendsto_inv_zero_atTop.comp tendsto_norm_zero').congr fun x ↦ (norm_inv x).symm #align normed_field.tendsto_norm_inverse_nhds_within_0_at_top NormedField.tendsto_norm_inverse_nhdsWithin_0_atTop theorem tendsto_norm_zpow_nhdsWithin_0_atTop {π•œ : Type*} [NormedDivisionRing π•œ] {m : β„€} (hm : m < 0) : Tendsto (fun x : π•œ ↦ β€–x ^ mβ€–) (𝓝[β‰ ] 0) atTop := by rcases neg_surjective m with ⟨m, rfl⟩ rw [neg_lt_zero] at hm; lift m to β„• using hm.le; rw [Int.natCast_pos] at hm simp only [norm_pow, zpow_neg, zpow_natCast, ← inv_pow] exact (tendsto_pow_atTop hm.ne').comp NormedField.tendsto_norm_inverse_nhdsWithin_0_atTop #align normed_field.tendsto_norm_zpow_nhds_within_0_at_top NormedField.tendsto_norm_zpow_nhdsWithin_0_atTop
Mathlib/Analysis/SpecificLimits/Normed.lean
72
77
theorem tendsto_zero_smul_of_tendsto_zero_of_bounded {ΞΉ π•œ 𝔸 : Type*} [NormedDivisionRing π•œ] [NormedAddCommGroup 𝔸] [Module π•œ 𝔸] [BoundedSMul π•œ 𝔸] {l : Filter ΞΉ} {Ξ΅ : ΞΉ β†’ π•œ} {f : ΞΉ β†’ 𝔸} (hΞ΅ : Tendsto Ξ΅ l (𝓝 0)) (hf : Filter.IsBoundedUnder (Β· ≀ Β·) l (norm ∘ f)) : Tendsto (Ξ΅ β€’ f) l (𝓝 0) := by
rw [← isLittleO_one_iff π•œ] at hΞ΅ ⊒ simpa using IsLittleO.smul_isBigO hΞ΅ (hf.isBigO_const (one_ne_zero : (1 : π•œ) β‰  0))
1,760
import Mathlib.Algebra.BigOperators.Module import Mathlib.Algebra.Order.Field.Basic import Mathlib.Order.Filter.ModEq import Mathlib.Analysis.Asymptotics.Asymptotics import Mathlib.Analysis.SpecificLimits.Basic import Mathlib.Data.List.TFAE import Mathlib.Analysis.NormedSpace.Basic #align_import analysis.specific_limits.normed from "leanprover-community/mathlib"@"f2ce6086713c78a7f880485f7917ea547a215982" noncomputable section open scoped Classical open Set Function Filter Finset Metric Asymptotics open scoped Classical open Topology Nat uniformity NNReal ENNReal variable {Ξ± : Type*} {Ξ² : Type*} {ΞΉ : Type*} theorem tendsto_norm_atTop_atTop : Tendsto (norm : ℝ β†’ ℝ) atTop atTop := tendsto_abs_atTop_atTop #align tendsto_norm_at_top_at_top tendsto_norm_atTop_atTop theorem summable_of_absolute_convergence_real {f : β„• β†’ ℝ} : (βˆƒ r, Tendsto (fun n ↦ βˆ‘ i ∈ range n, |f i|) atTop (𝓝 r)) β†’ Summable f | ⟨r, hr⟩ => by refine .of_norm ⟨r, (hasSum_iff_tendsto_nat_of_nonneg ?_ _).2 ?_⟩ Β· exact fun i ↦ norm_nonneg _ Β· simpa only using hr #align summable_of_absolute_convergence_real summable_of_absolute_convergence_real theorem tendsto_norm_zero' {π•œ : Type*} [NormedAddCommGroup π•œ] : Tendsto (norm : π•œ β†’ ℝ) (𝓝[β‰ ] 0) (𝓝[>] 0) := tendsto_norm_zero.inf <| tendsto_principal_principal.2 fun _ hx ↦ norm_pos_iff.2 hx #align tendsto_norm_zero' tendsto_norm_zero' namespace NormedField theorem tendsto_norm_inverse_nhdsWithin_0_atTop {π•œ : Type*} [NormedDivisionRing π•œ] : Tendsto (fun x : π•œ ↦ β€–x⁻¹‖) (𝓝[β‰ ] 0) atTop := (tendsto_inv_zero_atTop.comp tendsto_norm_zero').congr fun x ↦ (norm_inv x).symm #align normed_field.tendsto_norm_inverse_nhds_within_0_at_top NormedField.tendsto_norm_inverse_nhdsWithin_0_atTop theorem tendsto_norm_zpow_nhdsWithin_0_atTop {π•œ : Type*} [NormedDivisionRing π•œ] {m : β„€} (hm : m < 0) : Tendsto (fun x : π•œ ↦ β€–x ^ mβ€–) (𝓝[β‰ ] 0) atTop := by rcases neg_surjective m with ⟨m, rfl⟩ rw [neg_lt_zero] at hm; lift m to β„• using hm.le; rw [Int.natCast_pos] at hm simp only [norm_pow, zpow_neg, zpow_natCast, ← inv_pow] exact (tendsto_pow_atTop hm.ne').comp NormedField.tendsto_norm_inverse_nhdsWithin_0_atTop #align normed_field.tendsto_norm_zpow_nhds_within_0_at_top NormedField.tendsto_norm_zpow_nhdsWithin_0_atTop theorem tendsto_zero_smul_of_tendsto_zero_of_bounded {ΞΉ π•œ 𝔸 : Type*} [NormedDivisionRing π•œ] [NormedAddCommGroup 𝔸] [Module π•œ 𝔸] [BoundedSMul π•œ 𝔸] {l : Filter ΞΉ} {Ξ΅ : ΞΉ β†’ π•œ} {f : ΞΉ β†’ 𝔸} (hΞ΅ : Tendsto Ξ΅ l (𝓝 0)) (hf : Filter.IsBoundedUnder (Β· ≀ Β·) l (norm ∘ f)) : Tendsto (Ξ΅ β€’ f) l (𝓝 0) := by rw [← isLittleO_one_iff π•œ] at hΞ΅ ⊒ simpa using IsLittleO.smul_isBigO hΞ΅ (hf.isBigO_const (one_ne_zero : (1 : π•œ) β‰  0)) #align normed_field.tendsto_zero_smul_of_tendsto_zero_of_bounded NormedField.tendsto_zero_smul_of_tendsto_zero_of_bounded @[simp]
Mathlib/Analysis/SpecificLimits/Normed.lean
81
86
theorem continuousAt_zpow {π•œ : Type*} [NontriviallyNormedField π•œ] {m : β„€} {x : π•œ} : ContinuousAt (fun x ↦ x ^ m) x ↔ x β‰  0 ∨ 0 ≀ m := by
refine ⟨?_, continuousAt_zpowβ‚€ _ _⟩ contrapose!; rintro ⟨rfl, hm⟩ hc exact not_tendsto_atTop_of_tendsto_nhds (hc.tendsto.mono_left nhdsWithin_le_nhds).norm (tendsto_norm_zpow_nhdsWithin_0_atTop hm)
1,760
import Mathlib.Algebra.BigOperators.Module import Mathlib.Algebra.Order.Field.Basic import Mathlib.Order.Filter.ModEq import Mathlib.Analysis.Asymptotics.Asymptotics import Mathlib.Analysis.SpecificLimits.Basic import Mathlib.Data.List.TFAE import Mathlib.Analysis.NormedSpace.Basic #align_import analysis.specific_limits.normed from "leanprover-community/mathlib"@"f2ce6086713c78a7f880485f7917ea547a215982" noncomputable section open scoped Classical open Set Function Filter Finset Metric Asymptotics open scoped Classical open Topology Nat uniformity NNReal ENNReal variable {Ξ± : Type*} {Ξ² : Type*} {ΞΉ : Type*} theorem tendsto_norm_atTop_atTop : Tendsto (norm : ℝ β†’ ℝ) atTop atTop := tendsto_abs_atTop_atTop #align tendsto_norm_at_top_at_top tendsto_norm_atTop_atTop theorem summable_of_absolute_convergence_real {f : β„• β†’ ℝ} : (βˆƒ r, Tendsto (fun n ↦ βˆ‘ i ∈ range n, |f i|) atTop (𝓝 r)) β†’ Summable f | ⟨r, hr⟩ => by refine .of_norm ⟨r, (hasSum_iff_tendsto_nat_of_nonneg ?_ _).2 ?_⟩ Β· exact fun i ↦ norm_nonneg _ Β· simpa only using hr #align summable_of_absolute_convergence_real summable_of_absolute_convergence_real theorem tendsto_norm_zero' {π•œ : Type*} [NormedAddCommGroup π•œ] : Tendsto (norm : π•œ β†’ ℝ) (𝓝[β‰ ] 0) (𝓝[>] 0) := tendsto_norm_zero.inf <| tendsto_principal_principal.2 fun _ hx ↦ norm_pos_iff.2 hx #align tendsto_norm_zero' tendsto_norm_zero' namespace NormedField theorem tendsto_norm_inverse_nhdsWithin_0_atTop {π•œ : Type*} [NormedDivisionRing π•œ] : Tendsto (fun x : π•œ ↦ β€–x⁻¹‖) (𝓝[β‰ ] 0) atTop := (tendsto_inv_zero_atTop.comp tendsto_norm_zero').congr fun x ↦ (norm_inv x).symm #align normed_field.tendsto_norm_inverse_nhds_within_0_at_top NormedField.tendsto_norm_inverse_nhdsWithin_0_atTop theorem tendsto_norm_zpow_nhdsWithin_0_atTop {π•œ : Type*} [NormedDivisionRing π•œ] {m : β„€} (hm : m < 0) : Tendsto (fun x : π•œ ↦ β€–x ^ mβ€–) (𝓝[β‰ ] 0) atTop := by rcases neg_surjective m with ⟨m, rfl⟩ rw [neg_lt_zero] at hm; lift m to β„• using hm.le; rw [Int.natCast_pos] at hm simp only [norm_pow, zpow_neg, zpow_natCast, ← inv_pow] exact (tendsto_pow_atTop hm.ne').comp NormedField.tendsto_norm_inverse_nhdsWithin_0_atTop #align normed_field.tendsto_norm_zpow_nhds_within_0_at_top NormedField.tendsto_norm_zpow_nhdsWithin_0_atTop theorem tendsto_zero_smul_of_tendsto_zero_of_bounded {ΞΉ π•œ 𝔸 : Type*} [NormedDivisionRing π•œ] [NormedAddCommGroup 𝔸] [Module π•œ 𝔸] [BoundedSMul π•œ 𝔸] {l : Filter ΞΉ} {Ξ΅ : ΞΉ β†’ π•œ} {f : ΞΉ β†’ 𝔸} (hΞ΅ : Tendsto Ξ΅ l (𝓝 0)) (hf : Filter.IsBoundedUnder (Β· ≀ Β·) l (norm ∘ f)) : Tendsto (Ξ΅ β€’ f) l (𝓝 0) := by rw [← isLittleO_one_iff π•œ] at hΞ΅ ⊒ simpa using IsLittleO.smul_isBigO hΞ΅ (hf.isBigO_const (one_ne_zero : (1 : π•œ) β‰  0)) #align normed_field.tendsto_zero_smul_of_tendsto_zero_of_bounded NormedField.tendsto_zero_smul_of_tendsto_zero_of_bounded @[simp] theorem continuousAt_zpow {π•œ : Type*} [NontriviallyNormedField π•œ] {m : β„€} {x : π•œ} : ContinuousAt (fun x ↦ x ^ m) x ↔ x β‰  0 ∨ 0 ≀ m := by refine ⟨?_, continuousAt_zpowβ‚€ _ _⟩ contrapose!; rintro ⟨rfl, hm⟩ hc exact not_tendsto_atTop_of_tendsto_nhds (hc.tendsto.mono_left nhdsWithin_le_nhds).norm (tendsto_norm_zpow_nhdsWithin_0_atTop hm) #align normed_field.continuous_at_zpow NormedField.continuousAt_zpow @[simp]
Mathlib/Analysis/SpecificLimits/Normed.lean
90
92
theorem continuousAt_inv {π•œ : Type*} [NontriviallyNormedField π•œ] {x : π•œ} : ContinuousAt Inv.inv x ↔ x β‰  0 := by
simpa [(zero_lt_one' β„€).not_le] using @continuousAt_zpow _ _ (-1) x
1,760
import Mathlib.Algebra.BigOperators.Module import Mathlib.Algebra.Order.Field.Basic import Mathlib.Order.Filter.ModEq import Mathlib.Analysis.Asymptotics.Asymptotics import Mathlib.Analysis.SpecificLimits.Basic import Mathlib.Data.List.TFAE import Mathlib.Analysis.NormedSpace.Basic #align_import analysis.specific_limits.normed from "leanprover-community/mathlib"@"f2ce6086713c78a7f880485f7917ea547a215982" noncomputable section open scoped Classical open Set Function Filter Finset Metric Asymptotics open scoped Classical open Topology Nat uniformity NNReal ENNReal variable {Ξ± : Type*} {Ξ² : Type*} {ΞΉ : Type*} theorem tendsto_norm_atTop_atTop : Tendsto (norm : ℝ β†’ ℝ) atTop atTop := tendsto_abs_atTop_atTop #align tendsto_norm_at_top_at_top tendsto_norm_atTop_atTop theorem summable_of_absolute_convergence_real {f : β„• β†’ ℝ} : (βˆƒ r, Tendsto (fun n ↦ βˆ‘ i ∈ range n, |f i|) atTop (𝓝 r)) β†’ Summable f | ⟨r, hr⟩ => by refine .of_norm ⟨r, (hasSum_iff_tendsto_nat_of_nonneg ?_ _).2 ?_⟩ Β· exact fun i ↦ norm_nonneg _ Β· simpa only using hr #align summable_of_absolute_convergence_real summable_of_absolute_convergence_real theorem tendsto_norm_zero' {π•œ : Type*} [NormedAddCommGroup π•œ] : Tendsto (norm : π•œ β†’ ℝ) (𝓝[β‰ ] 0) (𝓝[>] 0) := tendsto_norm_zero.inf <| tendsto_principal_principal.2 fun _ hx ↦ norm_pos_iff.2 hx #align tendsto_norm_zero' tendsto_norm_zero' theorem isLittleO_pow_pow_of_lt_left {r₁ rβ‚‚ : ℝ} (h₁ : 0 ≀ r₁) (hβ‚‚ : r₁ < rβ‚‚) : (fun n : β„• ↦ r₁ ^ n) =o[atTop] fun n ↦ rβ‚‚ ^ n := have H : 0 < rβ‚‚ := h₁.trans_lt hβ‚‚ (isLittleO_of_tendsto fun _ hn ↦ False.elim <| H.ne' <| pow_eq_zero hn) <| (tendsto_pow_atTop_nhds_zero_of_lt_one (div_nonneg h₁ (h₁.trans hβ‚‚.le)) ((div_lt_one H).2 hβ‚‚)).congr fun _ ↦ div_pow _ _ _ #align is_o_pow_pow_of_lt_left isLittleO_pow_pow_of_lt_left theorem isBigO_pow_pow_of_le_left {r₁ rβ‚‚ : ℝ} (h₁ : 0 ≀ r₁) (hβ‚‚ : r₁ ≀ rβ‚‚) : (fun n : β„• ↦ r₁ ^ n) =O[atTop] fun n ↦ rβ‚‚ ^ n := hβ‚‚.eq_or_lt.elim (fun h ↦ h β–Έ isBigO_refl _ _) fun h ↦ (isLittleO_pow_pow_of_lt_left h₁ h).isBigO set_option linter.uppercaseLean3 false in #align is_O_pow_pow_of_le_left isBigO_pow_pow_of_le_left
Mathlib/Analysis/SpecificLimits/Normed.lean
111
114
theorem isLittleO_pow_pow_of_abs_lt_left {r₁ rβ‚‚ : ℝ} (h : |r₁| < |rβ‚‚|) : (fun n : β„• ↦ r₁ ^ n) =o[atTop] fun n ↦ rβ‚‚ ^ n := by
refine (IsLittleO.of_norm_left ?_).of_norm_right exact (isLittleO_pow_pow_of_lt_left (abs_nonneg r₁) h).congr (pow_abs r₁) (pow_abs rβ‚‚)
1,760
import Mathlib.Algebra.BigOperators.Module import Mathlib.Algebra.Order.Field.Basic import Mathlib.Order.Filter.ModEq import Mathlib.Analysis.Asymptotics.Asymptotics import Mathlib.Analysis.SpecificLimits.Basic import Mathlib.Data.List.TFAE import Mathlib.Analysis.NormedSpace.Basic #align_import analysis.specific_limits.normed from "leanprover-community/mathlib"@"f2ce6086713c78a7f880485f7917ea547a215982" noncomputable section open scoped Classical open Set Function Filter Finset Metric Asymptotics open scoped Classical open Topology Nat uniformity NNReal ENNReal variable {Ξ± : Type*} {Ξ² : Type*} {ΞΉ : Type*} theorem tendsto_norm_atTop_atTop : Tendsto (norm : ℝ β†’ ℝ) atTop atTop := tendsto_abs_atTop_atTop #align tendsto_norm_at_top_at_top tendsto_norm_atTop_atTop theorem summable_of_absolute_convergence_real {f : β„• β†’ ℝ} : (βˆƒ r, Tendsto (fun n ↦ βˆ‘ i ∈ range n, |f i|) atTop (𝓝 r)) β†’ Summable f | ⟨r, hr⟩ => by refine .of_norm ⟨r, (hasSum_iff_tendsto_nat_of_nonneg ?_ _).2 ?_⟩ Β· exact fun i ↦ norm_nonneg _ Β· simpa only using hr #align summable_of_absolute_convergence_real summable_of_absolute_convergence_real theorem tendsto_norm_zero' {π•œ : Type*} [NormedAddCommGroup π•œ] : Tendsto (norm : π•œ β†’ ℝ) (𝓝[β‰ ] 0) (𝓝[>] 0) := tendsto_norm_zero.inf <| tendsto_principal_principal.2 fun _ hx ↦ norm_pos_iff.2 hx #align tendsto_norm_zero' tendsto_norm_zero' theorem isLittleO_pow_pow_of_lt_left {r₁ rβ‚‚ : ℝ} (h₁ : 0 ≀ r₁) (hβ‚‚ : r₁ < rβ‚‚) : (fun n : β„• ↦ r₁ ^ n) =o[atTop] fun n ↦ rβ‚‚ ^ n := have H : 0 < rβ‚‚ := h₁.trans_lt hβ‚‚ (isLittleO_of_tendsto fun _ hn ↦ False.elim <| H.ne' <| pow_eq_zero hn) <| (tendsto_pow_atTop_nhds_zero_of_lt_one (div_nonneg h₁ (h₁.trans hβ‚‚.le)) ((div_lt_one H).2 hβ‚‚)).congr fun _ ↦ div_pow _ _ _ #align is_o_pow_pow_of_lt_left isLittleO_pow_pow_of_lt_left theorem isBigO_pow_pow_of_le_left {r₁ rβ‚‚ : ℝ} (h₁ : 0 ≀ r₁) (hβ‚‚ : r₁ ≀ rβ‚‚) : (fun n : β„• ↦ r₁ ^ n) =O[atTop] fun n ↦ rβ‚‚ ^ n := hβ‚‚.eq_or_lt.elim (fun h ↦ h β–Έ isBigO_refl _ _) fun h ↦ (isLittleO_pow_pow_of_lt_left h₁ h).isBigO set_option linter.uppercaseLean3 false in #align is_O_pow_pow_of_le_left isBigO_pow_pow_of_le_left theorem isLittleO_pow_pow_of_abs_lt_left {r₁ rβ‚‚ : ℝ} (h : |r₁| < |rβ‚‚|) : (fun n : β„• ↦ r₁ ^ n) =o[atTop] fun n ↦ rβ‚‚ ^ n := by refine (IsLittleO.of_norm_left ?_).of_norm_right exact (isLittleO_pow_pow_of_lt_left (abs_nonneg r₁) h).congr (pow_abs r₁) (pow_abs rβ‚‚) #align is_o_pow_pow_of_abs_lt_left isLittleO_pow_pow_of_abs_lt_left open List in
Mathlib/Analysis/SpecificLimits/Normed.lean
132
189
theorem TFAE_exists_lt_isLittleO_pow (f : β„• β†’ ℝ) (R : ℝ) : TFAE [βˆƒ a ∈ Ioo (-R) R, f =o[atTop] (a ^ Β·), βˆƒ a ∈ Ioo 0 R, f =o[atTop] (a ^ Β·), βˆƒ a ∈ Ioo (-R) R, f =O[atTop] (a ^ Β·), βˆƒ a ∈ Ioo 0 R, f =O[atTop] (a ^ Β·), βˆƒ a < R, βˆƒ C : ℝ, (0 < C ∨ 0 < R) ∧ βˆ€ n, |f n| ≀ C * a ^ n, βˆƒ a ∈ Ioo 0 R, βˆƒ C > 0, βˆ€ n, |f n| ≀ C * a ^ n, βˆƒ a < R, βˆ€αΆ  n in atTop, |f n| ≀ a ^ n, βˆƒ a ∈ Ioo 0 R, βˆ€αΆ  n in atTop, |f n| ≀ a ^ n] := by
have A : Ico 0 R βŠ† Ioo (-R) R := fun x hx ↦ ⟨(neg_lt_zero.2 (hx.1.trans_lt hx.2)).trans_le hx.1, hx.2⟩ have B : Ioo 0 R βŠ† Ioo (-R) R := Subset.trans Ioo_subset_Ico_self A -- First we prove that 1-4 are equivalent using 2 β†’ 3 β†’ 4, 1 β†’ 3, and 2 β†’ 1 tfae_have 1 β†’ 3 Β· exact fun ⟨a, ha, H⟩ ↦ ⟨a, ha, H.isBigO⟩ tfae_have 2 β†’ 1 Β· exact fun ⟨a, ha, H⟩ ↦ ⟨a, B ha, H⟩ tfae_have 3 β†’ 2 Β· rintro ⟨a, ha, H⟩ rcases exists_between (abs_lt.2 ha) with ⟨b, hab, hbR⟩ exact ⟨b, ⟨(abs_nonneg a).trans_lt hab, hbR⟩, H.trans_isLittleO (isLittleO_pow_pow_of_abs_lt_left (hab.trans_le (le_abs_self b)))⟩ tfae_have 2 β†’ 4 Β· exact fun ⟨a, ha, H⟩ ↦ ⟨a, ha, H.isBigO⟩ tfae_have 4 β†’ 3 Β· exact fun ⟨a, ha, H⟩ ↦ ⟨a, B ha, H⟩ -- Add 5 and 6 using 4 β†’ 6 β†’ 5 β†’ 3 tfae_have 4 β†’ 6 Β· rintro ⟨a, ha, H⟩ rcases bound_of_isBigO_nat_atTop H with ⟨C, hCβ‚€, hC⟩ refine ⟨a, ha, C, hCβ‚€, fun n ↦ ?_⟩ simpa only [Real.norm_eq_abs, abs_pow, abs_of_nonneg ha.1.le] using hC (pow_ne_zero n ha.1.ne') tfae_have 6 β†’ 5 Β· exact fun ⟨a, ha, C, Hβ‚€, H⟩ ↦ ⟨a, ha.2, C, Or.inl Hβ‚€, H⟩ tfae_have 5 β†’ 3 Β· rintro ⟨a, ha, C, hβ‚€, H⟩ rcases sign_cases_of_C_mul_pow_nonneg fun n ↦ (abs_nonneg _).trans (H n) with (rfl | ⟨hCβ‚€, haβ‚€βŸ©) Β· obtain rfl : f = 0 := by ext n simpa using H n simp only [lt_irrefl, false_or_iff] at hβ‚€ exact ⟨0, ⟨neg_lt_zero.2 hβ‚€, hβ‚€βŸ©, isBigO_zero _ _⟩ exact ⟨a, A ⟨haβ‚€, ha⟩, isBigO_of_le' _ fun n ↦ (H n).trans <| mul_le_mul_of_nonneg_left (le_abs_self _) hCβ‚€.le⟩ -- Add 7 and 8 using 2 β†’ 8 β†’ 7 β†’ 3 tfae_have 2 β†’ 8 Β· rintro ⟨a, ha, H⟩ refine ⟨a, ha, (H.def zero_lt_one).mono fun n hn ↦ ?_⟩ rwa [Real.norm_eq_abs, Real.norm_eq_abs, one_mul, abs_pow, abs_of_pos ha.1] at hn tfae_have 8 β†’ 7 Β· exact fun ⟨a, ha, H⟩ ↦ ⟨a, ha.2, H⟩ tfae_have 7 β†’ 3 Β· rintro ⟨a, ha, H⟩ have : 0 ≀ a := nonneg_of_eventually_pow_nonneg (H.mono fun n ↦ (abs_nonneg _).trans) refine ⟨a, A ⟨this, ha⟩, IsBigO.of_bound 1 ?_⟩ simpa only [Real.norm_eq_abs, one_mul, abs_pow, abs_of_nonneg this] -- Porting note: used to work without explicitly having 6 β†’ 7 tfae_have 6 β†’ 7 Β· exact fun h ↦ tfae_8_to_7 <| tfae_2_to_8 <| tfae_3_to_2 <| tfae_5_to_3 <| tfae_6_to_5 h tfae_finish
1,760
import Mathlib.Analysis.Normed.Group.Hom import Mathlib.Analysis.SpecificLimits.Normed #align_import analysis.normed.group.controlled_closure from "leanprover-community/mathlib"@"f2ce6086713c78a7f880485f7917ea547a215982" open Filter Finset open Topology variable {G : Type*} [NormedAddCommGroup G] [CompleteSpace G] variable {H : Type*} [NormedAddCommGroup H]
Mathlib/Analysis/Normed/Group/ControlledClosure.lean
32
106
theorem controlled_closure_of_complete {f : NormedAddGroupHom G H} {K : AddSubgroup H} {C Ξ΅ : ℝ} (hC : 0 < C) (hΞ΅ : 0 < Ξ΅) (hyp : f.SurjectiveOnWith K C) : f.SurjectiveOnWith K.topologicalClosure (C + Ξ΅) := by
rintro (h : H) (h_in : h ∈ K.topologicalClosure) -- We first get rid of the easy case where `h = 0`. by_cases hyp_h : h = 0 Β· rw [hyp_h] use 0 simp /- The desired preimage will be constructed as the sum of a series. Convergence of the series will be guaranteed by completeness of `G`. We first write `h` as the sum of a sequence `v` of elements of `K` which starts close to `h` and then quickly goes to zero. The sequence `b` below quantifies this. -/ set b : β„• β†’ ℝ := fun i => (1 / 2) ^ i * (Ξ΅ * β€–hβ€– / 2) / C have b_pos (i) : 0 < b i := by field_simp [b, hC, hyp_h] obtain ⟨v : β„• β†’ H, lim_v : Tendsto (fun n : β„• => βˆ‘ k ∈ range (n + 1), v k) atTop (𝓝 h), v_in : βˆ€ n, v n ∈ K, hvβ‚€ : β€–v 0 - hβ€– < b 0, hv : βˆ€ n > 0, β€–v nβ€– < b n⟩ := controlled_sum_of_mem_closure h_in b_pos /- The controlled surjectivity assumption on `f` allows to build preimages `u n` for all elements `v n` of the `v` sequence. -/ have : βˆ€ n, βˆƒ m' : G, f m' = v n ∧ β€–m'β€– ≀ C * β€–v nβ€– := fun n : β„• => hyp (v n) (v_in n) choose u hu hnorm_u using this /- The desired series `s` is then obtained by summing `u`. We then check our choice of `b` ensures `s` is Cauchy. -/ set s : β„• β†’ G := fun n => βˆ‘ k ∈ range (n + 1), u k have : CauchySeq s := by apply NormedAddCommGroup.cauchy_series_of_le_geometric'' (by norm_num) one_half_lt_one Β· rintro n (hn : n β‰₯ 1) calc β€–u nβ€– ≀ C * β€–v nβ€– := hnorm_u n _ ≀ C * b n := by gcongr; exact (hv _ <| Nat.succ_le_iff.mp hn).le _ = (1 / 2) ^ n * (Ξ΅ * β€–hβ€– / 2) := by simp [mul_div_cancelβ‚€ _ hC.ne.symm] _ = Ξ΅ * β€–hβ€– / 2 * (1 / 2) ^ n := mul_comm _ _ -- We now show that the limit `g` of `s` is the desired preimage. obtain ⟨g : G, hg⟩ := cauchySeq_tendsto_of_complete this refine ⟨g, ?_, ?_⟩ Β· -- We indeed get a preimage. First note: have : f ∘ s = fun n => βˆ‘ k ∈ range (n + 1), v k := by ext n simp [s, map_sum, hu] /- In the above equality, the left-hand-side converges to `f g` by continuity of `f` and definition of `g` while the right-hand-side converges to `h` by construction of `v` so `g` is indeed a preimage of `h`. -/ rw [← this] at lim_v exact tendsto_nhds_unique ((f.continuous.tendsto g).comp hg) lim_v Β· -- Then we need to estimate the norm of `g`, using our careful choice of `b`. suffices βˆ€ n, β€–s nβ€– ≀ (C + Ξ΅) * β€–hβ€– from le_of_tendsto' (continuous_norm.continuousAt.tendsto.comp hg) this intro n have hnormβ‚€ : β€–u 0β€– ≀ C * b 0 + C * β€–hβ€– := by have := calc β€–v 0β€– ≀ β€–hβ€– + β€–v 0 - hβ€– := norm_le_insert' _ _ _ ≀ β€–hβ€– + b 0 := by gcongr calc β€–u 0β€– ≀ C * β€–v 0β€– := hnorm_u 0 _ ≀ C * (β€–hβ€– + b 0) := by gcongr _ = C * b 0 + C * β€–hβ€– := by rw [add_comm, mul_add] have : (βˆ‘ k ∈ range (n + 1), C * b k) ≀ Ξ΅ * β€–hβ€– := calc (βˆ‘ k ∈ range (n + 1), C * b k) _ = (βˆ‘ k ∈ range (n + 1), (1 / 2 : ℝ) ^ k) * (Ξ΅ * β€–hβ€– / 2) := by simp only [mul_div_cancelβ‚€ _ hC.ne.symm, ← sum_mul] _ ≀ 2 * (Ξ΅ * β€–hβ€– / 2) := by gcongr; apply sum_geometric_two_le _ = Ξ΅ * β€–hβ€– := mul_div_cancelβ‚€ _ two_ne_zero calc β€–s nβ€– ≀ βˆ‘ k ∈ range (n + 1), β€–u kβ€– := norm_sum_le _ _ _ = (βˆ‘ k ∈ range n, β€–u (k + 1)β€–) + β€–u 0β€– := sum_range_succ' _ _ _ ≀ (βˆ‘ k ∈ range n, C * β€–v (k + 1)β€–) + β€–u 0β€– := by gcongr; apply hnorm_u _ ≀ (βˆ‘ k ∈ range n, C * b (k + 1)) + (C * b 0 + C * β€–hβ€–) := by gcongr with k; exact (hv _ k.succ_pos).le _ = (βˆ‘ k ∈ range (n + 1), C * b k) + C * β€–hβ€– := by rw [← add_assoc, sum_range_succ'] _ ≀ (C + Ξ΅) * β€–hβ€– := by rw [add_comm, add_mul] apply add_le_add_left this
1,761
import Mathlib.Analysis.Normed.Group.Hom import Mathlib.Analysis.SpecificLimits.Normed #align_import analysis.normed.group.controlled_closure from "leanprover-community/mathlib"@"f2ce6086713c78a7f880485f7917ea547a215982" open Filter Finset open Topology variable {G : Type*} [NormedAddCommGroup G] [CompleteSpace G] variable {H : Type*} [NormedAddCommGroup H] theorem controlled_closure_of_complete {f : NormedAddGroupHom G H} {K : AddSubgroup H} {C Ξ΅ : ℝ} (hC : 0 < C) (hΞ΅ : 0 < Ξ΅) (hyp : f.SurjectiveOnWith K C) : f.SurjectiveOnWith K.topologicalClosure (C + Ξ΅) := by rintro (h : H) (h_in : h ∈ K.topologicalClosure) -- We first get rid of the easy case where `h = 0`. by_cases hyp_h : h = 0 Β· rw [hyp_h] use 0 simp set b : β„• β†’ ℝ := fun i => (1 / 2) ^ i * (Ξ΅ * β€–hβ€– / 2) / C have b_pos (i) : 0 < b i := by field_simp [b, hC, hyp_h] obtain ⟨v : β„• β†’ H, lim_v : Tendsto (fun n : β„• => βˆ‘ k ∈ range (n + 1), v k) atTop (𝓝 h), v_in : βˆ€ n, v n ∈ K, hvβ‚€ : β€–v 0 - hβ€– < b 0, hv : βˆ€ n > 0, β€–v nβ€– < b n⟩ := controlled_sum_of_mem_closure h_in b_pos have : βˆ€ n, βˆƒ m' : G, f m' = v n ∧ β€–m'β€– ≀ C * β€–v nβ€– := fun n : β„• => hyp (v n) (v_in n) choose u hu hnorm_u using this set s : β„• β†’ G := fun n => βˆ‘ k ∈ range (n + 1), u k have : CauchySeq s := by apply NormedAddCommGroup.cauchy_series_of_le_geometric'' (by norm_num) one_half_lt_one Β· rintro n (hn : n β‰₯ 1) calc β€–u nβ€– ≀ C * β€–v nβ€– := hnorm_u n _ ≀ C * b n := by gcongr; exact (hv _ <| Nat.succ_le_iff.mp hn).le _ = (1 / 2) ^ n * (Ξ΅ * β€–hβ€– / 2) := by simp [mul_div_cancelβ‚€ _ hC.ne.symm] _ = Ξ΅ * β€–hβ€– / 2 * (1 / 2) ^ n := mul_comm _ _ -- We now show that the limit `g` of `s` is the desired preimage. obtain ⟨g : G, hg⟩ := cauchySeq_tendsto_of_complete this refine ⟨g, ?_, ?_⟩ Β· -- We indeed get a preimage. First note: have : f ∘ s = fun n => βˆ‘ k ∈ range (n + 1), v k := by ext n simp [s, map_sum, hu] rw [← this] at lim_v exact tendsto_nhds_unique ((f.continuous.tendsto g).comp hg) lim_v Β· -- Then we need to estimate the norm of `g`, using our careful choice of `b`. suffices βˆ€ n, β€–s nβ€– ≀ (C + Ξ΅) * β€–hβ€– from le_of_tendsto' (continuous_norm.continuousAt.tendsto.comp hg) this intro n have hnormβ‚€ : β€–u 0β€– ≀ C * b 0 + C * β€–hβ€– := by have := calc β€–v 0β€– ≀ β€–hβ€– + β€–v 0 - hβ€– := norm_le_insert' _ _ _ ≀ β€–hβ€– + b 0 := by gcongr calc β€–u 0β€– ≀ C * β€–v 0β€– := hnorm_u 0 _ ≀ C * (β€–hβ€– + b 0) := by gcongr _ = C * b 0 + C * β€–hβ€– := by rw [add_comm, mul_add] have : (βˆ‘ k ∈ range (n + 1), C * b k) ≀ Ξ΅ * β€–hβ€– := calc (βˆ‘ k ∈ range (n + 1), C * b k) _ = (βˆ‘ k ∈ range (n + 1), (1 / 2 : ℝ) ^ k) * (Ξ΅ * β€–hβ€– / 2) := by simp only [mul_div_cancelβ‚€ _ hC.ne.symm, ← sum_mul] _ ≀ 2 * (Ξ΅ * β€–hβ€– / 2) := by gcongr; apply sum_geometric_two_le _ = Ξ΅ * β€–hβ€– := mul_div_cancelβ‚€ _ two_ne_zero calc β€–s nβ€– ≀ βˆ‘ k ∈ range (n + 1), β€–u kβ€– := norm_sum_le _ _ _ = (βˆ‘ k ∈ range n, β€–u (k + 1)β€–) + β€–u 0β€– := sum_range_succ' _ _ _ ≀ (βˆ‘ k ∈ range n, C * β€–v (k + 1)β€–) + β€–u 0β€– := by gcongr; apply hnorm_u _ ≀ (βˆ‘ k ∈ range n, C * b (k + 1)) + (C * b 0 + C * β€–hβ€–) := by gcongr with k; exact (hv _ k.succ_pos).le _ = (βˆ‘ k ∈ range (n + 1), C * b k) + C * β€–hβ€– := by rw [← add_assoc, sum_range_succ'] _ ≀ (C + Ξ΅) * β€–hβ€– := by rw [add_comm, add_mul] apply add_le_add_left this #align controlled_closure_of_complete controlled_closure_of_complete
Mathlib/Analysis/Normed/Group/ControlledClosure.lean
116
125
theorem controlled_closure_range_of_complete {f : NormedAddGroupHom G H} {K : Type*} [SeminormedAddCommGroup K] {j : NormedAddGroupHom K H} (hj : βˆ€ x, β€–j xβ€– = β€–xβ€–) {C Ξ΅ : ℝ} (hC : 0 < C) (hΞ΅ : 0 < Ξ΅) (hyp : βˆ€ k, βˆƒ g, f g = j k ∧ β€–gβ€– ≀ C * β€–kβ€–) : f.SurjectiveOnWith j.range.topologicalClosure (C + Ξ΅) := by
replace hyp : βˆ€ h ∈ j.range, βˆƒ g, f g = h ∧ β€–gβ€– ≀ C * β€–hβ€– := by intro h h_in rcases (j.mem_range _).mp h_in with ⟨k, rfl⟩ rw [hj] exact hyp k exact controlled_closure_of_complete hC hΞ΅ hyp
1,761
import Mathlib.Analysis.Calculus.FormalMultilinearSeries import Mathlib.Analysis.SpecificLimits.Normed import Mathlib.Logic.Equiv.Fin import Mathlib.Topology.Algebra.InfiniteSum.Module #align_import analysis.analytic.basic from "leanprover-community/mathlib"@"32253a1a1071173b33dc7d6a218cf722c6feb514" noncomputable section variable {π•œ E F G : Type*} open scoped Classical open Topology NNReal Filter ENNReal open Set Filter Asymptotics namespace FormalMultilinearSeries variable [Ring π•œ] [AddCommGroup E] [AddCommGroup F] [Module π•œ E] [Module π•œ F] variable [TopologicalSpace E] [TopologicalSpace F] variable [TopologicalAddGroup E] [TopologicalAddGroup F] variable [ContinuousConstSMul π•œ E] [ContinuousConstSMul π•œ F] protected def sum (p : FormalMultilinearSeries π•œ E F) (x : E) : F := βˆ‘' n : β„•, p n fun _ => x #align formal_multilinear_series.sum FormalMultilinearSeries.sum def partialSum (p : FormalMultilinearSeries π•œ E F) (n : β„•) (x : E) : F := βˆ‘ k ∈ Finset.range n, p k fun _ : Fin k => x #align formal_multilinear_series.partial_sum FormalMultilinearSeries.partialSum
Mathlib/Analysis/Analytic/Basic.lean
102
105
theorem partialSum_continuous (p : FormalMultilinearSeries π•œ E F) (n : β„•) : Continuous (p.partialSum n) := by
unfold partialSum -- Porting note: added continuity
1,762
import Mathlib.Analysis.Calculus.FormalMultilinearSeries import Mathlib.Analysis.SpecificLimits.Normed import Mathlib.Logic.Equiv.Fin import Mathlib.Topology.Algebra.InfiniteSum.Module #align_import analysis.analytic.basic from "leanprover-community/mathlib"@"32253a1a1071173b33dc7d6a218cf722c6feb514" noncomputable section variable {π•œ E F G : Type*} open scoped Classical open Topology NNReal Filter ENNReal open Set Filter Asymptotics variable [NontriviallyNormedField π•œ] [NormedAddCommGroup E] [NormedSpace π•œ E] [NormedAddCommGroup F] [NormedSpace π•œ F] [NormedAddCommGroup G] [NormedSpace π•œ G] namespace FormalMultilinearSeries variable (p : FormalMultilinearSeries π•œ E F) {r : ℝβ‰₯0} def radius (p : FormalMultilinearSeries π•œ E F) : ℝβ‰₯0∞ := ⨆ (r : ℝβ‰₯0) (C : ℝ) (_ : βˆ€ n, β€–p nβ€– * (r : ℝ) ^ n ≀ C), (r : ℝβ‰₯0∞) #align formal_multilinear_series.radius FormalMultilinearSeries.radius theorem le_radius_of_bound (C : ℝ) {r : ℝβ‰₯0} (h : βˆ€ n : β„•, β€–p nβ€– * (r : ℝ) ^ n ≀ C) : (r : ℝβ‰₯0∞) ≀ p.radius := le_iSup_of_le r <| le_iSup_of_le C <| le_iSup (fun _ => (r : ℝβ‰₯0∞)) h #align formal_multilinear_series.le_radius_of_bound FormalMultilinearSeries.le_radius_of_bound theorem le_radius_of_bound_nnreal (C : ℝβ‰₯0) {r : ℝβ‰₯0} (h : βˆ€ n : β„•, β€–p nβ€–β‚Š * r ^ n ≀ C) : (r : ℝβ‰₯0∞) ≀ p.radius := p.le_radius_of_bound C fun n => mod_cast h n #align formal_multilinear_series.le_radius_of_bound_nnreal FormalMultilinearSeries.le_radius_of_bound_nnreal theorem le_radius_of_isBigO (h : (fun n => β€–p nβ€– * (r : ℝ) ^ n) =O[atTop] fun _ => (1 : ℝ)) : ↑r ≀ p.radius := Exists.elim (isBigO_one_nat_atTop_iff.1 h) fun C hC => p.le_radius_of_bound C fun n => (le_abs_self _).trans (hC n) set_option linter.uppercaseLean3 false in #align formal_multilinear_series.le_radius_of_is_O FormalMultilinearSeries.le_radius_of_isBigO theorem le_radius_of_eventually_le (C) (h : βˆ€αΆ  n in atTop, β€–p nβ€– * (r : ℝ) ^ n ≀ C) : ↑r ≀ p.radius := p.le_radius_of_isBigO <| IsBigO.of_bound C <| h.mono fun n hn => by simpa #align formal_multilinear_series.le_radius_of_eventually_le FormalMultilinearSeries.le_radius_of_eventually_le theorem le_radius_of_summable_nnnorm (h : Summable fun n => β€–p nβ€–β‚Š * r ^ n) : ↑r ≀ p.radius := p.le_radius_of_bound_nnreal (βˆ‘' n, β€–p nβ€–β‚Š * r ^ n) fun _ => le_tsum' h _ #align formal_multilinear_series.le_radius_of_summable_nnnorm FormalMultilinearSeries.le_radius_of_summable_nnnorm theorem le_radius_of_summable (h : Summable fun n => β€–p nβ€– * (r : ℝ) ^ n) : ↑r ≀ p.radius := p.le_radius_of_summable_nnnorm <| by simp only [← coe_nnnorm] at h exact mod_cast h #align formal_multilinear_series.le_radius_of_summable FormalMultilinearSeries.le_radius_of_summable theorem radius_eq_top_of_forall_nnreal_isBigO (h : βˆ€ r : ℝβ‰₯0, (fun n => β€–p nβ€– * (r : ℝ) ^ n) =O[atTop] fun _ => (1 : ℝ)) : p.radius = ∞ := ENNReal.eq_top_of_forall_nnreal_le fun r => p.le_radius_of_isBigO (h r) set_option linter.uppercaseLean3 false in #align formal_multilinear_series.radius_eq_top_of_forall_nnreal_is_O FormalMultilinearSeries.radius_eq_top_of_forall_nnreal_isBigO theorem radius_eq_top_of_eventually_eq_zero (h : βˆ€αΆ  n in atTop, p n = 0) : p.radius = ∞ := p.radius_eq_top_of_forall_nnreal_isBigO fun r => (isBigO_zero _ _).congr' (h.mono fun n hn => by simp [hn]) EventuallyEq.rfl #align formal_multilinear_series.radius_eq_top_of_eventually_eq_zero FormalMultilinearSeries.radius_eq_top_of_eventually_eq_zero theorem radius_eq_top_of_forall_image_add_eq_zero (n : β„•) (hn : βˆ€ m, p (m + n) = 0) : p.radius = ∞ := p.radius_eq_top_of_eventually_eq_zero <| mem_atTop_sets.2 ⟨n, fun _ hk => tsub_add_cancel_of_le hk β–Έ hn _⟩ #align formal_multilinear_series.radius_eq_top_of_forall_image_add_eq_zero FormalMultilinearSeries.radius_eq_top_of_forall_image_add_eq_zero @[simp] theorem constFormalMultilinearSeries_radius {v : F} : (constFormalMultilinearSeries π•œ E v).radius = ⊀ := (constFormalMultilinearSeries π•œ E v).radius_eq_top_of_forall_image_add_eq_zero 1 (by simp [constFormalMultilinearSeries]) #align formal_multilinear_series.const_formal_multilinear_series_radius FormalMultilinearSeries.constFormalMultilinearSeries_radius
Mathlib/Analysis/Analytic/Basic.lean
187
202
theorem isLittleO_of_lt_radius (h : ↑r < p.radius) : βˆƒ a ∈ Ioo (0 : ℝ) 1, (fun n => β€–p nβ€– * (r : ℝ) ^ n) =o[atTop] (a ^ Β·) := by
have := (TFAE_exists_lt_isLittleO_pow (fun n => β€–p nβ€– * (r : ℝ) ^ n) 1).out 1 4 rw [this] -- Porting note: was -- rw [(TFAE_exists_lt_isLittleO_pow (fun n => β€–p nβ€– * (r : ℝ) ^ n) 1).out 1 4] simp only [radius, lt_iSup_iff] at h rcases h with ⟨t, C, hC, rt⟩ rw [ENNReal.coe_lt_coe, ← NNReal.coe_lt_coe] at rt have : 0 < (t : ℝ) := r.coe_nonneg.trans_lt rt rw [← div_lt_one this] at rt refine ⟨_, rt, C, Or.inr zero_lt_one, fun n => ?_⟩ calc |β€–p nβ€– * (r : ℝ) ^ n| = β€–p nβ€– * (t : ℝ) ^ n * (r / t : ℝ) ^ n := by field_simp [mul_right_comm, abs_mul] _ ≀ C * (r / t : ℝ) ^ n := by gcongr; apply hC
1,762
import Mathlib.Analysis.Analytic.Basic import Mathlib.Analysis.SpecialFunctions.Pow.NNReal #align_import analysis.analytic.radius_liminf from "leanprover-community/mathlib"@"0b9eaaa7686280fad8cce467f5c3c57ee6ce77f8" variable {π•œ : Type*} [NontriviallyNormedField π•œ] {E : Type*} [NormedAddCommGroup E] [NormedSpace π•œ E] {F : Type*} [NormedAddCommGroup F] [NormedSpace π•œ F] open scoped Topology Classical NNReal ENNReal open Filter Asymptotics namespace FormalMultilinearSeries variable (p : FormalMultilinearSeries π•œ E F)
Mathlib/Analysis/Analytic/RadiusLiminf.lean
35
61
theorem radius_eq_liminf : p.radius = liminf (fun n => (1 / (β€–p nβ€–β‚Š ^ (1 / (n : ℝ)) : ℝβ‰₯0) : ℝβ‰₯0∞)) atTop := by
-- Porting note: added type ascription to make elaborated statement match Lean 3 version have : βˆ€ (r : ℝβ‰₯0) {n : β„•}, 0 < n β†’ ((r : ℝβ‰₯0∞) ≀ 1 / ↑(β€–p nβ€–β‚Š ^ (1 / (n : ℝ))) ↔ β€–p nβ€–β‚Š * r ^ n ≀ 1) := by intro r n hn have : 0 < (n : ℝ) := Nat.cast_pos.2 hn conv_lhs => rw [one_div, ENNReal.le_inv_iff_mul_le, ← ENNReal.coe_mul, ENNReal.coe_le_one_iff, one_div, ← NNReal.rpow_one r, ← mul_inv_cancel this.ne', NNReal.rpow_mul, ← NNReal.mul_rpow, ← NNReal.one_rpow n⁻¹, NNReal.rpow_le_rpow_iff (inv_pos.2 this), mul_comm, NNReal.rpow_natCast] apply le_antisymm <;> refine ENNReal.le_of_forall_nnreal_lt fun r hr => ?_ Β· have := ((TFAE_exists_lt_isLittleO_pow (fun n => β€–p nβ€– * r ^ n) 1).out 1 7).1 (p.isLittleO_of_lt_radius hr) obtain ⟨a, ha, H⟩ := this apply le_liminf_of_le Β· infer_param Β· rw [← eventually_map] refine H.mp ((eventually_gt_atTop 0).mono fun n hnβ‚€ hn => (this _ hnβ‚€).2 (NNReal.coe_le_coe.1 ?_)) push_cast exact (le_abs_self _).trans (hn.trans (pow_le_one _ ha.1.le ha.2.le)) Β· refine p.le_radius_of_isBigO (IsBigO.of_bound 1 ?_) refine (eventually_lt_of_lt_liminf hr).mp ((eventually_gt_atTop 0).mono fun n hnβ‚€ hn => ?_) simpa using NNReal.coe_le_coe.2 ((this _ hnβ‚€).1 hn.le)
1,763
import Mathlib.Analysis.Analytic.Basic import Mathlib.Combinatorics.Enumerative.Composition #align_import analysis.analytic.composition from "leanprover-community/mathlib"@"ce11c3c2a285bbe6937e26d9792fda4e51f3fe1a" noncomputable section variable {π•œ : Type*} {E F G H : Type*} open Filter List open scoped Topology Classical NNReal ENNReal section Topological variable [CommRing π•œ] [AddCommGroup E] [AddCommGroup F] [AddCommGroup G] variable [Module π•œ E] [Module π•œ F] [Module π•œ G] variable [TopologicalSpace E] [TopologicalSpace F] [TopologicalSpace G] namespace FormalMultilinearSeries variable [TopologicalAddGroup E] [ContinuousConstSMul π•œ E] variable [TopologicalAddGroup F] [ContinuousConstSMul π•œ F] variable [TopologicalAddGroup G] [ContinuousConstSMul π•œ G] def applyComposition (p : FormalMultilinearSeries π•œ E F) {n : β„•} (c : Composition n) : (Fin n β†’ E) β†’ Fin c.length β†’ F := fun v i => p (c.blocksFun i) (v ∘ c.embedding i) #align formal_multilinear_series.apply_composition FormalMultilinearSeries.applyComposition
Mathlib/Analysis/Analytic/Composition.lean
106
114
theorem applyComposition_ones (p : FormalMultilinearSeries π•œ E F) (n : β„•) : p.applyComposition (Composition.ones n) = fun v i => p 1 fun _ => v (Fin.castLE (Composition.length_le _) i) := by
funext v i apply p.congr (Composition.ones_blocksFun _ _) intro j hjn hj1 obtain rfl : j = 0 := by omega refine congr_arg v ?_ rw [Fin.ext_iff, Fin.coe_castLE, Composition.ones_embedding, Fin.val_mk]
1,764
import Mathlib.Analysis.Analytic.Basic import Mathlib.Combinatorics.Enumerative.Composition #align_import analysis.analytic.composition from "leanprover-community/mathlib"@"ce11c3c2a285bbe6937e26d9792fda4e51f3fe1a" noncomputable section variable {π•œ : Type*} {E F G H : Type*} open Filter List open scoped Topology Classical NNReal ENNReal section Topological variable [CommRing π•œ] [AddCommGroup E] [AddCommGroup F] [AddCommGroup G] variable [Module π•œ E] [Module π•œ F] [Module π•œ G] variable [TopologicalSpace E] [TopologicalSpace F] [TopologicalSpace G] namespace FormalMultilinearSeries variable [TopologicalAddGroup E] [ContinuousConstSMul π•œ E] variable [TopologicalAddGroup F] [ContinuousConstSMul π•œ F] variable [TopologicalAddGroup G] [ContinuousConstSMul π•œ G] def applyComposition (p : FormalMultilinearSeries π•œ E F) {n : β„•} (c : Composition n) : (Fin n β†’ E) β†’ Fin c.length β†’ F := fun v i => p (c.blocksFun i) (v ∘ c.embedding i) #align formal_multilinear_series.apply_composition FormalMultilinearSeries.applyComposition theorem applyComposition_ones (p : FormalMultilinearSeries π•œ E F) (n : β„•) : p.applyComposition (Composition.ones n) = fun v i => p 1 fun _ => v (Fin.castLE (Composition.length_le _) i) := by funext v i apply p.congr (Composition.ones_blocksFun _ _) intro j hjn hj1 obtain rfl : j = 0 := by omega refine congr_arg v ?_ rw [Fin.ext_iff, Fin.coe_castLE, Composition.ones_embedding, Fin.val_mk] #align formal_multilinear_series.apply_composition_ones FormalMultilinearSeries.applyComposition_ones
Mathlib/Analysis/Analytic/Composition.lean
117
127
theorem applyComposition_single (p : FormalMultilinearSeries π•œ E F) {n : β„•} (hn : 0 < n) (v : Fin n β†’ E) : p.applyComposition (Composition.single n hn) v = fun _j => p n v := by
ext j refine p.congr (by simp) fun i hi1 hi2 => ?_ dsimp congr 1 convert Composition.single_embedding hn ⟨i, hi2⟩ using 1 cases' j with j_val j_property have : j_val = 0 := le_bot_iff.1 (Nat.lt_succ_iff.1 j_property) congr! simp
1,764
import Mathlib.Analysis.Analytic.Basic import Mathlib.Combinatorics.Enumerative.Composition #align_import analysis.analytic.composition from "leanprover-community/mathlib"@"ce11c3c2a285bbe6937e26d9792fda4e51f3fe1a" noncomputable section variable {π•œ : Type*} {E F G H : Type*} open Filter List open scoped Topology Classical NNReal ENNReal section Topological variable [CommRing π•œ] [AddCommGroup E] [AddCommGroup F] [AddCommGroup G] variable [Module π•œ E] [Module π•œ F] [Module π•œ G] variable [TopologicalSpace E] [TopologicalSpace F] [TopologicalSpace G] namespace FormalMultilinearSeries variable [TopologicalAddGroup E] [ContinuousConstSMul π•œ E] variable [TopologicalAddGroup F] [ContinuousConstSMul π•œ F] variable [TopologicalAddGroup G] [ContinuousConstSMul π•œ G] def applyComposition (p : FormalMultilinearSeries π•œ E F) {n : β„•} (c : Composition n) : (Fin n β†’ E) β†’ Fin c.length β†’ F := fun v i => p (c.blocksFun i) (v ∘ c.embedding i) #align formal_multilinear_series.apply_composition FormalMultilinearSeries.applyComposition theorem applyComposition_ones (p : FormalMultilinearSeries π•œ E F) (n : β„•) : p.applyComposition (Composition.ones n) = fun v i => p 1 fun _ => v (Fin.castLE (Composition.length_le _) i) := by funext v i apply p.congr (Composition.ones_blocksFun _ _) intro j hjn hj1 obtain rfl : j = 0 := by omega refine congr_arg v ?_ rw [Fin.ext_iff, Fin.coe_castLE, Composition.ones_embedding, Fin.val_mk] #align formal_multilinear_series.apply_composition_ones FormalMultilinearSeries.applyComposition_ones theorem applyComposition_single (p : FormalMultilinearSeries π•œ E F) {n : β„•} (hn : 0 < n) (v : Fin n β†’ E) : p.applyComposition (Composition.single n hn) v = fun _j => p n v := by ext j refine p.congr (by simp) fun i hi1 hi2 => ?_ dsimp congr 1 convert Composition.single_embedding hn ⟨i, hi2⟩ using 1 cases' j with j_val j_property have : j_val = 0 := le_bot_iff.1 (Nat.lt_succ_iff.1 j_property) congr! simp #align formal_multilinear_series.apply_composition_single FormalMultilinearSeries.applyComposition_single @[simp]
Mathlib/Analysis/Analytic/Composition.lean
131
134
theorem removeZero_applyComposition (p : FormalMultilinearSeries π•œ E F) {n : β„•} (c : Composition n) : p.removeZero.applyComposition c = p.applyComposition c := by
ext v i simp [applyComposition, zero_lt_one.trans_le (c.one_le_blocksFun i), removeZero_of_pos]
1,764
import Mathlib.Analysis.Analytic.Basic import Mathlib.Combinatorics.Enumerative.Composition #align_import analysis.analytic.composition from "leanprover-community/mathlib"@"ce11c3c2a285bbe6937e26d9792fda4e51f3fe1a" noncomputable section variable {π•œ : Type*} {E F G H : Type*} open Filter List open scoped Topology Classical NNReal ENNReal section Topological variable [CommRing π•œ] [AddCommGroup E] [AddCommGroup F] [AddCommGroup G] variable [Module π•œ E] [Module π•œ F] [Module π•œ G] variable [TopologicalSpace E] [TopologicalSpace F] [TopologicalSpace G] namespace FormalMultilinearSeries variable [TopologicalAddGroup E] [ContinuousConstSMul π•œ E] variable [TopologicalAddGroup F] [ContinuousConstSMul π•œ F] variable [TopologicalAddGroup G] [ContinuousConstSMul π•œ G] def applyComposition (p : FormalMultilinearSeries π•œ E F) {n : β„•} (c : Composition n) : (Fin n β†’ E) β†’ Fin c.length β†’ F := fun v i => p (c.blocksFun i) (v ∘ c.embedding i) #align formal_multilinear_series.apply_composition FormalMultilinearSeries.applyComposition theorem applyComposition_ones (p : FormalMultilinearSeries π•œ E F) (n : β„•) : p.applyComposition (Composition.ones n) = fun v i => p 1 fun _ => v (Fin.castLE (Composition.length_le _) i) := by funext v i apply p.congr (Composition.ones_blocksFun _ _) intro j hjn hj1 obtain rfl : j = 0 := by omega refine congr_arg v ?_ rw [Fin.ext_iff, Fin.coe_castLE, Composition.ones_embedding, Fin.val_mk] #align formal_multilinear_series.apply_composition_ones FormalMultilinearSeries.applyComposition_ones theorem applyComposition_single (p : FormalMultilinearSeries π•œ E F) {n : β„•} (hn : 0 < n) (v : Fin n β†’ E) : p.applyComposition (Composition.single n hn) v = fun _j => p n v := by ext j refine p.congr (by simp) fun i hi1 hi2 => ?_ dsimp congr 1 convert Composition.single_embedding hn ⟨i, hi2⟩ using 1 cases' j with j_val j_property have : j_val = 0 := le_bot_iff.1 (Nat.lt_succ_iff.1 j_property) congr! simp #align formal_multilinear_series.apply_composition_single FormalMultilinearSeries.applyComposition_single @[simp] theorem removeZero_applyComposition (p : FormalMultilinearSeries π•œ E F) {n : β„•} (c : Composition n) : p.removeZero.applyComposition c = p.applyComposition c := by ext v i simp [applyComposition, zero_lt_one.trans_le (c.one_le_blocksFun i), removeZero_of_pos] #align formal_multilinear_series.remove_zero_apply_composition FormalMultilinearSeries.removeZero_applyComposition
Mathlib/Analysis/Analytic/Composition.lean
140
162
theorem applyComposition_update (p : FormalMultilinearSeries π•œ E F) {n : β„•} (c : Composition n) (j : Fin n) (v : Fin n β†’ E) (z : E) : p.applyComposition c (Function.update v j z) = Function.update (p.applyComposition c v) (c.index j) (p (c.blocksFun (c.index j)) (Function.update (v ∘ c.embedding (c.index j)) (c.invEmbedding j) z)) := by
ext k by_cases h : k = c.index j Β· rw [h] let r : Fin (c.blocksFun (c.index j)) β†’ Fin n := c.embedding (c.index j) simp only [Function.update_same] change p (c.blocksFun (c.index j)) (Function.update v j z ∘ r) = _ let j' := c.invEmbedding j suffices B : Function.update v j z ∘ r = Function.update (v ∘ r) j' z by rw [B] suffices C : Function.update v (r j') z ∘ r = Function.update (v ∘ r) j' z by convert C; exact (c.embedding_comp_inv j).symm exact Function.update_comp_eq_of_injective _ (c.embedding _).injective _ _ Β· simp only [h, Function.update_eq_self, Function.update_noteq, Ne, not_false_iff] let r : Fin (c.blocksFun k) β†’ Fin n := c.embedding k change p (c.blocksFun k) (Function.update v j z ∘ r) = p (c.blocksFun k) (v ∘ r) suffices B : Function.update v j z ∘ r = v ∘ r by rw [B] apply Function.update_comp_eq_of_not_mem_range rwa [c.mem_range_embedding_iff']
1,764
import Mathlib.Analysis.Analytic.Basic import Mathlib.Combinatorics.Enumerative.Composition #align_import analysis.analytic.composition from "leanprover-community/mathlib"@"ce11c3c2a285bbe6937e26d9792fda4e51f3fe1a" noncomputable section variable {π•œ : Type*} {E F G H : Type*} open Filter List open scoped Topology Classical NNReal ENNReal section Topological variable [CommRing π•œ] [AddCommGroup E] [AddCommGroup F] [AddCommGroup G] variable [Module π•œ E] [Module π•œ F] [Module π•œ G] variable [TopologicalSpace E] [TopologicalSpace F] [TopologicalSpace G] namespace FormalMultilinearSeries variable [TopologicalAddGroup E] [ContinuousConstSMul π•œ E] variable [TopologicalAddGroup F] [ContinuousConstSMul π•œ F] variable [TopologicalAddGroup G] [ContinuousConstSMul π•œ G] def applyComposition (p : FormalMultilinearSeries π•œ E F) {n : β„•} (c : Composition n) : (Fin n β†’ E) β†’ Fin c.length β†’ F := fun v i => p (c.blocksFun i) (v ∘ c.embedding i) #align formal_multilinear_series.apply_composition FormalMultilinearSeries.applyComposition theorem applyComposition_ones (p : FormalMultilinearSeries π•œ E F) (n : β„•) : p.applyComposition (Composition.ones n) = fun v i => p 1 fun _ => v (Fin.castLE (Composition.length_le _) i) := by funext v i apply p.congr (Composition.ones_blocksFun _ _) intro j hjn hj1 obtain rfl : j = 0 := by omega refine congr_arg v ?_ rw [Fin.ext_iff, Fin.coe_castLE, Composition.ones_embedding, Fin.val_mk] #align formal_multilinear_series.apply_composition_ones FormalMultilinearSeries.applyComposition_ones theorem applyComposition_single (p : FormalMultilinearSeries π•œ E F) {n : β„•} (hn : 0 < n) (v : Fin n β†’ E) : p.applyComposition (Composition.single n hn) v = fun _j => p n v := by ext j refine p.congr (by simp) fun i hi1 hi2 => ?_ dsimp congr 1 convert Composition.single_embedding hn ⟨i, hi2⟩ using 1 cases' j with j_val j_property have : j_val = 0 := le_bot_iff.1 (Nat.lt_succ_iff.1 j_property) congr! simp #align formal_multilinear_series.apply_composition_single FormalMultilinearSeries.applyComposition_single @[simp] theorem removeZero_applyComposition (p : FormalMultilinearSeries π•œ E F) {n : β„•} (c : Composition n) : p.removeZero.applyComposition c = p.applyComposition c := by ext v i simp [applyComposition, zero_lt_one.trans_le (c.one_le_blocksFun i), removeZero_of_pos] #align formal_multilinear_series.remove_zero_apply_composition FormalMultilinearSeries.removeZero_applyComposition theorem applyComposition_update (p : FormalMultilinearSeries π•œ E F) {n : β„•} (c : Composition n) (j : Fin n) (v : Fin n β†’ E) (z : E) : p.applyComposition c (Function.update v j z) = Function.update (p.applyComposition c v) (c.index j) (p (c.blocksFun (c.index j)) (Function.update (v ∘ c.embedding (c.index j)) (c.invEmbedding j) z)) := by ext k by_cases h : k = c.index j Β· rw [h] let r : Fin (c.blocksFun (c.index j)) β†’ Fin n := c.embedding (c.index j) simp only [Function.update_same] change p (c.blocksFun (c.index j)) (Function.update v j z ∘ r) = _ let j' := c.invEmbedding j suffices B : Function.update v j z ∘ r = Function.update (v ∘ r) j' z by rw [B] suffices C : Function.update v (r j') z ∘ r = Function.update (v ∘ r) j' z by convert C; exact (c.embedding_comp_inv j).symm exact Function.update_comp_eq_of_injective _ (c.embedding _).injective _ _ Β· simp only [h, Function.update_eq_self, Function.update_noteq, Ne, not_false_iff] let r : Fin (c.blocksFun k) β†’ Fin n := c.embedding k change p (c.blocksFun k) (Function.update v j z ∘ r) = p (c.blocksFun k) (v ∘ r) suffices B : Function.update v j z ∘ r = v ∘ r by rw [B] apply Function.update_comp_eq_of_not_mem_range rwa [c.mem_range_embedding_iff'] #align formal_multilinear_series.apply_composition_update FormalMultilinearSeries.applyComposition_update @[simp]
Mathlib/Analysis/Analytic/Composition.lean
166
169
theorem compContinuousLinearMap_applyComposition {n : β„•} (p : FormalMultilinearSeries π•œ F G) (f : E β†’L[π•œ] F) (c : Composition n) (v : Fin n β†’ E) : (p.compContinuousLinearMap f).applyComposition c v = p.applyComposition c (f ∘ v) := by
simp (config := {unfoldPartialApp := true}) [applyComposition]; rfl
1,764
import Mathlib.Analysis.Analytic.Linear import Mathlib.Analysis.Analytic.Composition import Mathlib.Analysis.NormedSpace.Completion #align_import analysis.analytic.uniqueness from "leanprover-community/mathlib"@"a3209ddf94136d36e5e5c624b10b2a347cc9d090" variable {π•œ : Type*} [NontriviallyNormedField π•œ] {E : Type*} [NormedAddCommGroup E] [NormedSpace π•œ E] {F : Type*} [NormedAddCommGroup F] [NormedSpace π•œ F] open Set open scoped Topology ENNReal namespace AnalyticOn
Mathlib/Analysis/Analytic/Uniqueness.lean
32
70
theorem eqOn_zero_of_preconnected_of_eventuallyEq_zero_aux [CompleteSpace F] {f : E β†’ F} {U : Set E} (hf : AnalyticOn π•œ f U) (hU : IsPreconnected U) {zβ‚€ : E} (hβ‚€ : zβ‚€ ∈ U) (hfzβ‚€ : f =αΆ [𝓝 zβ‚€] 0) : EqOn f 0 U := by
/- Let `u` be the set of points around which `f` vanishes. It is clearly open. We have to show that its limit points in `U` still belong to it, from which the inclusion `U βŠ† u` will follow by connectedness. -/ let u := {x | f =αΆ [𝓝 x] 0} suffices main : closure u ∩ U βŠ† u by have Uu : U βŠ† u := hU.subset_of_closure_inter_subset isOpen_setOf_eventually_nhds ⟨zβ‚€, hβ‚€, hfzβ‚€βŸ© main intro z hz simpa using mem_of_mem_nhds (Uu hz) /- Take a limit point `x`, then a ball `B (x, r)` on which it has a power series expansion, and then `y ∈ B (x, r/2) ∩ u`. Then `f` has a power series expansion on `B (y, r/2)` as it is contained in `B (x, r)`. All the coefficients in this series expansion vanish, as `f` is zero on a neighborhood of `y`. Therefore, `f` is zero on `B (y, r/2)`. As this ball contains `x`, it follows that `f` vanishes on a neighborhood of `x`, proving the claim. -/ rintro x ⟨xu, xU⟩ rcases hf x xU with ⟨p, r, hp⟩ obtain ⟨y, yu, hxy⟩ : βˆƒ y ∈ u, edist x y < r / 2 := EMetric.mem_closure_iff.1 xu (r / 2) (ENNReal.half_pos hp.r_pos.ne') let q := p.changeOrigin (y - x) have has_series : HasFPowerSeriesOnBall f q y (r / 2) := by have A : (β€–y - xβ€–β‚Š : ℝβ‰₯0∞) < r / 2 := by rwa [edist_comm, edist_eq_coe_nnnorm_sub] at hxy have := hp.changeOrigin (A.trans_le ENNReal.half_le_self) simp only [add_sub_cancel] at this apply this.mono (ENNReal.half_pos hp.r_pos.ne') apply ENNReal.le_sub_of_add_le_left ENNReal.coe_ne_top apply (add_le_add A.le (le_refl (r / 2))).trans (le_of_eq _) exact ENNReal.add_halves _ have M : EMetric.ball y (r / 2) ∈ 𝓝 x := EMetric.isOpen_ball.mem_nhds hxy filter_upwards [M] with z hz have A : HasSum (fun n : β„• => q n fun _ : Fin n => z - y) (f z) := has_series.hasSum_sub hz have B : HasSum (fun n : β„• => q n fun _ : Fin n => z - y) 0 := by have : HasFPowerSeriesAt 0 q y := has_series.hasFPowerSeriesAt.congr yu convert hasSum_zero (Ξ± := F) using 2 ext n exact this.apply_eq_zero n _ exact HasSum.unique A B
1,765
import Mathlib.Analysis.Analytic.Linear import Mathlib.Analysis.Analytic.Composition import Mathlib.Analysis.NormedSpace.Completion #align_import analysis.analytic.uniqueness from "leanprover-community/mathlib"@"a3209ddf94136d36e5e5c624b10b2a347cc9d090" variable {π•œ : Type*} [NontriviallyNormedField π•œ] {E : Type*} [NormedAddCommGroup E] [NormedSpace π•œ E] {F : Type*} [NormedAddCommGroup F] [NormedSpace π•œ F] open Set open scoped Topology ENNReal namespace AnalyticOn theorem eqOn_zero_of_preconnected_of_eventuallyEq_zero_aux [CompleteSpace F] {f : E β†’ F} {U : Set E} (hf : AnalyticOn π•œ f U) (hU : IsPreconnected U) {zβ‚€ : E} (hβ‚€ : zβ‚€ ∈ U) (hfzβ‚€ : f =αΆ [𝓝 zβ‚€] 0) : EqOn f 0 U := by let u := {x | f =αΆ [𝓝 x] 0} suffices main : closure u ∩ U βŠ† u by have Uu : U βŠ† u := hU.subset_of_closure_inter_subset isOpen_setOf_eventually_nhds ⟨zβ‚€, hβ‚€, hfzβ‚€βŸ© main intro z hz simpa using mem_of_mem_nhds (Uu hz) rintro x ⟨xu, xU⟩ rcases hf x xU with ⟨p, r, hp⟩ obtain ⟨y, yu, hxy⟩ : βˆƒ y ∈ u, edist x y < r / 2 := EMetric.mem_closure_iff.1 xu (r / 2) (ENNReal.half_pos hp.r_pos.ne') let q := p.changeOrigin (y - x) have has_series : HasFPowerSeriesOnBall f q y (r / 2) := by have A : (β€–y - xβ€–β‚Š : ℝβ‰₯0∞) < r / 2 := by rwa [edist_comm, edist_eq_coe_nnnorm_sub] at hxy have := hp.changeOrigin (A.trans_le ENNReal.half_le_self) simp only [add_sub_cancel] at this apply this.mono (ENNReal.half_pos hp.r_pos.ne') apply ENNReal.le_sub_of_add_le_left ENNReal.coe_ne_top apply (add_le_add A.le (le_refl (r / 2))).trans (le_of_eq _) exact ENNReal.add_halves _ have M : EMetric.ball y (r / 2) ∈ 𝓝 x := EMetric.isOpen_ball.mem_nhds hxy filter_upwards [M] with z hz have A : HasSum (fun n : β„• => q n fun _ : Fin n => z - y) (f z) := has_series.hasSum_sub hz have B : HasSum (fun n : β„• => q n fun _ : Fin n => z - y) 0 := by have : HasFPowerSeriesAt 0 q y := has_series.hasFPowerSeriesAt.congr yu convert hasSum_zero (Ξ± := F) using 2 ext n exact this.apply_eq_zero n _ exact HasSum.unique A B #align analytic_on.eq_on_zero_of_preconnected_of_eventually_eq_zero_aux AnalyticOn.eqOn_zero_of_preconnected_of_eventuallyEq_zero_aux
Mathlib/Analysis/Analytic/Uniqueness.lean
77
89
theorem eqOn_zero_of_preconnected_of_eventuallyEq_zero {f : E β†’ F} {U : Set E} (hf : AnalyticOn π•œ f U) (hU : IsPreconnected U) {zβ‚€ : E} (hβ‚€ : zβ‚€ ∈ U) (hfzβ‚€ : f =αΆ [𝓝 zβ‚€] 0) : EqOn f 0 U := by
let F' := UniformSpace.Completion F set e : F β†’L[π•œ] F' := UniformSpace.Completion.toComplL have : AnalyticOn π•œ (e ∘ f) U := fun x hx => (e.analyticAt _).comp (hf x hx) have A : EqOn (e ∘ f) 0 U := by apply eqOn_zero_of_preconnected_of_eventuallyEq_zero_aux this hU hβ‚€ filter_upwards [hfzβ‚€] with x hx simp only [hx, Function.comp_apply, Pi.zero_apply, map_zero] intro z hz have : e (f z) = e 0 := by simpa only using A hz exact UniformSpace.Completion.coe_injective F this
1,765
import Mathlib.Analysis.Analytic.Linear import Mathlib.Analysis.Analytic.Composition import Mathlib.Analysis.NormedSpace.Completion #align_import analysis.analytic.uniqueness from "leanprover-community/mathlib"@"a3209ddf94136d36e5e5c624b10b2a347cc9d090" variable {π•œ : Type*} [NontriviallyNormedField π•œ] {E : Type*} [NormedAddCommGroup E] [NormedSpace π•œ E] {F : Type*} [NormedAddCommGroup F] [NormedSpace π•œ F] open Set open scoped Topology ENNReal namespace AnalyticOn theorem eqOn_zero_of_preconnected_of_eventuallyEq_zero_aux [CompleteSpace F] {f : E β†’ F} {U : Set E} (hf : AnalyticOn π•œ f U) (hU : IsPreconnected U) {zβ‚€ : E} (hβ‚€ : zβ‚€ ∈ U) (hfzβ‚€ : f =αΆ [𝓝 zβ‚€] 0) : EqOn f 0 U := by let u := {x | f =αΆ [𝓝 x] 0} suffices main : closure u ∩ U βŠ† u by have Uu : U βŠ† u := hU.subset_of_closure_inter_subset isOpen_setOf_eventually_nhds ⟨zβ‚€, hβ‚€, hfzβ‚€βŸ© main intro z hz simpa using mem_of_mem_nhds (Uu hz) rintro x ⟨xu, xU⟩ rcases hf x xU with ⟨p, r, hp⟩ obtain ⟨y, yu, hxy⟩ : βˆƒ y ∈ u, edist x y < r / 2 := EMetric.mem_closure_iff.1 xu (r / 2) (ENNReal.half_pos hp.r_pos.ne') let q := p.changeOrigin (y - x) have has_series : HasFPowerSeriesOnBall f q y (r / 2) := by have A : (β€–y - xβ€–β‚Š : ℝβ‰₯0∞) < r / 2 := by rwa [edist_comm, edist_eq_coe_nnnorm_sub] at hxy have := hp.changeOrigin (A.trans_le ENNReal.half_le_self) simp only [add_sub_cancel] at this apply this.mono (ENNReal.half_pos hp.r_pos.ne') apply ENNReal.le_sub_of_add_le_left ENNReal.coe_ne_top apply (add_le_add A.le (le_refl (r / 2))).trans (le_of_eq _) exact ENNReal.add_halves _ have M : EMetric.ball y (r / 2) ∈ 𝓝 x := EMetric.isOpen_ball.mem_nhds hxy filter_upwards [M] with z hz have A : HasSum (fun n : β„• => q n fun _ : Fin n => z - y) (f z) := has_series.hasSum_sub hz have B : HasSum (fun n : β„• => q n fun _ : Fin n => z - y) 0 := by have : HasFPowerSeriesAt 0 q y := has_series.hasFPowerSeriesAt.congr yu convert hasSum_zero (Ξ± := F) using 2 ext n exact this.apply_eq_zero n _ exact HasSum.unique A B #align analytic_on.eq_on_zero_of_preconnected_of_eventually_eq_zero_aux AnalyticOn.eqOn_zero_of_preconnected_of_eventuallyEq_zero_aux theorem eqOn_zero_of_preconnected_of_eventuallyEq_zero {f : E β†’ F} {U : Set E} (hf : AnalyticOn π•œ f U) (hU : IsPreconnected U) {zβ‚€ : E} (hβ‚€ : zβ‚€ ∈ U) (hfzβ‚€ : f =αΆ [𝓝 zβ‚€] 0) : EqOn f 0 U := by let F' := UniformSpace.Completion F set e : F β†’L[π•œ] F' := UniformSpace.Completion.toComplL have : AnalyticOn π•œ (e ∘ f) U := fun x hx => (e.analyticAt _).comp (hf x hx) have A : EqOn (e ∘ f) 0 U := by apply eqOn_zero_of_preconnected_of_eventuallyEq_zero_aux this hU hβ‚€ filter_upwards [hfzβ‚€] with x hx simp only [hx, Function.comp_apply, Pi.zero_apply, map_zero] intro z hz have : e (f z) = e 0 := by simpa only using A hz exact UniformSpace.Completion.coe_injective F this #align analytic_on.eq_on_zero_of_preconnected_of_eventually_eq_zero AnalyticOn.eqOn_zero_of_preconnected_of_eventuallyEq_zero
Mathlib/Analysis/Analytic/Uniqueness.lean
96
101
theorem eqOn_of_preconnected_of_eventuallyEq {f g : E β†’ F} {U : Set E} (hf : AnalyticOn π•œ f U) (hg : AnalyticOn π•œ g U) (hU : IsPreconnected U) {zβ‚€ : E} (hβ‚€ : zβ‚€ ∈ U) (hfg : f =αΆ [𝓝 zβ‚€] g) : EqOn f g U := by
have hfg' : f - g =αΆ [𝓝 zβ‚€] 0 := hfg.mono fun z h => by simp [h] simpa [sub_eq_zero] using fun z hz => (hf.sub hg).eqOn_zero_of_preconnected_of_eventuallyEq_zero hU hβ‚€ hfg' hz
1,765
import Mathlib.Analysis.Analytic.Composition #align_import analysis.analytic.inverse from "leanprover-community/mathlib"@"284fdd2962e67d2932fa3a79ce19fcf92d38e228" open scoped Classical Topology open Finset Filter namespace FormalMultilinearSeries variable {π•œ : Type*} [NontriviallyNormedField π•œ] {E : Type*} [NormedAddCommGroup E] [NormedSpace π•œ E] {F : Type*} [NormedAddCommGroup F] [NormedSpace π•œ F] noncomputable def leftInv (p : FormalMultilinearSeries π•œ E F) (i : E ≃L[π•œ] F) : FormalMultilinearSeries π•œ F E | 0 => 0 | 1 => (continuousMultilinearCurryFin1 π•œ F E).symm i.symm | n + 2 => -βˆ‘ c : { c : Composition (n + 2) // c.length < n + 2 }, (leftInv p i (c : Composition (n + 2)).length).compAlongComposition (p.compContinuousLinearMap i.symm) c #align formal_multilinear_series.left_inv FormalMultilinearSeries.leftInv @[simp]
Mathlib/Analysis/Analytic/Inverse.lean
68
69
theorem leftInv_coeff_zero (p : FormalMultilinearSeries π•œ E F) (i : E ≃L[π•œ] F) : p.leftInv i 0 = 0 := by
rw [leftInv]
1,766
import Mathlib.Analysis.Analytic.Composition #align_import analysis.analytic.inverse from "leanprover-community/mathlib"@"284fdd2962e67d2932fa3a79ce19fcf92d38e228" open scoped Classical Topology open Finset Filter namespace FormalMultilinearSeries variable {π•œ : Type*} [NontriviallyNormedField π•œ] {E : Type*} [NormedAddCommGroup E] [NormedSpace π•œ E] {F : Type*} [NormedAddCommGroup F] [NormedSpace π•œ F] noncomputable def leftInv (p : FormalMultilinearSeries π•œ E F) (i : E ≃L[π•œ] F) : FormalMultilinearSeries π•œ F E | 0 => 0 | 1 => (continuousMultilinearCurryFin1 π•œ F E).symm i.symm | n + 2 => -βˆ‘ c : { c : Composition (n + 2) // c.length < n + 2 }, (leftInv p i (c : Composition (n + 2)).length).compAlongComposition (p.compContinuousLinearMap i.symm) c #align formal_multilinear_series.left_inv FormalMultilinearSeries.leftInv @[simp] theorem leftInv_coeff_zero (p : FormalMultilinearSeries π•œ E F) (i : E ≃L[π•œ] F) : p.leftInv i 0 = 0 := by rw [leftInv] #align formal_multilinear_series.left_inv_coeff_zero FormalMultilinearSeries.leftInv_coeff_zero @[simp]
Mathlib/Analysis/Analytic/Inverse.lean
73
74
theorem leftInv_coeff_one (p : FormalMultilinearSeries π•œ E F) (i : E ≃L[π•œ] F) : p.leftInv i 1 = (continuousMultilinearCurryFin1 π•œ F E).symm i.symm := by
rw [leftInv]
1,766
import Mathlib.Analysis.Analytic.Composition #align_import analysis.analytic.inverse from "leanprover-community/mathlib"@"284fdd2962e67d2932fa3a79ce19fcf92d38e228" open scoped Classical Topology open Finset Filter namespace FormalMultilinearSeries variable {π•œ : Type*} [NontriviallyNormedField π•œ] {E : Type*} [NormedAddCommGroup E] [NormedSpace π•œ E] {F : Type*} [NormedAddCommGroup F] [NormedSpace π•œ F] noncomputable def leftInv (p : FormalMultilinearSeries π•œ E F) (i : E ≃L[π•œ] F) : FormalMultilinearSeries π•œ F E | 0 => 0 | 1 => (continuousMultilinearCurryFin1 π•œ F E).symm i.symm | n + 2 => -βˆ‘ c : { c : Composition (n + 2) // c.length < n + 2 }, (leftInv p i (c : Composition (n + 2)).length).compAlongComposition (p.compContinuousLinearMap i.symm) c #align formal_multilinear_series.left_inv FormalMultilinearSeries.leftInv @[simp] theorem leftInv_coeff_zero (p : FormalMultilinearSeries π•œ E F) (i : E ≃L[π•œ] F) : p.leftInv i 0 = 0 := by rw [leftInv] #align formal_multilinear_series.left_inv_coeff_zero FormalMultilinearSeries.leftInv_coeff_zero @[simp] theorem leftInv_coeff_one (p : FormalMultilinearSeries π•œ E F) (i : E ≃L[π•œ] F) : p.leftInv i 1 = (continuousMultilinearCurryFin1 π•œ F E).symm i.symm := by rw [leftInv] #align formal_multilinear_series.left_inv_coeff_one FormalMultilinearSeries.leftInv_coeff_one
Mathlib/Analysis/Analytic/Inverse.lean
79
92
theorem leftInv_removeZero (p : FormalMultilinearSeries π•œ E F) (i : E ≃L[π•œ] F) : p.removeZero.leftInv i = p.leftInv i := by
ext1 n induction' n using Nat.strongRec' with n IH match n with | 0 => simp -- if one replaces `simp` with `refl`, the proof times out in the kernel. | 1 => simp -- TODO: why? | n + 2 => simp only [leftInv, neg_inj] refine Finset.sum_congr rfl fun c cuniv => ?_ rcases c with ⟨c, hc⟩ ext v dsimp simp [IH _ hc]
1,766
import Mathlib.Analysis.Analytic.Composition #align_import analysis.analytic.inverse from "leanprover-community/mathlib"@"284fdd2962e67d2932fa3a79ce19fcf92d38e228" open scoped Classical Topology open Finset Filter namespace FormalMultilinearSeries variable {π•œ : Type*} [NontriviallyNormedField π•œ] {E : Type*} [NormedAddCommGroup E] [NormedSpace π•œ E] {F : Type*} [NormedAddCommGroup F] [NormedSpace π•œ F] noncomputable def leftInv (p : FormalMultilinearSeries π•œ E F) (i : E ≃L[π•œ] F) : FormalMultilinearSeries π•œ F E | 0 => 0 | 1 => (continuousMultilinearCurryFin1 π•œ F E).symm i.symm | n + 2 => -βˆ‘ c : { c : Composition (n + 2) // c.length < n + 2 }, (leftInv p i (c : Composition (n + 2)).length).compAlongComposition (p.compContinuousLinearMap i.symm) c #align formal_multilinear_series.left_inv FormalMultilinearSeries.leftInv @[simp] theorem leftInv_coeff_zero (p : FormalMultilinearSeries π•œ E F) (i : E ≃L[π•œ] F) : p.leftInv i 0 = 0 := by rw [leftInv] #align formal_multilinear_series.left_inv_coeff_zero FormalMultilinearSeries.leftInv_coeff_zero @[simp] theorem leftInv_coeff_one (p : FormalMultilinearSeries π•œ E F) (i : E ≃L[π•œ] F) : p.leftInv i 1 = (continuousMultilinearCurryFin1 π•œ F E).symm i.symm := by rw [leftInv] #align formal_multilinear_series.left_inv_coeff_one FormalMultilinearSeries.leftInv_coeff_one theorem leftInv_removeZero (p : FormalMultilinearSeries π•œ E F) (i : E ≃L[π•œ] F) : p.removeZero.leftInv i = p.leftInv i := by ext1 n induction' n using Nat.strongRec' with n IH match n with | 0 => simp -- if one replaces `simp` with `refl`, the proof times out in the kernel. | 1 => simp -- TODO: why? | n + 2 => simp only [leftInv, neg_inj] refine Finset.sum_congr rfl fun c cuniv => ?_ rcases c with ⟨c, hc⟩ ext v dsimp simp [IH _ hc] #align formal_multilinear_series.left_inv_remove_zero FormalMultilinearSeries.leftInv_removeZero
Mathlib/Analysis/Analytic/Inverse.lean
97
148
theorem leftInv_comp (p : FormalMultilinearSeries π•œ E F) (i : E ≃L[π•œ] F) (h : p 1 = (continuousMultilinearCurryFin1 π•œ E F).symm i) : (leftInv p i).comp p = id π•œ E := by
ext (n v) match n with | 0 => simp only [leftInv_coeff_zero, ContinuousMultilinearMap.zero_apply, id_apply_ne_one, Ne, not_false_iff, zero_ne_one, comp_coeff_zero'] | 1 => simp only [leftInv_coeff_one, comp_coeff_one, h, id_apply_one, ContinuousLinearEquiv.coe_apply, ContinuousLinearEquiv.symm_apply_apply, continuousMultilinearCurryFin1_symm_apply] | n + 2 => have A : (Finset.univ : Finset (Composition (n + 2))) = {c | Composition.length c < n + 2}.toFinset βˆͺ {Composition.ones (n + 2)} := by refine Subset.antisymm (fun c _ => ?_) (subset_univ _) by_cases h : c.length < n + 2 Β· simp [h, Set.mem_toFinset (s := {c | Composition.length c < n + 2})] Β· simp [Composition.eq_ones_iff_le_length.2 (not_lt.1 h)] have B : Disjoint ({c | Composition.length c < n + 2} : Set (Composition (n + 2))).toFinset {Composition.ones (n + 2)} := by simp [Set.mem_toFinset (s := {c | Composition.length c < n + 2})] have C : ((p.leftInv i (Composition.ones (n + 2)).length) fun j : Fin (Composition.ones n.succ.succ).length => p 1 fun _ => v ((Fin.castLE (Composition.length_le _)) j)) = p.leftInv i (n + 2) fun j : Fin (n + 2) => p 1 fun _ => v j := by apply FormalMultilinearSeries.congr _ (Composition.ones_length _) fun j hj1 hj2 => ?_ exact FormalMultilinearSeries.congr _ rfl fun k _ _ => by congr have D : (p.leftInv i (n + 2) fun j : Fin (n + 2) => p 1 fun _ => v j) = -βˆ‘ c ∈ {c : Composition (n + 2) | c.length < n + 2}.toFinset, (p.leftInv i c.length) (p.applyComposition c v) := by simp only [leftInv, ContinuousMultilinearMap.neg_apply, neg_inj, ContinuousMultilinearMap.sum_apply] convert (sum_toFinset_eq_subtype (fun c : Composition (n + 2) => c.length < n + 2) (fun c : Composition (n + 2) => (ContinuousMultilinearMap.compAlongComposition (p.compContinuousLinearMap (i.symm : F β†’L[π•œ] E)) c (p.leftInv i c.length)) fun j : Fin (n + 2) => p 1 fun _ : Fin 1 => v j)).symm.trans _ simp only [compContinuousLinearMap_applyComposition, ContinuousMultilinearMap.compAlongComposition_apply] congr ext c congr ext k simp [h, Function.comp] simp [FormalMultilinearSeries.comp, show n + 2 β‰  1 by omega, A, Finset.sum_union B, applyComposition_ones, C, D, -Set.toFinset_setOf]
1,766
import Mathlib.Analysis.Analytic.Composition #align_import analysis.analytic.inverse from "leanprover-community/mathlib"@"284fdd2962e67d2932fa3a79ce19fcf92d38e228" open scoped Classical Topology open Finset Filter namespace FormalMultilinearSeries variable {π•œ : Type*} [NontriviallyNormedField π•œ] {E : Type*} [NormedAddCommGroup E] [NormedSpace π•œ E] {F : Type*} [NormedAddCommGroup F] [NormedSpace π•œ F] noncomputable def leftInv (p : FormalMultilinearSeries π•œ E F) (i : E ≃L[π•œ] F) : FormalMultilinearSeries π•œ F E | 0 => 0 | 1 => (continuousMultilinearCurryFin1 π•œ F E).symm i.symm | n + 2 => -βˆ‘ c : { c : Composition (n + 2) // c.length < n + 2 }, (leftInv p i (c : Composition (n + 2)).length).compAlongComposition (p.compContinuousLinearMap i.symm) c #align formal_multilinear_series.left_inv FormalMultilinearSeries.leftInv @[simp] theorem leftInv_coeff_zero (p : FormalMultilinearSeries π•œ E F) (i : E ≃L[π•œ] F) : p.leftInv i 0 = 0 := by rw [leftInv] #align formal_multilinear_series.left_inv_coeff_zero FormalMultilinearSeries.leftInv_coeff_zero @[simp] theorem leftInv_coeff_one (p : FormalMultilinearSeries π•œ E F) (i : E ≃L[π•œ] F) : p.leftInv i 1 = (continuousMultilinearCurryFin1 π•œ F E).symm i.symm := by rw [leftInv] #align formal_multilinear_series.left_inv_coeff_one FormalMultilinearSeries.leftInv_coeff_one theorem leftInv_removeZero (p : FormalMultilinearSeries π•œ E F) (i : E ≃L[π•œ] F) : p.removeZero.leftInv i = p.leftInv i := by ext1 n induction' n using Nat.strongRec' with n IH match n with | 0 => simp -- if one replaces `simp` with `refl`, the proof times out in the kernel. | 1 => simp -- TODO: why? | n + 2 => simp only [leftInv, neg_inj] refine Finset.sum_congr rfl fun c cuniv => ?_ rcases c with ⟨c, hc⟩ ext v dsimp simp [IH _ hc] #align formal_multilinear_series.left_inv_remove_zero FormalMultilinearSeries.leftInv_removeZero theorem leftInv_comp (p : FormalMultilinearSeries π•œ E F) (i : E ≃L[π•œ] F) (h : p 1 = (continuousMultilinearCurryFin1 π•œ E F).symm i) : (leftInv p i).comp p = id π•œ E := by ext (n v) match n with | 0 => simp only [leftInv_coeff_zero, ContinuousMultilinearMap.zero_apply, id_apply_ne_one, Ne, not_false_iff, zero_ne_one, comp_coeff_zero'] | 1 => simp only [leftInv_coeff_one, comp_coeff_one, h, id_apply_one, ContinuousLinearEquiv.coe_apply, ContinuousLinearEquiv.symm_apply_apply, continuousMultilinearCurryFin1_symm_apply] | n + 2 => have A : (Finset.univ : Finset (Composition (n + 2))) = {c | Composition.length c < n + 2}.toFinset βˆͺ {Composition.ones (n + 2)} := by refine Subset.antisymm (fun c _ => ?_) (subset_univ _) by_cases h : c.length < n + 2 Β· simp [h, Set.mem_toFinset (s := {c | Composition.length c < n + 2})] Β· simp [Composition.eq_ones_iff_le_length.2 (not_lt.1 h)] have B : Disjoint ({c | Composition.length c < n + 2} : Set (Composition (n + 2))).toFinset {Composition.ones (n + 2)} := by simp [Set.mem_toFinset (s := {c | Composition.length c < n + 2})] have C : ((p.leftInv i (Composition.ones (n + 2)).length) fun j : Fin (Composition.ones n.succ.succ).length => p 1 fun _ => v ((Fin.castLE (Composition.length_le _)) j)) = p.leftInv i (n + 2) fun j : Fin (n + 2) => p 1 fun _ => v j := by apply FormalMultilinearSeries.congr _ (Composition.ones_length _) fun j hj1 hj2 => ?_ exact FormalMultilinearSeries.congr _ rfl fun k _ _ => by congr have D : (p.leftInv i (n + 2) fun j : Fin (n + 2) => p 1 fun _ => v j) = -βˆ‘ c ∈ {c : Composition (n + 2) | c.length < n + 2}.toFinset, (p.leftInv i c.length) (p.applyComposition c v) := by simp only [leftInv, ContinuousMultilinearMap.neg_apply, neg_inj, ContinuousMultilinearMap.sum_apply] convert (sum_toFinset_eq_subtype (fun c : Composition (n + 2) => c.length < n + 2) (fun c : Composition (n + 2) => (ContinuousMultilinearMap.compAlongComposition (p.compContinuousLinearMap (i.symm : F β†’L[π•œ] E)) c (p.leftInv i c.length)) fun j : Fin (n + 2) => p 1 fun _ : Fin 1 => v j)).symm.trans _ simp only [compContinuousLinearMap_applyComposition, ContinuousMultilinearMap.compAlongComposition_apply] congr ext c congr ext k simp [h, Function.comp] simp [FormalMultilinearSeries.comp, show n + 2 β‰  1 by omega, A, Finset.sum_union B, applyComposition_ones, C, D, -Set.toFinset_setOf] #align formal_multilinear_series.left_inv_comp FormalMultilinearSeries.leftInv_comp noncomputable def rightInv (p : FormalMultilinearSeries π•œ E F) (i : E ≃L[π•œ] F) : FormalMultilinearSeries π•œ F E | 0 => 0 | 1 => (continuousMultilinearCurryFin1 π•œ F E).symm i.symm | n + 2 => let q : FormalMultilinearSeries π•œ F E := fun k => if k < n + 2 then rightInv p i k else 0; -(i.symm : F β†’L[π•œ] E).compContinuousMultilinearMap ((p.comp q) (n + 2)) #align formal_multilinear_series.right_inv FormalMultilinearSeries.rightInv @[simp]
Mathlib/Analysis/Analytic/Inverse.lean
177
178
theorem rightInv_coeff_zero (p : FormalMultilinearSeries π•œ E F) (i : E ≃L[π•œ] F) : p.rightInv i 0 = 0 := by
rw [rightInv]
1,766
import Mathlib.Analysis.Analytic.Basic import Mathlib.Analysis.Analytic.CPolynomial import Mathlib.Analysis.Calculus.Deriv.Basic import Mathlib.Analysis.Calculus.ContDiff.Defs import Mathlib.Analysis.Calculus.FDeriv.Add #align_import analysis.calculus.fderiv_analytic from "leanprover-community/mathlib"@"3bce8d800a6f2b8f63fe1e588fd76a9ff4adcebe" open Filter Asymptotics open scoped ENNReal universe u v variable {π•œ : Type*} [NontriviallyNormedField π•œ] variable {E : Type u} [NormedAddCommGroup E] [NormedSpace π•œ E] variable {F : Type v} [NormedAddCommGroup F] [NormedSpace π•œ F] section fderiv variable {p : FormalMultilinearSeries π•œ E F} {r : ℝβ‰₯0∞} variable {f : E β†’ F} {x : E} {s : Set E}
Mathlib/Analysis/Calculus/FDeriv/Analytic.lean
39
44
theorem HasFPowerSeriesAt.hasStrictFDerivAt (h : HasFPowerSeriesAt f p x) : HasStrictFDerivAt f (continuousMultilinearCurryFin1 π•œ E F (p 1)) x := by
refine h.isBigO_image_sub_norm_mul_norm_sub.trans_isLittleO (IsLittleO.of_norm_right ?_) refine isLittleO_iff_exists_eq_mul.2 ⟨fun y => β€–y - (x, x)β€–, ?_, EventuallyEq.rfl⟩ refine (continuous_id.sub continuous_const).norm.tendsto' _ _ ?_ rw [_root_.id, sub_self, norm_zero]
1,767
import Mathlib.Analysis.Analytic.Basic import Mathlib.Analysis.Analytic.CPolynomial import Mathlib.Analysis.Calculus.Deriv.Basic import Mathlib.Analysis.Calculus.ContDiff.Defs import Mathlib.Analysis.Calculus.FDeriv.Add #align_import analysis.calculus.fderiv_analytic from "leanprover-community/mathlib"@"3bce8d800a6f2b8f63fe1e588fd76a9ff4adcebe" open Filter Asymptotics open scoped ENNReal universe u v variable {π•œ : Type*} [NontriviallyNormedField π•œ] variable {E : Type u} [NormedAddCommGroup E] [NormedSpace π•œ E] variable {F : Type v} [NormedAddCommGroup F] [NormedSpace π•œ F] section fderiv variable {p : FormalMultilinearSeries π•œ E F} {r : ℝβ‰₯0∞} variable {f : E β†’ F} {x : E} {s : Set E} theorem HasFPowerSeriesAt.hasStrictFDerivAt (h : HasFPowerSeriesAt f p x) : HasStrictFDerivAt f (continuousMultilinearCurryFin1 π•œ E F (p 1)) x := by refine h.isBigO_image_sub_norm_mul_norm_sub.trans_isLittleO (IsLittleO.of_norm_right ?_) refine isLittleO_iff_exists_eq_mul.2 ⟨fun y => β€–y - (x, x)β€–, ?_, EventuallyEq.rfl⟩ refine (continuous_id.sub continuous_const).norm.tendsto' _ _ ?_ rw [_root_.id, sub_self, norm_zero] #align has_fpower_series_at.has_strict_fderiv_at HasFPowerSeriesAt.hasStrictFDerivAt theorem HasFPowerSeriesAt.hasFDerivAt (h : HasFPowerSeriesAt f p x) : HasFDerivAt f (continuousMultilinearCurryFin1 π•œ E F (p 1)) x := h.hasStrictFDerivAt.hasFDerivAt #align has_fpower_series_at.has_fderiv_at HasFPowerSeriesAt.hasFDerivAt theorem HasFPowerSeriesAt.differentiableAt (h : HasFPowerSeriesAt f p x) : DifferentiableAt π•œ f x := h.hasFDerivAt.differentiableAt #align has_fpower_series_at.differentiable_at HasFPowerSeriesAt.differentiableAt theorem AnalyticAt.differentiableAt : AnalyticAt π•œ f x β†’ DifferentiableAt π•œ f x | ⟨_, hp⟩ => hp.differentiableAt #align analytic_at.differentiable_at AnalyticAt.differentiableAt theorem AnalyticAt.differentiableWithinAt (h : AnalyticAt π•œ f x) : DifferentiableWithinAt π•œ f s x := h.differentiableAt.differentiableWithinAt #align analytic_at.differentiable_within_at AnalyticAt.differentiableWithinAt theorem HasFPowerSeriesAt.fderiv_eq (h : HasFPowerSeriesAt f p x) : fderiv π•œ f x = continuousMultilinearCurryFin1 π•œ E F (p 1) := h.hasFDerivAt.fderiv #align has_fpower_series_at.fderiv_eq HasFPowerSeriesAt.fderiv_eq theorem HasFPowerSeriesOnBall.differentiableOn [CompleteSpace F] (h : HasFPowerSeriesOnBall f p x r) : DifferentiableOn π•œ f (EMetric.ball x r) := fun _ hy => (h.analyticAt_of_mem hy).differentiableWithinAt #align has_fpower_series_on_ball.differentiable_on HasFPowerSeriesOnBall.differentiableOn theorem AnalyticOn.differentiableOn (h : AnalyticOn π•œ f s) : DifferentiableOn π•œ f s := fun y hy => (h y hy).differentiableWithinAt #align analytic_on.differentiable_on AnalyticOn.differentiableOn theorem HasFPowerSeriesOnBall.hasFDerivAt [CompleteSpace F] (h : HasFPowerSeriesOnBall f p x r) {y : E} (hy : (β€–yβ€–β‚Š : ℝβ‰₯0∞) < r) : HasFDerivAt f (continuousMultilinearCurryFin1 π•œ E F (p.changeOrigin y 1)) (x + y) := (h.changeOrigin hy).hasFPowerSeriesAt.hasFDerivAt #align has_fpower_series_on_ball.has_fderiv_at HasFPowerSeriesOnBall.hasFDerivAt theorem HasFPowerSeriesOnBall.fderiv_eq [CompleteSpace F] (h : HasFPowerSeriesOnBall f p x r) {y : E} (hy : (β€–yβ€–β‚Š : ℝβ‰₯0∞) < r) : fderiv π•œ f (x + y) = continuousMultilinearCurryFin1 π•œ E F (p.changeOrigin y 1) := (h.hasFDerivAt hy).fderiv #align has_fpower_series_on_ball.fderiv_eq HasFPowerSeriesOnBall.fderiv_eq
Mathlib/Analysis/Calculus/FDeriv/Analytic.lean
91
101
theorem HasFPowerSeriesOnBall.fderiv [CompleteSpace F] (h : HasFPowerSeriesOnBall f p x r) : HasFPowerSeriesOnBall (fderiv π•œ f) p.derivSeries x r := by
refine .congr (f := fun z ↦ continuousMultilinearCurryFin1 π•œ E F (p.changeOrigin (z - x) 1)) ?_ fun z hz ↦ ?_ Β· refine continuousMultilinearCurryFin1 π•œ E F |>.toContinuousLinearEquiv.toContinuousLinearMap.comp_hasFPowerSeriesOnBall ?_ simpa using ((p.hasFPowerSeriesOnBall_changeOrigin 1 (h.r_pos.trans_le h.r_le)).mono h.r_pos h.r_le).comp_sub x dsimp only rw [← h.fderiv_eq, add_sub_cancel] simpa only [edist_eq_coe_nnnorm_sub, EMetric.mem_ball] using hz
1,767
import Mathlib.Analysis.Analytic.Basic import Mathlib.Analysis.Analytic.CPolynomial import Mathlib.Analysis.Calculus.Deriv.Basic import Mathlib.Analysis.Calculus.ContDiff.Defs import Mathlib.Analysis.Calculus.FDeriv.Add #align_import analysis.calculus.fderiv_analytic from "leanprover-community/mathlib"@"3bce8d800a6f2b8f63fe1e588fd76a9ff4adcebe" open Filter Asymptotics open scoped ENNReal universe u v variable {π•œ : Type*} [NontriviallyNormedField π•œ] variable {E : Type u} [NormedAddCommGroup E] [NormedSpace π•œ E] variable {F : Type v} [NormedAddCommGroup F] [NormedSpace π•œ F] section fderiv variable {p : FormalMultilinearSeries π•œ E F} {r : ℝβ‰₯0∞} variable {f : E β†’ F} {x : E} {s : Set E} theorem HasFPowerSeriesAt.hasStrictFDerivAt (h : HasFPowerSeriesAt f p x) : HasStrictFDerivAt f (continuousMultilinearCurryFin1 π•œ E F (p 1)) x := by refine h.isBigO_image_sub_norm_mul_norm_sub.trans_isLittleO (IsLittleO.of_norm_right ?_) refine isLittleO_iff_exists_eq_mul.2 ⟨fun y => β€–y - (x, x)β€–, ?_, EventuallyEq.rfl⟩ refine (continuous_id.sub continuous_const).norm.tendsto' _ _ ?_ rw [_root_.id, sub_self, norm_zero] #align has_fpower_series_at.has_strict_fderiv_at HasFPowerSeriesAt.hasStrictFDerivAt theorem HasFPowerSeriesAt.hasFDerivAt (h : HasFPowerSeriesAt f p x) : HasFDerivAt f (continuousMultilinearCurryFin1 π•œ E F (p 1)) x := h.hasStrictFDerivAt.hasFDerivAt #align has_fpower_series_at.has_fderiv_at HasFPowerSeriesAt.hasFDerivAt theorem HasFPowerSeriesAt.differentiableAt (h : HasFPowerSeriesAt f p x) : DifferentiableAt π•œ f x := h.hasFDerivAt.differentiableAt #align has_fpower_series_at.differentiable_at HasFPowerSeriesAt.differentiableAt theorem AnalyticAt.differentiableAt : AnalyticAt π•œ f x β†’ DifferentiableAt π•œ f x | ⟨_, hp⟩ => hp.differentiableAt #align analytic_at.differentiable_at AnalyticAt.differentiableAt theorem AnalyticAt.differentiableWithinAt (h : AnalyticAt π•œ f x) : DifferentiableWithinAt π•œ f s x := h.differentiableAt.differentiableWithinAt #align analytic_at.differentiable_within_at AnalyticAt.differentiableWithinAt theorem HasFPowerSeriesAt.fderiv_eq (h : HasFPowerSeriesAt f p x) : fderiv π•œ f x = continuousMultilinearCurryFin1 π•œ E F (p 1) := h.hasFDerivAt.fderiv #align has_fpower_series_at.fderiv_eq HasFPowerSeriesAt.fderiv_eq theorem HasFPowerSeriesOnBall.differentiableOn [CompleteSpace F] (h : HasFPowerSeriesOnBall f p x r) : DifferentiableOn π•œ f (EMetric.ball x r) := fun _ hy => (h.analyticAt_of_mem hy).differentiableWithinAt #align has_fpower_series_on_ball.differentiable_on HasFPowerSeriesOnBall.differentiableOn theorem AnalyticOn.differentiableOn (h : AnalyticOn π•œ f s) : DifferentiableOn π•œ f s := fun y hy => (h y hy).differentiableWithinAt #align analytic_on.differentiable_on AnalyticOn.differentiableOn theorem HasFPowerSeriesOnBall.hasFDerivAt [CompleteSpace F] (h : HasFPowerSeriesOnBall f p x r) {y : E} (hy : (β€–yβ€–β‚Š : ℝβ‰₯0∞) < r) : HasFDerivAt f (continuousMultilinearCurryFin1 π•œ E F (p.changeOrigin y 1)) (x + y) := (h.changeOrigin hy).hasFPowerSeriesAt.hasFDerivAt #align has_fpower_series_on_ball.has_fderiv_at HasFPowerSeriesOnBall.hasFDerivAt theorem HasFPowerSeriesOnBall.fderiv_eq [CompleteSpace F] (h : HasFPowerSeriesOnBall f p x r) {y : E} (hy : (β€–yβ€–β‚Š : ℝβ‰₯0∞) < r) : fderiv π•œ f (x + y) = continuousMultilinearCurryFin1 π•œ E F (p.changeOrigin y 1) := (h.hasFDerivAt hy).fderiv #align has_fpower_series_on_ball.fderiv_eq HasFPowerSeriesOnBall.fderiv_eq theorem HasFPowerSeriesOnBall.fderiv [CompleteSpace F] (h : HasFPowerSeriesOnBall f p x r) : HasFPowerSeriesOnBall (fderiv π•œ f) p.derivSeries x r := by refine .congr (f := fun z ↦ continuousMultilinearCurryFin1 π•œ E F (p.changeOrigin (z - x) 1)) ?_ fun z hz ↦ ?_ Β· refine continuousMultilinearCurryFin1 π•œ E F |>.toContinuousLinearEquiv.toContinuousLinearMap.comp_hasFPowerSeriesOnBall ?_ simpa using ((p.hasFPowerSeriesOnBall_changeOrigin 1 (h.r_pos.trans_le h.r_le)).mono h.r_pos h.r_le).comp_sub x dsimp only rw [← h.fderiv_eq, add_sub_cancel] simpa only [edist_eq_coe_nnnorm_sub, EMetric.mem_ball] using hz #align has_fpower_series_on_ball.fderiv HasFPowerSeriesOnBall.fderiv
Mathlib/Analysis/Calculus/FDeriv/Analytic.lean
105
109
theorem AnalyticOn.fderiv [CompleteSpace F] (h : AnalyticOn π•œ f s) : AnalyticOn π•œ (fderiv π•œ f) s := by
intro y hy rcases h y hy with ⟨p, r, hp⟩ exact hp.fderiv.analyticAt
1,767
import Mathlib.Analysis.Analytic.Basic import Mathlib.Analysis.Analytic.CPolynomial import Mathlib.Analysis.Calculus.Deriv.Basic import Mathlib.Analysis.Calculus.ContDiff.Defs import Mathlib.Analysis.Calculus.FDeriv.Add #align_import analysis.calculus.fderiv_analytic from "leanprover-community/mathlib"@"3bce8d800a6f2b8f63fe1e588fd76a9ff4adcebe" open Filter Asymptotics open scoped ENNReal universe u v variable {π•œ : Type*} [NontriviallyNormedField π•œ] variable {E : Type u} [NormedAddCommGroup E] [NormedSpace π•œ E] variable {F : Type v} [NormedAddCommGroup F] [NormedSpace π•œ F] section fderiv variable {p : FormalMultilinearSeries π•œ E F} {r : ℝβ‰₯0∞} variable {f : E β†’ F} {x : E} {s : Set E} theorem HasFPowerSeriesAt.hasStrictFDerivAt (h : HasFPowerSeriesAt f p x) : HasStrictFDerivAt f (continuousMultilinearCurryFin1 π•œ E F (p 1)) x := by refine h.isBigO_image_sub_norm_mul_norm_sub.trans_isLittleO (IsLittleO.of_norm_right ?_) refine isLittleO_iff_exists_eq_mul.2 ⟨fun y => β€–y - (x, x)β€–, ?_, EventuallyEq.rfl⟩ refine (continuous_id.sub continuous_const).norm.tendsto' _ _ ?_ rw [_root_.id, sub_self, norm_zero] #align has_fpower_series_at.has_strict_fderiv_at HasFPowerSeriesAt.hasStrictFDerivAt theorem HasFPowerSeriesAt.hasFDerivAt (h : HasFPowerSeriesAt f p x) : HasFDerivAt f (continuousMultilinearCurryFin1 π•œ E F (p 1)) x := h.hasStrictFDerivAt.hasFDerivAt #align has_fpower_series_at.has_fderiv_at HasFPowerSeriesAt.hasFDerivAt theorem HasFPowerSeriesAt.differentiableAt (h : HasFPowerSeriesAt f p x) : DifferentiableAt π•œ f x := h.hasFDerivAt.differentiableAt #align has_fpower_series_at.differentiable_at HasFPowerSeriesAt.differentiableAt theorem AnalyticAt.differentiableAt : AnalyticAt π•œ f x β†’ DifferentiableAt π•œ f x | ⟨_, hp⟩ => hp.differentiableAt #align analytic_at.differentiable_at AnalyticAt.differentiableAt theorem AnalyticAt.differentiableWithinAt (h : AnalyticAt π•œ f x) : DifferentiableWithinAt π•œ f s x := h.differentiableAt.differentiableWithinAt #align analytic_at.differentiable_within_at AnalyticAt.differentiableWithinAt theorem HasFPowerSeriesAt.fderiv_eq (h : HasFPowerSeriesAt f p x) : fderiv π•œ f x = continuousMultilinearCurryFin1 π•œ E F (p 1) := h.hasFDerivAt.fderiv #align has_fpower_series_at.fderiv_eq HasFPowerSeriesAt.fderiv_eq theorem HasFPowerSeriesOnBall.differentiableOn [CompleteSpace F] (h : HasFPowerSeriesOnBall f p x r) : DifferentiableOn π•œ f (EMetric.ball x r) := fun _ hy => (h.analyticAt_of_mem hy).differentiableWithinAt #align has_fpower_series_on_ball.differentiable_on HasFPowerSeriesOnBall.differentiableOn theorem AnalyticOn.differentiableOn (h : AnalyticOn π•œ f s) : DifferentiableOn π•œ f s := fun y hy => (h y hy).differentiableWithinAt #align analytic_on.differentiable_on AnalyticOn.differentiableOn theorem HasFPowerSeriesOnBall.hasFDerivAt [CompleteSpace F] (h : HasFPowerSeriesOnBall f p x r) {y : E} (hy : (β€–yβ€–β‚Š : ℝβ‰₯0∞) < r) : HasFDerivAt f (continuousMultilinearCurryFin1 π•œ E F (p.changeOrigin y 1)) (x + y) := (h.changeOrigin hy).hasFPowerSeriesAt.hasFDerivAt #align has_fpower_series_on_ball.has_fderiv_at HasFPowerSeriesOnBall.hasFDerivAt theorem HasFPowerSeriesOnBall.fderiv_eq [CompleteSpace F] (h : HasFPowerSeriesOnBall f p x r) {y : E} (hy : (β€–yβ€–β‚Š : ℝβ‰₯0∞) < r) : fderiv π•œ f (x + y) = continuousMultilinearCurryFin1 π•œ E F (p.changeOrigin y 1) := (h.hasFDerivAt hy).fderiv #align has_fpower_series_on_ball.fderiv_eq HasFPowerSeriesOnBall.fderiv_eq theorem HasFPowerSeriesOnBall.fderiv [CompleteSpace F] (h : HasFPowerSeriesOnBall f p x r) : HasFPowerSeriesOnBall (fderiv π•œ f) p.derivSeries x r := by refine .congr (f := fun z ↦ continuousMultilinearCurryFin1 π•œ E F (p.changeOrigin (z - x) 1)) ?_ fun z hz ↦ ?_ Β· refine continuousMultilinearCurryFin1 π•œ E F |>.toContinuousLinearEquiv.toContinuousLinearMap.comp_hasFPowerSeriesOnBall ?_ simpa using ((p.hasFPowerSeriesOnBall_changeOrigin 1 (h.r_pos.trans_le h.r_le)).mono h.r_pos h.r_le).comp_sub x dsimp only rw [← h.fderiv_eq, add_sub_cancel] simpa only [edist_eq_coe_nnnorm_sub, EMetric.mem_ball] using hz #align has_fpower_series_on_ball.fderiv HasFPowerSeriesOnBall.fderiv theorem AnalyticOn.fderiv [CompleteSpace F] (h : AnalyticOn π•œ f s) : AnalyticOn π•œ (fderiv π•œ f) s := by intro y hy rcases h y hy with ⟨p, r, hp⟩ exact hp.fderiv.analyticAt #align analytic_on.fderiv AnalyticOn.fderiv
Mathlib/Analysis/Calculus/FDeriv/Analytic.lean
113
122
theorem AnalyticOn.iteratedFDeriv [CompleteSpace F] (h : AnalyticOn π•œ f s) (n : β„•) : AnalyticOn π•œ (iteratedFDeriv π•œ n f) s := by
induction' n with n IH Β· rw [iteratedFDeriv_zero_eq_comp] exact ((continuousMultilinearCurryFin0 π•œ E F).symm : F β†’L[π•œ] E[Γ—0]β†’L[π•œ] F).comp_analyticOn h Β· rw [iteratedFDeriv_succ_eq_comp_left] -- Porting note: for reasons that I do not understand at all, `?g` cannot be inlined. convert ContinuousLinearMap.comp_analyticOn ?g IH.fderiv case g => exact ↑(continuousMultilinearCurryLeftEquiv π•œ (fun _ : Fin (n + 1) ↦ E) F) simp
1,767
import Mathlib.Analysis.Analytic.Basic import Mathlib.Analysis.Analytic.CPolynomial import Mathlib.Analysis.Calculus.Deriv.Basic import Mathlib.Analysis.Calculus.ContDiff.Defs import Mathlib.Analysis.Calculus.FDeriv.Add #align_import analysis.calculus.fderiv_analytic from "leanprover-community/mathlib"@"3bce8d800a6f2b8f63fe1e588fd76a9ff4adcebe" open Filter Asymptotics open scoped ENNReal universe u v variable {π•œ : Type*} [NontriviallyNormedField π•œ] variable {E : Type u} [NormedAddCommGroup E] [NormedSpace π•œ E] variable {F : Type v} [NormedAddCommGroup F] [NormedSpace π•œ F] namespace ContinuousMultilinearMap variable {ΞΉ : Type*} {E : ΞΉ β†’ Type*} [βˆ€ i, NormedAddCommGroup (E i)] [βˆ€ i, NormedSpace π•œ (E i)] [Fintype ΞΉ] (f : ContinuousMultilinearMap π•œ E F) open FormalMultilinearSeries protected theorem hasFiniteFPowerSeriesOnBall : HasFiniteFPowerSeriesOnBall f f.toFormalMultilinearSeries 0 (Fintype.card ΞΉ + 1) ⊀ := .mk' (fun m hm ↦ dif_neg (Nat.succ_le_iff.mp hm).ne) ENNReal.zero_lt_top fun y _ ↦ by rw [Finset.sum_eq_single_of_mem _ (Finset.self_mem_range_succ _), zero_add] Β· rw [toFormalMultilinearSeries, dif_pos rfl]; rfl Β· intro m _ ne; rw [toFormalMultilinearSeries, dif_neg ne.symm]; rfl theorem changeOriginSeries_support {k l : β„•} (h : k + l β‰  Fintype.card ΞΉ) : f.toFormalMultilinearSeries.changeOriginSeries k l = 0 := Finset.sum_eq_zero fun _ _ ↦ by simp_rw [FormalMultilinearSeries.changeOriginSeriesTerm, toFormalMultilinearSeries, dif_neg h.symm, LinearIsometryEquiv.map_zero] variable {n : β„•βˆž} (x : βˆ€ i, E i) open Finset in
Mathlib/Analysis/Calculus/FDeriv/Analytic.lean
314
346
theorem changeOrigin_toFormalMultilinearSeries [DecidableEq ΞΉ] : continuousMultilinearCurryFin1 π•œ (βˆ€ i, E i) F (f.toFormalMultilinearSeries.changeOrigin x 1) = f.linearDeriv x := by
ext y rw [continuousMultilinearCurryFin1_apply, linearDeriv_apply, changeOrigin, FormalMultilinearSeries.sum] cases isEmpty_or_nonempty ΞΉ Β· have (l) : 1 + l β‰  Fintype.card ΞΉ := by rw [add_comm, Fintype.card_eq_zero]; exact Nat.succ_ne_zero _ simp_rw [Fintype.sum_empty, changeOriginSeries_support _ (this _), zero_apply _, tsum_zero]; rfl rw [tsum_eq_single (Fintype.card ΞΉ - 1), changeOriginSeries]; swap Β· intro m hm rw [Ne, eq_tsub_iff_add_eq_of_le (by exact Fintype.card_pos), add_comm] at hm rw [f.changeOriginSeries_support hm, zero_apply] rw [sum_apply, ContinuousMultilinearMap.sum_apply, Fin.snoc_zero] simp_rw [changeOriginSeriesTerm_apply] refine (Fintype.sum_bijective (?_ ∘ Fintype.equivFinOfCardEq (Nat.add_sub_of_le Fintype.card_pos).symm) (.comp ?_ <| Equiv.bijective _) _ _ fun i ↦ ?_).symm Β· exact (⟨{Β·}ᢜ, by rw [card_compl, Fintype.card_fin, card_singleton, Nat.add_sub_cancel_left]⟩) Β· use fun _ _ ↦ (singleton_injective <| compl_injective <| Subtype.ext_iff.mp Β·) intro ⟨s, hs⟩ have h : sᢜ.card = 1 := by rw [card_compl, hs, Fintype.card_fin, Nat.add_sub_cancel] obtain ⟨a, ha⟩ := card_eq_one.mp h exact ⟨a, Subtype.ext (compl_eq_comm.mp ha)⟩ rw [Function.comp_apply, Subtype.coe_mk, compl_singleton, piecewise_erase_univ, toFormalMultilinearSeries, dif_pos (Nat.add_sub_of_le Fintype.card_pos).symm] simp_rw [domDomCongr_apply, compContinuousLinearMap_apply, ContinuousLinearMap.proj_apply, Function.update_apply, (Equiv.injective _).eq_iff, ite_apply] congr; ext j obtain rfl | hj := eq_or_ne j i Β· rw [Function.update_same, if_pos rfl] Β· rw [Function.update_noteq hj, if_neg hj]
1,767
import Mathlib.Analysis.Analytic.Basic import Mathlib.Analysis.Analytic.CPolynomial import Mathlib.Analysis.Calculus.Deriv.Basic import Mathlib.Analysis.Calculus.ContDiff.Defs import Mathlib.Analysis.Calculus.FDeriv.Add #align_import analysis.calculus.fderiv_analytic from "leanprover-community/mathlib"@"3bce8d800a6f2b8f63fe1e588fd76a9ff4adcebe" open Filter Asymptotics open scoped ENNReal universe u v variable {π•œ : Type*} [NontriviallyNormedField π•œ] variable {E : Type u} [NormedAddCommGroup E] [NormedSpace π•œ E] variable {F : Type v} [NormedAddCommGroup F] [NormedSpace π•œ F] namespace FormalMultilinearSeries variable (p : FormalMultilinearSeries π•œ E F) open Fintype ContinuousLinearMap in
Mathlib/Analysis/Calculus/FDeriv/Analytic.lean
449
458
theorem derivSeries_apply_diag (n : β„•) (x : E) : derivSeries p n (fun _ ↦ x) x = (n + 1) β€’ p (n + 1) fun _ ↦ x := by
simp only [derivSeries, compFormalMultilinearSeries_apply, changeOriginSeries, compContinuousMultilinearMap_coe, ContinuousLinearEquiv.coe_coe, LinearIsometryEquiv.coe_coe, Function.comp_apply, ContinuousMultilinearMap.sum_apply, map_sum, coe_sum', Finset.sum_apply, continuousMultilinearCurryFin1_apply, Matrix.zero_empty] convert Finset.sum_const _ Β· rw [Fin.snoc_zero, changeOriginSeriesTerm_apply, Finset.piecewise_same, add_comm] Β· rw [← card, card_subtype, ← Finset.powerset_univ, ← Finset.powersetCard_eq_filter, Finset.card_powersetCard, ← card, card_fin, eq_comm, add_comm, Nat.choose_succ_self_right]
1,767
import Mathlib.Analysis.Analytic.Basic import Mathlib.Analysis.Analytic.CPolynomial import Mathlib.Analysis.Calculus.Deriv.Basic import Mathlib.Analysis.Calculus.ContDiff.Defs import Mathlib.Analysis.Calculus.FDeriv.Add #align_import analysis.calculus.fderiv_analytic from "leanprover-community/mathlib"@"3bce8d800a6f2b8f63fe1e588fd76a9ff4adcebe" open Filter Asymptotics open scoped ENNReal universe u v variable {π•œ : Type*} [NontriviallyNormedField π•œ] variable {E : Type u} [NormedAddCommGroup E] [NormedSpace π•œ E] variable {F : Type v} [NormedAddCommGroup F] [NormedSpace π•œ F] namespace HasFPowerSeriesOnBall open FormalMultilinearSeries ENNReal Nat variable {p : FormalMultilinearSeries π•œ E F} {f : E β†’ F} {x : E} {r : ℝβ‰₯0∞} (h : HasFPowerSeriesOnBall f p x r) (y : E)
Mathlib/Analysis/Calculus/FDeriv/Analytic.lean
469
474
theorem iteratedFDeriv_zero_apply_diag : iteratedFDeriv π•œ 0 f x = p 0 := by
ext convert (h.hasSum <| EMetric.mem_ball_self h.r_pos).tsum_eq.symm Β· rw [iteratedFDeriv_zero_apply, add_zero] Β· rw [tsum_eq_single 0 fun n hn ↦ by haveI := NeZero.mk hn; exact (p n).map_zero] exact congr(p 0 $(Subsingleton.elim _ _))
1,767
import Mathlib.Analysis.Analytic.Constructions import Mathlib.Analysis.Calculus.Dslope import Mathlib.Analysis.Calculus.FDeriv.Analytic import Mathlib.Analysis.Analytic.Uniqueness #align_import analysis.analytic.isolated_zeros from "leanprover-community/mathlib"@"a3209ddf94136d36e5e5c624b10b2a347cc9d090" open scoped Classical open Filter Function Nat FormalMultilinearSeries EMetric Set open scoped Topology variable {π•œ : Type*} [NontriviallyNormedField π•œ] {E : Type*} [NormedAddCommGroup E] [NormedSpace π•œ E] {s : E} {p q : FormalMultilinearSeries π•œ π•œ E} {f g : π•œ β†’ E} {n : β„•} {z zβ‚€ : π•œ} namespace HasSum variable {a : β„• β†’ E}
Mathlib/Analysis/Analytic/IsolatedZeros.lean
44
45
theorem hasSum_at_zero (a : β„• β†’ E) : HasSum (fun n => (0 : π•œ) ^ n β€’ a n) (a 0) := by
convert hasSum_single (Ξ± := E) 0 fun b h ↦ _ <;> simp [*]
1,768
import Mathlib.Analysis.Analytic.Constructions import Mathlib.Analysis.Calculus.Dslope import Mathlib.Analysis.Calculus.FDeriv.Analytic import Mathlib.Analysis.Analytic.Uniqueness #align_import analysis.analytic.isolated_zeros from "leanprover-community/mathlib"@"a3209ddf94136d36e5e5c624b10b2a347cc9d090" open scoped Classical open Filter Function Nat FormalMultilinearSeries EMetric Set open scoped Topology variable {π•œ : Type*} [NontriviallyNormedField π•œ] {E : Type*} [NormedAddCommGroup E] [NormedSpace π•œ E] {s : E} {p q : FormalMultilinearSeries π•œ π•œ E} {f g : π•œ β†’ E} {n : β„•} {z zβ‚€ : π•œ} namespace HasSum variable {a : β„• β†’ E} theorem hasSum_at_zero (a : β„• β†’ E) : HasSum (fun n => (0 : π•œ) ^ n β€’ a n) (a 0) := by convert hasSum_single (Ξ± := E) 0 fun b h ↦ _ <;> simp [*] #align has_sum.has_sum_at_zero HasSum.hasSum_at_zero
Mathlib/Analysis/Analytic/IsolatedZeros.lean
48
62
theorem exists_hasSum_smul_of_apply_eq_zero (hs : HasSum (fun m => z ^ m β€’ a m) s) (ha : βˆ€ k < n, a k = 0) : βˆƒ t : E, z ^ n β€’ t = s ∧ HasSum (fun m => z ^ m β€’ a (m + n)) t := by
obtain rfl | hn := n.eq_zero_or_pos Β· simpa by_cases h : z = 0 Β· have : s = 0 := hs.unique (by simpa [ha 0 hn, h] using hasSum_at_zero a) exact ⟨a n, by simp [h, hn.ne', this], by simpa [h] using hasSum_at_zero fun m => a (m + n)⟩ Β· refine ⟨(z ^ n)⁻¹ β€’ s, by field_simp [smul_smul], ?_⟩ have h1 : βˆ‘ i ∈ Finset.range n, z ^ i β€’ a i = 0 := Finset.sum_eq_zero fun k hk => by simp [ha k (Finset.mem_range.mp hk)] have h2 : HasSum (fun m => z ^ (m + n) β€’ a (m + n)) s := by simpa [h1] using (hasSum_nat_add_iff' n).mpr hs convert h2.const_smul (z⁻¹ ^ n) using 1 Β· field_simp [pow_add, smul_smul] Β· simp only [inv_pow]
1,768
import Mathlib.Analysis.Analytic.Constructions import Mathlib.Analysis.Calculus.Dslope import Mathlib.Analysis.Calculus.FDeriv.Analytic import Mathlib.Analysis.Analytic.Uniqueness #align_import analysis.analytic.isolated_zeros from "leanprover-community/mathlib"@"a3209ddf94136d36e5e5c624b10b2a347cc9d090" open scoped Classical open Filter Function Nat FormalMultilinearSeries EMetric Set open scoped Topology variable {π•œ : Type*} [NontriviallyNormedField π•œ] {E : Type*} [NormedAddCommGroup E] [NormedSpace π•œ E] {s : E} {p q : FormalMultilinearSeries π•œ π•œ E} {f g : π•œ β†’ E} {n : β„•} {z zβ‚€ : π•œ} namespace HasFPowerSeriesAt
Mathlib/Analysis/Analytic/IsolatedZeros.lean
69
80
theorem has_fpower_series_dslope_fslope (hp : HasFPowerSeriesAt f p zβ‚€) : HasFPowerSeriesAt (dslope f zβ‚€) p.fslope zβ‚€ := by
have hpd : deriv f zβ‚€ = p.coeff 1 := hp.deriv have hp0 : p.coeff 0 = f zβ‚€ := hp.coeff_zero 1 simp only [hasFPowerSeriesAt_iff, apply_eq_pow_smul_coeff, coeff_fslope] at hp ⊒ refine hp.mono fun x hx => ?_ by_cases h : x = 0 Β· convert hasSum_single (Ξ± := E) 0 _ <;> intros <;> simp [*] Β· have hxx : βˆ€ n : β„•, x⁻¹ * x ^ (n + 1) = x ^ n := fun n => by field_simp [h, _root_.pow_succ] suffices HasSum (fun n => x⁻¹ β€’ x ^ (n + 1) β€’ p.coeff (n + 1)) (x⁻¹ β€’ (f (zβ‚€ + x) - f zβ‚€)) by simpa [dslope, slope, h, smul_smul, hxx] using this simpa [hp0] using ((hasSum_nat_add_iff' 1).mpr hx).const_smul x⁻¹
1,768
import Mathlib.Analysis.Analytic.Constructions import Mathlib.Analysis.Calculus.Dslope import Mathlib.Analysis.Calculus.FDeriv.Analytic import Mathlib.Analysis.Analytic.Uniqueness #align_import analysis.analytic.isolated_zeros from "leanprover-community/mathlib"@"a3209ddf94136d36e5e5c624b10b2a347cc9d090" open scoped Classical open Filter Function Nat FormalMultilinearSeries EMetric Set open scoped Topology variable {π•œ : Type*} [NontriviallyNormedField π•œ] {E : Type*} [NormedAddCommGroup E] [NormedSpace π•œ E] {s : E} {p q : FormalMultilinearSeries π•œ π•œ E} {f g : π•œ β†’ E} {n : β„•} {z zβ‚€ : π•œ} namespace HasFPowerSeriesAt theorem has_fpower_series_dslope_fslope (hp : HasFPowerSeriesAt f p zβ‚€) : HasFPowerSeriesAt (dslope f zβ‚€) p.fslope zβ‚€ := by have hpd : deriv f zβ‚€ = p.coeff 1 := hp.deriv have hp0 : p.coeff 0 = f zβ‚€ := hp.coeff_zero 1 simp only [hasFPowerSeriesAt_iff, apply_eq_pow_smul_coeff, coeff_fslope] at hp ⊒ refine hp.mono fun x hx => ?_ by_cases h : x = 0 Β· convert hasSum_single (Ξ± := E) 0 _ <;> intros <;> simp [*] Β· have hxx : βˆ€ n : β„•, x⁻¹ * x ^ (n + 1) = x ^ n := fun n => by field_simp [h, _root_.pow_succ] suffices HasSum (fun n => x⁻¹ β€’ x ^ (n + 1) β€’ p.coeff (n + 1)) (x⁻¹ β€’ (f (zβ‚€ + x) - f zβ‚€)) by simpa [dslope, slope, h, smul_smul, hxx] using this simpa [hp0] using ((hasSum_nat_add_iff' 1).mpr hx).const_smul x⁻¹ #align has_fpower_series_at.has_fpower_series_dslope_fslope HasFPowerSeriesAt.has_fpower_series_dslope_fslope
Mathlib/Analysis/Analytic/IsolatedZeros.lean
83
87
theorem has_fpower_series_iterate_dslope_fslope (n : β„•) (hp : HasFPowerSeriesAt f p zβ‚€) : HasFPowerSeriesAt ((swap dslope zβ‚€)^[n] f) (fslope^[n] p) zβ‚€ := by
induction' n with n ih generalizing f p Β· exact hp Β· simpa using ih (has_fpower_series_dslope_fslope hp)
1,768
import Mathlib.Analysis.Analytic.Constructions import Mathlib.Analysis.Calculus.Dslope import Mathlib.Analysis.Calculus.FDeriv.Analytic import Mathlib.Analysis.Analytic.Uniqueness #align_import analysis.analytic.isolated_zeros from "leanprover-community/mathlib"@"a3209ddf94136d36e5e5c624b10b2a347cc9d090" open scoped Classical open Filter Function Nat FormalMultilinearSeries EMetric Set open scoped Topology variable {π•œ : Type*} [NontriviallyNormedField π•œ] {E : Type*} [NormedAddCommGroup E] [NormedSpace π•œ E] {s : E} {p q : FormalMultilinearSeries π•œ π•œ E} {f g : π•œ β†’ E} {n : β„•} {z zβ‚€ : π•œ} namespace HasFPowerSeriesAt theorem has_fpower_series_dslope_fslope (hp : HasFPowerSeriesAt f p zβ‚€) : HasFPowerSeriesAt (dslope f zβ‚€) p.fslope zβ‚€ := by have hpd : deriv f zβ‚€ = p.coeff 1 := hp.deriv have hp0 : p.coeff 0 = f zβ‚€ := hp.coeff_zero 1 simp only [hasFPowerSeriesAt_iff, apply_eq_pow_smul_coeff, coeff_fslope] at hp ⊒ refine hp.mono fun x hx => ?_ by_cases h : x = 0 Β· convert hasSum_single (Ξ± := E) 0 _ <;> intros <;> simp [*] Β· have hxx : βˆ€ n : β„•, x⁻¹ * x ^ (n + 1) = x ^ n := fun n => by field_simp [h, _root_.pow_succ] suffices HasSum (fun n => x⁻¹ β€’ x ^ (n + 1) β€’ p.coeff (n + 1)) (x⁻¹ β€’ (f (zβ‚€ + x) - f zβ‚€)) by simpa [dslope, slope, h, smul_smul, hxx] using this simpa [hp0] using ((hasSum_nat_add_iff' 1).mpr hx).const_smul x⁻¹ #align has_fpower_series_at.has_fpower_series_dslope_fslope HasFPowerSeriesAt.has_fpower_series_dslope_fslope theorem has_fpower_series_iterate_dslope_fslope (n : β„•) (hp : HasFPowerSeriesAt f p zβ‚€) : HasFPowerSeriesAt ((swap dslope zβ‚€)^[n] f) (fslope^[n] p) zβ‚€ := by induction' n with n ih generalizing f p Β· exact hp Β· simpa using ih (has_fpower_series_dslope_fslope hp) #align has_fpower_series_at.has_fpower_series_iterate_dslope_fslope HasFPowerSeriesAt.has_fpower_series_iterate_dslope_fslope
Mathlib/Analysis/Analytic/IsolatedZeros.lean
90
93
theorem iterate_dslope_fslope_ne_zero (hp : HasFPowerSeriesAt f p zβ‚€) (h : p β‰  0) : (swap dslope zβ‚€)^[p.order] f zβ‚€ β‰  0 := by
rw [← coeff_zero (has_fpower_series_iterate_dslope_fslope p.order hp) 1] simpa [coeff_eq_zero] using apply_order_ne_zero h
1,768
import Mathlib.Analysis.BoxIntegral.Box.Basic import Mathlib.Analysis.SpecificLimits.Basic #align_import analysis.box_integral.box.subbox_induction from "leanprover-community/mathlib"@"f2ce6086713c78a7f880485f7917ea547a215982" open Set Finset Function Filter Metric Classical Topology Filter ENNReal noncomputable section namespace BoxIntegral namespace Box variable {ΞΉ : Type*} {I J : Box ΞΉ} def splitCenterBox (I : Box ΞΉ) (s : Set ΞΉ) : Box ΞΉ where lower := s.piecewise (fun i ↦ (I.lower i + I.upper i) / 2) I.lower upper := s.piecewise I.upper fun i ↦ (I.lower i + I.upper i) / 2 lower_lt_upper i := by dsimp only [Set.piecewise] split_ifs <;> simp only [left_lt_add_div_two, add_div_two_lt_right, I.lower_lt_upper] #align box_integral.box.split_center_box BoxIntegral.Box.splitCenterBox
Mathlib/Analysis/BoxIntegral/Box/SubboxInduction.lean
53
62
theorem mem_splitCenterBox {s : Set ΞΉ} {y : ΞΉ β†’ ℝ} : y ∈ I.splitCenterBox s ↔ y ∈ I ∧ βˆ€ i, (I.lower i + I.upper i) / 2 < y i ↔ i ∈ s := by
simp only [splitCenterBox, mem_def, ← forall_and] refine forall_congr' fun i ↦ ?_ dsimp only [Set.piecewise] split_ifs with hs <;> simp only [hs, iff_true_iff, iff_false_iff, not_lt] exacts [⟨fun H ↦ ⟨⟨(left_lt_add_div_two.2 (I.lower_lt_upper i)).trans H.1, H.2⟩, H.1⟩, fun H ↦ ⟨H.2, H.1.2⟩⟩, ⟨fun H ↦ ⟨⟨H.1, H.2.trans (add_div_two_lt_right.2 (I.lower_lt_upper i)).le⟩, H.2⟩, fun H ↦ ⟨H.1.1, H.2⟩⟩]
1,769
import Mathlib.Analysis.BoxIntegral.Box.Basic import Mathlib.Analysis.SpecificLimits.Basic #align_import analysis.box_integral.box.subbox_induction from "leanprover-community/mathlib"@"f2ce6086713c78a7f880485f7917ea547a215982" open Set Finset Function Filter Metric Classical Topology Filter ENNReal noncomputable section namespace BoxIntegral namespace Box variable {ΞΉ : Type*} {I J : Box ΞΉ} def splitCenterBox (I : Box ΞΉ) (s : Set ΞΉ) : Box ΞΉ where lower := s.piecewise (fun i ↦ (I.lower i + I.upper i) / 2) I.lower upper := s.piecewise I.upper fun i ↦ (I.lower i + I.upper i) / 2 lower_lt_upper i := by dsimp only [Set.piecewise] split_ifs <;> simp only [left_lt_add_div_two, add_div_two_lt_right, I.lower_lt_upper] #align box_integral.box.split_center_box BoxIntegral.Box.splitCenterBox theorem mem_splitCenterBox {s : Set ΞΉ} {y : ΞΉ β†’ ℝ} : y ∈ I.splitCenterBox s ↔ y ∈ I ∧ βˆ€ i, (I.lower i + I.upper i) / 2 < y i ↔ i ∈ s := by simp only [splitCenterBox, mem_def, ← forall_and] refine forall_congr' fun i ↦ ?_ dsimp only [Set.piecewise] split_ifs with hs <;> simp only [hs, iff_true_iff, iff_false_iff, not_lt] exacts [⟨fun H ↦ ⟨⟨(left_lt_add_div_two.2 (I.lower_lt_upper i)).trans H.1, H.2⟩, H.1⟩, fun H ↦ ⟨H.2, H.1.2⟩⟩, ⟨fun H ↦ ⟨⟨H.1, H.2.trans (add_div_two_lt_right.2 (I.lower_lt_upper i)).le⟩, H.2⟩, fun H ↦ ⟨H.1.1, H.2⟩⟩] #align box_integral.box.mem_split_center_box BoxIntegral.Box.mem_splitCenterBox theorem splitCenterBox_le (I : Box ΞΉ) (s : Set ΞΉ) : I.splitCenterBox s ≀ I := fun _ hx ↦ (mem_splitCenterBox.1 hx).1 #align box_integral.box.split_center_box_le BoxIntegral.Box.splitCenterBox_le
Mathlib/Analysis/BoxIntegral/Box/SubboxInduction.lean
69
75
theorem disjoint_splitCenterBox (I : Box ΞΉ) {s t : Set ΞΉ} (h : s β‰  t) : Disjoint (I.splitCenterBox s : Set (ΞΉ β†’ ℝ)) (I.splitCenterBox t) := by
rw [disjoint_iff_inf_le] rintro y ⟨hs, ht⟩; apply h ext i rw [mem_coe, mem_splitCenterBox] at hs ht rw [← hs.2, ← ht.2]
1,769
import Mathlib.Analysis.BoxIntegral.Box.Basic import Mathlib.Analysis.SpecificLimits.Basic #align_import analysis.box_integral.box.subbox_induction from "leanprover-community/mathlib"@"f2ce6086713c78a7f880485f7917ea547a215982" open Set Finset Function Filter Metric Classical Topology Filter ENNReal noncomputable section namespace BoxIntegral namespace Box variable {ΞΉ : Type*} {I J : Box ΞΉ} def splitCenterBox (I : Box ΞΉ) (s : Set ΞΉ) : Box ΞΉ where lower := s.piecewise (fun i ↦ (I.lower i + I.upper i) / 2) I.lower upper := s.piecewise I.upper fun i ↦ (I.lower i + I.upper i) / 2 lower_lt_upper i := by dsimp only [Set.piecewise] split_ifs <;> simp only [left_lt_add_div_two, add_div_two_lt_right, I.lower_lt_upper] #align box_integral.box.split_center_box BoxIntegral.Box.splitCenterBox theorem mem_splitCenterBox {s : Set ΞΉ} {y : ΞΉ β†’ ℝ} : y ∈ I.splitCenterBox s ↔ y ∈ I ∧ βˆ€ i, (I.lower i + I.upper i) / 2 < y i ↔ i ∈ s := by simp only [splitCenterBox, mem_def, ← forall_and] refine forall_congr' fun i ↦ ?_ dsimp only [Set.piecewise] split_ifs with hs <;> simp only [hs, iff_true_iff, iff_false_iff, not_lt] exacts [⟨fun H ↦ ⟨⟨(left_lt_add_div_two.2 (I.lower_lt_upper i)).trans H.1, H.2⟩, H.1⟩, fun H ↦ ⟨H.2, H.1.2⟩⟩, ⟨fun H ↦ ⟨⟨H.1, H.2.trans (add_div_two_lt_right.2 (I.lower_lt_upper i)).le⟩, H.2⟩, fun H ↦ ⟨H.1.1, H.2⟩⟩] #align box_integral.box.mem_split_center_box BoxIntegral.Box.mem_splitCenterBox theorem splitCenterBox_le (I : Box ΞΉ) (s : Set ΞΉ) : I.splitCenterBox s ≀ I := fun _ hx ↦ (mem_splitCenterBox.1 hx).1 #align box_integral.box.split_center_box_le BoxIntegral.Box.splitCenterBox_le theorem disjoint_splitCenterBox (I : Box ΞΉ) {s t : Set ΞΉ} (h : s β‰  t) : Disjoint (I.splitCenterBox s : Set (ΞΉ β†’ ℝ)) (I.splitCenterBox t) := by rw [disjoint_iff_inf_le] rintro y ⟨hs, ht⟩; apply h ext i rw [mem_coe, mem_splitCenterBox] at hs ht rw [← hs.2, ← ht.2] #align box_integral.box.disjoint_split_center_box BoxIntegral.Box.disjoint_splitCenterBox theorem injective_splitCenterBox (I : Box ΞΉ) : Injective I.splitCenterBox := fun _ _ H ↦ by_contra fun Hne ↦ (I.disjoint_splitCenterBox Hne).ne (nonempty_coe _).ne_empty (H β–Έ rfl) #align box_integral.box.injective_split_center_box BoxIntegral.Box.injective_splitCenterBox @[simp] theorem exists_mem_splitCenterBox {I : Box ΞΉ} {x : ΞΉ β†’ ℝ} : (βˆƒ s, x ∈ I.splitCenterBox s) ↔ x ∈ I := ⟨fun ⟨s, hs⟩ ↦ I.splitCenterBox_le s hs, fun hx ↦ ⟨{ i | (I.lower i + I.upper i) / 2 < x i }, mem_splitCenterBox.2 ⟨hx, fun _ ↦ Iff.rfl⟩⟩⟩ #align box_integral.box.exists_mem_split_center_box BoxIntegral.Box.exists_mem_splitCenterBox @[simps] def splitCenterBoxEmb (I : Box ΞΉ) : Set ΞΉ β†ͺ Box ΞΉ := ⟨splitCenterBox I, injective_splitCenterBox I⟩ #align box_integral.box.split_center_box_emb BoxIntegral.Box.splitCenterBoxEmb @[simp]
Mathlib/Analysis/BoxIntegral/Box/SubboxInduction.lean
95
97
theorem iUnion_coe_splitCenterBox (I : Box ΞΉ) : ⋃ s, (I.splitCenterBox s : Set (ΞΉ β†’ ℝ)) = I := by
ext x simp
1,769
import Mathlib.Analysis.BoxIntegral.Box.Basic import Mathlib.Analysis.SpecificLimits.Basic #align_import analysis.box_integral.box.subbox_induction from "leanprover-community/mathlib"@"f2ce6086713c78a7f880485f7917ea547a215982" open Set Finset Function Filter Metric Classical Topology Filter ENNReal noncomputable section namespace BoxIntegral namespace Box variable {ΞΉ : Type*} {I J : Box ΞΉ} def splitCenterBox (I : Box ΞΉ) (s : Set ΞΉ) : Box ΞΉ where lower := s.piecewise (fun i ↦ (I.lower i + I.upper i) / 2) I.lower upper := s.piecewise I.upper fun i ↦ (I.lower i + I.upper i) / 2 lower_lt_upper i := by dsimp only [Set.piecewise] split_ifs <;> simp only [left_lt_add_div_two, add_div_two_lt_right, I.lower_lt_upper] #align box_integral.box.split_center_box BoxIntegral.Box.splitCenterBox theorem mem_splitCenterBox {s : Set ΞΉ} {y : ΞΉ β†’ ℝ} : y ∈ I.splitCenterBox s ↔ y ∈ I ∧ βˆ€ i, (I.lower i + I.upper i) / 2 < y i ↔ i ∈ s := by simp only [splitCenterBox, mem_def, ← forall_and] refine forall_congr' fun i ↦ ?_ dsimp only [Set.piecewise] split_ifs with hs <;> simp only [hs, iff_true_iff, iff_false_iff, not_lt] exacts [⟨fun H ↦ ⟨⟨(left_lt_add_div_two.2 (I.lower_lt_upper i)).trans H.1, H.2⟩, H.1⟩, fun H ↦ ⟨H.2, H.1.2⟩⟩, ⟨fun H ↦ ⟨⟨H.1, H.2.trans (add_div_two_lt_right.2 (I.lower_lt_upper i)).le⟩, H.2⟩, fun H ↦ ⟨H.1.1, H.2⟩⟩] #align box_integral.box.mem_split_center_box BoxIntegral.Box.mem_splitCenterBox theorem splitCenterBox_le (I : Box ΞΉ) (s : Set ΞΉ) : I.splitCenterBox s ≀ I := fun _ hx ↦ (mem_splitCenterBox.1 hx).1 #align box_integral.box.split_center_box_le BoxIntegral.Box.splitCenterBox_le theorem disjoint_splitCenterBox (I : Box ΞΉ) {s t : Set ΞΉ} (h : s β‰  t) : Disjoint (I.splitCenterBox s : Set (ΞΉ β†’ ℝ)) (I.splitCenterBox t) := by rw [disjoint_iff_inf_le] rintro y ⟨hs, ht⟩; apply h ext i rw [mem_coe, mem_splitCenterBox] at hs ht rw [← hs.2, ← ht.2] #align box_integral.box.disjoint_split_center_box BoxIntegral.Box.disjoint_splitCenterBox theorem injective_splitCenterBox (I : Box ΞΉ) : Injective I.splitCenterBox := fun _ _ H ↦ by_contra fun Hne ↦ (I.disjoint_splitCenterBox Hne).ne (nonempty_coe _).ne_empty (H β–Έ rfl) #align box_integral.box.injective_split_center_box BoxIntegral.Box.injective_splitCenterBox @[simp] theorem exists_mem_splitCenterBox {I : Box ΞΉ} {x : ΞΉ β†’ ℝ} : (βˆƒ s, x ∈ I.splitCenterBox s) ↔ x ∈ I := ⟨fun ⟨s, hs⟩ ↦ I.splitCenterBox_le s hs, fun hx ↦ ⟨{ i | (I.lower i + I.upper i) / 2 < x i }, mem_splitCenterBox.2 ⟨hx, fun _ ↦ Iff.rfl⟩⟩⟩ #align box_integral.box.exists_mem_split_center_box BoxIntegral.Box.exists_mem_splitCenterBox @[simps] def splitCenterBoxEmb (I : Box ΞΉ) : Set ΞΉ β†ͺ Box ΞΉ := ⟨splitCenterBox I, injective_splitCenterBox I⟩ #align box_integral.box.split_center_box_emb BoxIntegral.Box.splitCenterBoxEmb @[simp] theorem iUnion_coe_splitCenterBox (I : Box ΞΉ) : ⋃ s, (I.splitCenterBox s : Set (ΞΉ β†’ ℝ)) = I := by ext x simp #align box_integral.box.Union_coe_split_center_box BoxIntegral.Box.iUnion_coe_splitCenterBox @[simp]
Mathlib/Analysis/BoxIntegral/Box/SubboxInduction.lean
101
103
theorem upper_sub_lower_splitCenterBox (I : Box ΞΉ) (s : Set ΞΉ) (i : ΞΉ) : (I.splitCenterBox s).upper i - (I.splitCenterBox s).lower i = (I.upper i - I.lower i) / 2 := by
by_cases i ∈ s <;> field_simp [splitCenterBox] <;> field_simp [mul_two, two_mul]
1,769
import Mathlib.Analysis.BoxIntegral.Box.Basic import Mathlib.Analysis.SpecificLimits.Basic #align_import analysis.box_integral.box.subbox_induction from "leanprover-community/mathlib"@"f2ce6086713c78a7f880485f7917ea547a215982" open Set Finset Function Filter Metric Classical Topology Filter ENNReal noncomputable section namespace BoxIntegral namespace Box variable {ΞΉ : Type*} {I J : Box ΞΉ} def splitCenterBox (I : Box ΞΉ) (s : Set ΞΉ) : Box ΞΉ where lower := s.piecewise (fun i ↦ (I.lower i + I.upper i) / 2) I.lower upper := s.piecewise I.upper fun i ↦ (I.lower i + I.upper i) / 2 lower_lt_upper i := by dsimp only [Set.piecewise] split_ifs <;> simp only [left_lt_add_div_two, add_div_two_lt_right, I.lower_lt_upper] #align box_integral.box.split_center_box BoxIntegral.Box.splitCenterBox theorem mem_splitCenterBox {s : Set ΞΉ} {y : ΞΉ β†’ ℝ} : y ∈ I.splitCenterBox s ↔ y ∈ I ∧ βˆ€ i, (I.lower i + I.upper i) / 2 < y i ↔ i ∈ s := by simp only [splitCenterBox, mem_def, ← forall_and] refine forall_congr' fun i ↦ ?_ dsimp only [Set.piecewise] split_ifs with hs <;> simp only [hs, iff_true_iff, iff_false_iff, not_lt] exacts [⟨fun H ↦ ⟨⟨(left_lt_add_div_two.2 (I.lower_lt_upper i)).trans H.1, H.2⟩, H.1⟩, fun H ↦ ⟨H.2, H.1.2⟩⟩, ⟨fun H ↦ ⟨⟨H.1, H.2.trans (add_div_two_lt_right.2 (I.lower_lt_upper i)).le⟩, H.2⟩, fun H ↦ ⟨H.1.1, H.2⟩⟩] #align box_integral.box.mem_split_center_box BoxIntegral.Box.mem_splitCenterBox theorem splitCenterBox_le (I : Box ΞΉ) (s : Set ΞΉ) : I.splitCenterBox s ≀ I := fun _ hx ↦ (mem_splitCenterBox.1 hx).1 #align box_integral.box.split_center_box_le BoxIntegral.Box.splitCenterBox_le theorem disjoint_splitCenterBox (I : Box ΞΉ) {s t : Set ΞΉ} (h : s β‰  t) : Disjoint (I.splitCenterBox s : Set (ΞΉ β†’ ℝ)) (I.splitCenterBox t) := by rw [disjoint_iff_inf_le] rintro y ⟨hs, ht⟩; apply h ext i rw [mem_coe, mem_splitCenterBox] at hs ht rw [← hs.2, ← ht.2] #align box_integral.box.disjoint_split_center_box BoxIntegral.Box.disjoint_splitCenterBox theorem injective_splitCenterBox (I : Box ΞΉ) : Injective I.splitCenterBox := fun _ _ H ↦ by_contra fun Hne ↦ (I.disjoint_splitCenterBox Hne).ne (nonempty_coe _).ne_empty (H β–Έ rfl) #align box_integral.box.injective_split_center_box BoxIntegral.Box.injective_splitCenterBox @[simp] theorem exists_mem_splitCenterBox {I : Box ΞΉ} {x : ΞΉ β†’ ℝ} : (βˆƒ s, x ∈ I.splitCenterBox s) ↔ x ∈ I := ⟨fun ⟨s, hs⟩ ↦ I.splitCenterBox_le s hs, fun hx ↦ ⟨{ i | (I.lower i + I.upper i) / 2 < x i }, mem_splitCenterBox.2 ⟨hx, fun _ ↦ Iff.rfl⟩⟩⟩ #align box_integral.box.exists_mem_split_center_box BoxIntegral.Box.exists_mem_splitCenterBox @[simps] def splitCenterBoxEmb (I : Box ΞΉ) : Set ΞΉ β†ͺ Box ΞΉ := ⟨splitCenterBox I, injective_splitCenterBox I⟩ #align box_integral.box.split_center_box_emb BoxIntegral.Box.splitCenterBoxEmb @[simp] theorem iUnion_coe_splitCenterBox (I : Box ΞΉ) : ⋃ s, (I.splitCenterBox s : Set (ΞΉ β†’ ℝ)) = I := by ext x simp #align box_integral.box.Union_coe_split_center_box BoxIntegral.Box.iUnion_coe_splitCenterBox @[simp] theorem upper_sub_lower_splitCenterBox (I : Box ΞΉ) (s : Set ΞΉ) (i : ΞΉ) : (I.splitCenterBox s).upper i - (I.splitCenterBox s).lower i = (I.upper i - I.lower i) / 2 := by by_cases i ∈ s <;> field_simp [splitCenterBox] <;> field_simp [mul_two, two_mul] #align box_integral.box.upper_sub_lower_split_center_box BoxIntegral.Box.upper_sub_lower_splitCenterBox @[elab_as_elim]
Mathlib/Analysis/BoxIntegral/Box/SubboxInduction.lean
122
170
theorem subbox_induction_on' {p : Box ΞΉ β†’ Prop} (I : Box ΞΉ) (H_ind : βˆ€ J ≀ I, (βˆ€ s, p (splitCenterBox J s)) β†’ p J) (H_nhds : βˆ€ z ∈ Box.Icc I, βˆƒ U ∈ 𝓝[Box.Icc I] z, βˆ€ J ≀ I, βˆ€ (m : β„•), z ∈ Box.Icc J β†’ Box.Icc J βŠ† U β†’ (βˆ€ i, J.upper i - J.lower i = (I.upper i - I.lower i) / 2 ^ m) β†’ p J) : p I := by
by_contra hpI -- First we use `H_ind` to construct a decreasing sequence of boxes such that `βˆ€ m, Β¬p (J m)`. replace H_ind := fun J hJ ↦ not_imp_not.2 (H_ind J hJ) simp only [exists_imp, not_forall] at H_ind choose! s hs using H_ind set J : β„• β†’ Box ΞΉ := fun m ↦ (fun J ↦ splitCenterBox J (s J))^[m] I have J_succ : βˆ€ m, J (m + 1) = splitCenterBox (J m) (s <| J m) := fun m ↦ iterate_succ_apply' _ _ _ -- Now we prove some properties of `J` have hJmono : Antitone J := antitone_nat_of_succ_le fun n ↦ by simpa [J_succ] using splitCenterBox_le _ _ have hJle : βˆ€ m, J m ≀ I := fun m ↦ hJmono (zero_le m) have hJp : βˆ€ m, Β¬p (J m) := fun m ↦ Nat.recOn m hpI fun m ↦ by simpa only [J_succ] using hs (J m) (hJle m) have hJsub : βˆ€ m i, (J m).upper i - (J m).lower i = (I.upper i - I.lower i) / 2 ^ m := by intro m i induction' m with m ihm Β· simp [J, Nat.zero_eq] simp only [pow_succ, J_succ, upper_sub_lower_splitCenterBox, ihm, div_div] have h0 : J 0 = I := rfl clear_value J clear hpI hs J_succ s -- Let `z` be the unique common point of all `(J m).Icc`. Then `H_nhds` proves `p (J m)` for -- sufficiently large `m`. This contradicts `hJp`. set z : ΞΉ β†’ ℝ := ⨆ m, (J m).lower have hzJ : βˆ€ m, z ∈ Box.Icc (J m) := mem_iInter.1 (ciSup_mem_iInter_Icc_of_antitone_Icc ((@Box.Icc ΞΉ).monotone.comp_antitone hJmono) fun m ↦ (J m).lower_le_upper) have hJl_mem : βˆ€ m, (J m).lower ∈ Box.Icc I := fun m ↦ le_iff_Icc.1 (hJle m) (J m).lower_mem_Icc have hJu_mem : βˆ€ m, (J m).upper ∈ Box.Icc I := fun m ↦ le_iff_Icc.1 (hJle m) (J m).upper_mem_Icc have hJlz : Tendsto (fun m ↦ (J m).lower) atTop (𝓝 z) := tendsto_atTop_ciSup (antitone_lower.comp hJmono) ⟨I.upper, fun x ⟨m, hm⟩ ↦ hm β–Έ (hJl_mem m).2⟩ have hJuz : Tendsto (fun m ↦ (J m).upper) atTop (𝓝 z) := by suffices Tendsto (fun m ↦ (J m).upper - (J m).lower) atTop (𝓝 0) by simpa using hJlz.add this refine tendsto_pi_nhds.2 fun i ↦ ?_ simpa [hJsub] using tendsto_const_nhds.div_atTop (tendsto_pow_atTop_atTop_of_one_lt _root_.one_lt_two) replace hJlz : Tendsto (fun m ↦ (J m).lower) atTop (𝓝[Icc I.lower I.upper] z) := tendsto_nhdsWithin_of_tendsto_nhds_of_eventually_within _ hJlz (eventually_of_forall hJl_mem) replace hJuz : Tendsto (fun m ↦ (J m).upper) atTop (𝓝[Icc I.lower I.upper] z) := tendsto_nhdsWithin_of_tendsto_nhds_of_eventually_within _ hJuz (eventually_of_forall hJu_mem) rcases H_nhds z (h0 β–Έ hzJ 0) with ⟨U, hUz, hU⟩ rcases (tendsto_lift'.1 (hJlz.Icc hJuz) U hUz).exists with ⟨m, hUm⟩ exact hJp m (hU (J m) (hJle m) m (hzJ m) hUm (hJsub m))
1,769
import Mathlib.Analysis.SpecificLimits.Basic import Mathlib.Order.Interval.Set.IsoIoo import Mathlib.Topology.Order.MonotoneContinuity import Mathlib.Topology.UrysohnsBounded #align_import topology.tietze_extension from "leanprover-community/mathlib"@"f2ce6086713c78a7f880485f7917ea547a215982" section TietzeExtensionClass universe u u₁ uβ‚‚ v w -- TODO: define *absolute retracts* and then prove they satisfy Tietze extension. -- Then make instances of that instead and remove this class. class TietzeExtension (Y : Type v) [TopologicalSpace Y] : Prop where exists_restrict_eq' {X : Type u} [TopologicalSpace X] [NormalSpace X] (s : Set X) (hs : IsClosed s) (f : C(s, Y)) : βˆƒ (g : C(X, Y)), g.restrict s = f variable {X₁ : Type u₁} [TopologicalSpace X₁] variable {X : Type u} [TopologicalSpace X] [NormalSpace X] {s : Set X} (hs : IsClosed s) variable {e : X₁ β†’ X} (he : ClosedEmbedding e) variable {Y : Type v} [TopologicalSpace Y] [TietzeExtension.{u, v} Y] theorem ContinuousMap.exists_restrict_eq (f : C(s, Y)) : βˆƒ (g : C(X, Y)), g.restrict s = f := TietzeExtension.exists_restrict_eq' s hs f #align continuous_map.exists_restrict_eq_of_closed ContinuousMap.exists_restrict_eq
Mathlib/Topology/TietzeExtension.lean
73
77
theorem ContinuousMap.exists_extension (f : C(X₁, Y)) : βˆƒ (g : C(X, Y)), g.comp ⟨e, he.continuous⟩ = f := by
let e' : X₁ β‰ƒβ‚œ Set.range e := Homeomorph.ofEmbedding _ he.toEmbedding obtain ⟨g, hg⟩ := (f.comp e'.symm).exists_restrict_eq he.isClosed_range exact ⟨g, by ext x; simpa using congr($(hg) ⟨e' x, x, rfl⟩)⟩
1,770
import Mathlib.Analysis.SpecificLimits.Basic import Mathlib.Order.Interval.Set.IsoIoo import Mathlib.Topology.Order.MonotoneContinuity import Mathlib.Topology.UrysohnsBounded #align_import topology.tietze_extension from "leanprover-community/mathlib"@"f2ce6086713c78a7f880485f7917ea547a215982" section TietzeExtensionClass universe u u₁ uβ‚‚ v w -- TODO: define *absolute retracts* and then prove they satisfy Tietze extension. -- Then make instances of that instead and remove this class. class TietzeExtension (Y : Type v) [TopologicalSpace Y] : Prop where exists_restrict_eq' {X : Type u} [TopologicalSpace X] [NormalSpace X] (s : Set X) (hs : IsClosed s) (f : C(s, Y)) : βˆƒ (g : C(X, Y)), g.restrict s = f variable {X₁ : Type u₁} [TopologicalSpace X₁] variable {X : Type u} [TopologicalSpace X] [NormalSpace X] {s : Set X} (hs : IsClosed s) variable {e : X₁ β†’ X} (he : ClosedEmbedding e) variable {Y : Type v} [TopologicalSpace Y] [TietzeExtension.{u, v} Y] theorem ContinuousMap.exists_restrict_eq (f : C(s, Y)) : βˆƒ (g : C(X, Y)), g.restrict s = f := TietzeExtension.exists_restrict_eq' s hs f #align continuous_map.exists_restrict_eq_of_closed ContinuousMap.exists_restrict_eq theorem ContinuousMap.exists_extension (f : C(X₁, Y)) : βˆƒ (g : C(X, Y)), g.comp ⟨e, he.continuous⟩ = f := by let e' : X₁ β‰ƒβ‚œ Set.range e := Homeomorph.ofEmbedding _ he.toEmbedding obtain ⟨g, hg⟩ := (f.comp e'.symm).exists_restrict_eq he.isClosed_range exact ⟨g, by ext x; simpa using congr($(hg) ⟨e' x, x, rfl⟩)⟩ theorem ContinuousMap.exists_extension' (f : C(X₁, Y)) : βˆƒ (g : C(X, Y)), g ∘ e = f := f.exists_extension he |>.imp fun g hg ↦ by ext x; congrm($(hg) x) #align continuous_map.exists_extension_of_closed_embedding ContinuousMap.exists_extension'
Mathlib/Topology/TietzeExtension.lean
96
100
theorem ContinuousMap.exists_forall_mem_restrict_eq {Y : Type v} [TopologicalSpace Y] (f : C(s, Y)) {t : Set Y} (hf : βˆ€ x, f x ∈ t) [ht : TietzeExtension.{u, v} t] : βˆƒ (g : C(X, Y)), (βˆ€ x, g x ∈ t) ∧ g.restrict s = f := by
obtain ⟨g, hg⟩ := mk _ (map_continuous f |>.codRestrict hf) |>.exists_restrict_eq hs exact ⟨comp ⟨Subtype.val, by continuity⟩ g, by simp, by ext x; congrm(($(hg) x : Y))⟩
1,770
import Mathlib.Analysis.SpecificLimits.Basic import Mathlib.Order.Interval.Set.IsoIoo import Mathlib.Topology.Order.MonotoneContinuity import Mathlib.Topology.UrysohnsBounded #align_import topology.tietze_extension from "leanprover-community/mathlib"@"f2ce6086713c78a7f880485f7917ea547a215982" section TietzeExtensionClass universe u u₁ uβ‚‚ v w -- TODO: define *absolute retracts* and then prove they satisfy Tietze extension. -- Then make instances of that instead and remove this class. class TietzeExtension (Y : Type v) [TopologicalSpace Y] : Prop where exists_restrict_eq' {X : Type u} [TopologicalSpace X] [NormalSpace X] (s : Set X) (hs : IsClosed s) (f : C(s, Y)) : βˆƒ (g : C(X, Y)), g.restrict s = f variable {X₁ : Type u₁} [TopologicalSpace X₁] variable {X : Type u} [TopologicalSpace X] [NormalSpace X] {s : Set X} (hs : IsClosed s) variable {e : X₁ β†’ X} (he : ClosedEmbedding e) variable {Y : Type v} [TopologicalSpace Y] [TietzeExtension.{u, v} Y] theorem ContinuousMap.exists_restrict_eq (f : C(s, Y)) : βˆƒ (g : C(X, Y)), g.restrict s = f := TietzeExtension.exists_restrict_eq' s hs f #align continuous_map.exists_restrict_eq_of_closed ContinuousMap.exists_restrict_eq theorem ContinuousMap.exists_extension (f : C(X₁, Y)) : βˆƒ (g : C(X, Y)), g.comp ⟨e, he.continuous⟩ = f := by let e' : X₁ β‰ƒβ‚œ Set.range e := Homeomorph.ofEmbedding _ he.toEmbedding obtain ⟨g, hg⟩ := (f.comp e'.symm).exists_restrict_eq he.isClosed_range exact ⟨g, by ext x; simpa using congr($(hg) ⟨e' x, x, rfl⟩)⟩ theorem ContinuousMap.exists_extension' (f : C(X₁, Y)) : βˆƒ (g : C(X, Y)), g ∘ e = f := f.exists_extension he |>.imp fun g hg ↦ by ext x; congrm($(hg) x) #align continuous_map.exists_extension_of_closed_embedding ContinuousMap.exists_extension' theorem ContinuousMap.exists_forall_mem_restrict_eq {Y : Type v} [TopologicalSpace Y] (f : C(s, Y)) {t : Set Y} (hf : βˆ€ x, f x ∈ t) [ht : TietzeExtension.{u, v} t] : βˆƒ (g : C(X, Y)), (βˆ€ x, g x ∈ t) ∧ g.restrict s = f := by obtain ⟨g, hg⟩ := mk _ (map_continuous f |>.codRestrict hf) |>.exists_restrict_eq hs exact ⟨comp ⟨Subtype.val, by continuity⟩ g, by simp, by ext x; congrm(($(hg) x : Y))⟩
Mathlib/Topology/TietzeExtension.lean
108
112
theorem ContinuousMap.exists_extension_forall_mem {Y : Type v} [TopologicalSpace Y] (f : C(X₁, Y)) {t : Set Y} (hf : βˆ€ x, f x ∈ t) [ht : TietzeExtension.{u, v} t] : βˆƒ (g : C(X, Y)), (βˆ€ x, g x ∈ t) ∧ g.comp ⟨e, he.continuous⟩ = f := by
obtain ⟨g, hg⟩ := mk _ (map_continuous f |>.codRestrict hf) |>.exists_extension he exact ⟨comp ⟨Subtype.val, by continuity⟩ g, by simp, by ext x; congrm(($(hg) x : Y))⟩
1,770