Lean / Reader
Lean reader

DecayTransfer.lean

93 lines4 declarationsno sorryimports DecayPalettes DecayIntegral

Lean 4 Web has Mathlib, so it can check files that import only Mathlib. This one also imports DecayPalettes, DecayIntegral, which it does not have: you can read it there, but it will not check. Build the project itself to check it.

  1. import DecayPalettes
  2. import DecayIntegral
  3. namespace DecayClassification
  4. theorem geometric_tail (b : ℕ → ℝ) (half : ∀ j, 2*b (j+1) ≤ b j) :
  5. ∀ J j, j ≤ J → (∑ i ∈ Finset.Ioc j J, b i) + b J ≤ b j := by
  6. intro J
  7. induction J with
  8. | zero =>
  9. intro j hj
  10. have := Nat.eq_zero_of_le_zero hj
  11. subst j; simp
  12. | succ J ih =>
  13. intro j hj
  14. by_cases eq : j = J+1
  15. · subst j; simp
  16. · have le : j ≤ J := by omega
  17. have split : Finset.Ioc j (J+1) = insert (J+1) (Finset.Ioc j J) := by
  18. ext i
  19. simp only [Finset.mem_insert, Finset.mem_Ioc]
  20. omega
  21. rw [split,Finset.sum_insert (by simp)]
  22. linarith [ih j le, half J]
  23. theorem mono_of_refines {n k : ℕ} {c c' : Fin n × Fin n → ℕ}
  24. (refines : ∀ x ∈ edges n, ∀ y ∈ edges n, c' x = c' y → c x = c y) :
  25. MonoClique k c' → MonoClique k c := by
  26. rintro ⟨s,hk,col,mono⟩
  27. by_cases has : ∃ u ∈ s, ∃ v ∈ s, u < v
  28. · obtain ⟨u,hu,v,hv,huv⟩ := has
  29. refine ⟨s,hk,c (u,v),?_⟩
  30. intro x hx y hy hxy
  31. exact refines (x,y) (by simpa [edges] using hxy)
  32. (u,v) (by simpa [edges] using huv) ((mono _ hx _ hy hxy).trans (mono _ hu _ hv huv).symm)
  33. · exact ⟨s,hk,0,fun x hx y hy hxy => (has ⟨x,hx,y,hy,hxy⟩).elim⟩
  34. /-- At unbounded common cutoffs, every provisional graph with enough edges and
  35. the indicated density control admits an actual bounded refinement, simultaneously
  36. preserving the absence of every monochromatic clique. -/
  37. theorem integral_transfer (a b : ℕ → ℝ) (ha : Antitone a) (ha0 : ∀ i, 0 ≤ a i)
  38. (hb : ∀ j, 0 < b j) (half : ∀ j, 2*b (j+1) ≤ b j)
  39. (supply : ∀ j, ∃ l ≥ j, 40*b j < ∑ i ∈ Finset.Icc j l, a (2*i+1)) :
  40. ∀ N, ∃ J ≥ N, ∀ n (c : Fin n × Fin n → ℕ),
  41. (∀ e ∈ edges n, c e ≤ J) → Bounded b c →
  42. 1 ≤ 2*b J*(edges n).card →
  43. ∃ c' : Fin n × Fin n → ℕ, Bounded a c' ∧ ∀ k, MonoClique k c' → MonoClique k c := by
  44. intro N
  45. have excess : ∀ s, ∃ l ≥ s, ∑ i ∈ Finset.Icc s l, a (2*i+1) >
  46. ∑ i ∈ Finset.Icc s l, 20*b i := by
  47. intro s
  48. obtain ⟨l,hl,hs⟩ := supply s
  49. have heq : Finset.Icc s l = insert s (Finset.Ioc s l) := by
  50. ext i
  51. simp only [Finset.mem_insert,Finset.mem_Icc,Finset.mem_Ioc]
  52. omega
  53. refine ⟨l,hl,?_⟩
  54. rw [← Finset.mul_sum,heq]
  55. simp only [Finset.sum_insert (by simp : s ∉ Finset.Ioc s l)]
  56. rw [heq,Finset.sum_insert (by simp)] at hs
  57. linarith [geometric_tail b half l s hl,hb l]
  58. obtain ⟨J,hJN,hbig,hblocks⟩ := good_blocks (fun i => a (2*i+1)) b
  59. (fun _ _ hij => ha (by omega)) (fun _ => ha0 _) hb excess N
  60. obtain ⟨A,dis,limited,mass⟩ := palettes a b ha ha0 (fun i => (hb i).le) J
  61. (fun j hj => by linarith [geometric_tail b half J j hj,hb J]) hblocks
  62. refine ⟨J,hJN,?_⟩
  63. intro n c active budget hsize
  64. have roundable : 2 ≤ a (2*J+1)*(edges n).card := by
  65. have hh := mul_le_mul_of_nonneg_right hbig (show (0:ℝ) ≤ (edges n).card by positivity)
  66. linarith
  67. obtain ⟨c',hbounded,parent⟩ := integer_refinement (edges n) c a b ha ha0 J active
  68. (fun j _ => budget j) roundable A dis limited mass
  69. exact ⟨c',hbounded,fun _ => mono_of_refines parent⟩
  70. /-- A family of regular provisional colorings at all sufficiently large palette
  71. cutoffs transfers to counterexamples of unbounded order for the irregular cap. -/
  72. theorem nonforcing_of_models (a b : ℕ → ℝ) (ha : Antitone a) (ha0 : ∀ i, 0 ≤ a i)
  73. (hb : ∀ j, 0 < b j) (half : ∀ j, 2*b (j+1) ≤ b j)
  74. (supply : ∀ j, ∃ l ≥ j, 40*b j < ∑ i ∈ Finset.Icc j l, a (2*i+1))
  75. (k : ℕ) (hk : 2 ≤ k)
  76. (models : ∀ L, ∃ N, ∀ J ≥ N, ∃ n ≥ L, ∃ c : Fin n × Fin n → ℕ,
  77. (∀ e ∈ edges n, c e ≤ J) ∧ Bounded b c ∧ 1 ≤ 2*b J*(edges n).card ∧ ¬MonoClique k c) :
  78. ¬DecayRamsey a := by
  79. intro ramsey
  80. obtain ⟨L,forced⟩ := ramsey k hk
  81. obtain ⟨N,hmodel⟩ := models L
  82. obtain ⟨J,hJ,htransfer⟩ := integral_transfer a b ha ha0 hb half supply N
  83. obtain ⟨n,hn,c,hactive,hbounded,hsize,hfree⟩ := hmodel J hJ
  84. obtain ⟨c',hc',href⟩ := htransfer n c hactive hbounded hsize
  85. exact hfree (href k (forced n hn c' hc'))
  86. end DecayClassification