Well-founded sets #
THIS FILE IS SYNCHRONIZED WITH MATHLIB4. Any changes to this file require a corresponding PR to mathlib4.
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 this is equivalent to containing only two comparable elements.
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 #
Relations well-founded on sets #
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
is accessible under the relation r
iff r
is well-founded on the downward transitive
closure of a
under r
(including a
or not).
Sets well-founded w.r.t. the strict inequality #
Partially well-ordered sets #
A set 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
. Equivalently, any antichain (see is_antichain
) is
finite, see set.partially_well_ordered_on_iff_finite_antichains
.
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
In a linear order, the predicates set.is_wf
and set.is_pwo
are equivalent.
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.
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₂
.
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 set.partially_well_ordered_on
instead of
set.is_pwo
.
Stronger version of prod.lex_wf
. Instead of requiring rβ on g
to be well-founded, we only
require it to be well-founded on fibers of f
.
Stronger version of psigma.lex_wf
. Instead of requiring rπ on g
to be well-founded, we only
require it to be well-founded on fibers of f
.