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

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

    The underlying type of a pre-set

    Equations
    Instances For
      def PSet.Func (x : PSet.{u_1}) :
      x.TypePSet.{u_1}

      The underlying pre-set family of a pre-set

      Equations
      Instances For
        @[simp]
        theorem PSet.mk_type (α : Type u_1) (A : αPSet.{u_1}) :
        (PSet.mk α A).Type = α
        @[simp]
        theorem PSet.mk_func (α : Type u_1) (A : αPSet.{u_1}) :
        (PSet.mk α A).Func = A
        @[simp]
        theorem PSet.eta (x : PSet.{u_1}) :
        PSet.mk x.Type x.Func = x

        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
        • (PSet.mk α A).Equiv (PSet.mk α_1 B) = ((∀ (a : α), ∃ (b : α_1), (A a).Equiv (B b)) ∀ (b : α_1), ∃ (a : α), (A a).Equiv (B b))
        Instances For
          theorem PSet.equiv_iff {x : PSet.{u_1}} {y : PSet.{u_2}} :
          x.Equiv y (∀ (i : x.Type), ∃ (j : y.Type), (x.Func i).Equiv (y.Func j)) ∀ (j : y.Type), ∃ (i : x.Type), (x.Func i).Equiv (y.Func j)
          theorem PSet.Equiv.exists_left {x : PSet.{u_1}} {y : PSet.{u_2}} (h : x.Equiv y) (i : x.Type) :
          ∃ (j : y.Type), (x.Func i).Equiv (y.Func j)
          theorem PSet.Equiv.exists_right {x : PSet.{u_1}} {y : PSet.{u_2}} (h : x.Equiv y) (j : y.Type) :
          ∃ (i : x.Type), (x.Func i).Equiv (y.Func j)
          theorem PSet.Equiv.refl (x : PSet.{u_1}) :
          x.Equiv x
          theorem PSet.Equiv.rfl {x : PSet.{u_1}} :
          x.Equiv x
          theorem PSet.Equiv.euc {x : PSet.{u_1}} {y : PSet.{u_2}} {z : PSet.{u_3}} :
          x.Equiv yz.Equiv yx.Equiv z
          theorem PSet.Equiv.symm {x : PSet.{u_1}} {y : PSet.{u_2}} :
          x.Equiv yy.Equiv x
          theorem PSet.Equiv.comm {x : PSet.{u_1}} {y : PSet.{u_2}} :
          x.Equiv y y.Equiv x
          theorem PSet.Equiv.trans {x : PSet.{u_1}} {y : PSet.{u_2}} {z : PSet.{u_3}} (h1 : x.Equiv y) (h2 : y.Equiv z) :
          x.Equiv z
          theorem PSet.equiv_of_isEmpty (x : PSet.{u_1}) (y : PSet.{u_2}) [IsEmpty x.Type] [IsEmpty y.Type] :
          x.Equiv y

          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.

          Equations
          • x.Subset y = ∀ (a : x.Type), ∃ (b : y.Type), (x.Func a).Equiv (y.Func b)
          Instances For
            theorem PSet.Equiv.ext (x y : PSet.{u_1}) :
            x.Equiv y x y y x
            theorem PSet.Subset.congr_left {x y z : PSet.{u_1}} :
            x.Equiv y(x z y z)
            theorem PSet.Subset.congr_right {x y z : PSet.{u_1}} :
            x.Equiv y(z x z y)
            def PSet.Mem (y x : PSet.{u}) :

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

            Equations
            • y.Mem x = ∃ (b : y.Type), x.Equiv (y.Func b)
            Instances For
              theorem PSet.Mem.mk {α : Type u} (A : αPSet.{u}) (a : α) :
              A a PSet.mk α A
              theorem PSet.func_mem (x : PSet.{u_1}) (i : x.Type) :
              x.Func i x
              theorem PSet.Mem.ext {x y : PSet.{u}} :
              (∀ (w : PSet.{u}), w x w y)x.Equiv y
              theorem PSet.Mem.congr_right {x y : PSet.{u}} :
              x.Equiv y∀ {w : PSet.{u}}, w x w y
              theorem PSet.equiv_iff_mem {x y : PSet.{u}} :
              x.Equiv y ∀ {w : PSet.{u}}, w x w y
              theorem PSet.Mem.congr_left {x y : PSet.{u}} :
              x.Equiv y∀ {w : PSet.{u}}, x w y w
              theorem PSet.mem_of_subset {x y z : PSet.{u_1}} :
              x yz xz y
              theorem PSet.subset_iff {x y : PSet.{u_1}} :
              x y ∀ ⦃z : PSet.{u_1}⦄, z xz y
              theorem PSet.mem_wf :
              WellFounded fun (x1 x2 : PSet.{u_1}) => x1 x2
              theorem PSet.mem_asymm {x y : PSet.{u_1}} :
              x yyx
              theorem PSet.mem_irrefl (x : PSet.{u_1}) :
              xx
              theorem PSet.not_subset_of_mem {x y : PSet.{u_1}} (h : x y) :
              ¬y x
              theorem PSet.not_mem_of_subset {x y : PSet.{u_1}} (h : x y) :
              yx

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

              Equations
              Instances For
                @[simp]
                theorem PSet.mem_toSet (a u : PSet.{u}) :
                a u.toSet a u

                A nonempty set is one that contains some element.

                Equations
                • u.Nonempty = u.toSet.Nonempty
                Instances For
                  theorem PSet.nonempty_def (u : PSet.{u_1}) :
                  u.Nonempty ∃ (x : PSet.{u_1}), x u
                  theorem PSet.nonempty_of_mem {x u : PSet.{u_1}} (h : x u) :
                  u.Nonempty
                  @[simp]
                  theorem PSet.nonempty_toSet_iff {u : PSet.{u_1}} :
                  u.toSet.Nonempty u.Nonempty
                  theorem PSet.nonempty_of_nonempty_type (x : PSet.{u_1}) [h : Nonempty x.Type] :
                  x.Nonempty
                  theorem PSet.Equiv.eq {x y : PSet.{u_1}} :
                  x.Equiv y x.toSet = y.toSet

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

                  The empty pre-set

                  Equations
                  Instances For
                    @[simp]
                    theorem PSet.not_mem_empty (x : PSet.{u}) :
                    x
                    @[simp]
                    theorem PSet.toSet_empty :
                    .toSet =
                    @[simp]
                    @[simp]
                    theorem PSet.not_nonempty_empty :
                    ¬.Nonempty
                    theorem PSet.equiv_empty (x : PSet.{u_1}) [IsEmpty x.Type] :
                    x.Equiv

                    Insert an element into a pre-set

                    Equations
                    Instances For
                      Equations
                      @[simp]
                      theorem PSet.mem_insert_iff {x y z : PSet.{u}} :
                      x insert y z x.Equiv y x z
                      theorem PSet.mem_insert_of_mem {y z : PSet.{u_1}} (x : PSet.{u_1}) (h : z y) :
                      z insert x y
                      @[simp]
                      theorem PSet.mem_singleton {x y : PSet.{u_1}} :
                      x {y} x.Equiv y
                      theorem PSet.mem_pair {x y z : PSet.{u_1}} :
                      x {y, z} x.Equiv y x.Equiv z

                      The n-th von Neumann ordinal

                      Equations
                      Instances For

                        The von Neumann ordinal ω

                        Equations
                        Instances For

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

                          Equations
                          • PSet.sep p x = PSet.mk { a : x.Type // p (x.Func a) } fun (y : { a : x.Type // p (x.Func a) }) => x.Func y
                          Instances For
                            theorem PSet.mem_sep {p : PSet.{u_1}Prop} (H : ∀ (x y : PSet.{u_1}), x.Equiv yp xp y) {x y : PSet.{u_1}} :
                            y PSet.sep p x y x p y

                            The pre-set powerset operator

                            Equations
                            • x.powerset = PSet.mk (Set x.Type) fun (p : Set x.Type) => PSet.mk { a : x.Type // p a } fun (y : { a : x.Type // p a }) => x.Func y
                            Instances For
                              @[simp]
                              theorem PSet.mem_powerset {x y : PSet.{u_1}} :
                              y x.powerset y x

                              The pre-set union operator

                              Equations
                              • ⋃₀ a = PSet.mk ((x : a.Type) × (a.Func x).Type) fun (x : (x : a.Type) × (a.Func x).Type) => match x with | x, y => (a.Func x).Func y
                              Instances For

                                The pre-set union operator

                                Equations
                                Instances For
                                  @[simp]
                                  theorem PSet.mem_sUnion {x y : PSet.{u}} :
                                  y ⋃₀ x zx, y z
                                  @[simp]
                                  theorem PSet.toSet_sUnion (x : PSet.{u}) :
                                  (⋃₀ x).toSet = ⋃₀ (PSet.toSet '' x.toSet)

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

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

                                    Universe lift operation

                                    Equations
                                    Instances For

                                      Embedding of one universe in another

                                      Equations
                                      Instances For
                                        @[deprecated]

                                        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
                                          @[deprecated]
                                          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.

                                          Equations
                                          Instances For
                                            @[deprecated]
                                            Equations
                                            @[deprecated]
                                            def PSet.Resp.f {n : } (f : PSet.Resp (n + 1)) (x : PSet.{u_1}) :

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

                                            Equations
                                            • f.f x = f x,
                                            Instances For
                                              @[deprecated]
                                              def PSet.Resp.Equiv {n : } (a b : PSet.Resp n) :

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

                                              Equations
                                              Instances For
                                                @[deprecated]
                                                theorem PSet.Resp.Equiv.refl {n : } (a : PSet.Resp n) :
                                                a.Equiv a
                                                @[deprecated]
                                                theorem PSet.Resp.Equiv.euc {n : } {a b c : PSet.Resp n} :
                                                a.Equiv bc.Equiv ba.Equiv c
                                                @[deprecated]
                                                theorem PSet.Resp.Equiv.symm {n : } {a b : PSet.Resp n} :
                                                a.Equiv bb.Equiv a
                                                @[deprecated]
                                                theorem PSet.Resp.Equiv.trans {n : } {x y z : PSet.Resp n} (h1 : x.Equiv y) (h2 : y.Equiv z) :
                                                x.Equiv z
                                                @[deprecated]
                                                instance PSet.Resp.setoid {n : } :
                                                Equations
                                                • PSet.Resp.setoid = { r := PSet.Resp.Equiv, iseqv := }
                                                def ZFSet :
                                                Type (u + 1)

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

                                                Equations
                                                Instances For

                                                  Turns a pre-set into a ZFC set.

                                                  Equations
                                                  Instances For
                                                    @[simp]
                                                    theorem ZFSet.mk_eq (x : PSet.{u_1}) :
                                                    x = ZFSet.mk x
                                                    class ZFSet.Definable (n : ) (f : (Fin nZFSet.{u})ZFSet.{u}) :
                                                    Type (u + 1)

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

                                                    Instances
                                                      @[reducible, inline]
                                                      abbrev ZFSet.Definable₁ (f : ZFSet.{u}ZFSet.{u}) :
                                                      Type (u + 1)

                                                      An abbrev of ZFSet.Definable for unary functions.

                                                      Equations
                                                      Instances For
                                                        @[reducible, inline]
                                                        abbrev ZFSet.Definable₁.mk {f : ZFSet.{u}ZFSet.{u}} (out : PSet.{u}PSet.{u}) (mk_out : ∀ (x : PSet.{u}), out x = f x) :

                                                        A simpler constructor for ZFSet.Definable₁.

                                                        Equations
                                                        Instances For
                                                          @[reducible, inline]

                                                          Turns a unary definable function into a unary PSet function.

                                                          Equations
                                                          Instances For
                                                            @[reducible, inline]
                                                            abbrev ZFSet.Definable₂ (f : ZFSet.{u}ZFSet.{u}ZFSet.{u}) :
                                                            Type (u + 1)

                                                            An abbrev of ZFSet.Definable for binary functions.

                                                            Equations
                                                            Instances For
                                                              @[reducible, inline]
                                                              abbrev ZFSet.Definable₂.mk {f : ZFSet.{u}ZFSet.{u}ZFSet.{u}} (out : PSet.{u}PSet.{u}PSet.{u}) (mk_out : ∀ (x y : PSet.{u}), out x y = f x y) :

                                                              A simpler constructor for ZFSet.Definable₂.

                                                              Equations
                                                              Instances For
                                                                @[reducible, inline]

                                                                Turns a binary definable function into a binary PSet function.

                                                                Equations
                                                                Instances For
                                                                  Equations
                                                                  instance ZFSet.instDefinableOfDefinable₂ (f : ZFSet.{u_1}ZFSet.{u_1}ZFSet.{u_1}) [ZFSet.Definable₂ f] (n : ) (g₁ g₂ : (Fin nZFSet.{u_1})ZFSet.{u_1}) [ZFSet.Definable n g₁] [ZFSet.Definable n g₂] :
                                                                  ZFSet.Definable n fun (s : Fin nZFSet.{u_1}) => f (g₁ s) (g₂ s)
                                                                  Equations
                                                                  instance ZFSet.instDefinable (n : ) (i : Fin n) :
                                                                  ZFSet.Definable n fun (s : Fin nZFSet.{u_1}) => s i
                                                                  Equations
                                                                  theorem ZFSet.Definable.out_equiv {n : } (f : (Fin nZFSet.{u})ZFSet.{u}) [ZFSet.Definable n f] {xs ys : Fin nPSet.{u}} (h : ∀ (i : Fin n), xs i ys i) :
                                                                  theorem ZFSet.Definable₂.out_equiv (f : ZFSet.{u}ZFSet.{u}ZFSet.{u}) [ZFSet.Definable₂ f] {x₁ y₁ x₂ y₂ : PSet.{u}} (h₁ : x₁ y₁) (h₂ : x₂ y₂) :
                                                                  @[deprecated]
                                                                  def PSet.Resp.evalAux {n : } :
                                                                  { f : PSet.Resp nFunction.OfArity ZFSet.{u} ZFSet.{u} n // ∀ (a b : PSet.Resp n), a.Equiv bf a = f b }

                                                                  Helper function for PSet.eval.

                                                                  Equations
                                                                  Instances For
                                                                    @[deprecated]

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

                                                                    Equations
                                                                    Instances For
                                                                      @[deprecated]
                                                                      theorem PSet.Resp.eval_val {n : } {f : PSet.Resp (n + 1)} {x : PSet.{u_1}} :
                                                                      PSet.Resp.eval (n + 1) f x = PSet.Resp.eval n (f.f x)
                                                                      @[deprecated]
                                                                      class inductive PSet.Definable (n : ) :

                                                                      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
                                                                        @[deprecated]

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

                                                                        Equations
                                                                        Instances For
                                                                          @[deprecated]

                                                                          Turns a definable function into a function that respects equivalence.

                                                                          Equations
                                                                          Instances For
                                                                            @[deprecated]

                                                                            All functions are classically definable.

                                                                            Equations
                                                                            Instances For
                                                                              noncomputable def Classical.allZFSetDefinable {n : } (F : (Fin nZFSet.{u})ZFSet.{u}) :

                                                                              All functions are classically definable.

                                                                              Equations
                                                                              Instances For
                                                                                theorem ZFSet.eq {x y : PSet.{u_1}} :
                                                                                ZFSet.mk x = ZFSet.mk y x.Equiv y
                                                                                theorem ZFSet.sound {x y : PSet.{u_1}} (h : x.Equiv y) :
                                                                                theorem ZFSet.exact {x y : PSet.{u_1}} :
                                                                                ZFSet.mk x = ZFSet.mk yx.Equiv y
                                                                                @[simp, deprecated]
                                                                                theorem ZFSet.eval_mk {n : } {f : PSet.Resp (n + 1)} {x : PSet.{u_1}} :
                                                                                PSet.Resp.eval (n + 1) f (ZFSet.mk x) = PSet.Resp.eval n (f.f x)

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

                                                                                Equations
                                                                                Instances For
                                                                                  @[simp]

                                                                                  Convert a ZFC set into a Set of ZFC sets

                                                                                  Equations
                                                                                  Instances For
                                                                                    @[simp]
                                                                                    theorem ZFSet.mem_toSet (a u : ZFSet.{u}) :
                                                                                    a u.toSet a u

                                                                                    A nonempty set is one that contains some element.

                                                                                    Equations
                                                                                    • u.Nonempty = u.toSet.Nonempty
                                                                                    Instances For
                                                                                      theorem ZFSet.nonempty_def (u : ZFSet.{u_1}) :
                                                                                      u.Nonempty ∃ (x : ZFSet.{u_1}), x u
                                                                                      theorem ZFSet.nonempty_of_mem {x u : ZFSet.{u_1}} (h : x u) :
                                                                                      u.Nonempty
                                                                                      @[simp]
                                                                                      theorem ZFSet.nonempty_toSet_iff {u : ZFSet.{u_1}} :
                                                                                      u.toSet.Nonempty u.Nonempty

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

                                                                                      Equations
                                                                                      Instances For
                                                                                        theorem ZFSet.subset_def {x y : ZFSet.{u}} :
                                                                                        x y ∀ ⦃z : ZFSet.{u}⦄, z xz y
                                                                                        @[simp]
                                                                                        @[simp]
                                                                                        theorem ZFSet.toSet_subset_iff {x y : ZFSet.{u_1}} :
                                                                                        x.toSet y.toSet x y
                                                                                        theorem ZFSet.ext {x y : ZFSet.{u}} :
                                                                                        (∀ (z : ZFSet.{u}), z x z y)x = y
                                                                                        @[simp]
                                                                                        theorem ZFSet.toSet_inj {x y : ZFSet.{u_1}} :
                                                                                        x.toSet = y.toSet x = y

                                                                                        The empty ZFC set

                                                                                        Equations
                                                                                        Instances For
                                                                                          @[simp]
                                                                                          theorem ZFSet.not_mem_empty (x : ZFSet.{u}) :
                                                                                          x
                                                                                          @[simp]
                                                                                          theorem ZFSet.toSet_empty :
                                                                                          .toSet =
                                                                                          @[simp]
                                                                                          @[simp]
                                                                                          @[simp]
                                                                                          theorem ZFSet.nonempty_mk_iff {x : PSet.{u_1}} :
                                                                                          (ZFSet.mk x).Nonempty x.Nonempty
                                                                                          theorem ZFSet.eq_empty (x : ZFSet.{u}) :
                                                                                          x = ∀ (y : ZFSet.{u}), yx
                                                                                          @[simp]
                                                                                          theorem ZFSet.mem_insert_iff {x y z : ZFSet.{u}} :
                                                                                          x insert y z x = y x z
                                                                                          theorem ZFSet.mem_insert_of_mem {y z : ZFSet.{u_1}} (x : ZFSet.{u_1}) (h : z y) :
                                                                                          z insert x y
                                                                                          @[simp]
                                                                                          theorem ZFSet.toSet_insert (x y : ZFSet.{u_1}) :
                                                                                          (insert x y).toSet = insert x y.toSet
                                                                                          @[simp]
                                                                                          theorem ZFSet.mem_singleton {x y : ZFSet.{u}} :
                                                                                          x {y} x = y
                                                                                          @[simp]
                                                                                          theorem ZFSet.toSet_singleton (x : ZFSet.{u_1}) :
                                                                                          {x}.toSet = {x}
                                                                                          theorem ZFSet.insert_nonempty (u v : ZFSet.{u_1}) :
                                                                                          (insert u v).Nonempty
                                                                                          theorem ZFSet.singleton_nonempty (u : ZFSet.{u_1}) :
                                                                                          {u}.Nonempty
                                                                                          theorem ZFSet.mem_pair {x y z : ZFSet.{u}} :
                                                                                          x {y, z} x = y x = z
                                                                                          @[simp]
                                                                                          theorem ZFSet.pair_eq_singleton (x : ZFSet.{u_1}) :
                                                                                          {x, x} = {x}
                                                                                          @[simp]
                                                                                          theorem ZFSet.pair_eq_singleton_iff {x y z : ZFSet.{u_1}} :
                                                                                          {x, y} = {z} x = z y = z
                                                                                          @[simp]
                                                                                          theorem ZFSet.singleton_eq_pair_iff {x y z : ZFSet.{u_1}} :
                                                                                          {x} = {y, z} x = y x = z

                                                                                          omega is the first infinite von Neumann ordinal

                                                                                          Equations
                                                                                          Instances For

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

                                                                                            Equations
                                                                                            Instances For
                                                                                              @[simp]
                                                                                              theorem ZFSet.mem_sep {p : ZFSet.{u}Prop} {x y : ZFSet.{u}} :
                                                                                              y ZFSet.sep p x y x p y
                                                                                              @[simp]
                                                                                              @[simp]
                                                                                              theorem ZFSet.toSet_sep (a : ZFSet.{u_1}) (p : ZFSet.{u_1}Prop) :
                                                                                              (ZFSet.sep p a).toSet = {x : ZFSet.{u_1} | x a.toSet p x}

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

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

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

                                                                                                Equations
                                                                                                Instances For

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

                                                                                                  Equations
                                                                                                  Instances For

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

                                                                                                    Equations
                                                                                                    Instances For

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

                                                                                                      Equations
                                                                                                      Instances For
                                                                                                        @[simp]
                                                                                                        theorem ZFSet.mem_sUnion {x y : ZFSet.{u}} :
                                                                                                        y ⋃₀ x zx, y z
                                                                                                        theorem ZFSet.mem_sInter {x y : ZFSet.{u_1}} (h : x.Nonempty) :
                                                                                                        y ⋂₀ x zx, y z
                                                                                                        theorem ZFSet.mem_of_mem_sInter {x y z : ZFSet.{u_1}} (hy : y ⋂₀ x) (hz : z x) :
                                                                                                        y z
                                                                                                        theorem ZFSet.mem_sUnion_of_mem {x y z : ZFSet.{u_1}} (hy : y z) (hz : z x) :
                                                                                                        theorem ZFSet.not_mem_sInter_of_not_mem {x y z : ZFSet.{u_1}} (hy : yz) (hz : z x) :
                                                                                                        y⋂₀ x
                                                                                                        @[simp]
                                                                                                        @[simp]
                                                                                                        @[simp]
                                                                                                        theorem ZFSet.toSet_sUnion (x : ZFSet.{u}) :
                                                                                                        (⋃₀ x).toSet = ⋃₀ (ZFSet.toSet '' x.toSet)
                                                                                                        theorem ZFSet.toSet_sInter {x : ZFSet.{u}} (h : x.Nonempty) :
                                                                                                        (⋂₀ x).toSet = ⋂₀ (ZFSet.toSet '' x.toSet)
                                                                                                        @[simp]
                                                                                                        theorem ZFSet.singleton_inj {x y : ZFSet.{u_1}} :
                                                                                                        {x} = {y} x = y

                                                                                                        The binary union operation

                                                                                                        Equations
                                                                                                        Instances For

                                                                                                          The binary intersection operation

                                                                                                          Equations
                                                                                                          Instances For

                                                                                                            The set difference operation

                                                                                                            Equations
                                                                                                            Instances For
                                                                                                              @[simp]
                                                                                                              theorem ZFSet.toSet_union (x y : ZFSet.{u}) :
                                                                                                              (x y).toSet = x.toSet y.toSet
                                                                                                              @[simp]
                                                                                                              theorem ZFSet.toSet_inter (x y : ZFSet.{u}) :
                                                                                                              (x y).toSet = x.toSet y.toSet
                                                                                                              @[simp]
                                                                                                              theorem ZFSet.toSet_sdiff (x y : ZFSet.{u}) :
                                                                                                              (x \ y).toSet = x.toSet \ y.toSet
                                                                                                              @[simp]
                                                                                                              theorem ZFSet.mem_union {x y z : ZFSet.{u}} :
                                                                                                              z x y z x z y
                                                                                                              @[simp]
                                                                                                              theorem ZFSet.mem_inter {x y z : ZFSet.{u}} :
                                                                                                              z x y z x z y
                                                                                                              @[simp]
                                                                                                              theorem ZFSet.mem_diff {x y z : ZFSet.{u}} :
                                                                                                              z x \ y z x zy
                                                                                                              @[simp]
                                                                                                              theorem ZFSet.sUnion_pair {x y : ZFSet.{u}} :
                                                                                                              ⋃₀ {x, y} = x y
                                                                                                              theorem ZFSet.mem_wf :
                                                                                                              WellFounded fun (x1 x2 : ZFSet.{u_1}) => x1 x2
                                                                                                              theorem ZFSet.inductionOn {p : ZFSet.{u_1}Prop} (x : ZFSet.{u_1}) (h : ∀ (x : ZFSet.{u_1}), (∀ yx, p y)p x) :
                                                                                                              p x

                                                                                                              Induction on the relation.

                                                                                                              theorem ZFSet.mem_asymm {x y : ZFSet.{u_1}} :
                                                                                                              x yyx
                                                                                                              theorem ZFSet.mem_irrefl (x : ZFSet.{u_1}) :
                                                                                                              xx
                                                                                                              theorem ZFSet.not_subset_of_mem {x y : ZFSet.{u_1}} (h : x y) :
                                                                                                              ¬y x
                                                                                                              theorem ZFSet.not_mem_of_subset {x y : ZFSet.{u_1}} (h : x y) :
                                                                                                              yx
                                                                                                              theorem ZFSet.regularity (x : ZFSet.{u}) (h : x ) :
                                                                                                              yx, x y =

                                                                                                              The image of a (definable) ZFC set function

                                                                                                              Equations
                                                                                                              Instances For
                                                                                                                @[simp]
                                                                                                                theorem ZFSet.mem_image {f : ZFSet.{u}ZFSet.{u}} [ZFSet.Definable₁ f] {x y : ZFSet.{u}} :
                                                                                                                y ZFSet.image f x zx, f z = y
                                                                                                                @[simp]
                                                                                                                theorem ZFSet.toSet_image (f : ZFSet.{u_1}ZFSet.{u_1}) [ZFSet.Definable₁ f] (x : ZFSet.{u_1}) :
                                                                                                                (ZFSet.image f x).toSet = f '' x.toSet
                                                                                                                noncomputable def ZFSet.range {α : Type u_1} [Small.{u, u_1} α] (f : αZFSet.{u}) :

                                                                                                                The range of a type-indexed family of sets.

                                                                                                                Equations
                                                                                                                Instances For
                                                                                                                  @[simp]
                                                                                                                  theorem ZFSet.mem_range {α : Type u_1} [Small.{u, u_1} α] {f : αZFSet.{u}} {x : ZFSet.{u}} :
                                                                                                                  @[simp]
                                                                                                                  theorem ZFSet.toSet_range {α : Type u_1} [Small.{u, u_1} α] (f : αZFSet.{u}) :
                                                                                                                  (ZFSet.range f).toSet = Set.range f

                                                                                                                  Kuratowski ordered pair

                                                                                                                  Equations
                                                                                                                  • x.pair y = {{x}, {x, y}}
                                                                                                                  Instances For
                                                                                                                    @[simp]
                                                                                                                    theorem ZFSet.toSet_pair (x y : ZFSet.{u}) :
                                                                                                                    (x.pair y).toSet = {{x}, {x, y}}

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

                                                                                                                    Equations
                                                                                                                    Instances For
                                                                                                                      @[simp]
                                                                                                                      theorem ZFSet.mem_pairSep {p : ZFSet.{u}ZFSet.{u}Prop} {x y z : ZFSet.{u}} :
                                                                                                                      z ZFSet.pairSep p x y ax, by, z = a.pair b p a b
                                                                                                                      @[simp]
                                                                                                                      theorem ZFSet.pair_inj {x y x' y' : ZFSet.{u_1}} :
                                                                                                                      x.pair y = x'.pair y' x = x' y = y'

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

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

                                                                                                                        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.

                                                                                                                        Equations
                                                                                                                        Instances For

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

                                                                                                                          Equations
                                                                                                                          • x.funs y = ZFSet.sep (x.IsFunc y) (x.prod y).powerset
                                                                                                                          Instances For
                                                                                                                            @[simp]
                                                                                                                            theorem ZFSet.mem_funs {x y f : ZFSet.{u}} :
                                                                                                                            f x.funs y x.IsFunc y f

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

                                                                                                                            Equations
                                                                                                                            Instances For
                                                                                                                              @[simp]
                                                                                                                              theorem ZFSet.mem_map {f : ZFSet.{u_1}ZFSet.{u_1}} [ZFSet.Definable₁ f] {x y : ZFSet.{u_1}} :
                                                                                                                              y ZFSet.map f x zx, z.pair (f z) = y
                                                                                                                              theorem ZFSet.map_unique {f : ZFSet.{u}ZFSet.{u}} [ZFSet.Definable₁ f] {x z : ZFSet.{u}} (zx : z x) :
                                                                                                                              ∃! w : ZFSet.{u}, z.pair w ZFSet.map f x
                                                                                                                              @[simp]
                                                                                                                              theorem ZFSet.map_isFunc {f : ZFSet.{u_1}ZFSet.{u_1}} [ZFSet.Definable₁ f] {x y : ZFSet.{u_1}} :
                                                                                                                              x.IsFunc y (ZFSet.map f x) zx, f z y
                                                                                                                              @[irreducible]

                                                                                                                              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.def {p : ZFSet.{u}Prop} {x : ZFSet.{u}} :
                                                                                                                                ZFSet.Hereditarily p xp x yx, ZFSet.Hereditarily p y

                                                                                                                                Alias of the forward direction of ZFSet.hereditarily_iff.

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

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

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

                                                                                                                                    Coerce a ZFC set into a class

                                                                                                                                    Equations
                                                                                                                                    Instances For

                                                                                                                                      The universal class

                                                                                                                                      Equations
                                                                                                                                      Instances For

                                                                                                                                        Assert that A is a ZFC set satisfying B

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

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

                                                                                                                                          Equations
                                                                                                                                          • B.Mem A = B.ToSet A
                                                                                                                                          Instances For
                                                                                                                                            theorem Class.mem_def (A B : Class.{u}) :
                                                                                                                                            A B ∃ (x : ZFSet.{u}), x = A B x
                                                                                                                                            @[simp]
                                                                                                                                            theorem Class.not_mem_empty (x : Class.{u}) :
                                                                                                                                            x
                                                                                                                                            @[simp]
                                                                                                                                            @[simp]
                                                                                                                                            theorem Class.mem_univ {A : Class.{u}} :
                                                                                                                                            A Class.univ ∃ (x : ZFSet.{u}), x = A
                                                                                                                                            theorem Class.eq_univ_of_forall {A : Class.{u}} :
                                                                                                                                            (∀ (x : ZFSet.{u}), A x)A = Class.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).

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

                                                                                                                                            Equations
                                                                                                                                            Instances For

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

                                                                                                                                              Equations
                                                                                                                                              Instances For
                                                                                                                                                @[simp]
                                                                                                                                                theorem Class.classToCong_empty :
                                                                                                                                                .classToCong =

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

                                                                                                                                                Equations
                                                                                                                                                Instances For

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

                                                                                                                                                  Equations
                                                                                                                                                  Instances For

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

                                                                                                                                                    Equations
                                                                                                                                                    Instances For

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

                                                                                                                                                      Equations
                                                                                                                                                      Instances For

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

                                                                                                                                                        Equations
                                                                                                                                                        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) 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
                                                                                                                                                          theorem Class.eq_univ_of_powerset_subset {A : Class.{u_1}} (hA : A.powerset A) :

                                                                                                                                                          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
                                                                                                                                                          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}) :

                                                                                                                                                            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
                                                                                                                                                            Instances For
                                                                                                                                                              @[simp]
                                                                                                                                                              theorem ZFSet.map_fval {f : ZFSet.{u}ZFSet.{u}} [ZFSet.Definable₁ f] {x y : ZFSet.{u}} (h : y x) :
                                                                                                                                                              (ZFSet.map f x) y = (f y)
                                                                                                                                                              noncomputable def ZFSet.choice (x : ZFSet.{u}) :

                                                                                                                                                              A choice function on the class of nonempty ZFC sets.

                                                                                                                                                              Equations
                                                                                                                                                              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_isFunc (x : ZFSet.{u}) (h : x) :
                                                                                                                                                                x.IsFunc (⋃₀ x) x.choice
                                                                                                                                                                theorem ZFSet.choice_mem (x : ZFSet.{u}) (h : x) (y : ZFSet.{u}) (yx : y x) :
                                                                                                                                                                x.choice y y
                                                                                                                                                                noncomputable def ZFSet.toSet_equiv :

                                                                                                                                                                ZFSet.toSet as an equivalence.

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