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 / V31. Set theory

Mathlib.SetTheory.ZFC.Ordinal

66 declarations. Mathlib docs · Source

Von Neumann ordinals

This file works towards the development of von Neumann ordinals, i.e. transitive sets, well-ordered under ∈.

Definitions

  • ZFSet.IsTransitive means that every element of a set is a subset.
  • ZFSet.IsOrdinal means that the set is transitive and well-ordered under ∈. We show multiple equivalences to this definition.
  • Ordinal.toZFSet converts Lean's type-theoretic ordinals into ZFC ordinals. We prove that these two notions are order-isomorphic.

Transitive sets

Ordinals

Type-theoretic ordinals to von Neumann ordinals

def ZFSet.IsTransitive E1 #

ZFSet.{u_1} → Prop

A transitive set is one where every element is a subset.

This is equivalent to being an infinite-open interval in the transitive closure of membership.

theorem ZFSet.isTransitive_empty E0 #

∅.IsTransitive

theorem ZFSet.IsTransitive.subset_of_mem E1 #

∀ {x y : ZFSet.{u}}, x.IsTransitive → y ∈ x → y ⊆ x

theorem ZFSet.isTransitive_iff_mem_trans E1 #

∀ {z : ZFSet.{u}}, z.IsTransitive ↔ ∀ {x y : ZFSet.{u}}, x ∈ y → y ∈ z → x ∈ z

theorem ZFSet.IsTransitive.mem_trans E0 #

∀ {z : ZFSet.{u}}, z.IsTransitive → ∀ {x y : ZFSet.{u}}, x ∈ y → y ∈ z → x ∈ z

Alias of the forward direction of ZFSet.isTransitive_iff_mem_trans.

theorem ZFSet.IsTransitive.inter E1 #

∀ {x y : ZFSet.{u}}, x.IsTransitive → y.IsTransitive → (x ∩ y).IsTransitive

theorem ZFSet.IsTransitive.sUnion E1 #

∀ {x : ZFSet.{u}}, x.IsTransitive → x.sUnion.IsTransitive

The union of a transitive set is transitive.

theorem ZFSet.IsTransitive.sUnion' E1 #

∀ {x : ZFSet.{u}}, (∀ y ∈ x, y.IsTransitive) → x.sUnion.IsTransitive

The union of transitive sets is transitive.

theorem ZFSet.IsTransitive.iUnion E1 #

∀ {α : Type u_1} [inst : Small.{u, u_1} α] {f : α → ZFSet.{u}},
  (∀ (i : α), (f i).IsTransitive) → (ZFSet.iUnion fun i ↦ f i).IsTransitive

theorem ZFSet.IsTransitive.union E1 #

∀ {x y : ZFSet.{u}}, x.IsTransitive → y.IsTransitive → (x ∪ y).IsTransitive

theorem ZFSet.IsTransitive.powerset E1 #

∀ {x : ZFSet.{u}}, x.IsTransitive → x.powerset.IsTransitive

theorem ZFSet.isTransitive_iff_sUnion_subset E1 #

∀ {x : ZFSet.{u}}, x.IsTransitive ↔ x.sUnion ⊆ x

theorem ZFSet.IsTransitive.sUnion_subset E1 #

∀ {x : ZFSet.{u}}, x.IsTransitive → x.sUnion ⊆ x

Alias of the forward direction of ZFSet.isTransitive_iff_sUnion_subset.

theorem ZFSet.isTransitive_iff_subset_powerset E1 #

∀ {x : ZFSet.{u}}, x.IsTransitive ↔ x ⊆ x.powerset

theorem ZFSet.IsTransitive.subset_powerset E1 #

∀ {x : ZFSet.{u}}, x.IsTransitive → x ⊆ x.powerset

Alias of the forward direction of ZFSet.isTransitive_iff_subset_powerset.

structure ZFSet.IsOrdinal E1 #

ZFSet.{u_1} → Prop

A set x is a von Neumann ordinal when it's a transitive set, that's transitive under ∈. We prove that this further implies that x is well-ordered under ∈ in isOrdinal_iff_isWellOrder.

The transitivity condition a ∈ b → b ∈ c → a ∈ c can be written without assuming a ∈ x and b ∈ x. The lemma isOrdinal_iff_isTrans shows this condition is equivalent to the usual one.

ctor ZFSet.IsOrdinal.mk E0 #

∀ {x : ZFSet.{u_1}}, x.IsTransitive → (∀ {y z w : ZFSet.{u_1}}, y ∈ z → z ∈ w → w ∈ x → y ∈ w) → x.IsOrdinal

theorem ZFSet.IsOrdinal.isTransitive E1 #

∀ {x : ZFSet.{u_1}}, x.IsOrdinal → x.IsTransitive

An ordinal is a transitive set.

theorem ZFSet.IsOrdinal.mem_trans' E0 #

∀ {x : ZFSet.{u_1}}, x.IsOrdinal → ∀ {y z w : ZFSet.{u_1}}, y ∈ z → z ∈ w → w ∈ x → y ∈ w

