Skip to content

Commit f28f5ec

Browse files
chore: bump to v4.24.0 (#172)
* The definition of `ModularForm` was generalized: leanprover-community/mathlib4#26651 * `Summable` has a `SummationFilter` parameter now: leanprover-community/mathlib4#29914 * `f` parameter of `tprod_pnat_eq_tprod_succ` is now implicit: leanprover-community/mathlib4#27841 * various lemmas were deprecated * A lemma named `Filter.map_add_atTop_eq` was added to mathlib: leanprover-community/mathlib4#29532 * other changes too... --------- Co-authored-by: Pietro Monticone <38562595+pitmonticone@users.noreply.github.com>
1 parent ced0cef commit f28f5ec

24 files changed

+275
-232
lines changed

SpherePacking/Basic/E8.lean

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -469,18 +469,6 @@ lemma dotProduct_is_integer {R : Type*} [Field R] [CharZero R] (i j : Fin 8) :
469469
∃ z : ℤ, z = (E8Matrix R).row i ⬝ᵥ (E8Matrix R).row j :=
470470
⟨_, (dotProduct_eq_inn _ _).symm⟩
471471

472-
lemma sum_dotProduct {α β γ : Type*} [Fintype β] [CommSemiring γ]
473-
{s : Finset α} {v : α → β → γ} {w : β → γ} :
474-
(∑ i ∈ s, v i) ⬝ᵥ w = ∑ i ∈ s, v i ⬝ᵥ w := by
475-
simp_rw [dotProduct, Finset.sum_apply, Finset.sum_mul]
476-
exact Finset.sum_comm
477-
478-
lemma dotProduct_sum {α β γ : Type*} [Fintype β] [CommSemiring γ]
479-
{s : Finset α} {v : β → γ} {w : α → β → γ} :
480-
v ⬝ᵥ (∑ i ∈ s, w i) = ∑ i ∈ s, v ⬝ᵥ w i := by
481-
simp_rw [dotProduct, Finset.sum_apply, Finset.mul_sum]
482-
exact Finset.sum_comm
483-
484472
theorem E8_integral {R : Type*} [Field R] [CharZero R] (v w : Fin 8 → R)
485473
(hv : v ∈ Submodule.E8 R) (hw : w ∈ Submodule.E8 R) :
486474
∃ z : ℤ, z = v ⬝ᵥ w := by

SpherePacking/Basic/PeriodicPacking.lean

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,8 @@ theorem aux3 {ι τ : Type*} {s : Set ι} {f : ι → Set (EuclideanSpace ℝ τ
7878
have h_volume' := volume.mono hL
7979
rw [OuterMeasure.measureOf_eq_coe, Measure.coe_toOuterMeasure, Set.biUnion_eq_iUnion,
8080
measure_iUnion] at h_volume'
81-
· have h_le := Summable.tsum_mono (f := fun _ ↦ c) (g := fun (x : s) ↦ volume (f x)) ?_ ?_ ?_
81+
· have h_le : ∑' (n : ↑s), c ≤ ∑' (n : ↑s), volume (f ↑n) :=
82+
Summable.tsum_mono (f := fun _ ↦ c) (g := fun (x : s) ↦ volume (f x)) ?_ ?_ ?_
8283
· have h₁ := (ENNReal.tsum_set_const _ _ ▸ h_le).trans h_volume'
8384
rw [← Set.encard_lt_top_iff, ← ENat.toENNReal_lt, ENat.toENNReal_top]
8485
refine lt_of_le_of_lt ((ENNReal.le_div_iff_mul_le ?_ ?_).mpr h₁) <|
@@ -871,7 +872,7 @@ theorem volume_ball_ratio_tendsto_nhds_one'
871872
· convert ENNReal.Tendsto.div (volume_ball_ratio_tendsto_nhds_one hd hC') ?_
872873
(volume_ball_ratio_tendsto_nhds_one hd hC) ?_ <;> simp
873874

874-
theorem Filter.map_add_atTop_eq {β : Type*} {f : ℝ → β} (C : ℝ) (α : Filter β) :
875+
theorem Filter.map_add_atTop_eq' {β : Type*} {f : ℝ → β} (C : ℝ) (α : Filter β) :
875876
Tendsto f atTop α ↔ Tendsto (fun x ↦ f (x + C)) atTop α := by
876877
constructor <;> intro hf
877878
· apply tendsto_map'_iff.mp
@@ -889,7 +890,7 @@ theorem Filter.map_add_atTop_eq {β : Type*} {f : ℝ → β} (C : ℝ) (α : Fi
889890
theorem volume_ball_ratio_tendsto_nhds_one'' {d : ℕ} {C C' : ℝ} (hd : 0 < d) :
890891
Tendsto (fun R ↦ volume (ball (0 : EuclideanSpace ℝ (Fin d)) (R + C))
891892
/ volume (ball (0 : EuclideanSpace ℝ (Fin d)) (R + C'))) atTop (𝓝 1) := by
892-
apply (Filter.map_add_atTop_eq (max (-C) (-C')) _).mpr
893+
apply (Filter.map_add_atTop_eq' (max (-C) (-C')) _).mpr
893894
simp_rw [add_assoc]
894895
convert volume_ball_ratio_tendsto_nhds_one' hd ?_ ?_
895896
· trans (-C) + C

SpherePacking/Basic/SpherePacking.lean

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ instance PeriodicSpherePacking.instIsZLattice (S : PeriodicSpherePacking d) :
6363

6464
instance SpherePacking.instCentersDiscrete (S : SpherePacking d) :
6565
DiscreteTopology S.centers := by
66-
simp_rw [← singletons_open_iff_discrete, Metric.isOpen_iff]
66+
simp_rw [discreteTopology_iff_isOpen_singleton, Metric.isOpen_iff]
6767
intro ⟨u, hu⟩ ⟨v, hv⟩ huv
6868
simp_rw [Set.subset_singleton_iff, mem_ball, Subtype.forall, Subtype.mk.injEq]
6969
rw [Set.mem_singleton_iff, Subtype.mk.injEq] at huv
@@ -175,7 +175,7 @@ noncomputable def PeriodicSpherePacking.scale (S : PeriodicSpherePacking d) {c :
175175
specialize hε' x hx
176176
simp only [DistribMulAction.toLinearMap_apply, AddSubgroupClass.coe_norm,
177177
Submodule.mk_eq_zero] at hx' hε'
178-
rw [norm_smul, norm_eq_abs, abs_eq_self.mpr hc.le, mul_lt_mul_left hc] at hx'
178+
rw [norm_smul, norm_eq_abs, abs_eq_self.mpr hc.le, mul_lt_mul_iff_right₀ hc] at hx'
179179
exact hε' hx'
180180
lattice_isZLattice := by
181181
use ?_
@@ -219,7 +219,7 @@ lemma SpherePacking.scale_balls {S : SpherePacking d} {c : ℝ} (hc : 0 < c) :
219219
rw [dist_eq_norm] at hxy ⊢
220220
rw [← smul_sub, norm_smul, Real.norm_eq_abs, abs_eq_self.mpr this]
221221
apply lt_of_lt_of_le (b := c⁻¹ * (c * S.separation / 2))
222-
· exact (mul_lt_mul_left h).mpr hxy
222+
· exact (mul_lt_mul_iff_right₀ h).mpr hxy
223223
· rw [mul_div_assoc, ← mul_assoc, inv_mul_cancel₀ hc.ne.symm, one_mul]
224224
· rw [smul_smul, mul_inv_cancel₀ hc.ne.symm, one_smul]
225225
· intro h

SpherePacking/CohnElkies/LPBound.lean

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -370,9 +370,9 @@ private theorem calc_steps (hd : 0 < d) (hf : Summable f) :
370370
-- First, we apply the fact that two sides are equal if they're equal in ℂ.
371371
apply congrArg re
372372
-- Next, we apply the fact that two sums are equal if their summands are.
373-
apply congrArg _ _
373+
congr 1
374374
ext x
375-
apply congrArg _ _
375+
congr 1
376376
ext y
377377
-- Now that we've isolated the innermost sum, we can use the PSF-L.
378378
exact SchwartzMap.PoissonSummation_Lattices P.lattice f (x - ↑y)
@@ -419,12 +419,12 @@ private theorem calc_steps (hd : 0 < d) (hf : Summable f) :
419419
-- are really trying to show are equal.
420420
apply congrArg re
421421
apply congrArg _ _
422-
apply congrArg _ _
422+
congr 1
423423
ext m
424424
apply congrArg _ _
425-
apply congrArg _ _
425+
congr 1
426426
ext x
427-
apply congrArg _ _
427+
congr 1
428428
ext y
429429
simp only [sub_eq_neg_add, RCLike.wInner_neg_left, ofReal_neg, mul_neg, mul_comm]
430430
rw [RCLike.wInner_add_left]
@@ -439,15 +439,15 @@ private theorem calc_steps (hd : 0 < d) (hf : Summable f) :
439439
:= by
440440
apply congrArg re
441441
apply congrArg _ _
442-
apply congrArg _ _
442+
congr 1
443443
ext m
444444
simp only [mul_assoc]
445445
apply congrArg _ _
446446
rw [← tsum_mul_right]
447-
apply congrArg _ _
447+
congr 1
448448
ext x
449449
rw [← tsum_mul_left]
450-
apply congrArg _ _
450+
congr 1
451451
ext y
452452
simp only [RCLike.wInner_neg_left, ofReal_neg, mul_neg]
453453
_ = ((1 / ZLattice.covolume P.lattice) * ∑' m : bilinFormOfRealInner.dualSubmodule P.lattice, (𝓕 f
@@ -460,11 +460,11 @@ private theorem calc_steps (hd : 0 < d) (hf : Summable f) :
460460
:= by
461461
apply congrArg re
462462
apply congrArg _ _
463-
apply congrArg _ _
463+
congr 1
464464
ext m
465465
apply congrArg _ _
466466
rw [conj_tsum]
467-
apply congrArg _ _
467+
congr 1
468468
ext x
469469
exact Complex.exp_neg_real_I_eq_conj (x : EuclideanSpace ℝ (Fin d)) m
470470
_ = (1 / ZLattice.covolume P.lattice) * ∑' m : bilinFormOfRealInner.dualSubmodule P.lattice,
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
import Mathlib.NumberTheory.ModularForms.BoundedAtCusp
2+
3+
open scoped MatrixGroups ModularForm UpperHalfPlane
4+
5+
theorem zero_at_cusps_of_zero_at_infty {f : ℍ → ℂ} {c : OnePoint ℝ} {k : ℤ}
6+
{𝒢 : Subgroup (GL (Fin 2) ℝ)} [𝒢.IsArithmetic]
7+
(hc : IsCusp c 𝒢) (hb : ∀ A ∈ 𝒮ℒ, UpperHalfPlane.IsZeroAtImInfty (f ∣[k] A)) :
8+
c.IsZeroAt f k := by
9+
rw [Subgroup.IsArithmetic.isCusp_iff_isCusp_SL2Z] at hc
10+
refine (OnePoint.isZeroAt_iff_forall_SL2Z hc).mpr fun A hA ↦ hb A ⟨A, rfl⟩
11+
12+
theorem bounded_at_cusps_of_bounded_at_infty {f : ℍ → ℂ} {c : OnePoint ℝ} {k : ℤ}
13+
{𝒢 : Subgroup (GL (Fin 2) ℝ)} [𝒢.IsArithmetic]
14+
(hc : IsCusp c 𝒢) (hb : ∀ A ∈ 𝒮ℒ, UpperHalfPlane.IsBoundedAtImInfty (f ∣[k] A)) :
15+
c.IsBoundedAt f k := by
16+
rw [Subgroup.IsArithmetic.isCusp_iff_isCusp_SL2Z] at hc
17+
exact (OnePoint.isBoundedAt_iff_forall_SL2Z hc).mpr fun A hA ↦ hb A ⟨A, rfl⟩

SpherePacking/ForMathlib/Encard.lean

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -202,8 +202,8 @@ protected theorem tsum_subtype_biUnion_le (f : α → ℕ∞) (s : Finset ι) (t
202202

203203
protected theorem tsum_subtype_iUnion_le [Fintype ι] (f : α → ℕ∞) (t : ι → Set α) :
204204
∑' x : ⋃ i, t i, f x ≤ ∑ i, ∑' x : t i, f x := by
205-
rw [tsum_fintype]
206-
exact ENat.tsum_subtype_iUnion_le_tsum f t
205+
have : ∑ i, ∑' x : t i, f x = ∑' i, ∑' x : t i, f x := by rw [tsum_fintype]
206+
exact this ▸ ENat.tsum_subtype_iUnion_le_tsum f t
207207

208208
theorem tsum_subtype_iUnion_eq_tsum (f : α → ℕ∞) (t : ι → Set α) (ht : Pairwise (Disjoint on t)) :
209209
∑' x : ⋃ i, t i, f x = ∑' i, ∑' x : t i, f x :=

SpherePacking/ForMathlib/InvPowSummability.lean

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,8 @@ theorem Summable_of_Inv_Pow_Summable'
7676
dsimp only [Summable, HasSum]
7777
use 0
7878
intro ε hε
79-
simp only [Filter.mem_map, Filter.mem_atTop_sets, ge_iff_le, le_of_subsingleton,
80-
Set.mem_preimage, true_implies, exists_const]
79+
simp only [SummationFilter.unconditional_filter, Filter.mem_map, Filter.mem_atTop_sets,
80+
ge_iff_le, le_of_subsingleton, Set.mem_preimage, forall_const, exists_const]
8181
intro b
8282
rw [eq_top_of_bot_eq_top rfl b]
8383
simp only [Finset.top_eq_univ, Finset.univ_eq_empty, Finset.sum_empty]

SpherePacking/MagicFunction/PolyFourierCoeffBound.lean

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ lemma aux_8 : 0 < ∏' (n : ℕ+), (1 - rexp (-2 * π * ↑↑n * z.im)) ^ 24 :=
130130
apply Summable.neg
131131
simp_rw [smul_eq_mul]
132132
conv =>
133-
rhs
133+
lhs
134134
equals (fun (b : ℕ) => Real.exp (-2 * π * b * z.im)) ∘ (PNat.val) => rfl
135135

136136
apply Summable.subtype
@@ -163,7 +163,7 @@ lemma aux_11 : 0 < ∏' (n : ℕ+), (1 - rexp (-π * ↑↑n)) ^ 24 := by
163163
apply Summable.neg
164164
simp_rw [smul_eq_mul]
165165
conv =>
166-
rhs
166+
lhs
167167
equals (fun (b : ℕ) => Real.exp (-π * b)) ∘ (PNat.val) => rfl
168168

169169
apply Summable.subtype
@@ -302,7 +302,7 @@ by
302302
· simp_rw [sub_eq_add_neg]
303303
apply Real.summable_log_one_add_of_summable
304304
apply Summable.neg
305-
conv => rhs; equals (fun (b : ℕ) => Real.exp (-2 * π * b * z.im)) ∘ (PNat.val) => rfl
305+
conv => lhs; equals (fun (b : ℕ) => Real.exp (-2 * π * b * z.im)) ∘ (PNat.val) => rfl
306306
apply Summable.subtype
307307
simp_rw [mul_comm, mul_assoc, Real.summable_exp_nat_mul_iff]
308308
simp [pi_pos, UpperHalfPlane.im_pos]
@@ -372,7 +372,7 @@ private lemma step_12 :
372372
calc π * ↑↑n
373373
_ ≤ π * ↑↑n * 1 := by rw [mul_one]
374374
_ < π * ↑↑n * z.im * 2 := by
375-
rw [mul_assoc (π * ↑↑n), mul_lt_mul_left (by positivity)]
375+
rw [mul_assoc (π * ↑↑n), mul_lt_mul_iff_right₀ (by positivity)]
376376
linarith
377377
· sorry
378378
· sorry

SpherePacking/MagicFunction/a/IntegralEstimates/I2.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ lemma parametrisation_eq : ∀ t ∈ Ioo (0 : ℝ) 1,
8484
exact zero_ne_one ((h₁.symm).trans h₂)
8585
_ = _ := by
8686
conv_lhs => rw [div_mul_div_comm (-1) (t + I)]
87-
simp only [neg_mul, one_mul, neg_sub, div_mul_eq_mul_div, div_add_div_same]
87+
simp only [neg_mul, one_mul, neg_sub, div_mul_eq_mul_div, ← add_div]
8888
congr
8989
· ac_rfl
9090
· ring_nf

SpherePacking/MagicFunction/a/IntegralEstimates/I4.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ lemma parametrisation_eq : ∀ t ∈ Ioo (0 : ℝ) 1,
9090
norm_num1 at h₂
9191
_ = _ := by
9292
conv_lhs => rw [div_mul_div_comm (-1) (-t + I)]
93-
simp only [neg_mul, one_mul, neg_sub, div_mul_eq_mul_div, div_add_div_same]
93+
simp only [neg_mul, one_mul, neg_sub, div_mul_eq_mul_div, ← add_div]
9494
congr
9595
· ring
9696
· ring_nf

0 commit comments

Comments
 (0)