Relation embeddings from the naturals #
This file allows translation from monotone functions ℕ → α
to order embeddings ℕ ↪ α
and
defines the limit value of an eventually-constant sequence.
Main declarations #
natLT
/natGT
: Make an order embeddingNat ↪ α
from an increasing/decreasing functionNat → α
.monotonicSequenceLimit
: The limit of an eventually-constant monotone sequenceNat →o α
.monotonicSequenceLimitIndex
: The index of the first occurrence ofmonotonicSequenceLimit
in the sequence.
If f
is a strictly r
-increasing sequence, then this returns f
as an order embedding.
Equations
Instances For
If f
is a strictly r
-decreasing sequence, then this returns f
as an order embedding.
Equations
- RelEmbedding.natGT f H = (RelEmbedding.natLT f H).swap
Instances For
A relation is well-founded iff it doesn't have any infinite decreasing sequence.
An order embedding from ℕ
to itself with a specified range
Equations
- Nat.orderEmbeddingOfSet s = RelEmbedding.trans (RelEmbedding.natLT (Nat.Subtype.ofNat s) ⋯).orderEmbeddingOfLTEmbedding (OrderEmbedding.subtype s)
Instances For
Nat.Subtype.ofNat
as an order isomorphism between ℕ
and an infinite subset. See also
Nat.Nth
for a version where the subset may be finite.
Equations
- Nat.Subtype.orderIsoOfNat s = RelIso.ofSurjective (RelEmbedding.natLT (Nat.Subtype.ofNat s) ⋯).orderEmbeddingOfLTEmbedding ⋯
Instances For
This is the infinitary Erdős–Szekeres theorem, and an important lemma in the usual proof of
Bolzano-Weierstrass for ℝ
.
The "monotone chain condition" below is sometimes a convenient form of well foundedness.
Given an eventually-constant monotone sequence a₀ ≤ a₁ ≤ a₂ ≤ ...
in a partially-ordered
type, monotonicSequenceLimitIndex a
is the least natural number n
for which aₙ
reaches the
constant value. For sequences that are not eventually constant, monotonicSequenceLimitIndex a
is defined, but is a junk value.
Instances For
The constant value of an eventually-constant monotone sequence a₀ ≤ a₁ ≤ a₂ ≤ ...
in a
partially-ordered type.