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.Extension.Well

9 declarations. Mathlib docs · Source

Extend a well-founded order to a well-order

This file constructs a well-order (linear well-founded order) which is an extension of a given well-founded order.

Proof idea

We can map our order into two well-orders:

  • the first map respects the order but isn't necessarily injective. Namely, this is the rank function WellFounded.rank : α → Ordinal.
  • the second map is injective but doesn't necessarily respect the order. This is an arbitrary embedding into Cardinal given by embeddingToCardinal.

Then their lexicographic product is a well-founded linear order which our original order injects in.

Implementation notes

The definition in mathlib 3 used an auxiliary well-founded order on α lifted from Cardinal, instead of using Cardinal directly. The new definition is definitionally equal to the mathlib 3 version but avoids non-standard instances.

Tags

well-founded relation, well order, extension

def WellFounded.wellOrderExtension E1 #

{α : Type u} → (r : α → α → Prop) → [WellFounded r] → LinearOrder α

An arbitrary well order on α that extends r.

The construction maps r into two well-orders: the first map is WellFounded.rank, which is not necessarily injective but respects the order r; the other map is the identity (with an arbitrarily chosen well-order on α), which is injective but doesn't respect r.

By taking the lexicographic product of the two, we get both properties, so we can pull it back and get a well-order that extend our original order r. Another way to view this is that we choose an arbitrary well-order to serve as a tiebreak between two elements of same rank.

instance WellFounded.wellOrderExtension.wellFounded_lt E0 #

∀ {α : Type u} (r : α → α → Prop) [inst : WellFounded r], WellFounded LT.lt

instance WellFounded.wellOrderExtension.isWellOrder_lt E0 #

∀ {α : Type u} (r : α → α → Prop) [inst : WellFounded r], IsWellOrder α LT.lt

theorem WellFounded.exists_well_order_ge E1 #

∀ {α : Type u} (r : α → α → Prop) [WellFounded r], ∃ s, r ≤ s ∧ IsWellOrder α s

Any well-founded relation can be extended to a well-ordering on that type.

def WellOrderExtension E1 #

Type u_1 → Type u_1

A type alias for α, intended to extend a well-founded order on α to a well-order.

instance instInhabitedWellOrderExtension E0 #

{α : Type u} → [Inhabited α] → Inhabited (WellOrderExtension α)

def toWellOrderExtension E1 #

{α : Type u} → α ≃ WellOrderExtension α

"Identity" equivalence between a well-founded order and its well-order extension.

instance instLinearOrderWellOrderExtensionOfWellFoundedLT E0 #

{α : Type u} → [inst : LT α] → [h : WellFoundedLT α] → LinearOrder (WellOrderExtension α)

theorem toWellOrderExtension_strictMono E1 #

∀ {α : Type u} [inst : Preorder α] [inst_1 : WellFoundedLT α], StrictMono ⇑toWellOrderExtension