Documentation

Mathlib.SetTheory.ZFC.Class

ZFC classes #

Classes in set theory are usually defined as collections of elements satisfying some property. Here, however, we define Class as Set ZFSet to derive many instances automatically, most of them being the lifting of set operations to classes. The usual definition is then definitionally equal to ours.

Main definitions #

def Class :
Type (u_1 + 1)

The collection of all classes. We define Class as Set ZFSet, as this allows us to get many instances automatically. However, in practice, we treat it as (the definitionally equal) ZFSet → Prop. This means, the preferred way to state that x : ZFSet belongs to A : Class is to write A x.

Equations

{x ∈ A | p x} is the class of elements in A satisfying p

Equations
theorem Class.ext {x y : Class.{u}} :
(∀ (z : ZFSet.{u}), x z y z)x = y
theorem Class.ext_iff {x y : Class.{u}} :
x = y ∀ (z : ZFSet.{u}), x z y z

Coerce a ZFC set into a class

Equations

The universal class

Equations

Assert that A is a ZFC set satisfying B

Equations
def Class.Mem (B A : Class.{u}) :

A ∈ B if A is a ZFC set which satisfies B

Equations
theorem Class.mem_def (A B : Class.{u}) :
A B ∃ (x : ZFSet.{u}), x = A B x
@[simp]
theorem Class.notMem_empty (x : Class.{u}) :
x
@[deprecated Class.notMem_empty (since := "2025-05-23")]
theorem Class.not_mem_empty (x : Class.{u}) :
x

Alias of Class.notMem_empty.

@[simp]
@[simp]
theorem Class.mem_univ {A : Class.{u}} :
A univ ∃ (x : ZFSet.{u}), x = A
@[simp]
theorem Class.eq_univ_of_forall {A : Class.{u}} :
(∀ (x : ZFSet.{u}), A x)A = univ
theorem Class.mem_wf :
WellFounded fun (x1 x2 : Class.{u}) => x1 x2
theorem Class.mem_asymm {x y : Class.{u_1}} :
x yyx
theorem Class.mem_irrefl (x : Class.{u_1}) :
xx

There is no universal set. This is stated as univuniv, meaning that univ (the class of all sets) is proper (does not belong to the class of all sets).

@[deprecated Class.univ_notMem_univ (since := "2025-05-23")]

Alias of Class.univ_notMem_univ.


There is no universal set. This is stated as univuniv, meaning that univ (the class of all sets) is proper (does not belong to the class of all sets).

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

Equations

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

Equations

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

Equations

The union of a class is the class of all members of ZFC sets in the class

Equations

The union of a class is the class of all members of ZFC sets in the class

Equations

The intersection of a class is the class of all members of ZFC sets in the class

Equations

The intersection of a class is the class of all members of ZFC sets in the class

Equations
theorem Class.ofSet.inj {x y : ZFSet.{u}} (h : x = y) :
x = y
@[simp]
theorem Class.toSet_of_ZFSet (A : Class.{u}) (x : ZFSet.{u}) :
A.ToSet x A x
@[simp]
theorem Class.coe_mem {x : ZFSet.{u}} {A : Class.{u}} :
x A A x
@[simp]
theorem Class.coe_apply {x y : ZFSet.{u}} :
y x x y
@[simp]
theorem Class.coe_subset (x y : ZFSet.{u}) :
x y x y
@[simp]
theorem Class.coe_sep (p : Class.{u}) (x : ZFSet.{u}) :
(ZFSet.sep p x) = {y : ZFSet.{u} | y x p y}
@[simp]
theorem Class.coe_empty :
=
@[simp]
theorem Class.coe_insert (x y : ZFSet.{u}) :
(insert x y) = insert x y
@[simp]
theorem Class.coe_union (x y : ZFSet.{u}) :
↑(x y) = x y
@[simp]
theorem Class.coe_inter (x y : ZFSet.{u}) :
↑(x y) = x y
@[simp]
theorem Class.coe_diff (x y : ZFSet.{u}) :
↑(x \ y) = x \ y
@[simp]
theorem Class.coe_powerset (x : ZFSet.{u}) :
x.powerset = (↑x).powerset
@[simp]
theorem Class.powerset_apply {A : Class.{u}} {x : ZFSet.{u}} :
A.powerset x x A
@[simp]
theorem Class.sUnion_apply {x : Class.{u_1}} {y : ZFSet.{u_1}} :
(⋃₀ x) y ∃ (z : ZFSet.{u_1}), x z y z
@[simp]
theorem Class.coe_sUnion (x : ZFSet.{u}) :
↑(⋃₀ x) = ⋃₀ x
@[simp]
theorem Class.mem_sUnion {x y : Class.{u}} :
y ⋃₀ x zx, y z
theorem Class.sInter_apply {x : Class.{u}} {y : ZFSet.{u}} :
(⋂₀ x) y ∀ (z : ZFSet.{u}), x zy z
@[simp]
theorem Class.coe_sInter {x : ZFSet.{u}} (h : x.Nonempty) :
↑(⋂₀ x) = ⋂₀ x
theorem Class.mem_of_mem_sInter {x y z : Class.{u_1}} (hy : y ⋂₀ x) (hz : z x) :
y z
theorem Class.mem_sInter {x y : Class.{u}} (h : Set.Nonempty x) :
y ⋂₀ x zx, y z

An induction principle for sets. If every subset of a class is a member, then the class is universal.

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

Equations
theorem Class.iota_val (A : Class.{u_1}) (x : ZFSet.{u_1}) (H : ∀ (y : ZFSet.{u_1}), A y y = x) :
A.iota = x

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 ClassSet function.

Function value

Equations
@[simp]
theorem ZFSet.map_fval {f : ZFSet.{u}ZFSet.{u}} [Definable₁ f] {x y : ZFSet.{u}} (h : y x) :
(map f x) y = (f y)
noncomputable def ZFSet.choice (x : ZFSet.{u}) :

A choice function on the class of nonempty ZFC sets.

Equations
theorem ZFSet.choice_mem_aux (x : ZFSet.{u}) (h : x) (y : ZFSet.{u}) (yx : y x) :
(Classical.epsilon fun (z : ZFSet.{u}) => z y) y
theorem ZFSet.choice_isFunc (x : ZFSet.{u}) (h : x) :
theorem ZFSet.choice_mem (x : ZFSet.{u}) (h : x) (y : ZFSet.{u}) (yx : y x) :
x.choice y y

ZFSet.toSet as an equivalence.

Equations
  • One or more equations did not get rendered due to their size.

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

@[deprecated ZFSet.isOrdinal_notMem_univ (since := "2025-05-23")]

Alias of ZFSet.isOrdinal_notMem_univ.


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