File size: 2,896 Bytes
4a56cd6 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 | import OAI.NumberTheory.Jacobsthal.Estimates.LargeGapCountErrors
namespace OAI
namespace Erdos970
open scoped _root_.Erdos970
namespace NumberTheoryLean.CompactSmallCountErrors
open FinitePathGeometry PrimeHistories PrimeBinMembership ReferenceAdmission StrongSourceFamilies
open ActualCountErrorEdges ActualCountErrorMass SourcePrimeProductData
open LogarithmicBinPartition ErdosInverseCounts
open ErdosPrimeInputs.PrimePrefixMass ErdosPrimeInputs.PrimePrefixTail
theorem uniform_compact_small_count_errors (K d : β) (hK : 3 β€ K) (hd : 0 < d) :
β C Bβ wβ : β,0 < C β§ 3 β€ Bβ β§ 1 < wβ β§ β B w top : β,Bβ β€ B β wβ β€ w β
w < top β Real.log B β€ d*Real.log w β β z : Node,
z.side=.even β 199/100 β€ z.ratio β z.ratio β€ 23/10 β Consistent z β z.cutoff=B β z.closed=true β w^B=top β
β Y : β,0 < Y β β residue : β β β,β eps : β,0 β€ eps β β F : Finset (List β),
F β referencePrefixes w (sourcePrimeSet w top) z.side z.gap β
(β psβF,(terminal w z ps).gap β€ K β§
|wordCountError Y (LargePrimeDeletion.cutoffPrimes βwββ) residue (SmallSieveFinite.smallEuler βwββ) ps| β€ eps) β
(B^2/((Y:β)*SmallSieveFinite.smallEuler βwββ))*(β psβF,
|(modulusCount Y (LargePrimeDeletion.cutoffPrimes βwββ) residue ps.prod:β)-
((Y:β)/(ps.prod:β))*SmallSieveFinite.smallEuler βwββ|) β€ C*eps := by
obtain β¨C,Bβ,W,hC,hBβ,hW,hMassβ© := uniform_source_family_mass K d hK hd
refine β¨C,Bβ,max W 2,hC,hBβ,hW.trans_le (le_max_left _ _),?_β©
intro B w top hB hwβ htop hcomp z hi h199 h23 hz hcut hclosed hpower Y hY residue eps heps F hF hGood
have hw : 1 < w := hW.trans_le ((le_max_left _ _).trans hwβ)
have hw2 : 2 β€ w := (le_max_right _ _).trans hwβ
have hV : 0 < SmallSieveFinite.smallEuler βwββ :=
(inv_pos.mpr (zero_lt_one.trans hw)).trans_le (SmallSieveFinite.smallEuler_floor_ge_inv w hw2)
have hp : β psβF,0 < ps.prod := fun ps hps => (reference_word_product_data hw htop z.side z.gap ps (hF hps)).1
rw [finite_count_error_weight B Y _ residue _ hY hV F hp]
have he : (β psβF,prefixWeight ps*|wordCountError Y (LargePrimeDeletion.cutoffPrimes βwββ) residue
(SmallSieveFinite.smallEuler βwββ) ps|) β€ (β psβF,prefixWeight ps)*eps := by
rw [Finset.sum_mul]
apply Finset.sum_le_sum
intro ps hps
exact mul_le_mul_of_nonneg_left (hGood ps hps).2 (prefixWeight_nonneg ps)
have hsum := hMass B w top hB ((le_max_left _ _).trans hwβ) htop hcomp z hi h199 h23 hz hcut hclosed hpower F hF
(fun ps hps => (hGood ps hps).1)
have hh := mul_le_mul_of_nonneg_left he (sq_nonneg B)
have hc := mul_le_mul_of_nonneg_right hsum heps
nlinarith
end NumberTheoryLean.CompactSmallCountErrors
end Erdos970
end OAI
|