analysis.calculus.bump_function_findim
⟷
Mathlib.Analysis.Calculus.BumpFunction.FiniteDimension
The following section lists changes to this file in mathlib3 and mathlib4 that occured after the initial port. Most recent changes are shown first. Hovering over a commit will show all commits associated with the same mathlib3 commit.
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(last sync)
mathlib commit https://github.com/leanprover-community/mathlib/commit/65a1391a0106c9204fe45bc73a039f056558cb83
@@ -3,7 +3,7 @@ Copyright (c) 2022 Sébastien Gouëzel. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Sébastien Gouëzel
-/
-import Analysis.Calculus.Series
+import Analysis.NormedSpace.FunctionSeries
import Analysis.Convolution
import Analysis.InnerProductSpace.EuclideanDist
import MeasureTheory.Measure.Haar.NormedSpace
mathlib commit https://github.com/leanprover-community/mathlib/commit/65a1391a0106c9204fe45bc73a039f056558cb83
@@ -59,7 +59,7 @@ theorem exists_smooth_tsupport_subset {s : Set E} {x : E} (hs : s ∈ 𝓝 x) :
intro y hy
have : toEuclidean y ∈ Function.support c := by
simpa only [f, Function.mem_support, Function.comp_apply, Ne.def] using hy
- rwa [c.support_eq] at this
+ rwa [c.support_eq] at this
have f_tsupp : tsupport f ⊆ Euclidean.closedBall x d :=
by
rw [tsupport, ← Euclidean.closure_ball _ d_pos.ne']
@@ -118,8 +118,8 @@ theorem IsOpen.exists_smooth_support_eq {s : Set E} (hs : IsOpen s) :
by
apply countable.exists_eq_range T_count
rcases eq_empty_or_nonempty T with (rfl | hT)
- · simp only [Union_false, Union_empty] at hT
- simp only [← hT, not_nonempty_empty] at h's
+ · simp only [Union_false, Union_empty] at hT
+ simp only [← hT, not_nonempty_empty] at h's
exact h's.elim
· exact hT
let g : ℕ → E → ℝ := fun n => (g0 n).1
@@ -127,12 +127,12 @@ theorem IsOpen.exists_smooth_support_eq {s : Set E} (hs : IsOpen s) :
have s_g : ∀ x ∈ s, ∃ n, x ∈ support (g n) :=
by
intro x hx
- rw [← hT] at hx
+ rw [← hT] at hx
obtain ⟨i, iT, hi⟩ : ∃ (i : ι) (hi : i ∈ T), x ∈ support (i : E → ℝ) := by
simpa only [mem_Union] using hx
- rw [hg, mem_range] at iT
+ rw [hg, mem_range] at iT
rcases iT with ⟨n, hn⟩
- rw [← hn] at hi
+ rw [← hn] at hi
exact ⟨n, hi⟩
have g_smooth : ∀ n, ContDiff ℝ ⊤ (g n) := fun n => (g0 n).2.2.2.1
have g_comp_supp : ∀ n, HasCompactSupport (g n) := fun n => (g0 n).2.2.1
@@ -183,7 +183,7 @@ theorem IsOpen.exists_smooth_support_eq {s : Set E} (hs : IsOpen s) :
refine' ⟨fun x => ∑' n, (r n • g n) x, _, _, _⟩
· apply subset.antisymm
· intro x hx
- simp only [Pi.smul_apply, Algebra.id.smul_eq_mul, mem_support, Ne.def] at hx
+ simp only [Pi.smul_apply, Algebra.id.smul_eq_mul, mem_support, Ne.def] at hx
contrapose! hx
have : ∀ n, g n x = 0 := by
intro n
@@ -252,14 +252,14 @@ theorem u_exists :
· apply ne_of_gt
have : 0 < f x := by
apply lt_of_le_of_ne (B x).1 (Ne.symm _)
- rwa [← f_support] at hx
+ rwa [← f_support] at hx
linarith [(B (-x)).1]
· have I1 : x ∉ support f := by rwa [f_support]
have I2 : -x ∉ support f := by
rw [f_support]
- simp only at hx
+ simp only at hx
simpa using hx
- simp only [mem_support, Classical.not_not] at I1 I2
+ simp only [mem_support, Classical.not_not] at I1 I2
simp only [I1, I2, add_zero, zero_div]
· intro x; simp only [add_comm, neg_neg]
#align exists_cont_diff_bump_base.u_exists ExistsContDiffBumpBase.u_exists
@@ -435,7 +435,7 @@ theorem y_eq_one_of_mem_closedBall {D : ℝ} {x : E} (Dpos : 0 < D)
by
have C : ball x D ⊆ ball 0 1 := by
apply ball_subset_ball'
- simp only [mem_closed_ball] at hx
+ simp only [mem_closed_ball] at hx
linarith only [hx]
intro y hy
simp only [φ, indicator, mem_closed_ball, ite_eq_left_iff, not_le, zero_ne_one]
@@ -460,7 +460,7 @@ theorem y_eq_zero_of_not_mem_ball {D : ℝ} {x : E} (Dpos : 0 < D) (hx : x ∉ b
have C : ball y D ⊆ ball 0 (1 + D) :=
by
apply ball_subset_ball'
- rw [← dist_zero_right] at h'y
+ rw [← dist_zero_right] at h'y
linarith only [h'y]
exact hx (C (mem_ball_comm.1 hy))
have Bx : φ x = 0 := B _ (mem_ball_self Dpos)
@@ -499,7 +499,7 @@ theorem y_le_one {D : ℝ} (x : E) (Dpos : 0 < D) : y D x ≤ 1 :=
theorem y_pos_of_mem_ball {D : ℝ} {x : E} (Dpos : 0 < D) (D_lt_one : D < 1)
(hx : x ∈ ball (0 : E) (1 + D)) : 0 < y D x :=
by
- simp only [mem_ball_zero_iff] at hx
+ simp only [mem_ball_zero_iff] at hx
refine' (integral_pos_iff_support_of_nonneg (W_mul_φ_nonneg D x) _).2 _
· have F_comp : HasCompactSupport (W D) := W_compact_support E Dpos
have B : locally_integrable (φ : E → ℝ) μ :=
@@ -537,7 +537,7 @@ theorem y_pos_of_mem_ball {D : ℝ} {x : E} (Dpos : 0 < D) (D_lt_one : D < 1)
apply closed_ball_subset_closed_ball' _ (ball_subset_closed_ball hy)
rw [← one_smul ℝ x, dist_eq_norm, hz, ← sub_smul, one_smul, norm_smul, ID]
simp only [-one_div, -mul_eq_zero, B.ne', div_le_iff B, field_simps]
- simp only [mem_ball_zero_iff] at hx
+ simp only [mem_ball_zero_iff] at hx
nlinarith only [hx, D_lt_one]
apply lt_of_lt_of_le _ (measure_mono C)
apply measure_ball_pos
@@ -560,7 +560,7 @@ theorem y_smooth : ContDiffOn ℝ ⊤ (uncurry y) (Ioo (0 : ℝ) 1 ×ˢ (univ :
contrapose! hx
have : p⁻¹ • x ∈ support u := mem_support.2 hx
simp only [u_support, norm_smul, mem_ball_zero_iff, Real.norm_eq_abs, abs_inv,
- abs_of_nonneg hp.1.le, ← div_eq_inv_mul, div_lt_one hp.1] at this
+ abs_of_nonneg hp.1.le, ← div_eq_inv_mul, div_lt_one hp.1] at this
rw [mem_closedBall_zero_iff]
exact this.le.trans hp.2.le
· exact (locally_integrable_const _).indicator measurableSet_closedBall
mathlib commit https://github.com/leanprover-community/mathlib/commit/65a1391a0106c9204fe45bc73a039f056558cb83
@@ -177,7 +177,7 @@ theorem IsOpen.exists_smooth_support_eq {s : Set E} (hs : IsOpen s) :
have S : ∀ x, Summable fun n => (r n • g n) x :=
by
intro x
- refine' summable_of_nnnorm_bounded _ δc.summable fun n => _
+ refine' Summable.of_nnnorm_bounded _ δc.summable fun n => _
rw [← NNReal.coe_le_coe, coe_nnnorm]
simpa only [norm_iteratedFDeriv_zero] using hr n 0 (zero_le n) x
refine' ⟨fun x => ∑' n, (r n • g n) x, _, _, _⟩
mathlib commit https://github.com/leanprover-community/mathlib/commit/b1abe23ae96fef89ad30d9f4362c307f72a55010
@@ -516,7 +516,8 @@ theorem y_pos_of_mem_ball {D : ℝ} {x : E} (Dpos : 0 < D) (D_lt_one : D < 1)
intro y hy
simp only [support_mul, W_support E Dpos]
simp only [φ, mem_inter_iff, mem_support, Ne.def, indicator_apply_eq_zero,
- mem_closedBall_zero_iff, one_ne_zero, not_forall, not_false_iff, exists_prop, and_true_iff]
+ mem_closedBall_zero_iff, one_ne_zero, Classical.not_forall, not_false_iff, exists_prop,
+ and_true_iff]
constructor
· apply ball_subset_ball' _ hy
simp only [z, norm_smul, abs_of_nonneg Dpos.le, abs_of_nonneg B.le, dist_zero_right,
mathlib commit https://github.com/leanprover-community/mathlib/commit/ce64cd319bb6b3e82f31c2d38e79080d377be451
@@ -3,11 +3,11 @@ Copyright (c) 2022 Sébastien Gouëzel. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Sébastien Gouëzel
-/
-import Mathbin.Analysis.Calculus.Series
-import Mathbin.Analysis.Convolution
-import Mathbin.Analysis.InnerProductSpace.EuclideanDist
-import Mathbin.MeasureTheory.Measure.Haar.NormedSpace
-import Mathbin.Data.Set.Pointwise.Support
+import Analysis.Calculus.Series
+import Analysis.Convolution
+import Analysis.InnerProductSpace.EuclideanDist
+import MeasureTheory.Measure.Haar.NormedSpace
+import Data.Set.Pointwise.Support
#align_import analysis.calculus.bump_function_findim from "leanprover-community/mathlib"@"fdc286cc6967a012f41b87f76dcd2797b53152af"
mathlib commit https://github.com/leanprover-community/mathlib/commit/8ea5598db6caeddde6cb734aa179cc2408dbd345
@@ -2,11 +2,6 @@
Copyright (c) 2022 Sébastien Gouëzel. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Sébastien Gouëzel
-
-! This file was ported from Lean 3 source module analysis.calculus.bump_function_findim
-! leanprover-community/mathlib commit fdc286cc6967a012f41b87f76dcd2797b53152af
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
-/
import Mathbin.Analysis.Calculus.Series
import Mathbin.Analysis.Convolution
@@ -14,6 +9,8 @@ import Mathbin.Analysis.InnerProductSpace.EuclideanDist
import Mathbin.MeasureTheory.Measure.Haar.NormedSpace
import Mathbin.Data.Set.Pointwise.Support
+#align_import analysis.calculus.bump_function_findim from "leanprover-community/mathlib"@"fdc286cc6967a012f41b87f76dcd2797b53152af"
+
/-!
# Bump functions in finite-dimensional vector spaces
mathlib commit https://github.com/leanprover-community/mathlib/commit/fdc286cc6967a012f41b87f76dcd2797b53152af
@@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
Authors: Sébastien Gouëzel
! This file was ported from Lean 3 source module analysis.calculus.bump_function_findim
-! leanprover-community/mathlib commit fd5edc43dc4f10b85abfe544b88f82cf13c5f844
+! leanprover-community/mathlib commit fdc286cc6967a012f41b87f76dcd2797b53152af
! Please do not edit these lines, except to modify the commit id
! if you have ported upstream changes.
-/
@@ -17,6 +17,9 @@ import Mathbin.Data.Set.Pointwise.Support
/-!
# Bump functions in finite-dimensional vector spaces
+> THIS FILE IS SYNCHRONIZED WITH MATHLIB4.
+> Any changes to this file require a corresponding PR to mathlib4.
+
Let `E` be a finite-dimensional real normed vector space. We show that any open set `s` in `E` is
exactly the support of a smooth function taking values in `[0, 1]`,
in `is_open.exists_smooth_support_eq`.
mathlib commit https://github.com/leanprover-community/mathlib/commit/d30d31261cdb4d2f5e612eabc3c4bf45556350d5
@@ -39,6 +39,7 @@ section
variable [NormedSpace ℝ E] [FiniteDimensional ℝ E]
+#print exists_smooth_tsupport_subset /-
/-- If a set `s` is a neighborhood of `x`, then there exists a smooth function `f` taking
values in `[0, 1]`, supported in `s` and with `f x = 1`. -/
theorem exists_smooth_tsupport_subset {s : Set E} {x : E} (hs : s ∈ 𝓝 x) :
@@ -77,7 +78,9 @@ theorem exists_smooth_tsupport_subset {s : Set E} {x : E} (hs : s ∈ 𝓝 x) :
apply mem_closed_ball_self
exact (half_pos d_pos).le
#align exists_smooth_tsupport_subset exists_smooth_tsupport_subset
+-/
+#print IsOpen.exists_smooth_support_eq /-
/-- Given an open set `s` in a finite-dimensional real normed vector space, there exists a smooth
function with values in `[0, 1]` whose support is exactly `s`. -/
theorem IsOpen.exists_smooth_support_eq {s : Set E} (hs : IsOpen s) :
@@ -207,6 +210,7 @@ theorem IsOpen.exists_smooth_support_eq {s : Set E} (hs : IsOpen s) :
apply (le_abs_self _).trans
simpa only [norm_iteratedFDeriv_zero] using hr n 0 (zero_le n) y
#align is_open.exists_smooth_support_eq IsOpen.exists_smooth_support_eq
+-/
end
@@ -214,11 +218,13 @@ section
namespace ExistsContDiffBumpBase
+#print ExistsContDiffBumpBase.φ /-
/-- An auxiliary function to construct partitions of unity on finite-dimensional real vector spaces.
It is the characteristic function of the closed unit ball. -/
def φ : E → ℝ :=
(closedBall (0 : E) 1).indicator fun y => (1 : ℝ)
#align exists_cont_diff_bump_base.φ ExistsContDiffBumpBase.φ
+-/
variable [NormedSpace ℝ E] [FiniteDimensional ℝ E]
@@ -226,6 +232,7 @@ section HelperDefinitions
variable (E)
+#print ExistsContDiffBumpBase.u_exists /-
theorem u_exists :
∃ u : E → ℝ,
ContDiff ℝ ⊤ u ∧ (∀ x, u x ∈ Icc (0 : ℝ) 1) ∧ support u = ball 0 1 ∧ ∀ x, u (-x) = u x :=
@@ -256,48 +263,65 @@ theorem u_exists :
simp only [I1, I2, add_zero, zero_div]
· intro x; simp only [add_comm, neg_neg]
#align exists_cont_diff_bump_base.u_exists ExistsContDiffBumpBase.u_exists
+-/
variable {E}
+#print ExistsContDiffBumpBase.u /-
/-- An auxiliary function to construct partitions of unity on finite-dimensional real vector spaces,
which is smooth, symmetric, and with support equal to the unit ball. -/
def u (x : E) : ℝ :=
Classical.choose (u_exists E) x
#align exists_cont_diff_bump_base.u ExistsContDiffBumpBase.u
+-/
variable (E)
+#print ExistsContDiffBumpBase.u_smooth /-
theorem u_smooth : ContDiff ℝ ⊤ (u : E → ℝ) :=
(Classical.choose_spec (u_exists E)).1
#align exists_cont_diff_bump_base.u_smooth ExistsContDiffBumpBase.u_smooth
+-/
+#print ExistsContDiffBumpBase.u_continuous /-
theorem u_continuous : Continuous (u : E → ℝ) :=
(u_smooth E).Continuous
#align exists_cont_diff_bump_base.u_continuous ExistsContDiffBumpBase.u_continuous
+-/
+#print ExistsContDiffBumpBase.u_support /-
theorem u_support : support (u : E → ℝ) = ball 0 1 :=
(Classical.choose_spec (u_exists E)).2.2.1
#align exists_cont_diff_bump_base.u_support ExistsContDiffBumpBase.u_support
+-/
+#print ExistsContDiffBumpBase.u_compact_support /-
theorem u_compact_support : HasCompactSupport (u : E → ℝ) :=
by
rw [hasCompactSupport_def, u_support, closure_ball (0 : E) one_ne_zero]
exact is_compact_closed_ball _ _
#align exists_cont_diff_bump_base.u_compact_support ExistsContDiffBumpBase.u_compact_support
+-/
variable {E}
+#print ExistsContDiffBumpBase.u_nonneg /-
theorem u_nonneg (x : E) : 0 ≤ u x :=
((Classical.choose_spec (u_exists E)).2.1 x).1
#align exists_cont_diff_bump_base.u_nonneg ExistsContDiffBumpBase.u_nonneg
+-/
+#print ExistsContDiffBumpBase.u_le_one /-
theorem u_le_one (x : E) : u x ≤ 1 :=
((Classical.choose_spec (u_exists E)).2.1 x).2
#align exists_cont_diff_bump_base.u_le_one ExistsContDiffBumpBase.u_le_one
+-/
+#print ExistsContDiffBumpBase.u_neg /-
theorem u_neg (x : E) : u (-x) = u x :=
(Classical.choose_spec (u_exists E)).2.2.2 x
#align exists_cont_diff_bump_base.u_neg ExistsContDiffBumpBase.u_neg
+-/
variable [MeasurableSpace E] [BorelSpace E]
@@ -305,26 +329,33 @@ local notation "μ" => MeasureTheory.Measure.addHaar
variable (E)
+#print ExistsContDiffBumpBase.u_int_pos /-
theorem u_int_pos : 0 < ∫ x : E, u x ∂μ :=
by
refine' (integral_pos_iff_support_of_nonneg u_nonneg _).mpr _
· exact (u_continuous E).integrable_of_hasCompactSupport (u_compact_support E)
· rw [u_support]; exact measure_ball_pos _ _ zero_lt_one
#align exists_cont_diff_bump_base.u_int_pos ExistsContDiffBumpBase.u_int_pos
+-/
variable {E}
+#print ExistsContDiffBumpBase.w /-
/-- An auxiliary function to construct partitions of unity on finite-dimensional real vector spaces,
which is smooth, symmetric, with support equal to the ball of radius `D` and integral `1`. -/
def w (D : ℝ) (x : E) : ℝ :=
((∫ x : E, u x ∂μ) * |D| ^ finrank ℝ E)⁻¹ • u (D⁻¹ • x)
#align exists_cont_diff_bump_base.W ExistsContDiffBumpBase.w
+-/
+#print ExistsContDiffBumpBase.w_def /-
theorem w_def (D : ℝ) :
(w D : E → ℝ) = fun x => ((∫ x : E, u x ∂μ) * |D| ^ finrank ℝ E)⁻¹ • u (D⁻¹ • x) := by ext1 x;
rfl
#align exists_cont_diff_bump_base.W_def ExistsContDiffBumpBase.w_def
+-/
+#print ExistsContDiffBumpBase.w_nonneg /-
theorem w_nonneg (D : ℝ) (x : E) : 0 ≤ w D x :=
by
apply mul_nonneg _ (u_nonneg _)
@@ -332,20 +363,26 @@ theorem w_nonneg (D : ℝ) (x : E) : 0 ≤ w D x :=
apply mul_nonneg (u_int_pos E).le
apply pow_nonneg (abs_nonneg D)
#align exists_cont_diff_bump_base.W_nonneg ExistsContDiffBumpBase.w_nonneg
+-/
+#print ExistsContDiffBumpBase.w_mul_φ_nonneg /-
theorem w_mul_φ_nonneg (D : ℝ) (x y : E) : 0 ≤ w D y * φ (x - y) :=
mul_nonneg (w_nonneg D y) (indicator_nonneg (by simp only [zero_le_one, imp_true_iff]) _)
#align exists_cont_diff_bump_base.W_mul_φ_nonneg ExistsContDiffBumpBase.w_mul_φ_nonneg
+-/
variable (E)
+#print ExistsContDiffBumpBase.w_integral /-
theorem w_integral {D : ℝ} (Dpos : 0 < D) : ∫ x : E, w D x ∂μ = 1 :=
by
simp_rw [W, integral_smul]
rw [integral_comp_inv_smul_of_nonneg μ (u : E → ℝ) Dpos.le, abs_of_nonneg Dpos.le, mul_comm]
field_simp [Dpos.ne', (u_int_pos E).ne']
#align exists_cont_diff_bump_base.W_integral ExistsContDiffBumpBase.w_integral
+-/
+#print ExistsContDiffBumpBase.w_support /-
theorem w_support {D : ℝ} (Dpos : 0 < D) : support (w D : E → ℝ) = ball 0 D :=
by
have B : D • ball (0 : E) 1 = ball 0 D := by
@@ -355,15 +392,19 @@ theorem w_support {D : ℝ} (Dpos : 0 < D) : support (w D : E → ℝ) = ball 0
support_comp_inv_smul₀ Dpos.ne', u_support, B, support_const (u_int_pos E).ne', support_const C,
abs_of_nonneg Dpos.le]
#align exists_cont_diff_bump_base.W_support ExistsContDiffBumpBase.w_support
+-/
+#print ExistsContDiffBumpBase.w_compact_support /-
theorem w_compact_support {D : ℝ} (Dpos : 0 < D) : HasCompactSupport (w D : E → ℝ) :=
by
rw [hasCompactSupport_def, W_support E Dpos, closure_ball (0 : E) Dpos.ne']
exact is_compact_closed_ball _ _
#align exists_cont_diff_bump_base.W_compact_support ExistsContDiffBumpBase.w_compact_support
+-/
variable {E}
+#print ExistsContDiffBumpBase.y /-
/-- An auxiliary function to construct partitions of unity on finite-dimensional real vector spaces.
It is the convolution between a smooth function of integral `1` supported in the ball of radius `D`,
with the indicator function of the closed unit ball. Therefore, it is smooth, equal to `1` on the
@@ -371,7 +412,9 @@ ball of radius `1 - D`, with support equal to the ball of radius `1 + D`. -/
def y (D : ℝ) : E → ℝ :=
w D ⋆[lsmul ℝ ℝ, μ] φ
#align exists_cont_diff_bump_base.Y ExistsContDiffBumpBase.y
+-/
+#print ExistsContDiffBumpBase.y_neg /-
theorem y_neg (D : ℝ) (x : E) : y D (-x) = y D x :=
by
apply convolution_neg_of_neg_eq
@@ -381,7 +424,9 @@ theorem y_neg (D : ℝ) (x : E) : y D (-x) = y D x :=
· apply eventually_of_forall fun x => _
simp only [φ, indicator, mem_closedBall_zero_iff, norm_neg]
#align exists_cont_diff_bump_base.Y_neg ExistsContDiffBumpBase.y_neg
+-/
+#print ExistsContDiffBumpBase.y_eq_one_of_mem_closedBall /-
theorem y_eq_one_of_mem_closedBall {D : ℝ} {x : E} (Dpos : 0 < D)
(hx : x ∈ closedBall (0 : E) (1 - D)) : y D x = 1 :=
by
@@ -402,7 +447,9 @@ theorem y_eq_one_of_mem_closedBall {D : ℝ} {x : E} (Dpos : 0 < D)
simp only [lsmul_apply, Algebra.id.smul_eq_mul, integral_mul_right, W_integral E Dpos, Bx,
one_mul]
#align exists_cont_diff_bump_base.Y_eq_one_of_mem_closed_ball ExistsContDiffBumpBase.y_eq_one_of_mem_closedBall
+-/
+#print ExistsContDiffBumpBase.y_eq_zero_of_not_mem_ball /-
theorem y_eq_zero_of_not_mem_ball {D : ℝ} {x : E} (Dpos : 0 < D) (hx : x ∉ ball (0 : E) (1 + D)) :
y D x = 0 := by
change (W D ⋆[lsmul ℝ ℝ, μ] φ) x = 0
@@ -421,11 +468,15 @@ theorem y_eq_zero_of_not_mem_ball {D : ℝ} {x : E} (Dpos : 0 < D) (hx : x ∉ b
rw [convolution_eq_right' _ (le_of_eq (W_support E Dpos)) B']
simp only [lsmul_apply, Algebra.id.smul_eq_mul, Bx, MulZeroClass.mul_zero, integral_const]
#align exists_cont_diff_bump_base.Y_eq_zero_of_not_mem_ball ExistsContDiffBumpBase.y_eq_zero_of_not_mem_ball
+-/
+#print ExistsContDiffBumpBase.y_nonneg /-
theorem y_nonneg (D : ℝ) (x : E) : 0 ≤ y D x :=
integral_nonneg (w_mul_φ_nonneg D x)
#align exists_cont_diff_bump_base.Y_nonneg ExistsContDiffBumpBase.y_nonneg
+-/
+#print ExistsContDiffBumpBase.y_le_one /-
theorem y_le_one {D : ℝ} (x : E) (Dpos : 0 < D) : y D x ≤ 1 :=
by
have A : (W D ⋆[lsmul ℝ ℝ, μ] φ) x ≤ (W D ⋆[lsmul ℝ ℝ, μ] 1) x :=
@@ -442,7 +493,9 @@ theorem y_le_one {D : ℝ} (x : E) (Dpos : 0 < D) : y D x ≤ 1 :=
lsmul_apply, Algebra.id.smul_eq_mul, integral_mul_left, W_integral E Dpos, Pi.smul_apply]
exact A.trans (le_of_eq B)
#align exists_cont_diff_bump_base.Y_le_one ExistsContDiffBumpBase.y_le_one
+-/
+#print ExistsContDiffBumpBase.y_pos_of_mem_ball /-
theorem y_pos_of_mem_ball {D : ℝ} {x : E} (Dpos : 0 < D) (D_lt_one : D < 1)
(hx : x ∈ ball (0 : E) (1 + D)) : 0 < y D x :=
by
@@ -489,10 +542,12 @@ theorem y_pos_of_mem_ball {D : ℝ} {x : E} (Dpos : 0 < D) (D_lt_one : D < 1)
apply measure_ball_pos
exact div_pos (mul_pos Dpos (by linarith only [hx])) B
#align exists_cont_diff_bump_base.Y_pos_of_mem_ball ExistsContDiffBumpBase.y_pos_of_mem_ball
+-/
variable (E)
/- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
+#print ExistsContDiffBumpBase.y_smooth /-
theorem y_smooth : ContDiffOn ℝ ⊤ (uncurry y) (Ioo (0 : ℝ) 1 ×ˢ (univ : Set E)) :=
by
have hs : IsOpen (Ioo (0 : ℝ) (1 : ℝ)) := isOpen_Ioo
@@ -520,13 +575,16 @@ theorem y_smooth : ContDiffOn ℝ ⊤ (uncurry y) (Ioo (0 : ℝ) 1 ×ˢ (univ :
· apply (u_smooth E).comp_contDiffOn
exact ContDiffOn.smul (cont_diff_on_fst.inv fun x hx => ne_of_gt hx.1.1) contDiffOn_snd
#align exists_cont_diff_bump_base.Y_smooth ExistsContDiffBumpBase.y_smooth
+-/
+#print ExistsContDiffBumpBase.y_support /-
theorem y_support {D : ℝ} (Dpos : 0 < D) (D_lt_one : D < 1) :
support (y D : E → ℝ) = ball (0 : E) (1 + D) :=
support_eq_iff.2
⟨fun x hx => (y_pos_of_mem_ball Dpos D_lt_one hx).ne', fun x hx =>
y_eq_zero_of_not_mem_ball Dpos hx⟩
#align exists_cont_diff_bump_base.Y_support ExistsContDiffBumpBase.y_support
+-/
variable {E}
mathlib commit https://github.com/leanprover-community/mathlib/commit/9fb8964792b4237dac6200193a0d533f1b3f7423
@@ -301,7 +301,6 @@ theorem u_neg (x : E) : u (-x) = u x :=
variable [MeasurableSpace E] [BorelSpace E]
--- mathport name: exprμ
local notation "μ" => MeasureTheory.Measure.addHaar
variable (E)
mathlib commit https://github.com/leanprover-community/mathlib/commit/a3e83f0fa4391c8740f7d773a7a9b74e311ae2a3
@@ -340,7 +340,7 @@ theorem w_mul_φ_nonneg (D : ℝ) (x y : E) : 0 ≤ w D y * φ (x - y) :=
variable (E)
-theorem w_integral {D : ℝ} (Dpos : 0 < D) : (∫ x : E, w D x ∂μ) = 1 :=
+theorem w_integral {D : ℝ} (Dpos : 0 < D) : ∫ x : E, w D x ∂μ = 1 :=
by
simp_rw [W, integral_smul]
rw [integral_comp_inv_smul_of_nonneg μ (u : E → ℝ) Dpos.le, abs_of_nonneg Dpos.le, mul_comm]
mathlib commit https://github.com/leanprover-community/mathlib/commit/7e5137f579de09a059a5ce98f364a04e221aabf0
@@ -170,7 +170,6 @@ theorem IsOpen.exists_smooth_support_eq {s : Set E} (hs : IsOpen s) :
positivity
_ ≤ M⁻¹ * δ n * M := (mul_le_mul_of_nonneg_left ((hR i x).trans (IR i hi)) (by positivity))
_ = δ n := by field_simp [M_pos.ne']
-
choose r rpos hr using this
have S : ∀ x, Summable fun n => (r n • g n) x :=
by
@@ -589,7 +588,6 @@ instance (priority := 100) {E : Type _} [NormedAddCommGroup E] [NormedSpace ℝ
2 / (R + 1) * ‖x‖ ≤ 2 / (R + 1) * 1 :=
mul_le_mul_of_nonneg_left hx (div_nonneg zero_le_two A.le)
_ = 1 - (R - 1) / (R + 1) := by field_simp [A.ne']; ring
-
support := fun R hR => by
have A : 0 < (R + 1) / 2 := by linarith
have A' : 0 < R + 1 := by linarith
mathlib commit https://github.com/leanprover-community/mathlib/commit/58a272265b5e05f258161260dd2c5d247213cbd3
@@ -49,9 +49,9 @@ theorem exists_smooth_tsupport_subset {s : Set E} {x : E} (hs : s ∈ 𝓝 x) :
exact euclidean.nhds_basis_closed_ball.mem_iff.1 hs
let c : ContDiffBump (toEuclidean x) :=
{ R := d / 2
- r := d
- r_pos := half_pos d_pos
- r_lt_r := half_lt_self d_pos }
+ rOut := d
+ rIn_pos := half_pos d_pos
+ rIn_lt_rOut := half_lt_self d_pos }
let f : E → ℝ := c ∘ toEuclidean
have f_supp : f.support ⊆ Euclidean.ball x d :=
by
mathlib commit https://github.com/leanprover-community/mathlib/commit/cca40788df1b8755d5baf17ab2f27dacc2e17acb
@@ -28,8 +28,8 @@ the indicator function of `closed_ball 0 1` with a function as above with `s = b
noncomputable section
-open
- Set Metric TopologicalSpace Function Asymptotics MeasureTheory FiniteDimensional ContinuousLinearMap Filter MeasureTheory.Measure
+open Set Metric TopologicalSpace Function Asymptotics MeasureTheory FiniteDimensional
+ ContinuousLinearMap Filter MeasureTheory.Measure
open scoped Pointwise Topology NNReal BigOperators convolution
@@ -45,7 +45,7 @@ theorem exists_smooth_tsupport_subset {s : Set E} {x : E} (hs : s ∈ 𝓝 x) :
∃ f : E → ℝ,
tsupport f ⊆ s ∧ HasCompactSupport f ∧ ContDiff ℝ ⊤ f ∧ range f ⊆ Icc 0 1 ∧ f x = 1 :=
by
- obtain ⟨d, d_pos, hd⟩ : ∃ (d : ℝ)(hr : 0 < d), Euclidean.closedBall x d ⊆ s
+ obtain ⟨d, d_pos, hd⟩ : ∃ (d : ℝ) (hr : 0 < d), Euclidean.closedBall x d ⊆ s
exact euclidean.nhds_basis_closed_ball.mem_iff.1 hs
let c : ContDiffBump (toEuclidean x) :=
{ R := d / 2
@@ -58,7 +58,7 @@ theorem exists_smooth_tsupport_subset {s : Set E} {x : E} (hs : s ∈ 𝓝 x) :
intro y hy
have : toEuclidean y ∈ Function.support c := by
simpa only [f, Function.mem_support, Function.comp_apply, Ne.def] using hy
- rwa [c.support_eq] at this
+ rwa [c.support_eq] at this
have f_tsupp : tsupport f ⊆ Euclidean.closedBall x d :=
by
rw [tsupport, ← Euclidean.closure_ball _ d_pos.ne']
@@ -115,8 +115,8 @@ theorem IsOpen.exists_smooth_support_eq {s : Set E} (hs : IsOpen s) :
by
apply countable.exists_eq_range T_count
rcases eq_empty_or_nonempty T with (rfl | hT)
- · simp only [Union_false, Union_empty] at hT
- simp only [← hT, not_nonempty_empty] at h's
+ · simp only [Union_false, Union_empty] at hT
+ simp only [← hT, not_nonempty_empty] at h's
exact h's.elim
· exact hT
let g : ℕ → E → ℝ := fun n => (g0 n).1
@@ -124,12 +124,12 @@ theorem IsOpen.exists_smooth_support_eq {s : Set E} (hs : IsOpen s) :
have s_g : ∀ x ∈ s, ∃ n, x ∈ support (g n) :=
by
intro x hx
- rw [← hT] at hx
- obtain ⟨i, iT, hi⟩ : ∃ (i : ι)(hi : i ∈ T), x ∈ support (i : E → ℝ) := by
+ rw [← hT] at hx
+ obtain ⟨i, iT, hi⟩ : ∃ (i : ι) (hi : i ∈ T), x ∈ support (i : E → ℝ) := by
simpa only [mem_Union] using hx
- rw [hg, mem_range] at iT
+ rw [hg, mem_range] at iT
rcases iT with ⟨n, hn⟩
- rw [← hn] at hi
+ rw [← hn] at hi
exact ⟨n, hi⟩
have g_smooth : ∀ n, ContDiff ℝ ⊤ (g n) := fun n => (g0 n).2.2.2.1
have g_comp_supp : ∀ n, HasCompactSupport (g n) := fun n => (g0 n).2.2.1
@@ -181,7 +181,7 @@ theorem IsOpen.exists_smooth_support_eq {s : Set E} (hs : IsOpen s) :
refine' ⟨fun x => ∑' n, (r n • g n) x, _, _, _⟩
· apply subset.antisymm
· intro x hx
- simp only [Pi.smul_apply, Algebra.id.smul_eq_mul, mem_support, Ne.def] at hx
+ simp only [Pi.smul_apply, Algebra.id.smul_eq_mul, mem_support, Ne.def] at hx
contrapose! hx
have : ∀ n, g n x = 0 := by
intro n
@@ -246,14 +246,14 @@ theorem u_exists :
· apply ne_of_gt
have : 0 < f x := by
apply lt_of_le_of_ne (B x).1 (Ne.symm _)
- rwa [← f_support] at hx
+ rwa [← f_support] at hx
linarith [(B (-x)).1]
· have I1 : x ∉ support f := by rwa [f_support]
have I2 : -x ∉ support f := by
rw [f_support]
- simp only at hx
+ simp only at hx
simpa using hx
- simp only [mem_support, Classical.not_not] at I1 I2
+ simp only [mem_support, Classical.not_not] at I1 I2
simp only [I1, I2, add_zero, zero_div]
· intro x; simp only [add_comm, neg_neg]
#align exists_cont_diff_bump_base.u_exists ExistsContDiffBumpBase.u_exists
@@ -392,7 +392,7 @@ theorem y_eq_one_of_mem_closedBall {D : ℝ} {x : E} (Dpos : 0 < D)
by
have C : ball x D ⊆ ball 0 1 := by
apply ball_subset_ball'
- simp only [mem_closed_ball] at hx
+ simp only [mem_closed_ball] at hx
linarith only [hx]
intro y hy
simp only [φ, indicator, mem_closed_ball, ite_eq_left_iff, not_le, zero_ne_one]
@@ -415,7 +415,7 @@ theorem y_eq_zero_of_not_mem_ball {D : ℝ} {x : E} (Dpos : 0 < D) (hx : x ∉ b
have C : ball y D ⊆ ball 0 (1 + D) :=
by
apply ball_subset_ball'
- rw [← dist_zero_right] at h'y
+ rw [← dist_zero_right] at h'y
linarith only [h'y]
exact hx (C (mem_ball_comm.1 hy))
have Bx : φ x = 0 := B _ (mem_ball_self Dpos)
@@ -448,7 +448,7 @@ theorem y_le_one {D : ℝ} (x : E) (Dpos : 0 < D) : y D x ≤ 1 :=
theorem y_pos_of_mem_ball {D : ℝ} {x : E} (Dpos : 0 < D) (D_lt_one : D < 1)
(hx : x ∈ ball (0 : E) (1 + D)) : 0 < y D x :=
by
- simp only [mem_ball_zero_iff] at hx
+ simp only [mem_ball_zero_iff] at hx
refine' (integral_pos_iff_support_of_nonneg (W_mul_φ_nonneg D x) _).2 _
· have F_comp : HasCompactSupport (W D) := W_compact_support E Dpos
have B : locally_integrable (φ : E → ℝ) μ :=
@@ -485,7 +485,7 @@ theorem y_pos_of_mem_ball {D : ℝ} {x : E} (Dpos : 0 < D) (D_lt_one : D < 1)
apply closed_ball_subset_closed_ball' _ (ball_subset_closed_ball hy)
rw [← one_smul ℝ x, dist_eq_norm, hz, ← sub_smul, one_smul, norm_smul, ID]
simp only [-one_div, -mul_eq_zero, B.ne', div_le_iff B, field_simps]
- simp only [mem_ball_zero_iff] at hx
+ simp only [mem_ball_zero_iff] at hx
nlinarith only [hx, D_lt_one]
apply lt_of_lt_of_le _ (measure_mono C)
apply measure_ball_pos
@@ -506,7 +506,7 @@ theorem y_smooth : ContDiffOn ℝ ⊤ (uncurry y) (Ioo (0 : ℝ) 1 ×ˢ (univ :
contrapose! hx
have : p⁻¹ • x ∈ support u := mem_support.2 hx
simp only [u_support, norm_smul, mem_ball_zero_iff, Real.norm_eq_abs, abs_inv,
- abs_of_nonneg hp.1.le, ← div_eq_inv_mul, div_lt_one hp.1] at this
+ abs_of_nonneg hp.1.le, ← div_eq_inv_mul, div_lt_one hp.1] at this
rw [mem_closedBall_zero_iff]
exact this.le.trans hp.2.le
· exact (locally_integrable_const _).indicator measurableSet_closedBall
@@ -588,7 +588,7 @@ instance (priority := 100) {E : Type _} [NormedAddCommGroup E] [NormedSpace ℝ
calc
2 / (R + 1) * ‖x‖ ≤ 2 / (R + 1) * 1 :=
mul_le_mul_of_nonneg_left hx (div_nonneg zero_le_two A.le)
- _ = 1 - (R - 1) / (R + 1) := by field_simp [A.ne'] ; ring
+ _ = 1 - (R - 1) / (R + 1) := by field_simp [A.ne']; ring
support := fun R hR => by
have A : 0 < (R + 1) / 2 := by linarith
mathlib commit https://github.com/leanprover-community/mathlib/commit/cca40788df1b8755d5baf17ab2f27dacc2e17acb
@@ -137,18 +137,18 @@ theorem IsOpen.exists_smooth_support_eq {s : Set E} (hs : IsOpen s) :
obtain ⟨δ, δpos, c, δc, c_lt⟩ :
∃ δ : ℕ → ℝ≥0, (∀ i : ℕ, 0 < δ i) ∧ ∃ c : NNReal, HasSum δ c ∧ c < 1
exact NNReal.exists_pos_sum_of_countable one_ne_zero ℕ
- have : ∀ n : ℕ, ∃ r : ℝ, 0 < r ∧ ∀ i ≤ n, ∀ x, ‖iteratedFderiv ℝ i (r • g n) x‖ ≤ δ n :=
+ have : ∀ n : ℕ, ∃ r : ℝ, 0 < r ∧ ∀ i ≤ n, ∀ x, ‖iteratedFDeriv ℝ i (r • g n) x‖ ≤ δ n :=
by
intro n
- have : ∀ i, ∃ R, ∀ x, ‖iteratedFderiv ℝ i (fun x => g n x) x‖ ≤ R :=
+ have : ∀ i, ∃ R, ∀ x, ‖iteratedFDeriv ℝ i (fun x => g n x) x‖ ≤ R :=
by
intro i
- have : BddAbove (range fun x => ‖iteratedFderiv ℝ i (fun x : E => g n x) x‖) :=
+ have : BddAbove (range fun x => ‖iteratedFDeriv ℝ i (fun x : E => g n x) x‖) :=
by
apply
- ((g_smooth n).continuous_iteratedFderiv le_top).norm.bddAbove_range_of_hasCompactSupport
+ ((g_smooth n).continuous_iteratedFDeriv le_top).norm.bddAbove_range_of_hasCompactSupport
apply HasCompactSupport.comp_left _ norm_zero
- apply (g_comp_supp n).iteratedFderiv
+ apply (g_comp_supp n).iteratedFDeriv
rcases this with ⟨R, hR⟩
exact ⟨R, fun x => hR (mem_range_self _)⟩
choose R hR using this
@@ -164,9 +164,9 @@ theorem IsOpen.exists_smooth_support_eq {s : Set E} (hs : IsOpen s) :
linarith
refine' ⟨M⁻¹ * δ n, by positivity, fun i hi x => _⟩
calc
- ‖iteratedFderiv ℝ i ((M⁻¹ * δ n) • g n) x‖ = ‖(M⁻¹ * δ n) • iteratedFderiv ℝ i (g n) x‖ := by
- rw [iteratedFderiv_const_smul_apply]; exact (g_smooth n).of_le le_top
- _ = M⁻¹ * δ n * ‖iteratedFderiv ℝ i (g n) x‖ := by rw [norm_smul, Real.norm_of_nonneg];
+ ‖iteratedFDeriv ℝ i ((M⁻¹ * δ n) • g n) x‖ = ‖(M⁻¹ * δ n) • iteratedFDeriv ℝ i (g n) x‖ := by
+ rw [iteratedFDeriv_const_smul_apply]; exact (g_smooth n).of_le le_top
+ _ = M⁻¹ * δ n * ‖iteratedFDeriv ℝ i (g n) x‖ := by rw [norm_smul, Real.norm_of_nonneg];
positivity
_ ≤ M⁻¹ * δ n * M := (mul_le_mul_of_nonneg_left ((hR i x).trans (IR i hi)) (by positivity))
_ = δ n := by field_simp [M_pos.ne']
@@ -177,7 +177,7 @@ theorem IsOpen.exists_smooth_support_eq {s : Set E} (hs : IsOpen s) :
intro x
refine' summable_of_nnnorm_bounded _ δc.summable fun n => _
rw [← NNReal.coe_le_coe, coe_nnnorm]
- simpa only [norm_iteratedFderiv_zero] using hr n 0 (zero_le n) x
+ simpa only [norm_iteratedFDeriv_zero] using hr n 0 (zero_le n) x
refine' ⟨fun x => ∑' n, (r n • g n) x, _, _, _⟩
· apply subset.antisymm
· intro x hx
@@ -206,7 +206,7 @@ theorem IsOpen.exists_smooth_support_eq {s : Set E} (hs : IsOpen s) :
apply tsum_le_tsum _ (S y) A.summable
intro n
apply (le_abs_self _).trans
- simpa only [norm_iteratedFderiv_zero] using hr n 0 (zero_le n) y
+ simpa only [norm_iteratedFDeriv_zero] using hr n 0 (zero_le n) y
#align is_open.exists_smooth_support_eq IsOpen.exists_smooth_support_eq
end
mathlib commit https://github.com/leanprover-community/mathlib/commit/917c3c072e487b3cccdbfeff17e75b40e45f66cb
@@ -31,7 +31,7 @@ noncomputable section
open
Set Metric TopologicalSpace Function Asymptotics MeasureTheory FiniteDimensional ContinuousLinearMap Filter MeasureTheory.Measure
-open Pointwise Topology NNReal BigOperators convolution
+open scoped Pointwise Topology NNReal BigOperators convolution
variable {E : Type _} [NormedAddCommGroup E]
mathlib commit https://github.com/leanprover-community/mathlib/commit/917c3c072e487b3cccdbfeff17e75b40e45f66cb
@@ -164,13 +164,9 @@ theorem IsOpen.exists_smooth_support_eq {s : Set E} (hs : IsOpen s) :
linarith
refine' ⟨M⁻¹ * δ n, by positivity, fun i hi x => _⟩
calc
- ‖iteratedFderiv ℝ i ((M⁻¹ * δ n) • g n) x‖ = ‖(M⁻¹ * δ n) • iteratedFderiv ℝ i (g n) x‖ :=
- by
- rw [iteratedFderiv_const_smul_apply]
- exact (g_smooth n).of_le le_top
- _ = M⁻¹ * δ n * ‖iteratedFderiv ℝ i (g n) x‖ :=
- by
- rw [norm_smul, Real.norm_of_nonneg]
+ ‖iteratedFderiv ℝ i ((M⁻¹ * δ n) • g n) x‖ = ‖(M⁻¹ * δ n) • iteratedFderiv ℝ i (g n) x‖ := by
+ rw [iteratedFderiv_const_smul_apply]; exact (g_smooth n).of_le le_top
+ _ = M⁻¹ * δ n * ‖iteratedFderiv ℝ i (g n) x‖ := by rw [norm_smul, Real.norm_of_nonneg];
positivity
_ ≤ M⁻¹ * δ n * M := (mul_le_mul_of_nonneg_left ((hR i x).trans (IR i hi)) (by positivity))
_ = δ n := by field_simp [M_pos.ne']
@@ -193,8 +189,7 @@ theorem IsOpen.exists_smooth_support_eq {s : Set E} (hs : IsOpen s) :
exact g_s n hx
simp only [this, MulZeroClass.mul_zero, tsum_zero]
· intro x hx
- obtain ⟨n, hn⟩ : ∃ n, x ∈ support (g n)
- exact s_g x hx
+ obtain ⟨n, hn⟩ : ∃ n, x ∈ support (g n); exact s_g x hx
have I : 0 < r n * g n x := mul_pos (rpos n) (lt_of_le_of_ne (g_nonneg n x) (Ne.symm hn))
exact ne_of_gt (tsum_pos (S x) (fun i => mul_nonneg (rpos i).le (g_nonneg i x)) n I)
· refine'
@@ -260,8 +255,7 @@ theorem u_exists :
simpa using hx
simp only [mem_support, Classical.not_not] at I1 I2
simp only [I1, I2, add_zero, zero_div]
- · intro x
- simp only [add_comm, neg_neg]
+ · intro x; simp only [add_comm, neg_neg]
#align exists_cont_diff_bump_base.u_exists ExistsContDiffBumpBase.u_exists
variable {E}
@@ -317,8 +311,7 @@ theorem u_int_pos : 0 < ∫ x : E, u x ∂μ :=
by
refine' (integral_pos_iff_support_of_nonneg u_nonneg _).mpr _
· exact (u_continuous E).integrable_of_hasCompactSupport (u_compact_support E)
- · rw [u_support]
- exact measure_ball_pos _ _ zero_lt_one
+ · rw [u_support]; exact measure_ball_pos _ _ zero_lt_one
#align exists_cont_diff_bump_base.u_int_pos ExistsContDiffBumpBase.u_int_pos
variable {E}
@@ -330,9 +323,7 @@ def w (D : ℝ) (x : E) : ℝ :=
#align exists_cont_diff_bump_base.W ExistsContDiffBumpBase.w
theorem w_def (D : ℝ) :
- (w D : E → ℝ) = fun x => ((∫ x : E, u x ∂μ) * |D| ^ finrank ℝ E)⁻¹ • u (D⁻¹ • x) :=
- by
- ext1 x
+ (w D : E → ℝ) = fun x => ((∫ x : E, u x ∂μ) * |D| ^ finrank ℝ E)⁻¹ • u (D⁻¹ • x) := by ext1 x;
rfl
#align exists_cont_diff_bump_base.W_def ExistsContDiffBumpBase.w_def
@@ -408,9 +399,7 @@ theorem y_eq_one_of_mem_closedBall {D : ℝ} {x : E} (Dpos : 0 < D)
intro h'y
linarith only [mem_ball.1 (C hy), h'y]
have Bx : φ x = 1 := B _ (mem_ball_self Dpos)
- have B' : ∀ y, y ∈ ball x D → φ y = φ x := by
- rw [Bx]
- exact B
+ have B' : ∀ y, y ∈ ball x D → φ y = φ x := by rw [Bx]; exact B
rw [convolution_eq_right' _ (le_of_eq (W_support E Dpos)) B']
simp only [lsmul_apply, Algebra.id.smul_eq_mul, integral_mul_right, W_integral E Dpos, Bx,
one_mul]
@@ -430,9 +419,7 @@ theorem y_eq_zero_of_not_mem_ball {D : ℝ} {x : E} (Dpos : 0 < D) (hx : x ∉ b
linarith only [h'y]
exact hx (C (mem_ball_comm.1 hy))
have Bx : φ x = 0 := B _ (mem_ball_self Dpos)
- have B' : ∀ y, y ∈ ball x D → φ y = φ x := by
- rw [Bx]
- exact B
+ have B' : ∀ y, y ∈ ball x D → φ y = φ x := by rw [Bx]; exact B
rw [convolution_eq_right' _ (le_of_eq (W_support E Dpos)) B']
simp only [lsmul_apply, Algebra.id.smul_eq_mul, Bx, MulZeroClass.mul_zero, integral_const]
#align exists_cont_diff_bump_base.Y_eq_zero_of_not_mem_ball ExistsContDiffBumpBase.y_eq_zero_of_not_mem_ball
@@ -531,8 +518,7 @@ theorem y_smooth : ContDiffOn ℝ ⊤ (uncurry y) (Ioo (0 : ℝ) 1 ×ˢ (univ :
simp_rw [← Real.norm_eq_abs]
apply @ContDiffOn.norm ℝ
· exact contDiffOn_fst
- · intro x hx
- exact ne_of_gt hx.1.1
+ · intro x hx; exact ne_of_gt hx.1.1
· apply (u_smooth E).comp_contDiffOn
exact ContDiffOn.smul (cont_diff_on_fst.inv fun x hx => ne_of_gt hx.1.1) contDiffOn_snd
#align exists_cont_diff_bump_base.Y_smooth ExistsContDiffBumpBase.y_smooth
@@ -554,10 +540,7 @@ instance (priority := 100) {E : Type _} [NormedAddCommGroup E] [NormedSpace ℝ
by
refine' ⟨⟨_⟩⟩
borelize E
- have IR : ∀ R : ℝ, 1 < R → 0 < (R - 1) / (R + 1) :=
- by
- intro R hR
- apply div_pos <;> linarith
+ have IR : ∀ R : ℝ, 1 < R → 0 < (R - 1) / (R + 1) := by intro R hR; apply div_pos <;> linarith
exact
{ toFun := fun R x => if 1 < R then Y ((R - 1) / (R + 1)) (((R + 1) / 2)⁻¹ • x) else 0
mem_Icc := fun R x => by
@@ -605,9 +588,7 @@ instance (priority := 100) {E : Type _} [NormedAddCommGroup E] [NormedSpace ℝ
calc
2 / (R + 1) * ‖x‖ ≤ 2 / (R + 1) * 1 :=
mul_le_mul_of_nonneg_left hx (div_nonneg zero_le_two A.le)
- _ = 1 - (R - 1) / (R + 1) := by
- field_simp [A.ne']
- ring
+ _ = 1 - (R - 1) / (R + 1) := by field_simp [A.ne'] ; ring
support := fun R hR => by
have A : 0 < (R + 1) / 2 := by linarith
mathlib commit https://github.com/leanprover-community/mathlib/commit/f51de8769c34652d82d1c8e5f8f18f8374782bed
@@ -4,14 +4,14 @@ Released under Apache 2.0 license as described in the file LICENSE.
Authors: Sébastien Gouëzel
! This file was ported from Lean 3 source module analysis.calculus.bump_function_findim
-! leanprover-community/mathlib commit f0c8bf9245297a541f468be517f1bde6195105e9
+! leanprover-community/mathlib commit fd5edc43dc4f10b85abfe544b88f82cf13c5f844
! Please do not edit these lines, except to modify the commit id
! if you have ported upstream changes.
-/
import Mathbin.Analysis.Calculus.Series
import Mathbin.Analysis.Convolution
import Mathbin.Analysis.InnerProductSpace.EuclideanDist
-import Mathbin.MeasureTheory.Measure.HaarLebesgue
+import Mathbin.MeasureTheory.Measure.Haar.NormedSpace
import Mathbin.Data.Set.Pointwise.Support
/-!
mathlib commit https://github.com/leanprover-community/mathlib/commit/738054fa93d43512da144ec45ce799d18fd44248
@@ -4,13 +4,14 @@ Released under Apache 2.0 license as described in the file LICENSE.
Authors: Sébastien Gouëzel
! This file was ported from Lean 3 source module analysis.calculus.bump_function_findim
-! leanprover-community/mathlib commit 2c1d8ca2812b64f88992a5294ea3dba144755cd1
+! leanprover-community/mathlib commit f0c8bf9245297a541f468be517f1bde6195105e9
! Please do not edit these lines, except to modify the commit id
! if you have ported upstream changes.
-/
import Mathbin.Analysis.Calculus.Series
import Mathbin.Analysis.Convolution
import Mathbin.Analysis.InnerProductSpace.EuclideanDist
+import Mathbin.MeasureTheory.Measure.HaarLebesgue
import Mathbin.Data.Set.Pointwise.Support
/-!
mathlib commit https://github.com/leanprover-community/mathlib/commit/92c69b77c5a7dc0f7eeddb552508633305157caa
@@ -308,14 +308,14 @@ theorem u_neg (x : E) : u (-x) = u x :=
variable [MeasurableSpace E] [BorelSpace E]
-- mathport name: exprμ
-local notation "μ" => MeasureTheory.Measure.add_haar
+local notation "μ" => MeasureTheory.Measure.addHaar
variable (E)
theorem u_int_pos : 0 < ∫ x : E, u x ∂μ :=
by
refine' (integral_pos_iff_support_of_nonneg u_nonneg _).mpr _
- · exact (u_continuous E).integrableOfHasCompactSupport (u_compact_support E)
+ · exact (u_continuous E).integrable_of_hasCompactSupport (u_compact_support E)
· rw [u_support]
exact measure_ball_pos _ _ zero_lt_one
#align exists_cont_diff_bump_base.u_int_pos ExistsContDiffBumpBase.u_int_pos
mathlib commit https://github.com/leanprover-community/mathlib/commit/36b8aa61ea7c05727161f96a0532897bd72aedab
@@ -4,15 +4,14 @@ Released under Apache 2.0 license as described in the file LICENSE.
Authors: Sébastien Gouëzel
! This file was ported from Lean 3 source module analysis.calculus.bump_function_findim
-! leanprover-community/mathlib commit 8c8c544bf24ced19b1e76c34bb3262bdae620f82
+! leanprover-community/mathlib commit 2c1d8ca2812b64f88992a5294ea3dba144755cd1
! Please do not edit these lines, except to modify the commit id
! if you have ported upstream changes.
-/
-import Mathbin.Analysis.Calculus.BumpFunctionInner
import Mathbin.Analysis.Calculus.Series
import Mathbin.Analysis.Convolution
+import Mathbin.Analysis.InnerProductSpace.EuclideanDist
import Mathbin.Data.Set.Pointwise.Support
-import Mathbin.MeasureTheory.Measure.HaarLebesgue
/-!
# Bump functions in finite-dimensional vector spaces
mathlib commit https://github.com/leanprover-community/mathlib/commit/17ad94b4953419f3e3ce3e77da3239c62d1d09f0
@@ -360,7 +360,7 @@ theorem w_integral {D : ℝ} (Dpos : 0 < D) : (∫ x : E, w D x ∂μ) = 1 :=
theorem w_support {D : ℝ} (Dpos : 0 < D) : support (w D : E → ℝ) = ball 0 D :=
by
have B : D • ball (0 : E) 1 = ball 0 D := by
- rw [smul_unit_ball Dpos.ne', Real.norm_of_nonneg Dpos.le]
+ rw [smul_unitBall Dpos.ne', Real.norm_of_nonneg Dpos.le]
have C : D ^ finrank ℝ E ≠ 0 := pow_ne_zero _ Dpos.ne'
simp only [W_def, Algebra.id.smul_eq_mul, support_mul, support_inv, univ_inter,
support_comp_inv_smul₀ Dpos.ne', u_support, B, support_const (u_int_pos E).ne', support_const C,
mathlib commit https://github.com/leanprover-community/mathlib/commit/3180fab693e2cee3bff62675571264cb8778b212
@@ -191,7 +191,7 @@ theorem IsOpen.exists_smooth_support_eq {s : Set E} (hs : IsOpen s) :
intro n
contrapose! hx
exact g_s n hx
- simp only [this, mul_zero, tsum_zero]
+ simp only [this, MulZeroClass.mul_zero, tsum_zero]
· intro x hx
obtain ⟨n, hn⟩ : ∃ n, x ∈ support (g n)
exact s_g x hx
@@ -434,7 +434,7 @@ theorem y_eq_zero_of_not_mem_ball {D : ℝ} {x : E} (Dpos : 0 < D) (hx : x ∉ b
rw [Bx]
exact B
rw [convolution_eq_right' _ (le_of_eq (W_support E Dpos)) B']
- simp only [lsmul_apply, Algebra.id.smul_eq_mul, Bx, mul_zero, integral_const]
+ simp only [lsmul_apply, Algebra.id.smul_eq_mul, Bx, MulZeroClass.mul_zero, integral_const]
#align exists_cont_diff_bump_base.Y_eq_zero_of_not_mem_ball ExistsContDiffBumpBase.y_eq_zero_of_not_mem_ball
theorem y_nonneg (D : ℝ) (x : E) : 0 ≤ y D x :=
mathlib commit https://github.com/leanprover-community/mathlib/commit/4c586d291f189eecb9d00581aeb3dd998ac34442
@@ -172,7 +172,7 @@ theorem IsOpen.exists_smooth_support_eq {s : Set E} (hs : IsOpen s) :
by
rw [norm_smul, Real.norm_of_nonneg]
positivity
- _ ≤ M⁻¹ * δ n * M := mul_le_mul_of_nonneg_left ((hR i x).trans (IR i hi)) (by positivity)
+ _ ≤ M⁻¹ * δ n * M := (mul_le_mul_of_nonneg_left ((hR i x).trans (IR i hi)) (by positivity))
_ = δ n := by field_simp [M_pos.ne']
choose r rpos hr using this
mathlib commit https://github.com/leanprover-community/mathlib/commit/bd9851ca476957ea4549eb19b40e7b5ade9428cc
nat_cast
/int_cast
/rat_cast
to natCast
/intCast
/ratCast
(#11486)
Now that I am defining NNRat.cast
, I want a definitive answer to this naming issue. Plenty of lemmas in mathlib already use natCast
/intCast
/ratCast
over nat_cast
/int_cast
/rat_cast
, and this matches with the general expectation that underscore-separated name parts correspond to a single declaration.
@@ -357,7 +357,7 @@ def y (D : ℝ) : E → ℝ :=
theorem y_neg (D : ℝ) (x : E) : y D (-x) = y D x := by
apply convolution_neg_of_neg_eq
· filter_upwards with x
- simp only [w_def, Real.rpow_nat_cast, mul_inv_rev, smul_neg, u_neg, smul_eq_mul, forall_const]
+ simp only [w_def, Real.rpow_natCast, mul_inv_rev, smul_neg, u_neg, smul_eq_mul, forall_const]
· filter_upwards with x
simp only [φ, indicator, mem_closedBall, dist_zero_right, norm_neg, forall_const]
#align exists_cont_diff_bump_base.Y_neg ExistsContDiffBumpBase.y_neg
@@ -54,7 +54,7 @@ theorem exists_smooth_tsupport_subset {s : Set E} {x : E} (hs : s ∈ 𝓝 x) :
have f_supp : f.support ⊆ Euclidean.ball x d := by
intro y hy
have : toEuclidean y ∈ Function.support c := by
- simpa only [Function.mem_support, Function.comp_apply, Ne.def] using hy
+ simpa only [Function.mem_support, Function.comp_apply, Ne] using hy
rwa [c.support_eq] at this
have f_tsupp : tsupport f ⊆ Euclidean.closedBall x d := by
rw [tsupport, ← Euclidean.closure_ball _ d_pos.ne']
@@ -96,7 +96,7 @@ theorem IsOpen.exists_smooth_support_eq {s : Set E} (hs : IsOpen s) :
rcases exists_smooth_tsupport_subset (hs.mem_nhds hx) with ⟨f, hf⟩
let g : ι := ⟨f, (subset_tsupport f).trans hf.1, hf.2.1, hf.2.2.1, hf.2.2.2.1⟩
have : x ∈ support (g : E → ℝ) := by
- simp only [hf.2.2.2.2, Subtype.coe_mk, mem_support, Ne.def, one_ne_zero, not_false_iff]
+ simp only [hf.2.2.2.2, Subtype.coe_mk, mem_support, Ne, one_ne_zero, not_false_iff]
exact mem_iUnion_of_mem _ this
simp_rw [← this]
apply isOpen_iUnion_countable
@@ -164,7 +164,7 @@ theorem IsOpen.exists_smooth_support_eq {s : Set E} (hs : IsOpen s) :
refine' ⟨fun x => ∑' n, (r n • g n) x, _, _, _⟩
· apply Subset.antisymm
· intro x hx
- simp only [Pi.smul_apply, Algebra.id.smul_eq_mul, mem_support, Ne.def] at hx
+ simp only [Pi.smul_apply, Algebra.id.smul_eq_mul, mem_support, Ne] at hx
contrapose! hx
have : ∀ n, g n x = 0 := by
intro n
@@ -435,7 +435,7 @@ theorem y_pos_of_mem_ball {D : ℝ} {x : E} (Dpos : 0 < D) (D_lt_one : D < 1)
have C : ball z (D * (1 + D - ‖x‖) / (1 + D)) ⊆ support fun y : E => w D y * φ (x - y) := by
intro y hy
simp only [support_mul, w_support E Dpos]
- simp only [φ, mem_inter_iff, mem_support, Ne.def, indicator_apply_eq_zero,
+ simp only [φ, mem_inter_iff, mem_support, Ne, indicator_apply_eq_zero,
mem_closedBall_zero_iff, one_ne_zero, not_forall, not_false_iff, exists_prop, and_true_iff]
constructor
· apply ball_subset_ball' _ hy
@@ -446,9 +446,9 @@ theorem y_pos_of_mem_ball {D : ℝ} {x : E} (Dpos : 0 < D) (D_lt_one : D < 1)
rfl
· have ID : ‖D / (1 + D) - 1‖ = 1 / (1 + D) := by
rw [Real.norm_of_nonpos]
- · simp only [B.ne', Ne.def, not_false_iff, mul_one, neg_sub, add_tsub_cancel_right,
+ · simp only [B.ne', Ne, not_false_iff, mul_one, neg_sub, add_tsub_cancel_right,
field_simps]
- · simp only [B.ne', Ne.def, not_false_iff, mul_one, field_simps]
+ · simp only [B.ne', Ne, not_false_iff, mul_one, field_simps]
apply div_nonpos_of_nonpos_of_nonneg _ B.le
linarith only
rw [← mem_closedBall_iff_norm']
filter_upwards
(#11208)
This is presumably not exhaustive, but covers about a hundred instances.
Style opinions (e.g., why a particular change is great/not a good idea) are very welcome; I'm still forming my own.
@@ -356,9 +356,9 @@ def y (D : ℝ) : E → ℝ :=
theorem y_neg (D : ℝ) (x : E) : y D (-x) = y D x := by
apply convolution_neg_of_neg_eq
- · apply eventually_of_forall fun x => _
+ · filter_upwards with x
simp only [w_def, Real.rpow_nat_cast, mul_inv_rev, smul_neg, u_neg, smul_eq_mul, forall_const]
- · apply eventually_of_forall fun x => _
+ · filter_upwards with x
simp only [φ, indicator, mem_closedBall, dist_zero_right, norm_neg, forall_const]
#align exists_cont_diff_bump_base.Y_neg ExistsContDiffBumpBase.y_neg
Homogenises porting notes via capitalisation and addition of whitespace.
It makes the following changes:
@@ -294,7 +294,7 @@ theorem u_int_pos : 0 < ∫ x : E, u x ∂μ := by
#align exists_cont_diff_bump_base.u_int_pos ExistsContDiffBumpBase.u_int_pos
variable {E}
--- porting note: `W` upper case
+-- Porting note: `W` upper case
set_option linter.uppercaseLean3 false
/-- An auxiliary function to construct partitions of unity on finite-dimensional real vector spaces,
@@ -123,8 +123,8 @@ theorem IsOpen.exists_smooth_support_eq {s : Set E} (hs : IsOpen s) :
have g_comp_supp : ∀ n, HasCompactSupport (g n) := fun n => (g0 n).2.2.1
have g_nonneg : ∀ n x, 0 ≤ g n x := fun n x => ((g0 n).2.2.2.2 (mem_range_self x)).1
obtain ⟨δ, δpos, c, δc, c_lt⟩ :
- ∃ δ : ℕ → ℝ≥0, (∀ i : ℕ, 0 < δ i) ∧ ∃ c : NNReal, HasSum δ c ∧ c < 1
- exact NNReal.exists_pos_sum_of_countable one_ne_zero ℕ
+ ∃ δ : ℕ → ℝ≥0, (∀ i : ℕ, 0 < δ i) ∧ ∃ c : NNReal, HasSum δ c ∧ c < 1 :=
+ NNReal.exists_pos_sum_of_countable one_ne_zero ℕ
have : ∀ n : ℕ, ∃ r : ℝ, 0 < r ∧ ∀ i ≤ n, ∀ x, ‖iteratedFDeriv ℝ i (r • g n) x‖ ≤ δ n := by
intro n
have : ∀ i, ∃ R, ∀ x, ‖iteratedFDeriv ℝ i (fun x => g n x) x‖ ≤ R := by
@@ -172,7 +172,7 @@ theorem IsOpen.exists_smooth_support_eq {s : Set E} (hs : IsOpen s) :
exact g_s n hx
simp only [this, mul_zero, tsum_zero]
· intro x hx
- obtain ⟨n, hn⟩ : ∃ n, x ∈ support (g n); exact s_g x hx
+ obtain ⟨n, hn⟩ : ∃ n, x ∈ support (g n) := s_g x hx
have I : 0 < r n * g n x := mul_pos (rpos n) (lt_of_le_of_ne (g_nonneg n x) (Ne.symm hn))
exact ne_of_gt (tsum_pos (S x) (fun i => mul_nonneg (rpos i).le (g_nonneg i x)) n I)
· refine'
@@ -215,8 +215,8 @@ theorem u_exists :
ContDiff ℝ ⊤ u ∧ (∀ x, u x ∈ Icc (0 : ℝ) 1) ∧ support u = ball 0 1 ∧ ∀ x, u (-x) = u x := by
have A : IsOpen (ball (0 : E) 1) := isOpen_ball
obtain ⟨f, f_support, f_smooth, f_range⟩ :
- ∃ f : E → ℝ, f.support = ball (0 : E) 1 ∧ ContDiff ℝ ⊤ f ∧ Set.range f ⊆ Set.Icc 0 1
- exact A.exists_smooth_support_eq
+ ∃ f : E → ℝ, f.support = ball (0 : E) 1 ∧ ContDiff ℝ ⊤ f ∧ Set.range f ⊆ Set.Icc 0 1 :=
+ A.exists_smooth_support_eq
have B : ∀ x, f x ∈ Icc (0 : ℝ) 1 := fun x => f_range (mem_range_self x)
refine' ⟨fun x => (f x + f (-x)) / 2, _, _, _, _⟩
· exact (f_smooth.add (f_smooth.comp contDiff_neg)).div_const _
@@ -105,7 +105,7 @@ theorem IsOpen.exists_smooth_support_eq {s : Set E} (hs : IsOpen s) :
obtain ⟨g0, hg⟩ : ∃ g0 : ℕ → ι, T = range g0 := by
apply Countable.exists_eq_range T_count
rcases eq_empty_or_nonempty T with (rfl | hT)
- · simp only [iUnion_false, iUnion_empty] at hT
+ · simp only [ι, iUnion_false, iUnion_empty] at hT
simp only [← hT, mem_empty_iff_false, iUnion_of_empty, iUnion_empty, Set.not_nonempty_empty]
at h's
· exact hT
Currently, the same file contains the facts that series of functions are continuous (resp. smooth) under suitable assumption. I will need the result on continuity in a file of more topological nature. To avoid importing all calculus in this file, this PR splits the file Analysis.Calculus.Series
into Analysis.Calculus.SmoothSeries
and Analysis.NormedSpace.FunctionSeries
.
It's purely a splitting PR, no result added or removed.
@@ -3,7 +3,7 @@ Copyright (c) 2022 Sébastien Gouëzel. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Sébastien Gouëzel
-/
-import Mathlib.Analysis.Calculus.Series
+import Mathlib.Analysis.Calculus.SmoothSeries
import Mathlib.Analysis.Calculus.BumpFunction.InnerProduct
import Mathlib.Analysis.Convolution
import Mathlib.Analysis.InnerProductSpace.EuclideanDist
ContinuousMultilinearMap
for seminormed spaces (#9700)
Slightly generalize the definition of the operator norm on ContinuousMultilinearMap
so that it works when the spaces have seminorms (and not just norms).
There are two new lemmas MultilinearMap.zero_of_continuous_of_one_entry_norm_zero
and MultilinearMap.bound_of_shell_of_continuous
that do the work of the old lemma MultilinearMap.bound_of_shell
; I kept that last lemma (with the same hypotheses as before) in case it is useful somewhere else. Also, ContinuousMultilinearMap
only gets a SeminormedAddCommGroup
instance in general, which is upgraded to a NormedAddCommGroup
instance if the target space is normed. Other lemmas and their proofs are unchanged, they are just rearranged to separate the ones that work for general seminormed spaces and the ones that only work for normed spaces.
Co-authored-by: Eric Wieser <wieser.eric@gmail.com> Co-authored-by: Yury G. Kudryashov <urkud@urkud.name> Co-authored-by: smorel394 <67864981+smorel394@users.noreply.github.com>
@@ -153,7 +153,7 @@ theorem IsOpen.exists_smooth_support_eq {s : Set E} (hs : IsOpen s) :
‖iteratedFDeriv ℝ i ((M⁻¹ * δ n) • g n) x‖ = ‖(M⁻¹ * δ n) • iteratedFDeriv ℝ i (g n) x‖ := by
rw [iteratedFDeriv_const_smul_apply]; exact (g_smooth n).of_le le_top
_ = M⁻¹ * δ n * ‖iteratedFDeriv ℝ i (g n) x‖ := by
- rw [norm_smul, Real.norm_of_nonneg]; positivity
+ rw [norm_smul _ (iteratedFDeriv ℝ i (g n) x), Real.norm_of_nonneg]; positivity
_ ≤ M⁻¹ * δ n * M := (mul_le_mul_of_nonneg_left ((hR i x).trans (IR i hi)) (by positivity))
_ = δ n := by field_simp
choose r rpos hr using this
@@ -4,11 +4,12 @@ Released under Apache 2.0 license as described in the file LICENSE.
Authors: Sébastien Gouëzel
-/
import Mathlib.Analysis.Calculus.Series
-import Mathlib.Analysis.Calculus.BumpFunction.Convolution
import Mathlib.Analysis.Calculus.BumpFunction.InnerProduct
+import Mathlib.Analysis.Convolution
import Mathlib.Analysis.InnerProductSpace.EuclideanDist
-import Mathlib.MeasureTheory.Measure.Haar.NormedSpace
import Mathlib.Data.Set.Pointwise.Support
+import Mathlib.MeasureTheory.Measure.Haar.NormedSpace
+import Mathlib.MeasureTheory.Measure.Haar.Unique
#align_import analysis.calculus.bump_function_findim from "leanprover-community/mathlib"@"fd5edc43dc4f10b85abfe544b88f82cf13c5f844"
@@ -551,8 +551,7 @@ instance (priority := 100) {E : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E
simp only [norm_smul, inv_div, mem_closedBall_zero_iff, Real.norm_eq_abs, abs_div, abs_two,
abs_of_nonneg A.le]
calc
- 2 / (R + 1) * ‖x‖ ≤ 2 / (R + 1) * 1 :=
- mul_le_mul_of_nonneg_left hx (div_nonneg zero_le_two A.le)
+ 2 / (R + 1) * ‖x‖ ≤ 2 / (R + 1) := mul_le_of_le_one_right (by positivity) hx
_ = 1 - (R - 1) / (R + 1) := by field_simp; ring
support := fun R hR => by
have A : 0 < (R + 1) / 2 := by linarith
@@ -110,11 +110,10 @@ theorem IsOpen.exists_smooth_support_eq {s : Set E} (hs : IsOpen s) :
· exact hT
let g : ℕ → E → ℝ := fun n => (g0 n).1
have g_s : ∀ n, support (g n) ⊆ s := fun n => (g0 n).2.1
- have s_g : ∀ x ∈ s, ∃ n, x ∈ support (g n) := by
- intro x hx
+ have s_g : ∀ x ∈ s, ∃ n, x ∈ support (g n) := fun x hx ↦ by
rw [← hT] at hx
- obtain ⟨i, iT, hi⟩ : ∃ (i : ι) (_ : i ∈ T), x ∈ support (i : E → ℝ) := by
- simpa only [mem_iUnion] using hx
+ obtain ⟨i, iT, hi⟩ : ∃ i ∈ T, x ∈ support (i : E → ℝ) := by
+ simpa only [mem_iUnion, exists_prop] using hx
rw [hg, mem_range] at iT
rcases iT with ⟨n, hn⟩
rw [← hn] at hi
[@foo](https://github.com/foo) _ _ _ _ _ ...
by named arguments (#8702)
Using Lean4's named arguments, we manage to remove a few hard-to-read explicit function calls [@foo](https://github.com/foo) _ _ _ _ _ ...
which used to be necessary in Lean3.
Occasionally, this results in slightly longer code. The benefit of named arguments is readability, as well as to reduce the brittleness of the code when the argument order is changed.
Co-authored-by: Michael Rothgang <rothgami@math.hu-berlin.de>
@@ -484,7 +484,7 @@ theorem y_smooth : ContDiffOn ℝ ⊤ (uncurry y) (Ioo (0 : ℝ) 1 ×ˢ (univ :
ne_of_gt (mul_pos (u_int_pos E) (pow_pos (abs_pos_of_pos hx.1.1) (finrank ℝ E)))
apply ContDiffOn.pow
simp_rw [← Real.norm_eq_abs]
- apply @ContDiffOn.norm ℝ
+ apply ContDiffOn.norm ℝ
· exact contDiffOn_fst
· intro x hx; exact ne_of_gt hx.1.1
· apply (u_smooth E).comp_contDiffOn
summable_of_norm_bounded
-> Summable.of_norm_bounded
;summable_of_norm_bounded_eventually
-> Summable.of_norm_bounded_eventually
;summable_of_nnnorm_bounded
-> Summable.of_nnnorm_bounded
;summable_of_summable_norm
-> Summable.of_norm
;summable_of_summable_nnnorm
-> Summable.of_nnnorm
;Summable.of_norm_bounded_eventually_nat
Summable.norm
@@ -157,9 +157,8 @@ theorem IsOpen.exists_smooth_support_eq {s : Set E} (hs : IsOpen s) :
_ ≤ M⁻¹ * δ n * M := (mul_le_mul_of_nonneg_left ((hR i x).trans (IR i hi)) (by positivity))
_ = δ n := by field_simp
choose r rpos hr using this
- have S : ∀ x, Summable fun n => (r n • g n) x := by
- intro x
- refine' summable_of_nnnorm_bounded _ δc.summable fun n => _
+ have S : ∀ x, Summable fun n => (r n • g n) x := fun x ↦ by
+ refine' .of_nnnorm_bounded _ δc.summable fun n => _
rw [← NNReal.coe_le_coe, coe_nnnorm]
simpa only [norm_iteratedFDeriv_zero] using hr n 0 (zero_le n) x
refine' ⟨fun x => ∑' n, (r n • g n) x, _, _, _⟩
Metric.Bounded
(#7240)
Use Bornology.IsBounded
instead.
@@ -27,7 +27,7 @@ the indicator function of `closedBall 0 1` with a function as above with `s = ba
noncomputable section
open Set Metric TopologicalSpace Function Asymptotics MeasureTheory FiniteDimensional
- ContinuousLinearMap Filter MeasureTheory.Measure
+ ContinuousLinearMap Filter MeasureTheory.Measure Bornology
open scoped Pointwise Topology NNReal BigOperators Convolution
@@ -59,10 +59,9 @@ theorem exists_smooth_tsupport_subset {s : Set E} {x : E} (hs : s ∈ 𝓝 x) :
rw [tsupport, ← Euclidean.closure_ball _ d_pos.ne']
exact closure_mono f_supp
refine' ⟨f, f_tsupp.trans hd, _, _, _, _⟩
- · refine' isCompact_of_isClosed_bounded isClosed_closure _
- have : Bounded (Euclidean.closedBall x d) := Euclidean.isCompact_closedBall.bounded
- apply this.mono _
- refine' (IsClosed.closure_subset_iff Euclidean.isClosed_closedBall).2 _
+ · refine' isCompact_of_isClosed_isBounded isClosed_closure _
+ have : IsBounded (Euclidean.closedBall x d) := Euclidean.isCompact_closedBall.isBounded
+ refine this.subset (Euclidean.isClosed_closedBall.closure_subset_iff.2 ?_)
exact f_supp.trans Euclidean.ball_subset_closedBall
· apply c.contDiff.comp
exact ContinuousLinearEquiv.contDiff _
The main reasons is that having h : 0 < denom
in the context should suffice for field_simp
to do its job, without the need to manually pass h.ne
or similar.
Quite a few have := … ≠ 0
could be dropped, and some field_simp
calls no longer need explicit arguments; this is promising.
This does break some proofs where field_simp
was not used as a closing tactic, and it now
shuffles terms around a bit different. These were fixed. Using field_simp
in the middle of a proof seems rather fragile anyways.
As a drive-by contribution, positivity
now knows about π > 0
.
fixes: #4835
Co-authored-by: Matthew Ballard <matt@mrb.email>
@@ -139,7 +139,6 @@ theorem IsOpen.exists_smooth_support_eq {s : Set E} (hs : IsOpen s) :
exact ⟨R, fun x => hR (mem_range_self _)⟩
choose R hR using this
let M := max (((Finset.range (n + 1)).image R).max' (by simp)) 1
- have M_pos : 0 < M := zero_lt_one.trans_le (le_max_right _ _)
have δnpos : 0 < δ n := δpos n
have IR : ∀ i ≤ n, R i ≤ M := by
intro i hi
@@ -157,7 +156,7 @@ theorem IsOpen.exists_smooth_support_eq {s : Set E} (hs : IsOpen s) :
_ = M⁻¹ * δ n * ‖iteratedFDeriv ℝ i (g n) x‖ := by
rw [norm_smul, Real.norm_of_nonneg]; positivity
_ ≤ M⁻¹ * δ n * M := (mul_le_mul_of_nonneg_left ((hR i x).trans (IR i hi)) (by positivity))
- _ = δ n := by field_simp [M_pos.ne']
+ _ = δ n := by field_simp
choose r rpos hr using this
have S : ∀ x, Summable fun n => (r n • g n) x := by
intro x
@@ -328,7 +327,7 @@ variable (E)
theorem w_integral {D : ℝ} (Dpos : 0 < D) : ∫ x : E, w D x ∂μ = 1 := by
simp_rw [w, integral_smul]
rw [integral_comp_inv_smul_of_nonneg μ (u : E → ℝ) Dpos.le, abs_of_nonneg Dpos.le, mul_comm]
- field_simp [Dpos.ne', (u_int_pos E).ne']
+ field_simp [(u_int_pos E).ne']
#align exists_cont_diff_bump_base.W_integral ExistsContDiffBumpBase.w_integral
theorem w_support {D : ℝ} (Dpos : 0 < D) : support (w D : E → ℝ) = ball 0 D := by
@@ -557,7 +556,7 @@ instance (priority := 100) {E : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E
calc
2 / (R + 1) * ‖x‖ ≤ 2 / (R + 1) * 1 :=
mul_le_mul_of_nonneg_left hx (div_nonneg zero_le_two A.le)
- _ = 1 - (R - 1) / (R + 1) := by field_simp [A.ne']; ring
+ _ = 1 - (R - 1) / (R + 1) := by field_simp; ring
support := fun R hR => by
have A : 0 < (R + 1) / 2 := by linarith
have A' : 0 < R + 1 := by linarith
@@ -565,8 +564,7 @@ instance (priority := 100) {E : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E
simp only [hR, if_true, support_comp_inv_smul₀ A.ne', y_support _ (IR R hR) C,
_root_.smul_ball A.ne', Real.norm_of_nonneg A.le, smul_zero]
refine' congr (congr_arg ball (Eq.refl 0)) _
- field_simp [A'.ne']
- ring }
+ field_simp; ring }
end ExistsContDiffBumpBase
MulZeroClass.
in mul_zero
/zero_mul
(#6682)
Search&replace MulZeroClass.mul_zero
-> mul_zero
, MulZeroClass.zero_mul
-> zero_mul
.
These were introduced by Mathport, as the full name of mul_zero
is actually MulZeroClass.mul_zero
(it's exported with the short name).
@@ -173,7 +173,7 @@ theorem IsOpen.exists_smooth_support_eq {s : Set E} (hs : IsOpen s) :
intro n
contrapose! hx
exact g_s n hx
- simp only [this, MulZeroClass.mul_zero, tsum_zero]
+ simp only [this, mul_zero, tsum_zero]
· intro x hx
obtain ⟨n, hn⟩ : ∃ n, x ∈ support (g n); exact s_g x hx
have I : 0 < r n * g n x := mul_pos (rpos n) (lt_of_le_of_ne (g_nonneg n x) (Ne.symm hn))
@@ -399,7 +399,7 @@ theorem y_eq_zero_of_not_mem_ball {D : ℝ} {x : E} (Dpos : 0 < D) (hx : x ∉ b
have Bx : φ x = 0 := B _ (mem_ball_self Dpos)
have B' : ∀ y, y ∈ ball x D → φ y = φ x := by rw [Bx]; exact B
rw [convolution_eq_right' _ (le_of_eq (w_support E Dpos)) B']
- simp only [lsmul_apply, Algebra.id.smul_eq_mul, Bx, MulZeroClass.mul_zero, integral_const]
+ simp only [lsmul_apply, Algebra.id.smul_eq_mul, Bx, mul_zero, integral_const]
#align exists_cont_diff_bump_base.Y_eq_zero_of_not_mem_ball ExistsContDiffBumpBase.y_eq_zero_of_not_mem_ball
theorem y_nonneg (D : ℝ) (x : E) : 0 ≤ y D x :=
@@ -237,7 +237,6 @@ theorem u_exists :
· have I1 : x ∉ support f := by rwa [f_support]
have I2 : -x ∉ support f := by
rw [f_support]
- simp only at hx
simpa using hx
simp only [mem_support, Classical.not_not] at I1 I2
simp only [I1, I2, add_zero, zero_div]
@@ -459,7 +458,6 @@ theorem y_pos_of_mem_ball {D : ℝ} {x : E} (Dpos : 0 < D) (D_lt_one : D < 1)
apply closedBall_subset_closedBall' _ (ball_subset_closedBall hy)
rw [← one_smul ℝ x, dist_eq_norm, hz, ← sub_smul, one_smul, norm_smul, ID]
simp only [B.ne', div_le_iff B, field_simps]
- simp only [mem_ball_zero_iff] at hx
nlinarith only [hx, D_lt_one]
apply lt_of_lt_of_le _ (measure_mono C)
apply measure_ball_pos
Type _
and Sort _
(#6499)
We remove all possible occurences of Type _
and Sort _
in favor of Type*
and Sort*
.
This has nice performance benefits.
@@ -31,7 +31,7 @@ open Set Metric TopologicalSpace Function Asymptotics MeasureTheory FiniteDimens
open scoped Pointwise Topology NNReal BigOperators Convolution
-variable {E : Type _} [NormedAddCommGroup E]
+variable {E : Type*} [NormedAddCommGroup E]
section
@@ -507,7 +507,7 @@ variable {E}
end HelperDefinitions
-instance (priority := 100) {E : Type _} [NormedAddCommGroup E] [NormedSpace ℝ E]
+instance (priority := 100) {E : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E]
[FiniteDimensional ℝ E] : HasContDiffBump E := by
refine' ⟨⟨_⟩⟩
borelize E
@@ -2,11 +2,6 @@
Copyright (c) 2022 Sébastien Gouëzel. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Sébastien Gouëzel
-
-! This file was ported from Lean 3 source module analysis.calculus.bump_function_findim
-! leanprover-community/mathlib commit fd5edc43dc4f10b85abfe544b88f82cf13c5f844
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
-/
import Mathlib.Analysis.Calculus.Series
import Mathlib.Analysis.Calculus.BumpFunction.Convolution
@@ -15,6 +10,8 @@ import Mathlib.Analysis.InnerProductSpace.EuclideanDist
import Mathlib.MeasureTheory.Measure.Haar.NormedSpace
import Mathlib.Data.Set.Pointwise.Support
+#align_import analysis.calculus.bump_function_findim from "leanprover-community/mathlib"@"fd5edc43dc4f10b85abfe544b88f82cf13c5f844"
+
/-!
# Bump functions in finite-dimensional vector spaces
@@ -9,7 +9,8 @@ Authors: Sébastien Gouëzel
! if you have ported upstream changes.
-/
import Mathlib.Analysis.Calculus.Series
-import Mathlib.Analysis.Convolution
+import Mathlib.Analysis.Calculus.BumpFunction.Convolution
+import Mathlib.Analysis.Calculus.BumpFunction.InnerProduct
import Mathlib.Analysis.InnerProductSpace.EuclideanDist
import Mathlib.MeasureTheory.Measure.Haar.NormedSpace
import Mathlib.Data.Set.Pointwise.Support
@@ -91,8 +91,8 @@ theorem IsOpen.exists_smooth_support_eq {s : Set E} (hs : IsOpen s) :
⟨fun _ => 0, Function.support_zero, contDiff_const, by
simp only [range_const, singleton_subset_iff, left_mem_Icc, zero_le_one]⟩
let ι := { f : E → ℝ // f.support ⊆ s ∧ HasCompactSupport f ∧ ContDiff ℝ ⊤ f ∧ range f ⊆ Icc 0 1 }
- obtain ⟨T, T_count, hT⟩ : ∃ T : Set ι, T.Countable ∧ (⋃ f ∈ T, support (f : E → ℝ)) = s := by
- have : (⋃ f : ι, (f : E → ℝ).support) = s := by
+ obtain ⟨T, T_count, hT⟩ : ∃ T : Set ι, T.Countable ∧ ⋃ f ∈ T, support (f : E → ℝ) = s := by
+ have : ⋃ f : ι, (f : E → ℝ).support = s := by
refine' Subset.antisymm (iUnion_subset fun f => f.2.1) _
intro x hx
rcases exists_smooth_tsupport_subset (hs.mem_nhds hx) with ⟨f, hf⟩
@@ -570,8 +570,7 @@ instance (priority := 100) {E : Type _} [NormedAddCommGroup E] [NormedSpace ℝ
_root_.smul_ball A.ne', Real.norm_of_nonneg A.le, smul_zero]
refine' congr (congr_arg ball (Eq.refl 0)) _
field_simp [A'.ne']
- ring
- }
+ ring }
end ExistsContDiffBumpBase
The unported dependencies are
algebra.order.module
init.core
linear_algebra.free_module.finite.rank
algebra.order.monoid.cancel.defs
algebra.abs
algebra.group_power.lemmas
init.data.list.basic
linear_algebra.free_module.rank
algebra.order.monoid.cancel.basic
init.data.list.default
topology.subset_properties
init.logic
The following 1 dependencies have changed in mathlib3 since they were ported, which may complicate porting this file