Skip to main content

Challenge 33: If n < φ(n) for all n, then the orbit of φ is an extraction function

Let \(\varphi : \mathbb{N} \to \mathbb{N}\) be a function that grows faster than the identity; that is, such that \(n < \varphi(n)\) for all \(n\). Prove that, for any starting point \(n_0 \in \mathbb{N}\), its orbit under \(\varphi\) \[ n_0, \varphi(n_0), \varphi^2(n_0), \varphi^3(n_0), \dots \] is an extraction function (that is, it is strictly increasing).

To do so, complete the following theory in Lean 4, where (φ^[n] n₀) represents the iterate \(\varphi^{n}(n_0)\):

import Mathlib.Basic.Real.Basic

def IsExtraction (φ : ℕ → ℕ) : Prop :=
  StrictMono φ

variable (φ : ℕ → ℕ)

example
  (hφ : ∀ n, n < φ n)
  (n₀ : ℕ)
  : IsExtraction (fun n ↦ φ^[n] n₀) :=
by sorry

I recommend that you try to solve the challenge on your own in Lean 4 Web before looking at the solutions. Once you have tried, expand the “Proposed solutions” section to compare your approach with the proofs you will find there.

Have you found a different proof? Share it in the comments, inside a Lean code block (using ```lean ... ```), to enrich the challenge!

Proposed solutions

1. Proof in natural language

By the successor criterion (Challenge 32), it suffices to prove that \[ \forall n \in \mathbb{N}, \varphi^{n}(n_0) < \varphi^{n+1}(n_0) \tag{1} \]

Let \(n \in \mathbb{N}\). Then, \[ \begin{array}{llll} \varphi^n(n_0) &< \varphi(\varphi^{n}(n_0)) &&\text{[by the hypothesis, applied to \(\varphi^{n}(n_0)\)]} \\ &= \varphi^{n+1}(n_0) &&\text{[by the property of iterates]} \end{array} \] which is (1).

2. Proofs in Lean 4

import Mathlib.Basic.Real.Basic

def IsExtraction (φ : ℕ → ℕ) : Prop :=
  StrictMono φ

variable (φ : ℕ → ℕ)

lemma isExtraction_of_lt_succ -- Challenge 32
  (hφ : ∀ n, φ n < φ (n + 1))
  : IsExtraction φ :=
strictMono_nat_of_lt_succ hφ

-- Proof 1
-- =======

example
  (hφ : ∀ n, n < φ n)
  (n₀ : ℕ)
  : IsExtraction (fun n ↦ φ^[n] n₀) :=
by
  apply isExtraction_of_lt_succ
  -- ⊢ ∀ (n : ℕ), φ^[n] n₀ < φ^[n + 1] n₀
  intro n
  -- n : ℕ
  -- ⊢ φ^[n] n₀ < φ^[n + 1] n₀
  calc φ^[n] n₀
       < φ (φ^[n] n₀) := hφ (φ^[n] n₀)
     _ = φ^[n + 1] n₀ := (Function.iterate_succ_apply' φ n n₀).symm

-- Proof 2
-- =======

example
  (hφ : ∀ n, n < φ n)
  (n₀ : ℕ)
  : IsExtraction (fun n ↦ φ^[n] n₀) :=
by
  apply isExtraction_of_lt_succ
  -- ⊢ ∀ (n : ℕ), φ^[n] n₀ < φ^[n + 1] n₀
  intro n
  -- n : ℕ
  -- ⊢ φ^[n] n₀ < φ^[n + 1] n₀
  rw [Function.iterate_succ_apply']
  -- ⊢ φ^[n] n₀ < φ (φ^[n] n₀)
  exact hφ (φ^[n] n₀)

-- Proof 3
-- =======

theorem isExtraction_of_Iterate
  (hφ : ∀ n, n < φ n)
  (n₀ : ℕ)
  : IsExtraction (fun n ↦ φ^[n] n₀) :=
by
  apply isExtraction_of_lt_succ
  -- ⊢ ∀ (n : ℕ), φ^[n] n₀ < φ^[n + 1] n₀
  intro n
  -- n : ℕ
  -- ⊢ φ^[n] n₀ < φ^[n + 1] n₀
  simpa [Function.iterate_succ_apply'] using hφ (φ^[n] n₀)

You can inspect, modify and run the code of these proofs interactively in Lean 4 Web.

Comments