Challenge 34: If P holds infinitely often, there is an extraction along which it always holds
Let \(P\) be a property of the natural numbers that holds for arbitrarily large numbers; that is, \[ \forall N, \exists n > N, P(n) \]
Prove that there exists an extraction function (that is, a strictly increasing function \(\varphi : \mathbb{N} \to \mathbb{N}\)) along which \(P\) always holds; that is, \[ \forall n, P(\varphi(n)) \]
To do so, complete the following theory in Lean 4:
import Mathlib.Basic.Real.Basic open Function def IsExtraction (φ : ℕ → ℕ) : Prop := StrictMono φ variable (P : ℕ → Prop) example (h : ∀ N, ∃ n > N, P n) : ∃ φ : ℕ → ℕ, IsExtraction φ ∧ ∀ n, P (φ n) := by sorry