The membership operation within an ordinal is transitive.

theorem ZFSet.IsOrdinal.subset_of_mem E1 #

∀ {x y : ZFSet.{u}}, x.IsOrdinal → y ∈ x → y ⊆ x

theorem ZFSet.IsOrdinal.mem_trans E0 #

∀ {x y z : ZFSet.{u}}, z.IsOrdinal → x ∈ y → y ∈ z → x ∈ z

theorem ZFSet.IsOrdinal.isTrans E1 #

∀ {x : ZFSet.{u}}, x.IsOrdinal → IsTrans (↥x) (Subrel (fun x1 x2 ↦ x1 ∈ x2) fun x_1 ↦ x_1 ∈ x)

theorem ZFSet.isOrdinal_iff_isTrans E1 #

∀ {x : ZFSet.{u}}, x.IsOrdinal ↔ x.IsTransitive ∧ IsTrans (↥x) (Subrel (fun x1 x2 ↦ x1 ∈ x2) fun x_1 ↦ x_1 ∈ x)

The simplified form of transitivity used within IsOrdinal yields an equivalent definition to the standard one.

theorem ZFSet.IsOrdinal.mem E1 #

∀ {x y : ZFSet.{u}}, x.IsOrdinal → y ∈ x → y.IsOrdinal

theorem ZFSet.isOrdinal_iff_forall_mem_isTransitive E1 #

∀ {x : ZFSet.{u}}, x.IsOrdinal ↔ x.IsTransitive ∧ ∀ y ∈ x, y.IsTransitive

An ordinal is a transitive set of transitive sets.

theorem ZFSet.isOrdinal_iff_forall_mem_isOrdinal E1 #

∀ {x : ZFSet.{u}}, x.IsOrdinal ↔ x.IsTransitive ∧ ∀ y ∈ x, y.IsOrdinal

An ordinal is a transitive set of ordinals.

theorem ZFSet.IsOrdinal.subset_iff_eq_or_mem E1 #

∀ {x y : ZFSet.{u}}, x.IsOrdinal → y.IsOrdinal → (x ⊆ y ↔ x = y ∨ x ∈ y)

theorem ZFSet.IsOrdinal.mem_of_subset_of_mem E0 #

∀ {x y z : ZFSet.{u}}, x.IsOrdinal → z.IsOrdinal → x ⊆ y → y ∈ z → x ∈ z

theorem ZFSet.IsOrdinal.notMem_iff_subset E1 #

∀ {x y : ZFSet.{u}}, x.IsOrdinal → y.IsOrdinal → (x ∉ y ↔ y ⊆ x)

theorem ZFSet.IsOrdinal.not_subset_iff_mem E1 #

∀ {x y : ZFSet.{u}}, x.IsOrdinal → y.IsOrdinal → (¬x ⊆ y ↔ y ∈ x)

theorem ZFSet.IsOrdinal.mem_or_subset E0 #

∀ {x y : ZFSet.{u}}, x.IsOrdinal → y.IsOrdinal → x ∈ y ∨ y ⊆ x

theorem ZFSet.IsOrdinal.subset_total E1 #

∀ {x y : ZFSet.{u}}, x.IsOrdinal → y.IsOrdinal → x ⊆ y ∨ y ⊆ x

theorem ZFSet.IsOrdinal.mem_trichotomous E0 #

∀ {x y : ZFSet.{u}}, x.IsOrdinal → y.IsOrdinal → x ∈ y ∨ x = y ∨ y ∈ x

theorem ZFSet.IsOrdinal.trichotomous E1 #

∀ {x : ZFSet.{u}}, x.IsOrdinal → Std.Trichotomous (Subrel (fun x1 x2 ↦ x1 ∈ x2) fun x_1 ↦ x_1 ∈ x)

theorem ZFSet.isOrdinal_iff_trichotomous E1 #

∀ {x : ZFSet.{u}}, x.IsOrdinal ↔ x.IsTransitive ∧ Std.Trichotomous (Subrel (fun x1 x2 ↦ x1 ∈ x2) fun x_1 ↦ x_1 ∈ x)

An ordinal is a transitive set, trichotomous under membership.

theorem ZFSet.IsOrdinal.isWellOrder E1 #

∀ {x : ZFSet.{u}}, x.IsOrdinal → IsWellOrder (↥x) (Subrel (fun x1 x2 ↦ x1 ∈ x2) fun x_1 ↦ x_1 ∈ x)

theorem ZFSet.isOrdinal_iff_isWellOrder E1 #

∀ {x : ZFSet.{u}}, x.IsOrdinal ↔ x.IsTransitive ∧ IsWellOrder (↥x) (Subrel (fun x1 x2 ↦ x1 ∈ x2) fun x_1 ↦ x_1 ∈ x)

An ordinal is a transitive set, well-ordered under membership.

theorem ZFSet.IsOrdinal.rank_lt_iff_mem E1 #

