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.Class

57 declarations and 64 deprecated aliases. Mathlib docs · Source

ZFC classes

Classes in set theory are usually defined as collections of elements satisfying some property. We model this by defining ZFClass as Set ZFSet.

Main definitions

  • ZFClass: Defined as Set ZFSet.
  • ZFClass.iota: Definite description operator.
  • ZFSet.isOrdinal_notCMem_univ: The Burali-Forti paradox. Ordinals form a proper class.

instance Class.instUsesSetNotationForOrder E0 #

UsesSetNotationForOrder Class.{u_1}

abbrev ZFClass E3 #

Type (u_1 + 1)

The collection of all classes.

def ZFClass.CMem E1 #

ZFClass.{u} → ZFClass.{u} → Prop

Membership of classes. A ᶜ∈ B if A is a ZFC set which satisfies B.

Note that the A ∈ B notation is already taken for the case where A : ZFSet instead (the OutParam in Mem forces the type of A to be uniquely inferrable from the type of B).

def ZFClass.«term_ᶜ∈_» E1 #

Lean.TrailingParserDescr

Membership of classes. A ᶜ∈ B if A is a ZFC set which satisfies B.

Note that the A ∈ B notation is already taken for the case where A : ZFSet instead (the OutParam in Mem forces the type of A to be uniquely inferrable from the type of B).

def ZFClass.«term_ᶜ∉_» E1 #

Lean.TrailingParserDescr

Negated membership of classes, see ZFClass.CMem.

Conventions for notations in identifiers:

  • The recommended spelling of ᶜ∉ in identifiers is notCMem.

theorem ZFClass.coe_cmem E0 #

∀ {A : ZFClass.{u}} {x : ZFSet.{u}}, ZFClass.CMem (↑x) A ↔ x ∈ A

theorem ZFClass.notCMem_empty E0 #

∀ {A : ZFClass.{u}}, ¬A.CMem ∅

theorem ZFClass.cmem_univ E0 #

∀ {A : ZFClass.{u}}, A.CMem Set.univ ↔ ∃ x, ↑x = A

instance ZFClass.wellFounded_cmem E0 #

WellFounded fun x1 x2 ↦ x1.CMem x2

instance ZFClass.instWellFoundedRelation E0 #

WellFoundedRelation ZFClass.{u_1}

theorem ZFClass.cmem_asymm E1 #

∀ {A B : ZFClass.{u}}, A.CMem B → ¬B.CMem A

theorem ZFClass.cmem_irrefl E1 #

∀ {A : ZFClass.{u}}, ¬A.CMem A

theorem ZFClass.univ_notCMem_univ E1 #

¬ZFClass.CMem Set.univ Set.univ

There is no universal set.

This is stated as univ ᶜ∉ univ, meaning that univ (the class of all sets) is proper (does not belong to the class of all sets).

def ZFClass.congToClass E1 #

Set ZFClass.{u} → ZFClass.{u}

Convert a conglomerate (a collection of classes) into a class

def ZFClass.classToCong E1 #

ZFClass.{u} → Set ZFClass.{u}

Convert a class into a conglomerate (a collection of classes)

theorem ZFClass.congToClass_empty E0 #

ZFClass.congToClass ∅ = ∅

theorem ZFClass.classToCong_empty E0 #

∅.classToCong = ∅

def ZFClass.powerset E1 #

ZFClass.{u_1} → ZFClass.{u_1}

The power class of a class is the class of all subclasses that are ZFC sets

def ZFClass.sUnion E1 #

ZFClass.{u_1} → ZFClass.{u_1}

The union of a class is the class of all members of ZFC sets in the class. Uses ⋃₀ notation, scoped under the ZFClass namespace.

def ZFClass.«term⋃₀_» E1 #

Lean.ParserDescr

The union of a class is the class of all members of ZFC sets in the class. Uses ⋃₀ notation, scoped under the ZFClass namespace.

def ZFClass.sInter E1 #

ZFClass.{u_1} → ZFClass.{u_1}

The intersection of a class is the class of all members of ZFC sets in the class . Uses ⋂₀ notation, scoped under the ZFClass namespace.

def ZFClass.«term⋂₀_» E1 #

Lean.ParserDescr

The intersection of a class is the class of all members of ZFC sets in the class . Uses ⋂₀ notation, scoped under the ZFClass namespace.

theorem ZFClass.mem_powerset E0 #

∀ {A : ZFClass.{u}} {x : ZFSet.{u}}, x ∈ A.powerset ↔ ↑x ⊆ A

theorem ZFClass.coe_powerset E0 #

