AlexKontorovich/PrimeNumberTheoremAnd
Source indexedlemma · leanprover/lean4:v4.32.0
RS.IPart.exists_index_between
PrimeNumberTheoremAnd.Unused.MyMV_A3a · PrimeNumberTheoremAnd/Unused/MyMV_A3a.lean:476 to 484
Mathematical statement
Exact Lean statement
lemma exists_index_between {n m : ℕ} (k : Fin (n + 1) → Fin (m + 1))
(hk : Monotone k) (hk0 : k 0 = 0) (hkn : k (Fin.last n) = Fin.last m)
(j : Fin m) :
∃ i : Fin n, k i.castSucc ≤ j.castSucc ∧ j.castSucc < k i.succComplete declaration
Lean source
Full Lean sourceLean 4
lemma exists_index_between {n m : ℕ} (k : Fin (n + 1) → Fin (m + 1)) (hk : Monotone k) (hk0 : k 0 = 0) (hkn : k (Fin.last n) = Fin.last m) (j : Fin m) : ∃ i : Fin n, k i.castSucc ≤ j.castSucc ∧ j.castSucc < k i.succ := by by_contra h_contra; -- Since $k$ is monotone and $k 0 = 0$, we have $k i \le j$ for all $i$. have h_le : ∀ i : Fin (n + 1), k i ≤ Fin.castSucc j := by intro i; induction i using Fin.inductionOn <;> aesop; exact absurd ( h_le ( Fin.last n ) ) ( by simpa [ hkn ] using Fin.castSucc_lt_last j )