set_theory.zfc.basicMathlib.SetTheory.ZFC.Basic

This file has been ported!

Changes since the initial port

The following section lists changes to this file in mathlib3 and mathlib4 that occured after the initial port. Most recent changes are shown first. Hovering over a commit will show all commits associated with the same mathlib3 commit.

Changes in mathlib3

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(last sync)

chore(set_theory/zfc/basic): reverse sInter_coe (#18773)

It now matches coe_sUnion, and works as a norm_cast lemma.

Mathlib 4: https://github.com/leanprover-community/mathlib4/pull/3345

Diff
@@ -1114,8 +1114,9 @@ begin
   exact H _ hxz
 end
 
-@[simp, norm_cast] theorem sInter_coe {x : Set.{u}} (h : x.nonempty) : ⋂₀ (x : Class.{u}) = ⋂₀ x :=
-set.ext $ λ y, sInter_apply.trans (Set.mem_sInter h).symm
+@[simp, norm_cast] theorem coe_sInter {x : Set.{u}} (h : x.nonempty) :
+  ↑(⋂₀ x) = ⋂₀ (x : Class.{u}) :=
+set.ext $ λ y, (Set.mem_sInter h).trans sInter_apply.symm
 
 theorem mem_of_mem_sInter {x y z : Class} (hy : y ∈ ⋂₀ x) (hz : z ∈ x) : y ∈ z :=
 by { obtain ⟨w, rfl, hw⟩ := hy, exact coe_mem.2 (hw z hz) }

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

feat(set_theory/zfc/basic): define Set and Class intersection (#18232)

Co-authored-by: Yaël Dillies <yael.dillies@gmail.com> Co-authored-by: Scott Morrison <scott.morrison@gmail.com>

Diff
@@ -669,21 +669,52 @@ resp.eval 1 ⟨pSet.sUnion, λ ⟨α, A⟩ ⟨β, B⟩ ⟨αβ, βα⟩,
 
 prefix (name := Set.sUnion) `⋃₀ `:110 := Set.sUnion
 
+/-- The intersection operator, the collection of elements in all of the elements of a ZFC set. We
+special-case `⋂₀ ∅ = ∅`. -/
+noncomputable def sInter (x : Set) : Set :=
+by { classical, exact dite x.nonempty (λ h, {y ∈ h.some | ∀ z ∈ x, y ∈ z}) (λ _, ∅) }
+
+prefix (name := Set.sInter) `⋂₀ `:110 := Set.sInter
+
 @[simp] theorem mem_sUnion {x y : Set.{u}} : y ∈ ⋃₀ x ↔ ∃ z ∈ x, y ∈ z :=
 quotient.induction_on₂ x y (λ x y, iff.trans mem_sUnion
   ⟨λ ⟨z, h⟩, ⟨⟦z⟧, h⟩, λ ⟨z, h⟩, quotient.induction_on z (λ z h, ⟨z, h⟩) h⟩)
 
+theorem mem_sInter {x y : Set} (h : x.nonempty) : y ∈ ⋂₀ x ↔ ∀ z ∈ x, y ∈ z :=
+begin
+  rw [sInter, dif_pos h],
+  simp only [mem_to_set, mem_sep, and_iff_right_iff_imp],
+  exact λ H, H _ h.some_mem
+end
+
+@[simp] theorem sUnion_empty : ⋃₀ (∅ : Set) = ∅ := by { ext, simp }
+@[simp] theorem sInter_empty : ⋂₀ (∅ : Set) = ∅ := dif_neg $ by simp
+
+theorem mem_of_mem_sInter {x y z : Set} (hy : y ∈ ⋂₀ x) (hz : z ∈ x) : y ∈ z :=
+begin
+  rcases eq_empty_or_nonempty x with rfl | hx,
+  { exact (not_mem_empty z hz).elim },
+  { exact (mem_sInter hx).1 hy z hz }
+end
+
 theorem mem_sUnion_of_mem {x y z : Set} (hy : y ∈ z) (hz : z ∈ x) : y ∈ ⋃₀ x :=
 mem_sUnion.2 ⟨z, hz, hy⟩
 
-@[simp] theorem sUnion_empty : ⋃₀ (∅ : Set.{u}) = ∅ := by { ext, simp }
+theorem not_mem_sInter_of_not_mem {x y z : Set} (hy : ¬ y ∈ z) (hz : z ∈ x) : ¬ y ∈ ⋂₀ x :=
+λ hx, hy $ mem_of_mem_sInter hx hz
 
 @[simp] theorem sUnion_singleton {x : Set.{u}} : ⋃₀ ({x} : Set) = x :=
 ext $ λ y, by simp_rw [mem_sUnion, exists_prop, mem_singleton, exists_eq_left]
 
+@[simp] theorem sInter_singleton {x : Set.{u}} : ⋂₀ ({x} : Set) = x :=
+ext $ λ y, by simp_rw [mem_sInter (singleton_nonempty x), mem_singleton, forall_eq]
+
 @[simp] theorem to_set_sUnion (x : Set.{u}) : (⋃₀ x).to_set = ⋃₀ (to_set '' x.to_set) :=
 by { ext, simp }
 
+theorem to_set_sInter {x : Set.{u}} (h : x.nonempty) : (⋂₀ x).to_set = ⋂₀ (to_set '' x.to_set) :=
+by { ext, simp [mem_sInter h] }
+
 theorem singleton_injective : function.injective (@singleton Set Set _) :=
 λ x y H, let this := congr_arg sUnion H in by rwa [sUnion_singleton, sUnion_singleton] at this
 
@@ -1009,6 +1040,11 @@ def sUnion (x : Class) : Class := ⋃₀ (Class_to_Cong x)
 
 prefix (name := Class.sUnion) `⋃₀ `:110 := Class.sUnion
 
+/-- The intersection of a class is the class of all members of ZFC sets in the class -/
+def sInter (x : Class) : Class := ⋂₀ Class_to_Cong x
+
+prefix (name := Class.sInter) `⋂₀ `:110 := Class.sInter
+
 theorem of_Set.inj {x y : Set.{u}} (h : (x : Class.{u}) = y) : x = y :=
 Set.ext $ λ z, by { change (x : Class.{u}) z ↔ (y : Class.{u}) z, rw h }
 
@@ -1067,8 +1103,32 @@ begin
     exact ⟨z, rfl, w, hwx, hwz⟩ }
 end
 
-@[simp] theorem sUnion_empty : ⋃₀ (∅ : Class.{u}) = (∅ : Class.{u}) :=
-by { ext, simp }
+@[simp] theorem sInter_apply {x : Class.{u}} {y : Set.{u}} :
+  (⋂₀ x) y ↔ ∀ z : Set.{u}, x z → y ∈ z :=
+begin
+  refine ⟨λ hxy z hxz, hxy _ ⟨z, rfl, hxz⟩, _⟩,
+  rintro H - ⟨z, rfl, hxz⟩,
+  exact H _ hxz
+end
+
+@[simp, norm_cast] theorem sInter_coe {x : Set.{u}} (h : x.nonempty) : ⋂₀ (x : Class.{u}) = ⋂₀ x :=
+set.ext $ λ y, sInter_apply.trans (Set.mem_sInter h).symm
+
+theorem mem_of_mem_sInter {x y z : Class} (hy : y ∈ ⋂₀ x) (hz : z ∈ x) : y ∈ z :=
+by { obtain ⟨w, rfl, hw⟩ := hy, exact coe_mem.2 (hw z hz) }
+
+theorem mem_sInter {x y : Class.{u}} (h : x.nonempty) : y ∈ ⋂₀ x ↔ ∀ z, z ∈ x → y ∈ z :=
+begin
+  refine ⟨λ hy z, mem_of_mem_sInter hy, λ H, _⟩,
+  simp_rw [mem_def, sInter_apply],
+  obtain ⟨z, hz⟩ := h,
+  obtain ⟨y, rfl, hzy⟩ := H z (coe_mem.2 hz),
+  refine ⟨y, rfl, λ w hxw, _⟩,
+  simpa only [coe_mem, coe_apply] using H w (coe_mem.2 hxw),
+end
+
+@[simp] theorem sUnion_empty : ⋃₀ (∅ : Class.{u}) = ∅ := by { ext, simp }
+@[simp] theorem sInter_empty : ⋂₀ (∅ : Class.{u}) = univ := by { ext, simp [sInter, ←univ] }
 
 /-- An induction principle for sets. If every subset of a class is a member, then the class is
   universal. -/

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(first ported)

Changes in mathlib3port

mathlib3
mathlib3port
Diff
@@ -1816,7 +1816,7 @@ theorem hereditarily_iff : Hereditarily p x ↔ p x ∧ ∀ y ∈ x, Hereditaril
 -/
 
 alias ⟨hereditarily.def, _⟩ := hereditarily_iff
-#align Set.hereditarily.def ZFSet.Hereditarily.def'
+#align Set.hereditarily.def ZFSet.Hereditarily.def
 
 #print ZFSet.Hereditarily.self /-
 theorem Hereditarily.self (h : x.Hereditarily p) : p x :=
Diff
@@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Mario Carneiro
 -/
 import Data.Set.Lattice
-import Logic.Small.Basic
+import Logic.Small.Defs
 import Order.WellFounded
 
 #align_import set_theory.zfc.basic from "leanprover-community/mathlib"@"f0b3759a8ef0bd8239ecdaa5e1089add5feebe1a"
@@ -1816,7 +1816,7 @@ theorem hereditarily_iff : Hereditarily p x ↔ p x ∧ ∀ y ∈ x, Hereditaril
 -/
 
 alias ⟨hereditarily.def, _⟩ := hereditarily_iff
-#align Set.hereditarily.def ZFSet.Hereditarily.def
+#align Set.hereditarily.def ZFSet.Hereditarily.def'
 
 #print ZFSet.Hereditarily.self /-
 theorem Hereditarily.self (h : x.Hereditarily p) : p x :=
Diff
@@ -391,7 +391,7 @@ private theorem mem_wf_aux : ∀ {x y : PSet.{u}}, Equiv x y → Acc (· ∈ ·)
       rintro ⟨γ, C⟩ ⟨b, hc⟩
       cases' H.exists_right b with a ha
       have H := ha.trans hc.symm
-      rw [mk_func] at H 
+      rw [mk_func] at H
       exact mem_wf_aux H⟩
 
 #print PSet.mem_wf /-
@@ -606,8 +606,8 @@ theorem mem_sUnion : ∀ {x y : PSet.{u}}, y ∈ ⋃₀ x ↔ ∃ z ∈ x, y ∈
   | ⟨α, A⟩, y =>
     ⟨fun ⟨⟨a, c⟩, (e : Equiv y ((A a).Func c))⟩ =>
       have : Func (A a) c ∈ mk (A a).type (A a).Func := Mem.mk (A a).Func c
-      ⟨_, Mem.mk _ _, (Mem.congr_left e).2 (by rwa [eta] at this )⟩,
-      fun ⟨⟨β, B⟩, ⟨a, (e : Equiv (mk β B) (A a))⟩, ⟨b, yb⟩⟩ => by rw [← eta (A a)] at e ;
+      ⟨_, Mem.mk _ _, (Mem.congr_left e).2 (by rwa [eta] at this)⟩,
+      fun ⟨⟨β, B⟩, ⟨a, (e : Equiv (mk β B) (A a))⟩, ⟨b, yb⟩⟩ => by rw [← eta (A a)] at e;
       exact
         let ⟨βt, tβ⟩ := e
         let ⟨c, bc⟩ := βt b
@@ -1245,7 +1245,7 @@ instance : Sep ZFSet ZFSet :=
 theorem mem_sep {p : ZFSet.{u} → Prop} {x y : ZFSet.{u}} : y ∈ {y ∈ x | p y} ↔ y ∈ x ∧ p y :=
   Quotient.induction_on₂ x y fun ⟨α, A⟩ y =>
     ⟨fun ⟨⟨a, pa⟩, h⟩ => ⟨⟨a, h⟩, by rwa [@Quotient.sound PSet _ _ _ h]⟩, fun ⟨⟨a, h⟩, pa⟩ =>
-      ⟨⟨a, by rw [mk_func] at h ; rwa [mk_func, ← ZFSet.sound h]⟩, h⟩⟩
+      ⟨⟨a, by rw [mk_func] at h; rwa [mk_func, ← ZFSet.sound h]⟩, h⟩⟩
 #align Set.mem_sep ZFSet.mem_sep
 -/
 
@@ -1288,11 +1288,11 @@ theorem sUnion_lem {α β : Type u} (A : α → PSet) (B : β → PSet) (αβ :
     let ⟨b, hb⟩ := αβ a
     induction' ea : A a with γ Γ
     induction' eb : B b with δ Δ
-    rw [ea, eb] at hb 
+    rw [ea, eb] at hb
     cases' hb with γδ δγ
     exact
       let c : type (A a) := c
-      let ⟨d, hd⟩ := γδ (by rwa [ea] at c )
+      let ⟨d, hd⟩ := γδ (by rwa [ea] at c)
       have : PSet.Equiv ((A a).Func c) ((B b).Func (Eq.ndrec d (Eq.symm eb))) :=
         match A a, B b, ea, eb, c, d, hd with
         | _, _, rfl, rfl, x, y, hd => hd
@@ -1419,7 +1419,7 @@ theorem toSet_sInter {x : ZFSet.{u}} (h : x.Nonempty) : (⋂₀ x).toSet = ⋂
 theorem singleton_injective : Function.Injective (@singleton ZFSet ZFSet _) := fun x y H =>
   by
   let this := congr_arg sUnion H
-  rwa [sUnion_singleton, sUnion_singleton] at this 
+  rwa [sUnion_singleton, sUnion_singleton] at this
 #align Set.singleton_injective ZFSet.singleton_injective
 -/
 
@@ -1674,7 +1674,7 @@ theorem mem_pairSep {p} {x y z : ZFSet.{u}} :
 theorem pair_injective : Function.Injective2 pair := fun x x' y y' H =>
   by
   have ae := ext_iff.1 H
-  simp only [pair, mem_pair] at ae 
+  simp only [pair, mem_pair] at ae
   obtain rfl : x = x' := by
     cases' (ae {x}).1 (by simp) with h h
     · exact singleton_injective h
@@ -2061,7 +2061,7 @@ theorem ofSet.inj {x y : ZFSet.{u}} (h : (x : Class.{u}) = y) : x = y :=
 #print Class.toSet_of_ZFSet /-
 @[simp]
 theorem toSet_of_ZFSet (A : Class.{u}) (x : ZFSet.{u}) : ToSet A x ↔ A x :=
-  ⟨fun ⟨y, yx, py⟩ => by rwa [of_Set.inj yx] at py , fun px => ⟨x, rfl, px⟩⟩
+  ⟨fun ⟨y, yx, py⟩ => by rwa [of_Set.inj yx] at py, fun px => ⟨x, rfl, px⟩⟩
 #align Class.to_Set_of_Set Class.toSet_of_ZFSet
 -/
 
Diff
@@ -121,11 +121,10 @@ theorem Function.OfArity.const_succ_apply {α : Type u} (a : α) (n : ℕ) (x :
 #align arity.const_succ_apply Function.OfArity.const_succ_apply
 -/
 
-#print Function.OfArity.OfArity.inhabited /-
-instance Function.OfArity.OfArity.inhabited {α n} [Inhabited α] :
-    Inhabited (Function.OfArity α n) :=
+#print Function.OfArity.inhabited /-
+instance OfArity.inhabited {α n} [Inhabited α] : Inhabited (Function.OfArity α n) :=
   ⟨Function.OfArity.const default _⟩
-#align arity.arity.inhabited Function.OfArity.OfArity.inhabited
+#align arity.arity.inhabited Function.OfArity.inhabited
 -/
 
 end Function.OfArity
Diff
@@ -1318,7 +1318,8 @@ prefix:110 "⋃₀ " => ZFSet.sUnion
 #print ZFSet.sInter /-
 /-- The intersection operator, the collection of elements in all of the elements of a ZFC set. We
 special-case `⋂₀ ∅ = ∅`. -/
-noncomputable def sInter (x : ZFSet) : ZFSet := by classical
+noncomputable def sInter (x : ZFSet) : ZFSet := by
+  classical exact dite x.nonempty (fun h => {y ∈ h.some | ∀ z ∈ x, y ∈ z}) fun _ => ∅
 #align Set.sInter ZFSet.sInter
 -/
 
Diff
@@ -1318,8 +1318,7 @@ prefix:110 "⋃₀ " => ZFSet.sUnion
 #print ZFSet.sInter /-
 /-- The intersection operator, the collection of elements in all of the elements of a ZFC set. We
 special-case `⋂₀ ∅ = ∅`. -/
-noncomputable def sInter (x : ZFSet) : ZFSet := by
-  classical exact dite x.nonempty (fun h => {y ∈ h.some | ∀ z ∈ x, y ∈ z}) fun _ => ∅
+noncomputable def sInter (x : ZFSet) : ZFSet := by classical
 #align Set.sInter ZFSet.sInter
 -/
 
Diff
@@ -2240,7 +2240,7 @@ theorem sInter_empty : ⋂₀ (∅ : Class.{u}) = univ := by ext; simp [sInter,
 theorem eq_univ_of_powerset_subset {A : Class} (hA : powerset A ⊆ A) : A = univ :=
   eq_univ_of_forall
     (by
-      by_contra' hnA
+      by_contra! hnA
       exact
         WellFounded.min_mem ZFSet.mem_wf _ hnA
           (hA fun x hx =>
Diff
@@ -66,65 +66,69 @@ Prove `Set.map_definable_aux` computably.
 
 universe u v
 
-#print Arity /-
+#print Function.OfArity /-
 /-- The type of `n`-ary functions `α → α → ... → α`. -/
-def Arity (α : Type u) : ℕ → Type u
+def Function.OfArity (α : Type u) : ℕ → Type u
   | 0 => α
-  | n + 1 => α → Arity n
-#align arity Arity
+  | n + 1 => α → Function.OfArity n
+#align arity Function.OfArity
 -/
 
-#print arity_zero /-
+#print Function.ofArity_zero /-
 @[simp]
-theorem arity_zero (α : Type u) : Arity α 0 = α :=
+theorem Function.ofArity_zero (α : Type u) : Function.OfArity α 0 = α :=
   rfl
-#align arity_zero arity_zero
+#align arity_zero Function.ofArity_zero
 -/
 
-#print arity_succ /-
+#print Function.ofArity_succ /-
 @[simp]
-theorem arity_succ (α : Type u) (n : ℕ) : Arity α n.succ = (α → Arity α n) :=
+theorem Function.ofArity_succ (α : Type u) (n : ℕ) :
+    Function.OfArity α n.succ = (α → Function.OfArity α n) :=
   rfl
-#align arity_succ arity_succ
+#align arity_succ Function.ofArity_succ
 -/
 
-namespace Arity
+namespace Function.OfArity
 
-#print Arity.const /-
+#print Function.OfArity.const /-
 /-- Constant `n`-ary function with value `a`. -/
-def const {α : Type u} (a : α) : ∀ n, Arity α n
+def Function.OfArity.const {α : Type u} (a : α) : ∀ n, Function.OfArity α n
   | 0 => a
   | n + 1 => fun _ => const n
-#align arity.const Arity.const
+#align arity.const Function.OfArity.const
 -/
 
-#print Arity.const_zero /-
+#print Function.OfArity.const_zero /-
 @[simp]
-theorem const_zero {α : Type u} (a : α) : const a 0 = a :=
+theorem Function.OfArity.const_zero {α : Type u} (a : α) : Function.OfArity.const a 0 = a :=
   rfl
-#align arity.const_zero Arity.const_zero
+#align arity.const_zero Function.OfArity.const_zero
 -/
 
-#print Arity.const_succ /-
+#print Function.OfArity.const_succ /-
 @[simp]
-theorem const_succ {α : Type u} (a : α) (n : ℕ) : const a n.succ = fun _ => const a n :=
+theorem Function.OfArity.const_succ {α : Type u} (a : α) (n : ℕ) :
+    Function.OfArity.const a n.succ = fun _ => Function.OfArity.const a n :=
   rfl
-#align arity.const_succ Arity.const_succ
+#align arity.const_succ Function.OfArity.const_succ
 -/
 
-#print Arity.const_succ_apply /-
-theorem const_succ_apply {α : Type u} (a : α) (n : ℕ) (x : α) : const a n.succ x = const a n :=
+#print Function.OfArity.const_succ_apply /-
+theorem Function.OfArity.const_succ_apply {α : Type u} (a : α) (n : ℕ) (x : α) :
+    Function.OfArity.const a n.succ x = Function.OfArity.const a n :=
   rfl
-#align arity.const_succ_apply Arity.const_succ_apply
+#align arity.const_succ_apply Function.OfArity.const_succ_apply
 -/
 
-#print Arity.Arity.inhabited /-
-instance Arity.inhabited {α n} [Inhabited α] : Inhabited (Arity α n) :=
-  ⟨const default _⟩
-#align arity.arity.inhabited Arity.Arity.inhabited
+#print Function.OfArity.OfArity.inhabited /-
+instance Function.OfArity.OfArity.inhabited {α n} [Inhabited α] :
+    Inhabited (Function.OfArity α n) :=
+  ⟨Function.OfArity.const default _⟩
+#align arity.arity.inhabited Function.OfArity.OfArity.inhabited
 -/
 
-end Arity
+end Function.OfArity
 
 #print PSet /-
 /-- The type of pre-sets in universe `u`. A pre-set
@@ -660,14 +664,15 @@ theorem lift_mem_embed : ∀ x : PSet.{u}, PSet.Lift.{u, max (u + 1) v} x ∈ em
 #print PSet.Arity.Equiv /-
 /-- 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. -/
-def Arity.Equiv : ∀ {n}, Arity PSet.{u} n → Arity PSet.{u} n → Prop
+def Arity.Equiv : ∀ {n}, Function.OfArity PSet.{u} n → Function.OfArity PSet.{u} n → Prop
   | 0, a, b => Equiv a b
   | n + 1, a, b => ∀ x y, Equiv x y → arity.equiv (a x) (b y)
 #align pSet.arity.equiv PSet.Arity.Equiv
 -/
 
 #print PSet.Arity.equiv_const /-
-theorem Arity.equiv_const {a : PSet.{u}} : ∀ n, Arity.Equiv (Arity.const a n) (Arity.const a n)
+theorem Arity.equiv_const {a : PSet.{u}} :
+    ∀ n, Arity.Equiv (Function.OfArity.const a n) (Function.OfArity.const a n)
   | 0 => Equiv.rfl
   | n + 1 => fun x y h => arity.equiv_const _
 #align pSet.arity.equiv_const PSet.Arity.equiv_const
@@ -677,13 +682,13 @@ theorem Arity.equiv_const {a : PSet.{u}} : ∀ n, Arity.Equiv (Arity.const a n)
 /-- `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. -/
 def Resp (n) :=
-  { x : Arity PSet.{u} n // Arity.Equiv x x }
+  { x : Function.OfArity PSet.{u} n // Arity.Equiv x x }
 #align pSet.resp PSet.Resp
 -/
 
 #print PSet.Resp.inhabited /-
 instance Resp.inhabited {n} : Inhabited (Resp n) :=
-  ⟨⟨Arity.const default _, Arity.equiv_const _⟩⟩
+  ⟨⟨Function.OfArity.const default _, Arity.equiv_const _⟩⟩
 #align pSet.resp.inhabited PSet.Resp.inhabited
 -/
 
@@ -753,10 +758,11 @@ namespace Resp
 #print PSet.Resp.evalAux /-
 /-- Helper function for `pSet.eval`. -/
 def evalAux :
-    ∀ {n}, { f : Resp n → Arity ZFSet.{u} n // ∀ a b : Resp n, Resp.Equiv a b → f a = f b }
+    ∀ {n},
+      { f : Resp n → Function.OfArity ZFSet.{u} n // ∀ a b : Resp n, Resp.Equiv a b → f a = f b }
   | 0 => ⟨fun a => ⟦a.1⟧, fun a b h => Quotient.sound h⟩
   | n + 1 =>
-    let F : Resp (n + 1) → Arity ZFSet (n + 1) := fun a =>
+    let F : Resp (n + 1) → Function.OfArity ZFSet (n + 1) := fun a =>
       @Quotient.lift _ _ PSet.setoid (fun x => eval_aux.1 (a.f x)) fun b c h =>
         eval_aux.2 _ _ (a.2 _ _ h)
     ⟨F, fun b c h =>
@@ -768,13 +774,14 @@ def evalAux :
 
 #print PSet.Resp.eval /-
 /-- An equivalence-respecting function yields an n-ary ZFC set function. -/
-def eval (n) : Resp n → Arity ZFSet.{u} n :=
+def eval (n) : Resp n → Function.OfArity ZFSet.{u} n :=
   evalAux.1
 #align pSet.resp.eval PSet.Resp.eval
 -/
 
 #print PSet.Resp.eval_val /-
-theorem eval_val {n f x} : (@eval (n + 1) f : ZFSet → Arity ZFSet n) ⟦x⟧ = eval n (Resp.f f x) :=
+theorem eval_val {n f x} :
+    (@eval (n + 1) f : ZFSet → Function.OfArity ZFSet n) ⟦x⟧ = eval n (Resp.f f x) :=
   rfl
 #align pSet.resp.eval_val PSet.Resp.eval_val
 -/
@@ -785,7 +792,7 @@ end Resp
 /-- 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. -/
-class inductive Definable (n) : Arity ZFSet.{u} n → Type (u + 1)
+class inductive Definable (n) : Function.OfArity ZFSet.{u} n → Type (u + 1)
   | mk (f) : definable (Resp.eval n f)
 #align pSet.definable PSet.Definable
 -/
@@ -794,21 +801,22 @@ attribute [instance] definable.mk
 
 #print PSet.Definable.EqMk /-
 /-- The evaluation of a function respecting equivalence is definable, by that same function. -/
-def Definable.EqMk {n} (f) : ∀ {s : Arity ZFSet.{u} n} (H : Resp.eval _ f = s), Definable n s
+def Definable.EqMk {n} (f) :
+    ∀ {s : Function.OfArity ZFSet.{u} n} (H : Resp.eval _ f = s), Definable n s
   | _, rfl => ⟨f⟩
 #align pSet.definable.eq_mk PSet.Definable.EqMk
 -/
 
 #print PSet.Definable.Resp /-
 /-- Turns a definable function into a function that respects equivalence. -/
-def Definable.Resp {n} : ∀ (s : Arity ZFSet.{u} n) [Definable n s], Resp n
+def Definable.Resp {n} : ∀ (s : Function.OfArity ZFSet.{u} n) [Definable n s], Resp n
   | _, ⟨f⟩ => f
 #align pSet.definable.resp PSet.Definable.Resp
 -/
 
 #print PSet.Definable.eq /-
 theorem Definable.eq {n} :
-    ∀ (s : Arity ZFSet.{u} n) [H : Definable n s], (@Definable.Resp n s H).eval _ = s
+    ∀ (s : Function.OfArity ZFSet.{u} n) [H : Definable n s], (@Definable.Resp n s H).eval _ = s
   | _, ⟨f⟩ => rfl
 #align pSet.definable.eq PSet.Definable.eq
 -/
@@ -821,11 +829,11 @@ open PSet
 
 #print Classical.allDefinable /-
 /-- All functions are classically definable. -/
-noncomputable def allDefinable : ∀ {n} (F : Arity ZFSet.{u} n), Definable n F
+noncomputable def allDefinable : ∀ {n} (F : Function.OfArity ZFSet.{u} n), Definable n F
   | 0, F =>
     let p := @Quotient.exists_rep PSet _ F
     Definable.EqMk ⟨choose p, Equiv.rfl⟩ (choose_spec p)
-  | n + 1, (F : Arity ZFSet.{u} (n + 1)) =>
+  | n + 1, (F : Function.OfArity ZFSet.{u} (n + 1)) =>
     by
     have I := fun x => all_definable (F x)
     refine' definable.eq_mk ⟨fun x : PSet => (@definable.resp _ _ (I ⟦x⟧)).1, _⟩ _
@@ -887,7 +895,7 @@ theorem exact {x y : PSet} : mk x = mk y → PSet.Equiv x y :=
 #print ZFSet.eval_mk /-
 @[simp]
 theorem eval_mk {n f x} :
-    (@Resp.eval (n + 1) f : ZFSet → Arity ZFSet n) (mk x) = Resp.eval n (Resp.f f x) :=
+    (@Resp.eval (n + 1) f : ZFSet → Function.OfArity ZFSet n) (mk x) = Resp.eval n (Resp.f f x) :=
   rfl
 #align Set.eval_mk ZFSet.eval_mk
 -/
Diff
@@ -3,9 +3,9 @@ Copyright (c) 2018 Mario Carneiro. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Mario Carneiro
 -/
-import Mathbin.Data.Set.Lattice
-import Mathbin.Logic.Small.Basic
-import Mathbin.Order.WellFounded
+import Data.Set.Lattice
+import Logic.Small.Basic
+import Order.WellFounded
 
 #align_import set_theory.zfc.basic from "leanprover-community/mathlib"@"f0b3759a8ef0bd8239ecdaa5e1089add5feebe1a"
 
Diff
@@ -1808,7 +1808,7 @@ theorem hereditarily_iff : Hereditarily p x ↔ p x ∧ ∀ y ∈ x, Hereditaril
 #align Set.hereditarily_iff ZFSet.hereditarily_iff
 -/
 
-alias hereditarily_iff ↔ hereditarily.def _
+alias ⟨hereditarily.def, _⟩ := hereditarily_iff
 #align Set.hereditarily.def ZFSet.Hereditarily.def
 
 #print ZFSet.Hereditarily.self /-
Diff
@@ -2,16 +2,13 @@
 Copyright (c) 2018 Mario Carneiro. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Mario Carneiro
-
-! This file was ported from Lean 3 source module set_theory.zfc.basic
-! leanprover-community/mathlib commit f0b3759a8ef0bd8239ecdaa5e1089add5feebe1a
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
 -/
 import Mathbin.Data.Set.Lattice
 import Mathbin.Logic.Small.Basic
 import Mathbin.Order.WellFounded
 
+#align_import set_theory.zfc.basic from "leanprover-community/mathlib"@"f0b3759a8ef0bd8239ecdaa5e1089add5feebe1a"
+
 /-!
 # A model of ZFC
 
Diff
@@ -93,37 +93,37 @@ theorem arity_succ (α : Type u) (n : ℕ) : Arity α n.succ = (α → Arity α
 
 namespace Arity
 
-#print Arity.Const /-
+#print Arity.const /-
 /-- Constant `n`-ary function with value `a`. -/
-def Const {α : Type u} (a : α) : ∀ n, Arity α n
+def const {α : Type u} (a : α) : ∀ n, Arity α n
   | 0 => a
   | n + 1 => fun _ => const n
-#align arity.const Arity.Const
+#align arity.const Arity.const
 -/
 
 #print Arity.const_zero /-
 @[simp]
-theorem const_zero {α : Type u} (a : α) : Const a 0 = a :=
+theorem const_zero {α : Type u} (a : α) : const a 0 = a :=
   rfl
 #align arity.const_zero Arity.const_zero
 -/
 
 #print Arity.const_succ /-
 @[simp]
-theorem const_succ {α : Type u} (a : α) (n : ℕ) : Const a n.succ = fun _ => Const a n :=
+theorem const_succ {α : Type u} (a : α) (n : ℕ) : const a n.succ = fun _ => const a n :=
   rfl
 #align arity.const_succ Arity.const_succ
 -/
 
 #print Arity.const_succ_apply /-
-theorem const_succ_apply {α : Type u} (a : α) (n : ℕ) (x : α) : Const a n.succ x = Const a n :=
+theorem const_succ_apply {α : Type u} (a : α) (n : ℕ) (x : α) : const a n.succ x = const a n :=
   rfl
 #align arity.const_succ_apply Arity.const_succ_apply
 -/
 
 #print Arity.Arity.inhabited /-
 instance Arity.inhabited {α n} [Inhabited α] : Inhabited (Arity α n) :=
-  ⟨Const default _⟩
+  ⟨const default _⟩
 #align arity.arity.inhabited Arity.Arity.inhabited
 -/
 
@@ -670,7 +670,7 @@ def Arity.Equiv : ∀ {n}, Arity PSet.{u} n → Arity PSet.{u} n → Prop
 -/
 
 #print PSet.Arity.equiv_const /-
-theorem Arity.equiv_const {a : PSet.{u}} : ∀ n, Arity.Equiv (Arity.Const a n) (Arity.Const a n)
+theorem Arity.equiv_const {a : PSet.{u}} : ∀ n, Arity.Equiv (Arity.const a n) (Arity.const a n)
   | 0 => Equiv.rfl
   | n + 1 => fun x y h => arity.equiv_const _
 #align pSet.arity.equiv_const PSet.Arity.equiv_const
@@ -686,7 +686,7 @@ def Resp (n) :=
 
 #print PSet.Resp.inhabited /-
 instance Resp.inhabited {n} : Inhabited (Resp n) :=
-  ⟨⟨Arity.Const default _, Arity.equiv_const _⟩⟩
+  ⟨⟨Arity.const default _, Arity.equiv_const _⟩⟩
 #align pSet.resp.inhabited PSet.Resp.inhabited
 -/
 
@@ -753,9 +753,9 @@ namespace PSet
 
 namespace Resp
 
-#print PSet.Resp.EvalAux /-
+#print PSet.Resp.evalAux /-
 /-- Helper function for `pSet.eval`. -/
-def EvalAux :
+def evalAux :
     ∀ {n}, { f : Resp n → Arity ZFSet.{u} n // ∀ a b : Resp n, Resp.Equiv a b → f a = f b }
   | 0 => ⟨fun a => ⟦a.1⟧, fun a b h => Quotient.sound h⟩
   | n + 1 =>
@@ -766,13 +766,13 @@ def EvalAux :
       funext <|
         @Quotient.ind _ _ (fun q => F b q = F c q) fun z =>
           eval_aux.2 (Resp.f b z) (Resp.f c z) (h _ _ (PSet.Equiv.refl z))⟩
-#align pSet.resp.eval_aux PSet.Resp.EvalAux
+#align pSet.resp.eval_aux PSet.Resp.evalAux
 -/
 
 #print PSet.Resp.eval /-
 /-- An equivalence-respecting function yields an n-ary ZFC set function. -/
 def eval (n) : Resp n → Arity ZFSet.{u} n :=
-  EvalAux.1
+  evalAux.1
 #align pSet.resp.eval PSet.Resp.eval
 -/
 
@@ -822,9 +822,9 @@ namespace Classical
 
 open PSet
 
-#print Classical.AllDefinable /-
+#print Classical.allDefinable /-
 /-- All functions are classically definable. -/
-noncomputable def AllDefinable : ∀ {n} (F : Arity ZFSet.{u} n), Definable n F
+noncomputable def allDefinable : ∀ {n} (F : Arity ZFSet.{u} n), Definable n F
   | 0, F =>
     let p := @Quotient.exists_rep PSet _ F
     Definable.EqMk ⟨choose p, Equiv.rfl⟩ (choose_spec p)
@@ -839,7 +839,7 @@ noncomputable def AllDefinable : ∀ {n} (F : Arity ZFSet.{u} n), Definable n F
     refine' funext fun q => Quotient.inductionOn q fun x => _
     simp_rw [resp.eval_val, resp.f, Subtype.val_eq_coe, Subtype.coe_eta]
     exact @definable.eq _ (F ⟦x⟧) (I ⟦x⟧)
-#align classical.all_definable Classical.AllDefinable
+#align classical.all_definable Classical.allDefinable
 -/
 
 end Classical
@@ -1748,7 +1748,7 @@ theorem mem_funs {x y f : ZFSet.{u}} : f ∈ funs x y ↔ IsFunc x y f := by sim
 -- TODO(Mario): Prove this computably
 noncomputable instance mapDefinableAux (f : ZFSet → ZFSet) [H : Definable 1 f] :
     Definable 1 fun y => pair y (f y) :=
-  @Classical.AllDefinable 1 _
+  @Classical.allDefinable 1 _
 #align Set.map_definable_aux ZFSet.mapDefinableAux
 -/
 
@@ -2308,7 +2308,7 @@ variable (x : ZFSet.{u}) (h : ∅ ∉ x)
 #print ZFSet.choice /-
 /-- A choice function on the class of nonempty ZFC sets. -/
 noncomputable def choice : ZFSet :=
-  @map (fun y => Classical.epsilon fun z => z ∈ y) (Classical.AllDefinable _) x
+  @map (fun y => Classical.epsilon fun z => z ∈ y) (Classical.allDefinable _) x
 #align Set.choice ZFSet.choice
 -/
 
@@ -2323,7 +2323,7 @@ theorem choice_mem_aux (y : ZFSet.{u}) (yx : y ∈ x) :
 /- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
 #print ZFSet.choice_isFunc /-
 theorem choice_isFunc : IsFunc x (⋃₀ x) (choice x) :=
-  (@map_isFunc _ (Classical.AllDefinable _) _ _).2 fun y yx =>
+  (@map_isFunc _ (Classical.allDefinable _) _ _).2 fun y yx =>
     mem_sUnion.2 ⟨y, yx, choice_mem_aux x h y yx⟩
 #align Set.choice_is_func ZFSet.choice_isFunc
 -/
Diff
@@ -184,19 +184,25 @@ def Equiv (x y : PSet) : Prop :=
 #align pSet.equiv PSet.Equiv
 -/
 
+#print PSet.equiv_iff /-
 theorem equiv_iff :
     ∀ {x y : PSet},
       Equiv x y ↔ (∀ i, ∃ j, Equiv (x.Func i) (y.Func j)) ∧ ∀ j, ∃ i, Equiv (x.Func i) (y.Func j)
   | ⟨α, A⟩, ⟨β, B⟩ => Iff.rfl
 #align pSet.equiv_iff PSet.equiv_iff
+-/
 
+#print PSet.Equiv.exists_left /-
 theorem Equiv.exists_left {x y : PSet} (h : Equiv x y) : ∀ i, ∃ j, Equiv (x.Func i) (y.Func j) :=
   (equiv_iff.1 h).1
 #align pSet.equiv.exists_left PSet.Equiv.exists_left
+-/
 
+#print PSet.Equiv.exists_right /-
 theorem Equiv.exists_right {x y : PSet} (h : Equiv x y) : ∀ j, ∃ i, Equiv (x.Func i) (y.Func j) :=
   (equiv_iff.1 h).2
 #align pSet.equiv.exists_right PSet.Equiv.exists_right
+-/
 
 #print PSet.Equiv.refl /-
 @[refl]
@@ -211,6 +217,7 @@ protected theorem Equiv.rfl : ∀ {x}, Equiv x x :=
 #align pSet.equiv.rfl PSet.Equiv.rfl
 -/
 
+#print PSet.Equiv.euc /-
 protected theorem Equiv.euc {x} : ∀ {y z}, Equiv x y → Equiv z y → Equiv x z :=
   PSet.recOn x fun α A IH y =>
     PSet.casesOn y fun β B ⟨γ, Γ⟩ ⟨αβ, βα⟩ ⟨γβ, βγ⟩ =>
@@ -223,24 +230,33 @@ protected theorem Equiv.euc {x} : ∀ {y z}, Equiv x y → Equiv z y → Equiv x
         let ⟨a, ba⟩ := βα b
         ⟨a, IH a ba cb⟩⟩
 #align pSet.equiv.euc PSet.Equiv.euc
+-/
 
+#print PSet.Equiv.symm /-
 @[symm]
 protected theorem Equiv.symm {x y} : Equiv x y → Equiv y x :=
   (Equiv.refl y).euc
 #align pSet.equiv.symm PSet.Equiv.symm
+-/
 
+#print PSet.Equiv.comm /-
 protected theorem Equiv.comm {x y} : Equiv x y ↔ Equiv y x :=
   ⟨Equiv.symm, Equiv.symm⟩
 #align pSet.equiv.comm PSet.Equiv.comm
+-/
 
+#print PSet.Equiv.trans /-
 @[trans]
 protected theorem Equiv.trans {x y z} (h1 : Equiv x y) (h2 : Equiv y z) : Equiv x z :=
   h1.euc h2.symm
 #align pSet.equiv.trans PSet.Equiv.trans
+-/
 
+#print PSet.equiv_of_isEmpty /-
 protected theorem equiv_of_isEmpty (x y : PSet) [IsEmpty x.type] [IsEmpty y.type] : Equiv x y :=
   equiv_iff.2 <| by simp
 #align pSet.equiv_of_is_empty PSet.equiv_of_isEmpty
+-/
 
 #print PSet.setoid /-
 instance setoid : Setoid PSet :=
@@ -505,9 +521,11 @@ theorem not_nonempty_empty : ¬PSet.Nonempty ∅ := by simp [PSet.Nonempty]
 #align pSet.not_nonempty_empty PSet.not_nonempty_empty
 -/
 
+#print PSet.equiv_empty /-
 protected theorem equiv_empty (x : PSet) [IsEmpty x.type] : Equiv x ∅ :=
   PSet.equiv_of_isEmpty x _
 #align pSet.equiv_empty PSet.equiv_empty
+-/
 
 #print PSet.insert /-
 /-- Insert an element into a pre-set -/
@@ -579,10 +597,10 @@ def sUnion (a : PSet) : PSet :=
 #align pSet.sUnion PSet.sUnion
 -/
 
--- mathport name: pSet.sUnion
 prefix:110 "⋃₀ " => PSet.sUnion
 
 /- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
+#print PSet.mem_sUnion /-
 @[simp]
 theorem mem_sUnion : ∀ {x y : PSet.{u}}, y ∈ ⋃₀ x ↔ ∃ z ∈ x, y ∈ z
   | ⟨α, A⟩, y =>
@@ -595,6 +613,7 @@ theorem mem_sUnion : ∀ {x y : PSet.{u}}, y ∈ ⋃₀ x ↔ ∃ z ∈ x, y ∈
         let ⟨c, bc⟩ := βt b
         ⟨⟨a, c⟩, yb.trans bc⟩⟩
 #align pSet.mem_sUnion PSet.mem_sUnion
+-/
 
 /- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
 /- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
@@ -611,11 +630,13 @@ def image (f : PSet.{u} → PSet.{u}) (x : PSet.{u}) : PSet :=
 #align pSet.image PSet.image
 -/
 
+#print PSet.mem_image /-
 theorem mem_image {f : PSet.{u} → PSet.{u}} (H : ∀ {x y}, Equiv x y → Equiv (f x) (f y)) :
     ∀ {x y : PSet.{u}}, y ∈ image f x ↔ ∃ z ∈ x, Equiv y (f z)
   | ⟨α, A⟩, y =>
     ⟨fun ⟨a, ya⟩ => ⟨A a, Mem.mk A a, ya⟩, fun ⟨z, ⟨a, za⟩, yz⟩ => ⟨a, yz.trans (H za)⟩⟩
 #align pSet.mem_image PSet.mem_image
+-/
 
 #print PSet.Lift /-
 /-- Universe lift operation -/
@@ -1287,7 +1308,6 @@ def sUnion : ZFSet → ZFSet :=
 #align Set.sUnion ZFSet.sUnion
 -/
 
--- mathport name: Set.sUnion
 prefix:110 "⋃₀ " => ZFSet.sUnion
 
 #print ZFSet.sInter /-
@@ -1298,16 +1318,17 @@ noncomputable def sInter (x : ZFSet) : ZFSet := by
 #align Set.sInter ZFSet.sInter
 -/
 
--- mathport name: Set.sInter
 prefix:110 "⋂₀ " => ZFSet.sInter
 
 /- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
+#print ZFSet.mem_sUnion /-
 @[simp]
 theorem mem_sUnion {x y : ZFSet.{u}} : y ∈ ⋃₀ x ↔ ∃ z ∈ x, y ∈ z :=
   Quotient.induction_on₂ x y fun x y =>
     Iff.trans mem_sUnion
       ⟨fun ⟨z, h⟩ => ⟨⟦z⟧, h⟩, fun ⟨z, h⟩ => Quotient.inductionOn z (fun z h => ⟨z, h⟩) h⟩
 #align Set.mem_sUnion ZFSet.mem_sUnion
+-/
 
 /- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
 #print ZFSet.mem_sInter /-
@@ -1436,20 +1457,26 @@ instance : Inter ZFSet :=
 instance : SDiff ZFSet :=
   ⟨ZFSet.diff⟩
 
+#print ZFSet.toSet_union /-
 @[simp]
 theorem toSet_union (x y : ZFSet.{u}) : (x ∪ y).toSet = x.toSet ∪ y.toSet := by unfold Union.union;
   rw [ZFSet.union]; simp
 #align Set.to_set_union ZFSet.toSet_union
+-/
 
+#print ZFSet.toSet_inter /-
 @[simp]
 theorem toSet_inter (x y : ZFSet.{u}) : (x ∩ y).toSet = x.toSet ∩ y.toSet := by unfold Inter.inter;
   rw [ZFSet.inter]; ext; simp
 #align Set.to_set_inter ZFSet.toSet_inter
+-/
 
+#print ZFSet.toSet_sdiff /-
 @[simp]
 theorem toSet_sdiff (x y : ZFSet.{u}) : (x \ y).toSet = x.toSet \ y.toSet := by
   change {z ∈ x | z ∉ y}.toSet = _; ext; simp
 #align Set.to_set_sdiff ZFSet.toSet_sdiff
+-/
 
 #print ZFSet.mem_union /-
 @[simp]
@@ -1520,6 +1547,7 @@ theorem mem_irrefl (x : ZFSet) : x ∉ x :=
 #align Set.mem_irrefl ZFSet.mem_irrefl
 -/
 
+#print ZFSet.regularity /-
 theorem regularity (x : ZFSet.{u}) (h : x ≠ ∅) : ∃ y ∈ x, x ∩ y = ∅ :=
   by_contradiction fun ne =>
     h <|
@@ -1532,6 +1560,7 @@ theorem regularity (x : ZFSet.{u}) (h : x ≠ ∅) : ∃ y ∈ x, x ∩ y = ∅
                   let ⟨wx, wz⟩ := mem_inter.1 wxz
                   IH w wz wx⟩
 #align Set.regularity ZFSet.regularity
+-/
 
 #print ZFSet.image /-
 /-- The image of a (definable) ZFC set function -/
@@ -1555,6 +1584,7 @@ theorem image.mk :
 #align Set.image.mk ZFSet.image.mk
 -/
 
+#print ZFSet.mem_image /-
 @[simp]
 theorem mem_image :
     ∀ {f : ZFSet.{u} → ZFSet.{u}} [H : Definable 1 f] {x y : ZFSet.{u}},
@@ -1564,6 +1594,7 @@ theorem mem_image :
       ⟨fun ⟨a, ya⟩ => ⟨⟦A a⟧, Mem.mk A a, Eq.symm <| Quotient.sound ya⟩, fun ⟨z, hz, e⟩ =>
         e ▸ image.mk _ _ hz⟩
 #align Set.mem_image ZFSet.mem_image
+-/
 
 #print ZFSet.toSet_image /-
 @[simp]
@@ -1621,6 +1652,7 @@ def pairSep (p : ZFSet.{u} → ZFSet.{u} → Prop) (x y : ZFSet.{u}) : ZFSet.{u}
 #align Set.pair_sep ZFSet.pairSep
 -/
 
+#print ZFSet.mem_pairSep /-
 @[simp]
 theorem mem_pairSep {p} {x y z : ZFSet.{u}} :
     z ∈ pairSep p x y ↔ ∃ a ∈ x, ∃ b ∈ y, z = pair a b ∧ p a b :=
@@ -1632,6 +1664,7 @@ theorem mem_pairSep {p} {x y z : ZFSet.{u}} :
   · rintro rfl; exact Or.inl ax
   · rintro (rfl | rfl) <;> [left; right] <;> assumption
 #align Set.mem_pair_sep ZFSet.mem_pairSep
+-/
 
 #print ZFSet.pair_injective /-
 theorem pair_injective : Function.Injective2 pair := fun x x' y y' H =>
@@ -1672,10 +1705,12 @@ def prod : ZFSet.{u} → ZFSet.{u} → ZFSet.{u} :=
 #align Set.prod ZFSet.prod
 -/
 
+#print ZFSet.mem_prod /-
 @[simp]
 theorem mem_prod {x y z : ZFSet.{u}} : z ∈ prod x y ↔ ∃ a ∈ x, ∃ b ∈ y, z = pair a b := by
   simp [Prod]
 #align Set.mem_prod ZFSet.mem_prod
+-/
 
 #print ZFSet.pair_mem_prod /-
 @[simp]
@@ -1724,11 +1759,13 @@ noncomputable def map (f : ZFSet → ZFSet) [H : Definable 1 f] : ZFSet → ZFSe
 #align Set.map ZFSet.map
 -/
 
+#print ZFSet.mem_map /-
 @[simp]
 theorem mem_map {f : ZFSet → ZFSet} [H : Definable 1 f] {x y : ZFSet} :
     y ∈ map f x ↔ ∃ z ∈ x, pair z (f z) = y :=
   mem_image
 #align Set.mem_map ZFSet.mem_map
+-/
 
 #print ZFSet.map_unique /-
 theorem map_unique {f : ZFSet.{u} → ZFSet.{u}} [H : Definable 1 f] {x z : ZFSet.{u}} (zx : z ∈ x) :
@@ -1999,7 +2036,6 @@ def sUnion (x : Class) : Class :=
 #align Class.sUnion Class.sUnion
 -/
 
--- mathport name: Class.sUnion
 prefix:110 "⋃₀ " => Class.sUnion
 
 /- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
@@ -2010,7 +2046,6 @@ def sInter (x : Class) : Class :=
 #align Class.sInter Class.sInter
 -/
 
--- mathport name: Class.sInter
 prefix:110 "⋂₀ " => Class.sInter
 
 #print Class.ofSet.inj /-
@@ -2068,20 +2103,26 @@ theorem coe_insert (x y : ZFSet.{u}) : ↑(insert x y) = @insert ZFSet.{u} Class
 #align Class.coe_insert Class.coe_insert
 -/
 
+#print Class.coe_union /-
 @[simp, norm_cast]
 theorem coe_union (x y : ZFSet.{u}) : ↑(x ∪ y) = (x : Class.{u}) ∪ y :=
   ext fun z => ZFSet.mem_union
 #align Class.coe_union Class.coe_union
+-/
 
+#print Class.coe_inter /-
 @[simp, norm_cast]
 theorem coe_inter (x y : ZFSet.{u}) : ↑(x ∩ y) = (x : Class.{u}) ∩ y :=
   ext fun z => ZFSet.mem_inter
 #align Class.coe_inter Class.coe_inter
+-/
 
+#print Class.coe_diff /-
 @[simp, norm_cast]
 theorem coe_diff (x y : ZFSet.{u}) : ↑(x \ y) = (x : Class.{u}) \ y :=
   ext fun z => ZFSet.mem_diff
 #align Class.coe_diff Class.coe_diff
+-/
 
 #print Class.coe_powerset /-
 @[simp, norm_cast]
@@ -2238,7 +2279,6 @@ def fval (F A : Class.{u}) : Class.{u} :=
 #align Class.fval Class.fval
 -/
 
--- mathport name: «expr ′ »
 infixl:100 " ′ " => fval
 
 #print Class.fval_ex /-
@@ -2272,8 +2312,6 @@ noncomputable def choice : ZFSet :=
 #align Set.choice ZFSet.choice
 -/
 
-include h
-
 #print ZFSet.choice_mem_aux /-
 theorem choice_mem_aux (y : ZFSet.{u}) (yx : y ∈ x) :
     (Classical.epsilon fun z : ZFSet.{u} => z ∈ y) ∈ y :=
Diff
@@ -405,7 +405,7 @@ theorem mem_irrefl (x : PSet) : x ∉ x :=
 #print PSet.toSet /-
 /-- Convert a pre-set to a `set` of pre-sets. -/
 def toSet (u : PSet.{u}) : Set PSet.{u} :=
-  { x | x ∈ u }
+  {x | x ∈ u}
 #align pSet.to_set PSet.toSet
 -/
 
@@ -565,7 +565,7 @@ def powerset (x : PSet) : PSet :=
 theorem mem_powerset : ∀ {x y : PSet}, y ∈ powerset x ↔ y ⊆ x
   | ⟨α, A⟩, ⟨β, B⟩ =>
     ⟨fun ⟨p, e⟩ => (Subset.congr_left e).2 fun ⟨a, pa⟩ => ⟨a, Equiv.refl (A a)⟩, fun βα =>
-      ⟨{ a | ∃ b, Equiv (B b) (A a) }, fun b =>
+      ⟨{a | ∃ b, Equiv (B b) (A a)}, fun b =>
         let ⟨a, ba⟩ := βα b
         ⟨⟨a, b, ba⟩, ba⟩,
         fun ⟨a, b, ba⟩ => ⟨b, ba⟩⟩⟩
@@ -895,7 +895,7 @@ theorem mk_mem_iff {x y : PSet} : mk x ∈ mk y ↔ x ∈ y :=
 #print ZFSet.toSet /-
 /-- Convert a ZFC set into a `set` of ZFC sets -/
 def toSet (u : ZFSet.{u}) : Set ZFSet.{u} :=
-  { x | x ∈ u }
+  {x | x ∈ u}
 #align Set.to_set ZFSet.toSet
 -/
 
@@ -1217,7 +1217,7 @@ instance : Sep ZFSet ZFSet :=
 
 #print ZFSet.mem_sep /-
 @[simp]
-theorem mem_sep {p : ZFSet.{u} → Prop} {x y : ZFSet.{u}} : y ∈ { y ∈ x | p y } ↔ y ∈ x ∧ p y :=
+theorem mem_sep {p : ZFSet.{u} → Prop} {x y : ZFSet.{u}} : y ∈ {y ∈ x | p y} ↔ y ∈ x ∧ p y :=
   Quotient.induction_on₂ x y fun ⟨α, A⟩ y =>
     ⟨fun ⟨⟨a, pa⟩, h⟩ => ⟨⟨a, h⟩, by rwa [@Quotient.sound PSet _ _ _ h]⟩, fun ⟨⟨a, h⟩, pa⟩ =>
       ⟨⟨a, by rw [mk_func] at h ; rwa [mk_func, ← ZFSet.sound h]⟩, h⟩⟩
@@ -1226,8 +1226,8 @@ theorem mem_sep {p : ZFSet.{u} → Prop} {x y : ZFSet.{u}} : y ∈ { y ∈ x | p
 
 #print ZFSet.toSet_sep /-
 @[simp]
-theorem toSet_sep (a : ZFSet) (p : ZFSet → Prop) : { x ∈ a | p x }.toSet = { x ∈ a.toSet | p x } :=
-  by ext; simp
+theorem toSet_sep (a : ZFSet) (p : ZFSet → Prop) : {x ∈ a | p x}.toSet = {x ∈ a.toSet | p x} := by
+  ext; simp
 #align Set.to_set_sep ZFSet.toSet_sep
 -/
 
@@ -1237,12 +1237,12 @@ def powerset : ZFSet → ZFSet :=
   Resp.eval 1
     ⟨powerset, fun ⟨α, A⟩ ⟨β, B⟩ ⟨αβ, βα⟩ =>
       ⟨fun p =>
-        ⟨{ b | ∃ a, p a ∧ Equiv (A a) (B b) }, fun ⟨a, pa⟩ =>
+        ⟨{b | ∃ a, p a ∧ Equiv (A a) (B b)}, fun ⟨a, pa⟩ =>
           let ⟨b, ab⟩ := αβ a
           ⟨⟨b, a, pa, ab⟩, ab⟩,
           fun ⟨b, a, pa, ab⟩ => ⟨⟨a, pa⟩, ab⟩⟩,
         fun q =>
-        ⟨{ a | ∃ b, q b ∧ Equiv (A a) (B b) }, fun ⟨a, b, qb, ab⟩ => ⟨⟨b, qb⟩, ab⟩, fun ⟨b, qb⟩ =>
+        ⟨{a | ∃ b, q b ∧ Equiv (A a) (B b)}, fun ⟨a, b, qb, ab⟩ => ⟨⟨b, qb⟩, ab⟩, fun ⟨b, qb⟩ =>
           let ⟨a, ab⟩ := βα b
           ⟨⟨a, b, qb, ab⟩, ab⟩⟩⟩⟩
 #align Set.powerset ZFSet.powerset
@@ -1294,7 +1294,7 @@ prefix:110 "⋃₀ " => ZFSet.sUnion
 /-- The intersection operator, the collection of elements in all of the elements of a ZFC set. We
 special-case `⋂₀ ∅ = ∅`. -/
 noncomputable def sInter (x : ZFSet) : ZFSet := by
-  classical exact dite x.nonempty (fun h => { y ∈ h.some | ∀ z ∈ x, y ∈ z }) fun _ => ∅
+  classical exact dite x.nonempty (fun h => {y ∈ h.some | ∀ z ∈ x, y ∈ z}) fun _ => ∅
 #align Set.sInter ZFSet.sInter
 -/
 
@@ -1416,14 +1416,14 @@ protected def union (x y : ZFSet.{u}) : ZFSet.{u} :=
 #print ZFSet.inter /-
 /-- The binary intersection operation -/
 protected def inter (x y : ZFSet.{u}) : ZFSet.{u} :=
-  { z ∈ x | z ∈ y }
+  {z ∈ x | z ∈ y}
 #align Set.inter ZFSet.inter
 -/
 
 #print ZFSet.diff /-
 /-- The set difference operation -/
 protected def diff (x y : ZFSet.{u}) : ZFSet.{u} :=
-  { z ∈ x | z ∉ y }
+  {z ∈ x | z ∉ y}
 #align Set.diff ZFSet.diff
 -/
 
@@ -1448,7 +1448,7 @@ theorem toSet_inter (x y : ZFSet.{u}) : (x ∩ y).toSet = x.toSet ∩ y.toSet :=
 
 @[simp]
 theorem toSet_sdiff (x y : ZFSet.{u}) : (x \ y).toSet = x.toSet \ y.toSet := by
-  change { z ∈ x | z ∉ y }.toSet = _; ext; simp
+  change {z ∈ x | z ∉ y}.toSet = _; ext; simp
 #align Set.to_set_sdiff ZFSet.toSet_sdiff
 
 #print ZFSet.mem_union /-
@@ -1617,7 +1617,7 @@ theorem toSet_pair (x y : ZFSet.{u}) : (pair x y).toSet = {{x}, {x, y}} := by si
 #print ZFSet.pairSep /-
 /-- A subset of pairs `{(a, b) ∈ x × y | p a b}` -/
 def pairSep (p : ZFSet.{u} → ZFSet.{u} → Prop) (x y : ZFSet.{u}) : ZFSet.{u} :=
-  { z ∈ powerset (powerset (x ∪ y)) | ∃ a ∈ x, ∃ b ∈ y, z = pair a b ∧ p a b }
+  {z ∈ powerset (powerset (x ∪ y)) | ∃ a ∈ x, ∃ b ∈ y, z = pair a b ∧ p a b}
 #align Set.pair_sep ZFSet.pairSep
 -/
 
@@ -1699,7 +1699,7 @@ def IsFunc (x y f : ZFSet.{u}) : Prop :=
 #print ZFSet.funs /-
 /-- `funs x y` is `y ^ x`, the set of all set functions `x → y` -/
 def funs (x y : ZFSet.{u}) : ZFSet.{u} :=
-  { f ∈ powerset (prod x y) | IsFunc x y f }
+  {f ∈ powerset (prod x y) | IsFunc x y f}
 #align Set.funs ZFSet.funs
 -/
 
@@ -1804,8 +1804,8 @@ end Hereditarily
 
 end ZFSet
 
-/- ./././Mathport/Syntax/Translate/Command.lean:42:9: unsupported derive handler has_sep[has_sep] Set[Set] -/
-/- ./././Mathport/Syntax/Translate/Command.lean:42:9: unsupported derive handler has_insert[has_insert] Set[Set] -/
+/- ./././Mathport/Syntax/Translate/Command.lean:43:9: unsupported derive handler has_sep[has_sep] Set[Set] -/
+/- ./././Mathport/Syntax/Translate/Command.lean:43:9: unsupported derive handler has_insert[has_insert] Set[Set] -/
 #print Class /-
 /-- The collection of all classes.
 
@@ -1815,9 +1815,9 @@ state that `x : Set` belongs to `A : Class` is to write `A x`. -/
 def Class :=
   Set ZFSet
 deriving HasSubset,
-  «./././Mathport/Syntax/Translate/Command.lean:42:9: unsupported derive handler has_sep[has_sep] Set[Set]»,
+  «./././Mathport/Syntax/Translate/Command.lean:43:9: unsupported derive handler has_sep[has_sep] Set[Set]»,
   EmptyCollection, Inhabited,
-  «./././Mathport/Syntax/Translate/Command.lean:42:9: unsupported derive handler has_insert[has_insert] Set[Set]»,
+  «./././Mathport/Syntax/Translate/Command.lean:43:9: unsupported derive handler has_insert[has_insert] Set[Set]»,
   Union, Inter, HasCompl, SDiff
 #align Class Class
 -/
@@ -1840,7 +1840,7 @@ theorem ext_iff {x y : Class.{u}} : x = y ↔ ∀ z, x z ↔ y z :=
 #print Class.ofSet /-
 /-- Coerce a ZFC set into a class -/
 def ofSet (x : ZFSet.{u}) : Class.{u} :=
-  { y | y ∈ x }
+  {y | y ∈ x}
 #align Class.of_Set Class.ofSet
 -/
 
@@ -1961,7 +1961,7 @@ theorem univ_not_mem_univ : univ ∉ univ :=
 #print Class.congToClass /-
 /-- Convert a conglomerate (a collection of classes) into a class -/
 def congToClass (x : Set Class.{u}) : Class.{u} :=
-  { y | ↑y ∈ x }
+  {y | ↑y ∈ x}
 #align Class.Cong_to_Class Class.congToClass
 -/
 
@@ -1974,7 +1974,7 @@ theorem congToClass_empty : congToClass ∅ = ∅ := by ext; simp [Cong_to_Class
 #print Class.classToCong /-
 /-- Convert a class into a conglomerate (a collection of classes) -/
 def classToCong (x : Class.{u}) : Set Class.{u} :=
-  { y | y ∈ x }
+  {y | y ∈ x}
 #align Class.Class_to_Cong Class.classToCong
 -/
 
@@ -2049,8 +2049,7 @@ theorem coe_subset (x y : ZFSet.{u}) : (x : Class.{u}) ⊆ y ↔ x ⊆ y :=
 
 #print Class.coe_sep /-
 @[simp, norm_cast]
-theorem coe_sep (p : Class.{u}) (x : ZFSet.{u}) :
-    (↑({ y ∈ x | p y }) : Class.{u}) = { y ∈ x | p y } :=
+theorem coe_sep (p : Class.{u}) (x : ZFSet.{u}) : (↑({y ∈ x | p y}) : Class.{u}) = {y ∈ x | p y} :=
   ext fun y => ZFSet.mem_sep
 #align Class.coe_sep Class.coe_sep
 -/
@@ -2208,7 +2207,7 @@ theorem eq_univ_of_powerset_subset {A : Class} (hA : powerset A ⊆ A) : A = uni
 #print Class.iota /-
 /-- The definite description operator, which is `{x}` if `{y | A y} = {x}` and `∅` otherwise. -/
 def iota (A : Class) : Class :=
-  ⋃₀ { x | ∀ y, A y ↔ y = x }
+  ⋃₀ {x | ∀ y, A y ↔ y = x}
 #align Class.iota Class.iota
 -/
 
Diff
@@ -375,7 +375,7 @@ private theorem mem_wf_aux : ∀ {x y : PSet.{u}}, Equiv x y → Acc (· ∈ ·)
       rintro ⟨γ, C⟩ ⟨b, hc⟩
       cases' H.exists_right b with a ha
       have H := ha.trans hc.symm
-      rw [mk_func] at H
+      rw [mk_func] at H 
       exact mem_wf_aux H⟩
 
 #print PSet.mem_wf /-
@@ -575,7 +575,7 @@ theorem mem_powerset : ∀ {x y : PSet}, y ∈ powerset x ↔ y ⊆ x
 #print PSet.sUnion /-
 /-- The pre-set union operator -/
 def sUnion (a : PSet) : PSet :=
-  ⟨Σx, (a.Func x).type, fun ⟨x, y⟩ => (a.Func x).Func y⟩
+  ⟨Σ x, (a.Func x).type, fun ⟨x, y⟩ => (a.Func x).Func y⟩
 #align pSet.sUnion PSet.sUnion
 -/
 
@@ -588,8 +588,8 @@ theorem mem_sUnion : ∀ {x y : PSet.{u}}, y ∈ ⋃₀ x ↔ ∃ z ∈ x, y ∈
   | ⟨α, A⟩, y =>
     ⟨fun ⟨⟨a, c⟩, (e : Equiv y ((A a).Func c))⟩ =>
       have : Func (A a) c ∈ mk (A a).type (A a).Func := Mem.mk (A a).Func c
-      ⟨_, Mem.mk _ _, (Mem.congr_left e).2 (by rwa [eta] at this)⟩,
-      fun ⟨⟨β, B⟩, ⟨a, (e : Equiv (mk β B) (A a))⟩, ⟨b, yb⟩⟩ => by rw [← eta (A a)] at e;
+      ⟨_, Mem.mk _ _, (Mem.congr_left e).2 (by rwa [eta] at this )⟩,
+      fun ⟨⟨β, B⟩, ⟨a, (e : Equiv (mk β B) (A a))⟩, ⟨b, yb⟩⟩ => by rw [← eta (A a)] at e ;
       exact
         let ⟨βt, tβ⟩ := e
         let ⟨c, bc⟩ := βt b
@@ -1220,7 +1220,7 @@ instance : Sep ZFSet ZFSet :=
 theorem mem_sep {p : ZFSet.{u} → Prop} {x y : ZFSet.{u}} : y ∈ { y ∈ x | p y } ↔ y ∈ x ∧ p y :=
   Quotient.induction_on₂ x y fun ⟨α, A⟩ y =>
     ⟨fun ⟨⟨a, pa⟩, h⟩ => ⟨⟨a, h⟩, by rwa [@Quotient.sound PSet _ _ _ h]⟩, fun ⟨⟨a, h⟩, pa⟩ =>
-      ⟨⟨a, by rw [mk_func] at h; rwa [mk_func, ← ZFSet.sound h]⟩, h⟩⟩
+      ⟨⟨a, by rw [mk_func] at h ; rwa [mk_func, ← ZFSet.sound h]⟩, h⟩⟩
 #align Set.mem_sep ZFSet.mem_sep
 -/
 
@@ -1263,11 +1263,11 @@ theorem sUnion_lem {α β : Type u} (A : α → PSet) (B : β → PSet) (αβ :
     let ⟨b, hb⟩ := αβ a
     induction' ea : A a with γ Γ
     induction' eb : B b with δ Δ
-    rw [ea, eb] at hb
+    rw [ea, eb] at hb 
     cases' hb with γδ δγ
     exact
       let c : type (A a) := c
-      let ⟨d, hd⟩ := γδ (by rwa [ea] at c)
+      let ⟨d, hd⟩ := γδ (by rwa [ea] at c )
       have : PSet.Equiv ((A a).Func c) ((B b).Func (Eq.ndrec d (Eq.symm eb))) :=
         match A a, B b, ea, eb, c, d, hd with
         | _, _, rfl, rfl, x, y, hd => hd
@@ -1394,7 +1394,7 @@ theorem toSet_sInter {x : ZFSet.{u}} (h : x.Nonempty) : (⋂₀ x).toSet = ⋂
 theorem singleton_injective : Function.Injective (@singleton ZFSet ZFSet _) := fun x y H =>
   by
   let this := congr_arg sUnion H
-  rwa [sUnion_singleton, sUnion_singleton] at this
+  rwa [sUnion_singleton, sUnion_singleton] at this 
 #align Set.singleton_injective ZFSet.singleton_injective
 -/
 
@@ -1630,14 +1630,14 @@ theorem mem_pairSep {p} {x y z : ZFSet.{u}} :
   simp only [mem_powerset, subset_def, mem_union, pair, mem_pair]
   rintro u (rfl | rfl) v <;> simp only [mem_singleton, mem_pair]
   · rintro rfl; exact Or.inl ax
-  · rintro (rfl | rfl) <;> [left;right] <;> assumption
+  · rintro (rfl | rfl) <;> [left; right] <;> assumption
 #align Set.mem_pair_sep ZFSet.mem_pairSep
 
 #print ZFSet.pair_injective /-
 theorem pair_injective : Function.Injective2 pair := fun x x' y y' H =>
   by
   have ae := ext_iff.1 H
-  simp only [pair, mem_pair] at ae
+  simp only [pair, mem_pair] at ae 
   obtain rfl : x = x' := by
     cases' (ae {x}).1 (by simp) with h h
     · exact singleton_injective h
@@ -1813,7 +1813,8 @@ We define `Class` as `set Set`, as this allows us to get many instances automati
 practice, we treat it as (the definitionally equal) `Set → Prop`. This means, the preferred way to
 state that `x : Set` belongs to `A : Class` is to write `A x`. -/
 def Class :=
-  Set ZFSet deriving HasSubset,
+  Set ZFSet
+deriving HasSubset,
   «./././Mathport/Syntax/Translate/Command.lean:42:9: unsupported derive handler has_sep[has_sep] Set[Set]»,
   EmptyCollection, Inhabited,
   «./././Mathport/Syntax/Translate/Command.lean:42:9: unsupported derive handler has_insert[has_insert] Set[Set]»,
@@ -2021,7 +2022,7 @@ theorem ofSet.inj {x y : ZFSet.{u}} (h : (x : Class.{u}) = y) : x = y :=
 #print Class.toSet_of_ZFSet /-
 @[simp]
 theorem toSet_of_ZFSet (A : Class.{u}) (x : ZFSet.{u}) : ToSet A x ↔ A x :=
-  ⟨fun ⟨y, yx, py⟩ => by rwa [of_Set.inj yx] at py, fun px => ⟨x, rfl, px⟩⟩
+  ⟨fun ⟨y, yx, py⟩ => by rwa [of_Set.inj yx] at py , fun px => ⟨x, rfl, px⟩⟩
 #align Class.to_Set_of_Set Class.toSet_of_ZFSet
 -/
 
Diff
@@ -184,34 +184,16 @@ def Equiv (x y : PSet) : Prop :=
 #align pSet.equiv PSet.Equiv
 -/
 
-/- warning: pSet.equiv_iff -> PSet.equiv_iff is a dubious translation:
-lean 3 declaration is
-  forall {x : PSet.{u1}} {y : PSet.{u2}}, Iff (PSet.Equiv.{u1, u2} x y) (And (forall (i : PSet.Type.{u1} x), Exists.{succ u2} (PSet.Type.{u2} y) (fun (j : PSet.Type.{u2} y) => PSet.Equiv.{u1, u2} (PSet.Func.{u1} x i) (PSet.Func.{u2} y j))) (forall (j : PSet.Type.{u2} y), Exists.{succ u1} (PSet.Type.{u1} x) (fun (i : PSet.Type.{u1} x) => PSet.Equiv.{u1, u2} (PSet.Func.{u1} x i) (PSet.Func.{u2} y j))))
-but is expected to have type
-  forall {x : PSet.{u2}} {y : PSet.{u1}}, Iff (PSet.Equiv.{u2, u1} x y) (And (forall (i : PSet.Type.{u2} x), Exists.{succ u1} (PSet.Type.{u1} y) (fun (j : PSet.Type.{u1} y) => PSet.Equiv.{u2, u1} (PSet.Func.{u2} x i) (PSet.Func.{u1} y j))) (forall (j : PSet.Type.{u1} y), Exists.{succ u2} (PSet.Type.{u2} x) (fun (i : PSet.Type.{u2} x) => PSet.Equiv.{u2, u1} (PSet.Func.{u2} x i) (PSet.Func.{u1} y j))))
-Case conversion may be inaccurate. Consider using '#align pSet.equiv_iff PSet.equiv_iffₓ'. -/
 theorem equiv_iff :
     ∀ {x y : PSet},
       Equiv x y ↔ (∀ i, ∃ j, Equiv (x.Func i) (y.Func j)) ∧ ∀ j, ∃ i, Equiv (x.Func i) (y.Func j)
   | ⟨α, A⟩, ⟨β, B⟩ => Iff.rfl
 #align pSet.equiv_iff PSet.equiv_iff
 
-/- warning: pSet.equiv.exists_left -> PSet.Equiv.exists_left is a dubious translation:
-lean 3 declaration is
-  forall {x : PSet.{u1}} {y : PSet.{u2}}, (PSet.Equiv.{u1, u2} x y) -> (forall (i : PSet.Type.{u1} x), Exists.{succ u2} (PSet.Type.{u2} y) (fun (j : PSet.Type.{u2} y) => PSet.Equiv.{u1, u2} (PSet.Func.{u1} x i) (PSet.Func.{u2} y j)))
-but is expected to have type
-  forall {x : PSet.{u2}} {y : PSet.{u1}}, (PSet.Equiv.{u2, u1} x y) -> (forall (i : PSet.Type.{u2} x), Exists.{succ u1} (PSet.Type.{u1} y) (fun (j : PSet.Type.{u1} y) => PSet.Equiv.{u2, u1} (PSet.Func.{u2} x i) (PSet.Func.{u1} y j)))
-Case conversion may be inaccurate. Consider using '#align pSet.equiv.exists_left PSet.Equiv.exists_leftₓ'. -/
 theorem Equiv.exists_left {x y : PSet} (h : Equiv x y) : ∀ i, ∃ j, Equiv (x.Func i) (y.Func j) :=
   (equiv_iff.1 h).1
 #align pSet.equiv.exists_left PSet.Equiv.exists_left
 
-/- warning: pSet.equiv.exists_right -> PSet.Equiv.exists_right is a dubious translation:
-lean 3 declaration is
-  forall {x : PSet.{u1}} {y : PSet.{u2}}, (PSet.Equiv.{u1, u2} x y) -> (forall (j : PSet.Type.{u2} y), Exists.{succ u1} (PSet.Type.{u1} x) (fun (i : PSet.Type.{u1} x) => PSet.Equiv.{u1, u2} (PSet.Func.{u1} x i) (PSet.Func.{u2} y j)))
-but is expected to have type
-  forall {x : PSet.{u2}} {y : PSet.{u1}}, (PSet.Equiv.{u2, u1} x y) -> (forall (j : PSet.Type.{u1} y), Exists.{succ u2} (PSet.Type.{u2} x) (fun (i : PSet.Type.{u2} x) => PSet.Equiv.{u2, u1} (PSet.Func.{u2} x i) (PSet.Func.{u1} y j)))
-Case conversion may be inaccurate. Consider using '#align pSet.equiv.exists_right PSet.Equiv.exists_rightₓ'. -/
 theorem Equiv.exists_right {x y : PSet} (h : Equiv x y) : ∀ j, ∃ i, Equiv (x.Func i) (y.Func j) :=
   (equiv_iff.1 h).2
 #align pSet.equiv.exists_right PSet.Equiv.exists_right
@@ -229,12 +211,6 @@ protected theorem Equiv.rfl : ∀ {x}, Equiv x x :=
 #align pSet.equiv.rfl PSet.Equiv.rfl
 -/
 
-/- warning: pSet.equiv.euc -> PSet.Equiv.euc is a dubious translation:
-lean 3 declaration is
-  forall {x : PSet.{u1}} {y : PSet.{u2}} {z : PSet.{u3}}, (PSet.Equiv.{u1, u2} x y) -> (PSet.Equiv.{u3, u2} z y) -> (PSet.Equiv.{u1, u3} x z)
-but is expected to have type
-  forall {x : PSet.{u3}} {y : PSet.{u2}} {z : PSet.{u1}}, (PSet.Equiv.{u3, u2} x y) -> (PSet.Equiv.{u1, u2} z y) -> (PSet.Equiv.{u3, u1} x z)
-Case conversion may be inaccurate. Consider using '#align pSet.equiv.euc PSet.Equiv.eucₓ'. -/
 protected theorem Equiv.euc {x} : ∀ {y z}, Equiv x y → Equiv z y → Equiv x z :=
   PSet.recOn x fun α A IH y =>
     PSet.casesOn y fun β B ⟨γ, Γ⟩ ⟨αβ, βα⟩ ⟨γβ, βγ⟩ =>
@@ -248,44 +224,20 @@ protected theorem Equiv.euc {x} : ∀ {y z}, Equiv x y → Equiv z y → Equiv x
         ⟨a, IH a ba cb⟩⟩
 #align pSet.equiv.euc PSet.Equiv.euc
 
-/- warning: pSet.equiv.symm -> PSet.Equiv.symm is a dubious translation:
-lean 3 declaration is
-  forall {x : PSet.{u1}} {y : PSet.{u2}}, (PSet.Equiv.{u1, u2} x y) -> (PSet.Equiv.{u2, u1} y x)
-but is expected to have type
-  forall {x : PSet.{u2}} {y : PSet.{u1}}, (PSet.Equiv.{u2, u1} x y) -> (PSet.Equiv.{u1, u2} y x)
-Case conversion may be inaccurate. Consider using '#align pSet.equiv.symm PSet.Equiv.symmₓ'. -/
 @[symm]
 protected theorem Equiv.symm {x y} : Equiv x y → Equiv y x :=
   (Equiv.refl y).euc
 #align pSet.equiv.symm PSet.Equiv.symm
 
-/- warning: pSet.equiv.comm -> PSet.Equiv.comm is a dubious translation:
-lean 3 declaration is
-  forall {x : PSet.{u1}} {y : PSet.{u2}}, Iff (PSet.Equiv.{u1, u2} x y) (PSet.Equiv.{u2, u1} y x)
-but is expected to have type
-  forall {x : PSet.{u2}} {y : PSet.{u1}}, Iff (PSet.Equiv.{u2, u1} x y) (PSet.Equiv.{u1, u2} y x)
-Case conversion may be inaccurate. Consider using '#align pSet.equiv.comm PSet.Equiv.commₓ'. -/
 protected theorem Equiv.comm {x y} : Equiv x y ↔ Equiv y x :=
   ⟨Equiv.symm, Equiv.symm⟩
 #align pSet.equiv.comm PSet.Equiv.comm
 
-/- warning: pSet.equiv.trans -> PSet.Equiv.trans is a dubious translation:
-lean 3 declaration is
-  forall {x : PSet.{u1}} {y : PSet.{u2}} {z : PSet.{u3}}, (PSet.Equiv.{u1, u2} x y) -> (PSet.Equiv.{u2, u3} y z) -> (PSet.Equiv.{u1, u3} x z)
-but is expected to have type
-  forall {x : PSet.{u3}} {y : PSet.{u2}} {z : PSet.{u1}}, (PSet.Equiv.{u3, u2} x y) -> (PSet.Equiv.{u2, u1} y z) -> (PSet.Equiv.{u3, u1} x z)
-Case conversion may be inaccurate. Consider using '#align pSet.equiv.trans PSet.Equiv.transₓ'. -/
 @[trans]
 protected theorem Equiv.trans {x y z} (h1 : Equiv x y) (h2 : Equiv y z) : Equiv x z :=
   h1.euc h2.symm
 #align pSet.equiv.trans PSet.Equiv.trans
 
-/- warning: pSet.equiv_of_is_empty -> PSet.equiv_of_isEmpty is a dubious translation:
-lean 3 declaration is
-  forall (x : PSet.{u1}) (y : PSet.{u2}) [_inst_1 : IsEmpty.{succ u1} (PSet.Type.{u1} x)] [_inst_2 : IsEmpty.{succ u2} (PSet.Type.{u2} y)], PSet.Equiv.{u1, u2} x y
-but is expected to have type
-  forall (x : PSet.{u2}) (y : PSet.{u1}) [_inst_1 : IsEmpty.{succ u2} (PSet.Type.{u2} x)] [_inst_2 : IsEmpty.{succ u1} (PSet.Type.{u1} y)], PSet.Equiv.{u2, u1} x y
-Case conversion may be inaccurate. Consider using '#align pSet.equiv_of_is_empty PSet.equiv_of_isEmptyₓ'. -/
 protected theorem equiv_of_isEmpty (x y : PSet) [IsEmpty x.type] [IsEmpty y.type] : Equiv x y :=
   equiv_iff.2 <| by simp
 #align pSet.equiv_of_is_empty PSet.equiv_of_isEmpty
@@ -553,12 +505,6 @@ theorem not_nonempty_empty : ¬PSet.Nonempty ∅ := by simp [PSet.Nonempty]
 #align pSet.not_nonempty_empty PSet.not_nonempty_empty
 -/
 
-/- warning: pSet.equiv_empty -> PSet.equiv_empty is a dubious translation:
-lean 3 declaration is
-  forall (x : PSet.{u1}) [_inst_1 : IsEmpty.{succ u1} (PSet.Type.{u1} x)], PSet.Equiv.{u1, u2} x (EmptyCollection.emptyCollection.{succ u2} PSet.{u2} PSet.hasEmptyc.{u2})
-but is expected to have type
-  forall (x : PSet.{u2}) [_inst_1 : IsEmpty.{succ u2} (PSet.Type.{u2} x)], PSet.Equiv.{u2, u1} x (EmptyCollection.emptyCollection.{succ u1} PSet.{u1} PSet.instEmptyCollectionPSet.{u1})
-Case conversion may be inaccurate. Consider using '#align pSet.equiv_empty PSet.equiv_emptyₓ'. -/
 protected theorem equiv_empty (x : PSet) [IsEmpty x.type] : Equiv x ∅ :=
   PSet.equiv_of_isEmpty x _
 #align pSet.equiv_empty PSet.equiv_empty
@@ -636,12 +582,6 @@ def sUnion (a : PSet) : PSet :=
 -- mathport name: pSet.sUnion
 prefix:110 "⋃₀ " => PSet.sUnion
 
-/- warning: pSet.mem_sUnion -> PSet.mem_sUnion is a dubious translation:
-lean 3 declaration is
-  forall {x : PSet.{u1}} {y : PSet.{u1}}, Iff (Membership.Mem.{succ u1, succ u1} PSet.{u1} PSet.{u1} PSet.hasMem.{u1} y (PSet.sUnion.{u1} x)) (Exists.{succ (succ u1)} PSet.{u1} (fun (z : PSet.{u1}) => Exists.{0} (Membership.Mem.{succ u1, succ u1} PSet.{u1} PSet.{u1} PSet.hasMem.{u1} z x) (fun (H : Membership.Mem.{succ u1, succ u1} PSet.{u1} PSet.{u1} PSet.hasMem.{u1} z x) => Membership.Mem.{succ u1, succ u1} PSet.{u1} PSet.{u1} PSet.hasMem.{u1} y z)))
-but is expected to have type
-  forall {x : PSet.{u1}} {y : PSet.{u1}}, Iff (Membership.mem.{succ u1, succ u1} PSet.{u1} PSet.{u1} PSet.instMembershipPSetPSet.{u1} y (PSet.sUnion.{u1} x)) (Exists.{succ (succ u1)} PSet.{u1} (fun (z : PSet.{u1}) => And (Membership.mem.{succ u1, succ u1} PSet.{u1} PSet.{u1} PSet.instMembershipPSetPSet.{u1} z x) (Membership.mem.{succ u1, succ u1} PSet.{u1} PSet.{u1} PSet.instMembershipPSetPSet.{u1} y z)))
-Case conversion may be inaccurate. Consider using '#align pSet.mem_sUnion PSet.mem_sUnionₓ'. -/
 /- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
 @[simp]
 theorem mem_sUnion : ∀ {x y : PSet.{u}}, y ∈ ⋃₀ x ↔ ∃ z ∈ x, y ∈ z
@@ -671,12 +611,6 @@ def image (f : PSet.{u} → PSet.{u}) (x : PSet.{u}) : PSet :=
 #align pSet.image PSet.image
 -/
 
-/- warning: pSet.mem_image -> PSet.mem_image is a dubious translation:
-lean 3 declaration is
-  forall {f : PSet.{u1} -> PSet.{u1}}, (forall {x : PSet.{u1}} {y : PSet.{u1}}, (PSet.Equiv.{u1, u1} x y) -> (PSet.Equiv.{u1, u1} (f x) (f y))) -> (forall {x : PSet.{u1}} {y : PSet.{u1}}, Iff (Membership.Mem.{succ u1, succ u1} PSet.{u1} PSet.{u1} PSet.hasMem.{u1} y (PSet.image.{u1} f x)) (Exists.{succ (succ u1)} PSet.{u1} (fun (z : PSet.{u1}) => Exists.{0} (Membership.Mem.{succ u1, succ u1} PSet.{u1} PSet.{u1} PSet.hasMem.{u1} z x) (fun (H : Membership.Mem.{succ u1, succ u1} PSet.{u1} PSet.{u1} PSet.hasMem.{u1} z x) => PSet.Equiv.{u1, u1} y (f z)))))
-but is expected to have type
-  forall {f : PSet.{u1} -> PSet.{u1}}, (forall (x : PSet.{u1}) (y : PSet.{u1}), (PSet.Equiv.{u1, u1} x y) -> (PSet.Equiv.{u1, u1} (f x) (f y))) -> (forall {x : PSet.{u1}} {y : PSet.{u1}}, Iff (Membership.mem.{succ u1, succ u1} PSet.{u1} PSet.{u1} PSet.instMembershipPSetPSet.{u1} y (PSet.image.{u1} f x)) (Exists.{succ (succ u1)} PSet.{u1} (fun (z : PSet.{u1}) => And (Membership.mem.{succ u1, succ u1} PSet.{u1} PSet.{u1} PSet.instMembershipPSetPSet.{u1} z x) (PSet.Equiv.{u1, u1} y (f z)))))
-Case conversion may be inaccurate. Consider using '#align pSet.mem_image PSet.mem_imageₓ'. -/
 theorem mem_image {f : PSet.{u} → PSet.{u}} (H : ∀ {x y}, Equiv x y → Equiv (f x) (f y)) :
     ∀ {x y : PSet.{u}}, y ∈ image f x ↔ ∃ z ∈ x, Equiv y (f z)
   | ⟨α, A⟩, y =>
@@ -1367,12 +1301,6 @@ noncomputable def sInter (x : ZFSet) : ZFSet := by
 -- mathport name: Set.sInter
 prefix:110 "⋂₀ " => ZFSet.sInter
 
-/- warning: Set.mem_sUnion -> ZFSet.mem_sUnion is a dubious translation:
-lean 3 declaration is
-  forall {x : ZFSet.{u1}} {y : ZFSet.{u1}}, Iff (Membership.Mem.{succ u1, succ u1} ZFSet.{u1} ZFSet.{u1} ZFSet.hasMem.{u1} y (ZFSet.sUnion.{u1} x)) (Exists.{succ (succ u1)} ZFSet.{u1} (fun (z : ZFSet.{u1}) => Exists.{0} (Membership.Mem.{succ u1, succ u1} ZFSet.{u1} ZFSet.{u1} ZFSet.hasMem.{u1} z x) (fun (H : Membership.Mem.{succ u1, succ u1} ZFSet.{u1} ZFSet.{u1} ZFSet.hasMem.{u1} z x) => Membership.Mem.{succ u1, succ u1} ZFSet.{u1} ZFSet.{u1} ZFSet.hasMem.{u1} y z)))
-but is expected to have type
-  forall {x : ZFSet.{u1}} {y : ZFSet.{u1}}, Iff (Membership.mem.{succ u1, succ u1} ZFSet.{u1} ZFSet.{u1} ZFSet.instMembershipZFSetZFSet.{u1} y (ZFSet.sUnion.{u1} x)) (Exists.{succ (succ u1)} ZFSet.{u1} (fun (z : ZFSet.{u1}) => And (Membership.mem.{succ u1, succ u1} ZFSet.{u1} ZFSet.{u1} ZFSet.instMembershipZFSetZFSet.{u1} z x) (Membership.mem.{succ u1, succ u1} ZFSet.{u1} ZFSet.{u1} ZFSet.instMembershipZFSetZFSet.{u1} y z)))
-Case conversion may be inaccurate. Consider using '#align Set.mem_sUnion ZFSet.mem_sUnionₓ'. -/
 /- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
 @[simp]
 theorem mem_sUnion {x y : ZFSet.{u}} : y ∈ ⋃₀ x ↔ ∃ z ∈ x, y ∈ z :=
@@ -1508,34 +1436,16 @@ instance : Inter ZFSet :=
 instance : SDiff ZFSet :=
   ⟨ZFSet.diff⟩
 
-/- warning: Set.to_set_union -> ZFSet.toSet_union is a dubious translation:
-lean 3 declaration is
-  forall (x : ZFSet.{u1}) (y : ZFSet.{u1}), Eq.{succ (succ u1)} (Set.{succ u1} ZFSet.{u1}) (ZFSet.toSet.{u1} (Union.union.{succ u1} ZFSet.{u1} ZFSet.hasUnion.{u1} x y)) (Union.union.{succ u1} (Set.{succ u1} ZFSet.{u1}) (Set.hasUnion.{succ u1} ZFSet.{u1}) (ZFSet.toSet.{u1} x) (ZFSet.toSet.{u1} y))
-but is expected to have type
-  forall (x : ZFSet.{u1}) (y : ZFSet.{u1}), Eq.{succ (succ u1)} (Set.{succ u1} ZFSet.{u1}) (ZFSet.toSet.{u1} (Union.union.{succ u1} ZFSet.{u1} ZFSet.instUnionZFSet.{u1} x y)) (Union.union.{succ u1} (Set.{succ u1} ZFSet.{u1}) (Set.instUnionSet.{succ u1} ZFSet.{u1}) (ZFSet.toSet.{u1} x) (ZFSet.toSet.{u1} y))
-Case conversion may be inaccurate. Consider using '#align Set.to_set_union ZFSet.toSet_unionₓ'. -/
 @[simp]
 theorem toSet_union (x y : ZFSet.{u}) : (x ∪ y).toSet = x.toSet ∪ y.toSet := by unfold Union.union;
   rw [ZFSet.union]; simp
 #align Set.to_set_union ZFSet.toSet_union
 
-/- warning: Set.to_set_inter -> ZFSet.toSet_inter is a dubious translation:
-lean 3 declaration is
-  forall (x : ZFSet.{u1}) (y : ZFSet.{u1}), Eq.{succ (succ u1)} (Set.{succ u1} ZFSet.{u1}) (ZFSet.toSet.{u1} (Inter.inter.{succ u1} ZFSet.{u1} ZFSet.hasInter.{u1} x y)) (Inter.inter.{succ u1} (Set.{succ u1} ZFSet.{u1}) (Set.hasInter.{succ u1} ZFSet.{u1}) (ZFSet.toSet.{u1} x) (ZFSet.toSet.{u1} y))
-but is expected to have type
-  forall (x : ZFSet.{u1}) (y : ZFSet.{u1}), Eq.{succ (succ u1)} (Set.{succ u1} ZFSet.{u1}) (ZFSet.toSet.{u1} (Inter.inter.{succ u1} ZFSet.{u1} ZFSet.instInterZFSet.{u1} x y)) (Inter.inter.{succ u1} (Set.{succ u1} ZFSet.{u1}) (Set.instInterSet.{succ u1} ZFSet.{u1}) (ZFSet.toSet.{u1} x) (ZFSet.toSet.{u1} y))
-Case conversion may be inaccurate. Consider using '#align Set.to_set_inter ZFSet.toSet_interₓ'. -/
 @[simp]
 theorem toSet_inter (x y : ZFSet.{u}) : (x ∩ y).toSet = x.toSet ∩ y.toSet := by unfold Inter.inter;
   rw [ZFSet.inter]; ext; simp
 #align Set.to_set_inter ZFSet.toSet_inter
 
-/- warning: Set.to_set_sdiff -> ZFSet.toSet_sdiff is a dubious translation:
-lean 3 declaration is
-  forall (x : ZFSet.{u1}) (y : ZFSet.{u1}), Eq.{succ (succ u1)} (Set.{succ u1} ZFSet.{u1}) (ZFSet.toSet.{u1} (SDiff.sdiff.{succ u1} ZFSet.{u1} ZFSet.hasSdiff.{u1} x y)) (SDiff.sdiff.{succ u1} (Set.{succ u1} ZFSet.{u1}) (BooleanAlgebra.toHasSdiff.{succ u1} (Set.{succ u1} ZFSet.{u1}) (Set.booleanAlgebra.{succ u1} ZFSet.{u1})) (ZFSet.toSet.{u1} x) (ZFSet.toSet.{u1} y))
-but is expected to have type
-  forall (x : ZFSet.{u1}) (y : ZFSet.{u1}), Eq.{succ (succ u1)} (Set.{succ u1} ZFSet.{u1}) (ZFSet.toSet.{u1} (SDiff.sdiff.{succ u1} ZFSet.{u1} ZFSet.instSDiffZFSet.{u1} x y)) (SDiff.sdiff.{succ u1} (Set.{succ u1} ZFSet.{u1}) (Set.instSDiffSet.{succ u1} ZFSet.{u1}) (ZFSet.toSet.{u1} x) (ZFSet.toSet.{u1} y))
-Case conversion may be inaccurate. Consider using '#align Set.to_set_sdiff ZFSet.toSet_sdiffₓ'. -/
 @[simp]
 theorem toSet_sdiff (x y : ZFSet.{u}) : (x \ y).toSet = x.toSet \ y.toSet := by
   change { z ∈ x | z ∉ y }.toSet = _; ext; simp
@@ -1610,12 +1520,6 @@ theorem mem_irrefl (x : ZFSet) : x ∉ x :=
 #align Set.mem_irrefl ZFSet.mem_irrefl
 -/
 
-/- warning: Set.regularity -> ZFSet.regularity is a dubious translation:
-lean 3 declaration is
-  forall (x : ZFSet.{u1}), (Ne.{succ (succ u1)} ZFSet.{u1} x (EmptyCollection.emptyCollection.{succ u1} ZFSet.{u1} ZFSet.hasEmptyc.{u1})) -> (Exists.{succ (succ u1)} ZFSet.{u1} (fun (y : ZFSet.{u1}) => Exists.{0} (Membership.Mem.{succ u1, succ u1} ZFSet.{u1} ZFSet.{u1} ZFSet.hasMem.{u1} y x) (fun (H : Membership.Mem.{succ u1, succ u1} ZFSet.{u1} ZFSet.{u1} ZFSet.hasMem.{u1} y x) => Eq.{succ (succ u1)} ZFSet.{u1} (Inter.inter.{succ u1} ZFSet.{u1} ZFSet.hasInter.{u1} x y) (EmptyCollection.emptyCollection.{succ u1} ZFSet.{u1} ZFSet.hasEmptyc.{u1}))))
-but is expected to have type
-  forall (x : ZFSet.{u1}), (Ne.{succ (succ u1)} ZFSet.{u1} x (EmptyCollection.emptyCollection.{succ u1} ZFSet.{u1} ZFSet.instEmptyCollectionZFSet.{u1})) -> (Exists.{succ (succ u1)} ZFSet.{u1} (fun (y : ZFSet.{u1}) => And (Membership.mem.{succ u1, succ u1} ZFSet.{u1} ZFSet.{u1} ZFSet.instMembershipZFSetZFSet.{u1} y x) (Eq.{succ (succ u1)} ZFSet.{u1} (Inter.inter.{succ u1} ZFSet.{u1} ZFSet.instInterZFSet.{u1} x y) (EmptyCollection.emptyCollection.{succ u1} ZFSet.{u1} ZFSet.instEmptyCollectionZFSet.{u1}))))
-Case conversion may be inaccurate. Consider using '#align Set.regularity ZFSet.regularityₓ'. -/
 theorem regularity (x : ZFSet.{u}) (h : x ≠ ∅) : ∃ y ∈ x, x ∩ y = ∅ :=
   by_contradiction fun ne =>
     h <|
@@ -1651,12 +1555,6 @@ theorem image.mk :
 #align Set.image.mk ZFSet.image.mk
 -/
 
-/- warning: Set.mem_image -> ZFSet.mem_image is a dubious translation:
-lean 3 declaration is
-  forall {f : ZFSet.{u1} -> ZFSet.{u1}} [H : PSet.Definable.{u1} (OfNat.ofNat.{0} Nat 1 (OfNat.mk.{0} Nat 1 (One.one.{0} Nat Nat.hasOne))) f] {x : ZFSet.{u1}} {y : ZFSet.{u1}}, Iff (Membership.Mem.{succ u1, succ u1} ZFSet.{u1} ZFSet.{u1} ZFSet.hasMem.{u1} y (ZFSet.image.{u1} f H x)) (Exists.{succ (succ u1)} ZFSet.{u1} (fun (z : ZFSet.{u1}) => Exists.{0} (Membership.Mem.{succ u1, succ u1} ZFSet.{u1} ZFSet.{u1} ZFSet.hasMem.{u1} z x) (fun (H : Membership.Mem.{succ u1, succ u1} ZFSet.{u1} ZFSet.{u1} ZFSet.hasMem.{u1} z x) => Eq.{succ (succ u1)} ZFSet.{u1} (f z) y)))
-but is expected to have type
-  forall {f : ZFSet.{u1} -> ZFSet.{u1}} [H : PSet.Definable.{u1} (OfNat.ofNat.{0} Nat 1 (instOfNatNat 1)) f] {x : ZFSet.{u1}} {y : ZFSet.{u1}}, Iff (Membership.mem.{succ u1, succ u1} ZFSet.{u1} ZFSet.{u1} ZFSet.instMembershipZFSetZFSet.{u1} y (ZFSet.image.{u1} f H x)) (Exists.{succ (succ u1)} ZFSet.{u1} (fun (z : ZFSet.{u1}) => And (Membership.mem.{succ u1, succ u1} ZFSet.{u1} ZFSet.{u1} ZFSet.instMembershipZFSetZFSet.{u1} z x) (Eq.{succ (succ u1)} ZFSet.{u1} (f z) y)))
-Case conversion may be inaccurate. Consider using '#align Set.mem_image ZFSet.mem_imageₓ'. -/
 @[simp]
 theorem mem_image :
     ∀ {f : ZFSet.{u} → ZFSet.{u}} [H : Definable 1 f] {x y : ZFSet.{u}},
@@ -1723,12 +1621,6 @@ def pairSep (p : ZFSet.{u} → ZFSet.{u} → Prop) (x y : ZFSet.{u}) : ZFSet.{u}
 #align Set.pair_sep ZFSet.pairSep
 -/
 
-/- warning: Set.mem_pair_sep -> ZFSet.mem_pairSep is a dubious translation:
-lean 3 declaration is
-  forall {p : ZFSet.{u1} -> ZFSet.{u1} -> Prop} {x : ZFSet.{u1}} {y : ZFSet.{u1}} {z : ZFSet.{u1}}, Iff (Membership.Mem.{succ u1, succ u1} ZFSet.{u1} ZFSet.{u1} ZFSet.hasMem.{u1} z (ZFSet.pairSep.{u1} p x y)) (Exists.{succ (succ u1)} ZFSet.{u1} (fun (a : ZFSet.{u1}) => Exists.{0} (Membership.Mem.{succ u1, succ u1} ZFSet.{u1} ZFSet.{u1} ZFSet.hasMem.{u1} a x) (fun (H : Membership.Mem.{succ u1, succ u1} ZFSet.{u1} ZFSet.{u1} ZFSet.hasMem.{u1} a x) => Exists.{succ (succ u1)} ZFSet.{u1} (fun (b : ZFSet.{u1}) => Exists.{0} (Membership.Mem.{succ u1, succ u1} ZFSet.{u1} ZFSet.{u1} ZFSet.hasMem.{u1} b y) (fun (H : Membership.Mem.{succ u1, succ u1} ZFSet.{u1} ZFSet.{u1} ZFSet.hasMem.{u1} b y) => And (Eq.{succ (succ u1)} ZFSet.{u1} z (ZFSet.pair.{u1} a b)) (p a b))))))
-but is expected to have type
-  forall {p : ZFSet.{u1} -> ZFSet.{u1} -> Prop} {x : ZFSet.{u1}} {y : ZFSet.{u1}} {z : ZFSet.{u1}}, Iff (Membership.mem.{succ u1, succ u1} ZFSet.{u1} ZFSet.{u1} ZFSet.instMembershipZFSetZFSet.{u1} z (ZFSet.pairSep.{u1} p x y)) (Exists.{succ (succ u1)} ZFSet.{u1} (fun (a : ZFSet.{u1}) => And (Membership.mem.{succ u1, succ u1} ZFSet.{u1} ZFSet.{u1} ZFSet.instMembershipZFSetZFSet.{u1} a x) (Exists.{succ (succ u1)} ZFSet.{u1} (fun (b : ZFSet.{u1}) => And (Membership.mem.{succ u1, succ u1} ZFSet.{u1} ZFSet.{u1} ZFSet.instMembershipZFSetZFSet.{u1} b y) (And (Eq.{succ (succ u1)} ZFSet.{u1} z (ZFSet.pair.{u1} a b)) (p a b))))))
-Case conversion may be inaccurate. Consider using '#align Set.mem_pair_sep ZFSet.mem_pairSepₓ'. -/
 @[simp]
 theorem mem_pairSep {p} {x y z : ZFSet.{u}} :
     z ∈ pairSep p x y ↔ ∃ a ∈ x, ∃ b ∈ y, z = pair a b ∧ p a b :=
@@ -1780,12 +1672,6 @@ def prod : ZFSet.{u} → ZFSet.{u} → ZFSet.{u} :=
 #align Set.prod ZFSet.prod
 -/
 
-/- warning: Set.mem_prod -> ZFSet.mem_prod is a dubious translation:
-lean 3 declaration is
-  forall {x : ZFSet.{u1}} {y : ZFSet.{u1}} {z : ZFSet.{u1}}, Iff (Membership.Mem.{succ u1, succ u1} ZFSet.{u1} ZFSet.{u1} ZFSet.hasMem.{u1} z (ZFSet.prod.{u1} x y)) (Exists.{succ (succ u1)} ZFSet.{u1} (fun (a : ZFSet.{u1}) => Exists.{0} (Membership.Mem.{succ u1, succ u1} ZFSet.{u1} ZFSet.{u1} ZFSet.hasMem.{u1} a x) (fun (H : Membership.Mem.{succ u1, succ u1} ZFSet.{u1} ZFSet.{u1} ZFSet.hasMem.{u1} a x) => Exists.{succ (succ u1)} ZFSet.{u1} (fun (b : ZFSet.{u1}) => Exists.{0} (Membership.Mem.{succ u1, succ u1} ZFSet.{u1} ZFSet.{u1} ZFSet.hasMem.{u1} b y) (fun (H : Membership.Mem.{succ u1, succ u1} ZFSet.{u1} ZFSet.{u1} ZFSet.hasMem.{u1} b y) => Eq.{succ (succ u1)} ZFSet.{u1} z (ZFSet.pair.{u1} a b))))))
-but is expected to have type
-  forall {x : ZFSet.{u1}} {y : ZFSet.{u1}} {z : ZFSet.{u1}}, Iff (Membership.mem.{succ u1, succ u1} ZFSet.{u1} ZFSet.{u1} ZFSet.instMembershipZFSetZFSet.{u1} z (ZFSet.prod.{u1} x y)) (Exists.{succ (succ u1)} ZFSet.{u1} (fun (a : ZFSet.{u1}) => And (Membership.mem.{succ u1, succ u1} ZFSet.{u1} ZFSet.{u1} ZFSet.instMembershipZFSetZFSet.{u1} a x) (Exists.{succ (succ u1)} ZFSet.{u1} (fun (b : ZFSet.{u1}) => And (Membership.mem.{succ u1, succ u1} ZFSet.{u1} ZFSet.{u1} ZFSet.instMembershipZFSetZFSet.{u1} b y) (Eq.{succ (succ u1)} ZFSet.{u1} z (ZFSet.pair.{u1} a b))))))
-Case conversion may be inaccurate. Consider using '#align Set.mem_prod ZFSet.mem_prodₓ'. -/
 @[simp]
 theorem mem_prod {x y z : ZFSet.{u}} : z ∈ prod x y ↔ ∃ a ∈ x, ∃ b ∈ y, z = pair a b := by
   simp [Prod]
@@ -1838,12 +1724,6 @@ noncomputable def map (f : ZFSet → ZFSet) [H : Definable 1 f] : ZFSet → ZFSe
 #align Set.map ZFSet.map
 -/
 
-/- warning: Set.mem_map -> ZFSet.mem_map is a dubious translation:
-lean 3 declaration is
-  forall {f : ZFSet.{u1} -> ZFSet.{u1}} [H : PSet.Definable.{u1} (OfNat.ofNat.{0} Nat 1 (OfNat.mk.{0} Nat 1 (One.one.{0} Nat Nat.hasOne))) f] {x : ZFSet.{u1}} {y : ZFSet.{u1}}, Iff (Membership.Mem.{succ u1, succ u1} ZFSet.{u1} ZFSet.{u1} ZFSet.hasMem.{u1} y (ZFSet.map.{u1} f H x)) (Exists.{succ (succ u1)} ZFSet.{u1} (fun (z : ZFSet.{u1}) => Exists.{0} (Membership.Mem.{succ u1, succ u1} ZFSet.{u1} ZFSet.{u1} ZFSet.hasMem.{u1} z x) (fun (H : Membership.Mem.{succ u1, succ u1} ZFSet.{u1} ZFSet.{u1} ZFSet.hasMem.{u1} z x) => Eq.{succ (succ u1)} ZFSet.{u1} (ZFSet.pair.{u1} z (f z)) y)))
-but is expected to have type
-  forall {f : ZFSet.{u1} -> ZFSet.{u1}} [H : PSet.Definable.{u1} (OfNat.ofNat.{0} Nat 1 (instOfNatNat 1)) f] {x : ZFSet.{u1}} {y : ZFSet.{u1}}, Iff (Membership.mem.{succ u1, succ u1} ZFSet.{u1} ZFSet.{u1} ZFSet.instMembershipZFSetZFSet.{u1} y (ZFSet.map.{u1} f H x)) (Exists.{succ (succ u1)} ZFSet.{u1} (fun (z : ZFSet.{u1}) => And (Membership.mem.{succ u1, succ u1} ZFSet.{u1} ZFSet.{u1} ZFSet.instMembershipZFSetZFSet.{u1} z x) (Eq.{succ (succ u1)} ZFSet.{u1} (ZFSet.pair.{u1} z (f z)) y)))
-Case conversion may be inaccurate. Consider using '#align Set.mem_map ZFSet.mem_mapₓ'. -/
 @[simp]
 theorem mem_map {f : ZFSet → ZFSet} [H : Definable 1 f] {x y : ZFSet} :
     y ∈ map f x ↔ ∃ z ∈ x, pair z (f z) = y :=
@@ -2188,34 +2068,16 @@ theorem coe_insert (x y : ZFSet.{u}) : ↑(insert x y) = @insert ZFSet.{u} Class
 #align Class.coe_insert Class.coe_insert
 -/
 
-/- warning: Class.coe_union -> Class.coe_union is a dubious translation:
-lean 3 declaration is
-  forall (x : ZFSet.{u1}) (y : ZFSet.{u1}), Eq.{succ (succ u1)} Class.{u1} ((fun (a : Type.{succ u1}) (b : Type.{succ u1}) [self : HasLiftT.{succ (succ u1), succ (succ u1)} a b] => self.0) ZFSet.{u1} Class.{u1} (HasLiftT.mk.{succ (succ u1), succ (succ u1)} ZFSet.{u1} Class.{u1} (CoeTCₓ.coe.{succ (succ u1), succ (succ u1)} ZFSet.{u1} Class.{u1} (coeBase.{succ (succ u1), succ (succ u1)} ZFSet.{u1} Class.{u1} Class.hasCoe.{u1}))) (Union.union.{succ u1} ZFSet.{u1} ZFSet.hasUnion.{u1} x y)) (Union.union.{succ u1} Class.{u1} Class.hasUnion.{u1} ((fun (a : Type.{succ u1}) (b : Type.{succ u1}) [self : HasLiftT.{succ (succ u1), succ (succ u1)} a b] => self.0) ZFSet.{u1} Class.{u1} (HasLiftT.mk.{succ (succ u1), succ (succ u1)} ZFSet.{u1} Class.{u1} (CoeTCₓ.coe.{succ (succ u1), succ (succ u1)} ZFSet.{u1} Class.{u1} (coeBase.{succ (succ u1), succ (succ u1)} ZFSet.{u1} Class.{u1} Class.hasCoe.{u1}))) x) ((fun (a : Type.{succ u1}) (b : Type.{succ u1}) [self : HasLiftT.{succ (succ u1), succ (succ u1)} a b] => self.0) ZFSet.{u1} Class.{u1} (HasLiftT.mk.{succ (succ u1), succ (succ u1)} ZFSet.{u1} Class.{u1} (CoeTCₓ.coe.{succ (succ u1), succ (succ u1)} ZFSet.{u1} Class.{u1} (coeBase.{succ (succ u1), succ (succ u1)} ZFSet.{u1} Class.{u1} Class.hasCoe.{u1}))) y))
-but is expected to have type
-  forall (x : ZFSet.{u1}) (y : ZFSet.{u1}), Eq.{succ (succ u1)} Class.{u1} (Class.ofSet.{u1} (Union.union.{succ u1} ZFSet.{u1} ZFSet.instUnionZFSet.{u1} x y)) (Union.union.{succ u1} Class.{u1} instClassUnion.{u1} (Class.ofSet.{u1} x) (Class.ofSet.{u1} y))
-Case conversion may be inaccurate. Consider using '#align Class.coe_union Class.coe_unionₓ'. -/
 @[simp, norm_cast]
 theorem coe_union (x y : ZFSet.{u}) : ↑(x ∪ y) = (x : Class.{u}) ∪ y :=
   ext fun z => ZFSet.mem_union
 #align Class.coe_union Class.coe_union
 
-/- warning: Class.coe_inter -> Class.coe_inter is a dubious translation:
-lean 3 declaration is
-  forall (x : ZFSet.{u1}) (y : ZFSet.{u1}), Eq.{succ (succ u1)} Class.{u1} ((fun (a : Type.{succ u1}) (b : Type.{succ u1}) [self : HasLiftT.{succ (succ u1), succ (succ u1)} a b] => self.0) ZFSet.{u1} Class.{u1} (HasLiftT.mk.{succ (succ u1), succ (succ u1)} ZFSet.{u1} Class.{u1} (CoeTCₓ.coe.{succ (succ u1), succ (succ u1)} ZFSet.{u1} Class.{u1} (coeBase.{succ (succ u1), succ (succ u1)} ZFSet.{u1} Class.{u1} Class.hasCoe.{u1}))) (Inter.inter.{succ u1} ZFSet.{u1} ZFSet.hasInter.{u1} x y)) (Inter.inter.{succ u1} Class.{u1} Class.hasInter.{u1} ((fun (a : Type.{succ u1}) (b : Type.{succ u1}) [self : HasLiftT.{succ (succ u1), succ (succ u1)} a b] => self.0) ZFSet.{u1} Class.{u1} (HasLiftT.mk.{succ (succ u1), succ (succ u1)} ZFSet.{u1} Class.{u1} (CoeTCₓ.coe.{succ (succ u1), succ (succ u1)} ZFSet.{u1} Class.{u1} (coeBase.{succ (succ u1), succ (succ u1)} ZFSet.{u1} Class.{u1} Class.hasCoe.{u1}))) x) ((fun (a : Type.{succ u1}) (b : Type.{succ u1}) [self : HasLiftT.{succ (succ u1), succ (succ u1)} a b] => self.0) ZFSet.{u1} Class.{u1} (HasLiftT.mk.{succ (succ u1), succ (succ u1)} ZFSet.{u1} Class.{u1} (CoeTCₓ.coe.{succ (succ u1), succ (succ u1)} ZFSet.{u1} Class.{u1} (coeBase.{succ (succ u1), succ (succ u1)} ZFSet.{u1} Class.{u1} Class.hasCoe.{u1}))) y))
-but is expected to have type
-  forall (x : ZFSet.{u1}) (y : ZFSet.{u1}), Eq.{succ (succ u1)} Class.{u1} (Class.ofSet.{u1} (Inter.inter.{succ u1} ZFSet.{u1} ZFSet.instInterZFSet.{u1} x y)) (Inter.inter.{succ u1} Class.{u1} instClassInter.{u1} (Class.ofSet.{u1} x) (Class.ofSet.{u1} y))
-Case conversion may be inaccurate. Consider using '#align Class.coe_inter Class.coe_interₓ'. -/
 @[simp, norm_cast]
 theorem coe_inter (x y : ZFSet.{u}) : ↑(x ∩ y) = (x : Class.{u}) ∩ y :=
   ext fun z => ZFSet.mem_inter
 #align Class.coe_inter Class.coe_inter
 
-/- warning: Class.coe_diff -> Class.coe_diff is a dubious translation:
-lean 3 declaration is
-  forall (x : ZFSet.{u1}) (y : ZFSet.{u1}), Eq.{succ (succ u1)} Class.{u1} ((fun (a : Type.{succ u1}) (b : Type.{succ u1}) [self : HasLiftT.{succ (succ u1), succ (succ u1)} a b] => self.0) ZFSet.{u1} Class.{u1} (HasLiftT.mk.{succ (succ u1), succ (succ u1)} ZFSet.{u1} Class.{u1} (CoeTCₓ.coe.{succ (succ u1), succ (succ u1)} ZFSet.{u1} Class.{u1} (coeBase.{succ (succ u1), succ (succ u1)} ZFSet.{u1} Class.{u1} Class.hasCoe.{u1}))) (SDiff.sdiff.{succ u1} ZFSet.{u1} ZFSet.hasSdiff.{u1} x y)) (SDiff.sdiff.{succ u1} Class.{u1} Class.hasSdiff.{u1} ((fun (a : Type.{succ u1}) (b : Type.{succ u1}) [self : HasLiftT.{succ (succ u1), succ (succ u1)} a b] => self.0) ZFSet.{u1} Class.{u1} (HasLiftT.mk.{succ (succ u1), succ (succ u1)} ZFSet.{u1} Class.{u1} (CoeTCₓ.coe.{succ (succ u1), succ (succ u1)} ZFSet.{u1} Class.{u1} (coeBase.{succ (succ u1), succ (succ u1)} ZFSet.{u1} Class.{u1} Class.hasCoe.{u1}))) x) ((fun (a : Type.{succ u1}) (b : Type.{succ u1}) [self : HasLiftT.{succ (succ u1), succ (succ u1)} a b] => self.0) ZFSet.{u1} Class.{u1} (HasLiftT.mk.{succ (succ u1), succ (succ u1)} ZFSet.{u1} Class.{u1} (CoeTCₓ.coe.{succ (succ u1), succ (succ u1)} ZFSet.{u1} Class.{u1} (coeBase.{succ (succ u1), succ (succ u1)} ZFSet.{u1} Class.{u1} Class.hasCoe.{u1}))) y))
-but is expected to have type
-  forall (x : ZFSet.{u1}) (y : ZFSet.{u1}), Eq.{succ (succ u1)} Class.{u1} (Class.ofSet.{u1} (SDiff.sdiff.{succ u1} ZFSet.{u1} ZFSet.instSDiffZFSet.{u1} x y)) (SDiff.sdiff.{succ u1} Class.{u1} instClassSDiff.{u1} (Class.ofSet.{u1} x) (Class.ofSet.{u1} y))
-Case conversion may be inaccurate. Consider using '#align Class.coe_diff Class.coe_diffₓ'. -/
 @[simp, norm_cast]
 theorem coe_diff (x y : ZFSet.{u}) : ↑(x \ y) = (x : Class.{u}) \ y :=
   ext fun z => ZFSet.mem_diff
Diff
@@ -375,10 +375,7 @@ theorem Mem.mk {α : Type u} (A : α → PSet) (a : α) : A a ∈ mk α A :=
 -/
 
 #print PSet.func_mem /-
-theorem func_mem (x : PSet) (i : x.type) : x.Func i ∈ x :=
-  by
-  cases x
-  apply mem.mk
+theorem func_mem (x : PSet) (i : x.type) : x.Func i ∈ x := by cases x; apply mem.mk
 #align pSet.func_mem PSet.func_mem
 -/
 
@@ -652,9 +649,7 @@ theorem mem_sUnion : ∀ {x y : PSet.{u}}, y ∈ ⋃₀ x ↔ ∃ z ∈ x, y ∈
     ⟨fun ⟨⟨a, c⟩, (e : Equiv y ((A a).Func c))⟩ =>
       have : Func (A a) c ∈ mk (A a).type (A a).Func := Mem.mk (A a).Func c
       ⟨_, Mem.mk _ _, (Mem.congr_left e).2 (by rwa [eta] at this)⟩,
-      fun ⟨⟨β, B⟩, ⟨a, (e : Equiv (mk β B) (A a))⟩, ⟨b, yb⟩⟩ =>
-      by
-      rw [← eta (A a)] at e
+      fun ⟨⟨β, B⟩, ⟨a, (e : Equiv (mk β B) (A a))⟩, ⟨b, yb⟩⟩ => by rw [← eta (A a)] at e;
       exact
         let ⟨βt, tβ⟩ := e
         let ⟨c, bc⟩ := βt b
@@ -665,10 +660,7 @@ theorem mem_sUnion : ∀ {x y : PSet.{u}}, y ∈ ⋃₀ x ↔ ∃ z ∈ x, y ∈
 /- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
 #print PSet.toSet_sUnion /-
 @[simp]
-theorem toSet_sUnion (x : PSet.{u}) : (⋃₀ x).toSet = ⋃₀ (toSet '' x.toSet) :=
-  by
-  ext
-  simp
+theorem toSet_sUnion (x : PSet.{u}) : (⋃₀ x).toSet = ⋃₀ (toSet '' x.toSet) := by ext; simp
 #align pSet.to_set_sUnion PSet.toSet_sUnion
 -/
 
@@ -1141,17 +1133,12 @@ theorem nonempty_mk_iff {x : PSet} : (mk x).Nonempty ↔ x.Nonempty :=
 -/
 
 #print ZFSet.eq_empty /-
-theorem eq_empty (x : ZFSet.{u}) : x = ∅ ↔ ∀ y : ZFSet.{u}, y ∉ x :=
-  by
-  rw [ext_iff]
-  simp
+theorem eq_empty (x : ZFSet.{u}) : x = ∅ ↔ ∀ y : ZFSet.{u}, y ∉ x := by rw [ext_iff]; simp
 #align Set.eq_empty ZFSet.eq_empty
 -/
 
 #print ZFSet.eq_empty_or_nonempty /-
-theorem eq_empty_or_nonempty (u : ZFSet) : u = ∅ ∨ u.Nonempty :=
-  by
-  rw [eq_empty, ← not_exists]
+theorem eq_empty_or_nonempty (u : ZFSet) : u = ∅ ∨ u.Nonempty := by rw [eq_empty, ← not_exists];
   apply em'
 #align Set.eq_empty_or_nonempty ZFSet.eq_empty_or_nonempty
 -/
@@ -1215,10 +1202,7 @@ theorem mem_insert_of_mem {y z : ZFSet} (x) (h : z ∈ y) : z ∈ insert x y :=
 
 #print ZFSet.toSet_insert /-
 @[simp]
-theorem toSet_insert (x y : ZFSet) : (insert x y).toSet = insert x y.toSet :=
-  by
-  ext
-  simp
+theorem toSet_insert (x y : ZFSet) : (insert x y).toSet = insert x y.toSet := by ext; simp
 #align Set.to_set_insert ZFSet.toSet_insert
 -/
 
@@ -1232,10 +1216,7 @@ theorem mem_singleton {x y : ZFSet.{u}} : x ∈ @singleton ZFSet.{u} ZFSet.{u} _
 
 #print ZFSet.toSet_singleton /-
 @[simp]
-theorem toSet_singleton (x : ZFSet) : ({x} : ZFSet).toSet = {x} :=
-  by
-  ext
-  simp
+theorem toSet_singleton (x : ZFSet) : ({x} : ZFSet).toSet = {x} := by ext; simp
 #align Set.to_set_singleton ZFSet.toSet_singleton
 -/
 
@@ -1305,19 +1286,14 @@ instance : Sep ZFSet ZFSet :=
 theorem mem_sep {p : ZFSet.{u} → Prop} {x y : ZFSet.{u}} : y ∈ { y ∈ x | p y } ↔ y ∈ x ∧ p y :=
   Quotient.induction_on₂ x y fun ⟨α, A⟩ y =>
     ⟨fun ⟨⟨a, pa⟩, h⟩ => ⟨⟨a, h⟩, by rwa [@Quotient.sound PSet _ _ _ h]⟩, fun ⟨⟨a, h⟩, pa⟩ =>
-      ⟨⟨a, by
-          rw [mk_func] at h
-          rwa [mk_func, ← ZFSet.sound h]⟩,
-        h⟩⟩
+      ⟨⟨a, by rw [mk_func] at h; rwa [mk_func, ← ZFSet.sound h]⟩, h⟩⟩
 #align Set.mem_sep ZFSet.mem_sep
 -/
 
 #print ZFSet.toSet_sep /-
 @[simp]
 theorem toSet_sep (a : ZFSet) (p : ZFSet → Prop) : { x ∈ a | p x }.toSet = { x ∈ a.toSet | p x } :=
-  by
-  ext
-  simp
+  by ext; simp
 #align Set.to_set_sep ZFSet.toSet_sep
 -/
 
@@ -1361,10 +1337,7 @@ theorem sUnion_lem {α β : Type u} (A : α → PSet) (B : β → PSet) (αβ :
       have : PSet.Equiv ((A a).Func c) ((B b).Func (Eq.ndrec d (Eq.symm eb))) :=
         match A a, B b, ea, eb, c, d, hd with
         | _, _, rfl, rfl, x, y, hd => hd
-      ⟨⟨b, by
-          rw [mk_func]
-          exact Eq.ndrec d (Eq.symm eb)⟩,
-        this⟩
+      ⟨⟨b, by rw [mk_func]; exact Eq.ndrec d (Eq.symm eb)⟩, this⟩
 #align Set.sUnion_lem ZFSet.sUnion_lem
 -/
 
@@ -1421,9 +1394,7 @@ theorem mem_sInter {x y : ZFSet} (h : x.Nonempty) : y ∈ ⋂₀ x ↔ ∀ z ∈
 /- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
 #print ZFSet.sUnion_empty /-
 @[simp]
-theorem sUnion_empty : ⋃₀ (∅ : ZFSet) = ∅ := by
-  ext
-  simp
+theorem sUnion_empty : ⋃₀ (∅ : ZFSet) = ∅ := by ext; simp
 #align Set.sUnion_empty ZFSet.sUnion_empty
 -/
 
@@ -1479,20 +1450,15 @@ theorem sInter_singleton {x : ZFSet.{u}} : ⋂₀ ({x} : ZFSet) = x :=
 /- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
 #print ZFSet.toSet_sUnion /-
 @[simp]
-theorem toSet_sUnion (x : ZFSet.{u}) : (⋃₀ x).toSet = ⋃₀ (toSet '' x.toSet) :=
-  by
-  ext
-  simp
+theorem toSet_sUnion (x : ZFSet.{u}) : (⋃₀ x).toSet = ⋃₀ (toSet '' x.toSet) := by ext; simp
 #align Set.to_set_sUnion ZFSet.toSet_sUnion
 -/
 
 /- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
 /- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
 #print ZFSet.toSet_sInter /-
-theorem toSet_sInter {x : ZFSet.{u}} (h : x.Nonempty) : (⋂₀ x).toSet = ⋂₀ (toSet '' x.toSet) :=
-  by
-  ext
-  simp [mem_sInter h]
+theorem toSet_sInter {x : ZFSet.{u}} (h : x.Nonempty) : (⋂₀ x).toSet = ⋂₀ (toSet '' x.toSet) := by
+  ext; simp [mem_sInter h]
 #align Set.to_set_sInter ZFSet.toSet_sInter
 -/
 
@@ -1549,11 +1515,8 @@ but is expected to have type
   forall (x : ZFSet.{u1}) (y : ZFSet.{u1}), Eq.{succ (succ u1)} (Set.{succ u1} ZFSet.{u1}) (ZFSet.toSet.{u1} (Union.union.{succ u1} ZFSet.{u1} ZFSet.instUnionZFSet.{u1} x y)) (Union.union.{succ u1} (Set.{succ u1} ZFSet.{u1}) (Set.instUnionSet.{succ u1} ZFSet.{u1}) (ZFSet.toSet.{u1} x) (ZFSet.toSet.{u1} y))
 Case conversion may be inaccurate. Consider using '#align Set.to_set_union ZFSet.toSet_unionₓ'. -/
 @[simp]
-theorem toSet_union (x y : ZFSet.{u}) : (x ∪ y).toSet = x.toSet ∪ y.toSet :=
-  by
-  unfold Union.union
-  rw [ZFSet.union]
-  simp
+theorem toSet_union (x y : ZFSet.{u}) : (x ∪ y).toSet = x.toSet ∪ y.toSet := by unfold Union.union;
+  rw [ZFSet.union]; simp
 #align Set.to_set_union ZFSet.toSet_union
 
 /- warning: Set.to_set_inter -> ZFSet.toSet_inter is a dubious translation:
@@ -1563,12 +1526,8 @@ but is expected to have type
   forall (x : ZFSet.{u1}) (y : ZFSet.{u1}), Eq.{succ (succ u1)} (Set.{succ u1} ZFSet.{u1}) (ZFSet.toSet.{u1} (Inter.inter.{succ u1} ZFSet.{u1} ZFSet.instInterZFSet.{u1} x y)) (Inter.inter.{succ u1} (Set.{succ u1} ZFSet.{u1}) (Set.instInterSet.{succ u1} ZFSet.{u1}) (ZFSet.toSet.{u1} x) (ZFSet.toSet.{u1} y))
 Case conversion may be inaccurate. Consider using '#align Set.to_set_inter ZFSet.toSet_interₓ'. -/
 @[simp]
-theorem toSet_inter (x y : ZFSet.{u}) : (x ∩ y).toSet = x.toSet ∩ y.toSet :=
-  by
-  unfold Inter.inter
-  rw [ZFSet.inter]
-  ext
-  simp
+theorem toSet_inter (x y : ZFSet.{u}) : (x ∩ y).toSet = x.toSet ∩ y.toSet := by unfold Inter.inter;
+  rw [ZFSet.inter]; ext; simp
 #align Set.to_set_inter ZFSet.toSet_inter
 
 /- warning: Set.to_set_sdiff -> ZFSet.toSet_sdiff is a dubious translation:
@@ -1578,19 +1537,13 @@ but is expected to have type
   forall (x : ZFSet.{u1}) (y : ZFSet.{u1}), Eq.{succ (succ u1)} (Set.{succ u1} ZFSet.{u1}) (ZFSet.toSet.{u1} (SDiff.sdiff.{succ u1} ZFSet.{u1} ZFSet.instSDiffZFSet.{u1} x y)) (SDiff.sdiff.{succ u1} (Set.{succ u1} ZFSet.{u1}) (Set.instSDiffSet.{succ u1} ZFSet.{u1}) (ZFSet.toSet.{u1} x) (ZFSet.toSet.{u1} y))
 Case conversion may be inaccurate. Consider using '#align Set.to_set_sdiff ZFSet.toSet_sdiffₓ'. -/
 @[simp]
-theorem toSet_sdiff (x y : ZFSet.{u}) : (x \ y).toSet = x.toSet \ y.toSet :=
-  by
-  change { z ∈ x | z ∉ y }.toSet = _
-  ext
-  simp
+theorem toSet_sdiff (x y : ZFSet.{u}) : (x \ y).toSet = x.toSet \ y.toSet := by
+  change { z ∈ x | z ∉ y }.toSet = _; ext; simp
 #align Set.to_set_sdiff ZFSet.toSet_sdiff
 
 #print ZFSet.mem_union /-
 @[simp]
-theorem mem_union {x y z : ZFSet.{u}} : z ∈ x ∪ y ↔ z ∈ x ∨ z ∈ y :=
-  by
-  rw [← mem_to_set]
-  simp
+theorem mem_union {x y z : ZFSet.{u}} : z ∈ x ∪ y ↔ z ∈ x ∨ z ∈ y := by rw [← mem_to_set]; simp
 #align Set.mem_union ZFSet.mem_union
 -/
 
@@ -1717,9 +1670,7 @@ theorem mem_image :
 #print ZFSet.toSet_image /-
 @[simp]
 theorem toSet_image (f : ZFSet → ZFSet) [H : Definable 1 f] (x : ZFSet) :
-    (image f x).toSet = f '' x.toSet := by
-  ext
-  simp
+    (image f x).toSet = f '' x.toSet := by ext; simp
 #align Set.to_set_image ZFSet.toSet_image
 -/
 
@@ -1747,10 +1698,8 @@ theorem mem_range {α : Type u} {f : α → ZFSet.{max u v}} {x : ZFSet.{max u v
 
 #print ZFSet.toSet_range /-
 @[simp]
-theorem toSet_range {α : Type u} (f : α → ZFSet.{max u v}) : (range f).toSet = Set.range f :=
-  by
-  ext
-  simp
+theorem toSet_range {α : Type u} (f : α → ZFSet.{max u v}) : (range f).toSet = Set.range f := by
+  ext; simp
 #align Set.to_set_range ZFSet.toSet_range
 -/
 
@@ -1788,8 +1737,7 @@ theorem mem_pairSep {p} {x y z : ZFSet.{u}} :
   rcases e with ⟨a, ax, b, bY, rfl, pab⟩
   simp only [mem_powerset, subset_def, mem_union, pair, mem_pair]
   rintro u (rfl | rfl) v <;> simp only [mem_singleton, mem_pair]
-  · rintro rfl
-    exact Or.inl ax
+  · rintro rfl; exact Or.inl ax
   · rintro (rfl | rfl) <;> [left;right] <;> assumption
 #align Set.mem_pair_sep ZFSet.mem_pairSep
 
@@ -2138,10 +2086,7 @@ def congToClass (x : Set Class.{u}) : Class.{u} :=
 
 #print Class.congToClass_empty /-
 @[simp]
-theorem congToClass_empty : congToClass ∅ = ∅ :=
-  by
-  ext
-  simp [Cong_to_Class]
+theorem congToClass_empty : congToClass ∅ = ∅ := by ext; simp [Cong_to_Class]
 #align Class.Cong_to_Class_empty Class.congToClass_empty
 -/
 
@@ -2154,10 +2099,7 @@ def classToCong (x : Class.{u}) : Set Class.{u} :=
 
 #print Class.classToCong_empty /-
 @[simp]
-theorem classToCong_empty : classToCong ∅ = ∅ :=
-  by
-  ext
-  simp [Class_to_Cong]
+theorem classToCong_empty : classToCong ∅ = ∅ := by ext; simp [Class_to_Cong]
 #align Class.Class_to_Cong_empty Class.classToCong_empty
 -/
 
@@ -2192,9 +2134,7 @@ prefix:110 "⋂₀ " => Class.sInter
 
 #print Class.ofSet.inj /-
 theorem ofSet.inj {x y : ZFSet.{u}} (h : (x : Class.{u}) = y) : x = y :=
-  ZFSet.ext fun z => by
-    change (x : Class.{u}) z ↔ (y : Class.{u}) z
-    rw [h]
+  ZFSet.ext fun z => by change (x : Class.{u}) z ↔ (y : Class.{u}) z; rw [h]
 #align Class.of_Set.inj Class.ofSet.inj
 -/
 
@@ -2354,10 +2294,8 @@ theorem coe_sInter {x : ZFSet.{u}} (h : x.Nonempty) : ↑(⋂₀ x) = ⋂₀ (x
 
 /- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
 #print Class.mem_of_mem_sInter /-
-theorem mem_of_mem_sInter {x y z : Class} (hy : y ∈ ⋂₀ x) (hz : z ∈ x) : y ∈ z :=
-  by
-  obtain ⟨w, rfl, hw⟩ := hy
-  exact coe_mem.2 (hw z hz)
+theorem mem_of_mem_sInter {x y z : Class} (hy : y ∈ ⋂₀ x) (hz : z ∈ x) : y ∈ z := by
+  obtain ⟨w, rfl, hw⟩ := hy; exact coe_mem.2 (hw z hz)
 #align Class.mem_of_mem_sInter Class.mem_of_mem_sInter
 -/
 
@@ -2377,20 +2315,14 @@ theorem mem_sInter {x y : Class.{u}} (h : x.Nonempty) : y ∈ ⋂₀ x ↔ ∀ z
 /- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
 #print Class.sUnion_empty /-
 @[simp]
-theorem sUnion_empty : ⋃₀ (∅ : Class.{u}) = ∅ :=
-  by
-  ext
-  simp
+theorem sUnion_empty : ⋃₀ (∅ : Class.{u}) = ∅ := by ext; simp
 #align Class.sUnion_empty Class.sUnion_empty
 -/
 
 /- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
 #print Class.sInter_empty /-
 @[simp]
-theorem sInter_empty : ⋂₀ (∅ : Class.{u}) = univ :=
-  by
-  ext
-  simp [sInter, ← univ]
+theorem sInter_empty : ⋂₀ (∅ : Class.{u}) = univ := by ext; simp [sInter, ← univ]
 #align Class.sInter_empty Class.sInter_empty
 -/
 
@@ -2461,15 +2393,11 @@ namespace ZFSet
 @[simp]
 theorem map_fval {f : ZFSet.{u} → ZFSet.{u}} [H : PSet.Definable 1 f] {x y : ZFSet.{u}}
     (h : y ∈ x) : (ZFSet.map f x ′ y : Class.{u}) = f y :=
-  Class.iota_val _ _ fun z =>
-    by
-    rw [Class.toSet_of_ZFSet, Class.coe_apply, mem_map]
+  Class.iota_val _ _ fun z => by rw [Class.toSet_of_ZFSet, Class.coe_apply, mem_map];
     exact
       ⟨fun ⟨w, wz, pr⟩ => by
         let ⟨wy, fw⟩ := ZFSet.pair_injective pr
-        rw [← fw, wy], fun e => by
-        subst e
-        exact ⟨_, h, rfl⟩⟩
+        rw [← fw, wy], fun e => by subst e; exact ⟨_, h, rfl⟩⟩
 #align Set.map_fval ZFSet.map_fval
 -/
 
Diff
@@ -428,7 +428,6 @@ private theorem mem_wf_aux : ∀ {x y : PSet.{u}}, Equiv x y → Acc (· ∈ ·)
       have H := ha.trans hc.symm
       rw [mk_func] at H
       exact mem_wf_aux H⟩
-#align pSet.mem_wf_aux pSet.mem_wf_aux
 
 #print PSet.mem_wf /-
 theorem mem_wf : @WellFounded PSet (· ∈ ·) :=
Diff
@@ -1791,7 +1791,7 @@ theorem mem_pairSep {p} {x y z : ZFSet.{u}} :
   rintro u (rfl | rfl) v <;> simp only [mem_singleton, mem_pair]
   · rintro rfl
     exact Or.inl ax
-  · rintro (rfl | rfl) <;> [left, right] <;> assumption
+  · rintro (rfl | rfl) <;> [left;right] <;> assumption
 #align Set.mem_pair_sep ZFSet.mem_pairSep
 
 #print ZFSet.pair_injective /-
Diff
@@ -630,25 +630,25 @@ theorem mem_powerset : ∀ {x y : PSet}, y ∈ powerset x ↔ y ⊆ x
 #align pSet.mem_powerset PSet.mem_powerset
 -/
 
-#print PSet.unionₛ /-
+#print PSet.sUnion /-
 /-- The pre-set union operator -/
-def unionₛ (a : PSet) : PSet :=
+def sUnion (a : PSet) : PSet :=
   ⟨Σx, (a.Func x).type, fun ⟨x, y⟩ => (a.Func x).Func y⟩
-#align pSet.sUnion PSet.unionₛ
+#align pSet.sUnion PSet.sUnion
 -/
 
 -- mathport name: pSet.sUnion
-prefix:110 "⋃₀ " => PSet.unionₛ
+prefix:110 "⋃₀ " => PSet.sUnion
 
-/- warning: pSet.mem_sUnion -> PSet.mem_unionₛ is a dubious translation:
+/- warning: pSet.mem_sUnion -> PSet.mem_sUnion is a dubious translation:
 lean 3 declaration is
-  forall {x : PSet.{u1}} {y : PSet.{u1}}, Iff (Membership.Mem.{succ u1, succ u1} PSet.{u1} PSet.{u1} PSet.hasMem.{u1} y (PSet.unionₛ.{u1} x)) (Exists.{succ (succ u1)} PSet.{u1} (fun (z : PSet.{u1}) => Exists.{0} (Membership.Mem.{succ u1, succ u1} PSet.{u1} PSet.{u1} PSet.hasMem.{u1} z x) (fun (H : Membership.Mem.{succ u1, succ u1} PSet.{u1} PSet.{u1} PSet.hasMem.{u1} z x) => Membership.Mem.{succ u1, succ u1} PSet.{u1} PSet.{u1} PSet.hasMem.{u1} y z)))
+  forall {x : PSet.{u1}} {y : PSet.{u1}}, Iff (Membership.Mem.{succ u1, succ u1} PSet.{u1} PSet.{u1} PSet.hasMem.{u1} y (PSet.sUnion.{u1} x)) (Exists.{succ (succ u1)} PSet.{u1} (fun (z : PSet.{u1}) => Exists.{0} (Membership.Mem.{succ u1, succ u1} PSet.{u1} PSet.{u1} PSet.hasMem.{u1} z x) (fun (H : Membership.Mem.{succ u1, succ u1} PSet.{u1} PSet.{u1} PSet.hasMem.{u1} z x) => Membership.Mem.{succ u1, succ u1} PSet.{u1} PSet.{u1} PSet.hasMem.{u1} y z)))
 but is expected to have type
-  forall {x : PSet.{u1}} {y : PSet.{u1}}, Iff (Membership.mem.{succ u1, succ u1} PSet.{u1} PSet.{u1} PSet.instMembershipPSetPSet.{u1} y (PSet.unionₛ.{u1} x)) (Exists.{succ (succ u1)} PSet.{u1} (fun (z : PSet.{u1}) => And (Membership.mem.{succ u1, succ u1} PSet.{u1} PSet.{u1} PSet.instMembershipPSetPSet.{u1} z x) (Membership.mem.{succ u1, succ u1} PSet.{u1} PSet.{u1} PSet.instMembershipPSetPSet.{u1} y z)))
-Case conversion may be inaccurate. Consider using '#align pSet.mem_sUnion PSet.mem_unionₛₓ'. -/
+  forall {x : PSet.{u1}} {y : PSet.{u1}}, Iff (Membership.mem.{succ u1, succ u1} PSet.{u1} PSet.{u1} PSet.instMembershipPSetPSet.{u1} y (PSet.sUnion.{u1} x)) (Exists.{succ (succ u1)} PSet.{u1} (fun (z : PSet.{u1}) => And (Membership.mem.{succ u1, succ u1} PSet.{u1} PSet.{u1} PSet.instMembershipPSetPSet.{u1} z x) (Membership.mem.{succ u1, succ u1} PSet.{u1} PSet.{u1} PSet.instMembershipPSetPSet.{u1} y z)))
+Case conversion may be inaccurate. Consider using '#align pSet.mem_sUnion PSet.mem_sUnionₓ'. -/
 /- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
 @[simp]
-theorem mem_unionₛ : ∀ {x y : PSet.{u}}, y ∈ ⋃₀ x ↔ ∃ z ∈ x, y ∈ z
+theorem mem_sUnion : ∀ {x y : PSet.{u}}, y ∈ ⋃₀ x ↔ ∃ z ∈ x, y ∈ z
   | ⟨α, A⟩, y =>
     ⟨fun ⟨⟨a, c⟩, (e : Equiv y ((A a).Func c))⟩ =>
       have : Func (A a) c ∈ mk (A a).type (A a).Func := Mem.mk (A a).Func c
@@ -660,17 +660,17 @@ theorem mem_unionₛ : ∀ {x y : PSet.{u}}, y ∈ ⋃₀ x ↔ ∃ z ∈ x, y 
         let ⟨βt, tβ⟩ := e
         let ⟨c, bc⟩ := βt b
         ⟨⟨a, c⟩, yb.trans bc⟩⟩
-#align pSet.mem_sUnion PSet.mem_unionₛ
+#align pSet.mem_sUnion PSet.mem_sUnion
 
 /- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
 /- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
-#print PSet.toSet_unionₛ /-
+#print PSet.toSet_sUnion /-
 @[simp]
-theorem toSet_unionₛ (x : PSet.{u}) : (⋃₀ x).toSet = ⋃₀ (toSet '' x.toSet) :=
+theorem toSet_sUnion (x : PSet.{u}) : (⋃₀ x).toSet = ⋃₀ (toSet '' x.toSet) :=
   by
   ext
   simp
-#align pSet.to_set_sUnion PSet.toSet_unionₛ
+#align pSet.to_set_sUnion PSet.toSet_sUnion
 -/
 
 #print PSet.image /-
@@ -1347,9 +1347,9 @@ theorem mem_powerset {x y : ZFSet.{u}} : y ∈ powerset x ↔ y ⊆ x :=
 #align Set.mem_powerset ZFSet.mem_powerset
 -/
 
-#print ZFSet.unionₛ_lem /-
-theorem unionₛ_lem {α β : Type u} (A : α → PSet) (B : β → PSet) (αβ : ∀ a, ∃ b, Equiv (A a) (B b)) :
-    ∀ a, ∃ b, Equiv ((unionₛ ⟨α, A⟩).Func a) ((unionₛ ⟨β, B⟩).Func b)
+#print ZFSet.sUnion_lem /-
+theorem sUnion_lem {α β : Type u} (A : α → PSet) (B : β → PSet) (αβ : ∀ a, ∃ b, Equiv (A a) (B b)) :
+    ∀ a, ∃ b, Equiv ((sUnion ⟨α, A⟩).Func a) ((sUnion ⟨β, B⟩).Func b)
   | ⟨a, c⟩ => by
     let ⟨b, hb⟩ := αβ a
     induction' ea : A a with γ Γ
@@ -1366,141 +1366,141 @@ theorem unionₛ_lem {α β : Type u} (A : α → PSet) (B : β → PSet) (αβ
           rw [mk_func]
           exact Eq.ndrec d (Eq.symm eb)⟩,
         this⟩
-#align Set.sUnion_lem ZFSet.unionₛ_lem
+#align Set.sUnion_lem ZFSet.sUnion_lem
 -/
 
-#print ZFSet.unionₛ /-
+#print ZFSet.sUnion /-
 /-- The union operator, the collection of elements of elements of a ZFC set -/
-def unionₛ : ZFSet → ZFSet :=
+def sUnion : ZFSet → ZFSet :=
   Resp.eval 1
-    ⟨PSet.unionₛ, fun ⟨α, A⟩ ⟨β, B⟩ ⟨αβ, βα⟩ =>
-      ⟨unionₛ_lem A B αβ, fun a =>
+    ⟨PSet.sUnion, fun ⟨α, A⟩ ⟨β, B⟩ ⟨αβ, βα⟩ =>
+      ⟨sUnion_lem A B αβ, fun a =>
         Exists.elim
-          (unionₛ_lem B A (fun b => Exists.elim (βα b) fun c hc => ⟨c, PSet.Equiv.symm hc⟩) a)
+          (sUnion_lem B A (fun b => Exists.elim (βα b) fun c hc => ⟨c, PSet.Equiv.symm hc⟩) a)
           fun b hb => ⟨b, PSet.Equiv.symm hb⟩⟩⟩
-#align Set.sUnion ZFSet.unionₛ
+#align Set.sUnion ZFSet.sUnion
 -/
 
 -- mathport name: Set.sUnion
-prefix:110 "⋃₀ " => ZFSet.unionₛ
+prefix:110 "⋃₀ " => ZFSet.sUnion
 
-#print ZFSet.interₛ /-
+#print ZFSet.sInter /-
 /-- The intersection operator, the collection of elements in all of the elements of a ZFC set. We
 special-case `⋂₀ ∅ = ∅`. -/
-noncomputable def interₛ (x : ZFSet) : ZFSet := by
+noncomputable def sInter (x : ZFSet) : ZFSet := by
   classical exact dite x.nonempty (fun h => { y ∈ h.some | ∀ z ∈ x, y ∈ z }) fun _ => ∅
-#align Set.sInter ZFSet.interₛ
+#align Set.sInter ZFSet.sInter
 -/
 
 -- mathport name: Set.sInter
-prefix:110 "⋂₀ " => ZFSet.interₛ
+prefix:110 "⋂₀ " => ZFSet.sInter
 
-/- warning: Set.mem_sUnion -> ZFSet.mem_unionₛ is a dubious translation:
+/- warning: Set.mem_sUnion -> ZFSet.mem_sUnion is a dubious translation:
 lean 3 declaration is
-  forall {x : ZFSet.{u1}} {y : ZFSet.{u1}}, Iff (Membership.Mem.{succ u1, succ u1} ZFSet.{u1} ZFSet.{u1} ZFSet.hasMem.{u1} y (ZFSet.unionₛ.{u1} x)) (Exists.{succ (succ u1)} ZFSet.{u1} (fun (z : ZFSet.{u1}) => Exists.{0} (Membership.Mem.{succ u1, succ u1} ZFSet.{u1} ZFSet.{u1} ZFSet.hasMem.{u1} z x) (fun (H : Membership.Mem.{succ u1, succ u1} ZFSet.{u1} ZFSet.{u1} ZFSet.hasMem.{u1} z x) => Membership.Mem.{succ u1, succ u1} ZFSet.{u1} ZFSet.{u1} ZFSet.hasMem.{u1} y z)))
+  forall {x : ZFSet.{u1}} {y : ZFSet.{u1}}, Iff (Membership.Mem.{succ u1, succ u1} ZFSet.{u1} ZFSet.{u1} ZFSet.hasMem.{u1} y (ZFSet.sUnion.{u1} x)) (Exists.{succ (succ u1)} ZFSet.{u1} (fun (z : ZFSet.{u1}) => Exists.{0} (Membership.Mem.{succ u1, succ u1} ZFSet.{u1} ZFSet.{u1} ZFSet.hasMem.{u1} z x) (fun (H : Membership.Mem.{succ u1, succ u1} ZFSet.{u1} ZFSet.{u1} ZFSet.hasMem.{u1} z x) => Membership.Mem.{succ u1, succ u1} ZFSet.{u1} ZFSet.{u1} ZFSet.hasMem.{u1} y z)))
 but is expected to have type
-  forall {x : ZFSet.{u1}} {y : ZFSet.{u1}}, Iff (Membership.mem.{succ u1, succ u1} ZFSet.{u1} ZFSet.{u1} ZFSet.instMembershipZFSetZFSet.{u1} y (ZFSet.unionₛ.{u1} x)) (Exists.{succ (succ u1)} ZFSet.{u1} (fun (z : ZFSet.{u1}) => And (Membership.mem.{succ u1, succ u1} ZFSet.{u1} ZFSet.{u1} ZFSet.instMembershipZFSetZFSet.{u1} z x) (Membership.mem.{succ u1, succ u1} ZFSet.{u1} ZFSet.{u1} ZFSet.instMembershipZFSetZFSet.{u1} y z)))
-Case conversion may be inaccurate. Consider using '#align Set.mem_sUnion ZFSet.mem_unionₛₓ'. -/
+  forall {x : ZFSet.{u1}} {y : ZFSet.{u1}}, Iff (Membership.mem.{succ u1, succ u1} ZFSet.{u1} ZFSet.{u1} ZFSet.instMembershipZFSetZFSet.{u1} y (ZFSet.sUnion.{u1} x)) (Exists.{succ (succ u1)} ZFSet.{u1} (fun (z : ZFSet.{u1}) => And (Membership.mem.{succ u1, succ u1} ZFSet.{u1} ZFSet.{u1} ZFSet.instMembershipZFSetZFSet.{u1} z x) (Membership.mem.{succ u1, succ u1} ZFSet.{u1} ZFSet.{u1} ZFSet.instMembershipZFSetZFSet.{u1} y z)))
+Case conversion may be inaccurate. Consider using '#align Set.mem_sUnion ZFSet.mem_sUnionₓ'. -/
 /- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
 @[simp]
-theorem mem_unionₛ {x y : ZFSet.{u}} : y ∈ ⋃₀ x ↔ ∃ z ∈ x, y ∈ z :=
+theorem mem_sUnion {x y : ZFSet.{u}} : y ∈ ⋃₀ x ↔ ∃ z ∈ x, y ∈ z :=
   Quotient.induction_on₂ x y fun x y =>
-    Iff.trans mem_unionₛ
+    Iff.trans mem_sUnion
       ⟨fun ⟨z, h⟩ => ⟨⟦z⟧, h⟩, fun ⟨z, h⟩ => Quotient.inductionOn z (fun z h => ⟨z, h⟩) h⟩
-#align Set.mem_sUnion ZFSet.mem_unionₛ
+#align Set.mem_sUnion ZFSet.mem_sUnion
 
 /- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
-#print ZFSet.mem_interₛ /-
-theorem mem_interₛ {x y : ZFSet} (h : x.Nonempty) : y ∈ ⋂₀ x ↔ ∀ z ∈ x, y ∈ z :=
+#print ZFSet.mem_sInter /-
+theorem mem_sInter {x y : ZFSet} (h : x.Nonempty) : y ∈ ⋂₀ x ↔ ∀ z ∈ x, y ∈ z :=
   by
   rw [sInter, dif_pos h]
   simp only [mem_to_set, mem_sep, and_iff_right_iff_imp]
   exact fun H => H _ h.some_mem
-#align Set.mem_sInter ZFSet.mem_interₛ
+#align Set.mem_sInter ZFSet.mem_sInter
 -/
 
 /- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
-#print ZFSet.unionₛ_empty /-
+#print ZFSet.sUnion_empty /-
 @[simp]
-theorem unionₛ_empty : ⋃₀ (∅ : ZFSet) = ∅ := by
+theorem sUnion_empty : ⋃₀ (∅ : ZFSet) = ∅ := by
   ext
   simp
-#align Set.sUnion_empty ZFSet.unionₛ_empty
+#align Set.sUnion_empty ZFSet.sUnion_empty
 -/
 
 /- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
-#print ZFSet.interₛ_empty /-
+#print ZFSet.sInter_empty /-
 @[simp]
-theorem interₛ_empty : ⋂₀ (∅ : ZFSet) = ∅ :=
+theorem sInter_empty : ⋂₀ (∅ : ZFSet) = ∅ :=
   dif_neg <| by simp
-#align Set.sInter_empty ZFSet.interₛ_empty
+#align Set.sInter_empty ZFSet.sInter_empty
 -/
 
 /- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
-#print ZFSet.mem_of_mem_interₛ /-
-theorem mem_of_mem_interₛ {x y z : ZFSet} (hy : y ∈ ⋂₀ x) (hz : z ∈ x) : y ∈ z :=
+#print ZFSet.mem_of_mem_sInter /-
+theorem mem_of_mem_sInter {x y z : ZFSet} (hy : y ∈ ⋂₀ x) (hz : z ∈ x) : y ∈ z :=
   by
   rcases eq_empty_or_nonempty x with (rfl | hx)
   · exact (not_mem_empty z hz).elim
   · exact (mem_sInter hx).1 hy z hz
-#align Set.mem_of_mem_sInter ZFSet.mem_of_mem_interₛ
+#align Set.mem_of_mem_sInter ZFSet.mem_of_mem_sInter
 -/
 
 /- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
-#print ZFSet.mem_unionₛ_of_mem /-
-theorem mem_unionₛ_of_mem {x y z : ZFSet} (hy : y ∈ z) (hz : z ∈ x) : y ∈ ⋃₀ x :=
-  mem_unionₛ.2 ⟨z, hz, hy⟩
-#align Set.mem_sUnion_of_mem ZFSet.mem_unionₛ_of_mem
+#print ZFSet.mem_sUnion_of_mem /-
+theorem mem_sUnion_of_mem {x y z : ZFSet} (hy : y ∈ z) (hz : z ∈ x) : y ∈ ⋃₀ x :=
+  mem_sUnion.2 ⟨z, hz, hy⟩
+#align Set.mem_sUnion_of_mem ZFSet.mem_sUnion_of_mem
 -/
 
 /- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
-#print ZFSet.not_mem_interₛ_of_not_mem /-
-theorem not_mem_interₛ_of_not_mem {x y z : ZFSet} (hy : ¬y ∈ z) (hz : z ∈ x) : ¬y ∈ ⋂₀ x :=
-  fun hx => hy <| mem_of_mem_interₛ hx hz
-#align Set.not_mem_sInter_of_not_mem ZFSet.not_mem_interₛ_of_not_mem
+#print ZFSet.not_mem_sInter_of_not_mem /-
+theorem not_mem_sInter_of_not_mem {x y z : ZFSet} (hy : ¬y ∈ z) (hz : z ∈ x) : ¬y ∈ ⋂₀ x :=
+  fun hx => hy <| mem_of_mem_sInter hx hz
+#align Set.not_mem_sInter_of_not_mem ZFSet.not_mem_sInter_of_not_mem
 -/
 
 /- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
-#print ZFSet.unionₛ_singleton /-
+#print ZFSet.sUnion_singleton /-
 @[simp]
-theorem unionₛ_singleton {x : ZFSet.{u}} : ⋃₀ ({x} : ZFSet) = x :=
+theorem sUnion_singleton {x : ZFSet.{u}} : ⋃₀ ({x} : ZFSet) = x :=
   ext fun y => by simp_rw [mem_sUnion, exists_prop, mem_singleton, exists_eq_left]
-#align Set.sUnion_singleton ZFSet.unionₛ_singleton
+#align Set.sUnion_singleton ZFSet.sUnion_singleton
 -/
 
 /- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
-#print ZFSet.interₛ_singleton /-
+#print ZFSet.sInter_singleton /-
 @[simp]
-theorem interₛ_singleton {x : ZFSet.{u}} : ⋂₀ ({x} : ZFSet) = x :=
+theorem sInter_singleton {x : ZFSet.{u}} : ⋂₀ ({x} : ZFSet) = x :=
   ext fun y => by simp_rw [mem_sInter (singleton_nonempty x), mem_singleton, forall_eq]
-#align Set.sInter_singleton ZFSet.interₛ_singleton
+#align Set.sInter_singleton ZFSet.sInter_singleton
 -/
 
 /- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
 /- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
-#print ZFSet.toSet_unionₛ /-
+#print ZFSet.toSet_sUnion /-
 @[simp]
-theorem toSet_unionₛ (x : ZFSet.{u}) : (⋃₀ x).toSet = ⋃₀ (toSet '' x.toSet) :=
+theorem toSet_sUnion (x : ZFSet.{u}) : (⋃₀ x).toSet = ⋃₀ (toSet '' x.toSet) :=
   by
   ext
   simp
-#align Set.to_set_sUnion ZFSet.toSet_unionₛ
+#align Set.to_set_sUnion ZFSet.toSet_sUnion
 -/
 
 /- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
 /- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
-#print ZFSet.toSet_interₛ /-
-theorem toSet_interₛ {x : ZFSet.{u}} (h : x.Nonempty) : (⋂₀ x).toSet = ⋂₀ (toSet '' x.toSet) :=
+#print ZFSet.toSet_sInter /-
+theorem toSet_sInter {x : ZFSet.{u}} (h : x.Nonempty) : (⋂₀ x).toSet = ⋂₀ (toSet '' x.toSet) :=
   by
   ext
   simp [mem_sInter h]
-#align Set.to_set_sInter ZFSet.toSet_interₛ
+#align Set.to_set_sInter ZFSet.toSet_sInter
 -/
 
 #print ZFSet.singleton_injective /-
 theorem singleton_injective : Function.Injective (@singleton ZFSet ZFSet _) := fun x y H =>
   by
-  let this := congr_arg unionₛ H
+  let this := congr_arg sUnion H
   rwa [sUnion_singleton, sUnion_singleton] at this
 #align Set.singleton_injective ZFSet.singleton_injective
 -/
@@ -1610,9 +1610,9 @@ theorem mem_diff {x y z : ZFSet.{u}} : z ∈ x \ y ↔ z ∈ x ∧ z ∉ y :=
 -/
 
 /- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
-#print ZFSet.unionₛ_pair /-
+#print ZFSet.sUnion_pair /-
 @[simp]
-theorem unionₛ_pair {x y : ZFSet.{u}} : ⋃₀ ({x, y} : ZFSet.{u}) = x ∪ y :=
+theorem sUnion_pair {x y : ZFSet.{u}} : ⋃₀ ({x, y} : ZFSet.{u}) = x ∪ y :=
   by
   ext
   simp_rw [mem_union, mem_sUnion, mem_pair]
@@ -1623,7 +1623,7 @@ theorem unionₛ_pair {x y : ZFSet.{u}} : ⋃₀ ({x, y} : ZFSet.{u}) = x ∪ y
   · rintro (hz | hz)
     · exact ⟨x, Or.inl rfl, hz⟩
     · exact ⟨y, Or.inr rfl, hz⟩
-#align Set.sUnion_pair ZFSet.unionₛ_pair
+#align Set.sUnion_pair ZFSet.sUnion_pair
 -/
 
 #print ZFSet.mem_wf /-
@@ -2170,21 +2170,23 @@ def powerset (x : Class) : Class :=
 -/
 
 /- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
-#print Class.unionₛ /-
+#print Class.sUnion /-
 /-- The union of a class is the class of all members of ZFC sets in the class -/
-def unionₛ (x : Class) : Class :=
+def sUnion (x : Class) : Class :=
   ⋃₀ classToCong x
-#align Class.sUnion Class.unionₛ
+#align Class.sUnion Class.sUnion
 -/
 
 -- mathport name: Class.sUnion
-prefix:110 "⋃₀ " => Class.unionₛ
+prefix:110 "⋃₀ " => Class.sUnion
 
 /- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
+#print Class.sInter /-
 /-- The intersection of a class is the class of all members of ZFC sets in the class -/
 def sInter (x : Class) : Class :=
   ⋂₀ classToCong x
 #align Class.sInter Class.sInter
+-/
 
 -- mathport name: Class.sInter
 prefix:110 "⋂₀ " => Class.sInter
@@ -2295,74 +2297,74 @@ theorem powerset_apply {A : Class.{u}} {x : ZFSet.{u}} : powerset A x ↔ ↑x 
 -/
 
 /- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
-#print Class.unionₛ_apply /-
+#print Class.sUnion_apply /-
 @[simp]
-theorem unionₛ_apply {x : Class} {y : ZFSet} : (⋃₀ x) y ↔ ∃ z : ZFSet, x z ∧ y ∈ z :=
+theorem sUnion_apply {x : Class} {y : ZFSet} : (⋃₀ x) y ↔ ∃ z : ZFSet, x z ∧ y ∈ z :=
   by
   constructor
   · rintro ⟨-, ⟨z, rfl, hxz⟩, hyz⟩
     exact ⟨z, hxz, hyz⟩
   · exact fun ⟨z, hxz, hyz⟩ => ⟨_, coe_mem.2 hxz, hyz⟩
-#align Class.sUnion_apply Class.unionₛ_apply
+#align Class.sUnion_apply Class.sUnion_apply
 -/
 
 /- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
 /- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
-#print Class.coe_unionₛ /-
+#print Class.coe_sUnion /-
 @[simp, norm_cast]
-theorem coe_unionₛ (x : ZFSet.{u}) : ↑(⋃₀ x) = ⋃₀ (x : Class.{u}) :=
+theorem coe_sUnion (x : ZFSet.{u}) : ↑(⋃₀ x) = ⋃₀ (x : Class.{u}) :=
   ext fun y =>
-    ZFSet.mem_unionₛ.trans (unionₛ_apply.trans <| by simp_rw [coe_apply, exists_prop]).symm
-#align Class.coe_sUnion Class.coe_unionₛ
+    ZFSet.mem_sUnion.trans (sUnion_apply.trans <| by simp_rw [coe_apply, exists_prop]).symm
+#align Class.coe_sUnion Class.coe_sUnion
 -/
 
 /- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
-#print Class.mem_unionₛ /-
+#print Class.mem_sUnion /-
 @[simp]
-theorem mem_unionₛ {x y : Class.{u}} : y ∈ ⋃₀ x ↔ ∃ z, z ∈ x ∧ y ∈ z :=
+theorem mem_sUnion {x y : Class.{u}} : y ∈ ⋃₀ x ↔ ∃ z, z ∈ x ∧ y ∈ z :=
   by
   constructor
   · rintro ⟨w, rfl, z, hzx, hwz⟩
     exact ⟨z, hzx, coe_mem.2 hwz⟩
   · rintro ⟨w, hwx, z, rfl, hwz⟩
     exact ⟨z, rfl, w, hwx, hwz⟩
-#align Class.mem_sUnion Class.mem_unionₛ
+#align Class.mem_sUnion Class.mem_sUnion
 -/
 
 /- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
-#print Class.interₛ_apply /-
+#print Class.sInter_apply /-
 @[simp]
-theorem interₛ_apply {x : Class.{u}} {y : ZFSet.{u}} : (⋂₀ x) y ↔ ∀ z : ZFSet.{u}, x z → y ∈ z :=
+theorem sInter_apply {x : Class.{u}} {y : ZFSet.{u}} : (⋂₀ x) y ↔ ∀ z : ZFSet.{u}, x z → y ∈ z :=
   by
   refine' ⟨fun hxy z hxz => hxy _ ⟨z, rfl, hxz⟩, _⟩
   rintro H - ⟨z, rfl, hxz⟩
   exact H _ hxz
-#align Class.sInter_apply Class.interₛ_apply
+#align Class.sInter_apply Class.sInter_apply
 -/
 
-/- warning: Class.coe_sInter clashes with Class.sInter_coe -> Class.coe_interₛ
-Case conversion may be inaccurate. Consider using '#align Class.coe_sInter Class.coe_interₛₓ'. -/
+/- warning: Class.coe_sInter clashes with Class.sInter_coe -> Class.coe_sInter
+Case conversion may be inaccurate. Consider using '#align Class.coe_sInter Class.coe_sInterₓ'. -/
 /- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
 /- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
-#print Class.coe_interₛ /-
+#print Class.coe_sInter /-
 @[simp, norm_cast]
-theorem coe_interₛ {x : ZFSet.{u}} (h : x.Nonempty) : ↑(⋂₀ x) = ⋂₀ (x : Class.{u}) :=
-  Set.ext fun y => (ZFSet.mem_interₛ h).trans interₛ_apply.symm
-#align Class.coe_sInter Class.coe_interₛ
+theorem coe_sInter {x : ZFSet.{u}} (h : x.Nonempty) : ↑(⋂₀ x) = ⋂₀ (x : Class.{u}) :=
+  Set.ext fun y => (ZFSet.mem_sInter h).trans sInter_apply.symm
+#align Class.coe_sInter Class.coe_sInter
 -/
 
 /- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
-#print Class.mem_of_mem_interₛ /-
-theorem mem_of_mem_interₛ {x y z : Class} (hy : y ∈ ⋂₀ x) (hz : z ∈ x) : y ∈ z :=
+#print Class.mem_of_mem_sInter /-
+theorem mem_of_mem_sInter {x y z : Class} (hy : y ∈ ⋂₀ x) (hz : z ∈ x) : y ∈ z :=
   by
   obtain ⟨w, rfl, hw⟩ := hy
   exact coe_mem.2 (hw z hz)
-#align Class.mem_of_mem_sInter Class.mem_of_mem_interₛ
+#align Class.mem_of_mem_sInter Class.mem_of_mem_sInter
 -/
 
 /- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
-#print Class.mem_interₛ /-
-theorem mem_interₛ {x y : Class.{u}} (h : x.Nonempty) : y ∈ ⋂₀ x ↔ ∀ z, z ∈ x → y ∈ z :=
+#print Class.mem_sInter /-
+theorem mem_sInter {x y : Class.{u}} (h : x.Nonempty) : y ∈ ⋂₀ x ↔ ∀ z, z ∈ x → y ∈ z :=
   by
   refine' ⟨fun hy z => mem_of_mem_sInter hy, fun H => _⟩
   simp_rw [mem_def, sInter_apply]
@@ -2370,27 +2372,27 @@ theorem mem_interₛ {x y : Class.{u}} (h : x.Nonempty) : y ∈ ⋂₀ x ↔ ∀
   obtain ⟨y, rfl, hzy⟩ := H z (coe_mem.2 hz)
   refine' ⟨y, rfl, fun w hxw => _⟩
   simpa only [coe_mem, coe_apply] using H w (coe_mem.2 hxw)
-#align Class.mem_sInter Class.mem_interₛ
+#align Class.mem_sInter Class.mem_sInter
 -/
 
 /- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
-#print Class.unionₛ_empty /-
+#print Class.sUnion_empty /-
 @[simp]
-theorem unionₛ_empty : ⋃₀ (∅ : Class.{u}) = ∅ :=
+theorem sUnion_empty : ⋃₀ (∅ : Class.{u}) = ∅ :=
   by
   ext
   simp
-#align Class.sUnion_empty Class.unionₛ_empty
+#align Class.sUnion_empty Class.sUnion_empty
 -/
 
 /- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
-#print Class.interₛ_empty /-
+#print Class.sInter_empty /-
 @[simp]
-theorem interₛ_empty : ⋂₀ (∅ : Class.{u}) = univ :=
+theorem sInter_empty : ⋂₀ (∅ : Class.{u}) = univ :=
   by
   ext
   simp [sInter, ← univ]
-#align Class.sInter_empty Class.interₛ_empty
+#align Class.sInter_empty Class.sInter_empty
 -/
 
 #print Class.eq_univ_of_powerset_subset /-
@@ -2495,7 +2497,7 @@ theorem choice_mem_aux (y : ZFSet.{u}) (yx : y ∈ x) :
 #print ZFSet.choice_isFunc /-
 theorem choice_isFunc : IsFunc x (⋃₀ x) (choice x) :=
   (@map_isFunc _ (Classical.AllDefinable _) _ _).2 fun y yx =>
-    mem_unionₛ.2 ⟨y, yx, choice_mem_aux x h y yx⟩
+    mem_sUnion.2 ⟨y, yx, choice_mem_aux x h y yx⟩
 #align Set.choice_is_func ZFSet.choice_isFunc
 -/
 
Diff
@@ -1384,14 +1384,16 @@ def unionₛ : ZFSet → ZFSet :=
 -- mathport name: Set.sUnion
 prefix:110 "⋃₀ " => ZFSet.unionₛ
 
+#print ZFSet.interₛ /-
 /-- The intersection operator, the collection of elements in all of the elements of a ZFC set. We
 special-case `⋂₀ ∅ = ∅`. -/
-noncomputable def sInter (x : ZFSet) : ZFSet := by
+noncomputable def interₛ (x : ZFSet) : ZFSet := by
   classical exact dite x.nonempty (fun h => { y ∈ h.some | ∀ z ∈ x, y ∈ z }) fun _ => ∅
-#align Set.sInter ZFSet.sInter
+#align Set.sInter ZFSet.interₛ
+-/
 
 -- mathport name: Set.sInter
-prefix:110 "⋂₀ " => ZFSet.sInter
+prefix:110 "⋂₀ " => ZFSet.interₛ
 
 /- warning: Set.mem_sUnion -> ZFSet.mem_unionₛ is a dubious translation:
 lean 3 declaration is
@@ -1408,12 +1410,14 @@ theorem mem_unionₛ {x y : ZFSet.{u}} : y ∈ ⋃₀ x ↔ ∃ z ∈ x, y ∈ z
 #align Set.mem_sUnion ZFSet.mem_unionₛ
 
 /- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
-theorem mem_sInter {x y : ZFSet} (h : x.Nonempty) : y ∈ ⋂₀ x ↔ ∀ z ∈ x, y ∈ z :=
+#print ZFSet.mem_interₛ /-
+theorem mem_interₛ {x y : ZFSet} (h : x.Nonempty) : y ∈ ⋂₀ x ↔ ∀ z ∈ x, y ∈ z :=
   by
   rw [sInter, dif_pos h]
   simp only [mem_to_set, mem_sep, and_iff_right_iff_imp]
   exact fun H => H _ h.some_mem
-#align Set.mem_sInter ZFSet.mem_sInter
+#align Set.mem_sInter ZFSet.mem_interₛ
+-/
 
 /- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
 #print ZFSet.unionₛ_empty /-
@@ -1425,18 +1429,22 @@ theorem unionₛ_empty : ⋃₀ (∅ : ZFSet) = ∅ := by
 -/
 
 /- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
+#print ZFSet.interₛ_empty /-
 @[simp]
-theorem sInter_empty : ⋂₀ (∅ : ZFSet) = ∅ :=
+theorem interₛ_empty : ⋂₀ (∅ : ZFSet) = ∅ :=
   dif_neg <| by simp
-#align Set.sInter_empty ZFSet.sInter_empty
+#align Set.sInter_empty ZFSet.interₛ_empty
+-/
 
 /- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
-theorem mem_of_mem_sInter {x y z : ZFSet} (hy : y ∈ ⋂₀ x) (hz : z ∈ x) : y ∈ z :=
+#print ZFSet.mem_of_mem_interₛ /-
+theorem mem_of_mem_interₛ {x y z : ZFSet} (hy : y ∈ ⋂₀ x) (hz : z ∈ x) : y ∈ z :=
   by
   rcases eq_empty_or_nonempty x with (rfl | hx)
   · exact (not_mem_empty z hz).elim
   · exact (mem_sInter hx).1 hy z hz
-#align Set.mem_of_mem_sInter ZFSet.mem_of_mem_sInter
+#align Set.mem_of_mem_sInter ZFSet.mem_of_mem_interₛ
+-/
 
 /- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
 #print ZFSet.mem_unionₛ_of_mem /-
@@ -1446,9 +1454,11 @@ theorem mem_unionₛ_of_mem {x y z : ZFSet} (hy : y ∈ z) (hz : z ∈ x) : y 
 -/
 
 /- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
-theorem not_mem_sInter_of_not_mem {x y z : ZFSet} (hy : ¬y ∈ z) (hz : z ∈ x) : ¬y ∈ ⋂₀ x :=
-  fun hx => hy <| mem_of_mem_sInter hx hz
-#align Set.not_mem_sInter_of_not_mem ZFSet.not_mem_sInter_of_not_mem
+#print ZFSet.not_mem_interₛ_of_not_mem /-
+theorem not_mem_interₛ_of_not_mem {x y z : ZFSet} (hy : ¬y ∈ z) (hz : z ∈ x) : ¬y ∈ ⋂₀ x :=
+  fun hx => hy <| mem_of_mem_interₛ hx hz
+#align Set.not_mem_sInter_of_not_mem ZFSet.not_mem_interₛ_of_not_mem
+-/
 
 /- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
 #print ZFSet.unionₛ_singleton /-
@@ -1459,29 +1469,33 @@ theorem unionₛ_singleton {x : ZFSet.{u}} : ⋃₀ ({x} : ZFSet) = x :=
 -/
 
 /- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
+#print ZFSet.interₛ_singleton /-
 @[simp]
-theorem sInter_singleton {x : ZFSet.{u}} : ⋂₀ ({x} : ZFSet) = x :=
+theorem interₛ_singleton {x : ZFSet.{u}} : ⋂₀ ({x} : ZFSet) = x :=
   ext fun y => by simp_rw [mem_sInter (singleton_nonempty x), mem_singleton, forall_eq]
-#align Set.sInter_singleton ZFSet.sInter_singleton
+#align Set.sInter_singleton ZFSet.interₛ_singleton
+-/
 
 /- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
 /- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
-#print ZFSet.to_set_unionₛ /-
+#print ZFSet.toSet_unionₛ /-
 @[simp]
-theorem to_set_unionₛ (x : ZFSet.{u}) : (⋃₀ x).toSet = ⋃₀ (toSet '' x.toSet) :=
+theorem toSet_unionₛ (x : ZFSet.{u}) : (⋃₀ x).toSet = ⋃₀ (toSet '' x.toSet) :=
   by
   ext
   simp
-#align Set.to_set_sUnion ZFSet.to_set_unionₛ
+#align Set.to_set_sUnion ZFSet.toSet_unionₛ
 -/
 
 /- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
 /- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
-theorem toSet_sInter {x : ZFSet.{u}} (h : x.Nonempty) : (⋂₀ x).toSet = ⋂₀ (toSet '' x.toSet) :=
+#print ZFSet.toSet_interₛ /-
+theorem toSet_interₛ {x : ZFSet.{u}} (h : x.Nonempty) : (⋂₀ x).toSet = ⋂₀ (toSet '' x.toSet) :=
   by
   ext
   simp [mem_sInter h]
-#align Set.to_set_sInter ZFSet.toSet_sInter
+#align Set.to_set_sInter ZFSet.toSet_interₛ
+-/
 
 #print ZFSet.singleton_injective /-
 theorem singleton_injective : Function.Injective (@singleton ZFSet ZFSet _) := fun x y H =>
@@ -2183,17 +2197,17 @@ theorem ofSet.inj {x y : ZFSet.{u}} (h : (x : Class.{u}) = y) : x = y :=
 #align Class.of_Set.inj Class.ofSet.inj
 -/
 
-#print Class.toSet_of_setCat /-
+#print Class.toSet_of_ZFSet /-
 @[simp]
-theorem toSet_of_setCat (A : Class.{u}) (x : ZFSet.{u}) : ToSet A x ↔ A x :=
+theorem toSet_of_ZFSet (A : Class.{u}) (x : ZFSet.{u}) : ToSet A x ↔ A x :=
   ⟨fun ⟨y, yx, py⟩ => by rwa [of_Set.inj yx] at py, fun px => ⟨x, rfl, px⟩⟩
-#align Class.to_Set_of_Set Class.toSet_of_setCat
+#align Class.to_Set_of_Set Class.toSet_of_ZFSet
 -/
 
 #print Class.coe_mem /-
 @[simp, norm_cast]
 theorem coe_mem {x : ZFSet.{u}} {A : Class.{u}} : (x : Class.{u}) ∈ A ↔ A x :=
-  toSet_of_setCat _ _
+  toSet_of_ZFSet _ _
 #align Class.coe_mem Class.coe_mem
 -/
 
@@ -2316,30 +2330,39 @@ theorem mem_unionₛ {x y : Class.{u}} : y ∈ ⋃₀ x ↔ ∃ z, z ∈ x ∧ y
 -/
 
 /- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
+#print Class.interₛ_apply /-
 @[simp]
-theorem sInter_apply {x : Class.{u}} {y : ZFSet.{u}} : (⋂₀ x) y ↔ ∀ z : ZFSet.{u}, x z → y ∈ z :=
+theorem interₛ_apply {x : Class.{u}} {y : ZFSet.{u}} : (⋂₀ x) y ↔ ∀ z : ZFSet.{u}, x z → y ∈ z :=
   by
   refine' ⟨fun hxy z hxz => hxy _ ⟨z, rfl, hxz⟩, _⟩
   rintro H - ⟨z, rfl, hxz⟩
   exact H _ hxz
-#align Class.sInter_apply Class.sInter_apply
+#align Class.sInter_apply Class.interₛ_apply
+-/
 
+/- warning: Class.coe_sInter clashes with Class.sInter_coe -> Class.coe_interₛ
+Case conversion may be inaccurate. Consider using '#align Class.coe_sInter Class.coe_interₛₓ'. -/
 /- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
 /- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
+#print Class.coe_interₛ /-
 @[simp, norm_cast]
-theorem coe_sInter {x : ZFSet.{u}} (h : x.Nonempty) : ↑(⋂₀ x) = ⋂₀ (x : Class.{u}) :=
-  Set.ext fun y => (ZFSet.mem_sInter h).trans sInter_apply.symm
-#align Class.coe_sInter Class.coe_sInter
+theorem coe_interₛ {x : ZFSet.{u}} (h : x.Nonempty) : ↑(⋂₀ x) = ⋂₀ (x : Class.{u}) :=
+  Set.ext fun y => (ZFSet.mem_interₛ h).trans interₛ_apply.symm
+#align Class.coe_sInter Class.coe_interₛ
+-/
 
 /- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
-theorem mem_of_mem_sInter {x y z : Class} (hy : y ∈ ⋂₀ x) (hz : z ∈ x) : y ∈ z :=
+#print Class.mem_of_mem_interₛ /-
+theorem mem_of_mem_interₛ {x y z : Class} (hy : y ∈ ⋂₀ x) (hz : z ∈ x) : y ∈ z :=
   by
   obtain ⟨w, rfl, hw⟩ := hy
   exact coe_mem.2 (hw z hz)
-#align Class.mem_of_mem_sInter Class.mem_of_mem_sInter
+#align Class.mem_of_mem_sInter Class.mem_of_mem_interₛ
+-/
 
 /- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
-theorem mem_sInter {x y : Class.{u}} (h : x.Nonempty) : y ∈ ⋂₀ x ↔ ∀ z, z ∈ x → y ∈ z :=
+#print Class.mem_interₛ /-
+theorem mem_interₛ {x y : Class.{u}} (h : x.Nonempty) : y ∈ ⋂₀ x ↔ ∀ z, z ∈ x → y ∈ z :=
   by
   refine' ⟨fun hy z => mem_of_mem_sInter hy, fun H => _⟩
   simp_rw [mem_def, sInter_apply]
@@ -2347,7 +2370,8 @@ theorem mem_sInter {x y : Class.{u}} (h : x.Nonempty) : y ∈ ⋂₀ x ↔ ∀ z
   obtain ⟨y, rfl, hzy⟩ := H z (coe_mem.2 hz)
   refine' ⟨y, rfl, fun w hxw => _⟩
   simpa only [coe_mem, coe_apply] using H w (coe_mem.2 hxw)
-#align Class.mem_sInter Class.mem_sInter
+#align Class.mem_sInter Class.mem_interₛ
+-/
 
 /- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
 #print Class.unionₛ_empty /-
@@ -2360,12 +2384,14 @@ theorem unionₛ_empty : ⋃₀ (∅ : Class.{u}) = ∅ :=
 -/
 
 /- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
+#print Class.interₛ_empty /-
 @[simp]
-theorem sInter_empty : ⋂₀ (∅ : Class.{u}) = univ :=
+theorem interₛ_empty : ⋂₀ (∅ : Class.{u}) = univ :=
   by
   ext
   simp [sInter, ← univ]
-#align Class.sInter_empty Class.sInter_empty
+#align Class.sInter_empty Class.interₛ_empty
+-/
 
 #print Class.eq_univ_of_powerset_subset /-
 /-- An induction principle for sets. If every subset of a class is a member, then the class is
@@ -2436,7 +2462,7 @@ theorem map_fval {f : ZFSet.{u} → ZFSet.{u}} [H : PSet.Definable 1 f] {x y : Z
     (h : y ∈ x) : (ZFSet.map f x ′ y : Class.{u}) = f y :=
   Class.iota_val _ _ fun z =>
     by
-    rw [Class.toSet_of_setCat, Class.coe_apply, mem_map]
+    rw [Class.toSet_of_ZFSet, Class.coe_apply, mem_map]
     exact
       ⟨fun ⟨w, wz, pr⟩ => by
         let ⟨wy, fw⟩ := ZFSet.pair_injective pr
Diff
@@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Mario Carneiro
 
 ! This file was ported from Lean 3 source module set_theory.zfc.basic
-! leanprover-community/mathlib commit 19cb3751e5e9b3d97adb51023949c50c13b5fdfd
+! leanprover-community/mathlib commit f0b3759a8ef0bd8239ecdaa5e1089add5feebe1a
 ! Please do not edit these lines, except to modify the commit id
 ! if you have ported upstream changes.
 -/
@@ -2327,9 +2327,9 @@ theorem sInter_apply {x : Class.{u}} {y : ZFSet.{u}} : (⋂₀ x) y ↔ ∀ z :
 /- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
 /- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
 @[simp, norm_cast]
-theorem sInter_coe {x : ZFSet.{u}} (h : x.Nonempty) : ⋂₀ (x : Class.{u}) = ⋂₀ x :=
-  Set.ext fun y => sInter_apply.trans (ZFSet.mem_sInter h).symm
-#align Class.sInter_coe Class.sInter_coe
+theorem coe_sInter {x : ZFSet.{u}} (h : x.Nonempty) : ↑(⋂₀ x) = ⋂₀ (x : Class.{u}) :=
+  Set.ext fun y => (ZFSet.mem_sInter h).trans sInter_apply.symm
+#align Class.coe_sInter Class.coe_sInter
 
 /- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
 theorem mem_of_mem_sInter {x y z : Class} (hy : y ∈ ⋂₀ x) (hz : z ∈ x) : y ∈ z :=
Diff
@@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Mario Carneiro
 
 ! This file was ported from Lean 3 source module set_theory.zfc.basic
-! leanprover-community/mathlib commit 229f6f14a8b345d28ad17aaa1e9e79beb9e231da
+! leanprover-community/mathlib commit 19cb3751e5e9b3d97adb51023949c50c13b5fdfd
 ! Please do not edit these lines, except to modify the commit id
 ! if you have ported upstream changes.
 -/
@@ -15,6 +15,9 @@ import Mathbin.Order.WellFounded
 /-!
 # A model of ZFC
 
+> THIS FILE IS SYNCHRONIZED WITH MATHLIB4.
+> Any changes to this file require a corresponding PR to mathlib4.
+
 In this file, we model Zermelo-Fraenkel set theory (+ Choice) using Lean's underlying type theory.
 We do this in four main steps:
 * Define pre-sets inductively.
Diff
@@ -66,50 +66,67 @@ Prove `Set.map_definable_aux` computably.
 
 universe u v
 
+#print Arity /-
 /-- The type of `n`-ary functions `α → α → ... → α`. -/
 def Arity (α : Type u) : ℕ → Type u
   | 0 => α
   | n + 1 => α → Arity n
 #align arity Arity
+-/
 
+#print arity_zero /-
 @[simp]
 theorem arity_zero (α : Type u) : Arity α 0 = α :=
   rfl
 #align arity_zero arity_zero
+-/
 
+#print arity_succ /-
 @[simp]
 theorem arity_succ (α : Type u) (n : ℕ) : Arity α n.succ = (α → Arity α n) :=
   rfl
 #align arity_succ arity_succ
+-/
 
 namespace Arity
 
+#print Arity.Const /-
 /-- Constant `n`-ary function with value `a`. -/
-def const {α : Type u} (a : α) : ∀ n, Arity α n
+def Const {α : Type u} (a : α) : ∀ n, Arity α n
   | 0 => a
   | n + 1 => fun _ => const n
-#align arity.const Arity.const
+#align arity.const Arity.Const
+-/
 
+#print Arity.const_zero /-
 @[simp]
-theorem const_zero {α : Type u} (a : α) : const a 0 = a :=
+theorem const_zero {α : Type u} (a : α) : Const a 0 = a :=
   rfl
 #align arity.const_zero Arity.const_zero
+-/
 
+#print Arity.const_succ /-
 @[simp]
-theorem const_succ {α : Type u} (a : α) (n : ℕ) : const a n.succ = fun _ => const a n :=
+theorem const_succ {α : Type u} (a : α) (n : ℕ) : Const a n.succ = fun _ => Const a n :=
   rfl
 #align arity.const_succ Arity.const_succ
+-/
 
-theorem const_succ_apply {α : Type u} (a : α) (n : ℕ) (x : α) : const a n.succ x = const a n :=
+#print Arity.const_succ_apply /-
+theorem const_succ_apply {α : Type u} (a : α) (n : ℕ) (x : α) : Const a n.succ x = Const a n :=
   rfl
 #align arity.const_succ_apply Arity.const_succ_apply
+-/
 
+#print Arity.Arity.inhabited /-
 instance Arity.inhabited {α n} [Inhabited α] : Inhabited (Arity α n) :=
-  ⟨const default _⟩
+  ⟨Const default _⟩
 #align arity.arity.inhabited Arity.Arity.inhabited
+-/
 
 end Arity
 
+#print PSet /-
 /-- 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
@@ -117,63 +134,104 @@ end Arity
 inductive PSet : Type (u + 1)
   | mk (α : Type u) (A : α → PSet) : PSet
 #align pSet PSet
+-/
 
 namespace PSet
 
+#print PSet.Type /-
 /-- The underlying type of a pre-set -/
 def Type : PSet → Type u
   | ⟨α, A⟩ => α
 #align pSet.type PSet.Type
+-/
 
+#print PSet.Func /-
 /-- The underlying pre-set family of a pre-set -/
-def func : ∀ x : PSet, x.type → PSet
+def Func : ∀ x : PSet, x.type → PSet
   | ⟨α, A⟩ => A
-#align pSet.func PSet.func
+#align pSet.func PSet.Func
+-/
 
+#print PSet.mk_type /-
 @[simp]
 theorem mk_type (α A) : Type ⟨α, A⟩ = α :=
   rfl
 #align pSet.mk_type PSet.mk_type
+-/
 
+#print PSet.mk_func /-
 @[simp]
-theorem mk_func (α A) : func ⟨α, A⟩ = A :=
+theorem mk_func (α A) : Func ⟨α, A⟩ = A :=
   rfl
 #align pSet.mk_func PSet.mk_func
+-/
 
+#print PSet.eta /-
 @[simp]
-theorem eta : ∀ x : PSet, mk x.type x.func = x
+theorem eta : ∀ x : PSet, mk x.type x.Func = x
   | ⟨α, A⟩ => rfl
 #align pSet.eta PSet.eta
+-/
 
+#print PSet.Equiv /-
 /-- 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. -/
 def Equiv (x y : PSet) : Prop :=
   PSet.rec (fun α z m ⟨β, B⟩ => (∀ a, ∃ b, m a (B b)) ∧ ∀ b, ∃ a, m a (B b)) x y
 #align pSet.equiv PSet.Equiv
+-/
 
+/- warning: pSet.equiv_iff -> PSet.equiv_iff is a dubious translation:
+lean 3 declaration is
+  forall {x : PSet.{u1}} {y : PSet.{u2}}, Iff (PSet.Equiv.{u1, u2} x y) (And (forall (i : PSet.Type.{u1} x), Exists.{succ u2} (PSet.Type.{u2} y) (fun (j : PSet.Type.{u2} y) => PSet.Equiv.{u1, u2} (PSet.Func.{u1} x i) (PSet.Func.{u2} y j))) (forall (j : PSet.Type.{u2} y), Exists.{succ u1} (PSet.Type.{u1} x) (fun (i : PSet.Type.{u1} x) => PSet.Equiv.{u1, u2} (PSet.Func.{u1} x i) (PSet.Func.{u2} y j))))
+but is expected to have type
+  forall {x : PSet.{u2}} {y : PSet.{u1}}, Iff (PSet.Equiv.{u2, u1} x y) (And (forall (i : PSet.Type.{u2} x), Exists.{succ u1} (PSet.Type.{u1} y) (fun (j : PSet.Type.{u1} y) => PSet.Equiv.{u2, u1} (PSet.Func.{u2} x i) (PSet.Func.{u1} y j))) (forall (j : PSet.Type.{u1} y), Exists.{succ u2} (PSet.Type.{u2} x) (fun (i : PSet.Type.{u2} x) => PSet.Equiv.{u2, u1} (PSet.Func.{u2} x i) (PSet.Func.{u1} y j))))
+Case conversion may be inaccurate. Consider using '#align pSet.equiv_iff PSet.equiv_iffₓ'. -/
 theorem equiv_iff :
     ∀ {x y : PSet},
-      Equiv x y ↔ (∀ i, ∃ j, Equiv (x.func i) (y.func j)) ∧ ∀ j, ∃ i, Equiv (x.func i) (y.func j)
+      Equiv x y ↔ (∀ i, ∃ j, Equiv (x.Func i) (y.Func j)) ∧ ∀ j, ∃ i, Equiv (x.Func i) (y.Func j)
   | ⟨α, A⟩, ⟨β, B⟩ => Iff.rfl
 #align pSet.equiv_iff PSet.equiv_iff
 
-theorem Equiv.exists_left {x y : PSet} (h : Equiv x y) : ∀ i, ∃ j, Equiv (x.func i) (y.func j) :=
+/- warning: pSet.equiv.exists_left -> PSet.Equiv.exists_left is a dubious translation:
+lean 3 declaration is
+  forall {x : PSet.{u1}} {y : PSet.{u2}}, (PSet.Equiv.{u1, u2} x y) -> (forall (i : PSet.Type.{u1} x), Exists.{succ u2} (PSet.Type.{u2} y) (fun (j : PSet.Type.{u2} y) => PSet.Equiv.{u1, u2} (PSet.Func.{u1} x i) (PSet.Func.{u2} y j)))
+but is expected to have type
+  forall {x : PSet.{u2}} {y : PSet.{u1}}, (PSet.Equiv.{u2, u1} x y) -> (forall (i : PSet.Type.{u2} x), Exists.{succ u1} (PSet.Type.{u1} y) (fun (j : PSet.Type.{u1} y) => PSet.Equiv.{u2, u1} (PSet.Func.{u2} x i) (PSet.Func.{u1} y j)))
+Case conversion may be inaccurate. Consider using '#align pSet.equiv.exists_left PSet.Equiv.exists_leftₓ'. -/
+theorem Equiv.exists_left {x y : PSet} (h : Equiv x y) : ∀ i, ∃ j, Equiv (x.Func i) (y.Func j) :=
   (equiv_iff.1 h).1
 #align pSet.equiv.exists_left PSet.Equiv.exists_left
 
-theorem Equiv.exists_right {x y : PSet} (h : Equiv x y) : ∀ j, ∃ i, Equiv (x.func i) (y.func j) :=
+/- warning: pSet.equiv.exists_right -> PSet.Equiv.exists_right is a dubious translation:
+lean 3 declaration is
+  forall {x : PSet.{u1}} {y : PSet.{u2}}, (PSet.Equiv.{u1, u2} x y) -> (forall (j : PSet.Type.{u2} y), Exists.{succ u1} (PSet.Type.{u1} x) (fun (i : PSet.Type.{u1} x) => PSet.Equiv.{u1, u2} (PSet.Func.{u1} x i) (PSet.Func.{u2} y j)))
+but is expected to have type
+  forall {x : PSet.{u2}} {y : PSet.{u1}}, (PSet.Equiv.{u2, u1} x y) -> (forall (j : PSet.Type.{u1} y), Exists.{succ u2} (PSet.Type.{u2} x) (fun (i : PSet.Type.{u2} x) => PSet.Equiv.{u2, u1} (PSet.Func.{u2} x i) (PSet.Func.{u1} y j)))
+Case conversion may be inaccurate. Consider using '#align pSet.equiv.exists_right PSet.Equiv.exists_rightₓ'. -/
+theorem Equiv.exists_right {x y : PSet} (h : Equiv x y) : ∀ j, ∃ i, Equiv (x.Func i) (y.Func j) :=
   (equiv_iff.1 h).2
 #align pSet.equiv.exists_right PSet.Equiv.exists_right
 
+#print PSet.Equiv.refl /-
 @[refl]
 protected theorem Equiv.refl (x) : Equiv x x :=
   PSet.recOn x fun α A IH => ⟨fun a => ⟨a, IH a⟩, fun a => ⟨a, IH a⟩⟩
 #align pSet.equiv.refl PSet.Equiv.refl
+-/
 
+#print PSet.Equiv.rfl /-
 protected theorem Equiv.rfl : ∀ {x}, Equiv x x :=
   Equiv.refl
 #align pSet.equiv.rfl PSet.Equiv.rfl
+-/
 
+/- warning: pSet.equiv.euc -> PSet.Equiv.euc is a dubious translation:
+lean 3 declaration is
+  forall {x : PSet.{u1}} {y : PSet.{u2}} {z : PSet.{u3}}, (PSet.Equiv.{u1, u2} x y) -> (PSet.Equiv.{u3, u2} z y) -> (PSet.Equiv.{u1, u3} x z)
+but is expected to have type
+  forall {x : PSet.{u3}} {y : PSet.{u2}} {z : PSet.{u1}}, (PSet.Equiv.{u3, u2} x y) -> (PSet.Equiv.{u1, u2} z y) -> (PSet.Equiv.{u3, u1} x z)
+Case conversion may be inaccurate. Consider using '#align pSet.equiv.euc PSet.Equiv.eucₓ'. -/
 protected theorem Equiv.euc {x} : ∀ {y z}, Equiv x y → Equiv z y → Equiv x z :=
   PSet.recOn x fun α A IH y =>
     PSet.casesOn y fun β B ⟨γ, Γ⟩ ⟨αβ, βα⟩ ⟨γβ, βγ⟩ =>
@@ -187,33 +245,61 @@ protected theorem Equiv.euc {x} : ∀ {y z}, Equiv x y → Equiv z y → Equiv x
         ⟨a, IH a ba cb⟩⟩
 #align pSet.equiv.euc PSet.Equiv.euc
 
+/- warning: pSet.equiv.symm -> PSet.Equiv.symm is a dubious translation:
+lean 3 declaration is
+  forall {x : PSet.{u1}} {y : PSet.{u2}}, (PSet.Equiv.{u1, u2} x y) -> (PSet.Equiv.{u2, u1} y x)
+but is expected to have type
+  forall {x : PSet.{u2}} {y : PSet.{u1}}, (PSet.Equiv.{u2, u1} x y) -> (PSet.Equiv.{u1, u2} y x)
+Case conversion may be inaccurate. Consider using '#align pSet.equiv.symm PSet.Equiv.symmₓ'. -/
 @[symm]
 protected theorem Equiv.symm {x y} : Equiv x y → Equiv y x :=
   (Equiv.refl y).euc
 #align pSet.equiv.symm PSet.Equiv.symm
 
+/- warning: pSet.equiv.comm -> PSet.Equiv.comm is a dubious translation:
+lean 3 declaration is
+  forall {x : PSet.{u1}} {y : PSet.{u2}}, Iff (PSet.Equiv.{u1, u2} x y) (PSet.Equiv.{u2, u1} y x)
+but is expected to have type
+  forall {x : PSet.{u2}} {y : PSet.{u1}}, Iff (PSet.Equiv.{u2, u1} x y) (PSet.Equiv.{u1, u2} y x)
+Case conversion may be inaccurate. Consider using '#align pSet.equiv.comm PSet.Equiv.commₓ'. -/
 protected theorem Equiv.comm {x y} : Equiv x y ↔ Equiv y x :=
   ⟨Equiv.symm, Equiv.symm⟩
 #align pSet.equiv.comm PSet.Equiv.comm
 
+/- warning: pSet.equiv.trans -> PSet.Equiv.trans is a dubious translation:
+lean 3 declaration is
+  forall {x : PSet.{u1}} {y : PSet.{u2}} {z : PSet.{u3}}, (PSet.Equiv.{u1, u2} x y) -> (PSet.Equiv.{u2, u3} y z) -> (PSet.Equiv.{u1, u3} x z)
+but is expected to have type
+  forall {x : PSet.{u3}} {y : PSet.{u2}} {z : PSet.{u1}}, (PSet.Equiv.{u3, u2} x y) -> (PSet.Equiv.{u2, u1} y z) -> (PSet.Equiv.{u3, u1} x z)
+Case conversion may be inaccurate. Consider using '#align pSet.equiv.trans PSet.Equiv.transₓ'. -/
 @[trans]
 protected theorem Equiv.trans {x y z} (h1 : Equiv x y) (h2 : Equiv y z) : Equiv x z :=
   h1.euc h2.symm
 #align pSet.equiv.trans PSet.Equiv.trans
 
+/- warning: pSet.equiv_of_is_empty -> PSet.equiv_of_isEmpty is a dubious translation:
+lean 3 declaration is
+  forall (x : PSet.{u1}) (y : PSet.{u2}) [_inst_1 : IsEmpty.{succ u1} (PSet.Type.{u1} x)] [_inst_2 : IsEmpty.{succ u2} (PSet.Type.{u2} y)], PSet.Equiv.{u1, u2} x y
+but is expected to have type
+  forall (x : PSet.{u2}) (y : PSet.{u1}) [_inst_1 : IsEmpty.{succ u2} (PSet.Type.{u2} x)] [_inst_2 : IsEmpty.{succ u1} (PSet.Type.{u1} y)], PSet.Equiv.{u2, u1} x y
+Case conversion may be inaccurate. Consider using '#align pSet.equiv_of_is_empty PSet.equiv_of_isEmptyₓ'. -/
 protected theorem equiv_of_isEmpty (x y : PSet) [IsEmpty x.type] [IsEmpty y.type] : Equiv x y :=
   equiv_iff.2 <| by simp
 #align pSet.equiv_of_is_empty PSet.equiv_of_isEmpty
 
+#print PSet.setoid /-
 instance setoid : Setoid PSet :=
   ⟨PSet.Equiv, Equiv.refl, fun x y => Equiv.symm, fun x y z => Equiv.trans⟩
 #align pSet.setoid PSet.setoid
+-/
 
+#print PSet.Subset /-
 /-- 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.-/
 protected def Subset (x y : PSet) : Prop :=
-  ∀ a, ∃ b, Equiv (x.func a) (y.func b)
+  ∀ a, ∃ b, Equiv (x.Func a) (y.Func b)
 #align pSet.subset PSet.Subset
+-/
 
 instance : HasSubset PSet :=
   ⟨PSet.Subset⟩
@@ -227,6 +313,7 @@ instance : IsTrans PSet (· ⊆ ·) :=
     cases' hyz b with c hc
     exact ⟨c, hb.trans hc⟩⟩
 
+#print PSet.Equiv.ext /-
 theorem Equiv.ext : ∀ x y : PSet, Equiv x y ↔ x ⊆ y ∧ y ⊆ x
   | ⟨α, A⟩, ⟨β, B⟩ =>
     ⟨fun ⟨αβ, βα⟩ =>
@@ -238,7 +325,9 @@ theorem Equiv.ext : ∀ x y : PSet, Equiv x y ↔ x ⊆ y ∧ y ⊆ x
         let ⟨a, h⟩ := βα b
         ⟨a, Equiv.symm h⟩⟩⟩
 #align pSet.equiv.ext PSet.Equiv.ext
+-/
 
+#print PSet.Subset.congr_left /-
 theorem Subset.congr_left : ∀ {x y z : PSet}, Equiv x y → (x ⊆ z ↔ y ⊆ z)
   | ⟨α, A⟩, ⟨β, B⟩, ⟨γ, Γ⟩, ⟨αβ, βα⟩ =>
     ⟨fun αγ b =>
@@ -250,7 +339,9 @@ theorem Subset.congr_left : ∀ {x y z : PSet}, Equiv x y → (x ⊆ z ↔ y ⊆
       let ⟨c, bc⟩ := βγ b
       ⟨c, Equiv.trans ab bc⟩⟩
 #align pSet.subset.congr_left PSet.Subset.congr_left
+-/
 
+#print PSet.Subset.congr_right /-
 theorem Subset.congr_right : ∀ {x y z : PSet}, Equiv x y → (z ⊆ x ↔ z ⊆ y)
   | ⟨α, A⟩, ⟨β, B⟩, ⟨γ, Γ⟩, ⟨αβ, βα⟩ =>
     ⟨fun γα c =>
@@ -262,32 +353,42 @@ theorem Subset.congr_right : ∀ {x y z : PSet}, Equiv x y → (z ⊆ x ↔ z 
       let ⟨a, ab⟩ := βα b
       ⟨a, cb.trans (Equiv.symm ab)⟩⟩
 #align pSet.subset.congr_right PSet.Subset.congr_right
+-/
 
+#print PSet.Mem /-
 /-- `x ∈ y` as pre-sets if `x` is extensionally equivalent to a member of the family `y`. -/
 protected def Mem (x y : PSet.{u}) : Prop :=
-  ∃ b, Equiv x (y.func b)
+  ∃ b, Equiv x (y.Func b)
 #align pSet.mem PSet.Mem
+-/
 
 instance : Membership PSet PSet :=
   ⟨PSet.Mem⟩
 
+#print PSet.Mem.mk /-
 theorem Mem.mk {α : Type u} (A : α → PSet) (a : α) : A a ∈ mk α A :=
   ⟨a, Equiv.refl (A a)⟩
 #align pSet.mem.mk PSet.Mem.mk
+-/
 
-theorem func_mem (x : PSet) (i : x.type) : x.func i ∈ x :=
+#print PSet.func_mem /-
+theorem func_mem (x : PSet) (i : x.type) : x.Func i ∈ x :=
   by
   cases x
   apply mem.mk
 #align pSet.func_mem PSet.func_mem
+-/
 
+#print PSet.Mem.ext /-
 theorem Mem.ext : ∀ {x y : PSet.{u}}, (∀ w : PSet.{u}, w ∈ x ↔ w ∈ y) → Equiv x y
   | ⟨α, A⟩, ⟨β, B⟩, h =>
     ⟨fun a => (h (A a)).1 (Mem.mk A a), fun b =>
       let ⟨a, ha⟩ := (h (B b)).2 (Mem.mk B b)
       ⟨a, ha.symm⟩⟩
 #align pSet.mem.ext PSet.Mem.ext
+-/
 
+#print PSet.Mem.congr_right /-
 theorem Mem.congr_right : ∀ {x y : PSet.{u}}, Equiv x y → ∀ {w : PSet.{u}}, w ∈ x ↔ w ∈ y
   | ⟨α, A⟩, ⟨β, B⟩, ⟨αβ, βα⟩, w =>
     ⟨fun ⟨a, ha⟩ =>
@@ -297,7 +398,9 @@ theorem Mem.congr_right : ∀ {x y : PSet.{u}}, Equiv x y → ∀ {w : PSet.{u}}
       let ⟨a, ha⟩ := βα b
       ⟨a, hb.euc ha⟩⟩
 #align pSet.mem.congr_right PSet.Mem.congr_right
+-/
 
+#print PSet.equiv_iff_mem /-
 theorem equiv_iff_mem {x y : PSet.{u}} : Equiv x y ↔ ∀ {w : PSet.{u}}, w ∈ x ↔ w ∈ y :=
   ⟨Mem.congr_right,
     match x, y with
@@ -306,10 +409,13 @@ theorem equiv_iff_mem {x y : PSet.{u}} : Equiv x y ↔ ∀ {w : PSet.{u}}, w ∈
         let ⟨a, h⟩ := h.2 (Mem.mk B b)
         ⟨a, h.symm⟩⟩⟩
 #align pSet.equiv_iff_mem PSet.equiv_iff_mem
+-/
 
+#print PSet.Mem.congr_left /-
 theorem Mem.congr_left : ∀ {x y : PSet.{u}}, Equiv x y → ∀ {w : PSet.{u}}, x ∈ w ↔ y ∈ w
   | x, y, h, ⟨α, A⟩ => ⟨fun ⟨a, ha⟩ => ⟨a, h.symm.trans ha⟩, fun ⟨a, ha⟩ => ⟨a, h.trans ha⟩⟩
 #align pSet.mem.congr_left PSet.Mem.congr_left
+-/
 
 private theorem mem_wf_aux : ∀ {x y : PSet.{u}}, Equiv x y → Acc (· ∈ ·) y
   | ⟨α, A⟩, ⟨β, B⟩, H =>
@@ -321,9 +427,11 @@ private theorem mem_wf_aux : ∀ {x y : PSet.{u}}, Equiv x y → Acc (· ∈ ·)
       exact mem_wf_aux H⟩
 #align pSet.mem_wf_aux pSet.mem_wf_aux
 
+#print PSet.mem_wf /-
 theorem mem_wf : @WellFounded PSet (· ∈ ·) :=
   ⟨fun x => mem_wf_aux <| Equiv.refl x⟩
 #align pSet.mem_wf PSet.mem_wf
+-/
 
 instance : WellFoundedRelation PSet :=
   ⟨_, mem_wf⟩
@@ -331,62 +439,86 @@ instance : WellFoundedRelation PSet :=
 instance : IsAsymm PSet (· ∈ ·) :=
   mem_wf.IsAsymm
 
+#print PSet.mem_asymm /-
 theorem mem_asymm {x y : PSet} : x ∈ y → y ∉ x :=
   asymm
 #align pSet.mem_asymm PSet.mem_asymm
+-/
 
+#print PSet.mem_irrefl /-
 theorem mem_irrefl (x : PSet) : x ∉ x :=
   irrefl x
 #align pSet.mem_irrefl PSet.mem_irrefl
+-/
 
+#print PSet.toSet /-
 /-- Convert a pre-set to a `set` of pre-sets. -/
 def toSet (u : PSet.{u}) : Set PSet.{u} :=
   { x | x ∈ u }
 #align pSet.to_set PSet.toSet
+-/
 
+#print PSet.mem_toSet /-
 @[simp]
 theorem mem_toSet (a u : PSet.{u}) : a ∈ u.toSet ↔ a ∈ u :=
   Iff.rfl
 #align pSet.mem_to_set PSet.mem_toSet
+-/
 
+#print PSet.Nonempty /-
 /-- A nonempty set is one that contains some element. -/
 protected def Nonempty (u : PSet) : Prop :=
   u.toSet.Nonempty
 #align pSet.nonempty PSet.Nonempty
+-/
 
+#print PSet.nonempty_def /-
 theorem nonempty_def (u : PSet) : u.Nonempty ↔ ∃ x, x ∈ u :=
   Iff.rfl
 #align pSet.nonempty_def PSet.nonempty_def
+-/
 
+#print PSet.nonempty_of_mem /-
 theorem nonempty_of_mem {x u : PSet} (h : x ∈ u) : u.Nonempty :=
   ⟨x, h⟩
 #align pSet.nonempty_of_mem PSet.nonempty_of_mem
+-/
 
+#print PSet.nonempty_toSet_iff /-
 @[simp]
 theorem nonempty_toSet_iff {u : PSet} : u.toSet.Nonempty ↔ u.Nonempty :=
   Iff.rfl
 #align pSet.nonempty_to_set_iff PSet.nonempty_toSet_iff
+-/
 
+#print PSet.nonempty_type_iff_nonempty /-
 theorem nonempty_type_iff_nonempty {x : PSet} : Nonempty x.type ↔ PSet.Nonempty x :=
   ⟨fun ⟨i⟩ => ⟨_, func_mem _ i⟩, fun ⟨i, j, h⟩ => ⟨j⟩⟩
 #align pSet.nonempty_type_iff_nonempty PSet.nonempty_type_iff_nonempty
+-/
 
+#print PSet.nonempty_of_nonempty_type /-
 theorem nonempty_of_nonempty_type (x : PSet) [h : Nonempty x.type] : PSet.Nonempty x :=
   nonempty_type_iff_nonempty.1 h
 #align pSet.nonempty_of_nonempty_type PSet.nonempty_of_nonempty_type
+-/
 
+#print PSet.Equiv.eq /-
 /-- Two pre-sets are equivalent iff they have the same members. -/
 theorem Equiv.eq {x y : PSet} : Equiv x y ↔ toSet x = toSet y :=
   equiv_iff_mem.trans Set.ext_iff.symm
 #align pSet.equiv.eq PSet.Equiv.eq
+-/
 
 instance : Coe PSet (Set PSet) :=
   ⟨toSet⟩
 
+#print PSet.empty /-
 /-- The empty pre-set -/
 protected def empty : PSet :=
   ⟨_, PEmpty.elim⟩
 #align pSet.empty PSet.empty
+-/
 
 instance : EmptyCollection PSet :=
   ⟨PSet.empty⟩
@@ -397,31 +529,47 @@ instance : Inhabited PSet :=
 instance : IsEmpty (Type ∅) :=
   PEmpty.isEmpty
 
+#print PSet.not_mem_empty /-
 @[simp]
 theorem not_mem_empty (x : PSet.{u}) : x ∉ (∅ : PSet.{u}) :=
   IsEmpty.exists_iff.1
 #align pSet.not_mem_empty PSet.not_mem_empty
+-/
 
+#print PSet.toSet_empty /-
 @[simp]
 theorem toSet_empty : toSet ∅ = ∅ := by simp [to_set]
 #align pSet.to_set_empty PSet.toSet_empty
+-/
 
+#print PSet.empty_subset /-
 @[simp]
 theorem empty_subset (x : PSet.{u}) : (∅ : PSet) ⊆ x := fun x => x.elim
 #align pSet.empty_subset PSet.empty_subset
+-/
 
+#print PSet.not_nonempty_empty /-
 @[simp]
 theorem not_nonempty_empty : ¬PSet.Nonempty ∅ := by simp [PSet.Nonempty]
 #align pSet.not_nonempty_empty PSet.not_nonempty_empty
+-/
 
+/- warning: pSet.equiv_empty -> PSet.equiv_empty is a dubious translation:
+lean 3 declaration is
+  forall (x : PSet.{u1}) [_inst_1 : IsEmpty.{succ u1} (PSet.Type.{u1} x)], PSet.Equiv.{u1, u2} x (EmptyCollection.emptyCollection.{succ u2} PSet.{u2} PSet.hasEmptyc.{u2})
+but is expected to have type
+  forall (x : PSet.{u2}) [_inst_1 : IsEmpty.{succ u2} (PSet.Type.{u2} x)], PSet.Equiv.{u2, u1} x (EmptyCollection.emptyCollection.{succ u1} PSet.{u1} PSet.instEmptyCollectionPSet.{u1})
+Case conversion may be inaccurate. Consider using '#align pSet.equiv_empty PSet.equiv_emptyₓ'. -/
 protected theorem equiv_empty (x : PSet) [IsEmpty x.type] : Equiv x ∅ :=
   PSet.equiv_of_isEmpty x _
 #align pSet.equiv_empty PSet.equiv_empty
 
+#print PSet.insert /-
 /-- Insert an element into a pre-set -/
 protected def insert (x y : PSet) : PSet :=
-  ⟨Option y.type, fun o => Option.rec x y.func o⟩
+  ⟨Option y.type, fun o => Option.rec x y.Func o⟩
 #align pSet.insert PSet.insert
+-/
 
 instance : Insert PSet PSet :=
   ⟨PSet.insert⟩
@@ -435,30 +583,39 @@ instance : IsLawfulSingleton PSet PSet :=
 instance (x y : PSet) : Inhabited (insert x y).type :=
   Option.inhabited _
 
+#print PSet.ofNat /-
 /-- The n-th von Neumann ordinal -/
 def ofNat : ℕ → PSet
   | 0 => ∅
   | n + 1 => insert (of_nat n) (of_nat n)
 #align pSet.of_nat PSet.ofNat
+-/
 
+#print PSet.omega /-
 /-- The von Neumann ordinal ω -/
 def omega : PSet :=
   ⟨ULift ℕ, fun n => ofNat n.down⟩
 #align pSet.omega PSet.omega
+-/
 
+#print PSet.sep /-
 /-- The pre-set separation operation `{x ∈ a | p x}` -/
 protected def sep (p : PSet → Prop) (x : PSet) : PSet :=
-  ⟨{ a // p (x.func a) }, fun y => x.func y.1⟩
+  ⟨{ a // p (x.Func a) }, fun y => x.Func y.1⟩
 #align pSet.sep PSet.sep
+-/
 
 instance : Sep PSet PSet :=
   ⟨PSet.sep⟩
 
+#print PSet.powerset /-
 /-- The pre-set powerset operator -/
 def powerset (x : PSet) : PSet :=
-  ⟨Set x.type, fun p => ⟨{ a // p a }, fun y => x.func y.1⟩⟩
+  ⟨Set x.type, fun p => ⟨{ a // p a }, fun y => x.Func y.1⟩⟩
 #align pSet.powerset PSet.powerset
+-/
 
+#print PSet.mem_powerset /-
 @[simp]
 theorem mem_powerset : ∀ {x y : PSet}, y ∈ powerset x ↔ y ⊆ x
   | ⟨α, A⟩, ⟨β, B⟩ =>
@@ -468,21 +625,30 @@ theorem mem_powerset : ∀ {x y : PSet}, y ∈ powerset x ↔ y ⊆ x
         ⟨⟨a, b, ba⟩, ba⟩,
         fun ⟨a, b, ba⟩ => ⟨b, ba⟩⟩⟩
 #align pSet.mem_powerset PSet.mem_powerset
+-/
 
+#print PSet.unionₛ /-
 /-- The pre-set union operator -/
-def sUnion (a : PSet) : PSet :=
-  ⟨Σx, (a.func x).type, fun ⟨x, y⟩ => (a.func x).func y⟩
-#align pSet.sUnion PSet.sUnion
+def unionₛ (a : PSet) : PSet :=
+  ⟨Σx, (a.Func x).type, fun ⟨x, y⟩ => (a.Func x).Func y⟩
+#align pSet.sUnion PSet.unionₛ
+-/
 
 -- mathport name: pSet.sUnion
-prefix:110 "⋃₀ " => PSet.sUnion
-
+prefix:110 "⋃₀ " => PSet.unionₛ
+
+/- warning: pSet.mem_sUnion -> PSet.mem_unionₛ is a dubious translation:
+lean 3 declaration is
+  forall {x : PSet.{u1}} {y : PSet.{u1}}, Iff (Membership.Mem.{succ u1, succ u1} PSet.{u1} PSet.{u1} PSet.hasMem.{u1} y (PSet.unionₛ.{u1} x)) (Exists.{succ (succ u1)} PSet.{u1} (fun (z : PSet.{u1}) => Exists.{0} (Membership.Mem.{succ u1, succ u1} PSet.{u1} PSet.{u1} PSet.hasMem.{u1} z x) (fun (H : Membership.Mem.{succ u1, succ u1} PSet.{u1} PSet.{u1} PSet.hasMem.{u1} z x) => Membership.Mem.{succ u1, succ u1} PSet.{u1} PSet.{u1} PSet.hasMem.{u1} y z)))
+but is expected to have type
+  forall {x : PSet.{u1}} {y : PSet.{u1}}, Iff (Membership.mem.{succ u1, succ u1} PSet.{u1} PSet.{u1} PSet.instMembershipPSetPSet.{u1} y (PSet.unionₛ.{u1} x)) (Exists.{succ (succ u1)} PSet.{u1} (fun (z : PSet.{u1}) => And (Membership.mem.{succ u1, succ u1} PSet.{u1} PSet.{u1} PSet.instMembershipPSetPSet.{u1} z x) (Membership.mem.{succ u1, succ u1} PSet.{u1} PSet.{u1} PSet.instMembershipPSetPSet.{u1} y z)))
+Case conversion may be inaccurate. Consider using '#align pSet.mem_sUnion PSet.mem_unionₛₓ'. -/
 /- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
 @[simp]
-theorem mem_sUnion : ∀ {x y : PSet.{u}}, y ∈ ⋃₀ x ↔ ∃ z ∈ x, y ∈ z
+theorem mem_unionₛ : ∀ {x y : PSet.{u}}, y ∈ ⋃₀ x ↔ ∃ z ∈ x, y ∈ z
   | ⟨α, A⟩, y =>
-    ⟨fun ⟨⟨a, c⟩, (e : Equiv y ((A a).func c))⟩ =>
-      have : func (A a) c ∈ mk (A a).type (A a).func := Mem.mk (A a).func c
+    ⟨fun ⟨⟨a, c⟩, (e : Equiv y ((A a).Func c))⟩ =>
+      have : Func (A a) c ∈ mk (A a).type (A a).Func := Mem.mk (A a).Func c
       ⟨_, Mem.mk _ _, (Mem.congr_left e).2 (by rwa [eta] at this)⟩,
       fun ⟨⟨β, B⟩, ⟨a, (e : Equiv (mk β B) (A a))⟩, ⟨b, yb⟩⟩ =>
       by
@@ -491,161 +657,215 @@ theorem mem_sUnion : ∀ {x y : PSet.{u}}, y ∈ ⋃₀ x ↔ ∃ z ∈ x, y ∈
         let ⟨βt, tβ⟩ := e
         let ⟨c, bc⟩ := βt b
         ⟨⟨a, c⟩, yb.trans bc⟩⟩
-#align pSet.mem_sUnion PSet.mem_sUnion
+#align pSet.mem_sUnion PSet.mem_unionₛ
 
 /- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
 /- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
+#print PSet.toSet_unionₛ /-
 @[simp]
-theorem toSet_sUnion (x : PSet.{u}) : (⋃₀ x).toSet = ⋃₀ (toSet '' x.toSet) :=
+theorem toSet_unionₛ (x : PSet.{u}) : (⋃₀ x).toSet = ⋃₀ (toSet '' x.toSet) :=
   by
   ext
   simp
-#align pSet.to_set_sUnion PSet.toSet_sUnion
+#align pSet.to_set_sUnion PSet.toSet_unionₛ
+-/
 
+#print PSet.image /-
 /-- The image of a function from pre-sets to pre-sets. -/
 def image (f : PSet.{u} → PSet.{u}) (x : PSet.{u}) : PSet :=
-  ⟨x.type, f ∘ x.func⟩
+  ⟨x.type, f ∘ x.Func⟩
 #align pSet.image PSet.image
+-/
 
+/- warning: pSet.mem_image -> PSet.mem_image is a dubious translation:
+lean 3 declaration is
+  forall {f : PSet.{u1} -> PSet.{u1}}, (forall {x : PSet.{u1}} {y : PSet.{u1}}, (PSet.Equiv.{u1, u1} x y) -> (PSet.Equiv.{u1, u1} (f x) (f y))) -> (forall {x : PSet.{u1}} {y : PSet.{u1}}, Iff (Membership.Mem.{succ u1, succ u1} PSet.{u1} PSet.{u1} PSet.hasMem.{u1} y (PSet.image.{u1} f x)) (Exists.{succ (succ u1)} PSet.{u1} (fun (z : PSet.{u1}) => Exists.{0} (Membership.Mem.{succ u1, succ u1} PSet.{u1} PSet.{u1} PSet.hasMem.{u1} z x) (fun (H : Membership.Mem.{succ u1, succ u1} PSet.{u1} PSet.{u1} PSet.hasMem.{u1} z x) => PSet.Equiv.{u1, u1} y (f z)))))
+but is expected to have type
+  forall {f : PSet.{u1} -> PSet.{u1}}, (forall (x : PSet.{u1}) (y : PSet.{u1}), (PSet.Equiv.{u1, u1} x y) -> (PSet.Equiv.{u1, u1} (f x) (f y))) -> (forall {x : PSet.{u1}} {y : PSet.{u1}}, Iff (Membership.mem.{succ u1, succ u1} PSet.{u1} PSet.{u1} PSet.instMembershipPSetPSet.{u1} y (PSet.image.{u1} f x)) (Exists.{succ (succ u1)} PSet.{u1} (fun (z : PSet.{u1}) => And (Membership.mem.{succ u1, succ u1} PSet.{u1} PSet.{u1} PSet.instMembershipPSetPSet.{u1} z x) (PSet.Equiv.{u1, u1} y (f z)))))
+Case conversion may be inaccurate. Consider using '#align pSet.mem_image PSet.mem_imageₓ'. -/
 theorem mem_image {f : PSet.{u} → PSet.{u}} (H : ∀ {x y}, Equiv x y → Equiv (f x) (f y)) :
     ∀ {x y : PSet.{u}}, y ∈ image f x ↔ ∃ z ∈ x, Equiv y (f z)
   | ⟨α, A⟩, y =>
     ⟨fun ⟨a, ya⟩ => ⟨A a, Mem.mk A a, ya⟩, fun ⟨z, ⟨a, za⟩, yz⟩ => ⟨a, yz.trans (H za)⟩⟩
 #align pSet.mem_image PSet.mem_image
 
+#print PSet.Lift /-
 /-- Universe lift operation -/
-protected def lift : PSet.{u} → PSet.{max u v}
+protected def Lift : PSet.{u} → PSet.{max u v}
   | ⟨α, A⟩ => ⟨ULift α, fun ⟨x⟩ => lift (A x)⟩
-#align pSet.lift PSet.lift
+#align pSet.lift PSet.Lift
+-/
 
+#print PSet.embed /-
 -- intended to be used with explicit universe parameters
 /-- Embedding of one universe in another -/
 @[nolint check_univs]
 def embed : PSet.{max (u + 1) v} :=
-  ⟨ULift.{v, u + 1} PSet, fun ⟨x⟩ => PSet.lift.{u, max (u + 1) v} x⟩
+  ⟨ULift.{v, u + 1} PSet, fun ⟨x⟩ => PSet.Lift.{u, max (u + 1) v} x⟩
 #align pSet.embed PSet.embed
+-/
 
-theorem lift_mem_embed : ∀ x : PSet.{u}, PSet.lift.{u, max (u + 1) v} x ∈ embed.{u, v} := fun x =>
+#print PSet.lift_mem_embed /-
+theorem lift_mem_embed : ∀ x : PSet.{u}, PSet.Lift.{u, max (u + 1) v} x ∈ embed.{u, v} := fun x =>
   ⟨⟨x⟩, Equiv.rfl⟩
 #align pSet.lift_mem_embed PSet.lift_mem_embed
+-/
 
+#print PSet.Arity.Equiv /-
 /-- 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. -/
 def Arity.Equiv : ∀ {n}, Arity PSet.{u} n → Arity PSet.{u} n → Prop
   | 0, a, b => Equiv a b
   | n + 1, a, b => ∀ x y, Equiv x y → arity.equiv (a x) (b y)
 #align pSet.arity.equiv PSet.Arity.Equiv
+-/
 
-theorem Arity.equiv_const {a : PSet.{u}} : ∀ n, Arity.Equiv (Arity.const a n) (Arity.const a n)
+#print PSet.Arity.equiv_const /-
+theorem Arity.equiv_const {a : PSet.{u}} : ∀ n, Arity.Equiv (Arity.Const a n) (Arity.Const a n)
   | 0 => Equiv.rfl
   | n + 1 => fun x y h => arity.equiv_const _
 #align pSet.arity.equiv_const PSet.Arity.equiv_const
+-/
 
+#print PSet.Resp /-
 /-- `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. -/
 def Resp (n) :=
   { x : Arity PSet.{u} n // Arity.Equiv x x }
 #align pSet.resp PSet.Resp
+-/
 
+#print PSet.Resp.inhabited /-
 instance Resp.inhabited {n} : Inhabited (Resp n) :=
-  ⟨⟨Arity.const default _, Arity.equiv_const _⟩⟩
+  ⟨⟨Arity.Const default _, Arity.equiv_const _⟩⟩
 #align pSet.resp.inhabited PSet.Resp.inhabited
+-/
 
+#print PSet.Resp.f /-
 /-- The `n`-ary image of a `(n + 1)`-ary function respecting equivalence as a function respecting
 equivalence. -/
 def Resp.f {n} (f : Resp (n + 1)) (x : PSet) : Resp n :=
   ⟨f.1 x, f.2 _ _ <| Equiv.refl x⟩
 #align pSet.resp.f PSet.Resp.f
+-/
 
+#print PSet.Resp.Equiv /-
 /-- Function equivalence for functions respecting equivalence. See `pSet.arity.equiv`. -/
 def Resp.Equiv {n} (a b : Resp n) : Prop :=
   Arity.Equiv a.1 b.1
 #align pSet.resp.equiv PSet.Resp.Equiv
+-/
 
+#print PSet.Resp.Equiv.refl /-
 protected theorem Resp.Equiv.refl {n} (a : Resp n) : Resp.Equiv a a :=
   a.2
 #align pSet.resp.equiv.refl PSet.Resp.Equiv.refl
+-/
 
+#print PSet.Resp.Equiv.euc /-
 protected theorem Resp.Equiv.euc :
     ∀ {n} {a b c : Resp n}, Resp.Equiv a b → Resp.Equiv c b → Resp.Equiv a c
   | 0, a, b, c, hab, hcb => Equiv.euc hab hcb
   | n + 1, a, b, c, hab, hcb => fun x y h =>
     @resp.equiv.euc n (a.f x) (b.f y) (c.f y) (hab _ _ h) (hcb _ _ <| Equiv.refl y)
 #align pSet.resp.equiv.euc PSet.Resp.Equiv.euc
+-/
 
+#print PSet.Resp.Equiv.symm /-
 protected theorem Resp.Equiv.symm {n} {a b : Resp n} : Resp.Equiv a b → Resp.Equiv b a :=
   (Resp.Equiv.refl b).euc
 #align pSet.resp.equiv.symm PSet.Resp.Equiv.symm
+-/
 
+#print PSet.Resp.Equiv.trans /-
 protected theorem Resp.Equiv.trans {n} {x y z : Resp n} (h1 : Resp.Equiv x y)
     (h2 : Resp.Equiv y z) : Resp.Equiv x z :=
   h1.euc h2.symm
 #align pSet.resp.equiv.trans PSet.Resp.Equiv.trans
+-/
 
+#print PSet.Resp.setoid /-
 instance Resp.setoid {n} : Setoid (Resp n) :=
   ⟨Resp.Equiv, Resp.Equiv.refl, fun x y => Resp.Equiv.symm, fun x y z => Resp.Equiv.trans⟩
 #align pSet.resp.setoid PSet.Resp.setoid
+-/
 
 end PSet
 
+#print ZFSet /-
 /-- The ZFC universe of sets consists of the type of pre-sets,
   quotiented by extensional equivalence. -/
-def SetCat : Type (u + 1) :=
+def ZFSet : Type (u + 1) :=
   Quotient PSet.setoid.{u}
-#align Set SetCat
+#align Set ZFSet
+-/
 
 namespace PSet
 
 namespace Resp
 
+#print PSet.Resp.EvalAux /-
 /-- Helper function for `pSet.eval`. -/
-def evalAux :
-    ∀ {n}, { f : Resp n → Arity SetCat.{u} n // ∀ a b : Resp n, Resp.Equiv a b → f a = f b }
+def EvalAux :
+    ∀ {n}, { f : Resp n → Arity ZFSet.{u} n // ∀ a b : Resp n, Resp.Equiv a b → f a = f b }
   | 0 => ⟨fun a => ⟦a.1⟧, fun a b h => Quotient.sound h⟩
   | n + 1 =>
-    let F : Resp (n + 1) → Arity SetCat (n + 1) := fun a =>
+    let F : Resp (n + 1) → Arity ZFSet (n + 1) := fun a =>
       @Quotient.lift _ _ PSet.setoid (fun x => eval_aux.1 (a.f x)) fun b c h =>
         eval_aux.2 _ _ (a.2 _ _ h)
     ⟨F, fun b c h =>
       funext <|
         @Quotient.ind _ _ (fun q => F b q = F c q) fun z =>
           eval_aux.2 (Resp.f b z) (Resp.f c z) (h _ _ (PSet.Equiv.refl z))⟩
-#align pSet.resp.eval_aux PSet.Resp.evalAux
+#align pSet.resp.eval_aux PSet.Resp.EvalAux
+-/
 
+#print PSet.Resp.eval /-
 /-- An equivalence-respecting function yields an n-ary ZFC set function. -/
-def eval (n) : Resp n → Arity SetCat.{u} n :=
-  evalAux.1
+def eval (n) : Resp n → Arity ZFSet.{u} n :=
+  EvalAux.1
 #align pSet.resp.eval PSet.Resp.eval
+-/
 
-theorem eval_val {n f x} : (@eval (n + 1) f : SetCat → Arity SetCat n) ⟦x⟧ = eval n (Resp.f f x) :=
+#print PSet.Resp.eval_val /-
+theorem eval_val {n f x} : (@eval (n + 1) f : ZFSet → Arity ZFSet n) ⟦x⟧ = eval n (Resp.f f x) :=
   rfl
 #align pSet.resp.eval_val PSet.Resp.eval_val
+-/
 
 end Resp
 
+#print PSet.Definable /-
 /-- 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. -/
-class inductive Definable (n) : Arity SetCat.{u} n → Type (u + 1)
+class inductive Definable (n) : Arity ZFSet.{u} n → Type (u + 1)
   | mk (f) : definable (Resp.eval n f)
 #align pSet.definable PSet.Definable
+-/
 
 attribute [instance] definable.mk
 
+#print PSet.Definable.EqMk /-
 /-- The evaluation of a function respecting equivalence is definable, by that same function. -/
-def Definable.eqMk {n} (f) : ∀ {s : Arity SetCat.{u} n} (H : Resp.eval _ f = s), Definable n s
+def Definable.EqMk {n} (f) : ∀ {s : Arity ZFSet.{u} n} (H : Resp.eval _ f = s), Definable n s
   | _, rfl => ⟨f⟩
-#align pSet.definable.eq_mk PSet.Definable.eqMk
+#align pSet.definable.eq_mk PSet.Definable.EqMk
+-/
 
+#print PSet.Definable.Resp /-
 /-- Turns a definable function into a function that respects equivalence. -/
-def Definable.resp {n} : ∀ (s : Arity SetCat.{u} n) [Definable n s], Resp n
+def Definable.Resp {n} : ∀ (s : Arity ZFSet.{u} n) [Definable n s], Resp n
   | _, ⟨f⟩ => f
-#align pSet.definable.resp PSet.Definable.resp
+#align pSet.definable.resp PSet.Definable.Resp
+-/
 
+#print PSet.Definable.eq /-
 theorem Definable.eq {n} :
-    ∀ (s : Arity SetCat.{u} n) [H : Definable n s], (@Definable.resp n s H).eval _ = s
+    ∀ (s : Arity ZFSet.{u} n) [H : Definable n s], (@Definable.Resp n s H).eval _ = s
   | _, ⟨f⟩ => rfl
 #align pSet.definable.eq PSet.Definable.eq
+-/
 
 end PSet
 
@@ -653,12 +873,13 @@ namespace Classical
 
 open PSet
 
+#print Classical.AllDefinable /-
 /-- All functions are classically definable. -/
-noncomputable def allDefinable : ∀ {n} (F : Arity SetCat.{u} n), Definable n F
+noncomputable def AllDefinable : ∀ {n} (F : Arity ZFSet.{u} n), Definable n F
   | 0, F =>
     let p := @Quotient.exists_rep PSet _ F
-    Definable.eqMk ⟨choose p, Equiv.rfl⟩ (choose_spec p)
-  | n + 1, (F : Arity SetCat.{u} (n + 1)) =>
+    Definable.EqMk ⟨choose p, Equiv.rfl⟩ (choose_spec p)
+  | n + 1, (F : Arity ZFSet.{u} (n + 1)) =>
     by
     have I := fun x => all_definable (F x)
     refine' definable.eq_mk ⟨fun x : PSet => (@definable.resp _ _ (I ⟦x⟧)).1, _⟩ _
@@ -669,72 +890,96 @@ noncomputable def allDefinable : ∀ {n} (F : Arity SetCat.{u} n), Definable n F
     refine' funext fun q => Quotient.inductionOn q fun x => _
     simp_rw [resp.eval_val, resp.f, Subtype.val_eq_coe, Subtype.coe_eta]
     exact @definable.eq _ (F ⟦x⟧) (I ⟦x⟧)
-#align classical.all_definable Classical.allDefinable
+#align classical.all_definable Classical.AllDefinable
+-/
 
 end Classical
 
-namespace SetCat
+namespace ZFSet
 
 open PSet
 
+#print ZFSet.mk /-
 /-- Turns a pre-set into a ZFC set. -/
-def mk : PSet → SetCat :=
+def mk : PSet → ZFSet :=
   Quotient.mk'
-#align Set.mk SetCat.mk
+#align Set.mk ZFSet.mk
+-/
 
+#print ZFSet.mk_eq /-
 @[simp]
-theorem mk'_eq (x : PSet) : @Eq SetCat ⟦x⟧ (mk x) :=
+theorem mk_eq (x : PSet) : @Eq ZFSet ⟦x⟧ (mk x) :=
   rfl
-#align Set.mk_eq SetCat.mk'_eq
+#align Set.mk_eq ZFSet.mk_eq
+-/
 
+#print ZFSet.mk_out /-
 @[simp]
-theorem mk_out : ∀ x : SetCat, mk x.out = x :=
+theorem mk_out : ∀ x : ZFSet, mk x.out = x :=
   Quotient.out_eq
-#align Set.mk_out SetCat.mk_out
+#align Set.mk_out ZFSet.mk_out
+-/
 
+#print ZFSet.eq /-
 theorem eq {x y : PSet} : mk x = mk y ↔ Equiv x y :=
   Quotient.eq'
-#align Set.eq SetCat.eq
+#align Set.eq ZFSet.eq
+-/
 
+#print ZFSet.sound /-
 theorem sound {x y : PSet} (h : PSet.Equiv x y) : mk x = mk y :=
   Quotient.sound h
-#align Set.sound SetCat.sound
+#align Set.sound ZFSet.sound
+-/
 
+#print ZFSet.exact /-
 theorem exact {x y : PSet} : mk x = mk y → PSet.Equiv x y :=
   Quotient.exact
-#align Set.exact SetCat.exact
+#align Set.exact ZFSet.exact
+-/
 
+#print ZFSet.eval_mk /-
 @[simp]
 theorem eval_mk {n f x} :
-    (@Resp.eval (n + 1) f : SetCat → Arity SetCat n) (mk x) = Resp.eval n (Resp.f f x) :=
+    (@Resp.eval (n + 1) f : ZFSet → Arity ZFSet n) (mk x) = Resp.eval n (Resp.f f x) :=
   rfl
-#align Set.eval_mk SetCat.eval_mk
+#align Set.eval_mk ZFSet.eval_mk
+-/
 
+#print ZFSet.Mem /-
 /-- The membership relation for ZFC sets is inherited from the membership relation for pre-sets. -/
-protected def Mem : SetCat → SetCat → Prop :=
+protected def Mem : ZFSet → ZFSet → Prop :=
   Quotient.lift₂ PSet.Mem fun x y x' y' hx hy =>
     propext ((Mem.congr_left hx).trans (Mem.congr_right hy))
-#align Set.mem SetCat.Mem
+#align Set.mem ZFSet.Mem
+-/
 
-instance : Membership SetCat SetCat :=
-  ⟨SetCat.Mem⟩
+instance : Membership ZFSet ZFSet :=
+  ⟨ZFSet.Mem⟩
 
+#print ZFSet.mk_mem_iff /-
 @[simp]
 theorem mk_mem_iff {x y : PSet} : mk x ∈ mk y ↔ x ∈ y :=
   Iff.rfl
-#align Set.mk_mem_iff SetCat.mk_mem_iff
+#align Set.mk_mem_iff ZFSet.mk_mem_iff
+-/
 
+#print ZFSet.toSet /-
 /-- Convert a ZFC set into a `set` of ZFC sets -/
-def toSet (u : SetCat.{u}) : Set SetCat.{u} :=
+def toSet (u : ZFSet.{u}) : Set ZFSet.{u} :=
   { x | x ∈ u }
-#align Set.to_set SetCat.toSet
+#align Set.to_set ZFSet.toSet
+-/
 
+#print ZFSet.mem_toSet /-
 @[simp]
-theorem mem_toSet (a u : SetCat.{u}) : a ∈ u.toSet ↔ a ∈ u :=
+theorem mem_toSet (a u : ZFSet.{u}) : a ∈ u.toSet ↔ a ∈ u :=
   Iff.rfl
-#align Set.mem_to_set SetCat.mem_toSet
+#align Set.mem_to_set ZFSet.mem_toSet
+-/
 
-instance small_toSet (x : SetCat.{u}) : Small.{u} x.toSet :=
+#print ZFSet.small_toSet /-
+instance small_toSet (x : ZFSet.{u}) : Small.{u} x.toSet :=
   Quotient.inductionOn x fun a =>
     by
     let f : a.type → (mk a).toSet := fun i => ⟨mk <| a.func i, func_mem a i⟩
@@ -743,45 +988,61 @@ instance small_toSet (x : SetCat.{u}) : Small.{u} x.toSet :=
     induction y using Quotient.inductionOn
     cases' hb with i h
     exact ⟨i, Subtype.coe_injective (Quotient.sound h.symm)⟩
-#align Set.small_to_set SetCat.small_toSet
+#align Set.small_to_set ZFSet.small_toSet
+-/
 
+#print ZFSet.Nonempty /-
 /-- A nonempty set is one that contains some element. -/
-protected def Nonempty (u : SetCat) : Prop :=
+protected def Nonempty (u : ZFSet) : Prop :=
   u.toSet.Nonempty
-#align Set.nonempty SetCat.Nonempty
+#align Set.nonempty ZFSet.Nonempty
+-/
 
-theorem nonempty_def (u : SetCat) : u.Nonempty ↔ ∃ x, x ∈ u :=
+#print ZFSet.nonempty_def /-
+theorem nonempty_def (u : ZFSet) : u.Nonempty ↔ ∃ x, x ∈ u :=
   Iff.rfl
-#align Set.nonempty_def SetCat.nonempty_def
+#align Set.nonempty_def ZFSet.nonempty_def
+-/
 
-theorem nonempty_of_mem {x u : SetCat} (h : x ∈ u) : u.Nonempty :=
+#print ZFSet.nonempty_of_mem /-
+theorem nonempty_of_mem {x u : ZFSet} (h : x ∈ u) : u.Nonempty :=
   ⟨x, h⟩
-#align Set.nonempty_of_mem SetCat.nonempty_of_mem
+#align Set.nonempty_of_mem ZFSet.nonempty_of_mem
+-/
 
+#print ZFSet.nonempty_toSet_iff /-
 @[simp]
-theorem nonempty_toSet_iff {u : SetCat} : u.toSet.Nonempty ↔ u.Nonempty :=
+theorem nonempty_toSet_iff {u : ZFSet} : u.toSet.Nonempty ↔ u.Nonempty :=
   Iff.rfl
-#align Set.nonempty_to_set_iff SetCat.nonempty_toSet_iff
+#align Set.nonempty_to_set_iff ZFSet.nonempty_toSet_iff
+-/
 
+#print ZFSet.Subset /-
 /-- `x ⊆ y` as ZFC sets means that all members of `x` are members of `y`. -/
-protected def Subset (x y : SetCat.{u}) :=
+protected def Subset (x y : ZFSet.{u}) :=
   ∀ ⦃z⦄, z ∈ x → z ∈ y
-#align Set.subset SetCat.Subset
+#align Set.subset ZFSet.Subset
+-/
 
-instance hasSubset : HasSubset SetCat :=
-  ⟨SetCat.Subset⟩
-#align Set.has_subset SetCat.hasSubset
+#print ZFSet.hasSubset /-
+instance hasSubset : HasSubset ZFSet :=
+  ⟨ZFSet.Subset⟩
+#align Set.has_subset ZFSet.hasSubset
+-/
 
-theorem subset_def {x y : SetCat.{u}} : x ⊆ y ↔ ∀ ⦃z⦄, z ∈ x → z ∈ y :=
+#print ZFSet.subset_def /-
+theorem subset_def {x y : ZFSet.{u}} : x ⊆ y ↔ ∀ ⦃z⦄, z ∈ x → z ∈ y :=
   Iff.rfl
-#align Set.subset_def SetCat.subset_def
+#align Set.subset_def ZFSet.subset_def
+-/
 
-instance : IsRefl SetCat (· ⊆ ·) :=
+instance : IsRefl ZFSet (· ⊆ ·) :=
   ⟨fun x a => id⟩
 
-instance : IsTrans SetCat (· ⊆ ·) :=
+instance : IsTrans ZFSet (· ⊆ ·) :=
   ⟨fun x y z hxy hyz a ha => hyz (hxy ha)⟩
 
+#print ZFSet.subset_iff /-
 @[simp]
 theorem subset_iff : ∀ {x y : PSet}, mk x ⊆ mk y ↔ x ⊆ y
   | ⟨α, A⟩, ⟨β, B⟩ =>
@@ -789,62 +1050,84 @@ theorem subset_iff : ∀ {x y : PSet}, mk x ⊆ mk y ↔ x ⊆ y
       Quotient.inductionOn z fun z ⟨a, za⟩ =>
         let ⟨b, ab⟩ := h a
         ⟨b, za.trans ab⟩⟩
-#align Set.subset_iff SetCat.subset_iff
+#align Set.subset_iff ZFSet.subset_iff
+-/
 
+#print ZFSet.toSet_subset_iff /-
 @[simp]
-theorem toSet_subset_iff {x y : SetCat} : x.toSet ⊆ y.toSet ↔ x ⊆ y := by
+theorem toSet_subset_iff {x y : ZFSet} : x.toSet ⊆ y.toSet ↔ x ⊆ y := by
   simp [subset_def, Set.subset_def]
-#align Set.to_set_subset_iff SetCat.toSet_subset_iff
+#align Set.to_set_subset_iff ZFSet.toSet_subset_iff
+-/
 
+#print ZFSet.ext /-
 @[ext]
-theorem ext {x y : SetCat.{u}} : (∀ z : SetCat.{u}, z ∈ x ↔ z ∈ y) → x = y :=
+theorem ext {x y : ZFSet.{u}} : (∀ z : ZFSet.{u}, z ∈ x ↔ z ∈ y) → x = y :=
   Quotient.induction_on₂ x y fun u v h => Quotient.sound (Mem.ext fun w => h ⟦w⟧)
-#align Set.ext SetCat.ext
+#align Set.ext ZFSet.ext
+-/
 
-theorem ext_iff {x y : SetCat.{u}} : x = y ↔ ∀ z : SetCat.{u}, z ∈ x ↔ z ∈ y :=
+#print ZFSet.ext_iff /-
+theorem ext_iff {x y : ZFSet.{u}} : x = y ↔ ∀ z : ZFSet.{u}, z ∈ x ↔ z ∈ y :=
   ⟨fun h => by simp [h], ext⟩
-#align Set.ext_iff SetCat.ext_iff
+#align Set.ext_iff ZFSet.ext_iff
+-/
 
+#print ZFSet.toSet_injective /-
 theorem toSet_injective : Function.Injective toSet := fun x y h => ext <| Set.ext_iff.1 h
-#align Set.to_set_injective SetCat.toSet_injective
+#align Set.to_set_injective ZFSet.toSet_injective
+-/
 
+#print ZFSet.toSet_inj /-
 @[simp]
-theorem toSet_inj {x y : SetCat} : x.toSet = y.toSet ↔ x = y :=
+theorem toSet_inj {x y : ZFSet} : x.toSet = y.toSet ↔ x = y :=
   toSet_injective.eq_iff
-#align Set.to_set_inj SetCat.toSet_inj
+#align Set.to_set_inj ZFSet.toSet_inj
+-/
 
-instance : IsAntisymm SetCat (· ⊆ ·) :=
+instance : IsAntisymm ZFSet (· ⊆ ·) :=
   ⟨fun a b hab hba => ext fun c => ⟨@hab c, @hba c⟩⟩
 
+#print ZFSet.empty /-
 /-- The empty ZFC set -/
-protected def empty : SetCat :=
+protected def empty : ZFSet :=
   mk ∅
-#align Set.empty SetCat.empty
+#align Set.empty ZFSet.empty
+-/
 
-instance : EmptyCollection SetCat :=
-  ⟨SetCat.empty⟩
+instance : EmptyCollection ZFSet :=
+  ⟨ZFSet.empty⟩
 
-instance : Inhabited SetCat :=
+instance : Inhabited ZFSet :=
   ⟨∅⟩
 
+#print ZFSet.not_mem_empty /-
 @[simp]
-theorem not_mem_empty (x) : x ∉ (∅ : SetCat.{u}) :=
+theorem not_mem_empty (x) : x ∉ (∅ : ZFSet.{u}) :=
   Quotient.inductionOn x PSet.not_mem_empty
-#align Set.not_mem_empty SetCat.not_mem_empty
+#align Set.not_mem_empty ZFSet.not_mem_empty
+-/
 
+#print ZFSet.toSet_empty /-
 @[simp]
 theorem toSet_empty : toSet ∅ = ∅ := by simp [to_set]
-#align Set.to_set_empty SetCat.toSet_empty
+#align Set.to_set_empty ZFSet.toSet_empty
+-/
 
+#print ZFSet.empty_subset /-
 @[simp]
-theorem empty_subset (x : SetCat.{u}) : (∅ : SetCat) ⊆ x :=
+theorem empty_subset (x : ZFSet.{u}) : (∅ : ZFSet) ⊆ x :=
   Quotient.inductionOn x fun y => subset_iff.2 <| PSet.empty_subset y
-#align Set.empty_subset SetCat.empty_subset
+#align Set.empty_subset ZFSet.empty_subset
+-/
 
+#print ZFSet.not_nonempty_empty /-
 @[simp]
-theorem not_nonempty_empty : ¬SetCat.Nonempty ∅ := by simp [SetCat.Nonempty]
-#align Set.not_nonempty_empty SetCat.not_nonempty_empty
+theorem not_nonempty_empty : ¬ZFSet.Nonempty ∅ := by simp [ZFSet.Nonempty]
+#align Set.not_nonempty_empty ZFSet.not_nonempty_empty
+-/
 
+#print ZFSet.nonempty_mk_iff /-
 @[simp]
 theorem nonempty_mk_iff {x : PSet} : (mk x).Nonempty ↔ x.Nonempty :=
   by
@@ -852,22 +1135,28 @@ theorem nonempty_mk_iff {x : PSet} : (mk x).Nonempty ↔ x.Nonempty :=
   rintro ⟨a, h⟩
   induction a using Quotient.inductionOn
   exact ⟨a, h⟩
-#align Set.nonempty_mk_iff SetCat.nonempty_mk_iff
+#align Set.nonempty_mk_iff ZFSet.nonempty_mk_iff
+-/
 
-theorem eq_empty (x : SetCat.{u}) : x = ∅ ↔ ∀ y : SetCat.{u}, y ∉ x :=
+#print ZFSet.eq_empty /-
+theorem eq_empty (x : ZFSet.{u}) : x = ∅ ↔ ∀ y : ZFSet.{u}, y ∉ x :=
   by
   rw [ext_iff]
   simp
-#align Set.eq_empty SetCat.eq_empty
+#align Set.eq_empty ZFSet.eq_empty
+-/
 
-theorem eq_empty_or_nonempty (u : SetCat) : u = ∅ ∨ u.Nonempty :=
+#print ZFSet.eq_empty_or_nonempty /-
+theorem eq_empty_or_nonempty (u : ZFSet) : u = ∅ ∨ u.Nonempty :=
   by
   rw [eq_empty, ← not_exists]
   apply em'
-#align Set.eq_empty_or_nonempty SetCat.eq_empty_or_nonempty
+#align Set.eq_empty_or_nonempty ZFSet.eq_empty_or_nonempty
+-/
 
+#print ZFSet.Insert /-
 /-- `insert x y` is the set `{x} ∪ y` -/
-protected def insert : SetCat → SetCat → SetCat :=
+protected def Insert : ZFSet → ZFSet → ZFSet :=
   Resp.eval 2
     ⟨PSet.insert, fun u v uv ⟨α, A⟩ ⟨β, B⟩ ⟨αβ, βα⟩ =>
       ⟨fun o =>
@@ -882,19 +1171,21 @@ protected def insert : SetCat → SetCat → SetCat :=
           let ⟨a, ha⟩ := βα b
           ⟨some a, ha⟩
         | none => ⟨none, uv⟩⟩⟩
-#align Set.insert SetCat.insert
+#align Set.insert ZFSet.Insert
+-/
 
-instance : Insert SetCat SetCat :=
-  ⟨SetCat.insert⟩
+instance : Insert ZFSet ZFSet :=
+  ⟨ZFSet.Insert⟩
 
-instance : Singleton SetCat SetCat :=
+instance : Singleton ZFSet ZFSet :=
   ⟨fun x => insert x ∅⟩
 
-instance : IsLawfulSingleton SetCat SetCat :=
+instance : IsLawfulSingleton ZFSet ZFSet :=
   ⟨fun x => rfl⟩
 
+#print ZFSet.mem_insert_iff /-
 @[simp]
-theorem mem_insert_iff {x y z : SetCat.{u}} : x ∈ insert y z ↔ x = y ∨ x ∈ z :=
+theorem mem_insert_iff {x y z : ZFSet.{u}} : x ∈ insert y z ↔ x = y ∨ x ∈ z :=
   Quotient.induction_on₃ x y z fun x y ⟨α, A⟩ =>
     show (x ∈ PSet.mk (Option α) fun o => Option.rec y A o) ↔ mk x = mk y ∨ x ∈ PSet.mk α A from
       ⟨fun m =>
@@ -905,103 +1196,132 @@ theorem mem_insert_iff {x y z : SetCat.{u}} : x ∈ insert y z ↔ x = y ∨ x 
         match m with
         | Or.inr ⟨a, ha⟩ => ⟨some a, ha⟩
         | Or.inl h => ⟨none, Quotient.exact h⟩⟩
-#align Set.mem_insert_iff SetCat.mem_insert_iff
+#align Set.mem_insert_iff ZFSet.mem_insert_iff
+-/
 
-theorem mem_insert (x y : SetCat) : x ∈ insert x y :=
+#print ZFSet.mem_insert /-
+theorem mem_insert (x y : ZFSet) : x ∈ insert x y :=
   mem_insert_iff.2 <| Or.inl rfl
-#align Set.mem_insert SetCat.mem_insert
+#align Set.mem_insert ZFSet.mem_insert
+-/
 
-theorem mem_insert_of_mem {y z : SetCat} (x) (h : z ∈ y) : z ∈ insert x y :=
+#print ZFSet.mem_insert_of_mem /-
+theorem mem_insert_of_mem {y z : ZFSet} (x) (h : z ∈ y) : z ∈ insert x y :=
   mem_insert_iff.2 <| Or.inr h
-#align Set.mem_insert_of_mem SetCat.mem_insert_of_mem
+#align Set.mem_insert_of_mem ZFSet.mem_insert_of_mem
+-/
 
+#print ZFSet.toSet_insert /-
 @[simp]
-theorem toSet_insert (x y : SetCat) : (insert x y).toSet = insert x y.toSet :=
+theorem toSet_insert (x y : ZFSet) : (insert x y).toSet = insert x y.toSet :=
   by
   ext
   simp
-#align Set.to_set_insert SetCat.toSet_insert
+#align Set.to_set_insert ZFSet.toSet_insert
+-/
 
+#print ZFSet.mem_singleton /-
 @[simp]
-theorem mem_singleton {x y : SetCat.{u}} : x ∈ @singleton SetCat.{u} SetCat.{u} _ y ↔ x = y :=
+theorem mem_singleton {x y : ZFSet.{u}} : x ∈ @singleton ZFSet.{u} ZFSet.{u} _ y ↔ x = y :=
   Iff.trans mem_insert_iff
     ⟨fun o => Or.ndrec (fun h => h) (fun n => absurd n (not_mem_empty _)) o, Or.inl⟩
-#align Set.mem_singleton SetCat.mem_singleton
+#align Set.mem_singleton ZFSet.mem_singleton
+-/
 
+#print ZFSet.toSet_singleton /-
 @[simp]
-theorem toSet_singleton (x : SetCat) : ({x} : SetCat).toSet = {x} :=
+theorem toSet_singleton (x : ZFSet) : ({x} : ZFSet).toSet = {x} :=
   by
   ext
   simp
-#align Set.to_set_singleton SetCat.toSet_singleton
+#align Set.to_set_singleton ZFSet.toSet_singleton
+-/
 
-theorem insert_nonempty (u v : SetCat) : (insert u v).Nonempty :=
+#print ZFSet.insert_nonempty /-
+theorem insert_nonempty (u v : ZFSet) : (insert u v).Nonempty :=
   ⟨u, mem_insert u v⟩
-#align Set.insert_nonempty SetCat.insert_nonempty
+#align Set.insert_nonempty ZFSet.insert_nonempty
+-/
 
-theorem singleton_nonempty (u : SetCat) : SetCat.Nonempty {u} :=
+#print ZFSet.singleton_nonempty /-
+theorem singleton_nonempty (u : ZFSet) : ZFSet.Nonempty {u} :=
   insert_nonempty u ∅
-#align Set.singleton_nonempty SetCat.singleton_nonempty
+#align Set.singleton_nonempty ZFSet.singleton_nonempty
+-/
 
+#print ZFSet.mem_pair /-
 @[simp]
-theorem mem_pair {x y z : SetCat.{u}} : x ∈ ({y, z} : SetCat) ↔ x = y ∨ x = z :=
+theorem mem_pair {x y z : ZFSet.{u}} : x ∈ ({y, z} : ZFSet) ↔ x = y ∨ x = z :=
   Iff.trans mem_insert_iff <| or_congr Iff.rfl mem_singleton
-#align Set.mem_pair SetCat.mem_pair
+#align Set.mem_pair ZFSet.mem_pair
+-/
 
+#print ZFSet.omega /-
 /-- `omega` is the first infinite von Neumann ordinal -/
-def omega : SetCat :=
+def omega : ZFSet :=
   mk omega
-#align Set.omega SetCat.omega
+#align Set.omega ZFSet.omega
+-/
 
+#print ZFSet.omega_zero /-
 @[simp]
 theorem omega_zero : ∅ ∈ omega :=
   ⟨⟨0⟩, Equiv.rfl⟩
-#align Set.omega_zero SetCat.omega_zero
+#align Set.omega_zero ZFSet.omega_zero
+-/
 
+#print ZFSet.omega_succ /-
 @[simp]
 theorem omega_succ {n} : n ∈ omega.{u} → insert n n ∈ omega.{u} :=
   Quotient.inductionOn n fun x ⟨⟨n⟩, h⟩ =>
     ⟨⟨n + 1⟩,
-      SetCat.exact <|
-        show insert (mk x) (mk x) = insert (mk <| ofNat n) (mk <| ofNat n) by rw [SetCat.sound h];
+      ZFSet.exact <|
+        show insert (mk x) (mk x) = insert (mk <| ofNat n) (mk <| ofNat n) by rw [ZFSet.sound h];
           rfl⟩
-#align Set.omega_succ SetCat.omega_succ
+#align Set.omega_succ ZFSet.omega_succ
+-/
 
+#print ZFSet.sep /-
 /-- `{x ∈ a | p x}` is the set of elements in `a` satisfying `p` -/
-protected def sep (p : SetCat → Prop) : SetCat → SetCat :=
+protected def sep (p : ZFSet → Prop) : ZFSet → ZFSet :=
   Resp.eval 1
     ⟨PSet.sep fun y => p (mk y), fun ⟨α, A⟩ ⟨β, B⟩ ⟨αβ, βα⟩ =>
       ⟨fun ⟨a, pa⟩ =>
         let ⟨b, hb⟩ := αβ a
-        ⟨⟨b, by rwa [mk_func, ← SetCat.sound hb]⟩, hb⟩,
+        ⟨⟨b, by rwa [mk_func, ← ZFSet.sound hb]⟩, hb⟩,
         fun ⟨b, pb⟩ =>
         let ⟨a, ha⟩ := βα b
-        ⟨⟨a, by rwa [mk_func, SetCat.sound ha]⟩, ha⟩⟩⟩
-#align Set.sep SetCat.sep
+        ⟨⟨a, by rwa [mk_func, ZFSet.sound ha]⟩, ha⟩⟩⟩
+#align Set.sep ZFSet.sep
+-/
 
-instance : Sep SetCat SetCat :=
-  ⟨SetCat.sep⟩
+instance : Sep ZFSet ZFSet :=
+  ⟨ZFSet.sep⟩
 
+#print ZFSet.mem_sep /-
 @[simp]
-theorem mem_sep {p : SetCat.{u} → Prop} {x y : SetCat.{u}} : y ∈ { y ∈ x | p y } ↔ y ∈ x ∧ p y :=
+theorem mem_sep {p : ZFSet.{u} → Prop} {x y : ZFSet.{u}} : y ∈ { y ∈ x | p y } ↔ y ∈ x ∧ p y :=
   Quotient.induction_on₂ x y fun ⟨α, A⟩ y =>
     ⟨fun ⟨⟨a, pa⟩, h⟩ => ⟨⟨a, h⟩, by rwa [@Quotient.sound PSet _ _ _ h]⟩, fun ⟨⟨a, h⟩, pa⟩ =>
       ⟨⟨a, by
           rw [mk_func] at h
-          rwa [mk_func, ← SetCat.sound h]⟩,
+          rwa [mk_func, ← ZFSet.sound h]⟩,
         h⟩⟩
-#align Set.mem_sep SetCat.mem_sep
+#align Set.mem_sep ZFSet.mem_sep
+-/
 
+#print ZFSet.toSet_sep /-
 @[simp]
-theorem toSet_sep (a : SetCat) (p : SetCat → Prop) :
-    { x ∈ a | p x }.toSet = { x ∈ a.toSet | p x } :=
+theorem toSet_sep (a : ZFSet) (p : ZFSet → Prop) : { x ∈ a | p x }.toSet = { x ∈ a.toSet | p x } :=
   by
   ext
   simp
-#align Set.to_set_sep SetCat.toSet_sep
+#align Set.to_set_sep ZFSet.toSet_sep
+-/
 
+#print ZFSet.powerset /-
 /-- The powerset operation, the collection of subsets of a ZFC set -/
-def powerset : SetCat → SetCat :=
+def powerset : ZFSet → ZFSet :=
   Resp.eval 1
     ⟨powerset, fun ⟨α, A⟩ ⟨β, B⟩ ⟨αβ, βα⟩ =>
       ⟨fun p =>
@@ -1013,16 +1333,20 @@ def powerset : SetCat → SetCat :=
         ⟨{ a | ∃ b, q b ∧ Equiv (A a) (B b) }, fun ⟨a, b, qb, ab⟩ => ⟨⟨b, qb⟩, ab⟩, fun ⟨b, qb⟩ =>
           let ⟨a, ab⟩ := βα b
           ⟨⟨a, b, qb, ab⟩, ab⟩⟩⟩⟩
-#align Set.powerset SetCat.powerset
+#align Set.powerset ZFSet.powerset
+-/
 
+#print ZFSet.mem_powerset /-
 @[simp]
-theorem mem_powerset {x y : SetCat.{u}} : y ∈ powerset x ↔ y ⊆ x :=
+theorem mem_powerset {x y : ZFSet.{u}} : y ∈ powerset x ↔ y ⊆ x :=
   Quotient.induction_on₂ x y fun ⟨α, A⟩ ⟨β, B⟩ =>
     show (⟨β, B⟩ : PSet.{u}) ∈ PSet.powerset.{u} ⟨α, A⟩ ↔ _ by simp [mem_powerset, subset_iff]
-#align Set.mem_powerset SetCat.mem_powerset
+#align Set.mem_powerset ZFSet.mem_powerset
+-/
 
-theorem sUnion_lem {α β : Type u} (A : α → PSet) (B : β → PSet) (αβ : ∀ a, ∃ b, Equiv (A a) (B b)) :
-    ∀ a, ∃ b, Equiv ((sUnion ⟨α, A⟩).func a) ((sUnion ⟨β, B⟩).func b)
+#print ZFSet.unionₛ_lem /-
+theorem unionₛ_lem {α β : Type u} (A : α → PSet) (B : β → PSet) (αβ : ∀ a, ∃ b, Equiv (A a) (B b)) :
+    ∀ a, ∃ b, Equiv ((unionₛ ⟨α, A⟩).Func a) ((unionₛ ⟨β, B⟩).Func b)
   | ⟨a, c⟩ => by
     let ⟨b, hb⟩ := αβ a
     induction' ea : A a with γ Γ
@@ -1032,194 +1356,246 @@ theorem sUnion_lem {α β : Type u} (A : α → PSet) (B : β → PSet) (αβ :
     exact
       let c : type (A a) := c
       let ⟨d, hd⟩ := γδ (by rwa [ea] at c)
-      have : PSet.Equiv ((A a).func c) ((B b).func (Eq.ndrec d (Eq.symm eb))) :=
+      have : PSet.Equiv ((A a).Func c) ((B b).Func (Eq.ndrec d (Eq.symm eb))) :=
         match A a, B b, ea, eb, c, d, hd with
         | _, _, rfl, rfl, x, y, hd => hd
       ⟨⟨b, by
           rw [mk_func]
           exact Eq.ndrec d (Eq.symm eb)⟩,
         this⟩
-#align Set.sUnion_lem SetCat.sUnion_lem
+#align Set.sUnion_lem ZFSet.unionₛ_lem
+-/
 
+#print ZFSet.unionₛ /-
 /-- The union operator, the collection of elements of elements of a ZFC set -/
-def sUnion : SetCat → SetCat :=
+def unionₛ : ZFSet → ZFSet :=
   Resp.eval 1
-    ⟨PSet.sUnion, fun ⟨α, A⟩ ⟨β, B⟩ ⟨αβ, βα⟩ =>
-      ⟨sUnion_lem A B αβ, fun a =>
+    ⟨PSet.unionₛ, fun ⟨α, A⟩ ⟨β, B⟩ ⟨αβ, βα⟩ =>
+      ⟨unionₛ_lem A B αβ, fun a =>
         Exists.elim
-          (sUnion_lem B A (fun b => Exists.elim (βα b) fun c hc => ⟨c, PSet.Equiv.symm hc⟩) a)
+          (unionₛ_lem B A (fun b => Exists.elim (βα b) fun c hc => ⟨c, PSet.Equiv.symm hc⟩) a)
           fun b hb => ⟨b, PSet.Equiv.symm hb⟩⟩⟩
-#align Set.sUnion SetCat.sUnion
+#align Set.sUnion ZFSet.unionₛ
+-/
 
 -- mathport name: Set.sUnion
-prefix:110 "⋃₀ " => SetCat.sUnion
+prefix:110 "⋃₀ " => ZFSet.unionₛ
 
 /-- The intersection operator, the collection of elements in all of the elements of a ZFC set. We
 special-case `⋂₀ ∅ = ∅`. -/
-noncomputable def sInter (x : SetCat) : SetCat := by
+noncomputable def sInter (x : ZFSet) : ZFSet := by
   classical exact dite x.nonempty (fun h => { y ∈ h.some | ∀ z ∈ x, y ∈ z }) fun _ => ∅
-#align Set.sInter SetCat.sInter
+#align Set.sInter ZFSet.sInter
 
 -- mathport name: Set.sInter
-prefix:110 "⋂₀ " => SetCat.sInter
-
+prefix:110 "⋂₀ " => ZFSet.sInter
+
+/- warning: Set.mem_sUnion -> ZFSet.mem_unionₛ is a dubious translation:
+lean 3 declaration is
+  forall {x : ZFSet.{u1}} {y : ZFSet.{u1}}, Iff (Membership.Mem.{succ u1, succ u1} ZFSet.{u1} ZFSet.{u1} ZFSet.hasMem.{u1} y (ZFSet.unionₛ.{u1} x)) (Exists.{succ (succ u1)} ZFSet.{u1} (fun (z : ZFSet.{u1}) => Exists.{0} (Membership.Mem.{succ u1, succ u1} ZFSet.{u1} ZFSet.{u1} ZFSet.hasMem.{u1} z x) (fun (H : Membership.Mem.{succ u1, succ u1} ZFSet.{u1} ZFSet.{u1} ZFSet.hasMem.{u1} z x) => Membership.Mem.{succ u1, succ u1} ZFSet.{u1} ZFSet.{u1} ZFSet.hasMem.{u1} y z)))
+but is expected to have type
+  forall {x : ZFSet.{u1}} {y : ZFSet.{u1}}, Iff (Membership.mem.{succ u1, succ u1} ZFSet.{u1} ZFSet.{u1} ZFSet.instMembershipZFSetZFSet.{u1} y (ZFSet.unionₛ.{u1} x)) (Exists.{succ (succ u1)} ZFSet.{u1} (fun (z : ZFSet.{u1}) => And (Membership.mem.{succ u1, succ u1} ZFSet.{u1} ZFSet.{u1} ZFSet.instMembershipZFSetZFSet.{u1} z x) (Membership.mem.{succ u1, succ u1} ZFSet.{u1} ZFSet.{u1} ZFSet.instMembershipZFSetZFSet.{u1} y z)))
+Case conversion may be inaccurate. Consider using '#align Set.mem_sUnion ZFSet.mem_unionₛₓ'. -/
 /- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
 @[simp]
-theorem mem_sUnion {x y : SetCat.{u}} : y ∈ ⋃₀ x ↔ ∃ z ∈ x, y ∈ z :=
+theorem mem_unionₛ {x y : ZFSet.{u}} : y ∈ ⋃₀ x ↔ ∃ z ∈ x, y ∈ z :=
   Quotient.induction_on₂ x y fun x y =>
-    Iff.trans mem_sUnion
+    Iff.trans mem_unionₛ
       ⟨fun ⟨z, h⟩ => ⟨⟦z⟧, h⟩, fun ⟨z, h⟩ => Quotient.inductionOn z (fun z h => ⟨z, h⟩) h⟩
-#align Set.mem_sUnion SetCat.mem_sUnion
+#align Set.mem_sUnion ZFSet.mem_unionₛ
 
 /- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
-theorem mem_sInter {x y : SetCat} (h : x.Nonempty) : y ∈ ⋂₀ x ↔ ∀ z ∈ x, y ∈ z :=
+theorem mem_sInter {x y : ZFSet} (h : x.Nonempty) : y ∈ ⋂₀ x ↔ ∀ z ∈ x, y ∈ z :=
   by
   rw [sInter, dif_pos h]
   simp only [mem_to_set, mem_sep, and_iff_right_iff_imp]
   exact fun H => H _ h.some_mem
-#align Set.mem_sInter SetCat.mem_sInter
+#align Set.mem_sInter ZFSet.mem_sInter
 
 /- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
+#print ZFSet.unionₛ_empty /-
 @[simp]
-theorem sUnion_empty : ⋃₀ (∅ : SetCat) = ∅ := by
+theorem unionₛ_empty : ⋃₀ (∅ : ZFSet) = ∅ := by
   ext
   simp
-#align Set.sUnion_empty SetCat.sUnion_empty
+#align Set.sUnion_empty ZFSet.unionₛ_empty
+-/
 
 /- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
 @[simp]
-theorem sInter_empty : ⋂₀ (∅ : SetCat) = ∅ :=
+theorem sInter_empty : ⋂₀ (∅ : ZFSet) = ∅ :=
   dif_neg <| by simp
-#align Set.sInter_empty SetCat.sInter_empty
+#align Set.sInter_empty ZFSet.sInter_empty
 
 /- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
-theorem mem_of_mem_sInter {x y z : SetCat} (hy : y ∈ ⋂₀ x) (hz : z ∈ x) : y ∈ z :=
+theorem mem_of_mem_sInter {x y z : ZFSet} (hy : y ∈ ⋂₀ x) (hz : z ∈ x) : y ∈ z :=
   by
   rcases eq_empty_or_nonempty x with (rfl | hx)
   · exact (not_mem_empty z hz).elim
   · exact (mem_sInter hx).1 hy z hz
-#align Set.mem_of_mem_sInter SetCat.mem_of_mem_sInter
+#align Set.mem_of_mem_sInter ZFSet.mem_of_mem_sInter
 
 /- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
-theorem mem_sUnion_of_mem {x y z : SetCat} (hy : y ∈ z) (hz : z ∈ x) : y ∈ ⋃₀ x :=
-  mem_sUnion.2 ⟨z, hz, hy⟩
-#align Set.mem_sUnion_of_mem SetCat.mem_sUnion_of_mem
+#print ZFSet.mem_unionₛ_of_mem /-
+theorem mem_unionₛ_of_mem {x y z : ZFSet} (hy : y ∈ z) (hz : z ∈ x) : y ∈ ⋃₀ x :=
+  mem_unionₛ.2 ⟨z, hz, hy⟩
+#align Set.mem_sUnion_of_mem ZFSet.mem_unionₛ_of_mem
+-/
 
 /- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
-theorem not_mem_sInter_of_not_mem {x y z : SetCat} (hy : ¬y ∈ z) (hz : z ∈ x) : ¬y ∈ ⋂₀ x :=
+theorem not_mem_sInter_of_not_mem {x y z : ZFSet} (hy : ¬y ∈ z) (hz : z ∈ x) : ¬y ∈ ⋂₀ x :=
   fun hx => hy <| mem_of_mem_sInter hx hz
-#align Set.not_mem_sInter_of_not_mem SetCat.not_mem_sInter_of_not_mem
+#align Set.not_mem_sInter_of_not_mem ZFSet.not_mem_sInter_of_not_mem
 
 /- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
+#print ZFSet.unionₛ_singleton /-
 @[simp]
-theorem sUnion_singleton {x : SetCat.{u}} : ⋃₀ ({x} : SetCat) = x :=
+theorem unionₛ_singleton {x : ZFSet.{u}} : ⋃₀ ({x} : ZFSet) = x :=
   ext fun y => by simp_rw [mem_sUnion, exists_prop, mem_singleton, exists_eq_left]
-#align Set.sUnion_singleton SetCat.sUnion_singleton
+#align Set.sUnion_singleton ZFSet.unionₛ_singleton
+-/
 
 /- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
 @[simp]
-theorem sInter_singleton {x : SetCat.{u}} : ⋂₀ ({x} : SetCat) = x :=
+theorem sInter_singleton {x : ZFSet.{u}} : ⋂₀ ({x} : ZFSet) = x :=
   ext fun y => by simp_rw [mem_sInter (singleton_nonempty x), mem_singleton, forall_eq]
-#align Set.sInter_singleton SetCat.sInter_singleton
+#align Set.sInter_singleton ZFSet.sInter_singleton
 
 /- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
 /- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
+#print ZFSet.to_set_unionₛ /-
 @[simp]
-theorem toSet_sUnion (x : SetCat.{u}) : (⋃₀ x).toSet = ⋃₀ (toSet '' x.toSet) :=
+theorem to_set_unionₛ (x : ZFSet.{u}) : (⋃₀ x).toSet = ⋃₀ (toSet '' x.toSet) :=
   by
   ext
   simp
-#align Set.to_set_sUnion SetCat.toSet_sUnion
+#align Set.to_set_sUnion ZFSet.to_set_unionₛ
+-/
 
 /- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
 /- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
-theorem toSet_sInter {x : SetCat.{u}} (h : x.Nonempty) : (⋂₀ x).toSet = ⋂₀ (toSet '' x.toSet) :=
+theorem toSet_sInter {x : ZFSet.{u}} (h : x.Nonempty) : (⋂₀ x).toSet = ⋂₀ (toSet '' x.toSet) :=
   by
   ext
   simp [mem_sInter h]
-#align Set.to_set_sInter SetCat.toSet_sInter
+#align Set.to_set_sInter ZFSet.toSet_sInter
 
-theorem singleton_injective : Function.Injective (@singleton SetCat SetCat _) := fun x y H =>
+#print ZFSet.singleton_injective /-
+theorem singleton_injective : Function.Injective (@singleton ZFSet ZFSet _) := fun x y H =>
   by
-  let this := congr_arg sUnion H
+  let this := congr_arg unionₛ H
   rwa [sUnion_singleton, sUnion_singleton] at this
-#align Set.singleton_injective SetCat.singleton_injective
+#align Set.singleton_injective ZFSet.singleton_injective
+-/
 
+#print ZFSet.singleton_inj /-
 @[simp]
-theorem singleton_inj {x y : SetCat} : ({x} : SetCat) = {y} ↔ x = y :=
+theorem singleton_inj {x y : ZFSet} : ({x} : ZFSet) = {y} ↔ x = y :=
   singleton_injective.eq_iff
-#align Set.singleton_inj SetCat.singleton_inj
+#align Set.singleton_inj ZFSet.singleton_inj
+-/
 
 /- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
+#print ZFSet.union /-
 /-- The binary union operation -/
-protected def union (x y : SetCat.{u}) : SetCat.{u} :=
+protected def union (x y : ZFSet.{u}) : ZFSet.{u} :=
   ⋃₀ {x, y}
-#align Set.union SetCat.union
+#align Set.union ZFSet.union
+-/
 
+#print ZFSet.inter /-
 /-- The binary intersection operation -/
-protected def inter (x y : SetCat.{u}) : SetCat.{u} :=
+protected def inter (x y : ZFSet.{u}) : ZFSet.{u} :=
   { z ∈ x | z ∈ y }
-#align Set.inter SetCat.inter
+#align Set.inter ZFSet.inter
+-/
 
+#print ZFSet.diff /-
 /-- The set difference operation -/
-protected def diff (x y : SetCat.{u}) : SetCat.{u} :=
+protected def diff (x y : ZFSet.{u}) : ZFSet.{u} :=
   { z ∈ x | z ∉ y }
-#align Set.diff SetCat.diff
+#align Set.diff ZFSet.diff
+-/
 
-instance : Union SetCat :=
-  ⟨SetCat.union⟩
+instance : Union ZFSet :=
+  ⟨ZFSet.union⟩
 
-instance : Inter SetCat :=
-  ⟨SetCat.inter⟩
+instance : Inter ZFSet :=
+  ⟨ZFSet.inter⟩
 
-instance : SDiff SetCat :=
-  ⟨SetCat.diff⟩
+instance : SDiff ZFSet :=
+  ⟨ZFSet.diff⟩
 
+/- warning: Set.to_set_union -> ZFSet.toSet_union is a dubious translation:
+lean 3 declaration is
+  forall (x : ZFSet.{u1}) (y : ZFSet.{u1}), Eq.{succ (succ u1)} (Set.{succ u1} ZFSet.{u1}) (ZFSet.toSet.{u1} (Union.union.{succ u1} ZFSet.{u1} ZFSet.hasUnion.{u1} x y)) (Union.union.{succ u1} (Set.{succ u1} ZFSet.{u1}) (Set.hasUnion.{succ u1} ZFSet.{u1}) (ZFSet.toSet.{u1} x) (ZFSet.toSet.{u1} y))
+but is expected to have type
+  forall (x : ZFSet.{u1}) (y : ZFSet.{u1}), Eq.{succ (succ u1)} (Set.{succ u1} ZFSet.{u1}) (ZFSet.toSet.{u1} (Union.union.{succ u1} ZFSet.{u1} ZFSet.instUnionZFSet.{u1} x y)) (Union.union.{succ u1} (Set.{succ u1} ZFSet.{u1}) (Set.instUnionSet.{succ u1} ZFSet.{u1}) (ZFSet.toSet.{u1} x) (ZFSet.toSet.{u1} y))
+Case conversion may be inaccurate. Consider using '#align Set.to_set_union ZFSet.toSet_unionₓ'. -/
 @[simp]
-theorem toSet_union (x y : SetCat.{u}) : (x ∪ y).toSet = x.toSet ∪ y.toSet :=
+theorem toSet_union (x y : ZFSet.{u}) : (x ∪ y).toSet = x.toSet ∪ y.toSet :=
   by
   unfold Union.union
-  rw [SetCat.union]
+  rw [ZFSet.union]
   simp
-#align Set.to_set_union SetCat.toSet_union
+#align Set.to_set_union ZFSet.toSet_union
 
+/- warning: Set.to_set_inter -> ZFSet.toSet_inter is a dubious translation:
+lean 3 declaration is
+  forall (x : ZFSet.{u1}) (y : ZFSet.{u1}), Eq.{succ (succ u1)} (Set.{succ u1} ZFSet.{u1}) (ZFSet.toSet.{u1} (Inter.inter.{succ u1} ZFSet.{u1} ZFSet.hasInter.{u1} x y)) (Inter.inter.{succ u1} (Set.{succ u1} ZFSet.{u1}) (Set.hasInter.{succ u1} ZFSet.{u1}) (ZFSet.toSet.{u1} x) (ZFSet.toSet.{u1} y))
+but is expected to have type
+  forall (x : ZFSet.{u1}) (y : ZFSet.{u1}), Eq.{succ (succ u1)} (Set.{succ u1} ZFSet.{u1}) (ZFSet.toSet.{u1} (Inter.inter.{succ u1} ZFSet.{u1} ZFSet.instInterZFSet.{u1} x y)) (Inter.inter.{succ u1} (Set.{succ u1} ZFSet.{u1}) (Set.instInterSet.{succ u1} ZFSet.{u1}) (ZFSet.toSet.{u1} x) (ZFSet.toSet.{u1} y))
+Case conversion may be inaccurate. Consider using '#align Set.to_set_inter ZFSet.toSet_interₓ'. -/
 @[simp]
-theorem toSet_inter (x y : SetCat.{u}) : (x ∩ y).toSet = x.toSet ∩ y.toSet :=
+theorem toSet_inter (x y : ZFSet.{u}) : (x ∩ y).toSet = x.toSet ∩ y.toSet :=
   by
   unfold Inter.inter
-  rw [SetCat.inter]
+  rw [ZFSet.inter]
   ext
   simp
-#align Set.to_set_inter SetCat.toSet_inter
+#align Set.to_set_inter ZFSet.toSet_inter
 
+/- warning: Set.to_set_sdiff -> ZFSet.toSet_sdiff is a dubious translation:
+lean 3 declaration is
+  forall (x : ZFSet.{u1}) (y : ZFSet.{u1}), Eq.{succ (succ u1)} (Set.{succ u1} ZFSet.{u1}) (ZFSet.toSet.{u1} (SDiff.sdiff.{succ u1} ZFSet.{u1} ZFSet.hasSdiff.{u1} x y)) (SDiff.sdiff.{succ u1} (Set.{succ u1} ZFSet.{u1}) (BooleanAlgebra.toHasSdiff.{succ u1} (Set.{succ u1} ZFSet.{u1}) (Set.booleanAlgebra.{succ u1} ZFSet.{u1})) (ZFSet.toSet.{u1} x) (ZFSet.toSet.{u1} y))
+but is expected to have type
+  forall (x : ZFSet.{u1}) (y : ZFSet.{u1}), Eq.{succ (succ u1)} (Set.{succ u1} ZFSet.{u1}) (ZFSet.toSet.{u1} (SDiff.sdiff.{succ u1} ZFSet.{u1} ZFSet.instSDiffZFSet.{u1} x y)) (SDiff.sdiff.{succ u1} (Set.{succ u1} ZFSet.{u1}) (Set.instSDiffSet.{succ u1} ZFSet.{u1}) (ZFSet.toSet.{u1} x) (ZFSet.toSet.{u1} y))
+Case conversion may be inaccurate. Consider using '#align Set.to_set_sdiff ZFSet.toSet_sdiffₓ'. -/
 @[simp]
-theorem toSet_sdiff (x y : SetCat.{u}) : (x \ y).toSet = x.toSet \ y.toSet :=
+theorem toSet_sdiff (x y : ZFSet.{u}) : (x \ y).toSet = x.toSet \ y.toSet :=
   by
   change { z ∈ x | z ∉ y }.toSet = _
   ext
   simp
-#align Set.to_set_sdiff SetCat.toSet_sdiff
+#align Set.to_set_sdiff ZFSet.toSet_sdiff
 
+#print ZFSet.mem_union /-
 @[simp]
-theorem mem_union {x y z : SetCat.{u}} : z ∈ x ∪ y ↔ z ∈ x ∨ z ∈ y :=
+theorem mem_union {x y z : ZFSet.{u}} : z ∈ x ∪ y ↔ z ∈ x ∨ z ∈ y :=
   by
   rw [← mem_to_set]
   simp
-#align Set.mem_union SetCat.mem_union
+#align Set.mem_union ZFSet.mem_union
+-/
 
+#print ZFSet.mem_inter /-
 @[simp]
-theorem mem_inter {x y z : SetCat.{u}} : z ∈ x ∩ y ↔ z ∈ x ∧ z ∈ y :=
-  @mem_sep fun z : SetCat.{u} => z ∈ y
-#align Set.mem_inter SetCat.mem_inter
+theorem mem_inter {x y z : ZFSet.{u}} : z ∈ x ∩ y ↔ z ∈ x ∧ z ∈ y :=
+  @mem_sep fun z : ZFSet.{u} => z ∈ y
+#align Set.mem_inter ZFSet.mem_inter
+-/
 
+#print ZFSet.mem_diff /-
 @[simp]
-theorem mem_diff {x y z : SetCat.{u}} : z ∈ x \ y ↔ z ∈ x ∧ z ∉ y :=
-  @mem_sep fun z : SetCat.{u} => z ∉ y
-#align Set.mem_diff SetCat.mem_diff
+theorem mem_diff {x y z : ZFSet.{u}} : z ∈ x \ y ↔ z ∈ x ∧ z ∉ y :=
+  @mem_sep fun z : ZFSet.{u} => z ∉ y
+#align Set.mem_diff ZFSet.mem_diff
+-/
 
 /- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
+#print ZFSet.unionₛ_pair /-
 @[simp]
-theorem sUnion_pair {x y : SetCat.{u}} : ⋃₀ ({x, y} : SetCat.{u}) = x ∪ y :=
+theorem unionₛ_pair {x y : ZFSet.{u}} : ⋃₀ ({x, y} : ZFSet.{u}) = x ∪ y :=
   by
   ext
   simp_rw [mem_union, mem_sUnion, mem_pair]
@@ -1230,48 +1606,64 @@ theorem sUnion_pair {x y : SetCat.{u}} : ⋃₀ ({x, y} : SetCat.{u}) = x ∪ y
   · rintro (hz | hz)
     · exact ⟨x, Or.inl rfl, hz⟩
     · exact ⟨y, Or.inr rfl, hz⟩
-#align Set.sUnion_pair SetCat.sUnion_pair
+#align Set.sUnion_pair ZFSet.unionₛ_pair
+-/
 
-theorem mem_wf : @WellFounded SetCat (· ∈ ·) :=
+#print ZFSet.mem_wf /-
+theorem mem_wf : @WellFounded ZFSet (· ∈ ·) :=
   wellFounded_lift₂_iff.mpr PSet.mem_wf
-#align Set.mem_wf SetCat.mem_wf
+#align Set.mem_wf ZFSet.mem_wf
+-/
 
+#print ZFSet.inductionOn /-
 /-- Induction on the `∈` relation. -/
 @[elab_as_elim]
-theorem induction_on {p : SetCat → Prop} (x) (h : ∀ x, (∀ y ∈ x, p y) → p x) : p x :=
+theorem inductionOn {p : ZFSet → Prop} (x) (h : ∀ x, (∀ y ∈ x, p y) → p x) : p x :=
   mem_wf.induction x h
-#align Set.induction_on SetCat.induction_on
+#align Set.induction_on ZFSet.inductionOn
+-/
 
-instance : WellFoundedRelation SetCat :=
+instance : WellFoundedRelation ZFSet :=
   ⟨_, mem_wf⟩
 
-instance : IsAsymm SetCat (· ∈ ·) :=
+instance : IsAsymm ZFSet (· ∈ ·) :=
   mem_wf.IsAsymm
 
-theorem mem_asymm {x y : SetCat} : x ∈ y → y ∉ x :=
+#print ZFSet.mem_asymm /-
+theorem mem_asymm {x y : ZFSet} : x ∈ y → y ∉ x :=
   asymm
-#align Set.mem_asymm SetCat.mem_asymm
+#align Set.mem_asymm ZFSet.mem_asymm
+-/
 
-theorem mem_irrefl (x : SetCat) : x ∉ x :=
+#print ZFSet.mem_irrefl /-
+theorem mem_irrefl (x : ZFSet) : x ∉ x :=
   irrefl x
-#align Set.mem_irrefl SetCat.mem_irrefl
+#align Set.mem_irrefl ZFSet.mem_irrefl
+-/
 
-theorem regularity (x : SetCat.{u}) (h : x ≠ ∅) : ∃ y ∈ x, x ∩ y = ∅ :=
+/- warning: Set.regularity -> ZFSet.regularity is a dubious translation:
+lean 3 declaration is
+  forall (x : ZFSet.{u1}), (Ne.{succ (succ u1)} ZFSet.{u1} x (EmptyCollection.emptyCollection.{succ u1} ZFSet.{u1} ZFSet.hasEmptyc.{u1})) -> (Exists.{succ (succ u1)} ZFSet.{u1} (fun (y : ZFSet.{u1}) => Exists.{0} (Membership.Mem.{succ u1, succ u1} ZFSet.{u1} ZFSet.{u1} ZFSet.hasMem.{u1} y x) (fun (H : Membership.Mem.{succ u1, succ u1} ZFSet.{u1} ZFSet.{u1} ZFSet.hasMem.{u1} y x) => Eq.{succ (succ u1)} ZFSet.{u1} (Inter.inter.{succ u1} ZFSet.{u1} ZFSet.hasInter.{u1} x y) (EmptyCollection.emptyCollection.{succ u1} ZFSet.{u1} ZFSet.hasEmptyc.{u1}))))
+but is expected to have type
+  forall (x : ZFSet.{u1}), (Ne.{succ (succ u1)} ZFSet.{u1} x (EmptyCollection.emptyCollection.{succ u1} ZFSet.{u1} ZFSet.instEmptyCollectionZFSet.{u1})) -> (Exists.{succ (succ u1)} ZFSet.{u1} (fun (y : ZFSet.{u1}) => And (Membership.mem.{succ u1, succ u1} ZFSet.{u1} ZFSet.{u1} ZFSet.instMembershipZFSetZFSet.{u1} y x) (Eq.{succ (succ u1)} ZFSet.{u1} (Inter.inter.{succ u1} ZFSet.{u1} ZFSet.instInterZFSet.{u1} x y) (EmptyCollection.emptyCollection.{succ u1} ZFSet.{u1} ZFSet.instEmptyCollectionZFSet.{u1}))))
+Case conversion may be inaccurate. Consider using '#align Set.regularity ZFSet.regularityₓ'. -/
+theorem regularity (x : ZFSet.{u}) (h : x ≠ ∅) : ∃ y ∈ x, x ∩ y = ∅ :=
   by_contradiction fun ne =>
     h <|
       (eq_empty x).2 fun y =>
-        induction_on y fun z (IH : ∀ w : SetCat.{u}, w ∈ z → w ∉ x) =>
+        inductionOn y fun z (IH : ∀ w : ZFSet.{u}, w ∈ z → w ∉ x) =>
           show z ∉ x from fun zx =>
             Ne
               ⟨z, zx,
                 (eq_empty _).2 fun w wxz =>
                   let ⟨wx, wz⟩ := mem_inter.1 wxz
                   IH w wz wx⟩
-#align Set.regularity SetCat.regularity
+#align Set.regularity ZFSet.regularity
 
+#print ZFSet.image /-
 /-- The image of a (definable) ZFC set function -/
-def image (f : SetCat → SetCat) [H : Definable 1 f] : SetCat → SetCat :=
-  let r := @Definable.resp 1 f _
+def image (f : ZFSet → ZFSet) [H : Definable 1 f] : ZFSet → ZFSet :=
+  let r := @Definable.Resp 1 f _
   Resp.eval 1
     ⟨image r.1, fun x y e =>
       Mem.ext fun z =>
@@ -1280,38 +1672,52 @@ def image (f : SetCat → SetCat) [H : Definable 1 f] : SetCat → SetCat :=
               ⟨fun ⟨w, h1, h2⟩ => ⟨w, (mem.congr_right e).1 h1, h2⟩, fun ⟨w, h1, h2⟩ =>
                 ⟨w, (mem.congr_right e).2 h1, h2⟩⟩ <|
             Iff.symm (mem_image r.2)⟩
-#align Set.image SetCat.image
+#align Set.image ZFSet.image
+-/
 
+#print ZFSet.image.mk /-
 theorem image.mk :
-    ∀ (f : SetCat.{u} → SetCat.{u}) [H : Definable 1 f] (x) {y} (h : y ∈ x), f y ∈ @image f H x
+    ∀ (f : ZFSet.{u} → ZFSet.{u}) [H : Definable 1 f] (x) {y} (h : y ∈ x), f y ∈ @image f H x
   | _, ⟨F⟩, x, y => Quotient.induction_on₂ x y fun ⟨α, A⟩ y ⟨a, ya⟩ => ⟨a, F.2 _ _ ya⟩
-#align Set.image.mk SetCat.image.mk
+#align Set.image.mk ZFSet.image.mk
+-/
 
+/- warning: Set.mem_image -> ZFSet.mem_image is a dubious translation:
+lean 3 declaration is
+  forall {f : ZFSet.{u1} -> ZFSet.{u1}} [H : PSet.Definable.{u1} (OfNat.ofNat.{0} Nat 1 (OfNat.mk.{0} Nat 1 (One.one.{0} Nat Nat.hasOne))) f] {x : ZFSet.{u1}} {y : ZFSet.{u1}}, Iff (Membership.Mem.{succ u1, succ u1} ZFSet.{u1} ZFSet.{u1} ZFSet.hasMem.{u1} y (ZFSet.image.{u1} f H x)) (Exists.{succ (succ u1)} ZFSet.{u1} (fun (z : ZFSet.{u1}) => Exists.{0} (Membership.Mem.{succ u1, succ u1} ZFSet.{u1} ZFSet.{u1} ZFSet.hasMem.{u1} z x) (fun (H : Membership.Mem.{succ u1, succ u1} ZFSet.{u1} ZFSet.{u1} ZFSet.hasMem.{u1} z x) => Eq.{succ (succ u1)} ZFSet.{u1} (f z) y)))
+but is expected to have type
+  forall {f : ZFSet.{u1} -> ZFSet.{u1}} [H : PSet.Definable.{u1} (OfNat.ofNat.{0} Nat 1 (instOfNatNat 1)) f] {x : ZFSet.{u1}} {y : ZFSet.{u1}}, Iff (Membership.mem.{succ u1, succ u1} ZFSet.{u1} ZFSet.{u1} ZFSet.instMembershipZFSetZFSet.{u1} y (ZFSet.image.{u1} f H x)) (Exists.{succ (succ u1)} ZFSet.{u1} (fun (z : ZFSet.{u1}) => And (Membership.mem.{succ u1, succ u1} ZFSet.{u1} ZFSet.{u1} ZFSet.instMembershipZFSetZFSet.{u1} z x) (Eq.{succ (succ u1)} ZFSet.{u1} (f z) y)))
+Case conversion may be inaccurate. Consider using '#align Set.mem_image ZFSet.mem_imageₓ'. -/
 @[simp]
 theorem mem_image :
-    ∀ {f : SetCat.{u} → SetCat.{u}} [H : Definable 1 f] {x y : SetCat.{u}},
+    ∀ {f : ZFSet.{u} → ZFSet.{u}} [H : Definable 1 f] {x y : ZFSet.{u}},
       y ∈ @image f H x ↔ ∃ z ∈ x, f z = y
   | _, ⟨F⟩, x, y =>
     Quotient.induction_on₂ x y fun ⟨α, A⟩ y =>
       ⟨fun ⟨a, ya⟩ => ⟨⟦A a⟧, Mem.mk A a, Eq.symm <| Quotient.sound ya⟩, fun ⟨z, hz, e⟩ =>
         e ▸ image.mk _ _ hz⟩
-#align Set.mem_image SetCat.mem_image
+#align Set.mem_image ZFSet.mem_image
 
+#print ZFSet.toSet_image /-
 @[simp]
-theorem toSet_image (f : SetCat → SetCat) [H : Definable 1 f] (x : SetCat) :
+theorem toSet_image (f : ZFSet → ZFSet) [H : Definable 1 f] (x : ZFSet) :
     (image f x).toSet = f '' x.toSet := by
   ext
   simp
-#align Set.to_set_image SetCat.toSet_image
+#align Set.to_set_image ZFSet.toSet_image
+-/
 
+#print ZFSet.range /-
 /-- The range of an indexed family of sets. The universes allow for a more general index type
   without manual use of `ulift`. -/
-noncomputable def range {α : Type u} (f : α → SetCat.{max u v}) : SetCat.{max u v} :=
+noncomputable def range {α : Type u} (f : α → ZFSet.{max u v}) : ZFSet.{max u v} :=
   ⟦⟨ULift α, Quotient.out ∘ f ∘ ULift.down⟩⟧
-#align Set.range SetCat.range
+#align Set.range ZFSet.range
+-/
 
+#print ZFSet.mem_range /-
 @[simp]
-theorem mem_range {α : Type u} {f : α → SetCat.{max u v}} {x : SetCat.{max u v}} :
+theorem mem_range {α : Type u} {f : α → ZFSet.{max u v}} {x : ZFSet.{max u v}} :
     x ∈ range f ↔ x ∈ Set.range f :=
   Quotient.inductionOn x fun y => by
     constructor
@@ -1320,31 +1726,46 @@ theorem mem_range {α : Type u} {f : α → SetCat.{max u v}} {x : SetCat.{max u
     · rintro ⟨z, hz⟩
       use z
       simpa [hz] using PSet.Equiv.symm (Quotient.mk_out y)
-#align Set.mem_range SetCat.mem_range
+#align Set.mem_range ZFSet.mem_range
+-/
 
+#print ZFSet.toSet_range /-
 @[simp]
-theorem toSet_range {α : Type u} (f : α → SetCat.{max u v}) : (range f).toSet = Set.range f :=
+theorem toSet_range {α : Type u} (f : α → ZFSet.{max u v}) : (range f).toSet = Set.range f :=
   by
   ext
   simp
-#align Set.to_set_range SetCat.toSet_range
+#align Set.to_set_range ZFSet.toSet_range
+-/
 
+#print ZFSet.pair /-
 /-- Kuratowski ordered pair -/
-def pair (x y : SetCat.{u}) : SetCat.{u} :=
+def pair (x y : ZFSet.{u}) : ZFSet.{u} :=
   {{x}, {x, y}}
-#align Set.pair SetCat.pair
+#align Set.pair ZFSet.pair
+-/
 
+#print ZFSet.toSet_pair /-
 @[simp]
-theorem toSet_pair (x y : SetCat.{u}) : (pair x y).toSet = {{x}, {x, y}} := by simp [pair]
-#align Set.to_set_pair SetCat.toSet_pair
+theorem toSet_pair (x y : ZFSet.{u}) : (pair x y).toSet = {{x}, {x, y}} := by simp [pair]
+#align Set.to_set_pair ZFSet.toSet_pair
+-/
 
+#print ZFSet.pairSep /-
 /-- A subset of pairs `{(a, b) ∈ x × y | p a b}` -/
-def pairSep (p : SetCat.{u} → SetCat.{u} → Prop) (x y : SetCat.{u}) : SetCat.{u} :=
+def pairSep (p : ZFSet.{u} → ZFSet.{u} → Prop) (x y : ZFSet.{u}) : ZFSet.{u} :=
   { z ∈ powerset (powerset (x ∪ y)) | ∃ a ∈ x, ∃ b ∈ y, z = pair a b ∧ p a b }
-#align Set.pair_sep SetCat.pairSep
+#align Set.pair_sep ZFSet.pairSep
+-/
 
+/- warning: Set.mem_pair_sep -> ZFSet.mem_pairSep is a dubious translation:
+lean 3 declaration is
+  forall {p : ZFSet.{u1} -> ZFSet.{u1} -> Prop} {x : ZFSet.{u1}} {y : ZFSet.{u1}} {z : ZFSet.{u1}}, Iff (Membership.Mem.{succ u1, succ u1} ZFSet.{u1} ZFSet.{u1} ZFSet.hasMem.{u1} z (ZFSet.pairSep.{u1} p x y)) (Exists.{succ (succ u1)} ZFSet.{u1} (fun (a : ZFSet.{u1}) => Exists.{0} (Membership.Mem.{succ u1, succ u1} ZFSet.{u1} ZFSet.{u1} ZFSet.hasMem.{u1} a x) (fun (H : Membership.Mem.{succ u1, succ u1} ZFSet.{u1} ZFSet.{u1} ZFSet.hasMem.{u1} a x) => Exists.{succ (succ u1)} ZFSet.{u1} (fun (b : ZFSet.{u1}) => Exists.{0} (Membership.Mem.{succ u1, succ u1} ZFSet.{u1} ZFSet.{u1} ZFSet.hasMem.{u1} b y) (fun (H : Membership.Mem.{succ u1, succ u1} ZFSet.{u1} ZFSet.{u1} ZFSet.hasMem.{u1} b y) => And (Eq.{succ (succ u1)} ZFSet.{u1} z (ZFSet.pair.{u1} a b)) (p a b))))))
+but is expected to have type
+  forall {p : ZFSet.{u1} -> ZFSet.{u1} -> Prop} {x : ZFSet.{u1}} {y : ZFSet.{u1}} {z : ZFSet.{u1}}, Iff (Membership.mem.{succ u1, succ u1} ZFSet.{u1} ZFSet.{u1} ZFSet.instMembershipZFSetZFSet.{u1} z (ZFSet.pairSep.{u1} p x y)) (Exists.{succ (succ u1)} ZFSet.{u1} (fun (a : ZFSet.{u1}) => And (Membership.mem.{succ u1, succ u1} ZFSet.{u1} ZFSet.{u1} ZFSet.instMembershipZFSetZFSet.{u1} a x) (Exists.{succ (succ u1)} ZFSet.{u1} (fun (b : ZFSet.{u1}) => And (Membership.mem.{succ u1, succ u1} ZFSet.{u1} ZFSet.{u1} ZFSet.instMembershipZFSetZFSet.{u1} b y) (And (Eq.{succ (succ u1)} ZFSet.{u1} z (ZFSet.pair.{u1} a b)) (p a b))))))
+Case conversion may be inaccurate. Consider using '#align Set.mem_pair_sep ZFSet.mem_pairSepₓ'. -/
 @[simp]
-theorem mem_pairSep {p} {x y z : SetCat.{u}} :
+theorem mem_pairSep {p} {x y z : ZFSet.{u}} :
     z ∈ pairSep p x y ↔ ∃ a ∈ x, ∃ b ∈ y, z = pair a b ∧ p a b :=
   by
   refine' mem_sep.trans ⟨And.right, fun e => ⟨_, e⟩⟩
@@ -1354,8 +1775,9 @@ theorem mem_pairSep {p} {x y z : SetCat.{u}} :
   · rintro rfl
     exact Or.inl ax
   · rintro (rfl | rfl) <;> [left, right] <;> assumption
-#align Set.mem_pair_sep SetCat.mem_pairSep
+#align Set.mem_pair_sep ZFSet.mem_pairSep
 
+#print ZFSet.pair_injective /-
 theorem pair_injective : Function.Injective2 pair := fun x x' y y' H =>
   by
   have ae := ext_iff.1 H
@@ -1363,7 +1785,7 @@ theorem pair_injective : Function.Injective2 pair := fun x x' y y' H =>
   obtain rfl : x = x' := by
     cases' (ae {x}).1 (by simp) with h h
     · exact singleton_injective h
-    · have m : x' ∈ ({x} : SetCat) := by simp [h]
+    · have m : x' ∈ ({x} : ZFSet) := by simp [h]
       rw [mem_singleton.mp m]
   have he : x = y → y = y' := by
     rintro rfl
@@ -1377,75 +1799,107 @@ theorem pair_injective : Function.Injective2 pair := fun x x' y y' H =>
   · obtain rfl | yy' := mem_pair.mp ((ext_iff.1 xyy' y).1 <| by simp)
     · simp [he rfl]
     · simp [yy']
-#align Set.pair_injective SetCat.pair_injective
+#align Set.pair_injective ZFSet.pair_injective
+-/
 
+#print ZFSet.pair_inj /-
 @[simp]
-theorem pair_inj {x y x' y' : SetCat} : pair x y = pair x' y' ↔ x = x' ∧ y = y' :=
+theorem pair_inj {x y x' y' : ZFSet} : pair x y = pair x' y' ↔ x = x' ∧ y = y' :=
   pair_injective.eq_iff
-#align Set.pair_inj SetCat.pair_inj
+#align Set.pair_inj ZFSet.pair_inj
+-/
 
+#print ZFSet.prod /-
 /-- The cartesian product, `{(a, b) | a ∈ x, b ∈ y}` -/
-def prod : SetCat.{u} → SetCat.{u} → SetCat.{u} :=
+def prod : ZFSet.{u} → ZFSet.{u} → ZFSet.{u} :=
   pairSep fun a b => True
-#align Set.prod SetCat.prod
+#align Set.prod ZFSet.prod
+-/
 
+/- warning: Set.mem_prod -> ZFSet.mem_prod is a dubious translation:
+lean 3 declaration is
+  forall {x : ZFSet.{u1}} {y : ZFSet.{u1}} {z : ZFSet.{u1}}, Iff (Membership.Mem.{succ u1, succ u1} ZFSet.{u1} ZFSet.{u1} ZFSet.hasMem.{u1} z (ZFSet.prod.{u1} x y)) (Exists.{succ (succ u1)} ZFSet.{u1} (fun (a : ZFSet.{u1}) => Exists.{0} (Membership.Mem.{succ u1, succ u1} ZFSet.{u1} ZFSet.{u1} ZFSet.hasMem.{u1} a x) (fun (H : Membership.Mem.{succ u1, succ u1} ZFSet.{u1} ZFSet.{u1} ZFSet.hasMem.{u1} a x) => Exists.{succ (succ u1)} ZFSet.{u1} (fun (b : ZFSet.{u1}) => Exists.{0} (Membership.Mem.{succ u1, succ u1} ZFSet.{u1} ZFSet.{u1} ZFSet.hasMem.{u1} b y) (fun (H : Membership.Mem.{succ u1, succ u1} ZFSet.{u1} ZFSet.{u1} ZFSet.hasMem.{u1} b y) => Eq.{succ (succ u1)} ZFSet.{u1} z (ZFSet.pair.{u1} a b))))))
+but is expected to have type
+  forall {x : ZFSet.{u1}} {y : ZFSet.{u1}} {z : ZFSet.{u1}}, Iff (Membership.mem.{succ u1, succ u1} ZFSet.{u1} ZFSet.{u1} ZFSet.instMembershipZFSetZFSet.{u1} z (ZFSet.prod.{u1} x y)) (Exists.{succ (succ u1)} ZFSet.{u1} (fun (a : ZFSet.{u1}) => And (Membership.mem.{succ u1, succ u1} ZFSet.{u1} ZFSet.{u1} ZFSet.instMembershipZFSetZFSet.{u1} a x) (Exists.{succ (succ u1)} ZFSet.{u1} (fun (b : ZFSet.{u1}) => And (Membership.mem.{succ u1, succ u1} ZFSet.{u1} ZFSet.{u1} ZFSet.instMembershipZFSetZFSet.{u1} b y) (Eq.{succ (succ u1)} ZFSet.{u1} z (ZFSet.pair.{u1} a b))))))
+Case conversion may be inaccurate. Consider using '#align Set.mem_prod ZFSet.mem_prodₓ'. -/
 @[simp]
-theorem mem_prod {x y z : SetCat.{u}} : z ∈ prod x y ↔ ∃ a ∈ x, ∃ b ∈ y, z = pair a b := by
+theorem mem_prod {x y z : ZFSet.{u}} : z ∈ prod x y ↔ ∃ a ∈ x, ∃ b ∈ y, z = pair a b := by
   simp [Prod]
-#align Set.mem_prod SetCat.mem_prod
+#align Set.mem_prod ZFSet.mem_prod
 
+#print ZFSet.pair_mem_prod /-
 @[simp]
-theorem pair_mem_prod {x y a b : SetCat.{u}} : pair a b ∈ prod x y ↔ a ∈ x ∧ b ∈ y :=
+theorem pair_mem_prod {x y a b : ZFSet.{u}} : pair a b ∈ prod x y ↔ a ∈ x ∧ b ∈ y :=
   ⟨fun h =>
     let ⟨a', a'x, b', b'y, e⟩ := mem_prod.1 h
     match a', b', pair_injective e, a'x, b'y with
     | _, _, ⟨rfl, rfl⟩, ax, bY => ⟨ax, bY⟩,
     fun ⟨ax, bY⟩ => mem_prod.2 ⟨a, ax, b, bY, rfl⟩⟩
-#align Set.pair_mem_prod SetCat.pair_mem_prod
+#align Set.pair_mem_prod ZFSet.pair_mem_prod
+-/
 
+#print ZFSet.IsFunc /-
 /-- `is_func 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`. -/
-def IsFunc (x y f : SetCat.{u}) : Prop :=
-  f ⊆ prod x y ∧ ∀ z : SetCat.{u}, z ∈ x → ∃! w, pair z w ∈ f
-#align Set.is_func SetCat.IsFunc
+def IsFunc (x y f : ZFSet.{u}) : Prop :=
+  f ⊆ prod x y ∧ ∀ z : ZFSet.{u}, z ∈ x → ∃! w, pair z w ∈ f
+#align Set.is_func ZFSet.IsFunc
+-/
 
+#print ZFSet.funs /-
 /-- `funs x y` is `y ^ x`, the set of all set functions `x → y` -/
-def funs (x y : SetCat.{u}) : SetCat.{u} :=
+def funs (x y : ZFSet.{u}) : ZFSet.{u} :=
   { f ∈ powerset (prod x y) | IsFunc x y f }
-#align Set.funs SetCat.funs
+#align Set.funs ZFSet.funs
+-/
 
+#print ZFSet.mem_funs /-
 @[simp]
-theorem mem_funs {x y f : SetCat.{u}} : f ∈ funs x y ↔ IsFunc x y f := by simp [funs, is_func]
-#align Set.mem_funs SetCat.mem_funs
+theorem mem_funs {x y f : ZFSet.{u}} : f ∈ funs x y ↔ IsFunc x y f := by simp [funs, is_func]
+#align Set.mem_funs ZFSet.mem_funs
+-/
 
+#print ZFSet.mapDefinableAux /-
 -- TODO(Mario): Prove this computably
-noncomputable instance mapDefinableAux (f : SetCat → SetCat) [H : Definable 1 f] :
+noncomputable instance mapDefinableAux (f : ZFSet → ZFSet) [H : Definable 1 f] :
     Definable 1 fun y => pair y (f y) :=
-  @Classical.allDefinable 1 _
-#align Set.map_definable_aux SetCat.mapDefinableAux
+  @Classical.AllDefinable 1 _
+#align Set.map_definable_aux ZFSet.mapDefinableAux
+-/
 
+#print ZFSet.map /-
 /-- Graph of a function: `map f x` is the ZFC function which maps `a ∈ x` to `f a` -/
-noncomputable def map (f : SetCat → SetCat) [H : Definable 1 f] : SetCat → SetCat :=
+noncomputable def map (f : ZFSet → ZFSet) [H : Definable 1 f] : ZFSet → ZFSet :=
   image fun y => pair y (f y)
-#align Set.map SetCat.map
+#align Set.map ZFSet.map
+-/
 
+/- warning: Set.mem_map -> ZFSet.mem_map is a dubious translation:
+lean 3 declaration is
+  forall {f : ZFSet.{u1} -> ZFSet.{u1}} [H : PSet.Definable.{u1} (OfNat.ofNat.{0} Nat 1 (OfNat.mk.{0} Nat 1 (One.one.{0} Nat Nat.hasOne))) f] {x : ZFSet.{u1}} {y : ZFSet.{u1}}, Iff (Membership.Mem.{succ u1, succ u1} ZFSet.{u1} ZFSet.{u1} ZFSet.hasMem.{u1} y (ZFSet.map.{u1} f H x)) (Exists.{succ (succ u1)} ZFSet.{u1} (fun (z : ZFSet.{u1}) => Exists.{0} (Membership.Mem.{succ u1, succ u1} ZFSet.{u1} ZFSet.{u1} ZFSet.hasMem.{u1} z x) (fun (H : Membership.Mem.{succ u1, succ u1} ZFSet.{u1} ZFSet.{u1} ZFSet.hasMem.{u1} z x) => Eq.{succ (succ u1)} ZFSet.{u1} (ZFSet.pair.{u1} z (f z)) y)))
+but is expected to have type
+  forall {f : ZFSet.{u1} -> ZFSet.{u1}} [H : PSet.Definable.{u1} (OfNat.ofNat.{0} Nat 1 (instOfNatNat 1)) f] {x : ZFSet.{u1}} {y : ZFSet.{u1}}, Iff (Membership.mem.{succ u1, succ u1} ZFSet.{u1} ZFSet.{u1} ZFSet.instMembershipZFSetZFSet.{u1} y (ZFSet.map.{u1} f H x)) (Exists.{succ (succ u1)} ZFSet.{u1} (fun (z : ZFSet.{u1}) => And (Membership.mem.{succ u1, succ u1} ZFSet.{u1} ZFSet.{u1} ZFSet.instMembershipZFSetZFSet.{u1} z x) (Eq.{succ (succ u1)} ZFSet.{u1} (ZFSet.pair.{u1} z (f z)) y)))
+Case conversion may be inaccurate. Consider using '#align Set.mem_map ZFSet.mem_mapₓ'. -/
 @[simp]
-theorem mem_map {f : SetCat → SetCat} [H : Definable 1 f] {x y : SetCat} :
+theorem mem_map {f : ZFSet → ZFSet} [H : Definable 1 f] {x y : ZFSet} :
     y ∈ map f x ↔ ∃ z ∈ x, pair z (f z) = y :=
   mem_image
-#align Set.mem_map SetCat.mem_map
+#align Set.mem_map ZFSet.mem_map
 
-theorem map_unique {f : SetCat.{u} → SetCat.{u}} [H : Definable 1 f] {x z : SetCat.{u}}
-    (zx : z ∈ x) : ∃! w, pair z w ∈ map f x :=
+#print ZFSet.map_unique /-
+theorem map_unique {f : ZFSet.{u} → ZFSet.{u}} [H : Definable 1 f] {x z : ZFSet.{u}} (zx : z ∈ x) :
+    ∃! w, pair z w ∈ map f x :=
   ⟨f z, image.mk _ _ zx, fun y yx =>
     by
     let ⟨w, wx, we⟩ := mem_image.1 yx
     let ⟨wz, fy⟩ := pair_injective we
     rw [← fy, wz]⟩
-#align Set.map_unique SetCat.map_unique
+#align Set.map_unique ZFSet.map_unique
+-/
 
+#print ZFSet.map_isFunc /-
 @[simp]
-theorem map_isFunc {f : SetCat → SetCat} [H : Definable 1 f] {x y : SetCat} :
+theorem map_isFunc {f : ZFSet → ZFSet} [H : Definable 1 f] {x y : ZFSet} :
     IsFunc x y (map f x) ↔ ∀ z ∈ x, f z ∈ y :=
   ⟨fun ⟨ss, h⟩ z zx =>
     let ⟨t, t1, t2⟩ := h z zx
@@ -1455,140 +1909,181 @@ theorem map_isFunc {f : SetCat → SetCat} [H : Definable 1 f] {x y : SetCat} :
       let ⟨z, zx, ze⟩ := mem_image.1 yx
       ze ▸ pair_mem_prod.2 ⟨zx, h z zx⟩,
       fun z => map_unique⟩⟩
-#align Set.map_is_func SetCat.map_isFunc
+#align Set.map_is_func ZFSet.map_isFunc
+-/
 
+#print ZFSet.Hereditarily /-
 /-- 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`. -/
-def Hereditarily (p : SetCat → Prop) : SetCat → Prop
+def Hereditarily (p : ZFSet → Prop) : ZFSet → Prop
   | x => p x ∧ ∀ y ∈ x, hereditarily y
-#align Set.hereditarily SetCat.Hereditarily
+#align Set.hereditarily ZFSet.Hereditarily
+-/
 
 section Hereditarily
 
-variable {p : SetCat.{u} → Prop} {x y : SetCat.{u}}
+variable {p : ZFSet.{u} → Prop} {x y : ZFSet.{u}}
 
+#print ZFSet.hereditarily_iff /-
 theorem hereditarily_iff : Hereditarily p x ↔ p x ∧ ∀ y ∈ x, Hereditarily p y := by
   rw [← hereditarily]
-#align Set.hereditarily_iff SetCat.hereditarily_iff
+#align Set.hereditarily_iff ZFSet.hereditarily_iff
+-/
 
 alias hereditarily_iff ↔ hereditarily.def _
-#align Set.hereditarily.def SetCat.Hereditarily.def
+#align Set.hereditarily.def ZFSet.Hereditarily.def
 
+#print ZFSet.Hereditarily.self /-
 theorem Hereditarily.self (h : x.Hereditarily p) : p x :=
   h.def.1
-#align Set.hereditarily.self SetCat.Hereditarily.self
+#align Set.hereditarily.self ZFSet.Hereditarily.self
+-/
 
+#print ZFSet.Hereditarily.mem /-
 theorem Hereditarily.mem (h : x.Hereditarily p) (hy : y ∈ x) : y.Hereditarily p :=
   h.def.2 _ hy
-#align Set.hereditarily.mem SetCat.Hereditarily.mem
+#align Set.hereditarily.mem ZFSet.Hereditarily.mem
+-/
 
+#print ZFSet.Hereditarily.empty /-
 theorem Hereditarily.empty : Hereditarily p x → p ∅ :=
   by
   apply x.induction_on
   intro y IH h
-  rcases SetCat.eq_empty_or_nonempty y with (rfl | ⟨a, ha⟩)
+  rcases ZFSet.eq_empty_or_nonempty y with (rfl | ⟨a, ha⟩)
   · exact h.self
   · exact IH a ha (h.mem ha)
-#align Set.hereditarily.empty SetCat.Hereditarily.empty
+#align Set.hereditarily.empty ZFSet.Hereditarily.empty
+-/
 
 end Hereditarily
 
-end SetCat
+end ZFSet
 
 /- ./././Mathport/Syntax/Translate/Command.lean:42:9: unsupported derive handler has_sep[has_sep] Set[Set] -/
 /- ./././Mathport/Syntax/Translate/Command.lean:42:9: unsupported derive handler has_insert[has_insert] Set[Set] -/
+#print Class /-
 /-- The collection of all classes.
 
 We define `Class` as `set Set`, as this allows us to get many instances automatically. However, in
 practice, we treat it as (the definitionally equal) `Set → Prop`. This means, the preferred way to
 state that `x : Set` belongs to `A : Class` is to write `A x`. -/
 def Class :=
-  Set SetCat deriving HasSubset,
+  Set ZFSet deriving HasSubset,
   «./././Mathport/Syntax/Translate/Command.lean:42:9: unsupported derive handler has_sep[has_sep] Set[Set]»,
   EmptyCollection, Inhabited,
   «./././Mathport/Syntax/Translate/Command.lean:42:9: unsupported derive handler has_insert[has_insert] Set[Set]»,
   Union, Inter, HasCompl, SDiff
 #align Class Class
+-/
 
 namespace Class
 
+#print Class.ext /-
 @[ext]
-theorem ext {x y : Class.{u}} : (∀ z : SetCat.{u}, x z ↔ y z) → x = y :=
+theorem ext {x y : Class.{u}} : (∀ z : ZFSet.{u}, x z ↔ y z) → x = y :=
   Set.ext
 #align Class.ext Class.ext
+-/
 
+#print Class.ext_iff /-
 theorem ext_iff {x y : Class.{u}} : x = y ↔ ∀ z, x z ↔ y z :=
   Set.ext_iff
 #align Class.ext_iff Class.ext_iff
+-/
 
+#print Class.ofSet /-
 /-- Coerce a ZFC set into a class -/
-def ofSet (x : SetCat.{u}) : Class.{u} :=
+def ofSet (x : ZFSet.{u}) : Class.{u} :=
   { y | y ∈ x }
 #align Class.of_Set Class.ofSet
+-/
 
-instance : Coe SetCat Class :=
+instance : Coe ZFSet Class :=
   ⟨ofSet⟩
 
+#print Class.univ /-
 /-- The universal class -/
 def univ : Class :=
   Set.univ
 #align Class.univ Class.univ
+-/
 
+#print Class.ToSet /-
 /-- Assert that `A` is a ZFC set satisfying `B` -/
 def ToSet (B : Class.{u}) (A : Class.{u}) : Prop :=
   ∃ x, ↑x = A ∧ B x
 #align Class.to_Set Class.ToSet
+-/
 
+#print Class.Mem /-
 /-- `A ∈ B` if `A` is a ZFC set which satisfies `B` -/
 protected def Mem (A B : Class.{u}) : Prop :=
   ToSet.{u} B A
 #align Class.mem Class.Mem
+-/
 
 instance : Membership Class Class :=
   ⟨Class.Mem⟩
 
+#print Class.mem_def /-
 theorem mem_def (A B : Class.{u}) : A ∈ B ↔ ∃ x, ↑x = A ∧ B x :=
   Iff.rfl
 #align Class.mem_def Class.mem_def
+-/
 
+#print Class.not_mem_empty /-
 @[simp]
 theorem not_mem_empty (x : Class.{u}) : x ∉ (∅ : Class.{u}) := fun ⟨_, _, h⟩ => h
 #align Class.not_mem_empty Class.not_mem_empty
+-/
 
+#print Class.not_empty_hom /-
 @[simp]
-theorem not_empty_hom (x : SetCat.{u}) : ¬(∅ : Class.{u}) x :=
+theorem not_empty_hom (x : ZFSet.{u}) : ¬(∅ : Class.{u}) x :=
   id
 #align Class.not_empty_hom Class.not_empty_hom
+-/
 
+#print Class.mem_univ /-
 @[simp]
-theorem mem_univ {A : Class.{u}} : A ∈ univ.{u} ↔ ∃ x : SetCat.{u}, ↑x = A :=
+theorem mem_univ {A : Class.{u}} : A ∈ univ.{u} ↔ ∃ x : ZFSet.{u}, ↑x = A :=
   exists_congr fun x => and_true_iff _
 #align Class.mem_univ Class.mem_univ
+-/
 
+#print Class.mem_univ_hom /-
 @[simp]
-theorem mem_univ_hom (x : SetCat.{u}) : univ.{u} x :=
+theorem mem_univ_hom (x : ZFSet.{u}) : univ.{u} x :=
   trivial
 #align Class.mem_univ_hom Class.mem_univ_hom
+-/
 
-theorem eq_univ_iff_forall {A : Class.{u}} : A = univ ↔ ∀ x : SetCat, A x :=
+#print Class.eq_univ_iff_forall /-
+theorem eq_univ_iff_forall {A : Class.{u}} : A = univ ↔ ∀ x : ZFSet, A x :=
   Set.eq_univ_iff_forall
 #align Class.eq_univ_iff_forall Class.eq_univ_iff_forall
+-/
 
-theorem eq_univ_of_forall {A : Class.{u}} : (∀ x : SetCat, A x) → A = univ :=
+#print Class.eq_univ_of_forall /-
+theorem eq_univ_of_forall {A : Class.{u}} : (∀ x : ZFSet, A x) → A = univ :=
   Set.eq_univ_of_forall
 #align Class.eq_univ_of_forall Class.eq_univ_of_forall
+-/
 
+#print Class.mem_wf /-
 theorem mem_wf : @WellFounded Class.{u} (· ∈ ·) :=
   ⟨by
-    have H : ∀ x : SetCat.{u}, @Acc Class.{u} (· ∈ ·) ↑x :=
+    have H : ∀ x : ZFSet.{u}, @Acc Class.{u} (· ∈ ·) ↑x :=
       by
-      refine' fun a => SetCat.induction_on a fun x IH => ⟨x, _⟩
+      refine' fun a => ZFSet.inductionOn a fun x IH => ⟨x, _⟩
       rintro A ⟨z, rfl, hz⟩
       exact IH z hz
     · refine' fun A => ⟨A, _⟩
       rintro B ⟨x, rfl, hx⟩
       exact H x⟩
 #align Class.mem_wf Class.mem_wf
+-/
 
 instance : WellFoundedRelation Class :=
   ⟨_, mem_wf⟩
@@ -1596,14 +2091,19 @@ instance : WellFoundedRelation Class :=
 instance : IsAsymm Class (· ∈ ·) :=
   mem_wf.IsAsymm
 
+#print Class.mem_asymm /-
 theorem mem_asymm {x y : Class} : x ∈ y → y ∉ x :=
   asymm
 #align Class.mem_asymm Class.mem_asymm
+-/
 
+#print Class.mem_irrefl /-
 theorem mem_irrefl (x : Class) : x ∉ x :=
   irrefl x
 #align Class.mem_irrefl Class.mem_irrefl
+-/
 
+#print Class.univ_not_mem_univ /-
 /-- **There is no universal set.**
 
 This is stated as `univ ∉ univ`, meaning that `univ` (the class of all sets) is proper (does not
@@ -1611,44 +2111,57 @@ belong to the class of all sets). -/
 theorem univ_not_mem_univ : univ ∉ univ :=
   mem_irrefl _
 #align Class.univ_not_mem_univ Class.univ_not_mem_univ
+-/
 
+#print Class.congToClass /-
 /-- Convert a conglomerate (a collection of classes) into a class -/
 def congToClass (x : Set Class.{u}) : Class.{u} :=
   { y | ↑y ∈ x }
 #align Class.Cong_to_Class Class.congToClass
+-/
 
+#print Class.congToClass_empty /-
 @[simp]
 theorem congToClass_empty : congToClass ∅ = ∅ :=
   by
   ext
   simp [Cong_to_Class]
 #align Class.Cong_to_Class_empty Class.congToClass_empty
+-/
 
+#print Class.classToCong /-
 /-- Convert a class into a conglomerate (a collection of classes) -/
 def classToCong (x : Class.{u}) : Set Class.{u} :=
   { y | y ∈ x }
 #align Class.Class_to_Cong Class.classToCong
+-/
 
+#print Class.classToCong_empty /-
 @[simp]
 theorem classToCong_empty : classToCong ∅ = ∅ :=
   by
   ext
   simp [Class_to_Cong]
 #align Class.Class_to_Cong_empty Class.classToCong_empty
+-/
 
+#print Class.powerset /-
 /-- The power class of a class is the class of all subclasses that are ZFC sets -/
 def powerset (x : Class) : Class :=
   congToClass (Set.powerset x)
 #align Class.powerset Class.powerset
+-/
 
 /- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
+#print Class.unionₛ /-
 /-- The union of a class is the class of all members of ZFC sets in the class -/
-def sUnion (x : Class) : Class :=
+def unionₛ (x : Class) : Class :=
   ⋃₀ classToCong x
-#align Class.sUnion Class.sUnion
+#align Class.sUnion Class.unionₛ
+-/
 
 -- mathport name: Class.sUnion
-prefix:110 "⋃₀ " => Class.sUnion
+prefix:110 "⋃₀ " => Class.unionₛ
 
 /- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
 /-- The intersection of a class is the class of all members of ZFC sets in the class -/
@@ -1659,105 +2172,149 @@ def sInter (x : Class) : Class :=
 -- mathport name: Class.sInter
 prefix:110 "⋂₀ " => Class.sInter
 
-theorem ofSet.inj {x y : SetCat.{u}} (h : (x : Class.{u}) = y) : x = y :=
-  SetCat.ext fun z => by
+#print Class.ofSet.inj /-
+theorem ofSet.inj {x y : ZFSet.{u}} (h : (x : Class.{u}) = y) : x = y :=
+  ZFSet.ext fun z => by
     change (x : Class.{u}) z ↔ (y : Class.{u}) z
     rw [h]
 #align Class.of_Set.inj Class.ofSet.inj
+-/
 
+#print Class.toSet_of_setCat /-
 @[simp]
-theorem toSet_of_setCat (A : Class.{u}) (x : SetCat.{u}) : ToSet A x ↔ A x :=
+theorem toSet_of_setCat (A : Class.{u}) (x : ZFSet.{u}) : ToSet A x ↔ A x :=
   ⟨fun ⟨y, yx, py⟩ => by rwa [of_Set.inj yx] at py, fun px => ⟨x, rfl, px⟩⟩
 #align Class.to_Set_of_Set Class.toSet_of_setCat
+-/
 
+#print Class.coe_mem /-
 @[simp, norm_cast]
-theorem coe_mem {x : SetCat.{u}} {A : Class.{u}} : (x : Class.{u}) ∈ A ↔ A x :=
+theorem coe_mem {x : ZFSet.{u}} {A : Class.{u}} : (x : Class.{u}) ∈ A ↔ A x :=
   toSet_of_setCat _ _
 #align Class.coe_mem Class.coe_mem
+-/
 
+#print Class.coe_apply /-
 @[simp]
-theorem coe_apply {x y : SetCat.{u}} : (y : Class.{u}) x ↔ x ∈ y :=
+theorem coe_apply {x y : ZFSet.{u}} : (y : Class.{u}) x ↔ x ∈ y :=
   Iff.rfl
 #align Class.coe_apply Class.coe_apply
+-/
 
+#print Class.coe_subset /-
 @[simp, norm_cast]
-theorem coe_subset (x y : SetCat.{u}) : (x : Class.{u}) ⊆ y ↔ x ⊆ y :=
+theorem coe_subset (x y : ZFSet.{u}) : (x : Class.{u}) ⊆ y ↔ x ⊆ y :=
   Iff.rfl
 #align Class.coe_subset Class.coe_subset
+-/
 
+#print Class.coe_sep /-
 @[simp, norm_cast]
-theorem coe_sep (p : Class.{u}) (x : SetCat.{u}) :
+theorem coe_sep (p : Class.{u}) (x : ZFSet.{u}) :
     (↑({ y ∈ x | p y }) : Class.{u}) = { y ∈ x | p y } :=
-  ext fun y => SetCat.mem_sep
+  ext fun y => ZFSet.mem_sep
 #align Class.coe_sep Class.coe_sep
+-/
 
+#print Class.coe_empty /-
 @[simp, norm_cast]
-theorem coe_empty : ↑(∅ : SetCat.{u}) = (∅ : Class.{u}) :=
-  ext fun y => (iff_false_iff _).2 <| SetCat.not_mem_empty y
+theorem coe_empty : ↑(∅ : ZFSet.{u}) = (∅ : Class.{u}) :=
+  ext fun y => (iff_false_iff _).2 <| ZFSet.not_mem_empty y
 #align Class.coe_empty Class.coe_empty
+-/
 
+#print Class.coe_insert /-
 @[simp, norm_cast]
-theorem coe_insert (x y : SetCat.{u}) : ↑(insert x y) = @insert SetCat.{u} Class.{u} _ x y :=
-  ext fun z => SetCat.mem_insert_iff
+theorem coe_insert (x y : ZFSet.{u}) : ↑(insert x y) = @insert ZFSet.{u} Class.{u} _ x y :=
+  ext fun z => ZFSet.mem_insert_iff
 #align Class.coe_insert Class.coe_insert
+-/
 
+/- warning: Class.coe_union -> Class.coe_union is a dubious translation:
+lean 3 declaration is
+  forall (x : ZFSet.{u1}) (y : ZFSet.{u1}), Eq.{succ (succ u1)} Class.{u1} ((fun (a : Type.{succ u1}) (b : Type.{succ u1}) [self : HasLiftT.{succ (succ u1), succ (succ u1)} a b] => self.0) ZFSet.{u1} Class.{u1} (HasLiftT.mk.{succ (succ u1), succ (succ u1)} ZFSet.{u1} Class.{u1} (CoeTCₓ.coe.{succ (succ u1), succ (succ u1)} ZFSet.{u1} Class.{u1} (coeBase.{succ (succ u1), succ (succ u1)} ZFSet.{u1} Class.{u1} Class.hasCoe.{u1}))) (Union.union.{succ u1} ZFSet.{u1} ZFSet.hasUnion.{u1} x y)) (Union.union.{succ u1} Class.{u1} Class.hasUnion.{u1} ((fun (a : Type.{succ u1}) (b : Type.{succ u1}) [self : HasLiftT.{succ (succ u1), succ (succ u1)} a b] => self.0) ZFSet.{u1} Class.{u1} (HasLiftT.mk.{succ (succ u1), succ (succ u1)} ZFSet.{u1} Class.{u1} (CoeTCₓ.coe.{succ (succ u1), succ (succ u1)} ZFSet.{u1} Class.{u1} (coeBase.{succ (succ u1), succ (succ u1)} ZFSet.{u1} Class.{u1} Class.hasCoe.{u1}))) x) ((fun (a : Type.{succ u1}) (b : Type.{succ u1}) [self : HasLiftT.{succ (succ u1), succ (succ u1)} a b] => self.0) ZFSet.{u1} Class.{u1} (HasLiftT.mk.{succ (succ u1), succ (succ u1)} ZFSet.{u1} Class.{u1} (CoeTCₓ.coe.{succ (succ u1), succ (succ u1)} ZFSet.{u1} Class.{u1} (coeBase.{succ (succ u1), succ (succ u1)} ZFSet.{u1} Class.{u1} Class.hasCoe.{u1}))) y))
+but is expected to have type
+  forall (x : ZFSet.{u1}) (y : ZFSet.{u1}), Eq.{succ (succ u1)} Class.{u1} (Class.ofSet.{u1} (Union.union.{succ u1} ZFSet.{u1} ZFSet.instUnionZFSet.{u1} x y)) (Union.union.{succ u1} Class.{u1} instClassUnion.{u1} (Class.ofSet.{u1} x) (Class.ofSet.{u1} y))
+Case conversion may be inaccurate. Consider using '#align Class.coe_union Class.coe_unionₓ'. -/
 @[simp, norm_cast]
-theorem coe_union (x y : SetCat.{u}) : ↑(x ∪ y) = (x : Class.{u}) ∪ y :=
-  ext fun z => SetCat.mem_union
+theorem coe_union (x y : ZFSet.{u}) : ↑(x ∪ y) = (x : Class.{u}) ∪ y :=
+  ext fun z => ZFSet.mem_union
 #align Class.coe_union Class.coe_union
 
+/- warning: Class.coe_inter -> Class.coe_inter is a dubious translation:
+lean 3 declaration is
+  forall (x : ZFSet.{u1}) (y : ZFSet.{u1}), Eq.{succ (succ u1)} Class.{u1} ((fun (a : Type.{succ u1}) (b : Type.{succ u1}) [self : HasLiftT.{succ (succ u1), succ (succ u1)} a b] => self.0) ZFSet.{u1} Class.{u1} (HasLiftT.mk.{succ (succ u1), succ (succ u1)} ZFSet.{u1} Class.{u1} (CoeTCₓ.coe.{succ (succ u1), succ (succ u1)} ZFSet.{u1} Class.{u1} (coeBase.{succ (succ u1), succ (succ u1)} ZFSet.{u1} Class.{u1} Class.hasCoe.{u1}))) (Inter.inter.{succ u1} ZFSet.{u1} ZFSet.hasInter.{u1} x y)) (Inter.inter.{succ u1} Class.{u1} Class.hasInter.{u1} ((fun (a : Type.{succ u1}) (b : Type.{succ u1}) [self : HasLiftT.{succ (succ u1), succ (succ u1)} a b] => self.0) ZFSet.{u1} Class.{u1} (HasLiftT.mk.{succ (succ u1), succ (succ u1)} ZFSet.{u1} Class.{u1} (CoeTCₓ.coe.{succ (succ u1), succ (succ u1)} ZFSet.{u1} Class.{u1} (coeBase.{succ (succ u1), succ (succ u1)} ZFSet.{u1} Class.{u1} Class.hasCoe.{u1}))) x) ((fun (a : Type.{succ u1}) (b : Type.{succ u1}) [self : HasLiftT.{succ (succ u1), succ (succ u1)} a b] => self.0) ZFSet.{u1} Class.{u1} (HasLiftT.mk.{succ (succ u1), succ (succ u1)} ZFSet.{u1} Class.{u1} (CoeTCₓ.coe.{succ (succ u1), succ (succ u1)} ZFSet.{u1} Class.{u1} (coeBase.{succ (succ u1), succ (succ u1)} ZFSet.{u1} Class.{u1} Class.hasCoe.{u1}))) y))
+but is expected to have type
+  forall (x : ZFSet.{u1}) (y : ZFSet.{u1}), Eq.{succ (succ u1)} Class.{u1} (Class.ofSet.{u1} (Inter.inter.{succ u1} ZFSet.{u1} ZFSet.instInterZFSet.{u1} x y)) (Inter.inter.{succ u1} Class.{u1} instClassInter.{u1} (Class.ofSet.{u1} x) (Class.ofSet.{u1} y))
+Case conversion may be inaccurate. Consider using '#align Class.coe_inter Class.coe_interₓ'. -/
 @[simp, norm_cast]
-theorem coe_inter (x y : SetCat.{u}) : ↑(x ∩ y) = (x : Class.{u}) ∩ y :=
-  ext fun z => SetCat.mem_inter
+theorem coe_inter (x y : ZFSet.{u}) : ↑(x ∩ y) = (x : Class.{u}) ∩ y :=
+  ext fun z => ZFSet.mem_inter
 #align Class.coe_inter Class.coe_inter
 
+/- warning: Class.coe_diff -> Class.coe_diff is a dubious translation:
+lean 3 declaration is
+  forall (x : ZFSet.{u1}) (y : ZFSet.{u1}), Eq.{succ (succ u1)} Class.{u1} ((fun (a : Type.{succ u1}) (b : Type.{succ u1}) [self : HasLiftT.{succ (succ u1), succ (succ u1)} a b] => self.0) ZFSet.{u1} Class.{u1} (HasLiftT.mk.{succ (succ u1), succ (succ u1)} ZFSet.{u1} Class.{u1} (CoeTCₓ.coe.{succ (succ u1), succ (succ u1)} ZFSet.{u1} Class.{u1} (coeBase.{succ (succ u1), succ (succ u1)} ZFSet.{u1} Class.{u1} Class.hasCoe.{u1}))) (SDiff.sdiff.{succ u1} ZFSet.{u1} ZFSet.hasSdiff.{u1} x y)) (SDiff.sdiff.{succ u1} Class.{u1} Class.hasSdiff.{u1} ((fun (a : Type.{succ u1}) (b : Type.{succ u1}) [self : HasLiftT.{succ (succ u1), succ (succ u1)} a b] => self.0) ZFSet.{u1} Class.{u1} (HasLiftT.mk.{succ (succ u1), succ (succ u1)} ZFSet.{u1} Class.{u1} (CoeTCₓ.coe.{succ (succ u1), succ (succ u1)} ZFSet.{u1} Class.{u1} (coeBase.{succ (succ u1), succ (succ u1)} ZFSet.{u1} Class.{u1} Class.hasCoe.{u1}))) x) ((fun (a : Type.{succ u1}) (b : Type.{succ u1}) [self : HasLiftT.{succ (succ u1), succ (succ u1)} a b] => self.0) ZFSet.{u1} Class.{u1} (HasLiftT.mk.{succ (succ u1), succ (succ u1)} ZFSet.{u1} Class.{u1} (CoeTCₓ.coe.{succ (succ u1), succ (succ u1)} ZFSet.{u1} Class.{u1} (coeBase.{succ (succ u1), succ (succ u1)} ZFSet.{u1} Class.{u1} Class.hasCoe.{u1}))) y))
+but is expected to have type
+  forall (x : ZFSet.{u1}) (y : ZFSet.{u1}), Eq.{succ (succ u1)} Class.{u1} (Class.ofSet.{u1} (SDiff.sdiff.{succ u1} ZFSet.{u1} ZFSet.instSDiffZFSet.{u1} x y)) (SDiff.sdiff.{succ u1} Class.{u1} instClassSDiff.{u1} (Class.ofSet.{u1} x) (Class.ofSet.{u1} y))
+Case conversion may be inaccurate. Consider using '#align Class.coe_diff Class.coe_diffₓ'. -/
 @[simp, norm_cast]
-theorem coe_diff (x y : SetCat.{u}) : ↑(x \ y) = (x : Class.{u}) \ y :=
-  ext fun z => SetCat.mem_diff
+theorem coe_diff (x y : ZFSet.{u}) : ↑(x \ y) = (x : Class.{u}) \ y :=
+  ext fun z => ZFSet.mem_diff
 #align Class.coe_diff Class.coe_diff
 
+#print Class.coe_powerset /-
 @[simp, norm_cast]
-theorem coe_powerset (x : SetCat.{u}) : ↑x.powerset = powerset.{u} x :=
-  ext fun z => SetCat.mem_powerset
+theorem coe_powerset (x : ZFSet.{u}) : ↑x.powerset = powerset.{u} x :=
+  ext fun z => ZFSet.mem_powerset
 #align Class.coe_powerset Class.coe_powerset
+-/
 
+#print Class.powerset_apply /-
 @[simp]
-theorem powerset_apply {A : Class.{u}} {x : SetCat.{u}} : powerset A x ↔ ↑x ⊆ A :=
+theorem powerset_apply {A : Class.{u}} {x : ZFSet.{u}} : powerset A x ↔ ↑x ⊆ A :=
   Iff.rfl
 #align Class.powerset_apply Class.powerset_apply
+-/
 
 /- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
+#print Class.unionₛ_apply /-
 @[simp]
-theorem sUnion_apply {x : Class} {y : SetCat} : (⋃₀ x) y ↔ ∃ z : SetCat, x z ∧ y ∈ z :=
+theorem unionₛ_apply {x : Class} {y : ZFSet} : (⋃₀ x) y ↔ ∃ z : ZFSet, x z ∧ y ∈ z :=
   by
   constructor
   · rintro ⟨-, ⟨z, rfl, hxz⟩, hyz⟩
     exact ⟨z, hxz, hyz⟩
   · exact fun ⟨z, hxz, hyz⟩ => ⟨_, coe_mem.2 hxz, hyz⟩
-#align Class.sUnion_apply Class.sUnion_apply
+#align Class.sUnion_apply Class.unionₛ_apply
+-/
 
 /- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
 /- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
+#print Class.coe_unionₛ /-
 @[simp, norm_cast]
-theorem coe_sUnion (x : SetCat.{u}) : ↑(⋃₀ x) = ⋃₀ (x : Class.{u}) :=
+theorem coe_unionₛ (x : ZFSet.{u}) : ↑(⋃₀ x) = ⋃₀ (x : Class.{u}) :=
   ext fun y =>
-    SetCat.mem_sUnion.trans (sUnion_apply.trans <| by simp_rw [coe_apply, exists_prop]).symm
-#align Class.coe_sUnion Class.coe_sUnion
+    ZFSet.mem_unionₛ.trans (unionₛ_apply.trans <| by simp_rw [coe_apply, exists_prop]).symm
+#align Class.coe_sUnion Class.coe_unionₛ
+-/
 
 /- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
+#print Class.mem_unionₛ /-
 @[simp]
-theorem mem_sUnion {x y : Class.{u}} : y ∈ ⋃₀ x ↔ ∃ z, z ∈ x ∧ y ∈ z :=
+theorem mem_unionₛ {x y : Class.{u}} : y ∈ ⋃₀ x ↔ ∃ z, z ∈ x ∧ y ∈ z :=
   by
   constructor
   · rintro ⟨w, rfl, z, hzx, hwz⟩
     exact ⟨z, hzx, coe_mem.2 hwz⟩
   · rintro ⟨w, hwx, z, rfl, hwz⟩
     exact ⟨z, rfl, w, hwx, hwz⟩
-#align Class.mem_sUnion Class.mem_sUnion
+#align Class.mem_sUnion Class.mem_unionₛ
+-/
 
 /- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
 @[simp]
-theorem sInter_apply {x : Class.{u}} {y : SetCat.{u}} : (⋂₀ x) y ↔ ∀ z : SetCat.{u}, x z → y ∈ z :=
+theorem sInter_apply {x : Class.{u}} {y : ZFSet.{u}} : (⋂₀ x) y ↔ ∀ z : ZFSet.{u}, x z → y ∈ z :=
   by
   refine' ⟨fun hxy z hxz => hxy _ ⟨z, rfl, hxz⟩, _⟩
   rintro H - ⟨z, rfl, hxz⟩
@@ -1767,8 +2324,8 @@ theorem sInter_apply {x : Class.{u}} {y : SetCat.{u}} : (⋂₀ x) y ↔ ∀ z :
 /- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
 /- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
 @[simp, norm_cast]
-theorem sInter_coe {x : SetCat.{u}} (h : x.Nonempty) : ⋂₀ (x : Class.{u}) = ⋂₀ x :=
-  Set.ext fun y => sInter_apply.trans (SetCat.mem_sInter h).symm
+theorem sInter_coe {x : ZFSet.{u}} (h : x.Nonempty) : ⋂₀ (x : Class.{u}) = ⋂₀ x :=
+  Set.ext fun y => sInter_apply.trans (ZFSet.mem_sInter h).symm
 #align Class.sInter_coe Class.sInter_coe
 
 /- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
@@ -1790,12 +2347,14 @@ theorem mem_sInter {x y : Class.{u}} (h : x.Nonempty) : y ∈ ⋂₀ x ↔ ∀ z
 #align Class.mem_sInter Class.mem_sInter
 
 /- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
+#print Class.unionₛ_empty /-
 @[simp]
-theorem sUnion_empty : ⋃₀ (∅ : Class.{u}) = ∅ :=
+theorem unionₛ_empty : ⋃₀ (∅ : Class.{u}) = ∅ :=
   by
   ext
   simp
-#align Class.sUnion_empty Class.sUnion_empty
+#align Class.sUnion_empty Class.unionₛ_empty
+-/
 
 /- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
 @[simp]
@@ -1805,6 +2364,7 @@ theorem sInter_empty : ⋂₀ (∅ : Class.{u}) = univ :=
   simp [sInter, ← univ]
 #align Class.sInter_empty Class.sInter_empty
 
+#print Class.eq_univ_of_powerset_subset /-
 /-- An induction principle for sets. If every subset of a class is a member, then the class is
   universal. -/
 theorem eq_univ_of_powerset_subset {A : Class} (hA : powerset A ⊆ A) : A = univ :=
@@ -1812,24 +2372,30 @@ theorem eq_univ_of_powerset_subset {A : Class} (hA : powerset A ⊆ A) : A = uni
     (by
       by_contra' hnA
       exact
-        WellFounded.min_mem SetCat.mem_wf _ hnA
+        WellFounded.min_mem ZFSet.mem_wf _ hnA
           (hA fun x hx =>
             Classical.not_not.1 fun hB =>
-              WellFounded.not_lt_min SetCat.mem_wf _ hnA hB <| coe_apply.1 hx))
+              WellFounded.not_lt_min ZFSet.mem_wf _ hnA hB <| coe_apply.1 hx))
 #align Class.eq_univ_of_powerset_subset Class.eq_univ_of_powerset_subset
+-/
 
 /- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
+#print Class.iota /-
 /-- The definite description operator, which is `{x}` if `{y | A y} = {x}` and `∅` otherwise. -/
 def iota (A : Class) : Class :=
   ⋃₀ { x | ∀ y, A y ↔ y = x }
 #align Class.iota Class.iota
+-/
 
-theorem iota_val (A : Class) (x : SetCat) (H : ∀ y, A y ↔ y = x) : iota A = ↑x :=
+#print Class.iota_val /-
+theorem iota_val (A : Class) (x : ZFSet) (H : ∀ y, A y ↔ y = x) : iota A = ↑x :=
   ext fun y =>
     ⟨fun ⟨_, ⟨x', rfl, h⟩, yx'⟩ => by rwa [← (H x').1 <| (h x').2 rfl], fun yx =>
       ⟨_, ⟨x, rfl, H⟩, yx⟩⟩
 #align Class.iota_val Class.iota_val
+-/
 
+#print Class.iota_ex /-
 /-- 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 `Class → Set` function. -/
@@ -1839,64 +2405,79 @@ theorem iota_ex (A) : iota.{u} A ∈ univ.{u} :=
       fun hn =>
       ⟨∅, ext fun z => coe_empty.symm ▸ ⟨False.ndrec _, fun ⟨_, ⟨x, rfl, H⟩, zA⟩ => hn ⟨x, H⟩⟩⟩
 #align Class.iota_ex Class.iota_ex
+-/
 
+#print Class.fval /-
 /-- Function value -/
 def fval (F A : Class.{u}) : Class.{u} :=
-  iota fun y => ToSet (fun x => F (SetCat.pair x y)) A
+  iota fun y => ToSet (fun x => F (ZFSet.pair x y)) A
 #align Class.fval Class.fval
+-/
 
 -- mathport name: «expr ′ »
 infixl:100 " ′ " => fval
 
+#print Class.fval_ex /-
 theorem fval_ex (F A : Class.{u}) : F ′ A ∈ univ.{u} :=
   iota_ex _
 #align Class.fval_ex Class.fval_ex
+-/
 
 end Class
 
-namespace SetCat
+namespace ZFSet
 
+#print ZFSet.map_fval /-
 @[simp]
-theorem map_fval {f : SetCat.{u} → SetCat.{u}} [H : PSet.Definable 1 f] {x y : SetCat.{u}}
-    (h : y ∈ x) : (SetCat.map f x ′ y : Class.{u}) = f y :=
+theorem map_fval {f : ZFSet.{u} → ZFSet.{u}} [H : PSet.Definable 1 f] {x y : ZFSet.{u}}
+    (h : y ∈ x) : (ZFSet.map f x ′ y : Class.{u}) = f y :=
   Class.iota_val _ _ fun z =>
     by
     rw [Class.toSet_of_setCat, Class.coe_apply, mem_map]
     exact
       ⟨fun ⟨w, wz, pr⟩ => by
-        let ⟨wy, fw⟩ := SetCat.pair_injective pr
+        let ⟨wy, fw⟩ := ZFSet.pair_injective pr
         rw [← fw, wy], fun e => by
         subst e
         exact ⟨_, h, rfl⟩⟩
-#align Set.map_fval SetCat.map_fval
+#align Set.map_fval ZFSet.map_fval
+-/
 
-variable (x : SetCat.{u}) (h : ∅ ∉ x)
+variable (x : ZFSet.{u}) (h : ∅ ∉ x)
 
+#print ZFSet.choice /-
 /-- A choice function on the class of nonempty ZFC sets. -/
-noncomputable def choice : SetCat :=
-  @map (fun y => Classical.epsilon fun z => z ∈ y) (Classical.allDefinable _) x
-#align Set.choice SetCat.choice
+noncomputable def choice : ZFSet :=
+  @map (fun y => Classical.epsilon fun z => z ∈ y) (Classical.AllDefinable _) x
+#align Set.choice ZFSet.choice
+-/
 
 include h
 
-theorem choice_mem_aux (y : SetCat.{u}) (yx : y ∈ x) :
-    (Classical.epsilon fun z : SetCat.{u} => z ∈ y) ∈ y :=
-  (@Classical.epsilon_spec _ fun z : SetCat.{u} => z ∈ y) <|
+#print ZFSet.choice_mem_aux /-
+theorem choice_mem_aux (y : ZFSet.{u}) (yx : y ∈ x) :
+    (Classical.epsilon fun z : ZFSet.{u} => z ∈ y) ∈ y :=
+  (@Classical.epsilon_spec _ fun z : ZFSet.{u} => z ∈ y) <|
     by_contradiction fun n => h <| by rwa [← (eq_empty y).2 fun z zx => n ⟨z, zx⟩]
-#align Set.choice_mem_aux SetCat.choice_mem_aux
+#align Set.choice_mem_aux ZFSet.choice_mem_aux
+-/
 
 /- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
+#print ZFSet.choice_isFunc /-
 theorem choice_isFunc : IsFunc x (⋃₀ x) (choice x) :=
-  (@map_isFunc _ (Classical.allDefinable _) _ _).2 fun y yx =>
-    mem_sUnion.2 ⟨y, yx, choice_mem_aux x h y yx⟩
-#align Set.choice_is_func SetCat.choice_isFunc
+  (@map_isFunc _ (Classical.AllDefinable _) _ _).2 fun y yx =>
+    mem_unionₛ.2 ⟨y, yx, choice_mem_aux x h y yx⟩
+#align Set.choice_is_func ZFSet.choice_isFunc
+-/
 
-theorem choice_mem (y : SetCat.{u}) (yx : y ∈ x) : (choice x ′ y : Class.{u}) ∈ (y : Class.{u}) :=
+#print ZFSet.choice_mem /-
+theorem choice_mem (y : ZFSet.{u}) (yx : y ∈ x) : (choice x ′ y : Class.{u}) ∈ (y : Class.{u}) :=
   by
   delta choice
   rw [map_fval yx, Class.coe_mem, Class.coe_apply]
   exact choice_mem_aux x h y yx
-#align Set.choice_mem SetCat.choice_mem
+#align Set.choice_mem ZFSet.choice_mem
+-/
 
-end SetCat
+end ZFSet
 
Diff
@@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Mario Carneiro
 
 ! This file was ported from Lean 3 source module set_theory.zfc.basic
-! leanprover-community/mathlib commit 98bbc3526516bca903bff09ea10c4206bf079e6b
+! leanprover-community/mathlib commit 229f6f14a8b345d28ad17aaa1e9e79beb9e231da
 ! Please do not edit these lines, except to modify the commit id
 ! if you have ported upstream changes.
 -/
@@ -1054,6 +1054,15 @@ def sUnion : SetCat → SetCat :=
 -- mathport name: Set.sUnion
 prefix:110 "⋃₀ " => SetCat.sUnion
 
+/-- The intersection operator, the collection of elements in all of the elements of a ZFC set. We
+special-case `⋂₀ ∅ = ∅`. -/
+noncomputable def sInter (x : SetCat) : SetCat := by
+  classical exact dite x.nonempty (fun h => { y ∈ h.some | ∀ z ∈ x, y ∈ z }) fun _ => ∅
+#align Set.sInter SetCat.sInter
+
+-- mathport name: Set.sInter
+prefix:110 "⋂₀ " => SetCat.sInter
+
 /- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
 @[simp]
 theorem mem_sUnion {x y : SetCat.{u}} : y ∈ ⋃₀ x ↔ ∃ z ∈ x, y ∈ z :=
@@ -1063,24 +1072,56 @@ theorem mem_sUnion {x y : SetCat.{u}} : y ∈ ⋃₀ x ↔ ∃ z ∈ x, y ∈ z
 #align Set.mem_sUnion SetCat.mem_sUnion
 
 /- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
-theorem mem_sUnion_of_mem {x y z : SetCat} (hy : y ∈ z) (hz : z ∈ x) : y ∈ ⋃₀ x :=
-  mem_sUnion.2 ⟨z, hz, hy⟩
-#align Set.mem_sUnion_of_mem SetCat.mem_sUnion_of_mem
+theorem mem_sInter {x y : SetCat} (h : x.Nonempty) : y ∈ ⋂₀ x ↔ ∀ z ∈ x, y ∈ z :=
+  by
+  rw [sInter, dif_pos h]
+  simp only [mem_to_set, mem_sep, and_iff_right_iff_imp]
+  exact fun H => H _ h.some_mem
+#align Set.mem_sInter SetCat.mem_sInter
 
 /- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
 @[simp]
-theorem sUnion_empty : ⋃₀ (∅ : SetCat.{u}) = ∅ :=
-  by
+theorem sUnion_empty : ⋃₀ (∅ : SetCat) = ∅ := by
   ext
   simp
 #align Set.sUnion_empty SetCat.sUnion_empty
 
+/- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
+@[simp]
+theorem sInter_empty : ⋂₀ (∅ : SetCat) = ∅ :=
+  dif_neg <| by simp
+#align Set.sInter_empty SetCat.sInter_empty
+
+/- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
+theorem mem_of_mem_sInter {x y z : SetCat} (hy : y ∈ ⋂₀ x) (hz : z ∈ x) : y ∈ z :=
+  by
+  rcases eq_empty_or_nonempty x with (rfl | hx)
+  · exact (not_mem_empty z hz).elim
+  · exact (mem_sInter hx).1 hy z hz
+#align Set.mem_of_mem_sInter SetCat.mem_of_mem_sInter
+
+/- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
+theorem mem_sUnion_of_mem {x y z : SetCat} (hy : y ∈ z) (hz : z ∈ x) : y ∈ ⋃₀ x :=
+  mem_sUnion.2 ⟨z, hz, hy⟩
+#align Set.mem_sUnion_of_mem SetCat.mem_sUnion_of_mem
+
+/- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
+theorem not_mem_sInter_of_not_mem {x y z : SetCat} (hy : ¬y ∈ z) (hz : z ∈ x) : ¬y ∈ ⋂₀ x :=
+  fun hx => hy <| mem_of_mem_sInter hx hz
+#align Set.not_mem_sInter_of_not_mem SetCat.not_mem_sInter_of_not_mem
+
 /- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
 @[simp]
 theorem sUnion_singleton {x : SetCat.{u}} : ⋃₀ ({x} : SetCat) = x :=
   ext fun y => by simp_rw [mem_sUnion, exists_prop, mem_singleton, exists_eq_left]
 #align Set.sUnion_singleton SetCat.sUnion_singleton
 
+/- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
+@[simp]
+theorem sInter_singleton {x : SetCat.{u}} : ⋂₀ ({x} : SetCat) = x :=
+  ext fun y => by simp_rw [mem_sInter (singleton_nonempty x), mem_singleton, forall_eq]
+#align Set.sInter_singleton SetCat.sInter_singleton
+
 /- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
 /- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
 @[simp]
@@ -1090,6 +1131,14 @@ theorem toSet_sUnion (x : SetCat.{u}) : (⋃₀ x).toSet = ⋃₀ (toSet '' x.to
   simp
 #align Set.to_set_sUnion SetCat.toSet_sUnion
 
+/- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
+/- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
+theorem toSet_sInter {x : SetCat.{u}} (h : x.Nonempty) : (⋂₀ x).toSet = ⋂₀ (toSet '' x.toSet) :=
+  by
+  ext
+  simp [mem_sInter h]
+#align Set.to_set_sInter SetCat.toSet_sInter
+
 theorem singleton_injective : Function.Injective (@singleton SetCat SetCat _) := fun x y H =>
   by
   let this := congr_arg sUnion H
@@ -1601,6 +1650,15 @@ def sUnion (x : Class) : Class :=
 -- mathport name: Class.sUnion
 prefix:110 "⋃₀ " => Class.sUnion
 
+/- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
+/-- The intersection of a class is the class of all members of ZFC sets in the class -/
+def sInter (x : Class) : Class :=
+  ⋂₀ classToCong x
+#align Class.sInter Class.sInter
+
+-- mathport name: Class.sInter
+prefix:110 "⋂₀ " => Class.sInter
+
 theorem ofSet.inj {x y : SetCat.{u}} (h : (x : Class.{u}) = y) : x = y :=
   SetCat.ext fun z => by
     change (x : Class.{u}) z ↔ (y : Class.{u}) z
@@ -1699,12 +1757,54 @@ theorem mem_sUnion {x y : Class.{u}} : y ∈ ⋃₀ x ↔ ∃ z, z ∈ x ∧ y 
 
 /- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
 @[simp]
-theorem sUnion_empty : ⋃₀ (∅ : Class.{u}) = (∅ : Class.{u}) :=
+theorem sInter_apply {x : Class.{u}} {y : SetCat.{u}} : (⋂₀ x) y ↔ ∀ z : SetCat.{u}, x z → y ∈ z :=
+  by
+  refine' ⟨fun hxy z hxz => hxy _ ⟨z, rfl, hxz⟩, _⟩
+  rintro H - ⟨z, rfl, hxz⟩
+  exact H _ hxz
+#align Class.sInter_apply Class.sInter_apply
+
+/- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
+/- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
+@[simp, norm_cast]
+theorem sInter_coe {x : SetCat.{u}} (h : x.Nonempty) : ⋂₀ (x : Class.{u}) = ⋂₀ x :=
+  Set.ext fun y => sInter_apply.trans (SetCat.mem_sInter h).symm
+#align Class.sInter_coe Class.sInter_coe
+
+/- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
+theorem mem_of_mem_sInter {x y z : Class} (hy : y ∈ ⋂₀ x) (hz : z ∈ x) : y ∈ z :=
+  by
+  obtain ⟨w, rfl, hw⟩ := hy
+  exact coe_mem.2 (hw z hz)
+#align Class.mem_of_mem_sInter Class.mem_of_mem_sInter
+
+/- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
+theorem mem_sInter {x y : Class.{u}} (h : x.Nonempty) : y ∈ ⋂₀ x ↔ ∀ z, z ∈ x → y ∈ z :=
+  by
+  refine' ⟨fun hy z => mem_of_mem_sInter hy, fun H => _⟩
+  simp_rw [mem_def, sInter_apply]
+  obtain ⟨z, hz⟩ := h
+  obtain ⟨y, rfl, hzy⟩ := H z (coe_mem.2 hz)
+  refine' ⟨y, rfl, fun w hxw => _⟩
+  simpa only [coe_mem, coe_apply] using H w (coe_mem.2 hxw)
+#align Class.mem_sInter Class.mem_sInter
+
+/- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
+@[simp]
+theorem sUnion_empty : ⋃₀ (∅ : Class.{u}) = ∅ :=
   by
   ext
   simp
 #align Class.sUnion_empty Class.sUnion_empty
 
+/- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
+@[simp]
+theorem sInter_empty : ⋂₀ (∅ : Class.{u}) = univ :=
+  by
+  ext
+  simp [sInter, ← univ]
+#align Class.sInter_empty Class.sInter_empty
+
 /-- An induction principle for sets. If every subset of a class is a member, then the class is
   universal. -/
 theorem eq_univ_of_powerset_subset {A : Class} (hA : powerset A ⊆ A) : A = univ :=
Diff
@@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Mario Carneiro
 
 ! This file was ported from Lean 3 source module set_theory.zfc.basic
-! leanprover-community/mathlib commit ef5f2ce93dd79b7fb184018b6f48132a10c764e7
+! leanprover-community/mathlib commit 98bbc3526516bca903bff09ea10c4206bf079e6b
 ! Please do not edit these lines, except to modify the commit id
 ! if you have ported upstream changes.
 -/
@@ -1168,6 +1168,21 @@ theorem mem_diff {x y z : SetCat.{u}} : z ∈ x \ y ↔ z ∈ x ∧ z ∉ y :=
   @mem_sep fun z : SetCat.{u} => z ∉ y
 #align Set.mem_diff SetCat.mem_diff
 
+/- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
+@[simp]
+theorem sUnion_pair {x y : SetCat.{u}} : ⋃₀ ({x, y} : SetCat.{u}) = x ∪ y :=
+  by
+  ext
+  simp_rw [mem_union, mem_sUnion, mem_pair]
+  constructor
+  · rintro ⟨w, rfl | rfl, hw⟩
+    · exact Or.inl hw
+    · exact Or.inr hw
+  · rintro (hz | hz)
+    · exact ⟨x, Or.inl rfl, hz⟩
+    · exact ⟨y, Or.inr rfl, hz⟩
+#align Set.sUnion_pair SetCat.sUnion_pair
+
 theorem mem_wf : @WellFounded SetCat (· ∈ ·) :=
   wellFounded_lift₂_iff.mpr PSet.mem_wf
 #align Set.mem_wf SetCat.mem_wf
Diff
@@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Mario Carneiro
 
 ! This file was ported from Lean 3 source module set_theory.zfc.basic
-! leanprover-community/mathlib commit c5dd93108bec0f9023919bc97bc1f68f88edb7bd
+! leanprover-community/mathlib commit ef5f2ce93dd79b7fb184018b6f48132a10c764e7
 ! Please do not edit these lines, except to modify the commit id
 ! if you have ported upstream changes.
 -/
@@ -1448,6 +1448,15 @@ def Class :=
 
 namespace Class
 
+@[ext]
+theorem ext {x y : Class.{u}} : (∀ z : SetCat.{u}, x z ↔ y z) → x = y :=
+  Set.ext
+#align Class.ext Class.ext
+
+theorem ext_iff {x y : Class.{u}} : x = y ↔ ∀ z, x z ↔ y z :=
+  Set.ext_iff
+#align Class.ext_iff Class.ext_iff
+
 /-- Coerce a ZFC set into a class -/
 def ofSet (x : SetCat.{u}) : Class.{u} :=
   { y | y ∈ x }
@@ -1606,37 +1615,37 @@ theorem coe_subset (x y : SetCat.{u}) : (x : Class.{u}) ⊆ y ↔ x ⊆ y :=
 @[simp, norm_cast]
 theorem coe_sep (p : Class.{u}) (x : SetCat.{u}) :
     (↑({ y ∈ x | p y }) : Class.{u}) = { y ∈ x | p y } :=
-  Set.ext fun y => SetCat.mem_sep
+  ext fun y => SetCat.mem_sep
 #align Class.coe_sep Class.coe_sep
 
 @[simp, norm_cast]
 theorem coe_empty : ↑(∅ : SetCat.{u}) = (∅ : Class.{u}) :=
-  Set.ext fun y => (iff_false_iff _).2 <| SetCat.not_mem_empty y
+  ext fun y => (iff_false_iff _).2 <| SetCat.not_mem_empty y
 #align Class.coe_empty Class.coe_empty
 
 @[simp, norm_cast]
 theorem coe_insert (x y : SetCat.{u}) : ↑(insert x y) = @insert SetCat.{u} Class.{u} _ x y :=
-  Set.ext fun z => SetCat.mem_insert_iff
+  ext fun z => SetCat.mem_insert_iff
 #align Class.coe_insert Class.coe_insert
 
 @[simp, norm_cast]
 theorem coe_union (x y : SetCat.{u}) : ↑(x ∪ y) = (x : Class.{u}) ∪ y :=
-  Set.ext fun z => SetCat.mem_union
+  ext fun z => SetCat.mem_union
 #align Class.coe_union Class.coe_union
 
 @[simp, norm_cast]
 theorem coe_inter (x y : SetCat.{u}) : ↑(x ∩ y) = (x : Class.{u}) ∩ y :=
-  Set.ext fun z => SetCat.mem_inter
+  ext fun z => SetCat.mem_inter
 #align Class.coe_inter Class.coe_inter
 
 @[simp, norm_cast]
 theorem coe_diff (x y : SetCat.{u}) : ↑(x \ y) = (x : Class.{u}) \ y :=
-  Set.ext fun z => SetCat.mem_diff
+  ext fun z => SetCat.mem_diff
 #align Class.coe_diff Class.coe_diff
 
 @[simp, norm_cast]
 theorem coe_powerset (x : SetCat.{u}) : ↑x.powerset = powerset.{u} x :=
-  Set.ext fun z => SetCat.mem_powerset
+  ext fun z => SetCat.mem_powerset
 #align Class.coe_powerset Class.coe_powerset
 
 @[simp]
@@ -1658,23 +1667,10 @@ theorem sUnion_apply {x : Class} {y : SetCat} : (⋃₀ x) y ↔ ∃ z : SetCat,
 /- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
 @[simp, norm_cast]
 theorem coe_sUnion (x : SetCat.{u}) : ↑(⋃₀ x) = ⋃₀ (x : Class.{u}) :=
-  Set.ext fun y =>
+  ext fun y =>
     SetCat.mem_sUnion.trans (sUnion_apply.trans <| by simp_rw [coe_apply, exists_prop]).symm
 #align Class.coe_sUnion Class.coe_sUnion
 
-@[ext]
-theorem ext {x y : Class.{u}} : (∀ z : Class.{u}, z ∈ x ↔ z ∈ y) → x = y :=
-  by
-  refine' fun h => Set.ext fun z => _
-  change x z ↔ y z
-  rw [← @coe_mem z x, ← @coe_mem z y]
-  exact h z
-#align Class.ext Class.ext
-
-theorem ext_iff {x y : Class.{u}} : x = y ↔ ∀ z : Class.{u}, z ∈ x ↔ z ∈ y :=
-  ⟨fun h => by simp [h], ext⟩
-#align Class.ext_iff Class.ext_iff
-
 /- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
 @[simp]
 theorem mem_sUnion {x y : Class.{u}} : y ∈ ⋃₀ x ↔ ∃ z, z ∈ x ∧ y ∈ z :=
@@ -1714,7 +1710,7 @@ def iota (A : Class) : Class :=
 #align Class.iota Class.iota
 
 theorem iota_val (A : Class) (x : SetCat) (H : ∀ y, A y ↔ y = x) : iota A = ↑x :=
-  Set.ext fun y =>
+  ext fun y =>
     ⟨fun ⟨_, ⟨x', rfl, h⟩, yx'⟩ => by rwa [← (H x').1 <| (h x').2 rfl], fun yx =>
       ⟨_, ⟨x, rfl, H⟩, yx⟩⟩
 #align Class.iota_val Class.iota_val
@@ -1726,7 +1722,7 @@ theorem iota_ex (A) : iota.{u} A ∈ univ.{u} :=
   mem_univ.2 <|
     Or.elim (Classical.em <| ∃ x, ∀ y, A y ↔ y = x) (fun ⟨x, h⟩ => ⟨x, Eq.symm <| iota_val A x h⟩)
       fun hn =>
-      ⟨∅, Set.ext fun z => coe_empty.symm ▸ ⟨False.ndrec _, fun ⟨_, ⟨x, rfl, H⟩, zA⟩ => hn ⟨x, H⟩⟩⟩
+      ⟨∅, ext fun z => coe_empty.symm ▸ ⟨False.ndrec _, fun ⟨_, ⟨x, rfl, H⟩, zA⟩ => hn ⟨x, H⟩⟩⟩
 #align Class.iota_ex Class.iota_ex
 
 /-- Function value -/
Diff
@@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Mario Carneiro
 
 ! This file was ported from Lean 3 source module set_theory.zfc.basic
-! leanprover-community/mathlib commit 3353f661228bd27f632c600cd1a58b874d847c90
+! leanprover-community/mathlib commit c5dd93108bec0f9023919bc97bc1f68f88edb7bd
 ! Please do not edit these lines, except to modify the commit id
 ! if you have ported upstream changes.
 -/
@@ -1588,72 +1588,86 @@ theorem toSet_of_setCat (A : Class.{u}) (x : SetCat.{u}) : ToSet A x ↔ A x :=
   ⟨fun ⟨y, yx, py⟩ => by rwa [of_Set.inj yx] at py, fun px => ⟨x, rfl, px⟩⟩
 #align Class.to_Set_of_Set Class.toSet_of_setCat
 
-@[simp]
-theorem mem_hom_left (x : SetCat.{u}) (A : Class.{u}) : (x : Class.{u}) ∈ A ↔ A x :=
+@[simp, norm_cast]
+theorem coe_mem {x : SetCat.{u}} {A : Class.{u}} : (x : Class.{u}) ∈ A ↔ A x :=
   toSet_of_setCat _ _
-#align Class.mem_hom_left Class.mem_hom_left
+#align Class.coe_mem Class.coe_mem
 
 @[simp]
-theorem mem_hom_right (x y : SetCat.{u}) : (y : Class.{u}) x ↔ x ∈ y :=
+theorem coe_apply {x y : SetCat.{u}} : (y : Class.{u}) x ↔ x ∈ y :=
   Iff.rfl
-#align Class.mem_hom_right Class.mem_hom_right
+#align Class.coe_apply Class.coe_apply
 
-@[simp]
-theorem subset_hom (x y : SetCat.{u}) : (x : Class.{u}) ⊆ y ↔ x ⊆ y :=
+@[simp, norm_cast]
+theorem coe_subset (x y : SetCat.{u}) : (x : Class.{u}) ⊆ y ↔ x ⊆ y :=
   Iff.rfl
-#align Class.subset_hom Class.subset_hom
+#align Class.coe_subset Class.coe_subset
 
-@[simp]
-theorem sep_hom (p : Class.{u}) (x : SetCat.{u}) :
+@[simp, norm_cast]
+theorem coe_sep (p : Class.{u}) (x : SetCat.{u}) :
     (↑({ y ∈ x | p y }) : Class.{u}) = { y ∈ x | p y } :=
   Set.ext fun y => SetCat.mem_sep
-#align Class.sep_hom Class.sep_hom
+#align Class.coe_sep Class.coe_sep
 
-@[simp]
-theorem empty_hom : ↑(∅ : SetCat.{u}) = (∅ : Class.{u}) :=
-  Set.ext fun y => (iff_false_iff _).2 (SetCat.not_mem_empty y)
-#align Class.empty_hom Class.empty_hom
+@[simp, norm_cast]
+theorem coe_empty : ↑(∅ : SetCat.{u}) = (∅ : Class.{u}) :=
+  Set.ext fun y => (iff_false_iff _).2 <| SetCat.not_mem_empty y
+#align Class.coe_empty Class.coe_empty
 
-@[simp]
-theorem insert_hom (x y : SetCat.{u}) : @insert SetCat.{u} Class.{u} _ x y = ↑(insert x y) :=
-  Set.ext fun z => Iff.symm SetCat.mem_insert_iff
-#align Class.insert_hom Class.insert_hom
+@[simp, norm_cast]
+theorem coe_insert (x y : SetCat.{u}) : ↑(insert x y) = @insert SetCat.{u} Class.{u} _ x y :=
+  Set.ext fun z => SetCat.mem_insert_iff
+#align Class.coe_insert Class.coe_insert
 
-@[simp]
-theorem union_hom (x y : SetCat.{u}) : (x : Class.{u}) ∪ y = (x ∪ y : SetCat.{u}) :=
-  Set.ext fun z => Iff.symm SetCat.mem_union
-#align Class.union_hom Class.union_hom
+@[simp, norm_cast]
+theorem coe_union (x y : SetCat.{u}) : ↑(x ∪ y) = (x : Class.{u}) ∪ y :=
+  Set.ext fun z => SetCat.mem_union
+#align Class.coe_union Class.coe_union
 
-@[simp]
-theorem inter_hom (x y : SetCat.{u}) : (x : Class.{u}) ∩ y = (x ∩ y : SetCat.{u}) :=
-  Set.ext fun z => Iff.symm SetCat.mem_inter
-#align Class.inter_hom Class.inter_hom
+@[simp, norm_cast]
+theorem coe_inter (x y : SetCat.{u}) : ↑(x ∩ y) = (x : Class.{u}) ∩ y :=
+  Set.ext fun z => SetCat.mem_inter
+#align Class.coe_inter Class.coe_inter
+
+@[simp, norm_cast]
+theorem coe_diff (x y : SetCat.{u}) : ↑(x \ y) = (x : Class.{u}) \ y :=
+  Set.ext fun z => SetCat.mem_diff
+#align Class.coe_diff Class.coe_diff
+
+@[simp, norm_cast]
+theorem coe_powerset (x : SetCat.{u}) : ↑x.powerset = powerset.{u} x :=
+  Set.ext fun z => SetCat.mem_powerset
+#align Class.coe_powerset Class.coe_powerset
 
 @[simp]
-theorem diff_hom (x y : SetCat.{u}) : (x : Class.{u}) \ y = (x \ y : SetCat.{u}) :=
-  Set.ext fun z => Iff.symm SetCat.mem_diff
-#align Class.diff_hom Class.diff_hom
+theorem powerset_apply {A : Class.{u}} {x : SetCat.{u}} : powerset A x ↔ ↑x ⊆ A :=
+  Iff.rfl
+#align Class.powerset_apply Class.powerset_apply
 
+/- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
 @[simp]
-theorem powerset_hom (x : SetCat.{u}) : powerset.{u} x = SetCat.powerset x :=
-  Set.ext fun z => Iff.symm SetCat.mem_powerset
-#align Class.powerset_hom Class.powerset_hom
+theorem sUnion_apply {x : Class} {y : SetCat} : (⋃₀ x) y ↔ ∃ z : SetCat, x z ∧ y ∈ z :=
+  by
+  constructor
+  · rintro ⟨-, ⟨z, rfl, hxz⟩, hyz⟩
+    exact ⟨z, hxz, hyz⟩
+  · exact fun ⟨z, hxz, hyz⟩ => ⟨_, coe_mem.2 hxz, hyz⟩
+#align Class.sUnion_apply Class.sUnion_apply
 
 /- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
 /- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
-@[simp]
-theorem sUnion_hom (x : SetCat.{u}) : ⋃₀ (x : Class.{u}) = ⋃₀ x :=
-  Set.ext fun z => by
-    refine' Iff.trans _ Set.mem_sUnion.symm
-    exact ⟨fun ⟨_, ⟨a, rfl, ax⟩, za⟩ => ⟨a, ax, za⟩, fun ⟨a, ax, za⟩ => ⟨_, ⟨a, rfl, ax⟩, za⟩⟩
-#align Class.sUnion_hom Class.sUnion_hom
+@[simp, norm_cast]
+theorem coe_sUnion (x : SetCat.{u}) : ↑(⋃₀ x) = ⋃₀ (x : Class.{u}) :=
+  Set.ext fun y =>
+    SetCat.mem_sUnion.trans (sUnion_apply.trans <| by simp_rw [coe_apply, exists_prop]).symm
+#align Class.coe_sUnion Class.coe_sUnion
 
 @[ext]
 theorem ext {x y : Class.{u}} : (∀ z : Class.{u}, z ∈ x ↔ z ∈ y) → x = y :=
   by
   refine' fun h => Set.ext fun z => _
   change x z ↔ y z
-  rw [← mem_hom_left z x, ← mem_hom_left z y]
+  rw [← @coe_mem z x, ← @coe_mem z y]
   exact h z
 #align Class.ext Class.ext
 
@@ -1661,19 +1675,15 @@ theorem ext_iff {x y : Class.{u}} : x = y ↔ ∀ z : Class.{u}, z ∈ x ↔ z 
   ⟨fun h => by simp [h], ext⟩
 #align Class.ext_iff Class.ext_iff
 
-theorem coe_mem_powerset {x : Class.{u}} {y : SetCat.{u}} : powerset x y ↔ ↑y ⊆ x :=
-  Iff.rfl
-#align Class.coe_mem_powerset Class.coe_mem_powerset
-
 /- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
 @[simp]
 theorem mem_sUnion {x y : Class.{u}} : y ∈ ⋃₀ x ↔ ∃ z, z ∈ x ∧ y ∈ z :=
   by
   constructor
-  · rintro ⟨w, rfl, ⟨z, hzx, hwz⟩⟩
-    exact ⟨z, hzx, (mem_hom_left _ _).2 hwz⟩
-  · rintro ⟨w, hwx, ⟨z, rfl, hwz⟩⟩
-    exact ⟨z, rfl, ⟨w, hwx, hwz⟩⟩
+  · rintro ⟨w, rfl, z, hzx, hwz⟩
+    exact ⟨z, hzx, coe_mem.2 hwz⟩
+  · rintro ⟨w, hwx, z, rfl, hwz⟩
+    exact ⟨z, rfl, w, hwx, hwz⟩
 #align Class.mem_sUnion Class.mem_sUnion
 
 /- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
@@ -1694,7 +1704,7 @@ theorem eq_univ_of_powerset_subset {A : Class} (hA : powerset A ⊆ A) : A = uni
         WellFounded.min_mem SetCat.mem_wf _ hnA
           (hA fun x hx =>
             Classical.not_not.1 fun hB =>
-              WellFounded.not_lt_min SetCat.mem_wf _ hnA hB <| (mem_hom_right _ _).1 hx))
+              WellFounded.not_lt_min SetCat.mem_wf _ hnA hB <| coe_apply.1 hx))
 #align Class.eq_univ_of_powerset_subset Class.eq_univ_of_powerset_subset
 
 /- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
@@ -1716,7 +1726,7 @@ theorem iota_ex (A) : iota.{u} A ∈ univ.{u} :=
   mem_univ.2 <|
     Or.elim (Classical.em <| ∃ x, ∀ y, A y ↔ y = x) (fun ⟨x, h⟩ => ⟨x, Eq.symm <| iota_val A x h⟩)
       fun hn =>
-      ⟨∅, Set.ext fun z => empty_hom.symm ▸ ⟨False.ndrec _, fun ⟨_, ⟨x, rfl, H⟩, zA⟩ => hn ⟨x, H⟩⟩⟩
+      ⟨∅, Set.ext fun z => coe_empty.symm ▸ ⟨False.ndrec _, fun ⟨_, ⟨x, rfl, H⟩, zA⟩ => hn ⟨x, H⟩⟩⟩
 #align Class.iota_ex Class.iota_ex
 
 /-- Function value -/
@@ -1740,7 +1750,7 @@ theorem map_fval {f : SetCat.{u} → SetCat.{u}} [H : PSet.Definable 1 f] {x y :
     (h : y ∈ x) : (SetCat.map f x ′ y : Class.{u}) = f y :=
   Class.iota_val _ _ fun z =>
     by
-    rw [Class.toSet_of_setCat, Class.mem_hom_right, mem_map]
+    rw [Class.toSet_of_setCat, Class.coe_apply, mem_map]
     exact
       ⟨fun ⟨w, wz, pr⟩ => by
         let ⟨wy, fw⟩ := SetCat.pair_injective pr
@@ -1773,7 +1783,7 @@ theorem choice_isFunc : IsFunc x (⋃₀ x) (choice x) :=
 theorem choice_mem (y : SetCat.{u}) (yx : y ∈ x) : (choice x ′ y : Class.{u}) ∈ (y : Class.{u}) :=
   by
   delta choice
-  rw [map_fval yx, Class.mem_hom_left, Class.mem_hom_right]
+  rw [map_fval yx, Class.coe_mem, Class.coe_apply]
   exact choice_mem_aux x h y yx
 #align Set.choice_mem SetCat.choice_mem
 
Diff
@@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Mario Carneiro
 
 ! This file was ported from Lean 3 source module set_theory.zfc.basic
-! leanprover-community/mathlib commit 8f66c29c3911ef7d3ea2e254597a2d58204a7844
+! leanprover-community/mathlib commit 3353f661228bd27f632c600cd1a58b874d847c90
 ! Please do not edit these lines, except to modify the commit id
 ! if you have ported upstream changes.
 -/
@@ -1168,23 +1168,16 @@ theorem mem_diff {x y z : SetCat.{u}} : z ∈ x \ y ↔ z ∈ x ∧ z ∉ y :=
   @mem_sep fun z : SetCat.{u} => z ∉ y
 #align Set.mem_diff SetCat.mem_diff
 
+theorem mem_wf : @WellFounded SetCat (· ∈ ·) :=
+  wellFounded_lift₂_iff.mpr PSet.mem_wf
+#align Set.mem_wf SetCat.mem_wf
+
 /-- Induction on the `∈` relation. -/
 @[elab_as_elim]
 theorem induction_on {p : SetCat → Prop} (x) (h : ∀ x, (∀ y ∈ x, p y) → p x) : p x :=
-  Quotient.inductionOn x fun u =>
-    PSet.recOn u fun α A IH =>
-      h _ fun y =>
-        show @Membership.Mem _ _ SetCat.hasMem y ⟦⟨α, A⟩⟧ → p y from
-          Quotient.inductionOn y fun v ⟨a, ha⟩ =>
-            by
-            rw [@Quotient.sound PSet _ _ _ ha]
-            exact IH a
+  mem_wf.induction x h
 #align Set.induction_on SetCat.induction_on
 
-theorem mem_wf : @WellFounded SetCat (· ∈ ·) :=
-  ⟨fun x => induction_on x Acc.intro⟩
-#align Set.mem_wf SetCat.mem_wf
-
 instance : WellFoundedRelation SetCat :=
   ⟨_, mem_wf⟩
 
Diff
@@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Mario Carneiro
 
 ! This file was ported from Lean 3 source module set_theory.zfc.basic
-! leanprover-community/mathlib commit d7feae342946021379fc1e5025856afbce1de5dd
+! leanprover-community/mathlib commit 8f66c29c3911ef7d3ea2e254597a2d58204a7844
 ! Please do not edit these lines, except to modify the commit id
 ! if you have ported upstream changes.
 -/
@@ -1247,6 +1247,31 @@ theorem toSet_image (f : SetCat → SetCat) [H : Definable 1 f] (x : SetCat) :
   simp
 #align Set.to_set_image SetCat.toSet_image
 
+/-- The range of an indexed family of sets. The universes allow for a more general index type
+  without manual use of `ulift`. -/
+noncomputable def range {α : Type u} (f : α → SetCat.{max u v}) : SetCat.{max u v} :=
+  ⟦⟨ULift α, Quotient.out ∘ f ∘ ULift.down⟩⟧
+#align Set.range SetCat.range
+
+@[simp]
+theorem mem_range {α : Type u} {f : α → SetCat.{max u v}} {x : SetCat.{max u v}} :
+    x ∈ range f ↔ x ∈ Set.range f :=
+  Quotient.inductionOn x fun y => by
+    constructor
+    · rintro ⟨z, hz⟩
+      exact ⟨z.down, Quotient.eq_mk_iff_out.2 hz.symm⟩
+    · rintro ⟨z, hz⟩
+      use z
+      simpa [hz] using PSet.Equiv.symm (Quotient.mk_out y)
+#align Set.mem_range SetCat.mem_range
+
+@[simp]
+theorem toSet_range {α : Type u} (f : α → SetCat.{max u v}) : (range f).toSet = Set.range f :=
+  by
+  ext
+  simp
+#align Set.to_set_range SetCat.toSet_range
+
 /-- Kuratowski ordered pair -/
 def pair (x y : SetCat.{u}) : SetCat.{u} :=
   {{x}, {x, y}}
Diff
@@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Mario Carneiro
 
 ! This file was ported from Lean 3 source module set_theory.zfc.basic
-! leanprover-community/mathlib commit 98e83c3d541c77cdb7da20d79611a780ff8e7d90
+! leanprover-community/mathlib commit d7feae342946021379fc1e5025856afbce1de5dd
 ! Please do not edit these lines, except to modify the commit id
 ! if you have ported upstream changes.
 -/
@@ -1479,6 +1479,14 @@ theorem mem_univ_hom (x : SetCat.{u}) : univ.{u} x :=
   trivial
 #align Class.mem_univ_hom Class.mem_univ_hom
 
+theorem eq_univ_iff_forall {A : Class.{u}} : A = univ ↔ ∀ x : SetCat, A x :=
+  Set.eq_univ_iff_forall
+#align Class.eq_univ_iff_forall Class.eq_univ_iff_forall
+
+theorem eq_univ_of_forall {A : Class.{u}} : (∀ x : SetCat, A x) → A = univ :=
+  Set.eq_univ_of_forall
+#align Class.eq_univ_of_forall Class.eq_univ_of_forall
+
 theorem mem_wf : @WellFounded Class.{u} (· ∈ ·) :=
   ⟨by
     have H : ∀ x : SetCat.{u}, @Acc Class.{u} (· ∈ ·) ↑x :=
@@ -1658,6 +1666,19 @@ theorem sUnion_empty : ⋃₀ (∅ : Class.{u}) = (∅ : Class.{u}) :=
   simp
 #align Class.sUnion_empty Class.sUnion_empty
 
+/-- An induction principle for sets. If every subset of a class is a member, then the class is
+  universal. -/
+theorem eq_univ_of_powerset_subset {A : Class} (hA : powerset A ⊆ A) : A = univ :=
+  eq_univ_of_forall
+    (by
+      by_contra' hnA
+      exact
+        WellFounded.min_mem SetCat.mem_wf _ hnA
+          (hA fun x hx =>
+            Classical.not_not.1 fun hB =>
+              WellFounded.not_lt_min SetCat.mem_wf _ hnA hB <| (mem_hom_right _ _).1 hx))
+#align Class.eq_univ_of_powerset_subset Class.eq_univ_of_powerset_subset
+
 /- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
 /-- The definite description operator, which is `{x}` if `{y | A y} = {x}` and `∅` otherwise. -/
 def iota (A : Class) : Class :=

Changes in mathlib4

mathlib3
mathlib4
chore: remove unnecessary cdots (#12417)

These · are scoping when there is a single active goal.

These were found using a modification of the linter at #12339.

Diff
@@ -1495,9 +1495,9 @@ theorem mem_wf : @WellFounded Class.{u} (· ∈ ·) :=
       refine' fun a => ZFSet.inductionOn a fun x IH => ⟨_, _⟩
       rintro A ⟨z, rfl, hz⟩
       exact IH z hz
-    · refine' fun A => ⟨A, _⟩
-      rintro B ⟨x, rfl, _⟩
-      exact H x⟩
+    refine' fun A => ⟨A, _⟩
+    rintro B ⟨x, rfl, _⟩
+    exact H x⟩
 #align Class.mem_wf Class.mem_wf
 
 instance : WellFoundedRelation Class :=
chore: rename IsRoot.definition back to IsRoot.def (#11999)

Co-authored-by: Scott Morrison <scott.morrison@gmail.com>

Diff
@@ -1381,17 +1381,15 @@ theorem hereditarily_iff : Hereditarily p x ↔ p x ∧ ∀ y ∈ x, Hereditaril
   rw [← Hereditarily]
 #align Set.hereditarily_iff ZFSet.hereditarily_iff
 
--- Adaptation note: nightly-2024-03-15
--- This has been renamed to avoid the clash with the reserved name `Hereditarily.def`.
-alias ⟨Hereditarily.def', _⟩ := hereditarily_iff
-#align Set.hereditarily.def ZFSet.Hereditarily.def'
+alias ⟨Hereditarily.def, _⟩ := hereditarily_iff
+#align Set.hereditarily.def ZFSet.Hereditarily.def
 
 theorem Hereditarily.self (h : x.Hereditarily p) : p x :=
-  h.def'.1
+  h.def.1
 #align Set.hereditarily.self ZFSet.Hereditarily.self
 
 theorem Hereditarily.mem (h : x.Hereditarily p) (hy : y ∈ x) : y.Hereditarily p :=
-  h.def'.2 _ hy
+  h.def.2 _ hy
 #align Set.hereditarily.mem ZFSet.Hereditarily.mem
 
 theorem Hereditarily.empty : Hereditarily p x → p ∅ := by
style: replace '.-/' by '. -/' (#11938)

Purely automatic replacement. If this is in any way controversial; I'm happy to just close this PR.

Diff
@@ -165,7 +165,7 @@ instance setoid : Setoid PSet :=
 #align pSet.setoid PSet.setoid
 
 /-- 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.-/
+equivalent to some element of the second family. -/
 protected def Subset (x y : PSet) : Prop :=
   ∀ a, ∃ b, Equiv (x.Func a) (y.Func b)
 #align pSet.subset PSet.Subset
doc: replace mathlib3 names in doc comments (#11952)

A few miscellaneous directories: RingTheory, SetTheory, Combinatorics and CategoryTheory.

Co-authored-by: Scott Morrison <scott@tqft.net>

Diff
@@ -51,12 +51,12 @@ Then the rest is usual set theory.
 
 ## 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".
+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.
+Prove `ZFSet.mapDefinableAux` computably.
 -/
 
 -- Porting note: Lean 3 uses `Set` for `ZFSet`.
@@ -295,7 +295,7 @@ theorem mem_irrefl (x : PSet) : x ∉ x :=
   irrefl x
 #align pSet.mem_irrefl PSet.mem_irrefl
 
-/-- Convert a pre-set to a `set` of pre-sets. -/
+/-- Convert a pre-set to a `Set` of pre-sets. -/
 def toSet (u : PSet.{u}) : Set PSet.{u} :=
   { x | x ∈ u }
 #align pSet.to_set PSet.toSet
@@ -682,7 +682,7 @@ theorem mk_mem_iff {x y : PSet} : mk x ∈ mk y ↔ x ∈ y :=
   Iff.rfl
 #align Set.mk_mem_iff ZFSet.mk_mem_iff
 
-/-- Convert a ZFC set into a `set` of ZFC sets -/
+/-- Convert a ZFC set into a `Set` of ZFC sets -/
 def toSet (u : ZFSet.{u}) : Set ZFSet.{u} :=
   { x | x ∈ u }
 #align Set.to_set ZFSet.toSet
chore: rename away from 'def' (#11548)

This will become an error in 2024-03-16 nightly, possibly not permanently.

Co-authored-by: Scott Morrison <scott@tqft.net>

Diff
@@ -1381,15 +1381,17 @@ theorem hereditarily_iff : Hereditarily p x ↔ p x ∧ ∀ y ∈ x, Hereditaril
   rw [← Hereditarily]
 #align Set.hereditarily_iff ZFSet.hereditarily_iff
 
-alias ⟨Hereditarily.def, _⟩ := hereditarily_iff
-#align Set.hereditarily.def ZFSet.Hereditarily.def
+-- Adaptation note: nightly-2024-03-15
+-- This has been renamed to avoid the clash with the reserved name `Hereditarily.def`.
+alias ⟨Hereditarily.def', _⟩ := hereditarily_iff
+#align Set.hereditarily.def ZFSet.Hereditarily.def'
 
 theorem Hereditarily.self (h : x.Hereditarily p) : p x :=
-  h.def.1
+  h.def'.1
 #align Set.hereditarily.self ZFSet.Hereditarily.self
 
 theorem Hereditarily.mem (h : x.Hereditarily p) (hy : y ∈ x) : y.Hereditarily p :=
-  h.def.2 _ hy
+  h.def'.2 _ hy
 #align Set.hereditarily.mem ZFSet.Hereditarily.mem
 
 theorem Hereditarily.empty : Hereditarily p x → p ∅ := by
chore: replace λ by fun (#11301)

Per the style guidelines, λ is disallowed in mathlib. This is close to exhaustive; I left some tactic code alone when it seemed to me that tactic could be upstreamed soon.

Notes

  • In lines I was modifying anyway, I also converted => to .
  • Also contains some mild in-passing indentation fixes in Mathlib/Order/SupClosed.
  • Some doc comments still contained Lean 3 syntax λ x, , which I also replaced.
Diff
@@ -1787,7 +1787,7 @@ private lemma toSet_equiv_aux {s : Set ZFSet.{u}} (hs : Small.{u} s) :
   (mk <| PSet.mk (Shrink s) fun x ↦ ((equivShrink s).symm x).1.out).toSet = s := by
     ext x
     rw [mem_toSet, ← mk_out x, mk_mem_iff, mk_out]
-    refine' ⟨_, λ xs ↦ ⟨equivShrink s (Subtype.mk x xs), _⟩⟩
+    refine' ⟨_, fun xs ↦ ⟨equivShrink s (Subtype.mk x xs), _⟩⟩
     · rintro ⟨b, h2⟩
       rw [← ZFSet.eq, ZFSet.mk_out] at h2
       simp [h2]
@@ -1797,9 +1797,9 @@ private lemma toSet_equiv_aux {s : Set ZFSet.{u}} (hs : Small.{u} s) :
 @[simps apply_coe]
 noncomputable def toSet_equiv : ZFSet.{u} ≃ {s : Set ZFSet.{u} // Small.{u, u+1} s} where
   toFun x := ⟨x.toSet, x.small_toSet⟩
-  invFun := λ ⟨s, h⟩ ↦ mk <| PSet.mk (Shrink s) fun x ↦ ((equivShrink.{u, u+1} s).symm x).1.out
+  invFun := fun ⟨s, h⟩ ↦ mk <| PSet.mk (Shrink s) fun x ↦ ((equivShrink.{u, u+1} s).symm x).1.out
   left_inv := Function.rightInverse_of_injective_of_leftInverse (by intros x y; simp)
-    λ s ↦ Subtype.coe_injective <| toSet_equiv_aux s.2
+    fun s ↦ Subtype.coe_injective <| toSet_equiv_aux s.2
   right_inv s := Subtype.coe_injective <| toSet_equiv_aux s.2
 
 end ZFSet
feat(Logic/Function/FromTypes): Add curried heterogeneous function types (#10394)

See #10389

Diff
@@ -618,7 +618,7 @@ noncomputable def allDefinable : ∀ {n} (F : OfArity ZFSet ZFSet n), Definable
     let p := @Quotient.exists_rep PSet _ F
     @Definable.EqMk 0 ⟨choose p, Equiv.rfl⟩ _ (choose_spec p)
   | n + 1, (F : OfArity ZFSet ZFSet (n + 1)) => by
-    have I := fun x => allDefinable (F x)
+    have I : (x : ZFSet) → Definable (Nat.add n 0) (F x) := fun x => allDefinable (F x)
     refine' @Definable.EqMk (n + 1) ⟨fun x : PSet => (@Definable.Resp _ _ (I ⟦x⟧)).1, _⟩ _ _
     · dsimp [Arity.Equiv]
       intro x y h
@@ -1330,7 +1330,7 @@ theorem mem_funs {x y f : ZFSet.{u}} : f ∈ funs x y ↔ IsFunc x y f := by sim
    suggests it shouldn't be. -/
 @[nolint unusedArguments]
 noncomputable instance mapDefinableAux (f : ZFSet → ZFSet) [Definable 1 f] :
-    Definable 1 fun y => pair y (f y) :=
+    Definable 1 fun (y : ZFSet) => pair y (f y) :=
   @Classical.allDefinable 1 _
 #align Set.map_definable_aux ZFSet.mapDefinableAux
 
chore: move to v4.6.0-rc1, merging adaptations from bump/v4.6.0 (#10176)

Co-authored-by: Scott Morrison <scott.morrison@gmail.com> Co-authored-by: Eric Wieser <wieser.eric@gmail.com> Co-authored-by: Joachim Breitner <mail@joachim-breitner.de>

Diff
@@ -1370,7 +1370,7 @@ theorem map_isFunc {f : ZFSet → ZFSet} [Definable 1 f] {x y : ZFSet} :
 members of `x` are all `Hereditarily p`. -/
 def Hereditarily (p : ZFSet → Prop) (x : ZFSet) : Prop :=
   p x ∧ ∀ y ∈ x, Hereditarily p y
-termination_by _ => x
+termination_by x
 #align Set.hereditarily ZFSet.Hereditarily
 
 section Hereditarily
chore(*): replace $ with <| (#9319)

See Zulip thread for the discussion.

Diff
@@ -1784,7 +1784,7 @@ theorem choice_mem (y : ZFSet.{u}) (yx : y ∈ x) : (choice x ′ y : Class.{u})
 #align Set.choice_mem ZFSet.choice_mem
 
 private lemma toSet_equiv_aux {s : Set ZFSet.{u}} (hs : Small.{u} s) :
-  (mk $ PSet.mk (Shrink s) fun x ↦ ((equivShrink s).symm x).1.out).toSet = s := by
+  (mk <| PSet.mk (Shrink s) fun x ↦ ((equivShrink s).symm x).1.out).toSet = s := by
     ext x
     rw [mem_toSet, ← mk_out x, mk_mem_iff, mk_out]
     refine' ⟨_, λ xs ↦ ⟨equivShrink s (Subtype.mk x xs), _⟩⟩
@@ -1797,9 +1797,9 @@ private lemma toSet_equiv_aux {s : Set ZFSet.{u}} (hs : Small.{u} s) :
 @[simps apply_coe]
 noncomputable def toSet_equiv : ZFSet.{u} ≃ {s : Set ZFSet.{u} // Small.{u, u+1} s} where
   toFun x := ⟨x.toSet, x.small_toSet⟩
-  invFun := λ ⟨s, h⟩ ↦ mk $ PSet.mk (Shrink s) fun x ↦ ((equivShrink.{u, u+1} s).symm x).1.out
+  invFun := λ ⟨s, h⟩ ↦ mk <| PSet.mk (Shrink s) fun x ↦ ((equivShrink.{u, u+1} s).symm x).1.out
   left_inv := Function.rightInverse_of_injective_of_leftInverse (by intros x y; simp)
-    λ s ↦ Subtype.coe_injective $ toSet_equiv_aux s.2
-  right_inv s := Subtype.coe_injective $ toSet_equiv_aux s.2
+    λ s ↦ Subtype.coe_injective <| toSet_equiv_aux s.2
+  right_inv s := Subtype.coe_injective <| toSet_equiv_aux s.2
 
 end ZFSet
chore: rename by_contra' to by_contra! (#8797)

To fit with the "please try harder" convention of ! tactics.

Co-authored-by: Scott Morrison <scott.morrison@gmail.com>

Diff
@@ -1699,7 +1699,7 @@ theorem sInter_empty : ⋂₀ (∅ : Class.{u}) = univ := by
 theorem eq_univ_of_powerset_subset {A : Class} (hA : powerset A ⊆ A) : A = univ :=
   eq_univ_of_forall
     (by
-      by_contra' hnA
+      by_contra! hnA
       exact
         WellFounded.min_mem ZFSet.mem_wf _ hnA
           (hA fun x hx =>
chore: space after (#8178)

Co-authored-by: Moritz Firsching <firsching@google.com>

Diff
@@ -1786,10 +1786,10 @@ theorem choice_mem (y : ZFSet.{u}) (yx : y ∈ x) : (choice x ′ y : Class.{u})
 private lemma toSet_equiv_aux {s : Set ZFSet.{u}} (hs : Small.{u} s) :
   (mk $ PSet.mk (Shrink s) fun x ↦ ((equivShrink s).symm x).1.out).toSet = s := by
     ext x
-    rw [mem_toSet, ←mk_out x, mk_mem_iff, mk_out]
+    rw [mem_toSet, ← mk_out x, mk_mem_iff, mk_out]
     refine' ⟨_, λ xs ↦ ⟨equivShrink s (Subtype.mk x xs), _⟩⟩
     · rintro ⟨b, h2⟩
-      rw [←ZFSet.eq, ZFSet.mk_out] at h2
+      rw [← ZFSet.eq, ZFSet.mk_out] at h2
       simp [h2]
     · simp [PSet.Equiv.refl]
 
feat(Logic/Function/OfArity): generalize the return type (#7859)
Diff
@@ -483,12 +483,13 @@ theorem lift_mem_embed : ∀ x : PSet.{u}, PSet.Lift.{u, max (u + 1) v} x ∈ em
 
 /-- 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. -/
-def Arity.Equiv : ∀ {n}, OfArity PSet.{u} n → OfArity PSet.{u} n → Prop
+def Arity.Equiv : ∀ {n}, OfArity PSet.{u} PSet.{u} n → OfArity PSet.{u} PSet.{u} n → Prop
   | 0, a, b => PSet.Equiv a b
   | _ + 1, a, b => ∀ x y : PSet, PSet.Equiv x y → Arity.Equiv (a x) (b y)
 #align pSet.arity.equiv PSet.Arity.Equiv
 
-theorem Arity.equiv_const {a : PSet.{u}} : ∀ n, Arity.Equiv (OfArity.const a n) (OfArity.const a n)
+theorem Arity.equiv_const {a : PSet.{u}} :
+    ∀ n, Arity.Equiv (OfArity.const PSet.{u} a n) (OfArity.const PSet.{u} a n)
   | 0 => Equiv.rfl
   | _ + 1 => fun _ _ _ => Arity.equiv_const _
 #align pSet.arity.equiv_const PSet.Arity.equiv_const
@@ -496,11 +497,11 @@ theorem Arity.equiv_const {a : PSet.{u}} : ∀ n, Arity.Equiv (OfArity.const a n
 /-- `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. -/
 def Resp (n) :=
-  { x : OfArity PSet.{u} n // Arity.Equiv x x }
+  { x : OfArity PSet.{u} PSet.{u} n // Arity.Equiv x x }
 #align pSet.resp PSet.Resp
 
 instance Resp.inhabited {n} : Inhabited (Resp n) :=
-  ⟨⟨OfArity.const default _, Arity.equiv_const _⟩⟩
+  ⟨⟨OfArity.const _ default _, Arity.equiv_const _⟩⟩
 #align pSet.resp.inhabited PSet.Resp.inhabited
 
 /-- The `n`-ary image of a `(n + 1)`-ary function respecting equivalence as a function respecting
@@ -555,10 +556,11 @@ namespace Resp
 
 /-- Helper function for `PSet.eval`. -/
 def evalAux :
-    ∀ {n}, { f : Resp n → OfArity ZFSet.{u} n // ∀ a b : Resp n, Resp.Equiv a b → f a = f b }
+    ∀ {n},
+      { f : Resp n → OfArity ZFSet.{u} ZFSet.{u} n // ∀ a b : Resp n, Resp.Equiv a b → f a = f b }
   | 0 => ⟨fun a => ⟦a.1⟧, fun _ _ h => Quotient.sound h⟩
   | n + 1 =>
-    let F : Resp (n + 1) → OfArity ZFSet (n + 1) := fun a =>
+    let F : Resp (n + 1) → OfArity ZFSet ZFSet (n + 1) := fun a =>
       @Quotient.lift _ _ PSet.setoid (fun x => evalAux.1 (a.f x)) fun _ _ h =>
         evalAux.2 _ _ (a.2 _ _ h)
     ⟨F, fun b c h =>
@@ -568,11 +570,12 @@ def evalAux :
 #align pSet.resp.eval_aux PSet.Resp.evalAux
 
 /-- An equivalence-respecting function yields an n-ary ZFC set function. -/
-def eval (n) : Resp n → OfArity ZFSet.{u} n :=
+def eval (n) : Resp n → OfArity ZFSet.{u} ZFSet.{u} n :=
   evalAux.1
 #align pSet.resp.eval PSet.Resp.eval
 
-theorem eval_val {n f x} : (@eval (n + 1) f : ZFSet → OfArity ZFSet n) ⟦x⟧ = eval n (Resp.f f x) :=
+theorem eval_val {n f x} :
+    (@eval (n + 1) f : ZFSet → OfArity ZFSet ZFSet n) ⟦x⟧ = eval n (Resp.f f x) :=
   rfl
 #align pSet.resp.eval_val PSet.Resp.eval_val
 
@@ -581,24 +584,25 @@ end Resp
 /-- 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. -/
-class inductive Definable (n) : OfArity ZFSet.{u} n → Type (u + 1)
+class inductive Definable (n) : OfArity ZFSet.{u} ZFSet.{u} n → Type (u + 1)
   | mk (f) : Definable n (Resp.eval n f)
 #align pSet.definable PSet.Definable
 
 attribute [instance] Definable.mk
 
 /-- The evaluation of a function respecting equivalence is definable, by that same function. -/
-def Definable.EqMk {n} (f) : ∀ {s : OfArity ZFSet.{u} n} (_ : Resp.eval _ f = s), Definable n s
+def Definable.EqMk {n} (f) :
+    ∀ {s : OfArity ZFSet.{u} ZFSet.{u} n} (_ : Resp.eval _ f = s), Definable n s
   | _, rfl => ⟨f⟩
 #align pSet.definable.eq_mk PSet.Definable.EqMk
 
 /-- Turns a definable function into a function that respects equivalence. -/
-def Definable.Resp {n} : ∀ (s : OfArity ZFSet.{u} n) [Definable n s], Resp n
+def Definable.Resp {n} : ∀ (s : OfArity ZFSet.{u} ZFSet.{u} n) [Definable n s], Resp n
   | _, ⟨f⟩ => f
 #align pSet.definable.resp PSet.Definable.Resp
 
 theorem Definable.eq {n} :
-    ∀ (s : OfArity ZFSet.{u} n) [H : Definable n s], (@Definable.Resp n s H).eval _ = s
+    ∀ (s : OfArity ZFSet.{u} ZFSet.{u} n) [H : Definable n s], (@Definable.Resp n s H).eval _ = s
   | _, ⟨_⟩ => rfl
 #align pSet.definable.eq PSet.Definable.eq
 
@@ -609,11 +613,11 @@ namespace Classical
 open PSet
 
 /-- All functions are classically definable. -/
-noncomputable def allDefinable : ∀ {n} (F : OfArity ZFSet n), Definable n F
+noncomputable def allDefinable : ∀ {n} (F : OfArity ZFSet ZFSet n), Definable n F
   | 0, F =>
     let p := @Quotient.exists_rep PSet _ F
     @Definable.EqMk 0 ⟨choose p, Equiv.rfl⟩ _ (choose_spec p)
-  | n + 1, (F : OfArity ZFSet (n + 1)) => by
+  | n + 1, (F : OfArity ZFSet ZFSet (n + 1)) => by
     have I := fun x => allDefinable (F x)
     refine' @Definable.EqMk (n + 1) ⟨fun x : PSet => (@Definable.Resp _ _ (I ⟦x⟧)).1, _⟩ _ _
     · dsimp [Arity.Equiv]
@@ -660,7 +664,7 @@ theorem exact {x y : PSet} : mk x = mk y → PSet.Equiv x y :=
 
 @[simp]
 theorem eval_mk {n f x} :
-    (@Resp.eval (n + 1) f : ZFSet → OfArity ZFSet n) (mk x) = Resp.eval n (Resp.f f x) :=
+    (@Resp.eval (n + 1) f : ZFSet → OfArity ZFSet ZFSet n) (mk x) = Resp.eval n (Resp.f f x) :=
   rfl
 #align Set.eval_mk ZFSet.eval_mk
 
chore(Logic/Function/OfArity): rename Arity to Function.OfArity (#7772)

Also puts it in a new file.

Diff
@@ -5,6 +5,7 @@ Authors: Mario Carneiro
 -/
 import Mathlib.Data.Set.Lattice
 import Mathlib.Logic.Small.Basic
+import Mathlib.Logic.Function.OfArity
 import Mathlib.Order.WellFounded
 
 #align_import set_theory.zfc.basic from "leanprover-community/mathlib"@"f0b3759a8ef0bd8239ecdaa5e1089add5feebe1a"
@@ -30,8 +31,6 @@ Then the rest is usual set theory.
 
 ## Other definitions
 
-* `Arity α n`: `n`-ary function `α → α → ... → α`. Defined inductively.
-* `Arity.const a n`: `n`-ary constant function equal to `a`.
 * `PSet.Type`: Underlying type of a pre-set.
 * `PSet.Func`: Underlying family of pre-sets of a pre-set.
 * `PSet.Equiv`: Extensional equivalence of pre-sets. Defined inductively.
@@ -65,49 +64,7 @@ set_option linter.uppercaseLean3 false
 
 universe u v
 
-/-- The type of `n`-ary functions `α → α → ... → α`. -/
-def Arity (α : Type u) : ℕ → Type u
-  | 0 => α
-  | n + 1 => α → Arity α n
-#align arity Arity
-
-@[simp]
-theorem arity_zero (α : Type u) : Arity α 0 = α :=
-  rfl
-#align arity_zero arity_zero
-
-@[simp]
-theorem arity_succ (α : Type u) (n : ℕ) : Arity α n.succ = (α → Arity α n) :=
-  rfl
-#align arity_succ arity_succ
-
-namespace Arity
-
-/-- Constant `n`-ary function with value `a`. -/
-def const {α : Type u} (a : α) : ∀ n, Arity α n
-  | 0 => a
-  | n + 1 => fun _ => const a n
-#align arity.const Arity.const
-
-@[simp]
-theorem const_zero {α : Type u} (a : α) : const a 0 = a :=
-  rfl
-#align arity.const_zero Arity.const_zero
-
-@[simp]
-theorem const_succ {α : Type u} (a : α) (n : ℕ) : const a n.succ = fun _ => const a n :=
-  rfl
-#align arity.const_succ Arity.const_succ
-
-theorem const_succ_apply {α : Type u} (a : α) (n : ℕ) (x : α) : const a n.succ x = const a n :=
-  rfl
-#align arity.const_succ_apply Arity.const_succ_apply
-
-instance Arity.inhabited {α n} [Inhabited α] : Inhabited (Arity α n) :=
-  ⟨const default _⟩
-#align arity.arity.inhabited Arity.Arity.inhabited
-
-end Arity
+open Function (OfArity)
 
 /-- The type of pre-sets in universe `u`. A pre-set
   is a family of pre-sets indexed by a type in `Type u`.
@@ -526,12 +483,12 @@ theorem lift_mem_embed : ∀ x : PSet.{u}, PSet.Lift.{u, max (u + 1) v} x ∈ em
 
 /-- 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. -/
-def Arity.Equiv : ∀ {n}, Arity PSet.{u} n → Arity PSet.{u} n → Prop
+def Arity.Equiv : ∀ {n}, OfArity PSet.{u} n → OfArity PSet.{u} n → Prop
   | 0, a, b => PSet.Equiv a b
   | _ + 1, a, b => ∀ x y : PSet, PSet.Equiv x y → Arity.Equiv (a x) (b y)
 #align pSet.arity.equiv PSet.Arity.Equiv
 
-theorem Arity.equiv_const {a : PSet.{u}} : ∀ n, Arity.Equiv (Arity.const a n) (Arity.const a n)
+theorem Arity.equiv_const {a : PSet.{u}} : ∀ n, Arity.Equiv (OfArity.const a n) (OfArity.const a n)
   | 0 => Equiv.rfl
   | _ + 1 => fun _ _ _ => Arity.equiv_const _
 #align pSet.arity.equiv_const PSet.Arity.equiv_const
@@ -539,11 +496,11 @@ theorem Arity.equiv_const {a : PSet.{u}} : ∀ n, Arity.Equiv (Arity.const a n)
 /-- `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. -/
 def Resp (n) :=
-  { x : Arity PSet.{u} n // Arity.Equiv x x }
+  { x : OfArity PSet.{u} n // Arity.Equiv x x }
 #align pSet.resp PSet.Resp
 
 instance Resp.inhabited {n} : Inhabited (Resp n) :=
-  ⟨⟨Arity.const default _, Arity.equiv_const _⟩⟩
+  ⟨⟨OfArity.const default _, Arity.equiv_const _⟩⟩
 #align pSet.resp.inhabited PSet.Resp.inhabited
 
 /-- The `n`-ary image of a `(n + 1)`-ary function respecting equivalence as a function respecting
@@ -598,10 +555,10 @@ namespace Resp
 
 /-- Helper function for `PSet.eval`. -/
 def evalAux :
-    ∀ {n}, { f : Resp n → Arity ZFSet.{u} n // ∀ a b : Resp n, Resp.Equiv a b → f a = f b }
+    ∀ {n}, { f : Resp n → OfArity ZFSet.{u} n // ∀ a b : Resp n, Resp.Equiv a b → f a = f b }
   | 0 => ⟨fun a => ⟦a.1⟧, fun _ _ h => Quotient.sound h⟩
   | n + 1 =>
-    let F : Resp (n + 1) → Arity ZFSet (n + 1) := fun a =>
+    let F : Resp (n + 1) → OfArity ZFSet (n + 1) := fun a =>
       @Quotient.lift _ _ PSet.setoid (fun x => evalAux.1 (a.f x)) fun _ _ h =>
         evalAux.2 _ _ (a.2 _ _ h)
     ⟨F, fun b c h =>
@@ -611,11 +568,11 @@ def evalAux :
 #align pSet.resp.eval_aux PSet.Resp.evalAux
 
 /-- An equivalence-respecting function yields an n-ary ZFC set function. -/
-def eval (n) : Resp n → Arity ZFSet.{u} n :=
+def eval (n) : Resp n → OfArity ZFSet.{u} n :=
   evalAux.1
 #align pSet.resp.eval PSet.Resp.eval
 
-theorem eval_val {n f x} : (@eval (n + 1) f : ZFSet → Arity ZFSet n) ⟦x⟧ = eval n (Resp.f f x) :=
+theorem eval_val {n f x} : (@eval (n + 1) f : ZFSet → OfArity ZFSet n) ⟦x⟧ = eval n (Resp.f f x) :=
   rfl
 #align pSet.resp.eval_val PSet.Resp.eval_val
 
@@ -624,24 +581,24 @@ end Resp
 /-- 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. -/
-class inductive Definable (n) : Arity ZFSet.{u} n → Type (u + 1)
+class inductive Definable (n) : OfArity ZFSet.{u} n → Type (u + 1)
   | mk (f) : Definable n (Resp.eval n f)
 #align pSet.definable PSet.Definable
 
 attribute [instance] Definable.mk
 
 /-- The evaluation of a function respecting equivalence is definable, by that same function. -/
-def Definable.EqMk {n} (f) : ∀ {s : Arity ZFSet.{u} n} (_ : Resp.eval _ f = s), Definable n s
+def Definable.EqMk {n} (f) : ∀ {s : OfArity ZFSet.{u} n} (_ : Resp.eval _ f = s), Definable n s
   | _, rfl => ⟨f⟩
 #align pSet.definable.eq_mk PSet.Definable.EqMk
 
 /-- Turns a definable function into a function that respects equivalence. -/
-def Definable.Resp {n} : ∀ (s : Arity ZFSet.{u} n) [Definable n s], Resp n
+def Definable.Resp {n} : ∀ (s : OfArity ZFSet.{u} n) [Definable n s], Resp n
   | _, ⟨f⟩ => f
 #align pSet.definable.resp PSet.Definable.Resp
 
 theorem Definable.eq {n} :
-    ∀ (s : Arity ZFSet.{u} n) [H : Definable n s], (@Definable.Resp n s H).eval _ = s
+    ∀ (s : OfArity ZFSet.{u} n) [H : Definable n s], (@Definable.Resp n s H).eval _ = s
   | _, ⟨_⟩ => rfl
 #align pSet.definable.eq PSet.Definable.eq
 
@@ -652,11 +609,11 @@ namespace Classical
 open PSet
 
 /-- All functions are classically definable. -/
-noncomputable def allDefinable : ∀ {n} (F : Arity ZFSet n), Definable n F
+noncomputable def allDefinable : ∀ {n} (F : OfArity ZFSet n), Definable n F
   | 0, F =>
     let p := @Quotient.exists_rep PSet _ F
     @Definable.EqMk 0 ⟨choose p, Equiv.rfl⟩ _ (choose_spec p)
-  | n + 1, (F : Arity ZFSet (n + 1)) => by
+  | n + 1, (F : OfArity ZFSet (n + 1)) => by
     have I := fun x => allDefinable (F x)
     refine' @Definable.EqMk (n + 1) ⟨fun x : PSet => (@Definable.Resp _ _ (I ⟦x⟧)).1, _⟩ _ _
     · dsimp [Arity.Equiv]
@@ -703,7 +660,7 @@ theorem exact {x y : PSet} : mk x = mk y → PSet.Equiv x y :=
 
 @[simp]
 theorem eval_mk {n f x} :
-    (@Resp.eval (n + 1) f : ZFSet → Arity ZFSet n) (mk x) = Resp.eval n (Resp.f f x) :=
+    (@Resp.eval (n + 1) f : ZFSet → OfArity ZFSet n) (mk x) = Resp.eval n (Resp.f f x) :=
   rfl
 #align Set.eval_mk ZFSet.eval_mk
 
chore: only four spaces for subsequent lines (#7286)

Co-authored-by: Moritz Firsching <firsching@google.com>

Diff
@@ -151,7 +151,7 @@ def Equiv : PSet → PSet → Prop
 #align pSet.equiv PSet.Equiv
 
 theorem equiv_iff :
-   ∀ {x y : PSet},
+    ∀ {x y : PSet},
       Equiv x y ↔ (∀ i, ∃ j, Equiv (x.Func i) (y.Func j)) ∧ ∀ j, ∃ i, Equiv (x.Func i) (y.Func j)
   | ⟨_, _⟩, ⟨_, _⟩ => Iff.rfl
 #align pSet.equiv_iff PSet.equiv_iff
feat(SetTheory/ZFC): ZFSet is the type of small sets of ZFSets (#6226)
Diff
@@ -1822,4 +1822,23 @@ theorem choice_mem (y : ZFSet.{u}) (yx : y ∈ x) : (choice x ′ y : Class.{u})
   exact choice_mem_aux x h y yx
 #align Set.choice_mem ZFSet.choice_mem
 
+private lemma toSet_equiv_aux {s : Set ZFSet.{u}} (hs : Small.{u} s) :
+  (mk $ PSet.mk (Shrink s) fun x ↦ ((equivShrink s).symm x).1.out).toSet = s := by
+    ext x
+    rw [mem_toSet, ←mk_out x, mk_mem_iff, mk_out]
+    refine' ⟨_, λ xs ↦ ⟨equivShrink s (Subtype.mk x xs), _⟩⟩
+    · rintro ⟨b, h2⟩
+      rw [←ZFSet.eq, ZFSet.mk_out] at h2
+      simp [h2]
+    · simp [PSet.Equiv.refl]
+
+/-- `ZFSet.toSet` as an equivalence. -/
+@[simps apply_coe]
+noncomputable def toSet_equiv : ZFSet.{u} ≃ {s : Set ZFSet.{u} // Small.{u, u+1} s} where
+  toFun x := ⟨x.toSet, x.small_toSet⟩
+  invFun := λ ⟨s, h⟩ ↦ mk $ PSet.mk (Shrink s) fun x ↦ ((equivShrink.{u, u+1} s).symm x).1.out
+  left_inv := Function.rightInverse_of_injective_of_leftInverse (by intros x y; simp)
+    λ s ↦ Subtype.coe_injective $ toSet_equiv_aux s.2
+  right_inv s := Subtype.coe_injective $ toSet_equiv_aux s.2
+
 end ZFSet
feat: patch for new alias command (#6172)
Diff
@@ -1420,7 +1420,7 @@ theorem hereditarily_iff : Hereditarily p x ↔ p x ∧ ∀ y ∈ x, Hereditaril
   rw [← Hereditarily]
 #align Set.hereditarily_iff ZFSet.hereditarily_iff
 
-alias hereditarily_iff ↔ Hereditarily.def _
+alias ⟨Hereditarily.def, _⟩ := hereditarily_iff
 #align Set.hereditarily.def ZFSet.Hereditarily.def
 
 theorem Hereditarily.self (h : x.Hereditarily p) : p x :=
feat: add some symm attributes throughout the library (#6708)

Also add a couple of refl and trans attributes

Diff
@@ -557,6 +557,7 @@ def Resp.Equiv {n} (a b : Resp n) : Prop :=
   Arity.Equiv a.1 b.1
 #align pSet.resp.equiv PSet.Resp.Equiv
 
+@[refl]
 protected theorem Resp.Equiv.refl {n} (a : Resp n) : Resp.Equiv a a :=
   a.2
 #align pSet.resp.equiv.refl PSet.Resp.Equiv.refl
@@ -568,10 +569,12 @@ protected theorem Resp.Equiv.euc :
     @Resp.Equiv.euc n (a.f x) (b.f y) (c.f y) (hab _ _ h) (hcb _ _ <| PSet.Equiv.refl y)
 #align pSet.resp.equiv.euc PSet.Resp.Equiv.euc
 
+@[symm]
 protected theorem Resp.Equiv.symm {n} {a b : Resp n} : Resp.Equiv a b → Resp.Equiv b a :=
   (Resp.Equiv.refl b).euc
 #align pSet.resp.equiv.symm PSet.Resp.Equiv.symm
 
+@[trans]
 protected theorem Resp.Equiv.trans {n} {x y z : Resp n} (h1 : Resp.Equiv x y)
     (h2 : Resp.Equiv y z) : Resp.Equiv x z :=
   h1.euc h2.symm
fix(ZFC/Basic): fix Class.sep (#6084)

Class.has_sep was incorrectly ported to Class.sep (wrong type).

Diff
@@ -1455,8 +1455,8 @@ namespace Class
 
 -- Porting note: this is no longer an automatically derived instance.
 /-- `{x ∈ A | p x}` is the class of elements in `A` satisfying `p` -/
-protected def sep (p : Class → Prop) (A : Class) : Class :=
-  {y | A y ∧ p A}
+protected def sep (p : ZFSet → Prop) (A : Class) : Class :=
+  {y | A y ∧ p y}
 
 @[ext]
 theorem ext {x y : Class.{u}} : (∀ z : ZFSet.{u}, x z ↔ y z) → x = y :=
chore: script to replace headers with #align_import statements (#5979)

Open in Gitpod

Co-authored-by: Eric Wieser <wieser.eric@gmail.com> Co-authored-by: Scott Morrison <scott.morrison@gmail.com>

Diff
@@ -2,16 +2,13 @@
 Copyright (c) 2018 Mario Carneiro. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Mario Carneiro
-
-! This file was ported from Lean 3 source module set_theory.zfc.basic
-! leanprover-community/mathlib commit f0b3759a8ef0bd8239ecdaa5e1089add5feebe1a
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
 -/
 import Mathlib.Data.Set.Lattice
 import Mathlib.Logic.Small.Basic
 import Mathlib.Order.WellFounded
 
+#align_import set_theory.zfc.basic from "leanprover-community/mathlib"@"f0b3759a8ef0bd8239ecdaa5e1089add5feebe1a"
+
 /-!
 # A model of ZFC
 
fix: fix ZFC Basic module docstring (#5757)

The Lean 3 names were not updated to Lean 4 in the module docstring.

Also fix capitalisation in some declarations (Arity.const, PSet.Resp.evalAux, Classical.allDefinable).

Diff
@@ -25,31 +25,31 @@ Then the rest is usual set theory.
 
 ## The model
 
-* `pSet`: Pre-set. A pre-set is inductively defined by its indexing type and its members, which are
+* `PSet`: Pre-set. A pre-set is inductively defined by its indexing type and its members, which are
   themselves pre-sets.
-* `Set`: ZFC set. Defined as `pSet` quotiented by `pSet.equiv`, the extensional equivalence.
-* `Class`: Class. Defined as `set Set`.
-* `Set.choice`: Axiom of choice. Proved from Lean's axiom of choice.
+* `ZFSet`: ZFC set. Defined as `PSet` quotiented by `PSet.Equiv`, the extensional equivalence.
+* `Class`: Class. Defined as `Set ZFSet`.
+* `ZFSet.choice`: Axiom of choice. Proved from Lean's axiom of choice.
 
 ## Other definitions
 
-* `arity α n`: `n`-ary function `α → α → ... → α`. Defined inductively.
-* `arity.const a n`: `n`-ary constant function equal to `a`.
-* `pSet.type`: Underlying type of a pre-set.
-* `pSet.func`: Underlying family of pre-sets of a pre-set.
-* `pSet.equiv`: Extensional equivalence of pre-sets. Defined inductively.
-* `pSet.omega`, `Set.omega`: The von Neumann ordinal `ω` as a `pSet`, as a `Set`.
-* `pSet.arity.equiv`: Extensional equivalence of `n`-ary `pSet`-valued functions. Extension of
-  `pSet.equiv`.
-* `pSet.resp`: Collection of `n`-ary `pSet`-valued functions that respect extensional equivalence.
-* `pSet.eval`: Turns a `pSet`-valued function that respect extensional equivalence into a
-  `Set`-valued function.
-* `classical.all_definable`: All functions are classically definable.
-* `Set.is_func` : Predicate that a ZFC set is a subset of `x × y` that can be considered as a ZFC
+* `Arity α n`: `n`-ary function `α → α → ... → α`. Defined inductively.
+* `Arity.const a n`: `n`-ary constant function equal to `a`.
+* `PSet.Type`: Underlying type of a pre-set.
+* `PSet.Func`: Underlying family of pre-sets of a pre-set.
+* `PSet.Equiv`: Extensional equivalence of pre-sets. Defined inductively.
+* `PSet.omega`, `ZFSet.omega`: The von Neumann ordinal `ω` as a `PSet`, as a `Set`.
+* `PSet.Arity.Equiv`: Extensional equivalence of `n`-ary `PSet`-valued functions. Extension of
+  `PSet.Equiv`.
+* `PSet.Resp`: Collection of `n`-ary `PSet`-valued functions that respect extensional equivalence.
+* `PSet.eval`: Turns a `PSet`-valued function that respect extensional equivalence into a
+  `ZFSet`-valued function.
+* `Classical.allDefinable`: All functions are classically definable.
+* `ZFSet.IsFunc` : Predicate that a ZFC set is a subset of `x × y` that can be considered as a ZFC
   function `x → y`. That is, each member of `x` is related by the ZFC set to exactly one member of
   `y`.
-* `Set.funs`: ZFC set of ZFC functions `x → y`.
-* `Set.hereditarily p x`: Predicate that every set in the transitive closure of `x` has property
+* `ZFSet.funs`: ZFC set of ZFC functions `x → y`.
+* `ZFSet.Hereditarily p x`: Predicate that every set in the transitive closure of `x` has property
   `p`.
 * `Class.iota`: Definite description operator.
 
@@ -87,27 +87,27 @@ theorem arity_succ (α : Type u) (n : ℕ) : Arity α n.succ = (α → Arity α
 namespace Arity
 
 /-- Constant `n`-ary function with value `a`. -/
-def Const {α : Type u} (a : α) : ∀ n, Arity α n
+def const {α : Type u} (a : α) : ∀ n, Arity α n
   | 0 => a
-  | n + 1 => fun _ => Const a n
-#align arity.const Arity.Const
+  | n + 1 => fun _ => const a n
+#align arity.const Arity.const
 
 @[simp]
-theorem const_zero {α : Type u} (a : α) : Const a 0 = a :=
+theorem const_zero {α : Type u} (a : α) : const a 0 = a :=
   rfl
 #align arity.const_zero Arity.const_zero
 
 @[simp]
-theorem const_succ {α : Type u} (a : α) (n : ℕ) : Const a n.succ = fun _ => Const a n :=
+theorem const_succ {α : Type u} (a : α) (n : ℕ) : const a n.succ = fun _ => const a n :=
   rfl
 #align arity.const_succ Arity.const_succ
 
-theorem const_succ_apply {α : Type u} (a : α) (n : ℕ) (x : α) : Const a n.succ x = Const a n :=
+theorem const_succ_apply {α : Type u} (a : α) (n : ℕ) (x : α) : const a n.succ x = const a n :=
   rfl
 #align arity.const_succ_apply Arity.const_succ_apply
 
 instance Arity.inhabited {α n} [Inhabited α] : Inhabited (Arity α n) :=
-  ⟨Const default _⟩
+  ⟨const default _⟩
 #align arity.arity.inhabited Arity.Arity.inhabited
 
 end Arity
@@ -534,19 +534,19 @@ def Arity.Equiv : ∀ {n}, Arity PSet.{u} n → Arity PSet.{u} n → Prop
   | _ + 1, a, b => ∀ x y : PSet, PSet.Equiv x y → Arity.Equiv (a x) (b y)
 #align pSet.arity.equiv PSet.Arity.Equiv
 
-theorem Arity.equiv_const {a : PSet.{u}} : ∀ n, Arity.Equiv (Arity.Const a n) (Arity.Const a n)
+theorem Arity.equiv_const {a : PSet.{u}} : ∀ n, Arity.Equiv (Arity.const a n) (Arity.const a n)
   | 0 => Equiv.rfl
   | _ + 1 => fun _ _ _ => Arity.equiv_const _
 #align pSet.arity.equiv_const PSet.Arity.equiv_const
 
-/-- `resp n` is the collection of n-ary functions on `pSet` that respect
+/-- `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. -/
 def Resp (n) :=
   { x : Arity PSet.{u} n // Arity.Equiv x x }
 #align pSet.resp PSet.Resp
 
 instance Resp.inhabited {n} : Inhabited (Resp n) :=
-  ⟨⟨Arity.Const default _, Arity.equiv_const _⟩⟩
+  ⟨⟨Arity.const default _, Arity.equiv_const _⟩⟩
 #align pSet.resp.inhabited PSet.Resp.inhabited
 
 /-- The `n`-ary image of a `(n + 1)`-ary function respecting equivalence as a function respecting
@@ -555,7 +555,7 @@ def Resp.f {n} (f : Resp (n + 1)) (x : PSet) : Resp n :=
   ⟨f.1 x, f.2 _ _ <| Equiv.refl x⟩
 #align pSet.resp.f PSet.Resp.f
 
-/-- Function equivalence for functions respecting equivalence. See `pSet.arity.equiv`. -/
+/-- Function equivalence for functions respecting equivalence. See `PSet.Arity.Equiv`. -/
 def Resp.Equiv {n} (a b : Resp n) : Prop :=
   Arity.Equiv a.1 b.1
 #align pSet.resp.equiv PSet.Resp.Equiv
@@ -596,23 +596,23 @@ namespace PSet
 
 namespace Resp
 
-/-- Helper function for `pSet.eval`. -/
-def EvalAux :
+/-- Helper function for `PSet.eval`. -/
+def evalAux :
     ∀ {n}, { f : Resp n → Arity ZFSet.{u} n // ∀ a b : Resp n, Resp.Equiv a b → f a = f b }
   | 0 => ⟨fun a => ⟦a.1⟧, fun _ _ h => Quotient.sound h⟩
   | n + 1 =>
     let F : Resp (n + 1) → Arity ZFSet (n + 1) := fun a =>
-      @Quotient.lift _ _ PSet.setoid (fun x => EvalAux.1 (a.f x)) fun _ _ h =>
-        EvalAux.2 _ _ (a.2 _ _ h)
+      @Quotient.lift _ _ PSet.setoid (fun x => evalAux.1 (a.f x)) fun _ _ h =>
+        evalAux.2 _ _ (a.2 _ _ h)
     ⟨F, fun b c h =>
       funext <|
         (@Quotient.ind _ _ fun q => F b q = F c q) fun z =>
-          EvalAux.2 (Resp.f b z) (Resp.f c z) (h _ _ (PSet.Equiv.refl z))⟩
-#align pSet.resp.eval_aux PSet.Resp.EvalAux
+          evalAux.2 (Resp.f b z) (Resp.f c z) (h _ _ (PSet.Equiv.refl z))⟩
+#align pSet.resp.eval_aux PSet.Resp.evalAux
 
 /-- An equivalence-respecting function yields an n-ary ZFC set function. -/
 def eval (n) : Resp n → Arity ZFSet.{u} n :=
-  EvalAux.1
+  evalAux.1
 #align pSet.resp.eval PSet.Resp.eval
 
 theorem eval_val {n f x} : (@eval (n + 1) f : ZFSet → Arity ZFSet n) ⟦x⟧ = eval n (Resp.f f x) :=
@@ -652,12 +652,12 @@ namespace Classical
 open PSet
 
 /-- All functions are classically definable. -/
-noncomputable def AllDefinable : ∀ {n} (F : Arity ZFSet n), Definable n F
+noncomputable def allDefinable : ∀ {n} (F : Arity ZFSet n), Definable n F
   | 0, F =>
     let p := @Quotient.exists_rep PSet _ F
     @Definable.EqMk 0 ⟨choose p, Equiv.rfl⟩ _ (choose_spec p)
   | n + 1, (F : Arity ZFSet (n + 1)) => by
-    have I := fun x => AllDefinable (F x)
+    have I := fun x => allDefinable (F x)
     refine' @Definable.EqMk (n + 1) ⟨fun x : PSet => (@Definable.Resp _ _ (I ⟦x⟧)).1, _⟩ _ _
     · dsimp [Arity.Equiv]
       intro x y h
@@ -666,7 +666,7 @@ noncomputable def AllDefinable : ∀ {n} (F : Arity ZFSet n), Definable n F
     refine' funext fun q => Quotient.inductionOn q fun x => _
     simp_rw [Resp.eval_val, Resp.f]
     exact @Definable.eq _ (F ⟦x⟧) (I ⟦x⟧)
-#align classical.all_definable Classical.AllDefinable
+#align classical.all_definable Classical.allDefinable
 
 end Classical
 
@@ -1370,7 +1370,7 @@ theorem mem_funs {x y f : ZFSet.{u}} : f ∈ funs x y ↔ IsFunc x y f := by sim
 @[nolint unusedArguments]
 noncomputable instance mapDefinableAux (f : ZFSet → ZFSet) [Definable 1 f] :
     Definable 1 fun y => pair y (f y) :=
-  @Classical.AllDefinable 1 _
+  @Classical.allDefinable 1 _
 #align Set.map_definable_aux ZFSet.mapDefinableAux
 
 /-- Graph of a function: `map f x` is the ZFC function which maps `a ∈ x` to `f a` -/
@@ -1405,8 +1405,8 @@ theorem map_isFunc {f : ZFSet → ZFSet} [Definable 1 f] {x y : ZFSet} :
       fun _ => map_unique⟩⟩
 #align Set.map_is_func ZFSet.map_isFunc
 
-/-- 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`. -/
+/-- 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`. -/
 def Hereditarily (p : ZFSet → Prop) (x : ZFSet) : Prop :=
   p x ∧ ∀ y ∈ x, Hereditarily p y
 termination_by _ => x
@@ -1801,7 +1801,7 @@ variable (x : ZFSet.{u}) (h : ∅ ∉ x)
 
 /-- A choice function on the class of nonempty ZFC sets. -/
 noncomputable def choice : ZFSet :=
-  @map (fun y => Classical.epsilon fun z => z ∈ y) (Classical.AllDefinable _) x
+  @map (fun y => Classical.epsilon fun z => z ∈ y) (Classical.allDefinable _) x
 #align Set.choice ZFSet.choice
 
 theorem choice_mem_aux (y : ZFSet.{u}) (yx : y ∈ x) :
@@ -1812,13 +1812,13 @@ theorem choice_mem_aux (y : ZFSet.{u}) (yx : y ∈ x) :
 
 /- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
 theorem choice_isFunc : IsFunc x (⋃₀ x) (choice x) :=
-  (@map_isFunc _ (Classical.AllDefinable _) _ _).2 fun y yx =>
+  (@map_isFunc _ (Classical.allDefinable _) _ _).2 fun y yx =>
     mem_sUnion.2 ⟨y, yx, choice_mem_aux x h y yx⟩
 #align Set.choice_is_func ZFSet.choice_isFunc
 
 theorem choice_mem (y : ZFSet.{u}) (yx : y ∈ x) : (choice x ′ y : Class.{u}) ∈ (y : Class.{u}) := by
   delta choice
-  rw [@map_fval _ (Classical.AllDefinable _) x y yx, Class.coe_mem, Class.coe_apply]
+  rw [@map_fval _ (Classical.allDefinable _) x y yx, Class.coe_mem, Class.coe_apply]
   exact choice_mem_aux x h y yx
 #align Set.choice_mem ZFSet.choice_mem
 
chore: remove legacy termination_by' (#5426)

This adds a couple of WellFoundedRelation instances, like for example WellFoundedRelation (WithBot Nat). Longer-term, we should probably add a WellFoundedOrder class for types with a well-founded less-than relation and a [WellFoundOrder α] : WellFoundedRelation α instance (or maybe just [LT α] [IsWellFounded fun a b : α => a < b] : WellFoundedRelation α).

Diff
@@ -1407,9 +1407,9 @@ theorem map_isFunc {f : ZFSet → ZFSet} [Definable 1 f] {x y : 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`. -/
-def Hereditarily (p : ZFSet → Prop) : ZFSet → Prop
-  | x => p x ∧ ∀ y ∈ x, Hereditarily p y
-termination_by' ⟨_, mem_wf⟩
+def Hereditarily (p : ZFSet → Prop) (x : ZFSet) : Prop :=
+  p x ∧ ∀ y ∈ x, Hereditarily p y
+termination_by _ => x
 #align Set.hereditarily ZFSet.Hereditarily
 
 section Hereditarily
chore: update std 05-22 (#4248)

The main breaking change is that tac <;> [t1, t2] is now written tac <;> [t1; t2], to avoid clashing with tactics like cases and use that take comma-separated lists.

Diff
@@ -1305,7 +1305,7 @@ theorem mem_pairSep {p} {x y z : ZFSet.{u}} :
   rintro u (rfl | rfl) v <;> simp only [mem_singleton, mem_pair]
   · rintro rfl
     exact Or.inl ax
-  · rintro (rfl | rfl) <;> [left, right] <;> assumption
+  · rintro (rfl | rfl) <;> [left; right] <;> assumption
 #align Set.mem_pair_sep ZFSet.mem_pairSep
 
 theorem pair_injective : Function.Injective2 pair := fun x x' y y' H => by
chore: reenable eta, bump to nightly 2023-05-16 (#3414)

Now that leanprover/lean4#2210 has been merged, this PR:

  • removes all the set_option synthInstance.etaExperiment true commands (and some etaExperiment% term elaborators)
  • removes many but not quite all set_option maxHeartbeats commands
  • makes various other changes required to cope with leanprover/lean4#2210.

Co-authored-by: Scott Morrison <scott.morrison@anu.edu.au> Co-authored-by: Scott Morrison <scott.morrison@gmail.com> Co-authored-by: Matthew Ballard <matt@mrb.email>

Diff
@@ -1185,7 +1185,8 @@ theorem sUnion_pair {x y : ZFSet.{u}} : ⋃₀ ({x, y} : ZFSet.{u}) = x ∪ y :=
 #align Set.sUnion_pair ZFSet.sUnion_pair
 
 theorem mem_wf : @WellFounded ZFSet (· ∈ ·) :=
-  wellFounded_lift₂_iff.mpr PSet.mem_wf
+  (wellFounded_lift₂_iff (H := fun a b c d hx hy =>
+    propext ((@Mem.congr_left a c hx).trans (@Mem.congr_right b d hy _)))).mpr PSet.mem_wf
 #align Set.mem_wf ZFSet.mem_wf
 
 /-- Induction on the `∈` relation. -/
chore: Rename to sSup/iSup (#3938)

As discussed on Zulip

Renames

  • supₛsSup
  • infₛsInf
  • supᵢiSup
  • infᵢiInf
  • bsupₛbsSup
  • binfₛbsInf
  • bsupᵢbiSup
  • binfᵢbiInf
  • csupₛcsSup
  • cinfₛcsInf
  • csupᵢciSup
  • cinfᵢciInf
  • unionₛsUnion
  • interₛsInter
  • unionᵢiUnion
  • interᵢiInter
  • bunionₛbsUnion
  • binterₛbsInter
  • bunionᵢbiUnion
  • binterᵢbiInter

Co-authored-by: Parcly Taxel <reddeloostw@gmail.com>

Diff
@@ -472,15 +472,15 @@ theorem mem_powerset : ∀ {x y : PSet}, y ∈ powerset x ↔ y ⊆ x
 #align pSet.mem_powerset PSet.mem_powerset
 
 /-- The pre-set union operator -/
-def unionₛ (a : PSet) : PSet :=
+def sUnion (a : PSet) : PSet :=
   ⟨Σx, (a.Func x).Type, fun ⟨x, y⟩ => (a.Func x).Func y⟩
-#align pSet.sUnion PSet.unionₛ
+#align pSet.sUnion PSet.sUnion
 
 @[inherit_doc]
-prefix:110 "⋃₀ " => unionₛ
+prefix:110 "⋃₀ " => sUnion
 
 @[simp]
-theorem mem_unionₛ : ∀ {x y : PSet.{u}}, y ∈ ⋃₀ x ↔ ∃ z ∈ x, y ∈ z
+theorem mem_sUnion : ∀ {x y : PSet.{u}}, y ∈ ⋃₀ x ↔ ∃ z ∈ x, y ∈ z
   | ⟨α, A⟩, y =>
     ⟨fun ⟨⟨a, c⟩, (e : Equiv y ((A a).Func c))⟩ =>
       have : Func (A a) c ∈ mk (A a).Type (A a).Func := Mem.mk (A a).Func c
@@ -491,13 +491,13 @@ theorem mem_unionₛ : ∀ {x y : PSet.{u}}, y ∈ ⋃₀ x ↔ ∃ z ∈ x, y 
         let ⟨βt, _⟩ := e
         let ⟨c, bc⟩ := βt b
         ⟨⟨a, c⟩, yb.trans bc⟩⟩
-#align pSet.mem_sUnion PSet.mem_unionₛ
+#align pSet.mem_sUnion PSet.mem_sUnion
 
 @[simp]
-theorem toSet_unionₛ (x : PSet.{u}) : (⋃₀ x).toSet = ⋃₀ (toSet '' x.toSet) := by
+theorem toSet_sUnion (x : PSet.{u}) : (⋃₀ x).toSet = ⋃₀ (toSet '' x.toSet) := by
   ext
   simp
-#align pSet.to_set_sUnion PSet.toSet_unionₛ
+#align pSet.to_set_sUnion PSet.toSet_sUnion
 
 /-- The image of a function from pre-sets to pre-sets. -/
 def image (f : PSet.{u} → PSet.{u}) (x : PSet.{u}) : PSet :=
@@ -1013,8 +1013,8 @@ theorem mem_powerset {x y : ZFSet.{u}} : y ∈ powerset x ↔ y ⊆ x :=
     show (⟨β, B⟩ : PSet.{u}) ∈ PSet.powerset.{u} ⟨α, A⟩ ↔ _ by simp [mem_powerset, subset_iff]
 #align Set.mem_powerset ZFSet.mem_powerset
 
-theorem unionₛ_lem {α β : Type u} (A : α → PSet) (B : β → PSet) (αβ : ∀ a, ∃ b, Equiv (A a) (B b)) :
-    ∀ a, ∃ b, Equiv ((unionₛ ⟨α, A⟩).Func a) ((unionₛ ⟨β, B⟩).Func b)
+theorem sUnion_lem {α β : Type u} (A : α → PSet) (B : β → PSet) (αβ : ∀ a, ∃ b, Equiv (A a) (B b)) :
+    ∀ a, ∃ b, Equiv ((sUnion ⟨α, A⟩).Func a) ((sUnion ⟨β, B⟩).Func b)
   | ⟨a, c⟩ => by
     let ⟨b, hb⟩ := αβ a
     induction' ea : A a with γ Γ
@@ -1027,91 +1027,91 @@ theorem unionₛ_lem {α β : Type u} (A : α → PSet) (B : β → PSet) (αβ
     change PSet.Equiv ((A a).Func c) ((B b).Func (Eq.ndrec d eb.symm))
     match A a, B b, ea, eb, c, d, hd with
     | _, _, rfl, rfl, _, _, hd => exact hd
-#align Set.sUnion_lem ZFSet.unionₛ_lem
+#align Set.sUnion_lem ZFSet.sUnion_lem
 
 /-- The union operator, the collection of elements of elements of a ZFC set -/
-def unionₛ : ZFSet → ZFSet :=
+def sUnion : ZFSet → ZFSet :=
   Resp.eval 1
-    ⟨PSet.unionₛ, fun ⟨_, A⟩ ⟨_, B⟩ ⟨αβ, βα⟩ =>
-      ⟨unionₛ_lem A B αβ, fun a =>
+    ⟨PSet.sUnion, fun ⟨_, A⟩ ⟨_, B⟩ ⟨αβ, βα⟩ =>
+      ⟨sUnion_lem A B αβ, fun a =>
         Exists.elim
-          (unionₛ_lem B A (fun b => Exists.elim (βα b) fun c hc => ⟨c, PSet.Equiv.symm hc⟩) a)
+          (sUnion_lem B A (fun b => Exists.elim (βα b) fun c hc => ⟨c, PSet.Equiv.symm hc⟩) a)
           fun b hb => ⟨b, PSet.Equiv.symm hb⟩⟩⟩
-#align Set.sUnion ZFSet.unionₛ
+#align Set.sUnion ZFSet.sUnion
 
 @[inherit_doc]
-prefix:110 "⋃₀ " => ZFSet.unionₛ
+prefix:110 "⋃₀ " => ZFSet.sUnion
 
 /-- The intersection operator, the collection of elements in all of the elements of a ZFC set. We
 special-case `⋂₀ ∅ = ∅`. -/
-noncomputable def interₛ (x : ZFSet) : ZFSet := by
+noncomputable def sInter (x : ZFSet) : ZFSet := by
    classical exact if h : x.Nonempty then ZFSet.sep (fun y => ∀ z ∈ x, y ∈ z) h.some else ∅
-#align Set.sInter ZFSet.interₛ
+#align Set.sInter ZFSet.sInter
 
 @[inherit_doc]
-prefix:110 "⋂₀ " => ZFSet.interₛ
+prefix:110 "⋂₀ " => ZFSet.sInter
 
 @[simp]
-theorem mem_unionₛ {x y : ZFSet.{u}} : y ∈ ⋃₀ x ↔ ∃ z ∈ x, y ∈ z :=
+theorem mem_sUnion {x y : ZFSet.{u}} : y ∈ ⋃₀ x ↔ ∃ z ∈ x, y ∈ z :=
   Quotient.inductionOn₂ x y fun _ _ =>
-    Iff.trans PSet.mem_unionₛ
+    Iff.trans PSet.mem_sUnion
       ⟨fun ⟨z, h⟩ => ⟨⟦z⟧, h⟩, fun ⟨z, h⟩ => Quotient.inductionOn z (fun z h => ⟨z, h⟩) h⟩
-#align Set.mem_sUnion ZFSet.mem_unionₛ
+#align Set.mem_sUnion ZFSet.mem_sUnion
 
-theorem mem_interₛ {x y : ZFSet} (h : x.Nonempty) : y ∈ ⋂₀ x ↔ ∀ z ∈ x, y ∈ z := by
-  rw [interₛ, dif_pos h]
+theorem mem_sInter {x y : ZFSet} (h : x.Nonempty) : y ∈ ⋂₀ x ↔ ∀ z ∈ x, y ∈ z := by
+  rw [sInter, dif_pos h]
   simp only [mem_toSet, mem_sep, and_iff_right_iff_imp]
   exact fun H => H _ h.some_mem
-#align Set.mem_sInter ZFSet.mem_interₛ
+#align Set.mem_sInter ZFSet.mem_sInter
 
 @[simp]
-theorem unionₛ_empty : ⋃₀ (∅ : ZFSet.{u}) = ∅ := by
+theorem sUnion_empty : ⋃₀ (∅ : ZFSet.{u}) = ∅ := by
   ext
   simp
-#align Set.sUnion_empty ZFSet.unionₛ_empty
+#align Set.sUnion_empty ZFSet.sUnion_empty
 
 @[simp]
-theorem interₛ_empty : ⋂₀ (∅ : ZFSet) = ∅ := dif_neg <| by simp
-#align Set.sInter_empty ZFSet.interₛ_empty
+theorem sInter_empty : ⋂₀ (∅ : ZFSet) = ∅ := dif_neg <| by simp
+#align Set.sInter_empty ZFSet.sInter_empty
 
-theorem mem_of_mem_interₛ {x y z : ZFSet} (hy : y ∈ ⋂₀ x) (hz : z ∈ x) : y ∈ z := by
+theorem mem_of_mem_sInter {x y z : ZFSet} (hy : y ∈ ⋂₀ x) (hz : z ∈ x) : y ∈ z := by
   rcases eq_empty_or_nonempty x with (rfl | hx)
   · exact (not_mem_empty z hz).elim
-  · exact (mem_interₛ hx).1 hy z hz
-#align Set.mem_of_mem_sInter ZFSet.mem_of_mem_interₛ
+  · exact (mem_sInter hx).1 hy z hz
+#align Set.mem_of_mem_sInter ZFSet.mem_of_mem_sInter
 
-theorem mem_unionₛ_of_mem {x y z : ZFSet} (hy : y ∈ z) (hz : z ∈ x) : y ∈ ⋃₀ x :=
-  mem_unionₛ.2 ⟨z, hz, hy⟩
-#align Set.mem_sUnion_of_mem ZFSet.mem_unionₛ_of_mem
+theorem mem_sUnion_of_mem {x y z : ZFSet} (hy : y ∈ z) (hz : z ∈ x) : y ∈ ⋃₀ x :=
+  mem_sUnion.2 ⟨z, hz, hy⟩
+#align Set.mem_sUnion_of_mem ZFSet.mem_sUnion_of_mem
 
-theorem not_mem_interₛ_of_not_mem {x y z : ZFSet} (hy : ¬y ∈ z) (hz : z ∈ x) : ¬y ∈ ⋂₀ x :=
-  fun hx => hy <| mem_of_mem_interₛ hx hz
-#align Set.not_mem_sInter_of_not_mem ZFSet.not_mem_interₛ_of_not_mem
+theorem not_mem_sInter_of_not_mem {x y z : ZFSet} (hy : ¬y ∈ z) (hz : z ∈ x) : ¬y ∈ ⋂₀ x :=
+  fun hx => hy <| mem_of_mem_sInter hx hz
+#align Set.not_mem_sInter_of_not_mem ZFSet.not_mem_sInter_of_not_mem
 
 @[simp]
-theorem unionₛ_singleton {x : ZFSet.{u}} : ⋃₀ ({x} : ZFSet) = x :=
-  ext fun y => by simp_rw [mem_unionₛ, mem_singleton, exists_eq_left]
-#align Set.sUnion_singleton ZFSet.unionₛ_singleton
+theorem sUnion_singleton {x : ZFSet.{u}} : ⋃₀ ({x} : ZFSet) = x :=
+  ext fun y => by simp_rw [mem_sUnion, mem_singleton, exists_eq_left]
+#align Set.sUnion_singleton ZFSet.sUnion_singleton
 
 @[simp]
-theorem interₛ_singleton {x : ZFSet.{u}} : ⋂₀ ({x} : ZFSet) = x :=
-  ext fun y => by simp_rw [mem_interₛ (singleton_nonempty x), mem_singleton, forall_eq]
-#align Set.sInter_singleton ZFSet.interₛ_singleton
+theorem sInter_singleton {x : ZFSet.{u}} : ⋂₀ ({x} : ZFSet) = x :=
+  ext fun y => by simp_rw [mem_sInter (singleton_nonempty x), mem_singleton, forall_eq]
+#align Set.sInter_singleton ZFSet.sInter_singleton
 
 @[simp]
-theorem toSet_unionₛ (x : ZFSet.{u}) : (⋃₀ x).toSet = ⋃₀ (toSet '' x.toSet) := by
+theorem toSet_sUnion (x : ZFSet.{u}) : (⋃₀ x).toSet = ⋃₀ (toSet '' x.toSet) := by
   ext
   simp
-#align Set.to_set_sUnion ZFSet.toSet_unionₛ
+#align Set.to_set_sUnion ZFSet.toSet_sUnion
 
-theorem toSet_interₛ {x : ZFSet.{u}} (h : x.Nonempty) : (⋂₀ x).toSet = ⋂₀ (toSet '' x.toSet) := by
+theorem toSet_sInter {x : ZFSet.{u}} (h : x.Nonempty) : (⋂₀ x).toSet = ⋂₀ (toSet '' x.toSet) := by
   ext
-  simp [mem_interₛ h]
-#align Set.to_set_sInter ZFSet.toSet_interₛ
+  simp [mem_sInter h]
+#align Set.to_set_sInter ZFSet.toSet_sInter
 
 theorem singleton_injective : Function.Injective (@singleton ZFSet ZFSet _) := fun x y H => by
-  let this := congr_arg unionₛ H
-  rwa [unionₛ_singleton, unionₛ_singleton] at this
+  let this := congr_arg sUnion H
+  rwa [sUnion_singleton, sUnion_singleton] at this
 #align Set.singleton_injective ZFSet.singleton_injective
 
 @[simp]
@@ -1180,9 +1180,9 @@ theorem mem_diff {x y z : ZFSet.{u}} : z ∈ x \ y ↔ z ∈ x ∧ z ∉ y :=
 #align Set.mem_diff ZFSet.mem_diff
 
 @[simp]
-theorem unionₛ_pair {x y : ZFSet.{u}} : ⋃₀ ({x, y} : ZFSet.{u}) = x ∪ y :=
+theorem sUnion_pair {x y : ZFSet.{u}} : ⋃₀ ({x, y} : ZFSet.{u}) = x ∪ y :=
   rfl
-#align Set.sUnion_pair ZFSet.unionₛ_pair
+#align Set.sUnion_pair ZFSet.sUnion_pair
 
 theorem mem_wf : @WellFounded ZFSet (· ∈ ·) :=
   wellFounded_lift₂_iff.mpr PSet.mem_wf
@@ -1592,19 +1592,19 @@ def powerset (x : Class) : Class :=
 #align Class.powerset Class.powerset
 
 /-- The union of a class is the class of all members of ZFC sets in the class -/
-def unionₛ (x : Class) : Class :=
+def sUnion (x : Class) : Class :=
   ⋃₀ classToCong x
-#align Class.sUnion Class.unionₛ
+#align Class.sUnion Class.sUnion
 
 @[inherit_doc]
-prefix:110 "⋃₀ " => Class.unionₛ
+prefix:110 "⋃₀ " => Class.sUnion
 
 /-- The intersection of a class is the class of all members of ZFC sets in the class -/
-def interₛ (x : Class) : Class :=
+def sInter (x : Class) : Class :=
   ⋂₀ classToCong x
 
 @[inherit_doc]
-prefix:110 "⋂₀ " => Class.interₛ
+prefix:110 "⋂₀ " => Class.sInter
 
 theorem ofSet.inj {x y : ZFSet.{u}} (h : (x : Class.{u}) = y) : x = y :=
   ZFSet.ext fun z => by
@@ -1674,63 +1674,63 @@ theorem powerset_apply {A : Class.{u}} {x : ZFSet.{u}} : powerset A x ↔ ↑x 
 #align Class.powerset_apply Class.powerset_apply
 
 @[simp]
-theorem unionₛ_apply {x : Class} {y : ZFSet} : (⋃₀ x) y ↔ ∃ z : ZFSet, x z ∧ y ∈ z := by
+theorem sUnion_apply {x : Class} {y : ZFSet} : (⋃₀ x) y ↔ ∃ z : ZFSet, x z ∧ y ∈ z := by
   constructor
   · rintro ⟨-, ⟨z, rfl, hxz⟩, hyz⟩
     exact ⟨z, hxz, hyz⟩
   · exact fun ⟨z, hxz, hyz⟩ => ⟨_, coe_mem.2 hxz, hyz⟩
-#align Class.sUnion_apply Class.unionₛ_apply
+#align Class.sUnion_apply Class.sUnion_apply
 
 @[simp, norm_cast]
-theorem coe_unionₛ (x : ZFSet.{u}) : ↑(⋃₀ x : ZFSet) = ⋃₀ (x : Class.{u}) :=
+theorem coe_sUnion (x : ZFSet.{u}) : ↑(⋃₀ x : ZFSet) = ⋃₀ (x : Class.{u}) :=
   ext fun y =>
-    ZFSet.mem_unionₛ.trans (unionₛ_apply.trans <| by rfl).symm
-#align Class.coe_sUnion Class.coe_unionₛ
+    ZFSet.mem_sUnion.trans (sUnion_apply.trans <| by rfl).symm
+#align Class.coe_sUnion Class.coe_sUnion
 
 @[simp]
-theorem mem_unionₛ {x y : Class.{u}} : y ∈ ⋃₀ x ↔ ∃ z, z ∈ x ∧ y ∈ z := by
+theorem mem_sUnion {x y : Class.{u}} : y ∈ ⋃₀ x ↔ ∃ z, z ∈ x ∧ y ∈ z := by
   constructor
   · rintro ⟨w, rfl, z, hzx, hwz⟩
     exact ⟨z, hzx, coe_mem.2 hwz⟩
   · rintro ⟨w, hwx, z, rfl, hwz⟩
     exact ⟨z, rfl, w, hwx, hwz⟩
-#align Class.mem_sUnion Class.mem_unionₛ
+#align Class.mem_sUnion Class.mem_sUnion
 
-theorem interₛ_apply {x : Class.{u}} {y : ZFSet.{u}} : (⋂₀ x) y ↔ ∀ z : ZFSet.{u}, x z → y ∈ z := by
+theorem sInter_apply {x : Class.{u}} {y : ZFSet.{u}} : (⋂₀ x) y ↔ ∀ z : ZFSet.{u}, x z → y ∈ z := by
   refine' ⟨fun hxy z hxz => hxy _ ⟨z, rfl, hxz⟩, _⟩
   rintro H - ⟨z, rfl, hxz⟩
   exact H _ hxz
-#align Class.sInter_apply Class.interₛ_apply
+#align Class.sInter_apply Class.sInter_apply
 
 @[simp, norm_cast]
-theorem coe_interₛ {x : ZFSet.{u}} (h : x.Nonempty) : ↑(⋂₀ x : ZFSet) = ⋂₀ (x : Class.{u}) :=
-  Set.ext fun _ => (ZFSet.mem_interₛ h).trans interₛ_apply.symm
-#align Class.sInter_coe Class.coe_interₛ
+theorem coe_sInter {x : ZFSet.{u}} (h : x.Nonempty) : ↑(⋂₀ x : ZFSet) = ⋂₀ (x : Class.{u}) :=
+  Set.ext fun _ => (ZFSet.mem_sInter h).trans sInter_apply.symm
+#align Class.sInter_coe Class.coe_sInter
 
-theorem mem_of_mem_interₛ {x y z : Class} (hy : y ∈ ⋂₀ x) (hz : z ∈ x) : y ∈ z := by
+theorem mem_of_mem_sInter {x y z : Class} (hy : y ∈ ⋂₀ x) (hz : z ∈ x) : y ∈ z := by
   obtain ⟨w, rfl, hw⟩ := hy
   exact coe_mem.2 (hw z hz)
-#align Class.mem_of_mem_sInter Class.mem_of_mem_interₛ
+#align Class.mem_of_mem_sInter Class.mem_of_mem_sInter
 
-theorem mem_interₛ {x y : Class.{u}} (h : x.Nonempty) : y ∈ ⋂₀ x ↔ ∀ z, z ∈ x → y ∈ z := by
-  refine' ⟨fun hy z => mem_of_mem_interₛ hy, fun H => _⟩
-  simp_rw [mem_def, interₛ_apply]
+theorem mem_sInter {x y : Class.{u}} (h : x.Nonempty) : y ∈ ⋂₀ x ↔ ∀ z, z ∈ x → y ∈ z := by
+  refine' ⟨fun hy z => mem_of_mem_sInter hy, fun H => _⟩
+  simp_rw [mem_def, sInter_apply]
   obtain ⟨z, hz⟩ := h
   obtain ⟨y, rfl, _⟩ := H z (coe_mem.2 hz)
   refine' ⟨y, rfl, fun w hxw => _⟩
   simpa only [coe_mem, coe_apply] using H w (coe_mem.2 hxw)
-#align Class.mem_sInter Class.mem_interₛ
+#align Class.mem_sInter Class.mem_sInter
 
 @[simp]
-theorem unionₛ_empty : ⋃₀ (∅ : Class.{u}) = (∅ : Class.{u}) := by
+theorem sUnion_empty : ⋃₀ (∅ : Class.{u}) = (∅ : Class.{u}) := by
   ext
   simp
-#align Class.sUnion_empty Class.unionₛ_empty
+#align Class.sUnion_empty Class.sUnion_empty
 
 @[simp]
-theorem interₛ_empty : ⋂₀ (∅ : Class.{u}) = univ := by
-  rw [interₛ, classToCong_empty, Set.interₛ_empty, univ]
-#align Class.sInter_empty Class.interₛ_empty
+theorem sInter_empty : ⋂₀ (∅ : Class.{u}) = univ := by
+  rw [sInter, classToCong_empty, Set.sInter_empty, univ]
+#align Class.sInter_empty Class.sInter_empty
 
 /-- An induction principle for sets. If every subset of a class is a member, then the class is
   universal. -/
@@ -1812,7 +1812,7 @@ theorem choice_mem_aux (y : ZFSet.{u}) (yx : y ∈ x) :
 /- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
 theorem choice_isFunc : IsFunc x (⋃₀ x) (choice x) :=
   (@map_isFunc _ (Classical.AllDefinable _) _ _).2 fun y yx =>
-    mem_unionₛ.2 ⟨y, yx, choice_mem_aux x h y yx⟩
+    mem_sUnion.2 ⟨y, yx, choice_mem_aux x h y yx⟩
 #align Set.choice_is_func ZFSet.choice_isFunc
 
 theorem choice_mem (y : ZFSet.{u}) (yx : y ∈ x) : (choice x ′ y : Class.{u}) ∈ (y : Class.{u}) := by
chore: bye-bye, solo bys! (#3825)

This PR puts, with one exception, every single remaining by that lies all by itself on its own line to the previous line, thus matching the current behaviour of start-port.sh. The exception is when the by begins the second or later argument to a tuple or anonymous constructor; see https://github.com/leanprover-community/mathlib4/pull/3825#discussion_r1186702599.

Essentially this is s/\n *by$/ by/g, but with manual editing to satisfy the linter's max-100-char-line requirement. The Python style linter is also modified to catch these "isolated bys".

Diff
@@ -656,8 +656,7 @@ noncomputable def AllDefinable : ∀ {n} (F : Arity ZFSet n), Definable n F
   | 0, F =>
     let p := @Quotient.exists_rep PSet _ F
     @Definable.EqMk 0 ⟨choose p, Equiv.rfl⟩ _ (choose_spec p)
-  | n + 1, (F : Arity ZFSet (n + 1)) =>
-    by
+  | n + 1, (F : Arity ZFSet (n + 1)) => by
     have I := fun x => AllDefinable (F x)
     refine' @Definable.EqMk (n + 1) ⟨fun x : PSet => (@Definable.Resp _ _ (I ⟦x⟧)).1, _⟩ _ _
     · dsimp [Arity.Equiv]
@@ -733,8 +732,7 @@ theorem mem_toSet (a u : ZFSet.{u}) : a ∈ u.toSet ↔ a ∈ u :=
 #align Set.mem_to_set ZFSet.mem_toSet
 
 instance small_toSet (x : ZFSet.{u}) : Small.{u} x.toSet :=
-  Quotient.inductionOn x fun a =>
-    by
+  Quotient.inductionOn x fun a => by
     let f : a.Type → (mk a).toSet := fun i => ⟨mk <| a.Func i, func_mem a i⟩
     suffices Function.Surjective f by exact small_of_surjective this
     rintro ⟨y, hb⟩
@@ -851,14 +849,12 @@ theorem nonempty_mk_iff {x : PSet} : (mk x).Nonempty ↔ x.Nonempty := by
   exact ⟨_, h⟩
 #align Set.nonempty_mk_iff ZFSet.nonempty_mk_iff
 
-theorem eq_empty (x : ZFSet.{u}) : x = ∅ ↔ ∀ y : ZFSet.{u}, y ∉ x :=
-  by
+theorem eq_empty (x : ZFSet.{u}) : x = ∅ ↔ ∀ y : ZFSet.{u}, y ∉ x := by
   rw [ext_iff]
   simp
 #align Set.eq_empty ZFSet.eq_empty
 
-theorem eq_empty_or_nonempty (u : ZFSet) : u = ∅ ∨ u.Nonempty :=
-  by
+theorem eq_empty_or_nonempty (u : ZFSet) : u = ∅ ∨ u.Nonempty := by
   rw [eq_empty, ← not_exists]
   apply em'
 #align Set.eq_empty_or_nonempty ZFSet.eq_empty_or_nonempty
@@ -913,8 +909,7 @@ theorem mem_insert_of_mem {y z : ZFSet} (x) (h : z ∈ y) : z ∈ insert x y :=
 #align Set.mem_insert_of_mem ZFSet.mem_insert_of_mem
 
 @[simp]
-theorem toSet_insert (x y : ZFSet) : (insert x y).toSet = insert x y.toSet :=
-  by
+theorem toSet_insert (x y : ZFSet) : (insert x y).toSet = insert x y.toSet := by
   ext
   simp
 #align Set.to_set_insert ZFSet.toSet_insert
@@ -926,8 +921,7 @@ theorem mem_singleton {x y : ZFSet.{u}} : x ∈ @singleton ZFSet.{u} ZFSet.{u} _
 #align Set.mem_singleton ZFSet.mem_singleton
 
 @[simp]
-theorem toSet_singleton (x : ZFSet) : ({x} : ZFSet).toSet = {x} :=
-  by
+theorem toSet_singleton (x : ZFSet) : ({x} : ZFSet).toSet = {x} := by
   ext
   simp
 #align Set.to_set_singleton ZFSet.toSet_singleton
@@ -940,8 +934,7 @@ theorem singleton_nonempty (u : ZFSet) : ZFSet.Nonempty {u} :=
   insert_nonempty u ∅
 #align Set.singleton_nonempty ZFSet.singleton_nonempty
 
-theorem mem_pair {x y z : ZFSet.{u}} : x ∈ ({y, z} : ZFSet) ↔ x = y ∨ x = z :=
-  by
+theorem mem_pair {x y z : ZFSet.{u}} : x ∈ ({y, z} : ZFSet) ↔ x = y ∨ x = z := by
   simp
 #align Set.mem_pair ZFSet.mem_pair
 
@@ -994,8 +987,7 @@ theorem mem_sep {p : ZFSet.{u} → Prop} {x y : ZFSet.{u}} :
 
 @[simp]
 theorem toSet_sep (a : ZFSet) (p : ZFSet → Prop) :
-    (ZFSet.sep p a).toSet = { x ∈ a.toSet | p x } :=
-  by
+    (ZFSet.sep p a).toSet = { x ∈ a.toSet | p x } := by
   ext
   simp
 #align Set.to_set_sep ZFSet.toSet_sep
@@ -1152,31 +1144,27 @@ instance : SDiff ZFSet :=
   ⟨ZFSet.diff⟩
 
 @[simp]
-theorem toSet_union (x y : ZFSet.{u}) : (x ∪ y).toSet = x.toSet ∪ y.toSet :=
-  by
+theorem toSet_union (x y : ZFSet.{u}) : (x ∪ y).toSet = x.toSet ∪ y.toSet := by
   change (⋃₀ {x, y}).toSet = _
   simp
 #align Set.to_set_union ZFSet.toSet_union
 
 @[simp]
-theorem toSet_inter (x y : ZFSet.{u}) : (x ∩ y).toSet = x.toSet ∩ y.toSet :=
-  by
+theorem toSet_inter (x y : ZFSet.{u}) : (x ∩ y).toSet = x.toSet ∩ y.toSet := by
   change (ZFSet.sep (fun z => z ∈ y) x).toSet = _
   ext
   simp
 #align Set.to_set_inter ZFSet.toSet_inter
 
 @[simp]
-theorem toSet_sdiff (x y : ZFSet.{u}) : (x \ y).toSet = x.toSet \ y.toSet :=
-  by
+theorem toSet_sdiff (x y : ZFSet.{u}) : (x \ y).toSet = x.toSet \ y.toSet := by
   change (ZFSet.sep (fun z => z ∉ y) x).toSet = _
   ext
   simp
 #align Set.to_set_sdiff ZFSet.toSet_sdiff
 
 @[simp]
-theorem mem_union {x y z : ZFSet.{u}} : z ∈ x ∪ y ↔ z ∈ x ∨ z ∈ y :=
-  by
+theorem mem_union {x y z : ZFSet.{u}} : z ∈ x ∪ y ↔ z ∈ x ∨ z ∈ y := by
   rw [← mem_toSet]
   simp
 #align Set.mem_union ZFSet.mem_union
@@ -1287,8 +1275,8 @@ theorem mem_range {α : Type u} {f : α → ZFSet.{max u v}} {x : ZFSet.{max u v
 #align Set.mem_range ZFSet.mem_range
 
 @[simp]
-theorem toSet_range {α : Type u} (f : α → ZFSet.{max u v}) : (range.{u, v} f).toSet = Set.range f :=
-  by
+theorem toSet_range {α : Type u} (f : α → ZFSet.{max u v}) :
+    (range.{u, v} f).toSet = Set.range f := by
   ext
   simp
 #align Set.to_set_range ZFSet.toSet_range
@@ -1309,8 +1297,7 @@ def pairSep (p : ZFSet.{u} → ZFSet.{u} → Prop) (x y : ZFSet.{u}) : ZFSet.{u}
 
 @[simp]
 theorem mem_pairSep {p} {x y z : ZFSet.{u}} :
-    z ∈ pairSep p x y ↔ ∃ a ∈ x, ∃ b ∈ y, z = pair a b ∧ p a b :=
-  by
+    z ∈ pairSep p x y ↔ ∃ a ∈ x, ∃ b ∈ y, z = pair a b ∧ p a b := by
   refine' mem_sep.trans ⟨And.right, fun e => ⟨_, e⟩⟩
   rcases e with ⟨a, ax, b, bY, rfl, pab⟩
   simp only [mem_powerset, subset_def, mem_union, pair, mem_pair]
@@ -1320,8 +1307,7 @@ theorem mem_pairSep {p} {x y z : ZFSet.{u}} :
   · rintro (rfl | rfl) <;> [left, right] <;> assumption
 #align Set.mem_pair_sep ZFSet.mem_pairSep
 
-theorem pair_injective : Function.Injective2 pair := fun x x' y y' H =>
-  by
+theorem pair_injective : Function.Injective2 pair := fun x x' y y' H => by
   have ae := ext_iff.1 H
   simp only [pair, mem_pair] at ae
   obtain rfl : x = x' := by
@@ -1358,8 +1344,7 @@ theorem mem_prod {x y z : ZFSet.{u}} : z ∈ prod x y ↔ ∃ a ∈ x, ∃ b ∈
   simp [prod]
 #align Set.mem_prod ZFSet.mem_prod
 
-theorem pair_mem_prod {x y a b : ZFSet.{u}} : pair a b ∈ prod x y ↔ a ∈ x ∧ b ∈ y :=
-  by
+theorem pair_mem_prod {x y a b : ZFSet.{u}} : pair a b ∈ prod x y ↔ a ∈ x ∧ b ∈ y := by
   simp
 #align Set.pair_mem_prod ZFSet.pair_mem_prod
 
@@ -1400,8 +1385,7 @@ theorem mem_map {f : ZFSet → ZFSet} [Definable 1 f] {x y : ZFSet} :
 
 theorem map_unique {f : ZFSet.{u} → ZFSet.{u}} [H : Definable 1 f] {x z : ZFSet.{u}}
     (zx : z ∈ x) : ∃! w, pair z w ∈ map f x :=
-  ⟨f z, image.mk _ _ zx, fun y yx =>
-    by
+  ⟨f z, image.mk _ _ zx, fun y yx => by
     let ⟨w, _, we⟩ := mem_image.1 yx
     let ⟨wz, fy⟩ := pair_injective we
     rw [← fy, wz]⟩
@@ -1446,8 +1430,7 @@ theorem Hereditarily.mem (h : x.Hereditarily p) (hy : y ∈ x) : y.Hereditarily
   h.def.2 _ hy
 #align Set.hereditarily.mem ZFSet.Hereditarily.mem
 
-theorem Hereditarily.empty : Hereditarily p x → p ∅ :=
-  by
+theorem Hereditarily.empty : Hereditarily p x → p ∅ := by
   apply @ZFSet.inductionOn _ x
   intro y IH h
   rcases ZFSet.eq_empty_or_nonempty y with (rfl | ⟨a, ha⟩)
@@ -1546,8 +1529,7 @@ theorem eq_univ_of_forall {A : Class.{u}} : (∀ x : ZFSet, A x) → A = univ :=
 
 theorem mem_wf : @WellFounded Class.{u} (· ∈ ·) :=
   ⟨by
-    have H : ∀ x : ZFSet.{u}, @Acc Class.{u} (· ∈ ·) ↑x :=
-      by
+    have H : ∀ x : ZFSet.{u}, @Acc Class.{u} (· ∈ ·) ↑x := by
       refine' fun a => ZFSet.inductionOn a fun x IH => ⟨_, _⟩
       rintro A ⟨z, rfl, hz⟩
       exact IH z hz
@@ -1587,8 +1569,7 @@ def congToClass (x : Set Class.{u}) : Class.{u} :=
 #align Class.Cong_to_Class Class.congToClass
 
 @[simp]
-theorem congToClass_empty : congToClass ∅ = ∅ :=
-  by
+theorem congToClass_empty : congToClass ∅ = ∅ := by
   ext z
   simp only [congToClass, not_empty_hom, iff_false_iff]
   exact Set.not_mem_empty z
@@ -1600,8 +1581,7 @@ def classToCong (x : Class.{u}) : Set Class.{u} :=
 #align Class.Class_to_Cong Class.classToCong
 
 @[simp]
-theorem classToCong_empty : classToCong ∅ = ∅ :=
-  by
+theorem classToCong_empty : classToCong ∅ = ∅ := by
   ext
   simp [classToCong]
 #align Class.Class_to_Cong_empty Class.classToCong_empty
@@ -1694,8 +1674,7 @@ theorem powerset_apply {A : Class.{u}} {x : ZFSet.{u}} : powerset A x ↔ ↑x 
 #align Class.powerset_apply Class.powerset_apply
 
 @[simp]
-theorem unionₛ_apply {x : Class} {y : ZFSet} : (⋃₀ x) y ↔ ∃ z : ZFSet, x z ∧ y ∈ z :=
-  by
+theorem unionₛ_apply {x : Class} {y : ZFSet} : (⋃₀ x) y ↔ ∃ z : ZFSet, x z ∧ y ∈ z := by
   constructor
   · rintro ⟨-, ⟨z, rfl, hxz⟩, hyz⟩
     exact ⟨z, hxz, hyz⟩
@@ -1709,8 +1688,7 @@ theorem coe_unionₛ (x : ZFSet.{u}) : ↑(⋃₀ x : ZFSet) = ⋃₀ (x : Class
 #align Class.coe_sUnion Class.coe_unionₛ
 
 @[simp]
-theorem mem_unionₛ {x y : Class.{u}} : y ∈ ⋃₀ x ↔ ∃ z, z ∈ x ∧ y ∈ z :=
-  by
+theorem mem_unionₛ {x y : Class.{u}} : y ∈ ⋃₀ x ↔ ∃ z, z ∈ x ∧ y ∈ z := by
   constructor
   · rintro ⟨w, rfl, z, hzx, hwz⟩
     exact ⟨z, hzx, coe_mem.2 hwz⟩
@@ -1808,8 +1786,7 @@ namespace ZFSet
 @[simp]
 theorem map_fval {f : ZFSet.{u} → ZFSet.{u}} [H : PSet.Definable 1 f] {x y : ZFSet.{u}}
     (h : y ∈ x) : (ZFSet.map f x ′ y : Class.{u}) = f y :=
-  Class.iota_val _ _ fun z =>
-    by
+  Class.iota_val _ _ fun z => by
     rw [Class.toSet_of_ZFSet, Class.coe_apply, mem_map]
     exact
       ⟨fun ⟨w, _, pr⟩ => by
@@ -1838,8 +1815,7 @@ theorem choice_isFunc : IsFunc x (⋃₀ x) (choice x) :=
     mem_unionₛ.2 ⟨y, yx, choice_mem_aux x h y yx⟩
 #align Set.choice_is_func ZFSet.choice_isFunc
 
-theorem choice_mem (y : ZFSet.{u}) (yx : y ∈ x) : (choice x ′ y : Class.{u}) ∈ (y : Class.{u}) :=
-  by
+theorem choice_mem (y : ZFSet.{u}) (yx : y ∈ x) : (choice x ′ y : Class.{u}) ∈ (y : Class.{u}) := by
   delta choice
   rw [@map_fval _ (Classical.AllDefinable _) x y yx, Class.coe_mem, Class.coe_apply]
   exact choice_mem_aux x h y yx
Diff
@@ -1098,7 +1098,7 @@ theorem not_mem_interₛ_of_not_mem {x y z : ZFSet} (hy : ¬y ∈ z) (hz : z ∈
 
 @[simp]
 theorem unionₛ_singleton {x : ZFSet.{u}} : ⋃₀ ({x} : ZFSet) = x :=
-  ext fun y => by simp_rw [mem_unionₛ, exists_prop, mem_singleton, exists_eq_left]
+  ext fun y => by simp_rw [mem_unionₛ, mem_singleton, exists_eq_left]
 #align Set.sUnion_singleton ZFSet.unionₛ_singleton
 
 @[simp]
feat: port ZFC set intersection (#3345)

Also fixes some erroneous theorem names from the port.

set_theory.zfc.basic@98bbc3526516bca903bff09ea10c4206bf079e6b..f0b3759a8ef0bd8239ecdaa5e1089add5feebe1a

Mathlib 3: https://github.com/leanprover-community/mathlib/pull/18232

Co-authored-by: Parcly Taxel <reddeloostw@gmail.com> Co-authored-by: Yaël Dillies <yael.dillies@gmail.com>

Diff
@@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Mario Carneiro
 
 ! This file was ported from Lean 3 source module set_theory.zfc.basic
-! leanprover-community/mathlib commit 98bbc3526516bca903bff09ea10c4206bf079e6b
+! leanprover-community/mathlib commit f0b3759a8ef0bd8239ecdaa5e1089add5feebe1a
 ! Please do not edit these lines, except to modify the commit id
 ! if you have ported upstream changes.
 -/
@@ -1050,6 +1050,15 @@ def unionₛ : ZFSet → ZFSet :=
 @[inherit_doc]
 prefix:110 "⋃₀ " => ZFSet.unionₛ
 
+/-- The intersection operator, the collection of elements in all of the elements of a ZFC set. We
+special-case `⋂₀ ∅ = ∅`. -/
+noncomputable def interₛ (x : ZFSet) : ZFSet := by
+   classical exact if h : x.Nonempty then ZFSet.sep (fun y => ∀ z ∈ x, y ∈ z) h.some else ∅
+#align Set.sInter ZFSet.interₛ
+
+@[inherit_doc]
+prefix:110 "⋂₀ " => ZFSet.interₛ
+
 @[simp]
 theorem mem_unionₛ {x y : ZFSet.{u}} : y ∈ ⋃₀ x ↔ ∃ z ∈ x, y ∈ z :=
   Quotient.inductionOn₂ x y fun _ _ =>
@@ -1057,27 +1066,56 @@ theorem mem_unionₛ {x y : ZFSet.{u}} : y ∈ ⋃₀ x ↔ ∃ z ∈ x, y ∈ z
       ⟨fun ⟨z, h⟩ => ⟨⟦z⟧, h⟩, fun ⟨z, h⟩ => Quotient.inductionOn z (fun z h => ⟨z, h⟩) h⟩
 #align Set.mem_sUnion ZFSet.mem_unionₛ
 
-theorem mem_unionₛ_of_mem {x y z : ZFSet} (hy : y ∈ z) (hz : z ∈ x) : y ∈ ⋃₀ x :=
-  mem_unionₛ.2 ⟨z, hz, hy⟩
-#align Set.mem_sUnion_of_mem ZFSet.mem_unionₛ_of_mem
+theorem mem_interₛ {x y : ZFSet} (h : x.Nonempty) : y ∈ ⋂₀ x ↔ ∀ z ∈ x, y ∈ z := by
+  rw [interₛ, dif_pos h]
+  simp only [mem_toSet, mem_sep, and_iff_right_iff_imp]
+  exact fun H => H _ h.some_mem
+#align Set.mem_sInter ZFSet.mem_interₛ
 
 @[simp]
-theorem unionₛ_empty : ⋃₀ (∅ : ZFSet.{u}) = ∅ :=
-  by
+theorem unionₛ_empty : ⋃₀ (∅ : ZFSet.{u}) = ∅ := by
   ext
   simp
 #align Set.sUnion_empty ZFSet.unionₛ_empty
 
+@[simp]
+theorem interₛ_empty : ⋂₀ (∅ : ZFSet) = ∅ := dif_neg <| by simp
+#align Set.sInter_empty ZFSet.interₛ_empty
+
+theorem mem_of_mem_interₛ {x y z : ZFSet} (hy : y ∈ ⋂₀ x) (hz : z ∈ x) : y ∈ z := by
+  rcases eq_empty_or_nonempty x with (rfl | hx)
+  · exact (not_mem_empty z hz).elim
+  · exact (mem_interₛ hx).1 hy z hz
+#align Set.mem_of_mem_sInter ZFSet.mem_of_mem_interₛ
+
+theorem mem_unionₛ_of_mem {x y z : ZFSet} (hy : y ∈ z) (hz : z ∈ x) : y ∈ ⋃₀ x :=
+  mem_unionₛ.2 ⟨z, hz, hy⟩
+#align Set.mem_sUnion_of_mem ZFSet.mem_unionₛ_of_mem
+
+theorem not_mem_interₛ_of_not_mem {x y z : ZFSet} (hy : ¬y ∈ z) (hz : z ∈ x) : ¬y ∈ ⋂₀ x :=
+  fun hx => hy <| mem_of_mem_interₛ hx hz
+#align Set.not_mem_sInter_of_not_mem ZFSet.not_mem_interₛ_of_not_mem
+
 @[simp]
 theorem unionₛ_singleton {x : ZFSet.{u}} : ⋃₀ ({x} : ZFSet) = x :=
   ext fun y => by simp_rw [mem_unionₛ, exists_prop, mem_singleton, exists_eq_left]
 #align Set.sUnion_singleton ZFSet.unionₛ_singleton
 
 @[simp]
-theorem to_set_unionₛ (x : ZFSet.{u}) : (⋃₀ x).toSet = ⋃₀ (toSet '' x.toSet) := by
+theorem interₛ_singleton {x : ZFSet.{u}} : ⋂₀ ({x} : ZFSet) = x :=
+  ext fun y => by simp_rw [mem_interₛ (singleton_nonempty x), mem_singleton, forall_eq]
+#align Set.sInter_singleton ZFSet.interₛ_singleton
+
+@[simp]
+theorem toSet_unionₛ (x : ZFSet.{u}) : (⋃₀ x).toSet = ⋃₀ (toSet '' x.toSet) := by
   ext
   simp
-#align Set.to_set_sUnion ZFSet.to_set_unionₛ
+#align Set.to_set_sUnion ZFSet.toSet_unionₛ
+
+theorem toSet_interₛ {x : ZFSet.{u}} (h : x.Nonempty) : (⋂₀ x).toSet = ⋂₀ (toSet '' x.toSet) := by
+  ext
+  simp [mem_interₛ h]
+#align Set.to_set_sInter ZFSet.toSet_interₛ
 
 theorem singleton_injective : Function.Injective (@singleton ZFSet ZFSet _) := fun x y H => by
   let this := congr_arg unionₛ H
@@ -1581,6 +1619,13 @@ def unionₛ (x : Class) : Class :=
 @[inherit_doc]
 prefix:110 "⋃₀ " => Class.unionₛ
 
+/-- The intersection of a class is the class of all members of ZFC sets in the class -/
+def interₛ (x : Class) : Class :=
+  ⋂₀ classToCong x
+
+@[inherit_doc]
+prefix:110 "⋂₀ " => Class.interₛ
+
 theorem ofSet.inj {x y : ZFSet.{u}} (h : (x : Class.{u}) = y) : x = y :=
   ZFSet.ext fun z => by
     change (x : Class.{u}) z ↔ (y : Class.{u}) z
@@ -1588,13 +1633,13 @@ theorem ofSet.inj {x y : ZFSet.{u}} (h : (x : Class.{u}) = y) : x = y :=
 #align Class.of_Set.inj Class.ofSet.inj
 
 @[simp]
-theorem toSet_of_setCat (A : Class.{u}) (x : ZFSet.{u}) : ToSet A x ↔ A x :=
+theorem toSet_of_ZFSet (A : Class.{u}) (x : ZFSet.{u}) : ToSet A x ↔ A x :=
   ⟨fun ⟨y, yx, py⟩ => by rwa [ofSet.inj yx] at py, fun px => ⟨x, rfl, px⟩⟩
-#align Class.to_Set_of_Set Class.toSet_of_setCat
+#align Class.to_Set_of_Set Class.toSet_of_ZFSet
 
 @[simp, norm_cast]
 theorem coe_mem {x : ZFSet.{u}} {A : Class.{u}} : ↑x ∈ A ↔ A x :=
-  toSet_of_setCat _ _
+  toSet_of_ZFSet _ _
 #align Class.coe_mem Class.coe_mem
 
 @[simp]
@@ -1673,14 +1718,42 @@ theorem mem_unionₛ {x y : Class.{u}} : y ∈ ⋃₀ x ↔ ∃ z, z ∈ x ∧ y
     exact ⟨z, rfl, w, hwx, hwz⟩
 #align Class.mem_sUnion Class.mem_unionₛ
 
-/- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
-@[simp]
-theorem unionₛ_empty : ⋃₀ (∅ : Class.{u}) = (∅ : Class.{u}) :=
-  by
+theorem interₛ_apply {x : Class.{u}} {y : ZFSet.{u}} : (⋂₀ x) y ↔ ∀ z : ZFSet.{u}, x z → y ∈ z := by
+  refine' ⟨fun hxy z hxz => hxy _ ⟨z, rfl, hxz⟩, _⟩
+  rintro H - ⟨z, rfl, hxz⟩
+  exact H _ hxz
+#align Class.sInter_apply Class.interₛ_apply
+
+@[simp, norm_cast]
+theorem coe_interₛ {x : ZFSet.{u}} (h : x.Nonempty) : ↑(⋂₀ x : ZFSet) = ⋂₀ (x : Class.{u}) :=
+  Set.ext fun _ => (ZFSet.mem_interₛ h).trans interₛ_apply.symm
+#align Class.sInter_coe Class.coe_interₛ
+
+theorem mem_of_mem_interₛ {x y z : Class} (hy : y ∈ ⋂₀ x) (hz : z ∈ x) : y ∈ z := by
+  obtain ⟨w, rfl, hw⟩ := hy
+  exact coe_mem.2 (hw z hz)
+#align Class.mem_of_mem_sInter Class.mem_of_mem_interₛ
+
+theorem mem_interₛ {x y : Class.{u}} (h : x.Nonempty) : y ∈ ⋂₀ x ↔ ∀ z, z ∈ x → y ∈ z := by
+  refine' ⟨fun hy z => mem_of_mem_interₛ hy, fun H => _⟩
+  simp_rw [mem_def, interₛ_apply]
+  obtain ⟨z, hz⟩ := h
+  obtain ⟨y, rfl, _⟩ := H z (coe_mem.2 hz)
+  refine' ⟨y, rfl, fun w hxw => _⟩
+  simpa only [coe_mem, coe_apply] using H w (coe_mem.2 hxw)
+#align Class.mem_sInter Class.mem_interₛ
+
+@[simp]
+theorem unionₛ_empty : ⋃₀ (∅ : Class.{u}) = (∅ : Class.{u}) := by
   ext
   simp
 #align Class.sUnion_empty Class.unionₛ_empty
 
+@[simp]
+theorem interₛ_empty : ⋂₀ (∅ : Class.{u}) = univ := by
+  rw [interₛ, classToCong_empty, Set.interₛ_empty, univ]
+#align Class.sInter_empty Class.interₛ_empty
+
 /-- An induction principle for sets. If every subset of a class is a member, then the class is
   universal. -/
 theorem eq_univ_of_powerset_subset {A : Class} (hA : powerset A ⊆ A) : A = univ :=
@@ -1737,7 +1810,7 @@ theorem map_fval {f : ZFSet.{u} → ZFSet.{u}} [H : PSet.Definable 1 f] {x y : Z
     (h : y ∈ x) : (ZFSet.map f x ′ y : Class.{u}) = f y :=
   Class.iota_val _ _ fun z =>
     by
-    rw [Class.toSet_of_setCat, Class.coe_apply, mem_map]
+    rw [Class.toSet_of_ZFSet, Class.coe_apply, mem_map]
     exact
       ⟨fun ⟨w, _, pr⟩ => by
         let ⟨wy, fw⟩ := ZFSet.pair_injective pr
feat: port SetTheory.ZFC.Basic (#3165)

A re-do of #1215, necessary since a lot of major changes have happened in the last months.

Co-authored-by: Jeremy Tan Jie Rui <reddeloostw@gmail.com>

Dependencies 61

62 files ported (100.0%)
35100 lines ported (100.0%)

All dependencies are ported!