Download data/lean/OAI/NumberTheory/Jacobsthal/Partitions/EffectiveCommonInterval.lean from introvoyz045/math: direct link, hf CLI and curl.
- Browser
- Download file 3.79 kB
-
https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/NumberTheory/Jacobsthal/Partitions/EffectiveCommonInterval.lean
- Command line
-
hf download hf://datasets/introvoyz045/math/data/lean/OAI/NumberTheory/Jacobsthal/Partitions/EffectiveCommonInterval.lean
-
curl -L -o EffectiveCommonInterval.lean https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/NumberTheory/Jacobsthal/Partitions/EffectiveCommonInterval.lean
3.79 kB
| import OAI.NumberTheory.Jacobsthal.Primes.SmallEffectivePrimeSplit | |
| namespace OAI | |
| namespace Erdos970 | |
| open scoped _root_.Erdos970 | |
| section | |
| namespace ErdosVarianceCommon | |
| open ErdosVarianceEffective ErdosInverseTail ErdosInverseHits | |
| noncomputable def commonLength (Y qf : β) (R xi : β) : β := | |
| commonParentLength Y qf ((1+xi)*R) | |
| theorem bin_upper_comparison (R xi : β) (_hR : 0 < R) (hxi : 0 β€ xi) | |
| (p : β) (hbin : R < (p : β) β§ (p : β) β€ (1+xi)*R) : | |
| (p : β) β€ (1+xi)*R β§ (1+xi)*R β€ (1+xi)*(p : β) := | |
| β¨hbin.2,mul_le_mul_of_nonneg_left hbin.1.le (by linarith)β© | |
| theorem commonLength_le_effective (Y : β) (a : β β β) (r : β) (qf : β) (hq : Squarefree qf) | |
| (p : β) [NeZero p] (hHp : (effectiveModulus a r qf).Coprime p) | |
| (R xi : β) (hR : 0 < R) (hxi : 0 β€ xi) | |
| (hbin : R < (p : β) β§ (p : β) β€ (1+xi)*R) : | |
| commonLength Y qf R xi β€ hitLength Y (p*qf) (effectiveBase a r qf p hHp) := by | |
| have hb := (effective_initial_bounds a r qf hq p hHp).2 | |
| have hh := commonParentLength_le_hits Y qf p (effectiveBase a r qf p hHp) | |
| (Nat.pos_of_ne_zero hq.ne_zero) (Nat.pos_of_ne_zero (NeZero.ne p)) (by simpa only [effectiveBase,Nat.mul_comm] using hb) | |
| ((1+xi)*R) (bin_upper_comparison R xi hR hxi p hbin).1 | |
| simpa only [commonLength,Nat.mul_comm] using hh | |
| theorem commonLength_tail_bound (Y : β) (a : β β β) (r : β) (qf : β) (hq : Squarefree qf) | |
| (p : β) [NeZero p] (hHp : (effectiveModulus a r qf).Coprime p) | |
| (R xi : β) (hR : 0 < R) (hxi : 0 β€ xi) (hxi1 : xi β€ 1) | |
| (hbin : R < (p : β) β§ (p : β) β€ (1+xi)*R) : | |
| ((hitLength Y (p*qf) (effectiveBase a r qf p hHp)-commonLength Y qf R xi : β) : β) β€ | |
| xi*(commonLength Y qf R xi : β)+3 := by | |
| have hb := effective_initial_bounds a r qf hq p hHp | |
| have hcomp := bin_upper_comparison R xi hR hxi p hbin | |
| have hh := actual_cell_tail_length Y qf p (effectiveBase a r qf p hHp) | |
| (Nat.pos_of_ne_zero hq.ne_zero) (Nat.pos_of_ne_zero (NeZero.ne p)) hb.1 | |
| (by simpa only [effectiveBase,Nat.mul_comm] using hb.2) ((1+xi)*R) xi hxi hxi1 hcomp.1 hcomp.2 | |
| simpa only [commonLength,Nat.mul_comm] using hh | |
| theorem commonLength_reference_bounds (Y qf p : β) (hq : 0 < qf) (hp : 0 < p) | |
| (R xi : β) (hR : 0 < R) (hxi : 0 β€ xi) (hxi1 : xi β€ 1) | |
| (hbin : R < (p : β) β§ (p : β) β€ (1+xi)*R) : | |
| (commonLength Y qf R xi : β) β€ (Y : β)/((p : β)*qf) β§ | |
| (Y : β)/((p : β)*qf)-(commonLength Y qf R xi : β) β€ | |
| xi*(commonLength Y qf R xi : β)+2 := by | |
| have hqR : (0 : β) < qf := by exact_mod_cast hq | |
| have hpR : (0 : β) < p := by exact_mod_cast hp | |
| have hU : 0 < (1+xi)*R := by positivity | |
| have hratio : 0 β€ (Y : β)/((qf : β)*((1+xi)*R)) := by positivity | |
| have hfloor : (commonLength Y qf R xi : β) β€ (Y : β)/((qf : β)*((1+xi)*R)) := Nat.floor_le hratio | |
| have hfloorHi : (Y : β)/((qf : β)*((1+xi)*R)) < (commonLength Y qf R xi : β)+1 := Nat.lt_floor_add_one _ | |
| have hcomp := bin_upper_comparison R xi hR hxi p hbin | |
| have hdiv : (Y : β)/((qf : β)*((1+xi)*R)) β€ (Y : β)/((p : β)*qf) := | |
| div_le_div_of_nonneg_left (Nat.cast_nonneg _) (by positivity) (by nlinarith) | |
| have hinfl : (Y : β)/((p : β)*qf) β€ (1+xi)*((Y : β)/((qf : β)*((1+xi)*R))) := by | |
| have hf : ((1+xi)*R)/(p : β) β€ 1+xi := (div_le_iffβ hpR).mpr hcomp.2 | |
| calc | |
| _ = ((Y : β)/((qf : β)*((1+xi)*R)))*(((1+xi)*R)/(p : β)) := by field_simp | |
| _ β€ ((Y : β)/((qf : β)*((1+xi)*R)))*(1+xi) := mul_le_mul_of_nonneg_left hf hratio | |
| _ = _ := by ring | |
| refine β¨hfloor.trans hdiv,?_β© | |
| have hh := mul_le_mul_of_nonneg_left hfloorHi.le (show 0 β€ 1+xi by linarith) | |
| nlinarith | |
| end ErdosVarianceCommon | |
| end | |
| end Erdos970 | |
| end OAI | |