Well-founded sets #
A well-founded subset of an ordered type is one on which the relation <
is well-founded.
Main Definitions #
set.well_founded_on s r
indicates that the relationr
is well-founded when restricted to the sets
.set.is_wf s
indicates that<
is well-founded when restricted tos
.set.partially_well_ordered_on s r
indicates that the relationr
is partially well-ordered (also known as well quasi-ordered) when restricted to the sets
.set.is_pwo s
indicates that any infinite sequence of elements ins
contains an infinite monotone subsequence. Note that
Definitions for Hahn Series #
set.add_antidiagonal s t a
andset.mul_antidiagonal s t a
are the sets of pairs of elements froms
andt
that add/multiply toa
.finset.add_antidiagonal
andfinset.mul_antidiagonal
are finite versions ofset.add_antidiagonal
andset.mul_antidiagonal
defined whens
andt
are well-founded.
Main Results #
- Higman's Lemma,
set.partially_well_ordered_on.partially_well_ordered_on_sublist_forall₂
, shows that ifr
is partially well-ordered ons
, thenlist.sublist_forall₂
is partially well-ordered on the set of lists of elements ofs
. The result was originally published by Higman, but this proof more closely follows Nash-Williams. set.well_founded_on_iff
relateswell_founded_on
to the well-foundedness of a relation on the original type, to avoid dealing with subtypes.set.is_wf.mono
shows that a subset of a well-founded subset is well-founded.set.is_wf.union
shows that the union of two well-founded subsets is well-founded.finset.is_wf
shows that allfinset
s are well-founded.
TODO #
Prove that s
is partial well ordered iff it has no infinite descending chain or antichain.
References #
s.well_founded_on r
indicates that the relation r
is well-founded when restricted to s
.
Equations
- s.well_founded_on r = well_founded (λ (a b : ↥s), r ↑a ↑b)
A subset is partially well-ordered by a relation r
when any infinite sequence contains
two elements where the first is related to the second by r
.
A subset of a preorder is partially well-ordered when any infinite sequence contains a monotone subsequence of length 2 (or equivalently, an infinite monotone subsequence).
Equations
is_wf.min
returns a minimal element of a nonempty well-founded set.
Equations
- hs.min hn = ↑(well_founded.min hs set.univ _)
In the context of partial well-orderings, a bad sequence is a nonincreasing sequence
whose range is contained in a particular set s
. One exists if and only if s
is not
partially well-ordered.
This indicates that every bad sequence g
that agrees with f
on the first n
terms has rk (f n) ≤ rk (g n)
.
Equations
- set.partially_well_ordered_on.is_min_bad_seq r rk s n f = ∀ (g : ℕ → α), (∀ (m : ℕ), m < n → f m = g m) → rk (g n) < rk (f n) → ¬set.partially_well_ordered_on.is_bad_seq r s g
Given a bad sequence f
, this constructs a bad sequence that agrees with f
on the first n
terms and is minimal at n
.
Equations
- set.partially_well_ordered_on.min_bad_seq_of_bad_seq r rk s n f hf = and.dcases_on _ (λ (h1 : ∀ (m : ℕ), m < n → f m = classical.some _ m) (right : set.partially_well_ordered_on.is_bad_seq r s (classical.some _) ∧ rk (classical.some _ n) = nat.find _), right.dcases_on (λ (h2 : set.partially_well_ordered_on.is_bad_seq r s (classical.some _)) (h3 : rk (classical.some _ n) = nat.find _), ⟨classical.some _, _⟩))
Higman's Lemma, which states that for any reflexive, transitive relation r
which is
partially well-ordered on a set s
, the relation list.sublist_forall₂ r
is partially
well-ordered on the set of lists of elements of s
. That relation is defined so that
list.sublist_forall₂ r l₁ l₂
whenever l₁
related pointwise by r
to a sublist of l₂
.
set.add_antidiagonal s t a
is the set of all pairs of an element in s
and an element in t
that add to a
.
finset.mul_antidiagonal_of_is_wf hs ht a
is the set of all pairs of an element in
s
and an element in t
that multiply to a
, but its construction requires proofs
hs
and ht
that s
and t
are well-ordered.
Equations
- finset.mul_antidiagonal hs ht a = _.to_finset
finset.add_antidiagonal_of_is_wf hs ht a
is the set of all pairs of an element in
s
and an element in t
that add to a
, but its construction requires proofs
hs
and ht
that s
and t
are well-ordered.
Equations
- finset.add_antidiagonal hs ht a = _.to_finset
A version of Dickson's lemma any subset of functions Π s : σ, α s
is partially well
ordered, when σ
is a fintype
and each α s
is a linear well order.
This includes the classical case of Dickson's lemma that ℕ ^ n
is a well partial order.
Some generalizations would be possible based on this proof, to include cases where the target
is partially well ordered, and also to consider the case of partially_well_ordered_on
instead of
is_pwo
.