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.

Instances For
    @[implicit_reducible]
    instance instHasSubsetClass :
    HasSubset Class.{u_1}
    @[implicit_reducible]
    instance instEmptyCollectionClass :
    EmptyCollection Class.{u_1}
    @[implicit_reducible]
    instance instNonemptyClass :
    Nonempty Class.{u_1}
    @[implicit_reducible]
    instance instUnionClass :
    @[implicit_reducible]
    instance instInterClass :
    @[implicit_reducible]
    @[implicit_reducible]
    instance instSDiffClass :
    @[implicit_reducible]

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

    Instances For
      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

      Instances For
        @[implicit_reducible]

        The universal class

        Instances For
          @[implicit_reducible]

          Assert that A is a ZFC set satisfying B

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

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

            Instances For
              @[implicit_reducible]
              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
              @[simp]
              theorem Class.not_empty_hom (x : ZFSet.{u}) :
              ¬ x
              @[simp]
              theorem Class.mem_univ {A : Class.{u}} :
              A univ ∃ (x : ZFSet.{u}), x = A
              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
              @[implicit_reducible]
              instance Class.instWellFoundedRelation :
              WellFoundedRelation Class.{u_1}
              theorem Class.mem_asymm {x y : Class.{u_1}} :
              x yyx

              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

              Instances For

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

                Instances For

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

                  Instances For

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

                    Instances For
                      def Class.«term⋃₀_» :
                      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.

                      Instances For

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

                        Instances For
                          def Class.«term⋂₀_» :
                          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.

                          Instances For
                            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.sUnion y ∃ (z : ZFSet.{u_1}), x z y z
                            @[simp]
                            theorem Class.coe_sUnion (x : ZFSet.{u}) :
                            x.sUnion = (↑x).sUnion
                            @[simp]
                            theorem Class.mem_sUnion {x y : Class.{u}} :
                            y x.sUnion zx, y z
                            theorem Class.sInter_apply {x : Class.{u}} {y : ZFSet.{u}} :
                            x.sInter y ∀ (z : ZFSet.{u}), x zy z
                            @[simp]
                            theorem Class.coe_sInter {x : ZFSet.{u}} (h : x.Nonempty) :
                            x.sInter = (↑x).sInter
                            theorem Class.mem_of_mem_sInter {x y z : Class.{u_1}} (hy : y x.sInter) (hz : z x) :
                            y z
                            theorem Class.mem_sInter {x y : Class.{u}} (h : Set.Nonempty x) :
                            y x.sInter zx, y z
                            @[simp]
                            theorem Class.sUnion_empty :
                            .sUnion =
                            theorem Class.eq_univ_of_powerset_subset {A : Class.{u_1}} (hA : A.powerset A) :
                            A = univ

                            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.

                            Instances For
                              theorem Class.iota_val (A : Class.{u_1}) (x : ZFSet.{u_1}) (H : ∀ (y : ZFSet.{u_1}), A y y = x) :
                              A.iota = x
                              theorem Class.iota_ex (A : Class.{u}) :
                              A.iota 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 ClassSet function.

                              Function value

                              Instances For
                                def Class.«term_′_» :
                                Lean.TrailingParserDescr

                                Function value

                                Instances For
                                  @[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.

                                  Instances For
                                    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_mem (x : ZFSet.{u}) (h : x) (y : ZFSet.{u}) (yx : y x) :
                                    x.choice y y
                                    noncomputable def ZFSet.coeEquiv :

                                    SetLike.coe as an equivalence.

                                    Instances For
                                      @[simp]
                                      theorem ZFSet.coeEquiv_apply_coe (x : ZFSet.{u}) :
                                      (coeEquiv x) = x
                                      @[deprecated ZFSet.coeEquiv (since := "2025-11-05")]

                                      Alias of ZFSet.coeEquiv.


                                      SetLike.coe as an equivalence.

                                      Instances For

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