Download data/lean/OAI/NumberTheory/Jacobsthal/Analysis/TripleWeightDensity.lean from introvoyz045/math: direct link, hf CLI and curl.
- Browser
- Download file 4.13 kB
-
https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/NumberTheory/Jacobsthal/Analysis/TripleWeightDensity.lean
- Command line
-
hf download hf://datasets/introvoyz045/math/data/lean/OAI/NumberTheory/Jacobsthal/Analysis/TripleWeightDensity.lean
-
curl -L -o TripleWeightDensity.lean https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/NumberTheory/Jacobsthal/Analysis/TripleWeightDensity.lean
4.13 kB
| import OAI.NumberTheory.Jacobsthal.Estimates.HarmonicConditioning | |
| import OAI.NumberTheory.Jacobsthal.Estimates.SourceInitialDiscard | |
| namespace OAI | |
| namespace Erdos970 | |
| open scoped _root_.Erdos970 | |
| section | |
| namespace ErdosInverseCells | |
| attribute [local instance] Classical.decEq | |
| theorem weighted_to_count_density {Ξ± : Type*} (A B : Finset Ξ±) (hB : B β A) (hA : 0 < A.card) | |
| (w : Ξ± β β) (G rho : β) (hG : 0 < G) (hTotal : 0 < β a β A,w a) | |
| (hspread : β a β A,β b β A,w a β€ G*w b) | |
| (hweighted : rho*(β a β A,w a) β€ β b β B,w b) : | |
| (rho/G)*(A.card : β) β€ (B.card : β) := by | |
| have hspreadSum := subset_weight_spread A B hB hA w G hspread | |
| have hcoef : rho β€ (B.card : β)*G/(A.card : β) := | |
| le_of_mul_le_mul_right (hweighted.trans hspreadSum) hTotal | |
| have hApos : (0 : β) < A.card := by exact_mod_cast hA | |
| have hmul := (le_div_iffβ hApos).mp hcoef | |
| calc | |
| _ = (rho*(A.card : β))/G := by ring | |
| _ β€ (B.card : β) := (div_le_iffβ hG).mpr hmul | |
| end ErdosInverseCells | |
| end | |
| section | |
| namespace ErdosInverseCells | |
| open ErdosInverseSampling | |
| attribute [local instance] Classical.decEq | |
| attribute [local instance] Classical.propDecidable | |
| theorem triple_weight_spread (P Q U : Finset β) (xi : β) (hxi : 0 β€ xi) (hxi1 : xi β€ 1) | |
| (hP : β p β P,β r β P,(p : β)β»ΒΉ β€ (1+xi)*(r : β)β»ΒΉ) | |
| (hQ : β q β Q,β r β Q,(q : β)β»ΒΉ β€ (1+xi)*(r : β)β»ΒΉ) | |
| (hU : β u β U,β r β U,(u : β)β»ΒΉ β€ (1+xi)*(r : β)β»ΒΉ) : | |
| β x β tripleSpace P Q U,β y β tripleSpace P Q U,tripleWeight x β€ 8*tripleWeight y := by | |
| intro x hx y hy | |
| have hx' : x.1.1 β P β§ x.1.2 β Q β§ x.2 β U := by | |
| simpa only [tripleSpace,Finset.mem_product,and_assoc] using hx | |
| have hy' : y.1.1 β P β§ y.1.2 β Q β§ y.2 β U := by | |
| simpa only [tripleSpace,Finset.mem_product,and_assoc] using hy | |
| have h1 := hP _ hx'.1 _ hy'.1 | |
| have h2 := hQ _ hx'.2.1 _ hy'.2.1 | |
| have h3 := hU _ hx'.2.2 _ hy'.2.2 | |
| have hc : (1+xi)^3 β€ (8 : β) := by | |
| have hh := pow_le_pow_leftβ (by linarith : 0 β€ 1+xi) (by linarith : 1+xi β€ 2) 3 | |
| norm_num at hh | |
| exact hh | |
| calc | |
| _ β€ ((1+xi)*(y.1.1 : β)β»ΒΉ)*((1+xi)*(y.1.2 : β)β»ΒΉ)*((1+xi)*(y.2 : β)β»ΒΉ) := | |
| mul_le_mul (mul_le_mul h1 h2 (by positivity) (by positivity)) h3 (by positivity) (by positivity) | |
| _ = (1+xi)^3*tripleWeight y := by unfold tripleWeight;ring | |
| _ β€ _ := mul_le_mul_of_nonneg_right hc (tripleWeight_nonneg y) | |
| theorem triple_weighted_to_count (P Q U : Finset β) (xi sigma : β) (hxi : 0 β€ xi) (hxi1 : xi β€ 1) | |
| (witness : (β Γ β) β β β Prop) | |
| (hPpos : 0 < harmonicMass P) (hQpos : 0 < harmonicMass Q) (hUpos : 0 < harmonicMass U) | |
| (hP : β p β P,β r β P,(p : β)β»ΒΉ β€ (1+xi)*(r : β)β»ΒΉ) | |
| (hQ : β q β Q,β r β Q,(q : β)β»ΒΉ β€ (1+xi)*(r : β)β»ΒΉ) | |
| (hU : β u β U,β r β U,(u : β)β»ΒΉ β€ (1+xi)*(r : β)β»ΒΉ) | |
| (hweighted : (sigma/2)*(harmonicMass P*harmonicMass Q*harmonicMass U) β€ weightedWitness P Q U witness) : | |
| (sigma/16)*((P.product Q).card : β)*(U.card : β) β€ | |
| ((witnessPairs (P.product Q) U witness).card : β) := by | |
| have hTotal : 0 < β x β tripleSpace P Q U,tripleWeight x := by | |
| rw [triple_weight_sum] | |
| exact mul_pos (mul_pos hPpos hQpos) hUpos | |
| have hA : 0 < (tripleSpace P Q U).card := by | |
| by_contra hn | |
| have he : tripleSpace P Q U = β := Finset.card_eq_zero.mp (by omega) | |
| rw [he,Finset.sum_empty] at hTotal | |
| linarith | |
| have hsub : witnessPairs (P.product Q) U witness β tripleSpace P Q U := Finset.filter_subset _ _ | |
| have hh := weighted_to_count_density (tripleSpace P Q U) (witnessPairs (P.product Q) U witness) | |
| hsub hA tripleWeight 8 (sigma/2) (by norm_num) hTotal (triple_weight_spread P Q U xi hxi hxi1 hP hQ hU) | |
| (by simpa only [triple_weight_sum,weightedWitness] using hweighted) | |
| simpa only [tripleSpace,Finset.product_eq_sprod,Finset.card_product,Nat.cast_mul,div_div,show (2 : β)*8 = 16 by norm_num,mul_assoc] using hh | |
| end ErdosInverseCells | |
| end | |
| end Erdos970 | |
| end OAI | |