∀ {x y : ZFSet.{u_1}}, x.IsOrdinal → y.IsOrdinal → (x.rank < y.rank ↔ x ∈ y)

theorem ZFSet.IsOrdinal.rank_le_iff_subset E1 #

∀ {x y : ZFSet.{u_1}}, x.IsOrdinal → y.IsOrdinal → (x.rank ≤ y.rank ↔ x ⊆ y)

theorem ZFSet.IsOrdinal.rank_inj E1 #

∀ {x y : ZFSet.{u_1}}, x.IsOrdinal → y.IsOrdinal → (x.rank = y.rank ↔ x = y)

theorem ZFSet.isOrdinal_empty E0 #

∅.IsOrdinal

theorem ZFSet.isOrdinal_succ E1 #

∀ {x : ZFSet.{u_1}}, x.IsOrdinal → (insert x x).IsOrdinal

def Ordinal.toPSet E1 #

Ordinal.{u} → PSet.{u}

The von Neumann ordinal corresponding to a given Ordinal, as a PSet.

The elements of o.toPSet are all a.toPSet with a < o.

theorem Ordinal.type_toPSet E0 #

∀ (o : Ordinal.{u_1}), o.toPSet.Type = o.ToType

theorem Ordinal.mem_toPSet_iff E0 #

∀ {o : Ordinal.{u_1}} {x : PSet.{u_1}}, x ∈ o.toPSet ↔ ∃ a < o, x.Equiv a.toPSet

theorem Ordinal.rank_toPSet E0 #

∀ (o : Ordinal.{u_1}), o.toPSet.rank = o

def Ordinal.toZFSet E1 #

Ordinal.{u} → ZFSet.{u}

The von Neumann ordinal corresponding to a given Ordinal, as a ZFSet.

The elements of o.toZFSet are all a.toZFSet with a < o.

theorem Ordinal.mk_toPSet E0 #

∀ (o : Ordinal.{u_1}), ZFSet.mk o.toPSet = o.toZFSet

theorem Ordinal.mem_toZFSet_iff E0 #

∀ {o : Ordinal.{u_1}} {x : ZFSet.{u_1}}, x ∈ o.toZFSet ↔ ∃ a < o, a.toZFSet = x

theorem Ordinal.rank_toZFSet E0 #

∀ (o : Ordinal.{u_1}), o.toZFSet.rank = o

theorem Ordinal.coe_toZFSet E0 #

∀ {o : Ordinal.{u_1}}, ↑o.toZFSet = Ordinal.toZFSet '' Set.Iio o

theorem Ordinal.toZFSet_monotone E1 #

Monotone Ordinal.toZFSet

theorem Ordinal.toZFSet_mem_toZFSet_iff E0 #

∀ {a b : Ordinal.{u_1}}, a.toZFSet ∈ b.toZFSet ↔ a < b

theorem Ordinal.toZFSet_subset_toZFSet_iff E0 #

∀ {a b : Ordinal.{u_1}}, a.toZFSet ⊆ b.toZFSet ↔ a ≤ b

theorem Ordinal.toZFSet_strictMono E1 #

StrictMono Ordinal.toZFSet

theorem Ordinal.toZFSet_injective E1 #

Function.Injective Ordinal.toZFSet

theorem Ordinal.toZFSet_zero E0 #

Ordinal.toZFSet 0 = ∅

theorem Ordinal.toZFSet_add_one E0 #

∀ (o : Ordinal.{u_1}), (o + 1).toZFSet = insert o.toZFSet o.toZFSet

theorem Ordinal.card_toZFSet E0 #

∀ (o : Ordinal.{u_1}), o.toZFSet.card = o.card

theorem ZFSet.isOrdinal_toZFSet E1 #

∀ (o : Ordinal.{u_1}), o.toZFSet.IsOrdinal

theorem ZFSet.IsOrdinal.toZFSet_rank_eq E0 #

∀ {x : ZFSet.{u_1}}, x.IsOrdinal → x.rank.toZFSet = x

theorem ZFSet.isOrdinal_iff_mem_range_toZFSet E1 #

∀ {x : ZFSet.{u}}, x.IsOrdinal ↔ x ∈ Set.range Ordinal.toZFSet

def Ordinal.toZFSetIso E1 #

Ordinal.{u_1} ≃o { x // x.IsOrdinal }

Ordinal is order-equivalent to the type of von Neumann ordinals.

theorem Ordinal.toZFSetIso_apply E0 #

∀ (o : Ordinal.{u_1}), Ordinal.toZFSetIso o = ⟨o.toZFSet, ⋯⟩

theorem Ordinal.toZFSetIso_symm_apply E0 #

∀ (x : { x // x.IsOrdinal }), (RelIso.symm Ordinal.toZFSetIso) x = (↑x).rank

theorem ZFSet.isOrdinal_notCMem_univ E3 #

¬ZFClass.CMem {x | x.IsOrdinal} Set.univ

The Burali-Forti paradox: ordinals form a proper class.