File size: 3,721 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 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 | import OAI.NumberTheory.Jacobsthal.Sieve.IntegerLaw
namespace OAI
namespace Erdos970
namespace EulerWeightedLower
open Erdos970.EulerPrimeLaw
attribute [local instance] Classical.propDecidable
noncomputable def lowerInteger (E : Finset β) (s : Outcomes E) : β :=
integerProduct E (fun p => lowerExponent (s p))
noncomputable def upperInteger (E : Finset β) (s : Outcomes E) : β :=
integerProduct E (fun p => upperExponent (s p))
variable (E : Finset β) (hE : β p β E, Nat.Prime p)
include hE
lemma log_integerProduct (k : E β β) :
Real.log (integerProduct E k : β) = β p : E, (k p : β) * Real.log (p : β) := by
rw [integerProduct, Nat.cast_prod]
rw [Real.log_prod]
Β· simp only [Nat.cast_pow, Real.log_pow]
Β· intro p _; exact_mod_cast pow_ne_zero (k p) (hE p p.property).ne_zero
theorem upper_log_eq_lower_add_excess (s : Outcomes E) :
Real.log (upperInteger E s : β) = Real.log (lowerInteger E s : β) + excessLog E s := by
rw [upperInteger, lowerInteger, log_integerProduct E hE, log_integerProduct E hE]
unfold excessLog
rw [β Finset.sum_add_distrib]
apply Finset.sum_congr rfl
intro p _
rw [Nat.cast_sub (lowerExponent_le_upperExponent (s p))]
ring
theorem source_cutoff_implication {P : β} (hP : 1 < P) (s : Outcomes E)
(hl : (lowerInteger E s : β) β€ P ^ (94 / 100 : β))
(hz : excessLog E s β€ (1 / 100 : β) * Real.log P) :
(upperInteger E s : β) β€ P ^ (95 / 100 : β) := by
have hu : 0 < (upperInteger E s : β) := by
exact_mod_cast integerProduct_pos E hE (fun p => upperExponent (s p))
have hl0 : 0 < (lowerInteger E s : β) := by
exact_mod_cast integerProduct_pos E hE (fun p => lowerExponent (s p))
apply (Real.log_le_log_iff hu (Real.rpow_pos_of_pos (by linarith) _)).mp
rw [upper_log_eq_lower_add_excess E hE]
have hh := Real.log_le_log hl0 hl
rw [Real.log_rpow (by linarith : 0 < P)] at hh β’
linarith
theorem small_product_coupling_lower {P : β} (hP : 1 < P) :
eventMass E (fun s => (lowerInteger E s : β) β€ P ^ (94 / 100 : β)) -
100 * uniformMomentBound / Real.log P β€
eventMass E (fun s => (upperInteger E s : β) β€ P ^ (95 / 100 : β)) := by
have htwo : β p β E, 2 β€ p := fun p hp => (hE p hp).two_le
let L : Outcomes E β Prop := fun s => (lowerInteger E s : β) β€ P ^ (94 / 100 : β)
let U : Outcomes E β Prop := fun s => (upperInteger E s : β) β€ P ^ (95 / 100 : β)
let B : Outcomes E β Prop := fun s => (1 / 100 : β) * Real.log P < excessLog E s
have hi : eventMass E L β€ eventMass E U + eventMass E B := by
rw [eventMass, eventMass, eventMass, β Summable.tsum_add
(product_event_summable E htwo U) (product_event_summable E htwo B)]
apply Summable.tsum_le_tsum _ (product_event_summable E htwo L)
((product_event_summable E htwo U).add (product_event_summable E htwo B))
intro s
have hw := productMass_nonneg E htwo s
by_cases hl : L s
Β· by_cases hz : B s
Β· simp only [ite_eq_left hl, ite_eq_left hz]; split_ifs <;> linarith
Β· have hu : U s := source_cutoff_implication E hE hP s hl (le_of_not_gt hz)
simp only [ite_eq_left hl, ite_eq_left hu, ite_eq_right hz, add_zero, le_refl]
Β· simp only [ite_eq_right hl]; split_ifs <;> linarith
have ht := excess_tail_le E htwo (show 0 < (1 / 100 : β) * Real.log P by
exact mul_pos (by norm_num) (Real.log_pos hP))
have he : uniformMomentBound / ((1 / 100 : β) * Real.log P) =
100 * uniformMomentBound / Real.log P := by ring
rw [he] at ht
change eventMass E L - _ β€ eventMass E U
change eventMass E B β€ _ at ht
linarith
end EulerWeightedLower
end Erdos970
end OAI
|