Lean / Reader
Lean reader

TraceBounds.lean

37 lines2 declarationsno sorryimports Mathlib.Algebra.BigOperators.Ring.Finset Mathlib.Tactic
  1. import Mathlib.Algebra.BigOperators.Ring.Finset
  2. import Mathlib.Tactic
  3. namespace ErdosPolynomial
  4. open Finset
  5. /-- The centered quadratic remainder when the divisibility kernel has row
  6. sums given by evaluation at the zero residue. -/
  7. theorem center_kernel {ι : Type*} [Fintype ι] [DecidableEq ι] (k : ι → ι → ℝ)
  8. (w : ι → ℝ) (o : ι) (sym : ∀ i j, k i j=k j i)
  9. (rows : ∀ i, ∑ j,k i j = if i=o then 1 else 0) (wo : w o=1) :
  10. ∑ i, ∑ j, k i j*w i*w j = 3/4 + ∑ i, ∑ j, k i j*(w i-1/2)*(w j-1/2) := by
  11. have row : ∑ i, ∑ j, k i j*w i = 1 := by
  12. simp_rw [←sum_mul,rows];simp [wo]
  13. have col : ∑ i, ∑ j, k i j*w j = 1 := by
  14. rw [Finset.sum_comm];simpa only [sym] using row
  15. have allK : ∑ i, ∑ j, k i j = 1 := by simp [rows]
  16. have expand : ∀ i j, k i j*(w i-1/2)*(w j-1/2) =
  17. k i j*w i*w j - (k i j*w i)/2 - (k i j*w j)/2 + k i j/4 := by intros;ring
  18. simp_rw [expand]
  19. simp only [Finset.sum_add_distrib,Finset.sum_sub_distrib, ← Finset.sum_div, row,col,allK]
  20. ring
  21. /-- The two numerical regimes whose complement is the finite certificate. -/
  22. theorem strict_trace {T n m V L : ℝ} (mn : 0 < m) (np : 0<n)
  23. (small : 2*n+1-n^2*V ≤ T) (large : 2*n-n^2/m+3/4-L/4 ≤ T)
  24. (choice : n*V<1 ∨ m*(L+1)<4*n*(m-n)) : n+1<T := by
  25. rcases choice with h|h
  26. · nlinarith [mul_lt_mul_of_pos_left h np]
  27. · have eq : n^2/m*m=n^2 := div_mul_cancel₀ _ (ne_of_gt mn)
  28. by_contra! hle
  29. nlinarith [mul_le_mul_of_nonneg_right large mn.le,mul_le_mul_of_nonneg_right hle mn.le]
  30. #print axioms center_kernel
  31. #print axioms strict_trace
  32. end ErdosPolynomial