∀ (x : ZFSet.{u}), ↑x.powerset = ZFClass.powerset ↑x

theorem ZFClass.mem_sUnion E0 #

∀ {A : ZFClass.{u}} {y : ZFSet.{u}}, y ∈ A.sUnion ↔ ∃ z ∈ A, y ∈ z

theorem ZFClass.coe_sUnion E0 #

∀ (x : ZFSet.{u}), ↑x.sUnion = ZFClass.sUnion ↑x

theorem ZFClass.cmem_sUnion E0 #

∀ {A B : ZFClass.{u}}, B.CMem A.sUnion ↔ ∃ C, C.CMem A ∧ B.CMem C

theorem ZFClass.mem_sInter E0 #

∀ {A : ZFClass.{u}} {y : ZFSet.{u}}, y ∈ A.sInter ↔ ∀ z ∈ A, y ∈ z

theorem ZFClass.coe_sInter E0 #

∀ {x : ZFSet.{u}}, x.Nonempty → ↑x.sInter = ZFClass.sInter ↑x

theorem ZFClass.cmem_of_cmem_sInter E1 #

∀ {A B C : ZFClass.{u}}, B.CMem A.sInter → C.CMem A → B.CMem C

theorem ZFClass.cmem_sInter E1 #

∀ {A B : ZFClass.{u}}, Set.Nonempty A → (B.CMem A.sInter ↔ ∀ (z : ZFClass.{u}), z.CMem A → B.CMem z)

theorem ZFClass.sUnion_empty E0 #

∅.sUnion = ∅

theorem ZFClass.sInter_empty E0 #

∅.sInter = Set.univ

def ZFClass.iota E3 #

ZFClass.{u_1} → ZFClass.{u_1}

The definite description operator, which is {x} if A = {x} and ∅ otherwise.

theorem ZFClass.iota_val E0 #

∀ (A : ZFClass.{u_1}) (x : ZFSet.{u_1}), (∀ (y : ZFSet.{u_1}), ZFClass.CMem (↑y) A ↔ y = x) → A.iota = ↑x

theorem ZFClass.iota_ex E1 #

∀ (A : ZFClass.{u}), A.iota.CMem Set.univ

Unlike the other set constructors, the iota definite descriptor is a set for any set input, but not constructively so, so there is no associated ZFClass → Set function.

def ZFClass.fval E1 #

ZFClass.{u} → ZFClass.{u} → ZFClass.{u}

Function value

def ZFClass.«term_′_» E1 #

Lean.TrailingParserDescr

Function value

theorem ZFClass.fval_ex E1 #

∀ (F A : ZFClass.{u}), (F ′ A).CMem Set.univ

instance instComplClass E0 #

Compl Class.{u_1}

instance instSDiffClass E0 #

SDiff Class.{u_1}

instance instEmptyCollectionClass E0 #

EmptyCollection Class.{u_1}

instance instNonemptyClass E0 #

Nonempty Class.{u_1}

instance instLEClass E0 #

LE Class.{u_1}

instance instMaxClass E0 #

Max Class.{u_1}

instance instMinClass E0 #

Min Class.{u_1}

theorem Class.ext_iff E0 #

∀ {x y : Class.{u}}, x = y ↔ ∀ (z : ZFSet.{u}), x.Mem z ↔ y.Mem z

instance Class.instCompleteLattice E0 #

CompleteLattice Class.{u_1}

def Class.«term⋃₀_» E1 #

Lean.ParserDescr

The union of a class is the class of all members of ZFC sets in the class. Uses ⋃₀ notation, scoped under the Class namespace.

def Class.«term⋂₀_» E1 #

Lean.ParserDescr

The intersection of a class is the class of all members of ZFC sets in the class . Uses ⋂₀ notation, scoped under the Class namespace.

theorem ZFSet.map_fval E0 #

∀ {x y : ZFSet.{u}} {f : ZFSet.{u} → ZFSet.{u}} [inst : ZFSet.Definable₁ f], y ∈ x → ↑(ZFSet.map f x) ′ ↑y = ↑(f y)

def ZFSet.choice E1 #

ZFSet.{u} → ZFSet.{u}

A choice function on the class of nonempty ZFC sets.

theorem ZFSet.choice_mem_aux E0 #

∀ (x : ZFSet.{u}), ∅ ∉ x → ∀ y ∈ x, (Classical.epsilon fun z ↦ z ∈ y) ∈ y

theorem ZFSet.choice_isFunc E1 #

∀ (x : ZFSet.{u}), ∅ ∉ x → x.IsFunc x.sUnion x.choice

theorem ZFSet.choice_cmem E1 #

