Segments defined by a strictly monotonic function on Nat #
Given a strictly monotonic function f : ℕ → ℕ and k : ℕ with k ≥ f 0,
Nat.segment f k is the unique m : ℕ such that f m ≤ k < f (k + 1).
Nat.segment f k is defined to be 0 for k < f 0.
This file defines Nat.segment and proves various properties aboout it.
Any strictly monotonic function f : ℕ → ℕ has an infinite range.
For a strictly monotonic function f : ℕ → ℕ, no number (strictly) between
f m and f (m + 1) is in the range of f.
For a strictly monotonic function f : ℕ → ℕ, the segment of f k is k.
For a strictly monotonic function f : ℕ → ℕ, segment f k = 0 for all k < f 0.
For a strictly monotonic function f : ℕ → ℕ with f 0 = 0, segment f 0 = 0.
For a strictly monotonic function f : ℕ → ℕ with f 0 = 0,
k < f (segment f k + 1) for all k : ℕ.
For a strictly monotonic function f : ℕ → ℕ with f 0 = 0,
f (segment f k) ≤ k for all k : ℕ.
For a strictly monotonic function f : ℕ → ℕ with f 0 = 0,
f and segment f form a Galois connection.
segment' is a helper function that will be proved to be equal to segment.
It facilitates the proofs of some theorems below.
Equations
- Nat.segment' f k = Nat.segment (fun (x : ℕ) => f x - f 0) (k - f 0)
Instances For
For a strictly monotonic function f : ℕ → ℕ, segment f k = 0 for all k ≤ f 0.
For a strictly monotonic function f : ℕ → ℕ, k < f (segment f k + 1) for all k ≥ f 0.
For a strictly monotonic function f : ℕ → ℕ, f (segment f k) ≤ k for all k ≥ f 0.