Documentation

Mathlib.SetTheory.ZFC.Basic

A model of ZFC #

In this file, we model Zermelo-Fraenkel set theory (+ Choice) using Lean's underlying type theory. We do this in four main steps:

The model #

Other definitions #

Notes #

To avoid confusion between the Lean set and the ZFC Set, docstrings in this file refer to them respectively as "set" and "ZFC set".

TODO #

Prove Set.map_definable_aux computably.

def Arity (α : Type u) :
Type u

The type of n-ary functions α → α → ... → α.

Equations
Instances For
    @[simp]
    theorem arity_zero (α : Type u) :
    Arity α 0 = α
    @[simp]
    theorem arity_succ (α : Type u) (n : ) :
    Arity α (Nat.succ n) = (αArity α n)
    def Arity.const {α : Type u} (a : α) (n : ) :
    Arity α n

    Constant n-ary function with value a.

    Equations
    Instances For
      @[simp]
      theorem Arity.const_zero {α : Type u} (a : α) :
      @[simp]
      theorem Arity.const_succ {α : Type u} (a : α) (n : ) :
      Arity.const a (Nat.succ n) = fun x => Arity.const a n
      theorem Arity.const_succ_apply {α : Type u} (a : α) (n : ) (x : α) :
      instance Arity.Arity.inhabited {α : Type u_1} {n : } [Inhabited α] :
      inductive PSet :
      Type (u + 1)

      The type of pre-sets in universe u. A pre-set is a family of pre-sets indexed by a type in Type u. The ZFC universe is defined as a quotient of this to ensure extensionality.

      Instances For
        def PSet.Type :
        PSetType u

        The underlying type of a pre-set

        Instances For
          def PSet.Func (x : PSet) :

          The underlying pre-set family of a pre-set

          Instances For
            @[simp]
            theorem PSet.mk_type (α : Type u_1) (A : αPSet) :
            PSet.Type (PSet.mk α A) = α
            @[simp]
            theorem PSet.mk_func (α : Type u_1) (A : αPSet) :
            @[simp]
            theorem PSet.eta (x : PSet) :
            def PSet.Equiv :
            PSetPSetProp

            Two pre-sets are extensionally equivalent if every element of the first family is extensionally equivalent to some element of the second family and vice-versa.

            Equations
            Instances For
              theorem PSet.equiv_iff {x : PSet} {y : PSet} :
              PSet.Equiv x y (∀ (i : PSet.Type x), j, PSet.Equiv (PSet.Func x i) (PSet.Func y j)) ∀ (j : PSet.Type y), i, PSet.Equiv (PSet.Func x i) (PSet.Func y j)
              theorem PSet.Equiv.exists_left {x : PSet} {y : PSet} (h : PSet.Equiv x y) (i : PSet.Type x) :
              j, PSet.Equiv (PSet.Func x i) (PSet.Func y j)
              theorem PSet.Equiv.exists_right {x : PSet} {y : PSet} (h : PSet.Equiv x y) (j : PSet.Type y) :
              i, PSet.Equiv (PSet.Func x i) (PSet.Func y j)
              theorem PSet.Equiv.euc {x : PSet} {y : PSet} {z : PSet} :
              PSet.Equiv x yPSet.Equiv z yPSet.Equiv x z
              theorem PSet.Equiv.symm {x : PSet} {y : PSet} :
              theorem PSet.Equiv.trans {x : PSet} {y : PSet} {z : PSet} (h1 : PSet.Equiv x y) (h2 : PSet.Equiv y z) :
              def PSet.Subset (x : PSet) (y : PSet) :

              A pre-set is a subset of another pre-set if every element of the first family is extensionally equivalent to some element of the second family.

              Instances For
                theorem PSet.Equiv.ext (x : PSet) (y : PSet) :
                PSet.Equiv x y x y y x
                theorem PSet.Subset.congr_left {x : PSet} {y : PSet} {z : PSet} :
                PSet.Equiv x y → (x z y z)
                theorem PSet.Subset.congr_right {x : PSet} {y : PSet} {z : PSet} :
                PSet.Equiv x y → (z x z y)
                def PSet.Mem (x : PSet) (y : PSet) :

                x ∈ y as pre-sets if x is extensionally equivalent to a member of the family y.

                Instances For
                  theorem PSet.Mem.mk {α : Type u} (A : αPSet) (a : α) :
                  A a PSet.mk α A
                  theorem PSet.func_mem (x : PSet) (i : PSet.Type x) :
                  theorem PSet.Mem.ext {x : PSet} {y : PSet} :
                  (∀ (w : PSet), w x w y) → PSet.Equiv x y
                  theorem PSet.Mem.congr_right {x : PSet} {y : PSet} :
                  PSet.Equiv x y∀ {w : PSet}, w x w y
                  theorem PSet.equiv_iff_mem {x : PSet} {y : PSet} :
                  PSet.Equiv x y ∀ {w : PSet}, w x w y
                  theorem PSet.Mem.congr_left {x : PSet} {y : PSet} :
                  PSet.Equiv x y∀ {w : PSet}, x w y w
                  theorem PSet.mem_wf :
                  WellFounded fun x x_1 => x x_1
                  theorem PSet.mem_asymm {x : PSet} {y : PSet} :
                  x y¬y x
                  theorem PSet.mem_irrefl (x : PSet) :
                  ¬x x
                  def PSet.toSet (u : PSet) :

                  Convert a pre-set to a set of pre-sets.

                  Instances For
                    @[simp]
                    theorem PSet.mem_toSet (a : PSet) (u : PSet) :

                    A nonempty set is one that contains some element.

                    Instances For
                      theorem PSet.nonempty_def (u : PSet) :
                      PSet.Nonempty u x, x u
                      theorem PSet.nonempty_of_mem {x : PSet} {u : PSet} (h : x u) :

                      Two pre-sets are equivalent iff they have the same members.

                      The empty pre-set

                      Instances For
                        @[simp]
                        theorem PSet.not_mem_empty (x : PSet) :
                        @[simp]
                        theorem PSet.empty_subset (x : PSet) :
                        def PSet.insert (x : PSet) (y : PSet) :

                        Insert an element into a pre-set

                        Instances For

                          The n-th von Neumann ordinal

                          Equations
                          Instances For

                            The von Neumann ordinal ω

                            Instances For
                              def PSet.sep (p : PSetProp) (x : PSet) :

                              The pre-set separation operation {x ∈ a | p x}

                              Instances For

                                The pre-set powerset operator

                                Instances For
                                  @[simp]
                                  theorem PSet.mem_powerset {x : PSet} {y : PSet} :
                                  def PSet.sUnion (a : PSet) :

                                  The pre-set union operator

                                  Instances For

                                    The pre-set union operator

                                    Instances For
                                      @[simp]
                                      theorem PSet.mem_sUnion {x : PSet} {y : PSet} :
                                      y ⋃₀ x z, z x y z
                                      def PSet.image (f : PSetPSet) (x : PSet) :

                                      The image of a function from pre-sets to pre-sets.

                                      Instances For
                                        theorem PSet.mem_image {f : PSetPSet} (H : ∀ (x y : PSet), PSet.Equiv x yPSet.Equiv (f x) (f y)) {x : PSet} {y : PSet} :
                                        y PSet.image f x z, z x PSet.Equiv y (f z)

                                        Universe lift operation

                                        Equations
                                        Instances For

                                          Embedding of one universe in another

                                          Instances For
                                            def PSet.Arity.Equiv {n : } :
                                            Arity PSet nArity PSet nProp

                                            Function equivalence is defined so that f ~ g iff ∀ x y, x ~ y → f x ~ g y. This extends to equivalence of n-ary functions.

                                            Equations
                                            Instances For
                                              def PSet.Resp (n : ) :
                                              Type (u + 1)

                                              resp n is the collection of n-ary functions on PSet that respect equivalence, i.e. when the inputs are equivalent the output is as well.

                                              Instances For
                                                def PSet.Resp.f {n : } (f : PSet.Resp (n + 1)) (x : PSet) :

                                                The n-ary image of a (n + 1)-ary function respecting equivalence as a function respecting equivalence.

                                                Instances For
                                                  def PSet.Resp.Equiv {n : } (a : PSet.Resp n) (b : PSet.Resp n) :

                                                  Function equivalence for functions respecting equivalence. See PSet.Arity.Equiv.

                                                  Instances For
                                                    theorem PSet.Resp.Equiv.trans {n : } {x : PSet.Resp n} {y : PSet.Resp n} {z : PSet.Resp n} (h1 : PSet.Resp.Equiv x y) (h2 : PSet.Resp.Equiv y z) :
                                                    def ZFSet :
                                                    Type (u + 1)

                                                    The ZFC universe of sets consists of the type of pre-sets, quotiented by extensional equivalence.

                                                    Instances For
                                                      def PSet.Resp.evalAux {n : } :
                                                      { f // ∀ (a b : PSet.Resp n), PSet.Resp.Equiv a bf a = f b }

                                                      Helper function for PSet.eval.

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

                                                        An equivalence-respecting function yields an n-ary ZFC set function.

                                                        Instances For
                                                          class inductive PSet.Definable (n : ) :
                                                          Arity ZFSet nType (u + 1)

                                                          A set function is "definable" if it is the image of some n-ary pre-set function. This isn't exactly definability, but is useful as a sufficient condition for functions that have a computable image.

                                                          Instances
                                                            def PSet.Definable.EqMk {n : } (f : PSet.Resp n) {s : Arity ZFSet n} :

                                                            The evaluation of a function respecting equivalence is definable, by that same function.

                                                            Instances For

                                                              Turns a definable function into a function that respects equivalence.

                                                              Instances For
                                                                noncomputable def Classical.allDefinable {n : } (F : Arity ZFSet n) :

                                                                All functions are classically definable.

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

                                                                  Turns a pre-set into a ZFC set.

                                                                  Instances For
                                                                    @[simp]
                                                                    theorem ZFSet.eq {x : PSet} {y : PSet} :
                                                                    theorem ZFSet.sound {x : PSet} {y : PSet} (h : PSet.Equiv x y) :
                                                                    theorem ZFSet.exact {x : PSet} {y : PSet} :
                                                                    @[simp]
                                                                    theorem ZFSet.eval_mk {n : } {f : PSet.Resp (n + 1)} {x : PSet} :
                                                                    def ZFSet.Mem :
                                                                    ZFSetZFSetProp

                                                                    The membership relation for ZFC sets is inherited from the membership relation for pre-sets.

                                                                    Instances For
                                                                      @[simp]
                                                                      theorem ZFSet.mk_mem_iff {x : PSet} {y : PSet} :

                                                                      Convert a ZFC set into a set of ZFC sets

                                                                      Instances For
                                                                        @[simp]
                                                                        theorem ZFSet.mem_toSet (a : ZFSet) (u : ZFSet) :

                                                                        A nonempty set is one that contains some element.

                                                                        Instances For
                                                                          theorem ZFSet.nonempty_of_mem {x : ZFSet} {u : ZFSet} (h : x u) :
                                                                          def ZFSet.Subset (x : ZFSet) (y : ZFSet) :

                                                                          x ⊆ y as ZFC sets means that all members of x are members of y.

                                                                          Instances For
                                                                            theorem ZFSet.subset_def {x : ZFSet} {y : ZFSet} :
                                                                            x y ∀ ⦃z : ZFSet⦄, z xz y
                                                                            @[simp]
                                                                            theorem ZFSet.subset_iff {x : PSet} {y : PSet} :
                                                                            theorem ZFSet.ext {x : ZFSet} {y : ZFSet} :
                                                                            (∀ (z : ZFSet), z x z y) → x = y
                                                                            theorem ZFSet.ext_iff {x : ZFSet} {y : ZFSet} :
                                                                            x = y ∀ (z : ZFSet), z x z y
                                                                            @[simp]
                                                                            theorem ZFSet.toSet_inj {x : ZFSet} {y : ZFSet} :

                                                                            The empty ZFC set

                                                                            Instances For
                                                                              @[simp]
                                                                              @[simp]
                                                                              theorem ZFSet.empty_subset (x : ZFSet) :
                                                                              theorem ZFSet.eq_empty (x : ZFSet) :
                                                                              x = ∀ (y : ZFSet), ¬y x

                                                                              Insert x y is the set {x} ∪ y

                                                                              Instances For
                                                                                @[simp]
                                                                                theorem ZFSet.mem_insert_iff {x : ZFSet} {y : ZFSet} {z : ZFSet} :
                                                                                x insert y z x = y x z
                                                                                theorem ZFSet.mem_insert (x : ZFSet) (y : ZFSet) :
                                                                                x insert x y
                                                                                theorem ZFSet.mem_insert_of_mem {y : ZFSet} {z : ZFSet} (x : ZFSet) (h : z y) :
                                                                                z insert x y
                                                                                @[simp]
                                                                                @[simp]
                                                                                theorem ZFSet.mem_singleton {x : ZFSet} {y : ZFSet} :
                                                                                x {y} x = y
                                                                                @[simp]
                                                                                theorem ZFSet.toSet_singleton (x : ZFSet) :
                                                                                ZFSet.toSet {x} = {x}
                                                                                theorem ZFSet.mem_pair {x : ZFSet} {y : ZFSet} {z : ZFSet} :
                                                                                x {y, z} x = y x = z

                                                                                omega is the first infinite von Neumann ordinal

                                                                                Instances For
                                                                                  def ZFSet.sep (p : ZFSetProp) :

                                                                                  {x ∈ a | p x} is the set of elements in a satisfying p

                                                                                  Instances For
                                                                                    @[simp]
                                                                                    theorem ZFSet.mem_sep {p : ZFSetProp} {x : ZFSet} {y : ZFSet} :
                                                                                    y ZFSet.sep p x y x p y
                                                                                    @[simp]
                                                                                    theorem ZFSet.toSet_sep (a : ZFSet) (p : ZFSetProp) :

                                                                                    The powerset operation, the collection of subsets of a ZFC set

                                                                                    Instances For
                                                                                      @[simp]
                                                                                      theorem ZFSet.mem_powerset {x : ZFSet} {y : ZFSet} :
                                                                                      theorem ZFSet.sUnion_lem {α : Type u} {β : Type u} (A : αPSet) (B : βPSet) (αβ : ∀ (a : α), b, PSet.Equiv (A a) (B b)) (a : PSet.Type (⋃₀ PSet.mk α A)) :

                                                                                      The union operator, the collection of elements of elements of a ZFC set

                                                                                      Instances For

                                                                                        The union operator, the collection of elements of elements of a ZFC set

                                                                                        Instances For
                                                                                          noncomputable def ZFSet.sInter (x : ZFSet) :

                                                                                          The intersection operator, the collection of elements in all of the elements of a ZFC set. We special-case ⋂₀ ∅ = ∅.

                                                                                          Instances For

                                                                                            The intersection operator, the collection of elements in all of the elements of a ZFC set. We special-case ⋂₀ ∅ = ∅.

                                                                                            Instances For
                                                                                              @[simp]
                                                                                              theorem ZFSet.mem_sUnion {x : ZFSet} {y : ZFSet} :
                                                                                              y ⋃₀ x z, z x y z
                                                                                              theorem ZFSet.mem_sInter {x : ZFSet} {y : ZFSet} (h : ZFSet.Nonempty x) :
                                                                                              y ⋂₀ x ∀ (z : ZFSet), z xy z
                                                                                              theorem ZFSet.mem_of_mem_sInter {x : ZFSet} {y : ZFSet} {z : ZFSet} (hy : y ⋂₀ x) (hz : z x) :
                                                                                              y z
                                                                                              theorem ZFSet.mem_sUnion_of_mem {x : ZFSet} {y : ZFSet} {z : ZFSet} (hy : y z) (hz : z x) :
                                                                                              theorem ZFSet.not_mem_sInter_of_not_mem {x : ZFSet} {y : ZFSet} {z : ZFSet} (hy : ¬y z) (hz : z x) :
                                                                                              @[simp]
                                                                                              theorem ZFSet.sUnion_singleton {x : ZFSet} :
                                                                                              ⋃₀ {x} = x
                                                                                              @[simp]
                                                                                              theorem ZFSet.sInter_singleton {x : ZFSet} :
                                                                                              ⋂₀ {x} = x
                                                                                              @[simp]
                                                                                              theorem ZFSet.singleton_inj {x : ZFSet} {y : ZFSet} :
                                                                                              {x} = {y} x = y
                                                                                              def ZFSet.union (x : ZFSet) (y : ZFSet) :

                                                                                              The binary union operation

                                                                                              Instances For
                                                                                                def ZFSet.inter (x : ZFSet) (y : ZFSet) :

                                                                                                The binary intersection operation

                                                                                                Instances For
                                                                                                  def ZFSet.diff (x : ZFSet) (y : ZFSet) :

                                                                                                  The set difference operation

                                                                                                  Instances For
                                                                                                    @[simp]
                                                                                                    @[simp]
                                                                                                    theorem ZFSet.mem_union {x : ZFSet} {y : ZFSet} {z : ZFSet} :
                                                                                                    z x y z x z y
                                                                                                    @[simp]
                                                                                                    theorem ZFSet.mem_inter {x : ZFSet} {y : ZFSet} {z : ZFSet} :
                                                                                                    z x y z x z y
                                                                                                    @[simp]
                                                                                                    theorem ZFSet.mem_diff {x : ZFSet} {y : ZFSet} {z : ZFSet} :
                                                                                                    z x \ y z x ¬z y
                                                                                                    @[simp]
                                                                                                    theorem ZFSet.sUnion_pair {x : ZFSet} {y : ZFSet} :
                                                                                                    ⋃₀ {x, y} = x y
                                                                                                    theorem ZFSet.mem_wf :
                                                                                                    WellFounded fun x x_1 => x x_1
                                                                                                    theorem ZFSet.inductionOn {p : ZFSetProp} (x : ZFSet) (h : (x : ZFSet) → ((y : ZFSet) → y xp y) → p x) :
                                                                                                    p x

                                                                                                    Induction on the relation.

                                                                                                    theorem ZFSet.mem_asymm {x : ZFSet} {y : ZFSet} :
                                                                                                    x y¬y x
                                                                                                    theorem ZFSet.regularity (x : ZFSet) (h : x ) :
                                                                                                    y, y x x y =
                                                                                                    def ZFSet.image (f : ZFSetZFSet) [PSet.Definable 1 f] :

                                                                                                    The image of a (definable) ZFC set function

                                                                                                    Instances For
                                                                                                      theorem ZFSet.image.mk (f : ZFSetZFSet) [H : PSet.Definable 1 f] (x : ZFSet) {y : ZFSet} :
                                                                                                      y xf y ZFSet.image f x
                                                                                                      @[simp]
                                                                                                      theorem ZFSet.mem_image {f : ZFSetZFSet} [H : PSet.Definable 1 f] {x : ZFSet} {y : ZFSet} :
                                                                                                      y ZFSet.image f x z, z x f z = y
                                                                                                      @[simp]
                                                                                                      noncomputable def ZFSet.range {α : Type u} (f : αZFSet) :

                                                                                                      The range of an indexed family of sets. The universes allow for a more general index type without manual use of ULift.

                                                                                                      Instances For
                                                                                                        @[simp]
                                                                                                        theorem ZFSet.mem_range {α : Type u} {f : αZFSet} {x : ZFSet} :
                                                                                                        @[simp]
                                                                                                        theorem ZFSet.toSet_range {α : Type u} (f : αZFSet) :
                                                                                                        def ZFSet.pair (x : ZFSet) (y : ZFSet) :

                                                                                                        Kuratowski ordered pair

                                                                                                        Instances For
                                                                                                          @[simp]
                                                                                                          theorem ZFSet.toSet_pair (x : ZFSet) (y : ZFSet) :
                                                                                                          ZFSet.toSet (ZFSet.pair x y) = {{x}, {x, y}}
                                                                                                          def ZFSet.pairSep (p : ZFSetZFSetProp) (x : ZFSet) (y : ZFSet) :

                                                                                                          A subset of pairs {(a, b) ∈ x × y | p a b}

                                                                                                          Instances For
                                                                                                            @[simp]
                                                                                                            theorem ZFSet.mem_pairSep {p : ZFSetZFSetProp} {x : ZFSet} {y : ZFSet} {z : ZFSet} :
                                                                                                            z ZFSet.pairSep p x y a, a x b, b y z = ZFSet.pair a b p a b
                                                                                                            @[simp]
                                                                                                            theorem ZFSet.pair_inj {x : ZFSet} {y : ZFSet} {x' : ZFSet} {y' : ZFSet} :
                                                                                                            ZFSet.pair x y = ZFSet.pair x' y' x = x' y = y'

                                                                                                            The cartesian product, {(a, b) | a ∈ x, b ∈ y}

                                                                                                            Instances For
                                                                                                              @[simp]
                                                                                                              theorem ZFSet.mem_prod {x : ZFSet} {y : ZFSet} {z : ZFSet} :
                                                                                                              z ZFSet.prod x y a, a x b, b y z = ZFSet.pair a b
                                                                                                              theorem ZFSet.pair_mem_prod {x : ZFSet} {y : ZFSet} {a : ZFSet} {b : ZFSet} :
                                                                                                              def ZFSet.IsFunc (x : ZFSet) (y : ZFSet) (f : ZFSet) :

                                                                                                              isFunc x y f is the assertion that f is a subset of x × y which relates to each element of x a unique element of y, so that we can consider f as a ZFC function x → y.

                                                                                                              Instances For
                                                                                                                def ZFSet.funs (x : ZFSet) (y : ZFSet) :

                                                                                                                funs x y is y ^ x, the set of all set functions x → y

                                                                                                                Instances For
                                                                                                                  @[simp]
                                                                                                                  theorem ZFSet.mem_funs {x : ZFSet} {y : ZFSet} {f : ZFSet} :
                                                                                                                  noncomputable instance ZFSet.mapDefinableAux (f : ZFSetZFSet) [PSet.Definable 1 f] :
                                                                                                                  PSet.Definable 1 fun y => ZFSet.pair y (f y)
                                                                                                                  noncomputable def ZFSet.map (f : ZFSetZFSet) [PSet.Definable 1 f] :

                                                                                                                  Graph of a function: map f x is the ZFC function which maps a ∈ x to f a

                                                                                                                  Instances For
                                                                                                                    @[simp]
                                                                                                                    theorem ZFSet.mem_map {f : ZFSetZFSet} [PSet.Definable 1 f] {x : ZFSet} {y : ZFSet} :
                                                                                                                    y ZFSet.map f x z, z x ZFSet.pair z (f z) = y
                                                                                                                    theorem ZFSet.map_unique {f : ZFSetZFSet} [H : PSet.Definable 1 f] {x : ZFSet} {z : ZFSet} (zx : z x) :
                                                                                                                    ∃! w, ZFSet.pair z w ZFSet.map f x
                                                                                                                    @[simp]
                                                                                                                    theorem ZFSet.map_isFunc {f : ZFSetZFSet} [PSet.Definable 1 f] {x : ZFSet} {y : ZFSet} :
                                                                                                                    ZFSet.IsFunc x y (ZFSet.map f x) ∀ (z : ZFSet), z xf z y
                                                                                                                    def ZFSet.Hereditarily (p : ZFSetProp) (x : ZFSet) :

                                                                                                                    Given a predicate p on ZFC sets. Hereditarily p x means that x has property p and the members of x are all Hereditarily p.

                                                                                                                    Equations
                                                                                                                    Instances For
                                                                                                                      theorem ZFSet.hereditarily_iff {p : ZFSetProp} {x : ZFSet} :
                                                                                                                      ZFSet.Hereditarily p x p x ∀ (y : ZFSet), y xZFSet.Hereditarily p y
                                                                                                                      theorem ZFSet.Hereditarily.def {p : ZFSetProp} {x : ZFSet} :
                                                                                                                      ZFSet.Hereditarily p xp x ∀ (y : ZFSet), y xZFSet.Hereditarily p y

                                                                                                                      Alias of the forward direction of ZFSet.hereditarily_iff.

                                                                                                                      theorem ZFSet.Hereditarily.self {p : ZFSetProp} {x : ZFSet} (h : ZFSet.Hereditarily p x) :
                                                                                                                      p x
                                                                                                                      theorem ZFSet.Hereditarily.mem {p : ZFSetProp} {x : ZFSet} {y : ZFSet} (h : ZFSet.Hereditarily p x) (hy : y x) :
                                                                                                                      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
                                                                                                                        def Class.sep (p : ZFSetProp) (A : Class) :

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

                                                                                                                        Instances For
                                                                                                                          theorem Class.ext {x : Class} {y : Class} :
                                                                                                                          (∀ (z : ZFSet), x z y z) → x = y
                                                                                                                          theorem Class.ext_iff {x : Class} {y : Class} :
                                                                                                                          x = y ∀ (z : ZFSet), x z y z

                                                                                                                          Coerce a ZFC set into a class

                                                                                                                          Instances For

                                                                                                                            The universal class

                                                                                                                            Instances For
                                                                                                                              def Class.ToSet (B : Class) (A : Class) :

                                                                                                                              Assert that A is a ZFC set satisfying B

                                                                                                                              Instances For
                                                                                                                                def Class.Mem (A : Class) (B : Class) :

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

                                                                                                                                Instances For
                                                                                                                                  theorem Class.mem_def (A : Class) (B : Class) :
                                                                                                                                  A B x, x = A B x
                                                                                                                                  @[simp]
                                                                                                                                  @[simp]
                                                                                                                                  @[simp]
                                                                                                                                  theorem Class.mem_univ {A : Class} :
                                                                                                                                  A Class.univ x, x = A
                                                                                                                                  @[simp]
                                                                                                                                  theorem Class.eq_univ_iff_forall {A : Class} :
                                                                                                                                  A = Class.univ (x : ZFSet) → A x
                                                                                                                                  theorem Class.eq_univ_of_forall {A : Class} :
                                                                                                                                  ((x : ZFSet) → A x) → A = Class.univ
                                                                                                                                  theorem Class.mem_wf :
                                                                                                                                  WellFounded fun x x_1 => x x_1
                                                                                                                                  theorem Class.mem_asymm {x : Class} {y : Class} :
                                                                                                                                  x y¬y x

                                                                                                                                  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

                                                                                                                                        Instances For

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

                                                                                                                                          Instances For

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

                                                                                                                                            Instances For

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

                                                                                                                                              Instances For
                                                                                                                                                theorem Class.ofSet.inj {x : ZFSet} {y : ZFSet} (h : x = y) :
                                                                                                                                                x = y
                                                                                                                                                @[simp]
                                                                                                                                                theorem Class.toSet_of_ZFSet (A : Class) (x : ZFSet) :
                                                                                                                                                Class.ToSet A x A x
                                                                                                                                                @[simp]
                                                                                                                                                theorem Class.coe_mem {x : ZFSet} {A : Class} :
                                                                                                                                                x A A x
                                                                                                                                                @[simp]
                                                                                                                                                theorem Class.coe_apply {x : ZFSet} {y : ZFSet} :
                                                                                                                                                y x x y
                                                                                                                                                @[simp]
                                                                                                                                                theorem Class.coe_subset (x : ZFSet) (y : ZFSet) :
                                                                                                                                                x y x y
                                                                                                                                                @[simp]
                                                                                                                                                theorem Class.coe_sep (p : Class) (x : ZFSet) :
                                                                                                                                                ↑(ZFSet.sep p x) = {y | y x p y}
                                                                                                                                                @[simp]
                                                                                                                                                theorem Class.coe_empty :
                                                                                                                                                =
                                                                                                                                                @[simp]
                                                                                                                                                theorem Class.coe_insert (x : ZFSet) (y : ZFSet) :
                                                                                                                                                ↑(insert x y) = insert x y
                                                                                                                                                @[simp]
                                                                                                                                                theorem Class.coe_union (x : ZFSet) (y : ZFSet) :
                                                                                                                                                ↑(x y) = x y
                                                                                                                                                @[simp]
                                                                                                                                                theorem Class.coe_inter (x : ZFSet) (y : ZFSet) :
                                                                                                                                                ↑(x y) = x y
                                                                                                                                                @[simp]
                                                                                                                                                theorem Class.coe_diff (x : ZFSet) (y : ZFSet) :
                                                                                                                                                ↑(x \ y) = x \ y
                                                                                                                                                @[simp]
                                                                                                                                                @[simp]
                                                                                                                                                theorem Class.powerset_apply {A : Class} {x : ZFSet} :
                                                                                                                                                @[simp]
                                                                                                                                                theorem Class.sUnion_apply {x : Class} {y : ZFSet} :
                                                                                                                                                (⋃₀ x) y z, x z y z
                                                                                                                                                @[simp]
                                                                                                                                                theorem Class.coe_sUnion (x : ZFSet) :
                                                                                                                                                ↑(⋃₀ x) = ⋃₀ x
                                                                                                                                                @[simp]
                                                                                                                                                theorem Class.mem_sUnion {x : Class} {y : Class} :
                                                                                                                                                y ⋃₀ x z, z x y z
                                                                                                                                                theorem Class.sInter_apply {x : Class} {y : ZFSet} :
                                                                                                                                                (⋂₀ x) y ∀ (z : ZFSet), x zy z
                                                                                                                                                @[simp]
                                                                                                                                                theorem Class.coe_sInter {x : ZFSet} (h : ZFSet.Nonempty x) :
                                                                                                                                                ↑(⋂₀ x) = ⋂₀ x
                                                                                                                                                theorem Class.mem_of_mem_sInter {x : Class} {y : Class} {z : Class} (hy : y ⋂₀ x) (hz : z x) :
                                                                                                                                                y z
                                                                                                                                                theorem Class.mem_sInter {x : Class} {y : Class} (h : Set.Nonempty x) :
                                                                                                                                                y ⋂₀ x ∀ (z : Class), z xy 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.

                                                                                                                                                Instances For
                                                                                                                                                  theorem Class.iota_val (A : Class) (x : ZFSet) (H : ∀ (y : ZFSet), A y y = x) :
                                                                                                                                                  Class.iota A = 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.

                                                                                                                                                  def Class.fval (F : Class) (A : Class) :

                                                                                                                                                  Function value

                                                                                                                                                  Instances For

                                                                                                                                                    Function value

                                                                                                                                                    Instances For
                                                                                                                                                      theorem Class.fval_ex (F : Class) (A : Class) :
                                                                                                                                                      @[simp]
                                                                                                                                                      theorem ZFSet.map_fval {f : ZFSetZFSet} [H : PSet.Definable 1 f] {x : ZFSet} {y : ZFSet} (h : y x) :
                                                                                                                                                      ↑(ZFSet.map f x) y = ↑(f y)
                                                                                                                                                      noncomputable def ZFSet.choice (x : ZFSet) :

                                                                                                                                                      A choice function on the class of nonempty ZFC sets.

                                                                                                                                                      Instances For
                                                                                                                                                        theorem ZFSet.choice_mem_aux (x : ZFSet) (h : ¬ x) (y : ZFSet) (yx : y x) :
                                                                                                                                                        (Classical.epsilon fun z => z y) y
                                                                                                                                                        theorem ZFSet.choice_mem (x : ZFSet) (h : ¬ x) (y : ZFSet) (yx : y x) :
                                                                                                                                                        ↑(ZFSet.choice x) y y
                                                                                                                                                        noncomputable def ZFSet.toSet_equiv :
                                                                                                                                                        ZFSet { s // Small.{u, u + 1} s }

                                                                                                                                                        ZFSet.toSet as an equivalence.

                                                                                                                                                        Instances For