The Mathlib Handbook

The volumes of the handbook are not written yet. This site shows the map of Mathlib that they will follow, at Mathlib 4472534b60.

The areas / V04. Order and lattices

Mathlib.Order.Height

23 declarations. Mathlib docs · Source

Maximal length of chains

This file contains lemmas to work with the maximal lengths of chains of arbitrary relations. See Order.height for a definition specialized to finding the height of an element in a preorder.

Main definition

  • Set.chainHeight: The maximal length of a chain in a set s with relation r.

Main results

  • Set.exists_isChain_of_le_chainHeight: For each n : ℕ such that n ≤ s.chainHeight, there exists a subset t of length n such that IsChain r t.
  • Set.chainHeight_mono: If s ⊆ t then s.chainHeight ≤ t.chainHeight.
  • Set.chainHeight_eq_of_relEmbedding: If f is an relation embedding, then (f '' s).chainHeight = s.chainHeight.

def Set.chainHeight E3 #

{α : Type u_1} → Set α → (α → α → Prop) → ℕ∞

The maximal length of a chain in a set s with relation r.

theorem Set.chainHeight_eq_iSup E1 #

∀ {α : Type u_1} (s : Set α) (r : α → α → Prop), s.chainHeight r = ⨆ t, (↑t).encard

theorem Set.chainHeight_le_encard E1 #

∀ {α : Type u_1} (s : Set α) (r : α → α → Prop), s.chainHeight r ≤ s.encard

theorem Set.chainHeight_ne_top_of_finite E1 #

∀ {α : Type u_1} (s : Set α) (r : α → α → Prop), s.Finite → s.chainHeight r ≠ ⊤

theorem Set.exists_isChain_of_le_chainHeight E3 #

∀ {α : Type u_1} {r : α → α → Prop} {s : Set α} (n : ℕ), ↑n ≤ s.chainHeight r → ∃ t ⊆ s, t.encard = ↑n ∧ IsChain r t

theorem Set.exists_eq_chainHeight_of_chainHeight_ne_top E1 #

∀ {α : Type u_1} (s : Set α) (r : α → α → Prop), s.chainHeight r ≠ ⊤ → ∃ t ⊆ s, t.encard = s.chainHeight r ∧ IsChain r t

theorem Set.exists_eq_chainHeight_of_finite E1 #

∀ {α : Type u_1} (s : Set α) (r : α → α → Prop), s.Finite → ∃ t ⊆ s, t.encard = s.chainHeight r ∧ IsChain r t

theorem Set.encard_le_chainHeight_of_isChain E1 #

∀ {α : Type u_1} {r : α → α → Prop} (s t : Set α), t ⊆ s → IsChain r t → t.encard ≤ s.chainHeight r

theorem Set.encard_eq_chainHeight_of_isChain E1 #

∀ {α : Type u_1} {r : α → α → Prop} (s : Set α), IsChain r s → s.encard = s.chainHeight r

theorem Set.finite_of_chainHeight_ne_top E1 #

∀ {α : Type u_1} {r : α → α → Prop} {s : Set α}, IsChain r s → s.chainHeight r ≠ ⊤ → s.Finite

theorem Set.not_isChain_of_chainHeight_lt_encard E1 #

∀ {α : Type u_1} (r : α → α → Prop) (s t : Set α), t ⊆ s → s.chainHeight r < t.encard → ¬IsChain r t

theorem Set.chainHeight_eq_top_iff E0 #

∀ {α : Type u_1} (s : Set α) (r : α → α → Prop), s.chainHeight r = ⊤ ↔ ∀ (n : ℕ), ∃ t ⊆ s, t.encard = ↑n ∧ IsChain r t

theorem Set.chainHeight_eq_zero_iff E0 #

∀ {α : Type u_1} (s : Set α) (r : α → α → Prop), s.chainHeight r = 0 ↔ s = ∅

theorem Set.chainHeight_empty E0 #

∀ {α : Type u_1} (r : α → α → Prop), ∅.chainHeight r = 0

theorem Set.one_le_chainHeight_iff E0 #

∀ {α : Type u_1} (s : Set α) (r : α → α → Prop), 1 ≤ s.chainHeight r ↔ s.Nonempty

theorem Set.chainHeight_of_isEmpty E0 #

∀ {α : Type u_1} (s : Set α) (r : α → α → Prop) [IsEmpty α], s.chainHeight r = 0

theorem Set.chainHeight_mono E3 #

∀ {α : Type u_1} (r : α → α → Prop) (s t : Set α), s ⊆ t → s.chainHeight r ≤ t.chainHeight r

theorem Set.chainHeight_flip E0 #

∀ {α : Type u_1} (s : Set α) (r : α → α → Prop), s.chainHeight (flip r) = s.chainHeight r

theorem Set.chainHeight_eq_of_relEmbedding E3 #

∀ {α : Type u_1} {β : Type u_2} {r : α → α → Prop} {r' : β → β → Prop} (s : Set α) (e : r ↪r r'),
  (⇑e '' s).chainHeight r' = s.chainHeight r

theorem Set.chainHeight_eq_of_relIso E1 #

∀ {α : Type u_1} {β : Type u_2} {r : α → α → Prop} {r' : β → β → Prop} (s : Set α) (e : r ≃r r'),
  (⇑e '' s).chainHeight r' = s.chainHeight r

theorem Set.chainHeight_coe_univ E0 #

∀ {α : Type u_1} (s : Set α) (r : α → α → Prop), (Set.univ.chainHeight fun x1 x2 ↦ r ↑x1 ↑x2) = s.chainHeight r

theorem Set.chainHeight_coe_univ_le E0 #

∀ {α : Type u_1} (s : Set α) [inst : LE α],
  (Set.univ.chainHeight fun x1 x2 ↦ x1 ≤ x2) = s.chainHeight fun x1 x2 ↦ x1 ≤ x2

theorem Set.chainHeight_coe_univ_lt E0 #

∀ {α : Type u_1} (s : Set α) [inst : LT α],
  (Set.univ.chainHeight fun x1 x2 ↦ x1 < x2) = s.chainHeight fun x1 x2 ↦ x1 < x2