∀ (x : ZFSet.{u}), ∅ ∉ x → ∀ y ∈ x, (↑x.choice ′ ↑y).CMem ↑y

def ZFSet.coeEquiv E1 #

ZFSet.{u} ≃ { s // Small.{u, u + 1} ↑s }

SetLike.coe as an equivalence.

theorem ZFSet.coeEquiv_apply_coe E0 #

∀ (x : ZFSet.{u}), ↑(ZFSet.coeEquiv x) = ↑x

Deprecated aliases

NameNew nameSince
ClassZFClass2026-09-25
Class.MemZFClass.CMem2026-09-25
Class.ToSetZFClass.CMem2026-09-25
Class.classToCongZFClass.classToCong2026-09-25
Class.classToCong_emptyZFClass.classToCong_empty2026-09-25
Class.coeSetLike.coe2026-09-25
Class.coe.injSetLike.coe_injective2026-09-25
Class.coe_applySetLike.mem_coe2026-09-25
Class.coe_diffClass.coe_sdiff2026-06-03
Class.coe_emptyZFSet.coe_empty2026-09-25
Class.coe_insertZFSet.coe_insert2026-09-25
Class.coe_interZFSet.coe_inter2026-09-25
Class.coe_memSetLike.mem_coe2026-09-25
Class.coe_powersetZFClass.coe_powerset2026-09-25
Class.coe_sInterZFClass.coe_sInter2026-09-25
Class.coe_sUnionZFClass.coe_sUnion2026-09-25
Class.coe_sdiffZFSet.coe_sdiff2026-09-25
Class.coe_sepZFSet.coe_sep2026-09-25
Class.coe_subsetZFSet.coe_subset_coe2026-09-25
Class.coe_unionZFSet.coe_union2026-09-25
Class.congToClassZFClass.congToClass2026-09-25
Class.congToClass_emptyZFClass.congToClass_empty2026-09-25
Class.extSet.ext2026-09-25
Class.fvalZFClass.fval2026-09-25
Class.fval_exZFClass.fval_ex2026-09-25
Class.instCoeZFSetinferInstance2026-09-25
Class.instMembershipinferInstance2026-09-25
Class.instTopinferInstance2026-09-25
Class.instWellFoundedRelationZFClass.instWellFoundedRelation2026-09-25
Class.iotaZFClass.iota2026-09-25
Class.iota_exZFClass.iota_ex2026-09-25
Class.iota_valZFClass.iota_val2026-09-25
Class.mem_asymmZFClass.cmem_asymm2026-09-25
Class.mem_defZFClass.CMem2026-09-25
Class.mem_irreflZFClass.cmem_irrefl2026-09-25
Class.mem_of_mem_sInterZFClass.cmem_of_cmem_sInter2026-09-25
Class.mem_sInterZFClass.cmem_sInter2026-09-25
Class.mem_sUnionZFClass.cmem_sUnion2026-09-25
Class.mem_univZFClass.cmem_univ2026-09-25
Class.mem_univ_homSet.mem_univ2026-09-25
Class.mem_wfinferInstance2026-09-25
Class.notMem_emptyZFClass.notCMem_empty2026-09-25
Class.not_empty_homSet.notMem_empty2026-09-25
Class.powersetZFClass.powerset2026-09-25
Class.powerset_applyZFClass.mem_powerset2026-09-25
Class.sInterZFClass.sInter2026-09-25
Class.sInter_applyZFClass.mem_sInter2026-09-25
Class.sInter_emptyZFClass.sInter_empty2026-09-25
Class.sUnionZFClass.sUnion2026-09-25
Class.sUnion_applyZFClass.mem_sUnion2026-09-25
Class.sUnion_emptyZFClass.sUnion_empty2026-09-25
Class.sepSep.sep2026-09-25
Class.toSet_of_ZFSetZFClass.coe_cmem2026-09-25
Class.univSet.univ2026-09-25
Class.univ_notMem_univZFClass.univ_notCMem_univ2026-09-25
ZFClass.coe_emptyZFSet.coe_empty2026-11-16
ZFClass.coe_insertZFSet.coe_insert2026-11-16
ZFClass.coe_interZFSet.coe_inter2026-11-16
ZFClass.coe_sdiffZFSet.coe_sdiff2026-11-16
ZFClass.coe_sepZFSet.coe_sep2026-11-16
ZFClass.coe_subsetZFSet.coe_subset_coe2026-11-16
ZFClass.coe_unionZFSet.coe_union2026-11-16
instCoeFunClassForallZFSetProp2026-09-25
instInsertZFSetClassSet.insert2026-09-25