Download data/lean/OAI/Geometry/PinnedDistances/GlobalOverlap.lean from introvoyz045/math: direct link, hf CLI and curl.
- Browser
- Download file 22.9 kB
-
https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Geometry/PinnedDistances/GlobalOverlap.lean
- Command line
-
hf download hf://datasets/introvoyz045/math/data/lean/OAI/Geometry/PinnedDistances/GlobalOverlap.lean
-
curl -L -o GlobalOverlap.lean https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Geometry/PinnedDistances/GlobalOverlap.lean
22.9 kB
| import OAI.Geometry.PinnedDistances.FiberOverlap | |
| namespace OAI | |
| universe u1 u2 u3 | |
| section | |
| noncomputable section | |
| open NumberField | |
| open scoped BigOperators | |
| noncomputable section | |
| open MeasureTheory | |
| open scoped Topology | |
| noncomputable section | |
| open MeasureTheory | |
| open scoped Topology ENNReal | |
| noncomputable section | |
| open MeasureTheory NumberField | |
| open scoped BigOperators | |
| noncomputable section | |
| open scoped BigOperators | |
| open MeasureTheory | |
| namespace WeakPinned.Grid | |
| open MeasureTheory | |
| lemma truncated_error_integrable {z w : β} (hne : z β w) (t : β) : | |
| Integrable (fun Ο => max (|error Ο z w|-t) 0) fullLaw := | |
| (((error_integrable_full hne).abs.sub (integrable_const t)).sup (integrable_zero _ _ _)) | |
| lemma truncated_error_mean {z w : β} (hne : z β w) {t : β} (ht : 0 β€ t) : | |
| (β« Ο, max (|error Ο z w|-t) 0 βfullLaw) β€ 4*Real.exp (-t) := by | |
| have hm : Measurable (fun Ο => max (|error Ο z w|-t) 0) := | |
| ((measurable_error hne).abs.sub_const t).max measurable_const | |
| have hn (Ο : FullSample) : 0 β€ max (|error Ο z w|-t) 0 := le_max_right _ _ | |
| have hi := truncated_error_integrable hne t | |
| have he : IntegrableOn (fun u : β => (4*Real.exp (-t))*Real.exp (-u)) (Set.Ioi 0) volume := by | |
| simpa only [neg_one_mul, IntegrableOn] using | |
| (integrableOn_exp_mul_Ioi (by norm_num : (-1:β)<0) 0).const_mul (4*Real.exp (-t)) | |
| have hb : (β«β» Ο, ENNReal.ofReal (max (|error Ο z w|-t) 0) βfullLaw) β€ | |
| ENNReal.ofReal (4*Real.exp (-t)) := by | |
| rw [lintegral_eq_lintegral_meas_lt fullLaw | |
| (Filter.Eventually.of_forall hn) hm.aemeasurable] | |
| calc | |
| _ β€ β«β» u : β in Set.Ioi 0, ENNReal.ofReal ((4*Real.exp (-t))*Real.exp (-u)) := by | |
| apply lintegral_mono_ae | |
| filter_upwards [ae_restrict_mem measurableSet_Ioi] with u hu | |
| have hu0 : 0 < u := hu | |
| have hs : {Ο : FullSample | u < max (|error Ο z w|-t) 0} = | |
| {Ο : FullSample | u+t < |error Ο z w|} := by | |
| ext Ο | |
| simp only [Set.mem_ofPred_eq,lt_max_iff] | |
| constructor | |
| Β· rintro (h | h) <;> linarith | |
| Β· intro h; exact Or.inl (by linarith) | |
| rw [hs, β ENNReal.ofReal_toReal (measure_ne_top fullLaw _)] | |
| have hh := abs_error_tail_full hne (add_nonneg hu.le ht) | |
| apply ENNReal.ofReal_le_ofReal | |
| calc | |
| _ β€ 4*Real.exp (-(u+t)) := hh | |
| _ = _ := by rw [neg_add,Real.exp_add]; ring | |
| _ = ENNReal.ofReal (4*Real.exp (-t)) := by | |
| rw [β ofReal_integral_eq_lintegral_ofReal he (by filter_upwards with u; positivity)] | |
| congr 1 | |
| rw [integral_const_mul] | |
| have hz := integral_exp_mul_Ioi (by norm_num : (-1:β)<0) (0:β) | |
| simp only [neg_one_mul,mul_zero,Real.exp_zero,neg_div_neg_eq,div_one] at hz | |
| rw [hz,mul_one] | |
| rw [β ofReal_integral_eq_lintegral_ofReal hi (Filter.Eventually.of_forall hn)] at hb | |
| exact (ENNReal.ofReal_le_ofReal_iff (by positivity)).mp hb | |
| lemma truncated_sum_bound (a b H : β) : | |
| max (|a+b|-H) 0 β€ 2*max (|a|-H/2) 0 + 2*max (|b|-H/2) 0 := by | |
| apply max_le | |
| Β· have ht := abs_add_le a b | |
| have hβ := le_max_left (|a|-H/2) 0 | |
| have hβ := le_max_left (|b|-H/2) 0 | |
| have hβ := le_max_right (|a|-H/2) 0 | |
| have hβ := le_max_right (|b|-H/2) 0 | |
| linarith | |
| Β· positivity | |
| lemma paired_error_mean {zβ wβ zβ wβ : β} (hβ : zβ β wβ) (hβ : zβ β wβ) | |
| {H : β} (hH : 0 β€ H) : | |
| (β« Ο, max (|error Ο zβ wβ + error Ο zβ wβ|-H) 0 βfullLaw) β€ | |
| 16*Real.exp (-H/2) := by | |
| have hi : Integrable (fun Ο => max (|error Ο zβ wβ + error Ο zβ wβ|-H) 0) fullLaw := by | |
| exact Integrable.sup (((error_integrable_full hβ).add (error_integrable_full hβ)).abs.sub | |
| (integrable_const H)) (integrable_zero _ _ _) | |
| have hia := truncated_error_integrable hβ (H/2) | |
| have hib := truncated_error_integrable hβ (H/2) | |
| have hh := integral_mono hi ((hia.const_mul 2).add (hib.const_mul 2)) | |
| (fun Ο => truncated_sum_bound (error Ο zβ wβ) (error Ο zβ wβ) H) | |
| simp only [Pi.add_apply] at hh | |
| rw [integral_add (hia.const_mul 2) (hib.const_mul 2)] at hh | |
| simp only [integral_const_mul] at hh | |
| have hta := truncated_error_mean hβ (div_nonneg hH (by norm_num : (0:β)β€2)) | |
| have htb := truncated_error_mean hβ (div_nonneg hH (by norm_num : (0:β)β€2)) | |
| rw [neg_div'] at hta htb | |
| linarith | |
| end WeakPinned.Grid | |
| namespace WeakPinned.Global | |
| open Hierarchy Variance SmallFiber | |
| variable {P : Type u1} {I : Type u2} [Fintype P] [DecidableEq P] [Fintype I] | |
| variable {K : Type u3} [Field K] [NumberField K] | |
| variable (Zβ Zβ : P β K) (hβ : Function.Injective Zβ) (hβ : Function.Injective Zβ) | |
| include hβ hβ | |
| lemma arch_fiber_defect (v : InfinitePlace K) (a b : P) (hab : a β b) (t : K) | |
| (ht : (Zβ a-Zβ b)*(Zβ a-Zβ b)=t) : | |
| (fun Ο => (arch Zβ v Ο).value a b+(arch Zβ v Ο).value a b+Real.log (v t)) =α΅[Grid.fullLaw] | |
| (fun Ο => Grid.error Ο (v.embedding (Zβ a)) (v.embedding (Zβ b))+ | |
| Grid.error Ο (v.embedding (Zβ a)) (v.embedding (Zβ b))) := by | |
| have he := Arithmetic.raw_fiber_identity v.val (Zβ a-Zβ b) (Zβ a-Zβ b) | |
| (sub_ne_zero.mpr (hβ.ne hab)) (sub_ne_zero.mpr (hβ.ne hab)) | |
| rw [ht] at he | |
| change -Real.log (v (Zβ a-Zβ b)) + -Real.log (v (Zβ a-Zβ b)) = -Real.log (v t) at he | |
| filter_upwards [arch_value_ae Zβ hβ v hab,arch_value_ae Zβ hβ v hab] with Ο hA hB | |
| rw [hA,hB] | |
| simp only [Grid.error,β map_sub,InfinitePlace.norm_embedding_eq] | |
| linarith | |
| lemma arch_defect_mean (v : InfinitePlace K) (a b : P) (hab : a β b) (t : K) | |
| (ht : (Zβ a-Zβ b)*(Zβ a-Zβ b)=t) (H : β) (hH : 0 β€ H) : | |
| (β« Ο, max (|(arch Zβ v Ο).value a b+(arch Zβ v Ο).value a b+Real.log (v t)|-H) 0 βGrid.fullLaw) β€ | |
| 16*Real.exp (-H/2) := by | |
| have he := arch_fiber_defect Zβ Zβ hβ hβ v a b hab t ht | |
| have he' : (fun Ο => max (|(arch Zβ v Ο).value a b+(arch Zβ v Ο).value a b+Real.log (v t)|-H) 0) =α΅[Grid.fullLaw] | |
| (fun Ο => max (|Grid.error Ο (v.embedding (Zβ a)) (v.embedding (Zβ b))+ | |
| Grid.error Ο (v.embedding (Zβ a)) (v.embedding (Zβ b))|-H) 0) := by | |
| filter_upwards [he] with Ο hh | |
| rw [hh] | |
| rw [integral_congr_ae he'] | |
| exact Grid.paired_error_mean (embedding_ne Zβ hβ v hab) (embedding_ne Zβ hβ v hab) hH | |
| lemma arch_weighted_defect (v : InfinitePlace K) (w : I β β) (p : I β P β β) | |
| (x : I β P) (t : I β K) (hw : β i, 0 β€ w i) (hW : β i, w i=1) | |
| (hp : β i y, 0 β€ p i y) (hp1 : β i, β y, p i y=1) (hx : β i, p i (x i)=0) | |
| (ht : β i y, p i y β 0 β (Zβ (x i)-Zβ y)*(Zβ (x i)-Zβ y)=t i) | |
| (H : β) (hH : 0 β€ H) : | |
| (β« Ο, β i, w i*β y, p i y*max (|(arch Zβ v Ο).value (x i) y+ | |
| (arch Zβ v Ο).value (x i) y+Real.log (v (t i))|-H) 0 βGrid.fullLaw) β€ 16*Real.exp (-H/2) := by | |
| have hi (i : I) (y : P) : Integrable (fun Ο => max (|(arch Zβ v Ο).value (x i) y+ | |
| (arch Zβ v Ο).value (x i) y+Real.log (v (t i))|-H) 0) Grid.fullLaw := | |
| ((((arch_integrable Zβ hβ v _ _).add (arch_integrable Zβ hβ v _ _)).add (integrable_const _)).abs.sub | |
| (integrable_const H)).sup (integrable_zero _ _ _) | |
| rw [integral_finsetSum _ (fun i _ => (integrable_finsetSum (s:=Finset.univ) | |
| (fun y _ => (hi i y).const_mul _)).const_mul _)] | |
| simp_rw [integral_const_mul,integral_finsetSum _ (fun y _ => (hi _ y).const_mul _),integral_const_mul] | |
| calc | |
| _ β€ β i, w i * β y, p i y*(16*Real.exp (-H/2)) := by | |
| apply Finset.sum_le_sum | |
| intro i _ | |
| apply mul_le_mul_of_nonneg_left _ (hw i) | |
| apply Finset.sum_le_sum | |
| intro y _ | |
| by_cases hy : p i y=0 | |
| Β· simp [hy] | |
| Β· have hxy : x i β y := by intro he; rw [β he,hx i] at hy; exact hy rfl | |
| exact mul_le_mul_of_nonneg_left (arch_defect_mean Zβ Zβ hβ hβ v _ _ hxy _ (ht i y hy) H hH) (hp i y) | |
| _ = _ := by simp only [β Finset.sum_mul,hp1,one_mul,hW] | |
| lemma arch_small_fiber (hn : 2 β€ Fintype.card P) (v : InfinitePlace K) | |
| (w : I β β) (p : I β P β β) (x : I β P) (t : I β K) | |
| (hw : β i, 0 β€ w i) (hW : β i, w i=1) (hp : β i y, 0 β€ p i y) | |
| (hp1 : β i, β y, p i y=1) (hx : β i, p i (x i)=0) | |
| (ht : β i y, p i y β 0 β (Zβ (x i)-Zβ y)*(Zβ (x i)-Zβ y)=t i) | |
| (B Ο lam H : β) (hB : 0 β€ B) (hlam : 0 β€ lam) (hlam2 : lam β€ 1/2) | |
| (hΟ : 0 < Ο) (hΟ1 : Ο β€ 1) (hΟn : 2 β€ Ο*(Fintype.card P:β)) (hH : 0 β€ H) | |
| (hdom : β a b, a β b β edgeLaw w p x a b β€ B/((Fintype.card P:β)*((Fintype.card P:β)-1))) : | |
| (β C, (β« Ο, (arch Zβ v Ο).mass C βGrid.fullLaw)*slice w p x lam C) β€ | |
| (2*lam/Ο^2)*(β C, (β« Ο, (arch Zβ v Ο).mass C βGrid.fullLaw)*pairCell Finset.univ C) + | |
| B*Ο/(Fintype.card P:β)*((β y, β« Ο, (arch Zβ v Ο).potential y βGrid.fullLaw)+ | |
| (β y, β« Ο, (arch Zβ v Ο).potential y βGrid.fullLaw)) + | |
| 2*lam*B*(β C, (β« Ο, (arch Zβ v Ο).mass C βGrid.fullLaw)*pairCell Finset.univ C) + 2*lam*H + | |
| 16*Real.exp (-H/2) := by | |
| have hiMβ (C : Finset P) := Depth.integrable_mass_param (arch Zβ v) (arch_measurable Zβ hβ v) | |
| (arch_integrable Zβ hβ v) hn C | |
| have hiMβ (C : Finset P) := Depth.integrable_mass_param (arch Zβ v) (arch_measurable Zβ hβ v) | |
| (arch_integrable Zβ hβ v) hn C | |
| have hiSβ (y : P) := Depth.integrable_potential_param (arch Zβ v) (arch_measurable Zβ hβ v) | |
| (arch_integrable Zβ hβ v) hn y | |
| have hiSβ (y : P) := Depth.integrable_potential_param (arch Zβ v) (arch_measurable Zβ hβ v) | |
| (arch_integrable Zβ hβ v) hn y | |
| have hiE (i : I) (y : P) : Integrable (fun Ο => max (|(arch Zβ v Ο).value (x i) y+ | |
| (arch Zβ v Ο).value (x i) y+Real.log (v (t i))|-H) 0) Grid.fullLaw := by | |
| have hd := ((arch_integrable Zβ hβ v (x i) y).add (arch_integrable Zβ hβ v (x i) y)).add | |
| (integrable_const (Real.log (v (t i)))) | |
| exact (hd.abs.sub (integrable_const H)).sup (integrable_zero _ _ _) | |
| have hA := (integrable_finsetSum (s:=Finset.univ) (fun C _ => (hiMβ C).mul_const (pairCell Finset.univ C))).const_mul (2*lam/Ο^2) | |
| have hS := ((integrable_finsetSum (s:=Finset.univ) (fun y _ => hiSβ y)).add | |
| (integrable_finsetSum (s:=Finset.univ) (fun y _ => hiSβ y))).const_mul (B*Ο/Fintype.card P) | |
| have hA' := (integrable_finsetSum (s:=Finset.univ) (fun C _ => (hiMβ C).mul_const (pairCell Finset.univ C))).const_mul (2*lam*B) | |
| have hE := integrable_finsetSum (s:=Finset.univ) (fun i _ => | |
| (integrable_finsetSum (s:=Finset.univ) (fun y _ => (hiE i y).const_mul (p i y))).const_mul (w i)) | |
| have hb := integral_mono (integrable_finsetSum (s:=Finset.univ) (fun C _ => (hiMβ C).mul_const (slice w p x lam C))) | |
| ((((hA.add hS).add hA').add (integrable_const (2*lam*H))).add hE) | |
| (fun Ο => by | |
| simpa only [Pi.add_apply,sub_neg_eq_add] using | |
| (local_small_fiber_reduced (arch Zβ v Ο) (arch Zβ v Ο) w p x hw hW hp hp1 hx hn | |
| (fun i => -Real.log (v (t i))) B Ο lam H hB hlam hlam2 hΟ hΟ1 hΟn hH hdom)) | |
| have hIβ := integral_add (((hA.add hS).add hA').add (integrable_const (2*lam*H))) hE | |
| have hIβ := integral_add ((hA.add hS).add hA') (integrable_const (2*lam*H)) | |
| have hIβ := integral_add (hA.add hS) hA' | |
| have hIβ := integral_add hA hS | |
| have hIβ := integral_add (integrable_finsetSum (s:=Finset.univ) (fun y _ => hiSβ y)) | |
| (integrable_finsetSum (s:=Finset.univ) (fun y _ => hiSβ y)) | |
| simp only [Pi.add_apply] at hb hIβ hIβ hIβ hIβ hIβ | |
| rw [hIβ,hIβ,hIβ,hIβ] at hb | |
| simp only [integral_const,probReal_univ,one_smul,integral_const_mul] at hb | |
| rw [hIβ ] at hb | |
| rw [integral_finsetSum _ (fun C _ => (hiMβ C).mul_const (slice w p x lam C)), | |
| integral_finsetSum _ (fun C _ => (hiMβ C).mul_const (pairCell Finset.univ C)), | |
| integral_finsetSum _ (fun C _ => (hiMβ C).mul_const (pairCell Finset.univ C)), | |
| integral_finsetSum _ (fun y _ => hiSβ y),integral_finsetSum _ (fun y _ => hiSβ y)] at hb | |
| simp only [integral_mul_const] at hb | |
| have he := arch_weighted_defect Zβ Zβ hβ hβ v w p x t hw hW hp hp1 hx ht H hH | |
| linarith | |
| lemma finite_small_fiber (hn : 2 β€ Fintype.card P) (v : FinitePlace K) | |
| (w : I β β) (p : I β P β β) (x : I β P) (t : I β K) | |
| (hw : β i, 0 β€ w i) (hW : β i, w i=1) (hp : β i y, 0 β€ p i y) | |
| (hp1 : β i, β y, p i y=1) (hx : β i, p i (x i)=0) | |
| (ht : β i y, p i y β 0 β (Zβ (x i)-Zβ y)*(Zβ (x i)-Zβ y)=t i) | |
| (B Ο lam : β) (hB : 0 β€ B) (hlam : 0 β€ lam) (hlam2 : lam β€ 1/2) | |
| (hΟ : 0 < Ο) (hΟ1 : Ο β€ 1) (hΟn : 2 β€ Ο*(Fintype.card P:β)) | |
| (hdom : β a b, a β b β edgeLaw w p x a b β€ B/((Fintype.card P:β)*((Fintype.card P:β)-1))) : | |
| (β C, (finite Zβ hβ v).mass C*slice w p x lam C) β€ | |
| (2*lam/Ο^2)*(β C, (finite Zβ hβ v).mass C*pairCell Finset.univ C) + | |
| B*Ο/(Fintype.card P:β)*((β y, (finite Zβ hβ v).potential y)+(β y, (finite Zβ hβ v).potential y)) + | |
| 2*lam*B*(β C, (finite Zβ hβ v).mass C*pairCell Finset.univ C) := by | |
| have hb := local_small_fiber_reduced (finite Zβ hβ v) (finite Zβ hβ v) w p x hw hW hp hp1 hx hn | |
| (fun i => -Real.log (v (t i))) B Ο lam 0 hB hlam hlam2 hΟ hΟ1 hΟn (le_refl _) hdom | |
| have he (i : I) (y : P) : p i y * max (|(finite Zβ hβ v).value (x i) y+ | |
| (finite Zβ hβ v).value (x i) y- -Real.log (v (t i))|-0) 0=0 := by | |
| by_cases hy : p i y=0 | |
| Β· simp [hy] | |
| Β· have hxy : x i β y := by intro he; rw [β he,hx i] at hy; exact hy rfl | |
| have hh := Arithmetic.raw_fiber_identity v.val (Zβ (x i)-Zβ y) (Zβ (x i)-Zβ y) | |
| (sub_ne_zero.mpr (hβ.ne hxy)) (sub_ne_zero.mpr (hβ.ne hxy)) | |
| change -Real.log (v (Zβ (x i)-Zβ y)) + -Real.log (v (Zβ (x i)-Zβ y)) = | |
| -Real.log (v ((Zβ (x i)-Zβ y)*(Zβ (x i)-Zβ y))) at hh | |
| rw [ht i y hy] at hh | |
| simp only [finite,hxy,reduceIte,hh,sub_self,abs_zero,max_self,mul_zero] | |
| simpa only [he,Finset.sum_const_zero,mul_zero,add_zero] using hb | |
| omit hβ hβ in | |
| lemma finite_zero_outside {Z : P β K} (hZ : Function.Injective Z) (v : FinitePlace K) | |
| (hv : v β badPlaces Z hZ) : β a b, (finite Z hZ v).value a b=0 := by | |
| intro a b | |
| by_cases hab : a=b | |
| Β· simp [finite,hab] | |
| Β· have hunit : v (Z a-Z b)=1 := by | |
| by_contra h | |
| exact hv ((badPlaces_mem Z hZ v).mpr β¨a,b,hab,hβ©) | |
| simp [finite,hab,hunit] | |
| omit hβ hβ in | |
| lemma finite_mass_zero {Z : P β K} (hZ : Function.Injective Z) (hn : 2 β€ Fintype.card P) | |
| (v : FinitePlace K) (hv : v β badPlaces Z hZ) (C : Finset P) : (finite Z hZ v).mass C=0 := by | |
| have hz := (finite Z hZ v).zero_values hn (finite_zero_outside hZ v hv) | |
| by_cases hC : C.card β€ 1 | |
| Β· exact (finite Z hZ v).mass_singleton C hC | |
| Β· obtain β¨a,ha,b,hb,habβ© := Finset.one_lt_card.mp (by omega : 1<C.card) | |
| have hl := (finite Z hZ v).mass_le_overlap hn C a b hab ha hb | |
| rw [hz.2.2 a b hab] at hl | |
| exact le_antisymm hl ((finite Z hZ v).mass_nonneg C) | |
| omit hβ hβ in | |
| lemma sum_finite_mass {Z : P β K} (hZ : Function.Injective Z) (hn : 2 β€ Fintype.card P) | |
| (V : Finset (FinitePlace K)) (hV : badPlaces Z hZ β V) (C : Finset P) : | |
| (β v β V, (finite Z hZ v).mass C) = β v β badPlaces Z hZ, (finite Z hZ v).mass C := by | |
| symm | |
| exact Finset.sum_subset hV (fun v _ hv => finite_mass_zero hZ hn v hv C) | |
| omit hβ hβ in | |
| lemma sum_finite_potential {Z : P β K} (hZ : Function.Injective Z) (hn : 2 β€ Fintype.card P) | |
| (V : Finset (FinitePlace K)) (hV : badPlaces Z hZ β V) (a : P) : | |
| (β v β V, (finite Z hZ v).potential a) = β v β badPlaces Z hZ, (finite Z hZ v).potential a := by | |
| symm | |
| exact Finset.sum_subset hV (fun v _ hv => | |
| ((finite Z hZ v).zero_values hn (finite_zero_outside hZ v hv)).2.1 a) | |
| omit hβ hβ in | |
| def placeAverage (V : Finset (FinitePlace K)) (A : InfinitePlace K β β) (F : FinitePlace K β β) : β := | |
| (β v, Arithmetic.archWeight v * A v) + (Module.finrank β K:β)β»ΒΉ * β v β V, F v | |
| omit hβ hβ in | |
| lemma placeAverage_mono (V : Finset (FinitePlace K)) {A A' : InfinitePlace K β β} {F F' : FinitePlace K β β} | |
| (hA : β v, A v β€ A' v) (hF : β v β V, F v β€ F' v) : placeAverage V A F β€ placeAverage V A' F' := by | |
| apply add_le_add | |
| Β· exact Finset.sum_le_sum (fun v _ => mul_le_mul_of_nonneg_left (hA v) (Arithmetic.archWeight_nonneg v)) | |
| Β· exact mul_le_mul_of_nonneg_left (Finset.sum_le_sum hF) (by positivity) | |
| omit hβ hβ in | |
| lemma placeAverage_add (V : Finset (FinitePlace K)) (A A' : InfinitePlace K β β) (F F' : FinitePlace K β β) : | |
| placeAverage V (fun v => A v+A' v) (fun v => F v+F' v) = placeAverage V A F + placeAverage V A' F' := by | |
| simp only [placeAverage,mul_add,Finset.sum_add_distrib] | |
| ring | |
| omit hβ hβ in | |
| lemma placeAverage_mul (V : Finset (FinitePlace K)) (a : β) (A : InfinitePlace K β β) (F : FinitePlace K β β) : | |
| placeAverage V (fun v => a*A v) (fun v => a*F v) = a*placeAverage V A F := by | |
| simp only [placeAverage,Finset.mul_sum,mul_add] | |
| congr 1 | |
| Β· exact Finset.sum_congr rfl (fun v _ => by ring) | |
| Β· exact Finset.sum_congr rfl (fun v _ => by ring) | |
| omit hβ hβ in | |
| lemma placeAverage_arch_const (V : Finset (FinitePlace K)) (a : β) : | |
| placeAverage V (fun _ => a) (fun _ => 0) = a := by | |
| simp only [placeAverage,Finset.sum_const_zero,mul_zero,add_zero,β Finset.sum_mul,Arithmetic.sum_archWeight,one_mul] | |
| omit hβ hβ in | |
| lemma cellIntegral_placeAverage {Z : P β K} (hZ : Function.Injective Z) (hn : 2 β€ Fintype.card P) | |
| (V : Finset (FinitePlace K)) (hV : badPlaces Z hZ β V) (f : Finset P β β) : | |
| weightedIntegral (cellMass Z hZ) f = placeAverage V | |
| (fun v => β C, (β« Ο, (arch Z v Ο).mass C βGrid.fullLaw)*f C) | |
| (fun v => β C, (finite Z hZ v).mass C*f C) := by | |
| simp only [weightedIntegral,cellMass,placeAverage,add_mul,Finset.sum_add_distrib] | |
| congr 1 | |
| Β· simp_rw [Finset.mul_sum,Finset.sum_mul] | |
| rw [Finset.sum_comm] | |
| apply Finset.sum_congr rfl | |
| intro v _ | |
| exact Finset.sum_congr rfl (fun C _ => by ring) | |
| Β· rw [Finset.sum_comm (s:=V)] | |
| simp_rw [β Finset.sum_mul, sum_finite_mass hZ hn V hV,Finset.mul_sum] | |
| exact Finset.sum_congr rfl (fun C _ => by rw [β Finset.mul_sum]; ring) | |
| omit hβ hβ in | |
| lemma potentialIntegral_placeAverage {Z : P β K} (hZ : Function.Injective Z) (hn : 2 β€ Fintype.card P) | |
| (V : Finset (FinitePlace K)) (hV : badPlaces Z hZ β V) : | |
| (β y, S Z hZ y) = placeAverage V | |
| (fun v => β y, β« Ο, (arch Z v Ο).potential y βGrid.fullLaw) | |
| (fun v => β y, (finite Z hZ v).potential y) := by | |
| simp only [S,placeAverage,Finset.sum_add_distrib] | |
| congr 1 | |
| Β· simp_rw [Finset.mul_sum] | |
| rw [Finset.sum_comm] | |
| Β· rw [Finset.sum_comm (s:=V)] | |
| simp_rw [sum_finite_potential hZ hn V hV,Finset.mul_sum] | |
| lemma arithmetic_small_fiber_one (hn : 2 β€ Fintype.card P) | |
| (w : I β β) (p : I β P β β) (x : I β P) (t : I β K) | |
| (hw : β i, 0 β€ w i) (hW : β i, w i=1) (hp : β i y, 0 β€ p i y) | |
| (hp1 : β i, β y, p i y=1) (hx : β i, p i (x i)=0) | |
| (ht : β i y, p i y β 0 β (Zβ (x i)-Zβ y)*(Zβ (x i)-Zβ y)=t i) | |
| (B Ο lam H : β) (hB : 0 β€ B) (hlam : 0 β€ lam) (hlam2 : lam β€ 1/2) | |
| (hΟ : 0 < Ο) (hΟ1 : Ο β€ 1) (hΟn : 2 β€ Ο*(Fintype.card P:β)) (hH : 0 β€ H) | |
| (hdom : β a b, a β b β edgeLaw w p x a b β€ B/((Fintype.card P:β)*((Fintype.card P:β)-1))) : | |
| weightedIntegral (cellMass Zβ hβ) (slice w p x lam) β€ | |
| (2*lam/Ο^2)*weightedIntegral (cellMass Zβ hβ) (pairCell Finset.univ) + | |
| B*Ο/(Fintype.card P:β)*((β y, S Zβ hβ y)+(β y, S Zβ hβ y)) + | |
| 2*lam*B*weightedIntegral (cellMass Zβ hβ) (pairCell Finset.univ) + 2*lam*H + | |
| 16*Real.exp (-H/2) := by | |
| classical | |
| let V := badPlaces Zβ hβ βͺ badPlaces Zβ hβ | |
| have hVβ : badPlaces Zβ hβ β V := Finset.subset_union_left | |
| have hVβ : badPlaces Zβ hβ β V := Finset.subset_union_right | |
| have hf (v : FinitePlace K) : (β C, (finite Zβ hβ v).mass C*slice w p x lam C) β€ | |
| (2*lam/Ο^2)*(β C, (finite Zβ hβ v).mass C*pairCell Finset.univ C) + | |
| B*Ο/(Fintype.card P:β)*((β y, (finite Zβ hβ v).potential y)+(β y, (finite Zβ hβ v).potential y)) + | |
| 2*lam*B*(β C, (finite Zβ hβ v).mass C*pairCell Finset.univ C) + 0 + 0 := by | |
| simpa only [add_zero] using finite_small_fiber Zβ Zβ hβ hβ hn v w p x t hw hW hp hp1 hx ht B Ο lam hB hlam hlam2 hΟ hΟ1 hΟn hdom | |
| have hb := placeAverage_mono V | |
| (fun v => arch_small_fiber Zβ Zβ hβ hβ hn v w p x t hw hW hp hp1 hx ht B Ο lam H hB hlam hlam2 hΟ hΟ1 hΟn hH hdom) | |
| (fun v _ => hf v) | |
| simp only [placeAverage_add,placeAverage_mul,placeAverage_arch_const] at hb | |
| rw [β cellIntegral_placeAverage hβ hn V hVβ,β cellIntegral_placeAverage hβ hn V hVβ, | |
| β cellIntegral_placeAverage hβ hn V hVβ,β potentialIntegral_placeAverage hβ hn V hVβ, | |
| β potentialIntegral_placeAverage hβ hn V hVβ] at hb | |
| exact hb | |
| /-- The global small-fiber estimate, uniformly over number fields, places and configurations. -/ | |
| lemma arithmetic_small_fiber (hn : 2 β€ Fintype.card P) | |
| (w : I β β) (p : I β P β β) (x : I β P) (t : I β K) | |
| (hw : β i, 0 β€ w i) (hW : β i, w i=1) (hp : β i y, 0 β€ p i y) | |
| (hp1 : β i, β y, p i y=1) (hx : β i, p i (x i)=0) | |
| (ht : β i y, p i y β 0 β (Zβ (x i)-Zβ y)*(Zβ (x i)-Zβ y)=t i) | |
| (B Ο lam H : β) (hB : 0 β€ B) (hlam : 0 β€ lam) (hlam2 : lam β€ 1/2) | |
| (hΟ : 0 < Ο) (hΟ1 : Ο β€ 1) (hΟn : 2 β€ Ο*(Fintype.card P:β)) (hH : 0 β€ H) | |
| (hdom : β a b, a β b β edgeLaw w p x a b β€ B/((Fintype.card P:β)*((Fintype.card P:β)-1))) : | |
| weightedIntegral (totalMass Zβ Zβ hβ hβ) (slice w p x lam) β€ | |
| (2*lam/Ο^2+2*lam*B)*weightedIntegral (totalMass Zβ Zβ hβ hβ) (pairCell Finset.univ) + | |
| 2*B*Ο/(Fintype.card P:β)*(β y, totalPotential Zβ Zβ hβ hβ y) + 4*lam*H + | |
| 32*Real.exp (-H/2) := by | |
| have hA := arithmetic_small_fiber_one Zβ Zβ hβ hβ hn w p x t hw hW hp hp1 hx ht B Ο lam H hB hlam hlam2 hΟ hΟ1 hΟn hH hdom | |
| have ht' : β i y, p i y β 0 β (Zβ (x i)-Zβ y)*(Zβ (x i)-Zβ y)=t i := by | |
| intro i y hy | |
| rw [mul_comm] | |
| exact ht i y hy | |
| have hB' := arithmetic_small_fiber_one Zβ Zβ hβ hβ hn w p x t hw hW hp hp1 hx ht' B Ο lam H hB hlam hlam2 hΟ hΟ1 hΟn hH hdom | |
| simp only [weightedIntegral,totalMass,totalPotential,add_mul,Finset.sum_add_distrib] at hA hB' β’ | |
| linear_combination hA+hB' | |
| end WeakPinned.Global | |
| noncomputable section | |
| open Filter | |
| open scoped Topology | |
| end | |
| end | |
| end | |
| end | |
| end | |
| end | |
| end | |
| end OAI | |