File size: 3,829 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 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 | import OAI.Geometry.HeilbronnTriangle.AuxiliarySamplingLaw
import OAI.Geometry.HeilbronnTriangle.ParameterSequence
namespace OAI
noncomputable section
namespace Problem355.AuxiliarySampling
open scoped BigOperators
open Parameters Parameters.PrimeParameterData
namespace Law
variable {q H : β} [Fact q.Prime] (L : Law q H)
theorem density_ratio_le :
(q : β) ^ 3 / L.size β€ 2000 ^ 3 * (q : β) * (H : β) ^ 6 := by
have hs : (0 : β) < L.size := by exact_mod_cast L.size_pos
have hsize : (q : β) ^ 2 β€ 2000 ^ 3 * (H : β) ^ 6 * L.size := by
exact_mod_cast L.size_lower
apply (div_le_iffβ hs).mpr
calc
(q : β) ^ 3 = (q : β) * (q : β) ^ 2 := by ring
_ β€ (q : β) * (2000 ^ 3 * (H : β) ^ 6 * L.size) :=
mul_le_mul_of_nonneg_left hsize (Nat.cast_nonneg q)
_ = (2000 ^ 3 * (q : β) * (H : β) ^ 6) * L.size := by ring
theorem density_scale_le :
(q : β) ^ 3 β€ (2000 ^ 3 * (q : β) * (H : β) ^ 6) * L.size := by
exact (div_le_iffβ (by exact_mod_cast L.size_pos : (0 : β) < L.size)).mp
L.density_ratio_le
end Law
theorem nonempty_parameterLaw {k r : β} (P : PrimeParameterData k r) :
Nonempty (@Law P.q (P.h ^ 2) β¨P.auxiliary_primeβ©) := by
let : Fact P.q.Prime := β¨P.auxiliary_primeβ©
apply nonempty_law
Β· have hh : 1 β€ P.h := by have := P.h_ge_three; omega
exact one_le_powβ hh
Β· exact P.auxiliary_large
def parameterLaw {k r : β} (P : PrimeParameterData k r) :
@Law P.q (P.h ^ 2) β¨P.auxiliary_primeβ© :=
Classical.choice (nonempty_parameterLaw P)
section PrimeParameters
variable {k r : β} (P : PrimeParameterData k r) [Fact P.q.Prime]
theorem density_ratio_le_parameter (L : Law P.q (P.h ^ 2)) :
(P.q : β) ^ 3 / L.size β€ 2000 ^ 3 * (P.q : β) * (P.h : β) ^ 12 := by
have h := L.density_ratio_le
push_cast at h
convert h using 1 ; ring
theorem sets_nonempty_parameter (L : Law P.q (P.h ^ 2)) (Ο : L.Outcome) :
(L.sets Ο).Nonempty := by
apply Finset.card_pos.mp
rw [L.sets_card]
exact L.size_pos
theorem weight_le_four_parameter (L : Law P.q (P.h ^ 2))
(p : Fin 3 β (Fin 3 β ZMod P.q)) (i j : Fin 3) (hp : p i β p j) :
LiftingProbability.auxiliaryWeight P.q L.size L.weight L.sets p β€
(4 * 2000 ^ 3) * (P.q : β) * (P.h : β) ^ 12 := by
calc
LiftingProbability.auxiliaryWeight P.q L.size L.weight L.sets p β€
4 * ((P.q : β) ^ 3 / L.size) := L.weight_le_four p i j hp
_ β€ 4 * (2000 ^ 3 * (P.q : β) * (P.h : β) ^ 12) :=
mul_le_mul_of_nonneg_left (density_ratio_le_parameter P L) (by norm_num)
_ = (4 * 2000 ^ 3) * (P.q : β) * (P.h : β) ^ 12 := by ring
theorem weight_le_two_parameter (L : Law P.q (P.h ^ 2))
(p : Fin 3 β (Fin 3 β ZMod P.q)) :
LiftingProbability.auxiliaryWeight P.q L.size L.weight L.sets p β€
(2 * 2000 ^ 6) * (P.q : β) ^ 2 * (P.h : β) ^ 24 := by
have hratio := density_ratio_le_parameter P L
have hsq : ((P.q : β) ^ 3 / L.size) ^ 2 β€
(2000 ^ 3 * (P.q : β) * (P.h : β) ^ 12) ^ 2 := by
gcongr
calc
LiftingProbability.auxiliaryWeight P.q L.size L.weight L.sets p β€
2 * ((P.q : β) ^ 3 / L.size) ^ 2 := L.weight_le_two p
_ β€ 2 * (2000 ^ 3 * (P.q : β) * (P.h : β) ^ 12) ^ 2 :=
mul_le_mul_of_nonneg_left hsq (by norm_num)
_ = (2 * 2000 ^ 6) * (P.q : β) ^ 2 * (P.h : β) ^ 24 := by ring
end PrimeParameters
theorem parameterLaw_density_ratio_le {k r : β} (P : PrimeParameterData k r) :
(P.q : β) ^ 3 /
(@Law.size P.q (P.h ^ 2) β¨P.auxiliary_primeβ© (parameterLaw P) : β) β€
2000 ^ 3 * (P.q : β) * (P.h : β) ^ 12 := by
let : Fact P.q.Prime := β¨P.auxiliary_primeβ©
exact density_ratio_le_parameter P (parameterLaw P)
end Problem355.AuxiliarySampling
end
end OAI
|