Download data/lean/OAI/NumberTheory/TwoPoint/AffineDeduction.lean from introvoyz045/math: direct link, hf CLI and curl.
- Browser
- Download file 7.79 kB
-
https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/NumberTheory/TwoPoint/AffineDeduction.lean
- Command line
-
hf download hf://datasets/introvoyz045/math/data/lean/OAI/NumberTheory/TwoPoint/AffineDeduction.lean
-
curl -L -o AffineDeduction.lean https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/NumberTheory/TwoPoint/AffineDeduction.lean
7.79 kB
| import OAI.NumberTheory.TwoPoint.Bounds.Dilation | |
| import OAI.NumberTheory.TwoPoint.Bounds.AffineTransfer | |
| import OAI.NumberTheory.TwoPoint.Statements | |
| namespace OAI | |
| open Filter | |
| open scoped BigOperators | |
| namespace TwoPointCorrelations | |
| def ProgressionCorrectedElliott : Prop := | |
| β f g : β β β, Multiplicative f β Multiplicative g β | |
| OneBounded f β OneBounded g β | |
| (UniformlyNonpretentious f β¨ UniformlyNonpretentious g) β | |
| β h l b : β, 0 < h β 0 < l β | |
| Tendsto (fun N : β => residuePrefix (fun n => f n * g (n + h)) l b N / (N : β)) | |
| atTop (nhds 0) | |
| theorem Multiplicative.one_eq_zero_or_one {f : β β β} (hf : Multiplicative f) : | |
| f 1 = 0 β¨ f 1 = 1 := by | |
| have heq := hf 1 1 (by decide) (by decide) (by decide) | |
| have hprod : f 1 * (f 1 - 1) = 0 := by | |
| calc | |
| f 1 * (f 1 - 1) = f 1 * f 1 - f 1 := by ring | |
| _ = 0 := by simpa using congrArg (fun z : β => z - f 1) heq.symm | |
| rcases mul_eq_zero.mp hprod with h | h | |
| Β· exact Or.inl h | |
| Β· exact Or.inr (sub_eq_zero.mp h) | |
| theorem Multiplicative.zero_of_one_eq_zero {f : β β β} (hf : Multiplicative f) | |
| (h0 : f 1 = 0) {n : β} (hn : 0 < n) : f n = 0 := by | |
| simpa [h0] using hf 1 n (by decide) hn (Nat.coprime_one_left n) | |
| lemma residuePrefix_congr {u v : β β β} (h : β n, 0 < n β u n = v n) | |
| (l b N : β) : residuePrefix u l b N = residuePrefix v l b N := by | |
| unfold residuePrefix | |
| apply Finset.sum_congr rfl | |
| intro n hn | |
| rw [h n (Finset.mem_Ioc.mp hn).1] | |
| lemma residuePrefix_sum {ΞΉ : Type*} (s : Finset ΞΉ) (u : ΞΉ β β β β) (l b N : β) : | |
| residuePrefix (fun n => β i β s, u i n) l b N = | |
| β i β s, residuePrefix (u i) l b N := by | |
| unfold residuePrefix | |
| rw [Finset.sum_comm] | |
| apply Finset.sum_congr rfl | |
| intro n hn | |
| split_ifs <;> simp | |
| lemma residuePrefix_const_mul (c : β) (u : β β β) (l b N : β) : | |
| residuePrefix (fun n => c * u n) l b N = c * residuePrefix u l b N := by | |
| unfold residuePrefix | |
| rw [Finset.mul_sum] | |
| apply Finset.sum_congr rfl | |
| intro n hn | |
| split_ifs <;> simp | |
| /-- Finite signed local expansions preserve an established progression limit. -/ | |
| theorem finite_expansion_progression_zero {ΞΉ ΞΊ : Type*} | |
| (s : Finset ΞΉ) (t : Finset ΞΊ) (c : ΞΉ β β) (d : ΞΊ β β) | |
| (F : ΞΉ β β β β) (G : ΞΊ β β β β) (u v : β β β) | |
| (hu : β n, 0 < n β u n = β i β s, c i * F i n) | |
| (hv : β n, 0 < n β v n = β j β t, d j * G j n) | |
| (h l b : β) | |
| (hz : β i β s, β j β t, | |
| Tendsto (fun N : β => residuePrefix (fun n => F i n * G j (n + h)) l b N / | |
| (N : β)) atTop (nhds 0)) : | |
| Tendsto (fun N : β => residuePrefix (fun n => u n * v (n + h)) l b N / | |
| (N : β)) atTop (nhds 0) := by | |
| have heq (N : β) : residuePrefix (fun n => u n * v (n + h)) l b N / (N : β) = | |
| β i β s, β j β t, (c i * d j) * | |
| (residuePrefix (fun n => F i n * G j (n + h)) l b N / (N : β)) := by | |
| rw [residuePrefix_congr (v := fun n => β i β s, β j β t, | |
| (c i * d j) * (F i n * G j (n + h))) (by | |
| intro n hn | |
| rw [hu n hn, hv (n + h) (by omega)] | |
| rw [Finset.sum_mul] | |
| simp_rw [Finset.mul_sum] | |
| apply Finset.sum_congr rfl | |
| intro i hi | |
| apply Finset.sum_congr rfl | |
| intro j hj | |
| ring)] | |
| simp only [residuePrefix_sum, residuePrefix_const_mul, Finset.sum_div] | |
| apply Finset.sum_congr rfl | |
| intro i hi | |
| apply Finset.sum_congr rfl | |
| intro j hj | |
| ring | |
| simp_rw [heq] | |
| have hout := tendsto_finsetSum s (fun i hi => | |
| tendsto_finsetSum t (fun j hj => | |
| (tendsto_const_nhds (x := c i * d j)).mul (hz i hi j hj))) | |
| simpa using hout | |
| theorem ProgressionCorrectedElliott.dilations | |
| (hprog : ProgressionCorrectedElliott) (f g : β β β) | |
| (hf : Multiplicative f) (hg : Multiplicative g) | |
| (hf1 : f 1 = 1) (hg1 : g 1 = 1) | |
| (hfb : OneBounded f) (hgb : OneBounded g) | |
| (hnp : UniformlyNonpretentious f β¨ UniformlyNonpretentious g) | |
| (a a' h l b : β) (ha : 0 < a) (ha' : 0 < a') (hh : 0 < h) (hl : 0 < l) : | |
| Tendsto (fun N : β => | |
| residuePrefix (fun n => dilate a f n * dilate a' g (n + h)) l b N / (N : β)) | |
| atTop (nhds 0) := by | |
| apply finite_expansion_progression_zero a.primeFactors.powerset a'.primeFactors.powerset | |
| (fun E => (-1 : β) ^ E.card) (fun E => (-1 : β) ^ E.card) | |
| (dilationComponent a f) (dilationComponent a' g) | |
| (dilate a f) (dilate a' g) | |
| (fun n hn => dilate_eq_sum_components a f ha hf hf1 hn) | |
| (fun n hn => dilate_eq_sum_components a' g ha' hg hg1 hn) | |
| intro E _ E' _ | |
| apply hprog _ _ (dilationComponent_multiplicative a f E) | |
| (dilationComponent_multiplicative a' g E') | |
| (dilationComponent_oneBounded _ _ _ hfb) (dilationComponent_oneBounded _ _ _ hgb) | |
| _ h l b hh hl | |
| exact hnp.imp (dilationComponent_nonpretentious a f E hfb) | |
| (dilationComponent_nonpretentious a' g E' hgb) | |
| private theorem affine_ordered_zero (hprog : ProgressionCorrectedElliott) | |
| (f g : β β β) (hf : Multiplicative f) (hg : Multiplicative g) | |
| (hf1 : f 1 = 1) (hg1 : g 1 = 1) (hfb : OneBounded f) (hgb : OneBounded g) | |
| (hnp : UniformlyNonpretentious f β¨ UniformlyNonpretentious g) | |
| (aβ aβ bβ bβ : β) (haβ : 0 < aβ) (haβ : 0 < aβ) | |
| (horder : aβ * bβ < aβ * bβ) : | |
| Tendsto (fun N : β => affineSum f g aβ aβ bβ bβ N / (N : β)) atTop (nhds 0) := by | |
| have hp := hprog.dilations f g hf hg hf1 hg1 hfb hgb hnp aβ aβ | |
| (aβ * bβ - aβ * bβ) (aβ * aβ) (aβ * bβ) haβ haβ | |
| (Nat.sub_pos_of_lt horder) (Nat.mul_pos haβ haβ) | |
| have ht := affine_mean_tendsto_zero | |
| (fun m => dilate aβ f m * dilate aβ g (m + (aβ * bβ - aβ * bβ))) | |
| (aβ * aβ) (aβ * bβ) (Nat.mul_pos haβ haβ) hp | |
| apply ht.congr' | |
| apply Filter.Eventually.of_forall | |
| intro N | |
| dsimp only | |
| congr 1 | |
| unfold affineSum | |
| apply Finset.sum_congr rfl | |
| intro n hn | |
| have hl : aβ * aβ * n + aβ * bβ = aβ * (aβ * n + bβ) := by ring | |
| have hr : aβ * aβ * n + aβ * bβ + (aβ * bβ - aβ * bβ) = | |
| aβ * (aβ * n + bβ) := by | |
| calc | |
| _ = aβ * aβ * n + aβ * bβ := by omega | |
| _ = _ := by ring | |
| rw [hr, hl] | |
| simp [dilate, haβ.ne', haβ.ne'] | |
| /-- The manuscript's affine reduction, conditional here on its internal | |
| progression theorem. This is not the published-input conditional main result. -/ | |
| theorem ProgressionCorrectedElliott.affine (hprog : ProgressionCorrectedElliott) : | |
| AffineCorrectedElliott := by | |
| intro f g hf hg hfb hgb hnp aβ aβ bβ bβ haβ haβ hneq | |
| rcases hf.one_eq_zero_or_one with hf0 | hf1 | |
| Β· have hz (N : β) : affineSum f g aβ aβ bβ bβ N = 0 := by | |
| unfold affineSum | |
| apply Finset.sum_eq_zero | |
| intro n hn | |
| have hnpos := (Finset.mem_Icc.mp hn).1 | |
| rw [hf.zero_of_one_eq_zero hf0 (by nlinarith : 0 < aβ * n + bβ), zero_mul] | |
| simpa only [hz, zero_div] using (tendsto_const_nhds (x := (0 : β)) (f := atTop)) | |
| rcases hg.one_eq_zero_or_one with hg0 | hg1 | |
| Β· have hz (N : β) : affineSum f g aβ aβ bβ bβ N = 0 := by | |
| unfold affineSum | |
| apply Finset.sum_eq_zero | |
| intro n hn | |
| have hnpos := (Finset.mem_Icc.mp hn).1 | |
| rw [hg.zero_of_one_eq_zero hg0 (by nlinarith : 0 < aβ * n + bβ), mul_zero] | |
| simpa only [hz, zero_div] using (tendsto_const_nhds (x := (0 : β)) (f := atTop)) | |
| rcases lt_or_gt_of_ne hneq with hlt | hgt | |
| Β· have h := affine_ordered_zero hprog g f hg hf hg1 hf1 hgb hfb hnp.symm | |
| aβ aβ bβ bβ haβ haβ hlt | |
| simpa only [affineSum_swap f g] using h | |
| Β· exact affine_ordered_zero hprog f g hf hg hf1 hg1 hfb hgb hnp | |
| aβ aβ bβ bβ haβ haβ hgt | |
| end TwoPointCorrelations | |
| end OAI | |