math / data /lean /OAI /NumberTheory /PiExponent /Analysis /Collision.lean
introvoyz045's picture
Migrated from GitHub
4a56cd6 verified
Raw History Blame Contribute Delete
3.03 kB
import OAI.NumberTheory.PiExponent.Analysis.AnalyticDeterminantCollision
import OAI.NumberTheory.PiExponent.Analysis.PeriodAnalytic
import OAI.NumberTheory.PiExponent.Polynomials.SimplexLog
namespace OAI
open scoped BigOperators Topology
open Filter
namespace PiExponent
noncomputable def holomorphicError (K : β„•) (w0 v0 wstar : ℝ) : ℝ :=
100 * K / w0 + Real.log 2 / v0 + Real.log (200 * K) / wstar
theorem formal_period_collision_bound
{m : β„•} {ΞΉ ΞΊ : Type*} [Fintype ΞΉ] [DecidableEq ΞΉ] [Fintype ΞΊ] [DecidableEq ΞΊ]
(group : ΞΉ β†’ ΞΊ) (transverse : ΞΊ β†’ Fin m β†’β‚€ β„•)
(j ell h : ΞΉ β†’ β„•) (a : ΞΉ β†’ Fin m β†’ β„•) (w : Fin m β†’ ℝ)
{K : β„•} {H w0 v0 wstar : ℝ}
(hK : 0 < K) (hH : 0 < H) (hw0 : 0 < w0) (hws : 0 < wstar)
(hw : βˆ€ i, wstar ≀ w i) (hj : βˆ€ r, j r < K)
(hcol : βˆ€ c, w0 * h c + βˆ‘ i, w i * a c i ≀ H)
(hell : ((βˆ‘ r, ell r : β„•) : ℝ) ≀ (Fintype.card ΞΉ : ℝ) * H / v0) :
β€–Matrix.det (fun r c => PowerSeries.coeff (ell r)
((MatrixTranslation.periodMonomial (j r) (2 * (Real.pi : β„‚) * Complex.I)
(h c) (a c)).coeff (transverse (group r))))β€– ≀
Real.exp (-(Real.log 2 / 4) *
(βˆ‘ A, (Collision.multiplicity Finset.univ group A : ℝ) ^ 2) +
(Fintype.card ΞΉ : ℝ) * H *
(holomorphicError K w0 v0 wstar + Collision.collisionRemainder (Fintype.card ΞΉ) H)) := by
let R : NNReal := ⟨100 * (K : ℝ), by positivity⟩
have hR : 0 < R := by change (0 : ℝ) < 100 * K; positivity
have hR1 : (1 : ℝ) ≀ R := by
have hK1 : (1 : ℝ) ≀ K := by exact_mod_cast hK
change (1 : ℝ) ≀ 100 * K
linarith
have hb := AnalyticCollision.translated_row_determinant_exp_bound
group (fun A c => PeriodAnalytic.columnFunction (h c) (a c) (transverse A))
(fun r => (j r : β„‚) * (2 * (Real.pi : β„‚) * Complex.I)) ell R hR hH
(fun A c => PeriodAnalytic.differentiable_columnFunction _ _ _)
(A := (R : ℝ) / w0 + Real.log (2 * (R : ℝ)) / wstar) (v := v0)
(fun A c z hz => PeriodAnalytic.norm_columnFunction_le (h c) (a c) (transverse A) w
hR1 hH.le hw0 hws hw (hcol c)
(by simpa only [Metric.mem_sphere, dist_zero_right] using hz.le))
(fun r => AnalyticCollision.period_center_radius_bound hK (hj r)) hell
have hRv : (R : ℝ) = 100 * K := rfl
rw [hRv] at hb
have he : (2 : ℝ) * (100 * K) = 200 * K := by ring
rw [he] at hb
simp_rw [PeriodAnalytic.periodMonomial_coeff_eq_rowTest]
convert! hb using 1
congr 1
unfold holomorphicError
ring
theorem tendsto_collisionRemainder_of_normalized_pow {M : ℝ β†’ β„•} {d : β„•} {L : ℝ}
(hM : Tendsto (fun H : ℝ => (M H : ℝ) / H ^ d) atTop (𝓝 L)) (hL : 0 < L) :
Tendsto (fun H => Collision.collisionRemainder (M H) H) atTop (𝓝 0) := by
convert tendsto_log_add_div_of_normalized_pow hM hL
(Real.log 2 / 4 - Real.log (1 - Collision.collisionRatio)) using 1
funext H
unfold Collision.collisionRemainder
congr 1
ring
end PiExponent
end OAI