Maximal length of chains #
THIS FILE IS SYNCHRONIZED WITH MATHLIB4. Any changes to this file require a corresponding PR to mathlib4.
This file contains lemmas to work with the maximal length of strictly descending finite sequences (chains) in a partial order.
Main definition #
set.subchain
: The set of strictly ascending lists ofα
contained in aset α
.set.chain_height
: The maximal length of a strictly ascending sequence in a partial order. This is defined as the maximum of the lengths ofset.subchain
s, valued inℕ∞
.
Main results #
set.exists_chain_of_le_chain_height
: For eachn : ℕ
such thatn ≤ s.chain_height
, there existss.subchain
of lengthn
.set.chain_height_mono
: Ifs ⊆ t
thens.chain_height ≤ t.chain_height
.set.chain_height_image
: Iff
is an order embedding, then(f '' s).chain_height = s.chain_height
.set.chain_height_insert_of_forall_lt
: If∀ y ∈ s, y < x
, then(insert x s).chain_height = s.chain_height + 1
.set.chain_height_insert_of_lt_forall
: If∀ y ∈ s, x < y
, then(insert x s).chain_height = s.chain_height + 1
.set.chain_height_union_eq
: If∀ x ∈ s, ∀ y ∈ t, s ≤ t
, then(s ∪ t).chain_height = s.chain_height + t.chain_height
.set.well_founded_gt_of_chain_height_ne_top
: Ifs
has finite height, then>
is well-founded ons
.set.well_founded_lt_of_chain_height_ne_top
: Ifs
has finite height, then<
is well-founded ons
.
@[simp]
theorem
set.one_le_chain_height_iff
{α : Type u_1}
[has_lt α]
{s : set α} :
1 ≤ s.chain_height ↔ s.nonempty
@[simp]
theorem
set.chain_height_eq_zero_iff
{α : Type u_1}
[has_lt α]
{s : set α} :
s.chain_height = 0 ↔ s = ∅
@[simp]
theorem
set.chain_height_of_is_empty
{α : Type u_1}
[has_lt α]
{s : set α}
[is_empty α] :
s.chain_height = 0
@[simp]
theorem
set.chain_height_eq_supr_Ici
{α : Type u_1}
(s : set α)
[preorder α] :
s.chain_height = ⨆ (i : α) (H : i ∈ s), (s ∩ set.Ici i).chain_height
theorem
set.chain_height_eq_supr_Iic
{α : Type u_1}
(s : set α)
[preorder α] :
s.chain_height = ⨆ (i : α) (H : i ∈ s), (s ∩ set.Iic i).chain_height
theorem
set.chain_height_insert_of_forall_gt
{α : Type u_1}
{s : set α}
[preorder α]
(a : α)
(hx : ∀ (b : α), b ∈ s → a < b) :
(has_insert.insert a s).chain_height = s.chain_height + 1
theorem
set.chain_height_insert_of_forall_lt
{α : Type u_1}
{s : set α}
[preorder α]
(a : α)
(ha : ∀ (b : α), b ∈ s → b < a) :
(has_insert.insert a s).chain_height = s.chain_height + 1
theorem
set.chain_height_union_le
{α : Type u_1}
{s t : set α}
[preorder α] :
(s ∪ t).chain_height ≤ s.chain_height + t.chain_height
theorem
set.chain_height_union_eq
{α : Type u_1}
[preorder α]
(s t : set α)
(H : ∀ (a : α), a ∈ s → ∀ (b : α), b ∈ t → a < b) :
(s ∪ t).chain_height = s.chain_height + t.chain_height
theorem
set.well_founded_gt_of_chain_height_ne_top
{α : Type u_1}
[preorder α]
(s : set α)
(hs : s.chain_height ≠ ⊤) :
theorem
set.well_founded_lt_of_chain_height_ne_top
{α : Type u_1}
[preorder α]
(s : set α)
(hs : s.chain_height ≠ ⊤) :