data.setoid.partitionMathlib.Data.Setoid.Partition

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)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(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)

Changes in mathlib3port

mathlib3
mathlib3port
Diff
@@ -44,7 +44,7 @@ namespace Setoid
 
 variable {α : Type _}
 
-/- ./././Mathport/Syntax/Translate/Basic.lean:641:2: warning: expanding binder collection (b «expr ∈ » c) -/
+/- ./././Mathport/Syntax/Translate/Basic.lean:642:2: warning: expanding binder collection (b «expr ∈ » c) -/
 #print Setoid.eq_of_mem_eqv_class /-
 /-- If x ∈ α is in 2 elements of a set of sets partitioning α, those 2 sets are equal. -/
 theorem eq_of_mem_eqv_class {c : Set (Set α)} (H : ∀ a, ∃! (b : _) (_ : b ∈ c), a ∈ b) {x b b'}
@@ -53,7 +53,7 @@ theorem eq_of_mem_eqv_class {c : Set (Set α)} (H : ∀ a, ∃! (b : _) (_ : b 
 #align setoid.eq_of_mem_eqv_class Setoid.eq_of_mem_eqv_class
 -/
 
-/- ./././Mathport/Syntax/Translate/Basic.lean:641:2: warning: expanding binder collection (b «expr ∈ » c) -/
+/- ./././Mathport/Syntax/Translate/Basic.lean:642:2: warning: expanding binder collection (b «expr ∈ » c) -/
 #print Setoid.mkClasses /-
 /-- Makes an equivalence relation from a set of sets partitioning α. -/
 def mkClasses (c : Set (Set α)) (H : ∀ a, ∃! (b : _) (_ : b ∈ c), a ∈ b) : Setoid α :=
@@ -133,7 +133,7 @@ theorem empty_not_mem_classes {r : Setoid α} : ∅ ∉ r.classes := fun ⟨y, h
 #align setoid.empty_not_mem_classes Setoid.empty_not_mem_classes
 -/
 
-/- ./././Mathport/Syntax/Translate/Basic.lean:641:2: warning: expanding binder collection (b «expr ∈ » r.classes) -/
+/- ./././Mathport/Syntax/Translate/Basic.lean:642:2: warning: expanding binder collection (b «expr ∈ » r.classes) -/
 #print Setoid.classes_eqv_classes /-
 /-- Equivalence classes partition the type. -/
 theorem classes_eqv_classes {r : Setoid α} (a) : ∃! (b : _) (_ : b ∈ r.classes), a ∈ b :=
@@ -153,7 +153,7 @@ theorem eq_of_mem_classes {r : Setoid α} {x b} (hc : b ∈ r.classes) (hb : x 
 #align setoid.eq_of_mem_classes Setoid.eq_of_mem_classes
 -/
 
-/- ./././Mathport/Syntax/Translate/Basic.lean:641:2: warning: expanding binder collection (b «expr ∈ » c) -/
+/- ./././Mathport/Syntax/Translate/Basic.lean:642:2: warning: expanding binder collection (b «expr ∈ » c) -/
 #print Setoid.eq_eqv_class_of_mem /-
 /-- The elements of a set of sets partitioning α are the equivalence classes of the
     equivalence relation defined by the set of sets. -/
@@ -167,7 +167,7 @@ theorem eq_eqv_class_of_mem {c : Set (Set α)} (H : ∀ a, ∃! (b : _) (_ : b 
 #align setoid.eq_eqv_class_of_mem Setoid.eq_eqv_class_of_mem
 -/
 
-/- ./././Mathport/Syntax/Translate/Basic.lean:641:2: warning: expanding binder collection (b «expr ∈ » c) -/
+/- ./././Mathport/Syntax/Translate/Basic.lean:642:2: warning: expanding binder collection (b «expr ∈ » c) -/
 #print Setoid.eqv_class_mem /-
 /-- The equivalence classes of the equivalence relation defined by a set of sets
     partitioning α are elements of the set of sets. -/
@@ -177,7 +177,7 @@ theorem eqv_class_mem {c : Set (Set α)} (H : ∀ a, ∃! (b : _) (_ : b ∈ c),
 #align setoid.eqv_class_mem Setoid.eqv_class_mem
 -/
 
-/- ./././Mathport/Syntax/Translate/Basic.lean:641:2: warning: expanding binder collection (b «expr ∈ » c) -/
+/- ./././Mathport/Syntax/Translate/Basic.lean:642:2: warning: expanding binder collection (b «expr ∈ » c) -/
 #print Setoid.eqv_class_mem' /-
 theorem eqv_class_mem' {c : Set (Set α)} (H : ∀ a, ∃! (b : _) (_ : b ∈ c), a ∈ b) {x} :
     {y : α | (mkClasses c H).Rel x y} ∈ c := by convert Setoid.eqv_class_mem H; ext;
@@ -185,7 +185,7 @@ theorem eqv_class_mem' {c : Set (Set α)} (H : ∀ a, ∃! (b : _) (_ : b ∈ c)
 #align setoid.eqv_class_mem' Setoid.eqv_class_mem'
 -/
 
-/- ./././Mathport/Syntax/Translate/Basic.lean:641:2: warning: expanding binder collection (b «expr ∈ » c) -/
+/- ./././Mathport/Syntax/Translate/Basic.lean:642:2: warning: expanding binder collection (b «expr ∈ » c) -/
 #print Setoid.eqv_classes_disjoint /-
 /-- Distinct elements of a set of sets partitioning α are disjoint. -/
 theorem eqv_classes_disjoint {c : Set (Set α)} (H : ∀ a, ∃! (b : _) (_ : b ∈ c), a ∈ b) :
@@ -195,7 +195,7 @@ theorem eqv_classes_disjoint {c : Set (Set α)} (H : ∀ a, ∃! (b : _) (_ : b
 #align setoid.eqv_classes_disjoint Setoid.eqv_classes_disjoint
 -/
 
-/- ./././Mathport/Syntax/Translate/Basic.lean:641:2: warning: expanding binder collection (b «expr ∈ » c) -/
+/- ./././Mathport/Syntax/Translate/Basic.lean:642:2: warning: expanding binder collection (b «expr ∈ » c) -/
 #print Setoid.eqv_classes_of_disjoint_union /-
 /-- A set of disjoint sets covering α partition α (classical). -/
 theorem eqv_classes_of_disjoint_union {c : Set (Set α)} (hu : Set.sUnion c = @Set.univ α)
@@ -232,7 +232,7 @@ theorem sUnion_classes (r : Setoid α) : ⋃₀ r.classes = Set.univ :=
 
 section Partition
 
-/- ./././Mathport/Syntax/Translate/Basic.lean:641:2: warning: expanding binder collection (b «expr ∈ » c) -/
+/- ./././Mathport/Syntax/Translate/Basic.lean:642:2: warning: expanding binder collection (b «expr ∈ » c) -/
 #print Setoid.IsPartition /-
 /-- A collection `c : set (set α)` of sets is a partition of `α` into pairwise
 disjoint sets if `∅ ∉ c` and each element `a : α` belongs to a unique set `b ∈ c`. -/
Diff
@@ -267,7 +267,7 @@ theorem IsPartition.sUnion_eq_univ {c : Set (Set α)} (hc : IsPartition c) : ⋃
   Set.eq_univ_of_forall fun x =>
     Set.mem_sUnion.2 <|
       let ⟨t, ht⟩ := hc.2 x
-      ⟨t, by simp only [exists_unique_iff_exists] at ht ; tauto⟩
+      ⟨t, by simp only [exists_unique_iff_exists] at ht; tauto⟩
 #align setoid.is_partition.sUnion_eq_univ Setoid.IsPartition.sUnion_eq_univ
 -/
 
Diff
@@ -355,7 +355,7 @@ def IsPartition.finpartition {c : Finset (Set α)} (hc : Setoid.IsPartition (c :
     Finpartition (Set.univ : Set α) where
   parts := c
   SupIndep := Finset.supIndep_iff_pairwiseDisjoint.mpr <| eqv_classes_disjoint hc.2
-  supParts := c.sup_id_set_eq_sUnion.trans hc.sUnion_eq_univ
+  sup_parts := c.sup_id_set_eq_sUnion.trans hc.sUnion_eq_univ
   not_bot_mem := hc.left
 #align setoid.is_partition.finpartition Setoid.IsPartition.finpartition
 -/
@@ -367,7 +367,7 @@ end Setoid
 theorem Finpartition.isPartition_parts {α} (f : Finpartition (Set.univ : Set α)) :
     Setoid.IsPartition (f.parts : Set (Set α)) :=
   ⟨f.not_bot_mem,
-    Setoid.eqv_classes_of_disjoint_union (f.parts.sup_id_set_eq_sUnion.symm.trans f.supParts)
+    Setoid.eqv_classes_of_disjoint_union (f.parts.sup_id_set_eq_sUnion.symm.trans f.sup_parts)
       f.SupIndep.PairwiseDisjoint⟩
 #align finpartition.is_partition_parts Finpartition.isPartition_parts
 -/
Diff
@@ -100,7 +100,8 @@ theorem finite_classes_ker {α β : Type _} [Finite β] (f : α → β) : (Setoi
 #print Setoid.card_classes_ker_le /-
 theorem card_classes_ker_le {α β : Type _} [Fintype β] (f : α → β)
     [Fintype (Setoid.ker f).classes] : Fintype.card (Setoid.ker f).classes ≤ Fintype.card β := by
-  classical
+  classical exact
+    le_trans (Set.card_le_of_subset (classes_ker_subset_fiber_set f)) (Fintype.card_range_le _)
 #align setoid.card_classes_ker_le Setoid.card_classes_ker_le
 -/
 
Diff
@@ -100,8 +100,7 @@ theorem finite_classes_ker {α β : Type _} [Finite β] (f : α → β) : (Setoi
 #print Setoid.card_classes_ker_le /-
 theorem card_classes_ker_le {α β : Type _} [Fintype β] (f : α → β)
     [Fintype (Setoid.ker f).classes] : Fintype.card (Setoid.ker f).classes ≤ Fintype.card β := by
-  classical exact
-    le_trans (Set.card_le_of_subset (classes_ker_subset_fiber_set f)) (Fintype.card_range_le _)
+  classical
 #align setoid.card_classes_ker_le Setoid.card_classes_ker_le
 -/
 
Diff
@@ -3,10 +3,10 @@ Copyright (c) 2019 Amelia Livingston. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Amelia Livingston, Bryan Gin-ge Chen, Patrick Massot
 -/
-import Mathbin.Data.Fintype.Basic
-import Mathbin.Data.Set.Finite
-import Mathbin.Data.Setoid.Basic
-import Mathbin.Order.Partition.Finpartition
+import Data.Fintype.Basic
+import Data.Set.Finite
+import Data.Setoid.Basic
+import Order.Partition.Finpartition
 
 #align_import data.setoid.partition from "leanprover-community/mathlib"@"50832daea47b195a48b5b33b1c8b2162c48c3afc"
 
@@ -44,7 +44,7 @@ namespace Setoid
 
 variable {α : Type _}
 
-/- ./././Mathport/Syntax/Translate/Basic.lean:635:2: warning: expanding binder collection (b «expr ∈ » c) -/
+/- ./././Mathport/Syntax/Translate/Basic.lean:641:2: warning: expanding binder collection (b «expr ∈ » c) -/
 #print Setoid.eq_of_mem_eqv_class /-
 /-- If x ∈ α is in 2 elements of a set of sets partitioning α, those 2 sets are equal. -/
 theorem eq_of_mem_eqv_class {c : Set (Set α)} (H : ∀ a, ∃! (b : _) (_ : b ∈ c), a ∈ b) {x b b'}
@@ -53,7 +53,7 @@ theorem eq_of_mem_eqv_class {c : Set (Set α)} (H : ∀ a, ∃! (b : _) (_ : b 
 #align setoid.eq_of_mem_eqv_class Setoid.eq_of_mem_eqv_class
 -/
 
-/- ./././Mathport/Syntax/Translate/Basic.lean:635:2: warning: expanding binder collection (b «expr ∈ » c) -/
+/- ./././Mathport/Syntax/Translate/Basic.lean:641:2: warning: expanding binder collection (b «expr ∈ » c) -/
 #print Setoid.mkClasses /-
 /-- Makes an equivalence relation from a set of sets partitioning α. -/
 def mkClasses (c : Set (Set α)) (H : ∀ a, ∃! (b : _) (_ : b ∈ c), a ∈ b) : Setoid α :=
@@ -133,7 +133,7 @@ theorem empty_not_mem_classes {r : Setoid α} : ∅ ∉ r.classes := fun ⟨y, h
 #align setoid.empty_not_mem_classes Setoid.empty_not_mem_classes
 -/
 
-/- ./././Mathport/Syntax/Translate/Basic.lean:635:2: warning: expanding binder collection (b «expr ∈ » r.classes) -/
+/- ./././Mathport/Syntax/Translate/Basic.lean:641:2: warning: expanding binder collection (b «expr ∈ » r.classes) -/
 #print Setoid.classes_eqv_classes /-
 /-- Equivalence classes partition the type. -/
 theorem classes_eqv_classes {r : Setoid α} (a) : ∃! (b : _) (_ : b ∈ r.classes), a ∈ b :=
@@ -153,7 +153,7 @@ theorem eq_of_mem_classes {r : Setoid α} {x b} (hc : b ∈ r.classes) (hb : x 
 #align setoid.eq_of_mem_classes Setoid.eq_of_mem_classes
 -/
 
-/- ./././Mathport/Syntax/Translate/Basic.lean:635:2: warning: expanding binder collection (b «expr ∈ » c) -/
+/- ./././Mathport/Syntax/Translate/Basic.lean:641:2: warning: expanding binder collection (b «expr ∈ » c) -/
 #print Setoid.eq_eqv_class_of_mem /-
 /-- The elements of a set of sets partitioning α are the equivalence classes of the
     equivalence relation defined by the set of sets. -/
@@ -167,7 +167,7 @@ theorem eq_eqv_class_of_mem {c : Set (Set α)} (H : ∀ a, ∃! (b : _) (_ : b 
 #align setoid.eq_eqv_class_of_mem Setoid.eq_eqv_class_of_mem
 -/
 
-/- ./././Mathport/Syntax/Translate/Basic.lean:635:2: warning: expanding binder collection (b «expr ∈ » c) -/
+/- ./././Mathport/Syntax/Translate/Basic.lean:641:2: warning: expanding binder collection (b «expr ∈ » c) -/
 #print Setoid.eqv_class_mem /-
 /-- The equivalence classes of the equivalence relation defined by a set of sets
     partitioning α are elements of the set of sets. -/
@@ -177,7 +177,7 @@ theorem eqv_class_mem {c : Set (Set α)} (H : ∀ a, ∃! (b : _) (_ : b ∈ c),
 #align setoid.eqv_class_mem Setoid.eqv_class_mem
 -/
 
-/- ./././Mathport/Syntax/Translate/Basic.lean:635:2: warning: expanding binder collection (b «expr ∈ » c) -/
+/- ./././Mathport/Syntax/Translate/Basic.lean:641:2: warning: expanding binder collection (b «expr ∈ » c) -/
 #print Setoid.eqv_class_mem' /-
 theorem eqv_class_mem' {c : Set (Set α)} (H : ∀ a, ∃! (b : _) (_ : b ∈ c), a ∈ b) {x} :
     {y : α | (mkClasses c H).Rel x y} ∈ c := by convert Setoid.eqv_class_mem H; ext;
@@ -185,7 +185,7 @@ theorem eqv_class_mem' {c : Set (Set α)} (H : ∀ a, ∃! (b : _) (_ : b ∈ c)
 #align setoid.eqv_class_mem' Setoid.eqv_class_mem'
 -/
 
-/- ./././Mathport/Syntax/Translate/Basic.lean:635:2: warning: expanding binder collection (b «expr ∈ » c) -/
+/- ./././Mathport/Syntax/Translate/Basic.lean:641:2: warning: expanding binder collection (b «expr ∈ » c) -/
 #print Setoid.eqv_classes_disjoint /-
 /-- Distinct elements of a set of sets partitioning α are disjoint. -/
 theorem eqv_classes_disjoint {c : Set (Set α)} (H : ∀ a, ∃! (b : _) (_ : b ∈ c), a ∈ b) :
@@ -195,7 +195,7 @@ theorem eqv_classes_disjoint {c : Set (Set α)} (H : ∀ a, ∃! (b : _) (_ : b
 #align setoid.eqv_classes_disjoint Setoid.eqv_classes_disjoint
 -/
 
-/- ./././Mathport/Syntax/Translate/Basic.lean:635:2: warning: expanding binder collection (b «expr ∈ » c) -/
+/- ./././Mathport/Syntax/Translate/Basic.lean:641:2: warning: expanding binder collection (b «expr ∈ » c) -/
 #print Setoid.eqv_classes_of_disjoint_union /-
 /-- A set of disjoint sets covering α partition α (classical). -/
 theorem eqv_classes_of_disjoint_union {c : Set (Set α)} (hu : Set.sUnion c = @Set.univ α)
@@ -232,7 +232,7 @@ theorem sUnion_classes (r : Setoid α) : ⋃₀ r.classes = Set.univ :=
 
 section Partition
 
-/- ./././Mathport/Syntax/Translate/Basic.lean:635:2: warning: expanding binder collection (b «expr ∈ » c) -/
+/- ./././Mathport/Syntax/Translate/Basic.lean:641:2: warning: expanding binder collection (b «expr ∈ » c) -/
 #print Setoid.IsPartition /-
 /-- A collection `c : set (set α)` of sets is a partition of `α` into pairwise
 disjoint sets if `∅ ∉ c` and each element `a : α` belongs to a unique set `b ∈ c`. -/
Diff
@@ -2,17 +2,14 @@
 Copyright (c) 2019 Amelia Livingston. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Amelia Livingston, Bryan Gin-ge Chen, Patrick Massot
-
-! This file was ported from Lean 3 source module data.setoid.partition
-! leanprover-community/mathlib commit 50832daea47b195a48b5b33b1c8b2162c48c3afc
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
 -/
 import Mathbin.Data.Fintype.Basic
 import Mathbin.Data.Set.Finite
 import Mathbin.Data.Setoid.Basic
 import Mathbin.Order.Partition.Finpartition
 
+#align_import data.setoid.partition from "leanprover-community/mathlib"@"50832daea47b195a48b5b33b1c8b2162c48c3afc"
+
 /-!
 # Equivalence relations: partitions
 
@@ -47,7 +44,7 @@ namespace Setoid
 
 variable {α : Type _}
 
-/- ./././Mathport/Syntax/Translate/Basic.lean:638:2: warning: expanding binder collection (b «expr ∈ » c) -/
+/- ./././Mathport/Syntax/Translate/Basic.lean:635:2: warning: expanding binder collection (b «expr ∈ » c) -/
 #print Setoid.eq_of_mem_eqv_class /-
 /-- If x ∈ α is in 2 elements of a set of sets partitioning α, those 2 sets are equal. -/
 theorem eq_of_mem_eqv_class {c : Set (Set α)} (H : ∀ a, ∃! (b : _) (_ : b ∈ c), a ∈ b) {x b b'}
@@ -56,7 +53,7 @@ theorem eq_of_mem_eqv_class {c : Set (Set α)} (H : ∀ a, ∃! (b : _) (_ : b 
 #align setoid.eq_of_mem_eqv_class Setoid.eq_of_mem_eqv_class
 -/
 
-/- ./././Mathport/Syntax/Translate/Basic.lean:638:2: warning: expanding binder collection (b «expr ∈ » c) -/
+/- ./././Mathport/Syntax/Translate/Basic.lean:635:2: warning: expanding binder collection (b «expr ∈ » c) -/
 #print Setoid.mkClasses /-
 /-- Makes an equivalence relation from a set of sets partitioning α. -/
 def mkClasses (c : Set (Set α)) (H : ∀ a, ∃! (b : _) (_ : b ∈ c), a ∈ b) : Setoid α :=
@@ -136,7 +133,7 @@ theorem empty_not_mem_classes {r : Setoid α} : ∅ ∉ r.classes := fun ⟨y, h
 #align setoid.empty_not_mem_classes Setoid.empty_not_mem_classes
 -/
 
-/- ./././Mathport/Syntax/Translate/Basic.lean:638:2: warning: expanding binder collection (b «expr ∈ » r.classes) -/
+/- ./././Mathport/Syntax/Translate/Basic.lean:635:2: warning: expanding binder collection (b «expr ∈ » r.classes) -/
 #print Setoid.classes_eqv_classes /-
 /-- Equivalence classes partition the type. -/
 theorem classes_eqv_classes {r : Setoid α} (a) : ∃! (b : _) (_ : b ∈ r.classes), a ∈ b :=
@@ -156,7 +153,7 @@ theorem eq_of_mem_classes {r : Setoid α} {x b} (hc : b ∈ r.classes) (hb : x 
 #align setoid.eq_of_mem_classes Setoid.eq_of_mem_classes
 -/
 
-/- ./././Mathport/Syntax/Translate/Basic.lean:638:2: warning: expanding binder collection (b «expr ∈ » c) -/
+/- ./././Mathport/Syntax/Translate/Basic.lean:635:2: warning: expanding binder collection (b «expr ∈ » c) -/
 #print Setoid.eq_eqv_class_of_mem /-
 /-- The elements of a set of sets partitioning α are the equivalence classes of the
     equivalence relation defined by the set of sets. -/
@@ -170,7 +167,7 @@ theorem eq_eqv_class_of_mem {c : Set (Set α)} (H : ∀ a, ∃! (b : _) (_ : b 
 #align setoid.eq_eqv_class_of_mem Setoid.eq_eqv_class_of_mem
 -/
 
-/- ./././Mathport/Syntax/Translate/Basic.lean:638:2: warning: expanding binder collection (b «expr ∈ » c) -/
+/- ./././Mathport/Syntax/Translate/Basic.lean:635:2: warning: expanding binder collection (b «expr ∈ » c) -/
 #print Setoid.eqv_class_mem /-
 /-- The equivalence classes of the equivalence relation defined by a set of sets
     partitioning α are elements of the set of sets. -/
@@ -180,7 +177,7 @@ theorem eqv_class_mem {c : Set (Set α)} (H : ∀ a, ∃! (b : _) (_ : b ∈ c),
 #align setoid.eqv_class_mem Setoid.eqv_class_mem
 -/
 
-/- ./././Mathport/Syntax/Translate/Basic.lean:638:2: warning: expanding binder collection (b «expr ∈ » c) -/
+/- ./././Mathport/Syntax/Translate/Basic.lean:635:2: warning: expanding binder collection (b «expr ∈ » c) -/
 #print Setoid.eqv_class_mem' /-
 theorem eqv_class_mem' {c : Set (Set α)} (H : ∀ a, ∃! (b : _) (_ : b ∈ c), a ∈ b) {x} :
     {y : α | (mkClasses c H).Rel x y} ∈ c := by convert Setoid.eqv_class_mem H; ext;
@@ -188,7 +185,7 @@ theorem eqv_class_mem' {c : Set (Set α)} (H : ∀ a, ∃! (b : _) (_ : b ∈ c)
 #align setoid.eqv_class_mem' Setoid.eqv_class_mem'
 -/
 
-/- ./././Mathport/Syntax/Translate/Basic.lean:638:2: warning: expanding binder collection (b «expr ∈ » c) -/
+/- ./././Mathport/Syntax/Translate/Basic.lean:635:2: warning: expanding binder collection (b «expr ∈ » c) -/
 #print Setoid.eqv_classes_disjoint /-
 /-- Distinct elements of a set of sets partitioning α are disjoint. -/
 theorem eqv_classes_disjoint {c : Set (Set α)} (H : ∀ a, ∃! (b : _) (_ : b ∈ c), a ∈ b) :
@@ -198,7 +195,7 @@ theorem eqv_classes_disjoint {c : Set (Set α)} (H : ∀ a, ∃! (b : _) (_ : b
 #align setoid.eqv_classes_disjoint Setoid.eqv_classes_disjoint
 -/
 
-/- ./././Mathport/Syntax/Translate/Basic.lean:638:2: warning: expanding binder collection (b «expr ∈ » c) -/
+/- ./././Mathport/Syntax/Translate/Basic.lean:635:2: warning: expanding binder collection (b «expr ∈ » c) -/
 #print Setoid.eqv_classes_of_disjoint_union /-
 /-- A set of disjoint sets covering α partition α (classical). -/
 theorem eqv_classes_of_disjoint_union {c : Set (Set α)} (hu : Set.sUnion c = @Set.univ α)
@@ -235,7 +232,7 @@ theorem sUnion_classes (r : Setoid α) : ⋃₀ r.classes = Set.univ :=
 
 section Partition
 
-/- ./././Mathport/Syntax/Translate/Basic.lean:638:2: warning: expanding binder collection (b «expr ∈ » c) -/
+/- ./././Mathport/Syntax/Translate/Basic.lean:635:2: warning: expanding binder collection (b «expr ∈ » c) -/
 #print Setoid.IsPartition /-
 /-- A collection `c : set (set α)` of sets is a partition of `α` into pairwise
 disjoint sets if `∅ ∉ c` and each element `a : α` belongs to a unique set `b ∈ c`. -/
Diff
@@ -94,15 +94,19 @@ theorem classes_ker_subset_fiber_set {β : Type _} (f : α → β) :
 #align setoid.classes_ker_subset_fiber_set Setoid.classes_ker_subset_fiber_set
 -/
 
+#print Setoid.finite_classes_ker /-
 theorem finite_classes_ker {α β : Type _} [Finite β] (f : α → β) : (Setoid.ker f).classes.Finite :=
   (Set.finite_range _).Subset <| classes_ker_subset_fiber_set f
 #align setoid.finite_classes_ker Setoid.finite_classes_ker
+-/
 
+#print Setoid.card_classes_ker_le /-
 theorem card_classes_ker_le {α β : Type _} [Fintype β] (f : α → β)
     [Fintype (Setoid.ker f).classes] : Fintype.card (Setoid.ker f).classes ≤ Fintype.card β := by
   classical exact
     le_trans (Set.card_le_of_subset (classes_ker_subset_fiber_set f)) (Fintype.card_range_le _)
 #align setoid.card_classes_ker_le Setoid.card_classes_ker_le
+-/
 
 #print Setoid.eq_iff_classes_eq /-
 /-- Two equivalence relations are equal iff all their equivalence classes are equal. -/
@@ -111,10 +115,12 @@ theorem eq_iff_classes_eq {r₁ r₂ : Setoid α} : r₁ = r₂ ↔ ∀ x, {y |
 #align setoid.eq_iff_classes_eq Setoid.eq_iff_classes_eq
 -/
 
+#print Setoid.rel_iff_exists_classes /-
 theorem rel_iff_exists_classes (r : Setoid α) {x y} : r.Rel x y ↔ ∃ c ∈ r.classes, x ∈ c ∧ y ∈ c :=
   ⟨fun h => ⟨_, r.mem_classes y, h, r.refl' y⟩, fun ⟨c, ⟨z, hz⟩, hx, hy⟩ => by subst c;
     exact r.trans' hx (r.symm' hy)⟩
 #align setoid.rel_iff_exists_classes Setoid.rel_iff_exists_classes
+-/
 
 #print Setoid.classes_inj /-
 /-- Two equivalence relations are equal iff their equivalence classes are equal. -/
@@ -183,26 +189,32 @@ theorem eqv_class_mem' {c : Set (Set α)} (H : ∀ a, ∃! (b : _) (_ : b ∈ c)
 -/
 
 /- ./././Mathport/Syntax/Translate/Basic.lean:638:2: warning: expanding binder collection (b «expr ∈ » c) -/
+#print Setoid.eqv_classes_disjoint /-
 /-- Distinct elements of a set of sets partitioning α are disjoint. -/
 theorem eqv_classes_disjoint {c : Set (Set α)} (H : ∀ a, ∃! (b : _) (_ : b ∈ c), a ∈ b) :
     c.PairwiseDisjoint id := fun b₁ h₁ b₂ h₂ h =>
   Set.disjoint_left.2 fun x hx1 hx2 =>
     (H x).elim₂ fun b hc hx hb => h <| eq_of_mem_eqv_class H h₁ hx1 h₂ hx2
 #align setoid.eqv_classes_disjoint Setoid.eqv_classes_disjoint
+-/
 
 /- ./././Mathport/Syntax/Translate/Basic.lean:638:2: warning: expanding binder collection (b «expr ∈ » c) -/
+#print Setoid.eqv_classes_of_disjoint_union /-
 /-- A set of disjoint sets covering α partition α (classical). -/
 theorem eqv_classes_of_disjoint_union {c : Set (Set α)} (hu : Set.sUnion c = @Set.univ α)
     (H : c.PairwiseDisjoint id) (a) : ∃! (b : _) (_ : b ∈ c), a ∈ b :=
   let ⟨b, hc, ha⟩ := Set.mem_sUnion.1 <| show a ∈ _ by rw [hu] <;> exact Set.mem_univ a
   ExistsUnique.intro₂ b hc ha fun b' hc' ha' => H.elim_set hc' hc a ha' ha
 #align setoid.eqv_classes_of_disjoint_union Setoid.eqv_classes_of_disjoint_union
+-/
 
+#print Setoid.setoidOfDisjointUnion /-
 /-- Makes an equivalence relation from a set of disjoints sets covering α. -/
 def setoidOfDisjointUnion {c : Set (Set α)} (hu : Set.sUnion c = @Set.univ α)
     (H : c.PairwiseDisjoint id) : Setoid α :=
   Setoid.mkClasses c <| eqv_classes_of_disjoint_union hu H
 #align setoid.setoid_of_disjoint_union Setoid.setoidOfDisjointUnion
+-/
 
 #print Setoid.mkClasses_classes /-
 /-- The equivalence relation made from the equivalence classes of an equivalence
@@ -246,10 +258,12 @@ theorem isPartition_classes (r : Setoid α) : IsPartition r.classes :=
 #align setoid.is_partition_classes Setoid.isPartition_classes
 -/
 
+#print Setoid.IsPartition.pairwiseDisjoint /-
 theorem IsPartition.pairwiseDisjoint {c : Set (Set α)} (hc : IsPartition c) :
     c.PairwiseDisjoint id :=
   eqv_classes_disjoint hc.2
 #align setoid.is_partition.pairwise_disjoint Setoid.IsPartition.pairwiseDisjoint
+-/
 
 #print Setoid.IsPartition.sUnion_eq_univ /-
 theorem IsPartition.sUnion_eq_univ {c : Set (Set α)} (hc : IsPartition c) : ⋃₀ c = Set.univ :=
@@ -337,6 +351,7 @@ instance Partition.completeLattice : CompleteLattice (Subtype (@IsPartition α))
 
 end Partition
 
+#print Setoid.IsPartition.finpartition /-
 /-- A finite setoid partition furnishes a finpartition -/
 @[simps]
 def IsPartition.finpartition {c : Finset (Set α)} (hc : Setoid.IsPartition (c : Set (Set α))) :
@@ -346,9 +361,11 @@ def IsPartition.finpartition {c : Finset (Set α)} (hc : Setoid.IsPartition (c :
   supParts := c.sup_id_set_eq_sUnion.trans hc.sUnion_eq_univ
   not_bot_mem := hc.left
 #align setoid.is_partition.finpartition Setoid.IsPartition.finpartition
+-/
 
 end Setoid
 
+#print Finpartition.isPartition_parts /-
 /-- A finpartition gives rise to a setoid partition -/
 theorem Finpartition.isPartition_parts {α} (f : Finpartition (Set.univ : Set α)) :
     Setoid.IsPartition (f.parts : Set (Set α)) :=
@@ -356,6 +373,7 @@ theorem Finpartition.isPartition_parts {α} (f : Finpartition (Set.univ : Set α
     Setoid.eqv_classes_of_disjoint_union (f.parts.sup_id_set_eq_sUnion.symm.trans f.supParts)
       f.SupIndep.PairwiseDisjoint⟩
 #align finpartition.is_partition_parts Finpartition.isPartition_parts
+-/
 
 #print IndexedPartition /-
 /-- Constructive information associated with a partition of a type `α` indexed by another type `ι`,
@@ -375,6 +393,7 @@ structure IndexedPartition {ι α : Type _} (s : ι → Set α) where
 #align indexed_partition IndexedPartition
 -/
 
+#print IndexedPartition.mk' /-
 /-- The non-constructive constructor for `indexed_partition`. -/
 noncomputable def IndexedPartition.mk' {ι α : Type _} (s : ι → Set α)
     (dis : ∀ i j, i ≠ j → Disjoint (s i) (s j)) (nonempty : ∀ i, (s i).Nonempty)
@@ -386,6 +405,7 @@ noncomputable def IndexedPartition.mk' {ι α : Type _} (s : ι → Set α)
   index x := (ex x).some
   mem_index x := (ex x).choose_spec
 #align indexed_partition.mk' IndexedPartition.mk'
+-/
 
 namespace IndexedPartition
 
@@ -403,20 +423,22 @@ instance [Unique ι] [Inhabited α] : Inhabited (IndexedPartition fun i : ι =>
 
 attribute [simp] some_mem mem_index
 
-include hs
-
+#print IndexedPartition.exists_mem /-
 theorem exists_mem (x : α) : ∃ i, x ∈ s i :=
   ⟨hs.index x, hs.mem_index x⟩
 #align indexed_partition.exists_mem IndexedPartition.exists_mem
+-/
 
 #print IndexedPartition.iUnion /-
 theorem iUnion : (⋃ i, s i) = univ := by ext x; simp [hs.exists_mem x]
 #align indexed_partition.Union IndexedPartition.iUnion
 -/
 
+#print IndexedPartition.disjoint /-
 theorem disjoint : ∀ {i j}, i ≠ j → Disjoint (s i) (s j) := fun i j h =>
   disjoint_left.mpr fun x hxi hxj => h (hs.eq_of_mem hxi hxj)
 #align indexed_partition.disjoint IndexedPartition.disjoint
+-/
 
 #print IndexedPartition.mem_iff_index_eq /-
 theorem mem_iff_index_eq {x i} : x ∈ s i ↔ hs.index x = i :=
@@ -438,10 +460,12 @@ protected abbrev setoid (hs : IndexedPartition s) : Setoid α :=
 #align indexed_partition.setoid IndexedPartition.setoid
 -/
 
+#print IndexedPartition.index_some /-
 @[simp]
 theorem index_some (i : ι) : hs.index (hs.some i) = i :=
   (mem_iff_index_eq _).1 <| hs.some_mem i
 #align indexed_partition.index_some IndexedPartition.index_some
+-/
 
 #print IndexedPartition.some_index /-
 theorem some_index (x : α) : hs.Setoid.Rel (hs.some (hs.index x)) x :=
@@ -494,10 +518,12 @@ theorem equivQuotient_index_apply (x : α) : hs.equivQuotient (hs.index x) = hs.
 #align indexed_partition.equiv_quotient_index_apply IndexedPartition.equivQuotient_index_apply
 -/
 
+#print IndexedPartition.equivQuotient_symm_proj_apply /-
 @[simp]
 theorem equivQuotient_symm_proj_apply (x : α) : hs.equivQuotient.symm (hs.proj x) = hs.index x :=
   rfl
 #align indexed_partition.equiv_quotient_symm_proj_apply IndexedPartition.equivQuotient_symm_proj_apply
+-/
 
 #print IndexedPartition.equivQuotient_index /-
 theorem equivQuotient_index : hs.equivQuotient ∘ hs.index = hs.proj :=
@@ -521,16 +547,20 @@ theorem out_proj (x : α) : hs.out (hs.proj x) = hs.some (hs.index x) :=
 #align indexed_partition.out_proj IndexedPartition.out_proj
 -/
 
+#print IndexedPartition.index_out' /-
 /-- The indices of `quotient.out'` and `indexed_partition.out` are equal. -/
 theorem index_out' (x : hs.Quotient) : hs.index x.out' = hs.index (hs.out x) :=
   Quotient.inductionOn' x fun x => (Setoid.ker_apply_mk_out' x).trans (hs.index_some _).symm
 #align indexed_partition.index_out' IndexedPartition.index_out'
+-/
 
+#print IndexedPartition.proj_out /-
 /-- This lemma is analogous to `quotient.out_eq'`. -/
 @[simp]
 theorem proj_out (x : hs.Quotient) : hs.proj (hs.out x) = x :=
   Quotient.inductionOn' x fun x => Quotient.sound' <| hs.some_index x
 #align indexed_partition.proj_out IndexedPartition.proj_out
+-/
 
 #print IndexedPartition.class_of /-
 theorem class_of {x : α} : setOf (hs.Setoid.Rel x) = s (hs.index x) :=
@@ -538,12 +568,14 @@ theorem class_of {x : α} : setOf (hs.Setoid.Rel x) = s (hs.index x) :=
 #align indexed_partition.class_of IndexedPartition.class_of
 -/
 
+#print IndexedPartition.proj_fiber /-
 theorem proj_fiber (x : hs.Quotient) : hs.proj ⁻¹' {x} = s (hs.equivQuotient.symm x) :=
   Quotient.inductionOn' x fun x => by
     ext y
     simp only [Set.mem_preimage, Set.mem_singleton_iff, hs.mem_iff_index_eq]
     exact Quotient.eq''
 #align indexed_partition.proj_fiber IndexedPartition.proj_fiber
+-/
 
 end IndexedPartition
 
Diff
@@ -47,7 +47,7 @@ namespace Setoid
 
 variable {α : Type _}
 
-/- ./././Mathport/Syntax/Translate/Basic.lean:635:2: warning: expanding binder collection (b «expr ∈ » c) -/
+/- ./././Mathport/Syntax/Translate/Basic.lean:638:2: warning: expanding binder collection (b «expr ∈ » c) -/
 #print Setoid.eq_of_mem_eqv_class /-
 /-- If x ∈ α is in 2 elements of a set of sets partitioning α, those 2 sets are equal. -/
 theorem eq_of_mem_eqv_class {c : Set (Set α)} (H : ∀ a, ∃! (b : _) (_ : b ∈ c), a ∈ b) {x b b'}
@@ -56,7 +56,7 @@ theorem eq_of_mem_eqv_class {c : Set (Set α)} (H : ∀ a, ∃! (b : _) (_ : b 
 #align setoid.eq_of_mem_eqv_class Setoid.eq_of_mem_eqv_class
 -/
 
-/- ./././Mathport/Syntax/Translate/Basic.lean:635:2: warning: expanding binder collection (b «expr ∈ » c) -/
+/- ./././Mathport/Syntax/Translate/Basic.lean:638:2: warning: expanding binder collection (b «expr ∈ » c) -/
 #print Setoid.mkClasses /-
 /-- Makes an equivalence relation from a set of sets partitioning α. -/
 def mkClasses (c : Set (Set α)) (H : ∀ a, ∃! (b : _) (_ : b ∈ c), a ∈ b) : Setoid α :=
@@ -130,7 +130,7 @@ theorem empty_not_mem_classes {r : Setoid α} : ∅ ∉ r.classes := fun ⟨y, h
 #align setoid.empty_not_mem_classes Setoid.empty_not_mem_classes
 -/
 
-/- ./././Mathport/Syntax/Translate/Basic.lean:635:2: warning: expanding binder collection (b «expr ∈ » r.classes) -/
+/- ./././Mathport/Syntax/Translate/Basic.lean:638:2: warning: expanding binder collection (b «expr ∈ » r.classes) -/
 #print Setoid.classes_eqv_classes /-
 /-- Equivalence classes partition the type. -/
 theorem classes_eqv_classes {r : Setoid α} (a) : ∃! (b : _) (_ : b ∈ r.classes), a ∈ b :=
@@ -150,7 +150,7 @@ theorem eq_of_mem_classes {r : Setoid α} {x b} (hc : b ∈ r.classes) (hb : x 
 #align setoid.eq_of_mem_classes Setoid.eq_of_mem_classes
 -/
 
-/- ./././Mathport/Syntax/Translate/Basic.lean:635:2: warning: expanding binder collection (b «expr ∈ » c) -/
+/- ./././Mathport/Syntax/Translate/Basic.lean:638:2: warning: expanding binder collection (b «expr ∈ » c) -/
 #print Setoid.eq_eqv_class_of_mem /-
 /-- The elements of a set of sets partitioning α are the equivalence classes of the
     equivalence relation defined by the set of sets. -/
@@ -164,7 +164,7 @@ theorem eq_eqv_class_of_mem {c : Set (Set α)} (H : ∀ a, ∃! (b : _) (_ : b 
 #align setoid.eq_eqv_class_of_mem Setoid.eq_eqv_class_of_mem
 -/
 
-/- ./././Mathport/Syntax/Translate/Basic.lean:635:2: warning: expanding binder collection (b «expr ∈ » c) -/
+/- ./././Mathport/Syntax/Translate/Basic.lean:638:2: warning: expanding binder collection (b «expr ∈ » c) -/
 #print Setoid.eqv_class_mem /-
 /-- The equivalence classes of the equivalence relation defined by a set of sets
     partitioning α are elements of the set of sets. -/
@@ -174,7 +174,7 @@ theorem eqv_class_mem {c : Set (Set α)} (H : ∀ a, ∃! (b : _) (_ : b ∈ c),
 #align setoid.eqv_class_mem Setoid.eqv_class_mem
 -/
 
-/- ./././Mathport/Syntax/Translate/Basic.lean:635:2: warning: expanding binder collection (b «expr ∈ » c) -/
+/- ./././Mathport/Syntax/Translate/Basic.lean:638:2: warning: expanding binder collection (b «expr ∈ » c) -/
 #print Setoid.eqv_class_mem' /-
 theorem eqv_class_mem' {c : Set (Set α)} (H : ∀ a, ∃! (b : _) (_ : b ∈ c), a ∈ b) {x} :
     {y : α | (mkClasses c H).Rel x y} ∈ c := by convert Setoid.eqv_class_mem H; ext;
@@ -182,7 +182,7 @@ theorem eqv_class_mem' {c : Set (Set α)} (H : ∀ a, ∃! (b : _) (_ : b ∈ c)
 #align setoid.eqv_class_mem' Setoid.eqv_class_mem'
 -/
 
-/- ./././Mathport/Syntax/Translate/Basic.lean:635:2: warning: expanding binder collection (b «expr ∈ » c) -/
+/- ./././Mathport/Syntax/Translate/Basic.lean:638:2: warning: expanding binder collection (b «expr ∈ » c) -/
 /-- Distinct elements of a set of sets partitioning α are disjoint. -/
 theorem eqv_classes_disjoint {c : Set (Set α)} (H : ∀ a, ∃! (b : _) (_ : b ∈ c), a ∈ b) :
     c.PairwiseDisjoint id := fun b₁ h₁ b₂ h₂ h =>
@@ -190,7 +190,7 @@ theorem eqv_classes_disjoint {c : Set (Set α)} (H : ∀ a, ∃! (b : _) (_ : b
     (H x).elim₂ fun b hc hx hb => h <| eq_of_mem_eqv_class H h₁ hx1 h₂ hx2
 #align setoid.eqv_classes_disjoint Setoid.eqv_classes_disjoint
 
-/- ./././Mathport/Syntax/Translate/Basic.lean:635:2: warning: expanding binder collection (b «expr ∈ » c) -/
+/- ./././Mathport/Syntax/Translate/Basic.lean:638:2: warning: expanding binder collection (b «expr ∈ » c) -/
 /-- A set of disjoint sets covering α partition α (classical). -/
 theorem eqv_classes_of_disjoint_union {c : Set (Set α)} (hu : Set.sUnion c = @Set.univ α)
     (H : c.PairwiseDisjoint id) (a) : ∃! (b : _) (_ : b ∈ c), a ∈ b :=
@@ -223,7 +223,7 @@ theorem sUnion_classes (r : Setoid α) : ⋃₀ r.classes = Set.univ :=
 
 section Partition
 
-/- ./././Mathport/Syntax/Translate/Basic.lean:635:2: warning: expanding binder collection (b «expr ∈ » c) -/
+/- ./././Mathport/Syntax/Translate/Basic.lean:638:2: warning: expanding binder collection (b «expr ∈ » c) -/
 #print Setoid.IsPartition /-
 /-- A collection `c : set (set α)` of sets is a partition of `α` into pairwise
 disjoint sets if `∅ ∉ c` and each element `a : α` belongs to a unique set `b ∈ c`. -/
Diff
@@ -77,19 +77,19 @@ def mkClasses (c : Set (Set α)) (H : ∀ a, ∃! (b : _) (_ : b ∈ c), a ∈ b
 #print Setoid.classes /-
 /-- Makes the equivalence classes of an equivalence relation. -/
 def classes (r : Setoid α) : Set (Set α) :=
-  { s | ∃ y, s = { x | r.Rel x y } }
+  {s | ∃ y, s = {x | r.Rel x y}}
 #align setoid.classes Setoid.classes
 -/
 
 #print Setoid.mem_classes /-
-theorem mem_classes (r : Setoid α) (y) : { x | r.Rel x y } ∈ r.classes :=
+theorem mem_classes (r : Setoid α) (y) : {x | r.Rel x y} ∈ r.classes :=
   ⟨y, rfl⟩
 #align setoid.mem_classes Setoid.mem_classes
 -/
 
 #print Setoid.classes_ker_subset_fiber_set /-
 theorem classes_ker_subset_fiber_set {β : Type _} (f : α → β) :
-    (Setoid.ker f).classes ⊆ Set.range fun y => { x | f x = y } := by rintro s ⟨x, rfl⟩;
+    (Setoid.ker f).classes ⊆ Set.range fun y => {x | f x = y} := by rintro s ⟨x, rfl⟩;
   rw [Set.mem_range]; exact ⟨f x, rfl⟩
 #align setoid.classes_ker_subset_fiber_set Setoid.classes_ker_subset_fiber_set
 -/
@@ -101,13 +101,12 @@ theorem finite_classes_ker {α β : Type _} [Finite β] (f : α → β) : (Setoi
 theorem card_classes_ker_le {α β : Type _} [Fintype β] (f : α → β)
     [Fintype (Setoid.ker f).classes] : Fintype.card (Setoid.ker f).classes ≤ Fintype.card β := by
   classical exact
-      le_trans (Set.card_le_of_subset (classes_ker_subset_fiber_set f)) (Fintype.card_range_le _)
+    le_trans (Set.card_le_of_subset (classes_ker_subset_fiber_set f)) (Fintype.card_range_le _)
 #align setoid.card_classes_ker_le Setoid.card_classes_ker_le
 
 #print Setoid.eq_iff_classes_eq /-
 /-- Two equivalence relations are equal iff all their equivalence classes are equal. -/
-theorem eq_iff_classes_eq {r₁ r₂ : Setoid α} :
-    r₁ = r₂ ↔ ∀ x, { y | r₁.Rel x y } = { y | r₂.Rel x y } :=
+theorem eq_iff_classes_eq {r₁ r₂ : Setoid α} : r₁ = r₂ ↔ ∀ x, {y | r₁.Rel x y} = {y | r₂.Rel x y} :=
   ⟨fun h x => h ▸ rfl, fun h => ext' fun x => Set.ext_iff.1 <| h x⟩
 #align setoid.eq_iff_classes_eq Setoid.eq_iff_classes_eq
 -/
@@ -135,7 +134,7 @@ theorem empty_not_mem_classes {r : Setoid α} : ∅ ∉ r.classes := fun ⟨y, h
 #print Setoid.classes_eqv_classes /-
 /-- Equivalence classes partition the type. -/
 theorem classes_eqv_classes {r : Setoid α} (a) : ∃! (b : _) (_ : b ∈ r.classes), a ∈ b :=
-  ExistsUnique.intro₂ { x | r.Rel x a } (r.mem_classes a) (r.refl' _) <|
+  ExistsUnique.intro₂ {x | r.Rel x a} (r.mem_classes a) (r.refl' _) <|
     by
     rintro _ ⟨y, rfl⟩ ha
     ext x
@@ -156,7 +155,7 @@ theorem eq_of_mem_classes {r : Setoid α} {x b} (hc : b ∈ r.classes) (hb : x 
 /-- The elements of a set of sets partitioning α are the equivalence classes of the
     equivalence relation defined by the set of sets. -/
 theorem eq_eqv_class_of_mem {c : Set (Set α)} (H : ∀ a, ∃! (b : _) (_ : b ∈ c), a ∈ b) {s y}
-    (hs : s ∈ c) (hy : y ∈ s) : s = { x | (mkClasses c H).Rel x y } :=
+    (hs : s ∈ c) (hy : y ∈ s) : s = {x | (mkClasses c H).Rel x y} :=
   Set.ext fun x =>
     ⟨fun hs' => symm' (mkClasses c H) fun b' hb' h' => eq_of_mem_eqv_class H hs hy hb' h' ▸ hs',
       fun hx =>
@@ -170,7 +169,7 @@ theorem eq_eqv_class_of_mem {c : Set (Set α)} (H : ∀ a, ∃! (b : _) (_ : b 
 /-- The equivalence classes of the equivalence relation defined by a set of sets
     partitioning α are elements of the set of sets. -/
 theorem eqv_class_mem {c : Set (Set α)} (H : ∀ a, ∃! (b : _) (_ : b ∈ c), a ∈ b) {y} :
-    { x | (mkClasses c H).Rel x y } ∈ c :=
+    {x | (mkClasses c H).Rel x y} ∈ c :=
   (H y).elim₂ fun b hc hy hb => eq_eqv_class_of_mem H hc hy ▸ hc
 #align setoid.eqv_class_mem Setoid.eqv_class_mem
 -/
@@ -178,7 +177,7 @@ theorem eqv_class_mem {c : Set (Set α)} (H : ∀ a, ∃! (b : _) (_ : b ∈ c),
 /- ./././Mathport/Syntax/Translate/Basic.lean:635:2: warning: expanding binder collection (b «expr ∈ » c) -/
 #print Setoid.eqv_class_mem' /-
 theorem eqv_class_mem' {c : Set (Set α)} (H : ∀ a, ∃! (b : _) (_ : b ∈ c), a ∈ b) {x} :
-    { y : α | (mkClasses c H).Rel x y } ∈ c := by convert Setoid.eqv_class_mem H; ext;
+    {y : α | (mkClasses c H).Rel x y} ∈ c := by convert Setoid.eqv_class_mem H; ext;
   rw [Setoid.comm']
 #align setoid.eqv_class_mem' Setoid.eqv_class_mem'
 -/
@@ -210,7 +209,7 @@ def setoidOfDisjointUnion {c : Set (Set α)} (hu : Set.sUnion c = @Set.univ α)
     relation r equals r. -/
 theorem mkClasses_classes (r : Setoid α) : mkClasses r.classes classes_eqv_classes = r :=
   ext' fun x y =>
-    ⟨fun h => r.symm' (h { z | r.Rel z x } (r.mem_classes x) <| r.refl' x), fun h b hb hx =>
+    ⟨fun h => r.symm' (h {z | r.Rel z x} (r.mem_classes x) <| r.refl' x), fun h b hb hx =>
       eq_of_mem_classes (r.mem_classes x) (r.refl' x) hb hx ▸ r.symm' h⟩
 #align setoid.mk_classes_classes Setoid.mkClasses_classes
 -/
@@ -218,7 +217,7 @@ theorem mkClasses_classes (r : Setoid α) : mkClasses r.classes classes_eqv_clas
 #print Setoid.sUnion_classes /-
 @[simp]
 theorem sUnion_classes (r : Setoid α) : ⋃₀ r.classes = Set.univ :=
-  Set.eq_univ_of_forall fun x => Set.mem_sUnion.2 ⟨{ y | r.Rel y x }, ⟨x, rfl⟩, Setoid.refl _⟩
+  Set.eq_univ_of_forall fun x => Set.mem_sUnion.2 ⟨{y | r.Rel y x}, ⟨x, rfl⟩, Setoid.refl _⟩
 #align setoid.sUnion_classes Setoid.sUnion_classes
 -/
 
@@ -264,7 +263,7 @@ theorem IsPartition.sUnion_eq_univ {c : Set (Set α)} (hc : IsPartition c) : ⋃
 #print Setoid.exists_of_mem_partition /-
 /-- All elements of a partition of α are the equivalence class of some y ∈ α. -/
 theorem exists_of_mem_partition {c : Set (Set α)} (hc : IsPartition c) {s} (hs : s ∈ c) :
-    ∃ y, s = { x | (mkClasses c hc.2).Rel x y } :=
+    ∃ y, s = {x | (mkClasses c hc.2).Rel x y} :=
   let ⟨y, hy⟩ := nonempty_of_mem_partition hc hs
   ⟨y, eq_eqv_class_of_mem hc.2 hs hy⟩
 #align setoid.exists_of_mem_partition Setoid.exists_of_mem_partition
@@ -426,7 +425,7 @@ theorem mem_iff_index_eq {x i} : x ∈ s i ↔ hs.index x = i :=
 -/
 
 #print IndexedPartition.eq /-
-theorem eq (i) : s i = { x | hs.index x = i } :=
+theorem eq (i) : s i = {x | hs.index x = i} :=
   Set.ext fun _ => hs.mem_iff_index_eq
 #align indexed_partition.eq IndexedPartition.eq
 -/
Diff
@@ -50,7 +50,7 @@ variable {α : Type _}
 /- ./././Mathport/Syntax/Translate/Basic.lean:635:2: warning: expanding binder collection (b «expr ∈ » c) -/
 #print Setoid.eq_of_mem_eqv_class /-
 /-- If x ∈ α is in 2 elements of a set of sets partitioning α, those 2 sets are equal. -/
-theorem eq_of_mem_eqv_class {c : Set (Set α)} (H : ∀ a, ∃! (b : _)(_ : b ∈ c), a ∈ b) {x b b'}
+theorem eq_of_mem_eqv_class {c : Set (Set α)} (H : ∀ a, ∃! (b : _) (_ : b ∈ c), a ∈ b) {x b b'}
     (hc : b ∈ c) (hb : x ∈ b) (hc' : b' ∈ c) (hb' : x ∈ b') : b = b' :=
   (H x).unique₂ hc hb hc' hb'
 #align setoid.eq_of_mem_eqv_class Setoid.eq_of_mem_eqv_class
@@ -59,7 +59,7 @@ theorem eq_of_mem_eqv_class {c : Set (Set α)} (H : ∀ a, ∃! (b : _)(_ : b 
 /- ./././Mathport/Syntax/Translate/Basic.lean:635:2: warning: expanding binder collection (b «expr ∈ » c) -/
 #print Setoid.mkClasses /-
 /-- Makes an equivalence relation from a set of sets partitioning α. -/
-def mkClasses (c : Set (Set α)) (H : ∀ a, ∃! (b : _)(_ : b ∈ c), a ∈ b) : Setoid α :=
+def mkClasses (c : Set (Set α)) (H : ∀ a, ∃! (b : _) (_ : b ∈ c), a ∈ b) : Setoid α :=
   ⟨fun x y => ∀ s ∈ c, x ∈ s → y ∈ s,
     ⟨fun _ _ _ hx => hx, fun x y h s hs hy =>
       (H x).elim₂ fun t ht hx _ =>
@@ -134,7 +134,7 @@ theorem empty_not_mem_classes {r : Setoid α} : ∅ ∉ r.classes := fun ⟨y, h
 /- ./././Mathport/Syntax/Translate/Basic.lean:635:2: warning: expanding binder collection (b «expr ∈ » r.classes) -/
 #print Setoid.classes_eqv_classes /-
 /-- Equivalence classes partition the type. -/
-theorem classes_eqv_classes {r : Setoid α} (a) : ∃! (b : _)(_ : b ∈ r.classes), a ∈ b :=
+theorem classes_eqv_classes {r : Setoid α} (a) : ∃! (b : _) (_ : b ∈ r.classes), a ∈ b :=
   ExistsUnique.intro₂ { x | r.Rel x a } (r.mem_classes a) (r.refl' _) <|
     by
     rintro _ ⟨y, rfl⟩ ha
@@ -155,7 +155,7 @@ theorem eq_of_mem_classes {r : Setoid α} {x b} (hc : b ∈ r.classes) (hb : x 
 #print Setoid.eq_eqv_class_of_mem /-
 /-- The elements of a set of sets partitioning α are the equivalence classes of the
     equivalence relation defined by the set of sets. -/
-theorem eq_eqv_class_of_mem {c : Set (Set α)} (H : ∀ a, ∃! (b : _)(_ : b ∈ c), a ∈ b) {s y}
+theorem eq_eqv_class_of_mem {c : Set (Set α)} (H : ∀ a, ∃! (b : _) (_ : b ∈ c), a ∈ b) {s y}
     (hs : s ∈ c) (hy : y ∈ s) : s = { x | (mkClasses c H).Rel x y } :=
   Set.ext fun x =>
     ⟨fun hs' => symm' (mkClasses c H) fun b' hb' h' => eq_of_mem_eqv_class H hs hy hb' h' ▸ hs',
@@ -169,7 +169,7 @@ theorem eq_eqv_class_of_mem {c : Set (Set α)} (H : ∀ a, ∃! (b : _)(_ : b 
 #print Setoid.eqv_class_mem /-
 /-- The equivalence classes of the equivalence relation defined by a set of sets
     partitioning α are elements of the set of sets. -/
-theorem eqv_class_mem {c : Set (Set α)} (H : ∀ a, ∃! (b : _)(_ : b ∈ c), a ∈ b) {y} :
+theorem eqv_class_mem {c : Set (Set α)} (H : ∀ a, ∃! (b : _) (_ : b ∈ c), a ∈ b) {y} :
     { x | (mkClasses c H).Rel x y } ∈ c :=
   (H y).elim₂ fun b hc hy hb => eq_eqv_class_of_mem H hc hy ▸ hc
 #align setoid.eqv_class_mem Setoid.eqv_class_mem
@@ -177,7 +177,7 @@ theorem eqv_class_mem {c : Set (Set α)} (H : ∀ a, ∃! (b : _)(_ : b ∈ c),
 
 /- ./././Mathport/Syntax/Translate/Basic.lean:635:2: warning: expanding binder collection (b «expr ∈ » c) -/
 #print Setoid.eqv_class_mem' /-
-theorem eqv_class_mem' {c : Set (Set α)} (H : ∀ a, ∃! (b : _)(_ : b ∈ c), a ∈ b) {x} :
+theorem eqv_class_mem' {c : Set (Set α)} (H : ∀ a, ∃! (b : _) (_ : b ∈ c), a ∈ b) {x} :
     { y : α | (mkClasses c H).Rel x y } ∈ c := by convert Setoid.eqv_class_mem H; ext;
   rw [Setoid.comm']
 #align setoid.eqv_class_mem' Setoid.eqv_class_mem'
@@ -185,7 +185,7 @@ theorem eqv_class_mem' {c : Set (Set α)} (H : ∀ a, ∃! (b : _)(_ : b ∈ c),
 
 /- ./././Mathport/Syntax/Translate/Basic.lean:635:2: warning: expanding binder collection (b «expr ∈ » c) -/
 /-- Distinct elements of a set of sets partitioning α are disjoint. -/
-theorem eqv_classes_disjoint {c : Set (Set α)} (H : ∀ a, ∃! (b : _)(_ : b ∈ c), a ∈ b) :
+theorem eqv_classes_disjoint {c : Set (Set α)} (H : ∀ a, ∃! (b : _) (_ : b ∈ c), a ∈ b) :
     c.PairwiseDisjoint id := fun b₁ h₁ b₂ h₂ h =>
   Set.disjoint_left.2 fun x hx1 hx2 =>
     (H x).elim₂ fun b hc hx hb => h <| eq_of_mem_eqv_class H h₁ hx1 h₂ hx2
@@ -194,7 +194,7 @@ theorem eqv_classes_disjoint {c : Set (Set α)} (H : ∀ a, ∃! (b : _)(_ : b 
 /- ./././Mathport/Syntax/Translate/Basic.lean:635:2: warning: expanding binder collection (b «expr ∈ » c) -/
 /-- A set of disjoint sets covering α partition α (classical). -/
 theorem eqv_classes_of_disjoint_union {c : Set (Set α)} (hu : Set.sUnion c = @Set.univ α)
-    (H : c.PairwiseDisjoint id) (a) : ∃! (b : _)(_ : b ∈ c), a ∈ b :=
+    (H : c.PairwiseDisjoint id) (a) : ∃! (b : _) (_ : b ∈ c), a ∈ b :=
   let ⟨b, hc, ha⟩ := Set.mem_sUnion.1 <| show a ∈ _ by rw [hu] <;> exact Set.mem_univ a
   ExistsUnique.intro₂ b hc ha fun b' hc' ha' => H.elim_set hc' hc a ha' ha
 #align setoid.eqv_classes_of_disjoint_union Setoid.eqv_classes_of_disjoint_union
@@ -229,7 +229,7 @@ section Partition
 /-- A collection `c : set (set α)` of sets is a partition of `α` into pairwise
 disjoint sets if `∅ ∉ c` and each element `a : α` belongs to a unique set `b ∈ c`. -/
 def IsPartition (c : Set (Set α)) :=
-  ∅ ∉ c ∧ ∀ a, ∃! (b : _)(_ : b ∈ c), a ∈ b
+  ∅ ∉ c ∧ ∀ a, ∃! (b : _) (_ : b ∈ c), a ∈ b
 #align setoid.is_partition Setoid.IsPartition
 -/
 
@@ -257,7 +257,7 @@ theorem IsPartition.sUnion_eq_univ {c : Set (Set α)} (hc : IsPartition c) : ⋃
   Set.eq_univ_of_forall fun x =>
     Set.mem_sUnion.2 <|
       let ⟨t, ht⟩ := hc.2 x
-      ⟨t, by simp only [exists_unique_iff_exists] at ht; tauto⟩
+      ⟨t, by simp only [exists_unique_iff_exists] at ht ; tauto⟩
 #align setoid.is_partition.sUnion_eq_univ Setoid.IsPartition.sUnion_eq_univ
 -/
 
Diff
@@ -94,22 +94,10 @@ theorem classes_ker_subset_fiber_set {β : Type _} (f : α → β) :
 #align setoid.classes_ker_subset_fiber_set Setoid.classes_ker_subset_fiber_set
 -/
 
-/- warning: setoid.finite_classes_ker -> Setoid.finite_classes_ker is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : Finite.{succ u2} β] (f : α -> β), Set.Finite.{u1} (Set.{u1} α) (Setoid.classes.{u1} α (Setoid.ker.{u1, u2} α β f))
-but is expected to have type
-  forall {α : Type.{u2}} {β : Type.{u1}} [_inst_1 : Finite.{succ u1} β] (f : α -> β), Set.Finite.{u2} (Set.{u2} α) (Setoid.classes.{u2} α (Setoid.ker.{u2, u1} α β f))
-Case conversion may be inaccurate. Consider using '#align setoid.finite_classes_ker Setoid.finite_classes_kerₓ'. -/
 theorem finite_classes_ker {α β : Type _} [Finite β] (f : α → β) : (Setoid.ker f).classes.Finite :=
   (Set.finite_range _).Subset <| classes_ker_subset_fiber_set f
 #align setoid.finite_classes_ker Setoid.finite_classes_ker
 
-/- warning: setoid.card_classes_ker_le -> Setoid.card_classes_ker_le is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : Fintype.{u2} β] (f : α -> β) [_inst_2 : Fintype.{u1} (coeSort.{succ u1, succ (succ u1)} (Set.{u1} (Set.{u1} α)) Type.{u1} (Set.hasCoeToSort.{u1} (Set.{u1} α)) (Setoid.classes.{u1} α (Setoid.ker.{u1, u2} α β f)))], LE.le.{0} Nat Nat.hasLe (Fintype.card.{u1} (coeSort.{succ u1, succ (succ u1)} (Set.{u1} (Set.{u1} α)) Type.{u1} (Set.hasCoeToSort.{u1} (Set.{u1} α)) (Setoid.classes.{u1} α (Setoid.ker.{u1, u2} α β f))) _inst_2) (Fintype.card.{u2} β _inst_1)
-but is expected to have type
-  forall {α : Type.{u2}} {β : Type.{u1}} [_inst_1 : Fintype.{u1} β] (f : α -> β) [_inst_2 : Fintype.{u2} (Set.Elem.{u2} (Set.{u2} α) (Setoid.classes.{u2} α (Setoid.ker.{u2, u1} α β f)))], LE.le.{0} Nat instLENat (Fintype.card.{u2} (Set.Elem.{u2} (Set.{u2} α) (Setoid.classes.{u2} α (Setoid.ker.{u2, u1} α β f))) _inst_2) (Fintype.card.{u1} β _inst_1)
-Case conversion may be inaccurate. Consider using '#align setoid.card_classes_ker_le Setoid.card_classes_ker_leₓ'. -/
 theorem card_classes_ker_le {α β : Type _} [Fintype β] (f : α → β)
     [Fintype (Setoid.ker f).classes] : Fintype.card (Setoid.ker f).classes ≤ Fintype.card β := by
   classical exact
@@ -124,12 +112,6 @@ theorem eq_iff_classes_eq {r₁ r₂ : Setoid α} :
 #align setoid.eq_iff_classes_eq Setoid.eq_iff_classes_eq
 -/
 
-/- warning: setoid.rel_iff_exists_classes -> Setoid.rel_iff_exists_classes is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} (r : Setoid.{succ u1} α) {x : α} {y : α}, Iff (Setoid.Rel.{u1} α r x y) (Exists.{succ u1} (Set.{u1} α) (fun (c : Set.{u1} α) => Exists.{0} (Membership.Mem.{u1, u1} (Set.{u1} α) (Set.{u1} (Set.{u1} α)) (Set.hasMem.{u1} (Set.{u1} α)) c (Setoid.classes.{u1} α r)) (fun (H : Membership.Mem.{u1, u1} (Set.{u1} α) (Set.{u1} (Set.{u1} α)) (Set.hasMem.{u1} (Set.{u1} α)) c (Setoid.classes.{u1} α r)) => And (Membership.Mem.{u1, u1} α (Set.{u1} α) (Set.hasMem.{u1} α) x c) (Membership.Mem.{u1, u1} α (Set.{u1} α) (Set.hasMem.{u1} α) y c))))
-but is expected to have type
-  forall {α : Type.{u1}} (r : Setoid.{succ u1} α) {x : α} {y : α}, Iff (Setoid.Rel.{u1} α r x y) (Exists.{succ u1} (Set.{u1} α) (fun (c : Set.{u1} α) => And (Membership.mem.{u1, u1} (Set.{u1} α) (Set.{u1} (Set.{u1} α)) (Set.instMembershipSet.{u1} (Set.{u1} α)) c (Setoid.classes.{u1} α r)) (And (Membership.mem.{u1, u1} α (Set.{u1} α) (Set.instMembershipSet.{u1} α) x c) (Membership.mem.{u1, u1} α (Set.{u1} α) (Set.instMembershipSet.{u1} α) y c))))
-Case conversion may be inaccurate. Consider using '#align setoid.rel_iff_exists_classes Setoid.rel_iff_exists_classesₓ'. -/
 theorem rel_iff_exists_classes (r : Setoid α) {x y} : r.Rel x y ↔ ∃ c ∈ r.classes, x ∈ c ∧ y ∈ c :=
   ⟨fun h => ⟨_, r.mem_classes y, h, r.refl' y⟩, fun ⟨c, ⟨z, hz⟩, hx, hy⟩ => by subst c;
     exact r.trans' hx (r.symm' hy)⟩
@@ -201,12 +183,6 @@ theorem eqv_class_mem' {c : Set (Set α)} (H : ∀ a, ∃! (b : _)(_ : b ∈ c),
 #align setoid.eqv_class_mem' Setoid.eqv_class_mem'
 -/
 
-/- warning: setoid.eqv_classes_disjoint -> Setoid.eqv_classes_disjoint is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {c : Set.{u1} (Set.{u1} α)}, (forall (a : α), ExistsUnique.{succ u1} (Set.{u1} α) (fun (b : Set.{u1} α) => ExistsUnique.{0} (Membership.Mem.{u1, u1} (Set.{u1} α) (Set.{u1} (Set.{u1} α)) (Set.hasMem.{u1} (Set.{u1} α)) b c) (fun (H : Membership.Mem.{u1, u1} (Set.{u1} α) (Set.{u1} (Set.{u1} α)) (Set.hasMem.{u1} (Set.{u1} α)) b c) => Membership.Mem.{u1, u1} α (Set.{u1} α) (Set.hasMem.{u1} α) a b))) -> (Set.PairwiseDisjoint.{u1, u1} (Set.{u1} α) (Set.{u1} α) (CompleteSemilatticeInf.toPartialOrder.{u1} (Set.{u1} α) (CompleteLattice.toCompleteSemilatticeInf.{u1} (Set.{u1} α) (Order.Coframe.toCompleteLattice.{u1} (Set.{u1} α) (CompleteDistribLattice.toCoframe.{u1} (Set.{u1} α) (CompleteBooleanAlgebra.toCompleteDistribLattice.{u1} (Set.{u1} α) (Set.completeBooleanAlgebra.{u1} α)))))) (GeneralizedBooleanAlgebra.toOrderBot.{u1} (Set.{u1} α) (BooleanAlgebra.toGeneralizedBooleanAlgebra.{u1} (Set.{u1} α) (Set.booleanAlgebra.{u1} α))) c (id.{succ u1} (Set.{u1} α)))
-but is expected to have type
-  forall {α : Type.{u1}} {c : Set.{u1} (Set.{u1} α)}, (forall (a : α), ExistsUnique.{succ u1} (Set.{u1} α) (fun (b : Set.{u1} α) => ExistsUnique.{0} (Membership.mem.{u1, u1} (Set.{u1} α) (Set.{u1} (Set.{u1} α)) (Set.instMembershipSet.{u1} (Set.{u1} α)) b c) (fun (H : Membership.mem.{u1, u1} (Set.{u1} α) (Set.{u1} (Set.{u1} α)) (Set.instMembershipSet.{u1} (Set.{u1} α)) b c) => Membership.mem.{u1, u1} α (Set.{u1} α) (Set.instMembershipSet.{u1} α) a b))) -> (Set.PairwiseDisjoint.{u1, u1} (Set.{u1} α) (Set.{u1} α) (CompleteSemilatticeInf.toPartialOrder.{u1} (Set.{u1} α) (CompleteLattice.toCompleteSemilatticeInf.{u1} (Set.{u1} α) (Order.Coframe.toCompleteLattice.{u1} (Set.{u1} α) (CompleteDistribLattice.toCoframe.{u1} (Set.{u1} α) (CompleteBooleanAlgebra.toCompleteDistribLattice.{u1} (Set.{u1} α) (Set.instCompleteBooleanAlgebraSet.{u1} α)))))) (BoundedOrder.toOrderBot.{u1} (Set.{u1} α) (Preorder.toLE.{u1} (Set.{u1} α) (PartialOrder.toPreorder.{u1} (Set.{u1} α) (CompleteSemilatticeInf.toPartialOrder.{u1} (Set.{u1} α) (CompleteLattice.toCompleteSemilatticeInf.{u1} (Set.{u1} α) (Order.Coframe.toCompleteLattice.{u1} (Set.{u1} α) (CompleteDistribLattice.toCoframe.{u1} (Set.{u1} α) (CompleteBooleanAlgebra.toCompleteDistribLattice.{u1} (Set.{u1} α) (Set.instCompleteBooleanAlgebraSet.{u1} α)))))))) (CompleteLattice.toBoundedOrder.{u1} (Set.{u1} α) (Order.Coframe.toCompleteLattice.{u1} (Set.{u1} α) (CompleteDistribLattice.toCoframe.{u1} (Set.{u1} α) (CompleteBooleanAlgebra.toCompleteDistribLattice.{u1} (Set.{u1} α) (Set.instCompleteBooleanAlgebraSet.{u1} α)))))) c (id.{succ u1} (Set.{u1} α)))
-Case conversion may be inaccurate. Consider using '#align setoid.eqv_classes_disjoint Setoid.eqv_classes_disjointₓ'. -/
 /- ./././Mathport/Syntax/Translate/Basic.lean:635:2: warning: expanding binder collection (b «expr ∈ » c) -/
 /-- Distinct elements of a set of sets partitioning α are disjoint. -/
 theorem eqv_classes_disjoint {c : Set (Set α)} (H : ∀ a, ∃! (b : _)(_ : b ∈ c), a ∈ b) :
@@ -215,12 +191,6 @@ theorem eqv_classes_disjoint {c : Set (Set α)} (H : ∀ a, ∃! (b : _)(_ : b 
     (H x).elim₂ fun b hc hx hb => h <| eq_of_mem_eqv_class H h₁ hx1 h₂ hx2
 #align setoid.eqv_classes_disjoint Setoid.eqv_classes_disjoint
 
-/- warning: setoid.eqv_classes_of_disjoint_union -> Setoid.eqv_classes_of_disjoint_union is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {c : Set.{u1} (Set.{u1} α)}, (Eq.{succ u1} (Set.{u1} α) (Set.sUnion.{u1} α c) (Set.univ.{u1} α)) -> (Set.PairwiseDisjoint.{u1, u1} (Set.{u1} α) (Set.{u1} α) (CompleteSemilatticeInf.toPartialOrder.{u1} (Set.{u1} α) (CompleteLattice.toCompleteSemilatticeInf.{u1} (Set.{u1} α) (Order.Coframe.toCompleteLattice.{u1} (Set.{u1} α) (CompleteDistribLattice.toCoframe.{u1} (Set.{u1} α) (CompleteBooleanAlgebra.toCompleteDistribLattice.{u1} (Set.{u1} α) (Set.completeBooleanAlgebra.{u1} α)))))) (GeneralizedBooleanAlgebra.toOrderBot.{u1} (Set.{u1} α) (BooleanAlgebra.toGeneralizedBooleanAlgebra.{u1} (Set.{u1} α) (Set.booleanAlgebra.{u1} α))) c (id.{succ u1} (Set.{u1} α))) -> (forall (a : α), ExistsUnique.{succ u1} (Set.{u1} α) (fun (b : Set.{u1} α) => ExistsUnique.{0} (Membership.Mem.{u1, u1} (Set.{u1} α) (Set.{u1} (Set.{u1} α)) (Set.hasMem.{u1} (Set.{u1} α)) b c) (fun (H : Membership.Mem.{u1, u1} (Set.{u1} α) (Set.{u1} (Set.{u1} α)) (Set.hasMem.{u1} (Set.{u1} α)) b c) => Membership.Mem.{u1, u1} α (Set.{u1} α) (Set.hasMem.{u1} α) a b)))
-but is expected to have type
-  forall {α : Type.{u1}} {c : Set.{u1} (Set.{u1} α)}, (Eq.{succ u1} (Set.{u1} α) (Set.sUnion.{u1} α c) (Set.univ.{u1} α)) -> (Set.PairwiseDisjoint.{u1, u1} (Set.{u1} α) (Set.{u1} α) (CompleteSemilatticeInf.toPartialOrder.{u1} (Set.{u1} α) (CompleteLattice.toCompleteSemilatticeInf.{u1} (Set.{u1} α) (Order.Coframe.toCompleteLattice.{u1} (Set.{u1} α) (CompleteDistribLattice.toCoframe.{u1} (Set.{u1} α) (CompleteBooleanAlgebra.toCompleteDistribLattice.{u1} (Set.{u1} α) (Set.instCompleteBooleanAlgebraSet.{u1} α)))))) (BoundedOrder.toOrderBot.{u1} (Set.{u1} α) (Preorder.toLE.{u1} (Set.{u1} α) (PartialOrder.toPreorder.{u1} (Set.{u1} α) (CompleteSemilatticeInf.toPartialOrder.{u1} (Set.{u1} α) (CompleteLattice.toCompleteSemilatticeInf.{u1} (Set.{u1} α) (Order.Coframe.toCompleteLattice.{u1} (Set.{u1} α) (CompleteDistribLattice.toCoframe.{u1} (Set.{u1} α) (CompleteBooleanAlgebra.toCompleteDistribLattice.{u1} (Set.{u1} α) (Set.instCompleteBooleanAlgebraSet.{u1} α)))))))) (CompleteLattice.toBoundedOrder.{u1} (Set.{u1} α) (Order.Coframe.toCompleteLattice.{u1} (Set.{u1} α) (CompleteDistribLattice.toCoframe.{u1} (Set.{u1} α) (CompleteBooleanAlgebra.toCompleteDistribLattice.{u1} (Set.{u1} α) (Set.instCompleteBooleanAlgebraSet.{u1} α)))))) c (id.{succ u1} (Set.{u1} α))) -> (forall (a : α), ExistsUnique.{succ u1} (Set.{u1} α) (fun (b : Set.{u1} α) => ExistsUnique.{0} (Membership.mem.{u1, u1} (Set.{u1} α) (Set.{u1} (Set.{u1} α)) (Set.instMembershipSet.{u1} (Set.{u1} α)) b c) (fun (H : Membership.mem.{u1, u1} (Set.{u1} α) (Set.{u1} (Set.{u1} α)) (Set.instMembershipSet.{u1} (Set.{u1} α)) b c) => Membership.mem.{u1, u1} α (Set.{u1} α) (Set.instMembershipSet.{u1} α) a b)))
-Case conversion may be inaccurate. Consider using '#align setoid.eqv_classes_of_disjoint_union Setoid.eqv_classes_of_disjoint_unionₓ'. -/
 /- ./././Mathport/Syntax/Translate/Basic.lean:635:2: warning: expanding binder collection (b «expr ∈ » c) -/
 /-- A set of disjoint sets covering α partition α (classical). -/
 theorem eqv_classes_of_disjoint_union {c : Set (Set α)} (hu : Set.sUnion c = @Set.univ α)
@@ -229,12 +199,6 @@ theorem eqv_classes_of_disjoint_union {c : Set (Set α)} (hu : Set.sUnion c = @S
   ExistsUnique.intro₂ b hc ha fun b' hc' ha' => H.elim_set hc' hc a ha' ha
 #align setoid.eqv_classes_of_disjoint_union Setoid.eqv_classes_of_disjoint_union
 
-/- warning: setoid.setoid_of_disjoint_union -> Setoid.setoidOfDisjointUnion is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {c : Set.{u1} (Set.{u1} α)}, (Eq.{succ u1} (Set.{u1} α) (Set.sUnion.{u1} α c) (Set.univ.{u1} α)) -> (Set.PairwiseDisjoint.{u1, u1} (Set.{u1} α) (Set.{u1} α) (CompleteSemilatticeInf.toPartialOrder.{u1} (Set.{u1} α) (CompleteLattice.toCompleteSemilatticeInf.{u1} (Set.{u1} α) (Order.Coframe.toCompleteLattice.{u1} (Set.{u1} α) (CompleteDistribLattice.toCoframe.{u1} (Set.{u1} α) (CompleteBooleanAlgebra.toCompleteDistribLattice.{u1} (Set.{u1} α) (Set.completeBooleanAlgebra.{u1} α)))))) (GeneralizedBooleanAlgebra.toOrderBot.{u1} (Set.{u1} α) (BooleanAlgebra.toGeneralizedBooleanAlgebra.{u1} (Set.{u1} α) (Set.booleanAlgebra.{u1} α))) c (id.{succ u1} (Set.{u1} α))) -> (Setoid.{succ u1} α)
-but is expected to have type
-  forall {α : Type.{u1}} {c : Set.{u1} (Set.{u1} α)}, (Eq.{succ u1} (Set.{u1} α) (Set.sUnion.{u1} α c) (Set.univ.{u1} α)) -> (Set.PairwiseDisjoint.{u1, u1} (Set.{u1} α) (Set.{u1} α) (CompleteSemilatticeInf.toPartialOrder.{u1} (Set.{u1} α) (CompleteLattice.toCompleteSemilatticeInf.{u1} (Set.{u1} α) (Order.Coframe.toCompleteLattice.{u1} (Set.{u1} α) (CompleteDistribLattice.toCoframe.{u1} (Set.{u1} α) (CompleteBooleanAlgebra.toCompleteDistribLattice.{u1} (Set.{u1} α) (Set.instCompleteBooleanAlgebraSet.{u1} α)))))) (BoundedOrder.toOrderBot.{u1} (Set.{u1} α) (Preorder.toLE.{u1} (Set.{u1} α) (PartialOrder.toPreorder.{u1} (Set.{u1} α) (CompleteSemilatticeInf.toPartialOrder.{u1} (Set.{u1} α) (CompleteLattice.toCompleteSemilatticeInf.{u1} (Set.{u1} α) (Order.Coframe.toCompleteLattice.{u1} (Set.{u1} α) (CompleteDistribLattice.toCoframe.{u1} (Set.{u1} α) (CompleteBooleanAlgebra.toCompleteDistribLattice.{u1} (Set.{u1} α) (Set.instCompleteBooleanAlgebraSet.{u1} α)))))))) (CompleteLattice.toBoundedOrder.{u1} (Set.{u1} α) (Order.Coframe.toCompleteLattice.{u1} (Set.{u1} α) (CompleteDistribLattice.toCoframe.{u1} (Set.{u1} α) (CompleteBooleanAlgebra.toCompleteDistribLattice.{u1} (Set.{u1} α) (Set.instCompleteBooleanAlgebraSet.{u1} α)))))) c (id.{succ u1} (Set.{u1} α))) -> (Setoid.{succ u1} α)
-Case conversion may be inaccurate. Consider using '#align setoid.setoid_of_disjoint_union Setoid.setoidOfDisjointUnionₓ'. -/
 /-- Makes an equivalence relation from a set of disjoints sets covering α. -/
 def setoidOfDisjointUnion {c : Set (Set α)} (hu : Set.sUnion c = @Set.univ α)
     (H : c.PairwiseDisjoint id) : Setoid α :=
@@ -283,12 +247,6 @@ theorem isPartition_classes (r : Setoid α) : IsPartition r.classes :=
 #align setoid.is_partition_classes Setoid.isPartition_classes
 -/
 
-/- warning: setoid.is_partition.pairwise_disjoint -> Setoid.IsPartition.pairwiseDisjoint is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {c : Set.{u1} (Set.{u1} α)}, (Setoid.IsPartition.{u1} α c) -> (Set.PairwiseDisjoint.{u1, u1} (Set.{u1} α) (Set.{u1} α) (CompleteSemilatticeInf.toPartialOrder.{u1} (Set.{u1} α) (CompleteLattice.toCompleteSemilatticeInf.{u1} (Set.{u1} α) (Order.Coframe.toCompleteLattice.{u1} (Set.{u1} α) (CompleteDistribLattice.toCoframe.{u1} (Set.{u1} α) (CompleteBooleanAlgebra.toCompleteDistribLattice.{u1} (Set.{u1} α) (Set.completeBooleanAlgebra.{u1} α)))))) (GeneralizedBooleanAlgebra.toOrderBot.{u1} (Set.{u1} α) (BooleanAlgebra.toGeneralizedBooleanAlgebra.{u1} (Set.{u1} α) (Set.booleanAlgebra.{u1} α))) c (id.{succ u1} (Set.{u1} α)))
-but is expected to have type
-  forall {α : Type.{u1}} {c : Set.{u1} (Set.{u1} α)}, (Setoid.IsPartition.{u1} α c) -> (Set.PairwiseDisjoint.{u1, u1} (Set.{u1} α) (Set.{u1} α) (CompleteSemilatticeInf.toPartialOrder.{u1} (Set.{u1} α) (CompleteLattice.toCompleteSemilatticeInf.{u1} (Set.{u1} α) (Order.Coframe.toCompleteLattice.{u1} (Set.{u1} α) (CompleteDistribLattice.toCoframe.{u1} (Set.{u1} α) (CompleteBooleanAlgebra.toCompleteDistribLattice.{u1} (Set.{u1} α) (Set.instCompleteBooleanAlgebraSet.{u1} α)))))) (BoundedOrder.toOrderBot.{u1} (Set.{u1} α) (Preorder.toLE.{u1} (Set.{u1} α) (PartialOrder.toPreorder.{u1} (Set.{u1} α) (CompleteSemilatticeInf.toPartialOrder.{u1} (Set.{u1} α) (CompleteLattice.toCompleteSemilatticeInf.{u1} (Set.{u1} α) (Order.Coframe.toCompleteLattice.{u1} (Set.{u1} α) (CompleteDistribLattice.toCoframe.{u1} (Set.{u1} α) (CompleteBooleanAlgebra.toCompleteDistribLattice.{u1} (Set.{u1} α) (Set.instCompleteBooleanAlgebraSet.{u1} α)))))))) (CompleteLattice.toBoundedOrder.{u1} (Set.{u1} α) (Order.Coframe.toCompleteLattice.{u1} (Set.{u1} α) (CompleteDistribLattice.toCoframe.{u1} (Set.{u1} α) (CompleteBooleanAlgebra.toCompleteDistribLattice.{u1} (Set.{u1} α) (Set.instCompleteBooleanAlgebraSet.{u1} α)))))) c (id.{succ u1} (Set.{u1} α)))
-Case conversion may be inaccurate. Consider using '#align setoid.is_partition.pairwise_disjoint Setoid.IsPartition.pairwiseDisjointₓ'. -/
 theorem IsPartition.pairwiseDisjoint {c : Set (Set α)} (hc : IsPartition c) :
     c.PairwiseDisjoint id :=
   eqv_classes_disjoint hc.2
@@ -380,12 +338,6 @@ instance Partition.completeLattice : CompleteLattice (Subtype (@IsPartition α))
 
 end Partition
 
-/- warning: setoid.is_partition.finpartition -> Setoid.IsPartition.finpartition is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {c : Finset.{u1} (Set.{u1} α)}, (Setoid.IsPartition.{u1} α ((fun (a : Type.{u1}) (b : Type.{u1}) [self : HasLiftT.{succ u1, succ u1} a b] => self.0) (Finset.{u1} (Set.{u1} α)) (Set.{u1} (Set.{u1} α)) (HasLiftT.mk.{succ u1, succ u1} (Finset.{u1} (Set.{u1} α)) (Set.{u1} (Set.{u1} α)) (CoeTCₓ.coe.{succ u1, succ u1} (Finset.{u1} (Set.{u1} α)) (Set.{u1} (Set.{u1} α)) (Finset.Set.hasCoeT.{u1} (Set.{u1} α)))) c)) -> (Finpartition.{u1} (Set.{u1} α) (CompleteLattice.toLattice.{u1} (Set.{u1} α) (Order.Coframe.toCompleteLattice.{u1} (Set.{u1} α) (CompleteDistribLattice.toCoframe.{u1} (Set.{u1} α) (CompleteBooleanAlgebra.toCompleteDistribLattice.{u1} (Set.{u1} α) (Set.completeBooleanAlgebra.{u1} α))))) (GeneralizedBooleanAlgebra.toOrderBot.{u1} (Set.{u1} α) (BooleanAlgebra.toGeneralizedBooleanAlgebra.{u1} (Set.{u1} α) (Set.booleanAlgebra.{u1} α))) (Set.univ.{u1} α))
-but is expected to have type
-  forall {α : Type.{u1}} {c : Finset.{u1} (Set.{u1} α)}, (Setoid.IsPartition.{u1} α (Finset.toSet.{u1} (Set.{u1} α) c)) -> (Finpartition.{u1} (Set.{u1} α) (CompleteLattice.toLattice.{u1} (Set.{u1} α) (Order.Coframe.toCompleteLattice.{u1} (Set.{u1} α) (CompleteDistribLattice.toCoframe.{u1} (Set.{u1} α) (CompleteBooleanAlgebra.toCompleteDistribLattice.{u1} (Set.{u1} α) (Set.instCompleteBooleanAlgebraSet.{u1} α))))) (BoundedOrder.toOrderBot.{u1} (Set.{u1} α) (Preorder.toLE.{u1} (Set.{u1} α) (PartialOrder.toPreorder.{u1} (Set.{u1} α) (SemilatticeInf.toPartialOrder.{u1} (Set.{u1} α) (Lattice.toSemilatticeInf.{u1} (Set.{u1} α) (CompleteLattice.toLattice.{u1} (Set.{u1} α) (Order.Coframe.toCompleteLattice.{u1} (Set.{u1} α) (CompleteDistribLattice.toCoframe.{u1} (Set.{u1} α) (CompleteBooleanAlgebra.toCompleteDistribLattice.{u1} (Set.{u1} α) (Set.instCompleteBooleanAlgebraSet.{u1} α))))))))) (CompleteLattice.toBoundedOrder.{u1} (Set.{u1} α) (Order.Coframe.toCompleteLattice.{u1} (Set.{u1} α) (CompleteDistribLattice.toCoframe.{u1} (Set.{u1} α) (CompleteBooleanAlgebra.toCompleteDistribLattice.{u1} (Set.{u1} α) (Set.instCompleteBooleanAlgebraSet.{u1} α)))))) (Set.univ.{u1} α))
-Case conversion may be inaccurate. Consider using '#align setoid.is_partition.finpartition Setoid.IsPartition.finpartitionₓ'. -/
 /-- A finite setoid partition furnishes a finpartition -/
 @[simps]
 def IsPartition.finpartition {c : Finset (Set α)} (hc : Setoid.IsPartition (c : Set (Set α))) :
@@ -398,12 +350,6 @@ def IsPartition.finpartition {c : Finset (Set α)} (hc : Setoid.IsPartition (c :
 
 end Setoid
 
-/- warning: finpartition.is_partition_parts -> Finpartition.isPartition_parts is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} (f : Finpartition.{u1} (Set.{u1} α) (CompleteLattice.toLattice.{u1} (Set.{u1} α) (Order.Coframe.toCompleteLattice.{u1} (Set.{u1} α) (CompleteDistribLattice.toCoframe.{u1} (Set.{u1} α) (CompleteBooleanAlgebra.toCompleteDistribLattice.{u1} (Set.{u1} α) (Set.completeBooleanAlgebra.{u1} α))))) (GeneralizedBooleanAlgebra.toOrderBot.{u1} (Set.{u1} α) (BooleanAlgebra.toGeneralizedBooleanAlgebra.{u1} (Set.{u1} α) (Set.booleanAlgebra.{u1} α))) (Set.univ.{u1} α)), Setoid.IsPartition.{u1} α ((fun (a : Type.{u1}) (b : Type.{u1}) [self : HasLiftT.{succ u1, succ u1} a b] => self.0) (Finset.{u1} (Set.{u1} α)) (Set.{u1} (Set.{u1} α)) (HasLiftT.mk.{succ u1, succ u1} (Finset.{u1} (Set.{u1} α)) (Set.{u1} (Set.{u1} α)) (CoeTCₓ.coe.{succ u1, succ u1} (Finset.{u1} (Set.{u1} α)) (Set.{u1} (Set.{u1} α)) (Finset.Set.hasCoeT.{u1} (Set.{u1} α)))) (Finpartition.parts.{u1} (Set.{u1} α) (CompleteLattice.toLattice.{u1} (Set.{u1} α) (Order.Coframe.toCompleteLattice.{u1} (Set.{u1} α) (CompleteDistribLattice.toCoframe.{u1} (Set.{u1} α) (CompleteBooleanAlgebra.toCompleteDistribLattice.{u1} (Set.{u1} α) (Set.completeBooleanAlgebra.{u1} α))))) (GeneralizedBooleanAlgebra.toOrderBot.{u1} (Set.{u1} α) (BooleanAlgebra.toGeneralizedBooleanAlgebra.{u1} (Set.{u1} α) (Set.booleanAlgebra.{u1} α))) (Set.univ.{u1} α) f))
-but is expected to have type
-  forall {α : Type.{u1}} (f : Finpartition.{u1} (Set.{u1} α) (CompleteLattice.toLattice.{u1} (Set.{u1} α) (Order.Coframe.toCompleteLattice.{u1} (Set.{u1} α) (CompleteDistribLattice.toCoframe.{u1} (Set.{u1} α) (CompleteBooleanAlgebra.toCompleteDistribLattice.{u1} (Set.{u1} α) (Set.instCompleteBooleanAlgebraSet.{u1} α))))) (BoundedOrder.toOrderBot.{u1} (Set.{u1} α) (Preorder.toLE.{u1} (Set.{u1} α) (PartialOrder.toPreorder.{u1} (Set.{u1} α) (SemilatticeInf.toPartialOrder.{u1} (Set.{u1} α) (Lattice.toSemilatticeInf.{u1} (Set.{u1} α) (CompleteLattice.toLattice.{u1} (Set.{u1} α) (Order.Coframe.toCompleteLattice.{u1} (Set.{u1} α) (CompleteDistribLattice.toCoframe.{u1} (Set.{u1} α) (CompleteBooleanAlgebra.toCompleteDistribLattice.{u1} (Set.{u1} α) (Set.instCompleteBooleanAlgebraSet.{u1} α))))))))) (CompleteLattice.toBoundedOrder.{u1} (Set.{u1} α) (Order.Coframe.toCompleteLattice.{u1} (Set.{u1} α) (CompleteDistribLattice.toCoframe.{u1} (Set.{u1} α) (CompleteBooleanAlgebra.toCompleteDistribLattice.{u1} (Set.{u1} α) (Set.instCompleteBooleanAlgebraSet.{u1} α)))))) (Set.univ.{u1} α)), Setoid.IsPartition.{u1} α (Finset.toSet.{u1} (Set.{u1} α) (Finpartition.parts.{u1} (Set.{u1} α) (CompleteLattice.toLattice.{u1} (Set.{u1} α) (Order.Coframe.toCompleteLattice.{u1} (Set.{u1} α) (CompleteDistribLattice.toCoframe.{u1} (Set.{u1} α) (CompleteBooleanAlgebra.toCompleteDistribLattice.{u1} (Set.{u1} α) (Set.instCompleteBooleanAlgebraSet.{u1} α))))) (BoundedOrder.toOrderBot.{u1} (Set.{u1} α) (Preorder.toLE.{u1} (Set.{u1} α) (PartialOrder.toPreorder.{u1} (Set.{u1} α) (SemilatticeInf.toPartialOrder.{u1} (Set.{u1} α) (Lattice.toSemilatticeInf.{u1} (Set.{u1} α) (CompleteLattice.toLattice.{u1} (Set.{u1} α) (Order.Coframe.toCompleteLattice.{u1} (Set.{u1} α) (CompleteDistribLattice.toCoframe.{u1} (Set.{u1} α) (CompleteBooleanAlgebra.toCompleteDistribLattice.{u1} (Set.{u1} α) (Set.instCompleteBooleanAlgebraSet.{u1} α))))))))) (CompleteLattice.toBoundedOrder.{u1} (Set.{u1} α) (Order.Coframe.toCompleteLattice.{u1} (Set.{u1} α) (CompleteDistribLattice.toCoframe.{u1} (Set.{u1} α) (CompleteBooleanAlgebra.toCompleteDistribLattice.{u1} (Set.{u1} α) (Set.instCompleteBooleanAlgebraSet.{u1} α)))))) (Set.univ.{u1} α) f))
-Case conversion may be inaccurate. Consider using '#align finpartition.is_partition_parts Finpartition.isPartition_partsₓ'. -/
 /-- A finpartition gives rise to a setoid partition -/
 theorem Finpartition.isPartition_parts {α} (f : Finpartition (Set.univ : Set α)) :
     Setoid.IsPartition (f.parts : Set (Set α)) :=
@@ -430,12 +376,6 @@ structure IndexedPartition {ι α : Type _} (s : ι → Set α) where
 #align indexed_partition IndexedPartition
 -/
 
-/- warning: indexed_partition.mk' -> IndexedPartition.mk' is a dubious translation:
-lean 3 declaration is
-  forall {ι : Type.{u1}} {α : Type.{u2}} (s : ι -> (Set.{u2} α)), (forall (i : ι) (j : ι), (Ne.{succ u1} ι i j) -> (Disjoint.{u2} (Set.{u2} α) (CompleteSemilatticeInf.toPartialOrder.{u2} (Set.{u2} α) (CompleteLattice.toCompleteSemilatticeInf.{u2} (Set.{u2} α) (Order.Coframe.toCompleteLattice.{u2} (Set.{u2} α) (CompleteDistribLattice.toCoframe.{u2} (Set.{u2} α) (CompleteBooleanAlgebra.toCompleteDistribLattice.{u2} (Set.{u2} α) (Set.completeBooleanAlgebra.{u2} α)))))) (GeneralizedBooleanAlgebra.toOrderBot.{u2} (Set.{u2} α) (BooleanAlgebra.toGeneralizedBooleanAlgebra.{u2} (Set.{u2} α) (Set.booleanAlgebra.{u2} α))) (s i) (s j))) -> (forall (i : ι), Set.Nonempty.{u2} α (s i)) -> (forall (x : α), Exists.{succ u1} ι (fun (i : ι) => Membership.Mem.{u2, u2} α (Set.{u2} α) (Set.hasMem.{u2} α) x (s i))) -> (IndexedPartition.{u1, u2} ι α s)
-but is expected to have type
-  forall {ι : Type.{u1}} {α : Type.{u2}} (s : ι -> (Set.{u2} α)), (forall (i : ι) (j : ι), (Ne.{succ u1} ι i j) -> (Disjoint.{u2} (Set.{u2} α) (CompleteSemilatticeInf.toPartialOrder.{u2} (Set.{u2} α) (CompleteLattice.toCompleteSemilatticeInf.{u2} (Set.{u2} α) (Order.Coframe.toCompleteLattice.{u2} (Set.{u2} α) (CompleteDistribLattice.toCoframe.{u2} (Set.{u2} α) (CompleteBooleanAlgebra.toCompleteDistribLattice.{u2} (Set.{u2} α) (Set.instCompleteBooleanAlgebraSet.{u2} α)))))) (BoundedOrder.toOrderBot.{u2} (Set.{u2} α) (Preorder.toLE.{u2} (Set.{u2} α) (PartialOrder.toPreorder.{u2} (Set.{u2} α) (CompleteSemilatticeInf.toPartialOrder.{u2} (Set.{u2} α) (CompleteLattice.toCompleteSemilatticeInf.{u2} (Set.{u2} α) (Order.Coframe.toCompleteLattice.{u2} (Set.{u2} α) (CompleteDistribLattice.toCoframe.{u2} (Set.{u2} α) (CompleteBooleanAlgebra.toCompleteDistribLattice.{u2} (Set.{u2} α) (Set.instCompleteBooleanAlgebraSet.{u2} α)))))))) (CompleteLattice.toBoundedOrder.{u2} (Set.{u2} α) (Order.Coframe.toCompleteLattice.{u2} (Set.{u2} α) (CompleteDistribLattice.toCoframe.{u2} (Set.{u2} α) (CompleteBooleanAlgebra.toCompleteDistribLattice.{u2} (Set.{u2} α) (Set.instCompleteBooleanAlgebraSet.{u2} α)))))) (s i) (s j))) -> (forall (i : ι), Set.Nonempty.{u2} α (s i)) -> (forall (x : α), Exists.{succ u1} ι (fun (i : ι) => Membership.mem.{u2, u2} α (Set.{u2} α) (Set.instMembershipSet.{u2} α) x (s i))) -> (IndexedPartition.{u1, u2} ι α s)
-Case conversion may be inaccurate. Consider using '#align indexed_partition.mk' IndexedPartition.mk'ₓ'. -/
 /-- The non-constructive constructor for `indexed_partition`. -/
 noncomputable def IndexedPartition.mk' {ι α : Type _} (s : ι → Set α)
     (dis : ∀ i j, i ≠ j → Disjoint (s i) (s j)) (nonempty : ∀ i, (s i).Nonempty)
@@ -466,12 +406,6 @@ attribute [simp] some_mem mem_index
 
 include hs
 
-/- warning: indexed_partition.exists_mem -> IndexedPartition.exists_mem is a dubious translation:
-lean 3 declaration is
-  forall {ι : Type.{u1}} {α : Type.{u2}} {s : ι -> (Set.{u2} α)}, (IndexedPartition.{u1, u2} ι α s) -> (forall (x : α), Exists.{succ u1} ι (fun (i : ι) => Membership.Mem.{u2, u2} α (Set.{u2} α) (Set.hasMem.{u2} α) x (s i)))
-but is expected to have type
-  forall {ι : Type.{u2}} {α : Type.{u1}} {s : ι -> (Set.{u1} α)}, (IndexedPartition.{u2, u1} ι α s) -> (forall (x : α), Exists.{succ u2} ι (fun (i : ι) => Membership.mem.{u1, u1} α (Set.{u1} α) (Set.instMembershipSet.{u1} α) x (s i)))
-Case conversion may be inaccurate. Consider using '#align indexed_partition.exists_mem IndexedPartition.exists_memₓ'. -/
 theorem exists_mem (x : α) : ∃ i, x ∈ s i :=
   ⟨hs.index x, hs.mem_index x⟩
 #align indexed_partition.exists_mem IndexedPartition.exists_mem
@@ -481,12 +415,6 @@ theorem iUnion : (⋃ i, s i) = univ := by ext x; simp [hs.exists_mem x]
 #align indexed_partition.Union IndexedPartition.iUnion
 -/
 
-/- warning: indexed_partition.disjoint -> IndexedPartition.disjoint is a dubious translation:
-lean 3 declaration is
-  forall {ι : Type.{u1}} {α : Type.{u2}} {s : ι -> (Set.{u2} α)}, (IndexedPartition.{u1, u2} ι α s) -> (forall {i : ι} {j : ι}, (Ne.{succ u1} ι i j) -> (Disjoint.{u2} (Set.{u2} α) (CompleteSemilatticeInf.toPartialOrder.{u2} (Set.{u2} α) (CompleteLattice.toCompleteSemilatticeInf.{u2} (Set.{u2} α) (Order.Coframe.toCompleteLattice.{u2} (Set.{u2} α) (CompleteDistribLattice.toCoframe.{u2} (Set.{u2} α) (CompleteBooleanAlgebra.toCompleteDistribLattice.{u2} (Set.{u2} α) (Set.completeBooleanAlgebra.{u2} α)))))) (GeneralizedBooleanAlgebra.toOrderBot.{u2} (Set.{u2} α) (BooleanAlgebra.toGeneralizedBooleanAlgebra.{u2} (Set.{u2} α) (Set.booleanAlgebra.{u2} α))) (s i) (s j)))
-but is expected to have type
-  forall {ι : Type.{u2}} {α : Type.{u1}} {s : ι -> (Set.{u1} α)}, (IndexedPartition.{u2, u1} ι α s) -> (forall {i : ι} {j : ι}, (Ne.{succ u2} ι i j) -> (Disjoint.{u1} (Set.{u1} α) (CompleteSemilatticeInf.toPartialOrder.{u1} (Set.{u1} α) (CompleteLattice.toCompleteSemilatticeInf.{u1} (Set.{u1} α) (Order.Coframe.toCompleteLattice.{u1} (Set.{u1} α) (CompleteDistribLattice.toCoframe.{u1} (Set.{u1} α) (CompleteBooleanAlgebra.toCompleteDistribLattice.{u1} (Set.{u1} α) (Set.instCompleteBooleanAlgebraSet.{u1} α)))))) (BoundedOrder.toOrderBot.{u1} (Set.{u1} α) (Preorder.toLE.{u1} (Set.{u1} α) (PartialOrder.toPreorder.{u1} (Set.{u1} α) (CompleteSemilatticeInf.toPartialOrder.{u1} (Set.{u1} α) (CompleteLattice.toCompleteSemilatticeInf.{u1} (Set.{u1} α) (Order.Coframe.toCompleteLattice.{u1} (Set.{u1} α) (CompleteDistribLattice.toCoframe.{u1} (Set.{u1} α) (CompleteBooleanAlgebra.toCompleteDistribLattice.{u1} (Set.{u1} α) (Set.instCompleteBooleanAlgebraSet.{u1} α)))))))) (CompleteLattice.toBoundedOrder.{u1} (Set.{u1} α) (Order.Coframe.toCompleteLattice.{u1} (Set.{u1} α) (CompleteDistribLattice.toCoframe.{u1} (Set.{u1} α) (CompleteBooleanAlgebra.toCompleteDistribLattice.{u1} (Set.{u1} α) (Set.instCompleteBooleanAlgebraSet.{u1} α)))))) (s i) (s j)))
-Case conversion may be inaccurate. Consider using '#align indexed_partition.disjoint IndexedPartition.disjointₓ'. -/
 theorem disjoint : ∀ {i j}, i ≠ j → Disjoint (s i) (s j) := fun i j h =>
   disjoint_left.mpr fun x hxi hxj => h (hs.eq_of_mem hxi hxj)
 #align indexed_partition.disjoint IndexedPartition.disjoint
@@ -511,12 +439,6 @@ protected abbrev setoid (hs : IndexedPartition s) : Setoid α :=
 #align indexed_partition.setoid IndexedPartition.setoid
 -/
 
-/- warning: indexed_partition.index_some -> IndexedPartition.index_some is a dubious translation:
-lean 3 declaration is
-  forall {ι : Type.{u1}} {α : Type.{u2}} {s : ι -> (Set.{u2} α)} (hs : IndexedPartition.{u1, u2} ι α s) (i : ι), Eq.{succ u1} ι (IndexedPartition.index.{u1, u2} ι α s hs (IndexedPartition.some.{u1, u2} ι α s hs i)) i
-but is expected to have type
-  forall {ι : Type.{u2}} {α : Type.{u1}} {s : ι -> (Set.{u1} α)} (hs : IndexedPartition.{u2, u1} ι α s) (i : ι), Eq.{succ u2} ι (IndexedPartition.index.{u2, u1} ι α s hs (IndexedPartition.some.{u2, u1} ι α s hs i)) i
-Case conversion may be inaccurate. Consider using '#align indexed_partition.index_some IndexedPartition.index_someₓ'. -/
 @[simp]
 theorem index_some (i : ι) : hs.index (hs.some i) = i :=
   (mem_iff_index_eq _).1 <| hs.some_mem i
@@ -573,12 +495,6 @@ theorem equivQuotient_index_apply (x : α) : hs.equivQuotient (hs.index x) = hs.
 #align indexed_partition.equiv_quotient_index_apply IndexedPartition.equivQuotient_index_apply
 -/
 
-/- warning: indexed_partition.equiv_quotient_symm_proj_apply -> IndexedPartition.equivQuotient_symm_proj_apply is a dubious translation:
-lean 3 declaration is
-  forall {ι : Type.{u1}} {α : Type.{u2}} {s : ι -> (Set.{u2} α)} (hs : IndexedPartition.{u1, u2} ι α s) (x : α), Eq.{succ u1} ι (coeFn.{max 1 (max (succ u2) (succ u1)) (succ u1) (succ u2), max (succ u2) (succ u1)} (Equiv.{succ u2, succ u1} (IndexedPartition.Quotient.{u1, u2} ι α s hs) ι) (fun (_x : Equiv.{succ u2, succ u1} (IndexedPartition.Quotient.{u1, u2} ι α s hs) ι) => (IndexedPartition.Quotient.{u1, u2} ι α s hs) -> ι) (Equiv.hasCoeToFun.{succ u2, succ u1} (IndexedPartition.Quotient.{u1, u2} ι α s hs) ι) (Equiv.symm.{succ u1, succ u2} ι (IndexedPartition.Quotient.{u1, u2} ι α s hs) (IndexedPartition.equivQuotient.{u1, u2} ι α s hs)) (IndexedPartition.proj.{u1, u2} ι α s hs x)) (IndexedPartition.index.{u1, u2} ι α s hs x)
-but is expected to have type
-  forall {ι : Type.{u2}} {α : Type.{u1}} {s : ι -> (Set.{u1} α)} (hs : IndexedPartition.{u2, u1} ι α s) (x : α), Eq.{succ u2} ((fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.812 : IndexedPartition.Quotient.{u2, u1} ι α s hs) => ι) (IndexedPartition.proj.{u2, u1} ι α s hs x)) (FunLike.coe.{max (succ u2) (succ u1), succ u1, succ u2} (Equiv.{succ u1, succ u2} (IndexedPartition.Quotient.{u2, u1} ι α s hs) ι) (IndexedPartition.Quotient.{u2, u1} ι α s hs) (fun (_x : IndexedPartition.Quotient.{u2, u1} ι α s hs) => (fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.812 : IndexedPartition.Quotient.{u2, u1} ι α s hs) => ι) _x) (Equiv.instFunLikeEquiv.{succ u1, succ u2} (IndexedPartition.Quotient.{u2, u1} ι α s hs) ι) (Equiv.symm.{succ u2, succ u1} ι (IndexedPartition.Quotient.{u2, u1} ι α s hs) (IndexedPartition.equivQuotient.{u2, u1} ι α s hs)) (IndexedPartition.proj.{u2, u1} ι α s hs x)) (IndexedPartition.index.{u2, u1} ι α s hs x)
-Case conversion may be inaccurate. Consider using '#align indexed_partition.equiv_quotient_symm_proj_apply IndexedPartition.equivQuotient_symm_proj_applyₓ'. -/
 @[simp]
 theorem equivQuotient_symm_proj_apply (x : α) : hs.equivQuotient.symm (hs.proj x) = hs.index x :=
   rfl
@@ -606,23 +522,11 @@ theorem out_proj (x : α) : hs.out (hs.proj x) = hs.some (hs.index x) :=
 #align indexed_partition.out_proj IndexedPartition.out_proj
 -/
 
-/- warning: indexed_partition.index_out' -> IndexedPartition.index_out' is a dubious translation:
-lean 3 declaration is
-  forall {ι : Type.{u1}} {α : Type.{u2}} {s : ι -> (Set.{u2} α)} (hs : IndexedPartition.{u1, u2} ι α s) (x : IndexedPartition.Quotient.{u1, u2} ι α s hs), Eq.{succ u1} ι (IndexedPartition.index.{u1, u2} ι α s hs (Quotient.out'.{succ u2} α (IndexedPartition.setoid.{u1, u2} ι α s hs) x)) (IndexedPartition.index.{u1, u2} ι α s hs (coeFn.{succ u2, succ u2} (Function.Embedding.{succ u2, succ u2} (IndexedPartition.Quotient.{u1, u2} ι α s hs) α) (fun (_x : Function.Embedding.{succ u2, succ u2} (IndexedPartition.Quotient.{u1, u2} ι α s hs) α) => (IndexedPartition.Quotient.{u1, u2} ι α s hs) -> α) (Function.Embedding.hasCoeToFun.{succ u2, succ u2} (IndexedPartition.Quotient.{u1, u2} ι α s hs) α) (IndexedPartition.out.{u1, u2} ι α s hs) x))
-but is expected to have type
-  forall {ι : Type.{u2}} {α : Type.{u1}} {s : ι -> (Set.{u1} α)} (hs : IndexedPartition.{u2, u1} ι α s) (x : IndexedPartition.Quotient.{u2, u1} ι α s hs), Eq.{succ u2} ι (IndexedPartition.index.{u2, u1} ι α s hs (Quotient.out'.{succ u1} α (IndexedPartition.setoid.{u2, u1} ι α s hs) x)) (IndexedPartition.index.{u2, u1} ι α s hs (FunLike.coe.{succ u1, succ u1, succ u1} (Function.Embedding.{succ u1, succ u1} (IndexedPartition.Quotient.{u2, u1} ι α s hs) α) (IndexedPartition.Quotient.{u2, u1} ι α s hs) (fun (_x : IndexedPartition.Quotient.{u2, u1} ι α s hs) => (fun (x._@.Mathlib.Data.FunLike.Embedding._hyg.19 : IndexedPartition.Quotient.{u2, u1} ι α s hs) => α) _x) (EmbeddingLike.toFunLike.{succ u1, succ u1, succ u1} (Function.Embedding.{succ u1, succ u1} (IndexedPartition.Quotient.{u2, u1} ι α s hs) α) (IndexedPartition.Quotient.{u2, u1} ι α s hs) α (Function.instEmbeddingLikeEmbedding.{succ u1, succ u1} (IndexedPartition.Quotient.{u2, u1} ι α s hs) α)) (IndexedPartition.out.{u2, u1} ι α s hs) x))
-Case conversion may be inaccurate. Consider using '#align indexed_partition.index_out' IndexedPartition.index_out'ₓ'. -/
 /-- The indices of `quotient.out'` and `indexed_partition.out` are equal. -/
 theorem index_out' (x : hs.Quotient) : hs.index x.out' = hs.index (hs.out x) :=
   Quotient.inductionOn' x fun x => (Setoid.ker_apply_mk_out' x).trans (hs.index_some _).symm
 #align indexed_partition.index_out' IndexedPartition.index_out'
 
-/- warning: indexed_partition.proj_out -> IndexedPartition.proj_out is a dubious translation:
-lean 3 declaration is
-  forall {ι : Type.{u1}} {α : Type.{u2}} {s : ι -> (Set.{u2} α)} (hs : IndexedPartition.{u1, u2} ι α s) (x : IndexedPartition.Quotient.{u1, u2} ι α s hs), Eq.{succ u2} (IndexedPartition.Quotient.{u1, u2} ι α s hs) (IndexedPartition.proj.{u1, u2} ι α s hs (coeFn.{succ u2, succ u2} (Function.Embedding.{succ u2, succ u2} (IndexedPartition.Quotient.{u1, u2} ι α s hs) α) (fun (_x : Function.Embedding.{succ u2, succ u2} (IndexedPartition.Quotient.{u1, u2} ι α s hs) α) => (IndexedPartition.Quotient.{u1, u2} ι α s hs) -> α) (Function.Embedding.hasCoeToFun.{succ u2, succ u2} (IndexedPartition.Quotient.{u1, u2} ι α s hs) α) (IndexedPartition.out.{u1, u2} ι α s hs) x)) x
-but is expected to have type
-  forall {ι : Type.{u2}} {α : Type.{u1}} {s : ι -> (Set.{u1} α)} (hs : IndexedPartition.{u2, u1} ι α s) (x : IndexedPartition.Quotient.{u2, u1} ι α s hs), Eq.{succ u1} (IndexedPartition.Quotient.{u2, u1} ι α s hs) (IndexedPartition.proj.{u2, u1} ι α s hs (FunLike.coe.{succ u1, succ u1, succ u1} (Function.Embedding.{succ u1, succ u1} (IndexedPartition.Quotient.{u2, u1} ι α s hs) α) (IndexedPartition.Quotient.{u2, u1} ι α s hs) (fun (_x : IndexedPartition.Quotient.{u2, u1} ι α s hs) => (fun (x._@.Mathlib.Data.FunLike.Embedding._hyg.19 : IndexedPartition.Quotient.{u2, u1} ι α s hs) => α) _x) (EmbeddingLike.toFunLike.{succ u1, succ u1, succ u1} (Function.Embedding.{succ u1, succ u1} (IndexedPartition.Quotient.{u2, u1} ι α s hs) α) (IndexedPartition.Quotient.{u2, u1} ι α s hs) α (Function.instEmbeddingLikeEmbedding.{succ u1, succ u1} (IndexedPartition.Quotient.{u2, u1} ι α s hs) α)) (IndexedPartition.out.{u2, u1} ι α s hs) x)) x
-Case conversion may be inaccurate. Consider using '#align indexed_partition.proj_out IndexedPartition.proj_outₓ'. -/
 /-- This lemma is analogous to `quotient.out_eq'`. -/
 @[simp]
 theorem proj_out (x : hs.Quotient) : hs.proj (hs.out x) = x :=
@@ -635,12 +539,6 @@ theorem class_of {x : α} : setOf (hs.Setoid.Rel x) = s (hs.index x) :=
 #align indexed_partition.class_of IndexedPartition.class_of
 -/
 
-/- warning: indexed_partition.proj_fiber -> IndexedPartition.proj_fiber is a dubious translation:
-lean 3 declaration is
-  forall {ι : Type.{u1}} {α : Type.{u2}} {s : ι -> (Set.{u2} α)} (hs : IndexedPartition.{u1, u2} ι α s) (x : IndexedPartition.Quotient.{u1, u2} ι α s hs), Eq.{succ u2} (Set.{u2} α) (Set.preimage.{u2, u2} α (IndexedPartition.Quotient.{u1, u2} ι α s hs) (IndexedPartition.proj.{u1, u2} ι α s hs) (Singleton.singleton.{u2, u2} (IndexedPartition.Quotient.{u1, u2} ι α s hs) (Set.{u2} (IndexedPartition.Quotient.{u1, u2} ι α s hs)) (Set.hasSingleton.{u2} (IndexedPartition.Quotient.{u1, u2} ι α s hs)) x)) (s (coeFn.{max 1 (max (succ u2) (succ u1)) (succ u1) (succ u2), max (succ u2) (succ u1)} (Equiv.{succ u2, succ u1} (IndexedPartition.Quotient.{u1, u2} ι α s hs) ι) (fun (_x : Equiv.{succ u2, succ u1} (IndexedPartition.Quotient.{u1, u2} ι α s hs) ι) => (IndexedPartition.Quotient.{u1, u2} ι α s hs) -> ι) (Equiv.hasCoeToFun.{succ u2, succ u1} (IndexedPartition.Quotient.{u1, u2} ι α s hs) ι) (Equiv.symm.{succ u1, succ u2} ι (IndexedPartition.Quotient.{u1, u2} ι α s hs) (IndexedPartition.equivQuotient.{u1, u2} ι α s hs)) x))
-but is expected to have type
-  forall {ι : Type.{u2}} {α : Type.{u1}} {s : ι -> (Set.{u1} α)} (hs : IndexedPartition.{u2, u1} ι α s) (x : IndexedPartition.Quotient.{u2, u1} ι α s hs), Eq.{succ u1} (Set.{u1} α) (Set.preimage.{u1, u1} α (IndexedPartition.Quotient.{u2, u1} ι α s hs) (IndexedPartition.proj.{u2, u1} ι α s hs) (Singleton.singleton.{u1, u1} (IndexedPartition.Quotient.{u2, u1} ι α s hs) (Set.{u1} (IndexedPartition.Quotient.{u2, u1} ι α s hs)) (Set.instSingletonSet.{u1} (IndexedPartition.Quotient.{u2, u1} ι α s hs)) x)) (s (FunLike.coe.{max (succ u2) (succ u1), succ u1, succ u2} (Equiv.{succ u1, succ u2} (IndexedPartition.Quotient.{u2, u1} ι α s hs) ι) (IndexedPartition.Quotient.{u2, u1} ι α s hs) (fun (_x : IndexedPartition.Quotient.{u2, u1} ι α s hs) => (fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.812 : IndexedPartition.Quotient.{u2, u1} ι α s hs) => ι) _x) (Equiv.instFunLikeEquiv.{succ u1, succ u2} (IndexedPartition.Quotient.{u2, u1} ι α s hs) ι) (Equiv.symm.{succ u2, succ u1} ι (IndexedPartition.Quotient.{u2, u1} ι α s hs) (IndexedPartition.equivQuotient.{u2, u1} ι α s hs)) x))
-Case conversion may be inaccurate. Consider using '#align indexed_partition.proj_fiber IndexedPartition.proj_fiberₓ'. -/
 theorem proj_fiber (x : hs.Quotient) : hs.proj ⁻¹' {x} = s (hs.equivQuotient.symm x) :=
   Quotient.inductionOn' x fun x => by
     ext y
Diff
@@ -89,11 +89,8 @@ theorem mem_classes (r : Setoid α) (y) : { x | r.Rel x y } ∈ r.classes :=
 
 #print Setoid.classes_ker_subset_fiber_set /-
 theorem classes_ker_subset_fiber_set {β : Type _} (f : α → β) :
-    (Setoid.ker f).classes ⊆ Set.range fun y => { x | f x = y } :=
-  by
-  rintro s ⟨x, rfl⟩
-  rw [Set.mem_range]
-  exact ⟨f x, rfl⟩
+    (Setoid.ker f).classes ⊆ Set.range fun y => { x | f x = y } := by rintro s ⟨x, rfl⟩;
+  rw [Set.mem_range]; exact ⟨f x, rfl⟩
 #align setoid.classes_ker_subset_fiber_set Setoid.classes_ker_subset_fiber_set
 -/
 
@@ -134,9 +131,7 @@ but is expected to have type
   forall {α : Type.{u1}} (r : Setoid.{succ u1} α) {x : α} {y : α}, Iff (Setoid.Rel.{u1} α r x y) (Exists.{succ u1} (Set.{u1} α) (fun (c : Set.{u1} α) => And (Membership.mem.{u1, u1} (Set.{u1} α) (Set.{u1} (Set.{u1} α)) (Set.instMembershipSet.{u1} (Set.{u1} α)) c (Setoid.classes.{u1} α r)) (And (Membership.mem.{u1, u1} α (Set.{u1} α) (Set.instMembershipSet.{u1} α) x c) (Membership.mem.{u1, u1} α (Set.{u1} α) (Set.instMembershipSet.{u1} α) y c))))
 Case conversion may be inaccurate. Consider using '#align setoid.rel_iff_exists_classes Setoid.rel_iff_exists_classesₓ'. -/
 theorem rel_iff_exists_classes (r : Setoid α) {x y} : r.Rel x y ↔ ∃ c ∈ r.classes, x ∈ c ∧ y ∈ c :=
-  ⟨fun h => ⟨_, r.mem_classes y, h, r.refl' y⟩, fun ⟨c, ⟨z, hz⟩, hx, hy⟩ =>
-    by
-    subst c
+  ⟨fun h => ⟨_, r.mem_classes y, h, r.refl' y⟩, fun ⟨c, ⟨z, hz⟩, hx, hy⟩ => by subst c;
     exact r.trans' hx (r.symm' hy)⟩
 #align setoid.rel_iff_exists_classes Setoid.rel_iff_exists_classes
 
@@ -201,10 +196,7 @@ theorem eqv_class_mem {c : Set (Set α)} (H : ∀ a, ∃! (b : _)(_ : b ∈ c),
 /- ./././Mathport/Syntax/Translate/Basic.lean:635:2: warning: expanding binder collection (b «expr ∈ » c) -/
 #print Setoid.eqv_class_mem' /-
 theorem eqv_class_mem' {c : Set (Set α)} (H : ∀ a, ∃! (b : _)(_ : b ∈ c), a ∈ b) {x} :
-    { y : α | (mkClasses c H).Rel x y } ∈ c :=
-  by
-  convert Setoid.eqv_class_mem H
-  ext
+    { y : α | (mkClasses c H).Rel x y } ∈ c := by convert Setoid.eqv_class_mem H; ext;
   rw [Setoid.comm']
 #align setoid.eqv_class_mem' Setoid.eqv_class_mem'
 -/
@@ -307,9 +299,7 @@ theorem IsPartition.sUnion_eq_univ {c : Set (Set α)} (hc : IsPartition c) : ⋃
   Set.eq_univ_of_forall fun x =>
     Set.mem_sUnion.2 <|
       let ⟨t, ht⟩ := hc.2 x
-      ⟨t, by
-        simp only [exists_unique_iff_exists] at ht
-        tauto⟩
+      ⟨t, by simp only [exists_unique_iff_exists] at ht; tauto⟩
 #align setoid.is_partition.sUnion_eq_univ Setoid.IsPartition.sUnion_eq_univ
 -/
 
@@ -372,10 +362,7 @@ protected def Partition.orderIso : Setoid α ≃o { C : Set (Set α) // IsPartit
   invFun C := mkClasses C.1 C.2.2
   left_inv := mkClasses_classes
   right_inv C := by rw [Subtype.ext_iff_val, ← classes_mk_classes C.1 C.2]
-  map_rel_iff' r s :=
-    by
-    conv_rhs => rw [← mk_classes_classes r, ← mk_classes_classes s]
-    rfl
+  map_rel_iff' r s := by conv_rhs => rw [← mk_classes_classes r, ← mk_classes_classes s]; rfl
 #align setoid.partition.order_iso Setoid.Partition.orderIso
 -/
 
@@ -490,9 +477,7 @@ theorem exists_mem (x : α) : ∃ i, x ∈ s i :=
 #align indexed_partition.exists_mem IndexedPartition.exists_mem
 
 #print IndexedPartition.iUnion /-
-theorem iUnion : (⋃ i, s i) = univ := by
-  ext x
-  simp [hs.exists_mem x]
+theorem iUnion : (⋃ i, s i) = univ := by ext x; simp [hs.exists_mem x]
 #align indexed_partition.Union IndexedPartition.iUnion
 -/
 
Diff
@@ -592,7 +592,7 @@ theorem equivQuotient_index_apply (x : α) : hs.equivQuotient (hs.index x) = hs.
 lean 3 declaration is
   forall {ι : Type.{u1}} {α : Type.{u2}} {s : ι -> (Set.{u2} α)} (hs : IndexedPartition.{u1, u2} ι α s) (x : α), Eq.{succ u1} ι (coeFn.{max 1 (max (succ u2) (succ u1)) (succ u1) (succ u2), max (succ u2) (succ u1)} (Equiv.{succ u2, succ u1} (IndexedPartition.Quotient.{u1, u2} ι α s hs) ι) (fun (_x : Equiv.{succ u2, succ u1} (IndexedPartition.Quotient.{u1, u2} ι α s hs) ι) => (IndexedPartition.Quotient.{u1, u2} ι α s hs) -> ι) (Equiv.hasCoeToFun.{succ u2, succ u1} (IndexedPartition.Quotient.{u1, u2} ι α s hs) ι) (Equiv.symm.{succ u1, succ u2} ι (IndexedPartition.Quotient.{u1, u2} ι α s hs) (IndexedPartition.equivQuotient.{u1, u2} ι α s hs)) (IndexedPartition.proj.{u1, u2} ι α s hs x)) (IndexedPartition.index.{u1, u2} ι α s hs x)
 but is expected to have type
-  forall {ι : Type.{u2}} {α : Type.{u1}} {s : ι -> (Set.{u1} α)} (hs : IndexedPartition.{u2, u1} ι α s) (x : α), Eq.{succ u2} ((fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.808 : IndexedPartition.Quotient.{u2, u1} ι α s hs) => ι) (IndexedPartition.proj.{u2, u1} ι α s hs x)) (FunLike.coe.{max (succ u2) (succ u1), succ u1, succ u2} (Equiv.{succ u1, succ u2} (IndexedPartition.Quotient.{u2, u1} ι α s hs) ι) (IndexedPartition.Quotient.{u2, u1} ι α s hs) (fun (_x : IndexedPartition.Quotient.{u2, u1} ι α s hs) => (fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.808 : IndexedPartition.Quotient.{u2, u1} ι α s hs) => ι) _x) (Equiv.instFunLikeEquiv.{succ u1, succ u2} (IndexedPartition.Quotient.{u2, u1} ι α s hs) ι) (Equiv.symm.{succ u2, succ u1} ι (IndexedPartition.Quotient.{u2, u1} ι α s hs) (IndexedPartition.equivQuotient.{u2, u1} ι α s hs)) (IndexedPartition.proj.{u2, u1} ι α s hs x)) (IndexedPartition.index.{u2, u1} ι α s hs x)
+  forall {ι : Type.{u2}} {α : Type.{u1}} {s : ι -> (Set.{u1} α)} (hs : IndexedPartition.{u2, u1} ι α s) (x : α), Eq.{succ u2} ((fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.812 : IndexedPartition.Quotient.{u2, u1} ι α s hs) => ι) (IndexedPartition.proj.{u2, u1} ι α s hs x)) (FunLike.coe.{max (succ u2) (succ u1), succ u1, succ u2} (Equiv.{succ u1, succ u2} (IndexedPartition.Quotient.{u2, u1} ι α s hs) ι) (IndexedPartition.Quotient.{u2, u1} ι α s hs) (fun (_x : IndexedPartition.Quotient.{u2, u1} ι α s hs) => (fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.812 : IndexedPartition.Quotient.{u2, u1} ι α s hs) => ι) _x) (Equiv.instFunLikeEquiv.{succ u1, succ u2} (IndexedPartition.Quotient.{u2, u1} ι α s hs) ι) (Equiv.symm.{succ u2, succ u1} ι (IndexedPartition.Quotient.{u2, u1} ι α s hs) (IndexedPartition.equivQuotient.{u2, u1} ι α s hs)) (IndexedPartition.proj.{u2, u1} ι α s hs x)) (IndexedPartition.index.{u2, u1} ι α s hs x)
 Case conversion may be inaccurate. Consider using '#align indexed_partition.equiv_quotient_symm_proj_apply IndexedPartition.equivQuotient_symm_proj_applyₓ'. -/
 @[simp]
 theorem equivQuotient_symm_proj_apply (x : α) : hs.equivQuotient.symm (hs.proj x) = hs.index x :=
@@ -654,7 +654,7 @@ theorem class_of {x : α} : setOf (hs.Setoid.Rel x) = s (hs.index x) :=
 lean 3 declaration is
   forall {ι : Type.{u1}} {α : Type.{u2}} {s : ι -> (Set.{u2} α)} (hs : IndexedPartition.{u1, u2} ι α s) (x : IndexedPartition.Quotient.{u1, u2} ι α s hs), Eq.{succ u2} (Set.{u2} α) (Set.preimage.{u2, u2} α (IndexedPartition.Quotient.{u1, u2} ι α s hs) (IndexedPartition.proj.{u1, u2} ι α s hs) (Singleton.singleton.{u2, u2} (IndexedPartition.Quotient.{u1, u2} ι α s hs) (Set.{u2} (IndexedPartition.Quotient.{u1, u2} ι α s hs)) (Set.hasSingleton.{u2} (IndexedPartition.Quotient.{u1, u2} ι α s hs)) x)) (s (coeFn.{max 1 (max (succ u2) (succ u1)) (succ u1) (succ u2), max (succ u2) (succ u1)} (Equiv.{succ u2, succ u1} (IndexedPartition.Quotient.{u1, u2} ι α s hs) ι) (fun (_x : Equiv.{succ u2, succ u1} (IndexedPartition.Quotient.{u1, u2} ι α s hs) ι) => (IndexedPartition.Quotient.{u1, u2} ι α s hs) -> ι) (Equiv.hasCoeToFun.{succ u2, succ u1} (IndexedPartition.Quotient.{u1, u2} ι α s hs) ι) (Equiv.symm.{succ u1, succ u2} ι (IndexedPartition.Quotient.{u1, u2} ι α s hs) (IndexedPartition.equivQuotient.{u1, u2} ι α s hs)) x))
 but is expected to have type
-  forall {ι : Type.{u2}} {α : Type.{u1}} {s : ι -> (Set.{u1} α)} (hs : IndexedPartition.{u2, u1} ι α s) (x : IndexedPartition.Quotient.{u2, u1} ι α s hs), Eq.{succ u1} (Set.{u1} α) (Set.preimage.{u1, u1} α (IndexedPartition.Quotient.{u2, u1} ι α s hs) (IndexedPartition.proj.{u2, u1} ι α s hs) (Singleton.singleton.{u1, u1} (IndexedPartition.Quotient.{u2, u1} ι α s hs) (Set.{u1} (IndexedPartition.Quotient.{u2, u1} ι α s hs)) (Set.instSingletonSet.{u1} (IndexedPartition.Quotient.{u2, u1} ι α s hs)) x)) (s (FunLike.coe.{max (succ u2) (succ u1), succ u1, succ u2} (Equiv.{succ u1, succ u2} (IndexedPartition.Quotient.{u2, u1} ι α s hs) ι) (IndexedPartition.Quotient.{u2, u1} ι α s hs) (fun (_x : IndexedPartition.Quotient.{u2, u1} ι α s hs) => (fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.808 : IndexedPartition.Quotient.{u2, u1} ι α s hs) => ι) _x) (Equiv.instFunLikeEquiv.{succ u1, succ u2} (IndexedPartition.Quotient.{u2, u1} ι α s hs) ι) (Equiv.symm.{succ u2, succ u1} ι (IndexedPartition.Quotient.{u2, u1} ι α s hs) (IndexedPartition.equivQuotient.{u2, u1} ι α s hs)) x))
+  forall {ι : Type.{u2}} {α : Type.{u1}} {s : ι -> (Set.{u1} α)} (hs : IndexedPartition.{u2, u1} ι α s) (x : IndexedPartition.Quotient.{u2, u1} ι α s hs), Eq.{succ u1} (Set.{u1} α) (Set.preimage.{u1, u1} α (IndexedPartition.Quotient.{u2, u1} ι α s hs) (IndexedPartition.proj.{u2, u1} ι α s hs) (Singleton.singleton.{u1, u1} (IndexedPartition.Quotient.{u2, u1} ι α s hs) (Set.{u1} (IndexedPartition.Quotient.{u2, u1} ι α s hs)) (Set.instSingletonSet.{u1} (IndexedPartition.Quotient.{u2, u1} ι α s hs)) x)) (s (FunLike.coe.{max (succ u2) (succ u1), succ u1, succ u2} (Equiv.{succ u1, succ u2} (IndexedPartition.Quotient.{u2, u1} ι α s hs) ι) (IndexedPartition.Quotient.{u2, u1} ι α s hs) (fun (_x : IndexedPartition.Quotient.{u2, u1} ι α s hs) => (fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.812 : IndexedPartition.Quotient.{u2, u1} ι α s hs) => ι) _x) (Equiv.instFunLikeEquiv.{succ u1, succ u2} (IndexedPartition.Quotient.{u2, u1} ι α s hs) ι) (Equiv.symm.{succ u2, succ u1} ι (IndexedPartition.Quotient.{u2, u1} ι α s hs) (IndexedPartition.equivQuotient.{u2, u1} ι α s hs)) x))
 Case conversion may be inaccurate. Consider using '#align indexed_partition.proj_fiber IndexedPartition.proj_fiberₓ'. -/
 theorem proj_fiber (x : hs.Quotient) : hs.proj ⁻¹' {x} = s (hs.equivQuotient.symm x) :=
   Quotient.inductionOn' x fun x => by
Diff
@@ -225,26 +225,26 @@ theorem eqv_classes_disjoint {c : Set (Set α)} (H : ∀ a, ∃! (b : _)(_ : b 
 
 /- warning: setoid.eqv_classes_of_disjoint_union -> Setoid.eqv_classes_of_disjoint_union is a dubious translation:
 lean 3 declaration is
-  forall {α : Type.{u1}} {c : Set.{u1} (Set.{u1} α)}, (Eq.{succ u1} (Set.{u1} α) (Set.unionₛ.{u1} α c) (Set.univ.{u1} α)) -> (Set.PairwiseDisjoint.{u1, u1} (Set.{u1} α) (Set.{u1} α) (CompleteSemilatticeInf.toPartialOrder.{u1} (Set.{u1} α) (CompleteLattice.toCompleteSemilatticeInf.{u1} (Set.{u1} α) (Order.Coframe.toCompleteLattice.{u1} (Set.{u1} α) (CompleteDistribLattice.toCoframe.{u1} (Set.{u1} α) (CompleteBooleanAlgebra.toCompleteDistribLattice.{u1} (Set.{u1} α) (Set.completeBooleanAlgebra.{u1} α)))))) (GeneralizedBooleanAlgebra.toOrderBot.{u1} (Set.{u1} α) (BooleanAlgebra.toGeneralizedBooleanAlgebra.{u1} (Set.{u1} α) (Set.booleanAlgebra.{u1} α))) c (id.{succ u1} (Set.{u1} α))) -> (forall (a : α), ExistsUnique.{succ u1} (Set.{u1} α) (fun (b : Set.{u1} α) => ExistsUnique.{0} (Membership.Mem.{u1, u1} (Set.{u1} α) (Set.{u1} (Set.{u1} α)) (Set.hasMem.{u1} (Set.{u1} α)) b c) (fun (H : Membership.Mem.{u1, u1} (Set.{u1} α) (Set.{u1} (Set.{u1} α)) (Set.hasMem.{u1} (Set.{u1} α)) b c) => Membership.Mem.{u1, u1} α (Set.{u1} α) (Set.hasMem.{u1} α) a b)))
+  forall {α : Type.{u1}} {c : Set.{u1} (Set.{u1} α)}, (Eq.{succ u1} (Set.{u1} α) (Set.sUnion.{u1} α c) (Set.univ.{u1} α)) -> (Set.PairwiseDisjoint.{u1, u1} (Set.{u1} α) (Set.{u1} α) (CompleteSemilatticeInf.toPartialOrder.{u1} (Set.{u1} α) (CompleteLattice.toCompleteSemilatticeInf.{u1} (Set.{u1} α) (Order.Coframe.toCompleteLattice.{u1} (Set.{u1} α) (CompleteDistribLattice.toCoframe.{u1} (Set.{u1} α) (CompleteBooleanAlgebra.toCompleteDistribLattice.{u1} (Set.{u1} α) (Set.completeBooleanAlgebra.{u1} α)))))) (GeneralizedBooleanAlgebra.toOrderBot.{u1} (Set.{u1} α) (BooleanAlgebra.toGeneralizedBooleanAlgebra.{u1} (Set.{u1} α) (Set.booleanAlgebra.{u1} α))) c (id.{succ u1} (Set.{u1} α))) -> (forall (a : α), ExistsUnique.{succ u1} (Set.{u1} α) (fun (b : Set.{u1} α) => ExistsUnique.{0} (Membership.Mem.{u1, u1} (Set.{u1} α) (Set.{u1} (Set.{u1} α)) (Set.hasMem.{u1} (Set.{u1} α)) b c) (fun (H : Membership.Mem.{u1, u1} (Set.{u1} α) (Set.{u1} (Set.{u1} α)) (Set.hasMem.{u1} (Set.{u1} α)) b c) => Membership.Mem.{u1, u1} α (Set.{u1} α) (Set.hasMem.{u1} α) a b)))
 but is expected to have type
-  forall {α : Type.{u1}} {c : Set.{u1} (Set.{u1} α)}, (Eq.{succ u1} (Set.{u1} α) (Set.unionₛ.{u1} α c) (Set.univ.{u1} α)) -> (Set.PairwiseDisjoint.{u1, u1} (Set.{u1} α) (Set.{u1} α) (CompleteSemilatticeInf.toPartialOrder.{u1} (Set.{u1} α) (CompleteLattice.toCompleteSemilatticeInf.{u1} (Set.{u1} α) (Order.Coframe.toCompleteLattice.{u1} (Set.{u1} α) (CompleteDistribLattice.toCoframe.{u1} (Set.{u1} α) (CompleteBooleanAlgebra.toCompleteDistribLattice.{u1} (Set.{u1} α) (Set.instCompleteBooleanAlgebraSet.{u1} α)))))) (BoundedOrder.toOrderBot.{u1} (Set.{u1} α) (Preorder.toLE.{u1} (Set.{u1} α) (PartialOrder.toPreorder.{u1} (Set.{u1} α) (CompleteSemilatticeInf.toPartialOrder.{u1} (Set.{u1} α) (CompleteLattice.toCompleteSemilatticeInf.{u1} (Set.{u1} α) (Order.Coframe.toCompleteLattice.{u1} (Set.{u1} α) (CompleteDistribLattice.toCoframe.{u1} (Set.{u1} α) (CompleteBooleanAlgebra.toCompleteDistribLattice.{u1} (Set.{u1} α) (Set.instCompleteBooleanAlgebraSet.{u1} α)))))))) (CompleteLattice.toBoundedOrder.{u1} (Set.{u1} α) (Order.Coframe.toCompleteLattice.{u1} (Set.{u1} α) (CompleteDistribLattice.toCoframe.{u1} (Set.{u1} α) (CompleteBooleanAlgebra.toCompleteDistribLattice.{u1} (Set.{u1} α) (Set.instCompleteBooleanAlgebraSet.{u1} α)))))) c (id.{succ u1} (Set.{u1} α))) -> (forall (a : α), ExistsUnique.{succ u1} (Set.{u1} α) (fun (b : Set.{u1} α) => ExistsUnique.{0} (Membership.mem.{u1, u1} (Set.{u1} α) (Set.{u1} (Set.{u1} α)) (Set.instMembershipSet.{u1} (Set.{u1} α)) b c) (fun (H : Membership.mem.{u1, u1} (Set.{u1} α) (Set.{u1} (Set.{u1} α)) (Set.instMembershipSet.{u1} (Set.{u1} α)) b c) => Membership.mem.{u1, u1} α (Set.{u1} α) (Set.instMembershipSet.{u1} α) a b)))
+  forall {α : Type.{u1}} {c : Set.{u1} (Set.{u1} α)}, (Eq.{succ u1} (Set.{u1} α) (Set.sUnion.{u1} α c) (Set.univ.{u1} α)) -> (Set.PairwiseDisjoint.{u1, u1} (Set.{u1} α) (Set.{u1} α) (CompleteSemilatticeInf.toPartialOrder.{u1} (Set.{u1} α) (CompleteLattice.toCompleteSemilatticeInf.{u1} (Set.{u1} α) (Order.Coframe.toCompleteLattice.{u1} (Set.{u1} α) (CompleteDistribLattice.toCoframe.{u1} (Set.{u1} α) (CompleteBooleanAlgebra.toCompleteDistribLattice.{u1} (Set.{u1} α) (Set.instCompleteBooleanAlgebraSet.{u1} α)))))) (BoundedOrder.toOrderBot.{u1} (Set.{u1} α) (Preorder.toLE.{u1} (Set.{u1} α) (PartialOrder.toPreorder.{u1} (Set.{u1} α) (CompleteSemilatticeInf.toPartialOrder.{u1} (Set.{u1} α) (CompleteLattice.toCompleteSemilatticeInf.{u1} (Set.{u1} α) (Order.Coframe.toCompleteLattice.{u1} (Set.{u1} α) (CompleteDistribLattice.toCoframe.{u1} (Set.{u1} α) (CompleteBooleanAlgebra.toCompleteDistribLattice.{u1} (Set.{u1} α) (Set.instCompleteBooleanAlgebraSet.{u1} α)))))))) (CompleteLattice.toBoundedOrder.{u1} (Set.{u1} α) (Order.Coframe.toCompleteLattice.{u1} (Set.{u1} α) (CompleteDistribLattice.toCoframe.{u1} (Set.{u1} α) (CompleteBooleanAlgebra.toCompleteDistribLattice.{u1} (Set.{u1} α) (Set.instCompleteBooleanAlgebraSet.{u1} α)))))) c (id.{succ u1} (Set.{u1} α))) -> (forall (a : α), ExistsUnique.{succ u1} (Set.{u1} α) (fun (b : Set.{u1} α) => ExistsUnique.{0} (Membership.mem.{u1, u1} (Set.{u1} α) (Set.{u1} (Set.{u1} α)) (Set.instMembershipSet.{u1} (Set.{u1} α)) b c) (fun (H : Membership.mem.{u1, u1} (Set.{u1} α) (Set.{u1} (Set.{u1} α)) (Set.instMembershipSet.{u1} (Set.{u1} α)) b c) => Membership.mem.{u1, u1} α (Set.{u1} α) (Set.instMembershipSet.{u1} α) a b)))
 Case conversion may be inaccurate. Consider using '#align setoid.eqv_classes_of_disjoint_union Setoid.eqv_classes_of_disjoint_unionₓ'. -/
 /- ./././Mathport/Syntax/Translate/Basic.lean:635:2: warning: expanding binder collection (b «expr ∈ » c) -/
 /-- A set of disjoint sets covering α partition α (classical). -/
-theorem eqv_classes_of_disjoint_union {c : Set (Set α)} (hu : Set.unionₛ c = @Set.univ α)
+theorem eqv_classes_of_disjoint_union {c : Set (Set α)} (hu : Set.sUnion c = @Set.univ α)
     (H : c.PairwiseDisjoint id) (a) : ∃! (b : _)(_ : b ∈ c), a ∈ b :=
-  let ⟨b, hc, ha⟩ := Set.mem_unionₛ.1 <| show a ∈ _ by rw [hu] <;> exact Set.mem_univ a
+  let ⟨b, hc, ha⟩ := Set.mem_sUnion.1 <| show a ∈ _ by rw [hu] <;> exact Set.mem_univ a
   ExistsUnique.intro₂ b hc ha fun b' hc' ha' => H.elim_set hc' hc a ha' ha
 #align setoid.eqv_classes_of_disjoint_union Setoid.eqv_classes_of_disjoint_union
 
 /- warning: setoid.setoid_of_disjoint_union -> Setoid.setoidOfDisjointUnion is a dubious translation:
 lean 3 declaration is
-  forall {α : Type.{u1}} {c : Set.{u1} (Set.{u1} α)}, (Eq.{succ u1} (Set.{u1} α) (Set.unionₛ.{u1} α c) (Set.univ.{u1} α)) -> (Set.PairwiseDisjoint.{u1, u1} (Set.{u1} α) (Set.{u1} α) (CompleteSemilatticeInf.toPartialOrder.{u1} (Set.{u1} α) (CompleteLattice.toCompleteSemilatticeInf.{u1} (Set.{u1} α) (Order.Coframe.toCompleteLattice.{u1} (Set.{u1} α) (CompleteDistribLattice.toCoframe.{u1} (Set.{u1} α) (CompleteBooleanAlgebra.toCompleteDistribLattice.{u1} (Set.{u1} α) (Set.completeBooleanAlgebra.{u1} α)))))) (GeneralizedBooleanAlgebra.toOrderBot.{u1} (Set.{u1} α) (BooleanAlgebra.toGeneralizedBooleanAlgebra.{u1} (Set.{u1} α) (Set.booleanAlgebra.{u1} α))) c (id.{succ u1} (Set.{u1} α))) -> (Setoid.{succ u1} α)
+  forall {α : Type.{u1}} {c : Set.{u1} (Set.{u1} α)}, (Eq.{succ u1} (Set.{u1} α) (Set.sUnion.{u1} α c) (Set.univ.{u1} α)) -> (Set.PairwiseDisjoint.{u1, u1} (Set.{u1} α) (Set.{u1} α) (CompleteSemilatticeInf.toPartialOrder.{u1} (Set.{u1} α) (CompleteLattice.toCompleteSemilatticeInf.{u1} (Set.{u1} α) (Order.Coframe.toCompleteLattice.{u1} (Set.{u1} α) (CompleteDistribLattice.toCoframe.{u1} (Set.{u1} α) (CompleteBooleanAlgebra.toCompleteDistribLattice.{u1} (Set.{u1} α) (Set.completeBooleanAlgebra.{u1} α)))))) (GeneralizedBooleanAlgebra.toOrderBot.{u1} (Set.{u1} α) (BooleanAlgebra.toGeneralizedBooleanAlgebra.{u1} (Set.{u1} α) (Set.booleanAlgebra.{u1} α))) c (id.{succ u1} (Set.{u1} α))) -> (Setoid.{succ u1} α)
 but is expected to have type
-  forall {α : Type.{u1}} {c : Set.{u1} (Set.{u1} α)}, (Eq.{succ u1} (Set.{u1} α) (Set.unionₛ.{u1} α c) (Set.univ.{u1} α)) -> (Set.PairwiseDisjoint.{u1, u1} (Set.{u1} α) (Set.{u1} α) (CompleteSemilatticeInf.toPartialOrder.{u1} (Set.{u1} α) (CompleteLattice.toCompleteSemilatticeInf.{u1} (Set.{u1} α) (Order.Coframe.toCompleteLattice.{u1} (Set.{u1} α) (CompleteDistribLattice.toCoframe.{u1} (Set.{u1} α) (CompleteBooleanAlgebra.toCompleteDistribLattice.{u1} (Set.{u1} α) (Set.instCompleteBooleanAlgebraSet.{u1} α)))))) (BoundedOrder.toOrderBot.{u1} (Set.{u1} α) (Preorder.toLE.{u1} (Set.{u1} α) (PartialOrder.toPreorder.{u1} (Set.{u1} α) (CompleteSemilatticeInf.toPartialOrder.{u1} (Set.{u1} α) (CompleteLattice.toCompleteSemilatticeInf.{u1} (Set.{u1} α) (Order.Coframe.toCompleteLattice.{u1} (Set.{u1} α) (CompleteDistribLattice.toCoframe.{u1} (Set.{u1} α) (CompleteBooleanAlgebra.toCompleteDistribLattice.{u1} (Set.{u1} α) (Set.instCompleteBooleanAlgebraSet.{u1} α)))))))) (CompleteLattice.toBoundedOrder.{u1} (Set.{u1} α) (Order.Coframe.toCompleteLattice.{u1} (Set.{u1} α) (CompleteDistribLattice.toCoframe.{u1} (Set.{u1} α) (CompleteBooleanAlgebra.toCompleteDistribLattice.{u1} (Set.{u1} α) (Set.instCompleteBooleanAlgebraSet.{u1} α)))))) c (id.{succ u1} (Set.{u1} α))) -> (Setoid.{succ u1} α)
+  forall {α : Type.{u1}} {c : Set.{u1} (Set.{u1} α)}, (Eq.{succ u1} (Set.{u1} α) (Set.sUnion.{u1} α c) (Set.univ.{u1} α)) -> (Set.PairwiseDisjoint.{u1, u1} (Set.{u1} α) (Set.{u1} α) (CompleteSemilatticeInf.toPartialOrder.{u1} (Set.{u1} α) (CompleteLattice.toCompleteSemilatticeInf.{u1} (Set.{u1} α) (Order.Coframe.toCompleteLattice.{u1} (Set.{u1} α) (CompleteDistribLattice.toCoframe.{u1} (Set.{u1} α) (CompleteBooleanAlgebra.toCompleteDistribLattice.{u1} (Set.{u1} α) (Set.instCompleteBooleanAlgebraSet.{u1} α)))))) (BoundedOrder.toOrderBot.{u1} (Set.{u1} α) (Preorder.toLE.{u1} (Set.{u1} α) (PartialOrder.toPreorder.{u1} (Set.{u1} α) (CompleteSemilatticeInf.toPartialOrder.{u1} (Set.{u1} α) (CompleteLattice.toCompleteSemilatticeInf.{u1} (Set.{u1} α) (Order.Coframe.toCompleteLattice.{u1} (Set.{u1} α) (CompleteDistribLattice.toCoframe.{u1} (Set.{u1} α) (CompleteBooleanAlgebra.toCompleteDistribLattice.{u1} (Set.{u1} α) (Set.instCompleteBooleanAlgebraSet.{u1} α)))))))) (CompleteLattice.toBoundedOrder.{u1} (Set.{u1} α) (Order.Coframe.toCompleteLattice.{u1} (Set.{u1} α) (CompleteDistribLattice.toCoframe.{u1} (Set.{u1} α) (CompleteBooleanAlgebra.toCompleteDistribLattice.{u1} (Set.{u1} α) (Set.instCompleteBooleanAlgebraSet.{u1} α)))))) c (id.{succ u1} (Set.{u1} α))) -> (Setoid.{succ u1} α)
 Case conversion may be inaccurate. Consider using '#align setoid.setoid_of_disjoint_union Setoid.setoidOfDisjointUnionₓ'. -/
 /-- Makes an equivalence relation from a set of disjoints sets covering α. -/
-def setoidOfDisjointUnion {c : Set (Set α)} (hu : Set.unionₛ c = @Set.univ α)
+def setoidOfDisjointUnion {c : Set (Set α)} (hu : Set.sUnion c = @Set.univ α)
     (H : c.PairwiseDisjoint id) : Setoid α :=
   Setoid.mkClasses c <| eqv_classes_of_disjoint_union hu H
 #align setoid.setoid_of_disjoint_union Setoid.setoidOfDisjointUnion
@@ -259,11 +259,11 @@ theorem mkClasses_classes (r : Setoid α) : mkClasses r.classes classes_eqv_clas
 #align setoid.mk_classes_classes Setoid.mkClasses_classes
 -/
 
-#print Setoid.unionₛ_classes /-
+#print Setoid.sUnion_classes /-
 @[simp]
-theorem unionₛ_classes (r : Setoid α) : ⋃₀ r.classes = Set.univ :=
-  Set.eq_univ_of_forall fun x => Set.mem_unionₛ.2 ⟨{ y | r.Rel y x }, ⟨x, rfl⟩, Setoid.refl _⟩
-#align setoid.sUnion_classes Setoid.unionₛ_classes
+theorem sUnion_classes (r : Setoid α) : ⋃₀ r.classes = Set.univ :=
+  Set.eq_univ_of_forall fun x => Set.mem_sUnion.2 ⟨{ y | r.Rel y x }, ⟨x, rfl⟩, Setoid.refl _⟩
+#align setoid.sUnion_classes Setoid.sUnion_classes
 -/
 
 section Partition
@@ -302,15 +302,15 @@ theorem IsPartition.pairwiseDisjoint {c : Set (Set α)} (hc : IsPartition c) :
   eqv_classes_disjoint hc.2
 #align setoid.is_partition.pairwise_disjoint Setoid.IsPartition.pairwiseDisjoint
 
-#print Setoid.IsPartition.unionₛ_eq_univ /-
-theorem IsPartition.unionₛ_eq_univ {c : Set (Set α)} (hc : IsPartition c) : ⋃₀ c = Set.univ :=
+#print Setoid.IsPartition.sUnion_eq_univ /-
+theorem IsPartition.sUnion_eq_univ {c : Set (Set α)} (hc : IsPartition c) : ⋃₀ c = Set.univ :=
   Set.eq_univ_of_forall fun x =>
-    Set.mem_unionₛ.2 <|
+    Set.mem_sUnion.2 <|
       let ⟨t, ht⟩ := hc.2 x
       ⟨t, by
         simp only [exists_unique_iff_exists] at ht
         tauto⟩
-#align setoid.is_partition.sUnion_eq_univ Setoid.IsPartition.unionₛ_eq_univ
+#align setoid.is_partition.sUnion_eq_univ Setoid.IsPartition.sUnion_eq_univ
 -/
 
 #print Setoid.exists_of_mem_partition /-
@@ -405,7 +405,7 @@ def IsPartition.finpartition {c : Finset (Set α)} (hc : Setoid.IsPartition (c :
     Finpartition (Set.univ : Set α) where
   parts := c
   SupIndep := Finset.supIndep_iff_pairwiseDisjoint.mpr <| eqv_classes_disjoint hc.2
-  supParts := c.sup_id_set_eq_unionₛ.trans hc.unionₛ_eq_univ
+  supParts := c.sup_id_set_eq_sUnion.trans hc.sUnion_eq_univ
   not_bot_mem := hc.left
 #align setoid.is_partition.finpartition Setoid.IsPartition.finpartition
 
@@ -421,7 +421,7 @@ Case conversion may be inaccurate. Consider using '#align finpartition.is_partit
 theorem Finpartition.isPartition_parts {α} (f : Finpartition (Set.univ : Set α)) :
     Setoid.IsPartition (f.parts : Set (Set α)) :=
   ⟨f.not_bot_mem,
-    Setoid.eqv_classes_of_disjoint_union (f.parts.sup_id_set_eq_unionₛ.symm.trans f.supParts)
+    Setoid.eqv_classes_of_disjoint_union (f.parts.sup_id_set_eq_sUnion.symm.trans f.supParts)
       f.SupIndep.PairwiseDisjoint⟩
 #align finpartition.is_partition_parts Finpartition.isPartition_parts
 
@@ -489,11 +489,11 @@ theorem exists_mem (x : α) : ∃ i, x ∈ s i :=
   ⟨hs.index x, hs.mem_index x⟩
 #align indexed_partition.exists_mem IndexedPartition.exists_mem
 
-#print IndexedPartition.unionᵢ /-
-theorem unionᵢ : (⋃ i, s i) = univ := by
+#print IndexedPartition.iUnion /-
+theorem iUnion : (⋃ i, s i) = univ := by
   ext x
   simp [hs.exists_mem x]
-#align indexed_partition.Union IndexedPartition.unionᵢ
+#align indexed_partition.Union IndexedPartition.iUnion
 -/
 
 /- warning: indexed_partition.disjoint -> IndexedPartition.disjoint is a dubious translation:
Diff
@@ -592,7 +592,7 @@ theorem equivQuotient_index_apply (x : α) : hs.equivQuotient (hs.index x) = hs.
 lean 3 declaration is
   forall {ι : Type.{u1}} {α : Type.{u2}} {s : ι -> (Set.{u2} α)} (hs : IndexedPartition.{u1, u2} ι α s) (x : α), Eq.{succ u1} ι (coeFn.{max 1 (max (succ u2) (succ u1)) (succ u1) (succ u2), max (succ u2) (succ u1)} (Equiv.{succ u2, succ u1} (IndexedPartition.Quotient.{u1, u2} ι α s hs) ι) (fun (_x : Equiv.{succ u2, succ u1} (IndexedPartition.Quotient.{u1, u2} ι α s hs) ι) => (IndexedPartition.Quotient.{u1, u2} ι α s hs) -> ι) (Equiv.hasCoeToFun.{succ u2, succ u1} (IndexedPartition.Quotient.{u1, u2} ι α s hs) ι) (Equiv.symm.{succ u1, succ u2} ι (IndexedPartition.Quotient.{u1, u2} ι α s hs) (IndexedPartition.equivQuotient.{u1, u2} ι α s hs)) (IndexedPartition.proj.{u1, u2} ι α s hs x)) (IndexedPartition.index.{u1, u2} ι α s hs x)
 but is expected to have type
-  forall {ι : Type.{u2}} {α : Type.{u1}} {s : ι -> (Set.{u1} α)} (hs : IndexedPartition.{u2, u1} ι α s) (x : α), Eq.{succ u2} ((fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.805 : IndexedPartition.Quotient.{u2, u1} ι α s hs) => ι) (IndexedPartition.proj.{u2, u1} ι α s hs x)) (FunLike.coe.{max (succ u2) (succ u1), succ u1, succ u2} (Equiv.{succ u1, succ u2} (IndexedPartition.Quotient.{u2, u1} ι α s hs) ι) (IndexedPartition.Quotient.{u2, u1} ι α s hs) (fun (_x : IndexedPartition.Quotient.{u2, u1} ι α s hs) => (fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.805 : IndexedPartition.Quotient.{u2, u1} ι α s hs) => ι) _x) (Equiv.instFunLikeEquiv.{succ u1, succ u2} (IndexedPartition.Quotient.{u2, u1} ι α s hs) ι) (Equiv.symm.{succ u2, succ u1} ι (IndexedPartition.Quotient.{u2, u1} ι α s hs) (IndexedPartition.equivQuotient.{u2, u1} ι α s hs)) (IndexedPartition.proj.{u2, u1} ι α s hs x)) (IndexedPartition.index.{u2, u1} ι α s hs x)
+  forall {ι : Type.{u2}} {α : Type.{u1}} {s : ι -> (Set.{u1} α)} (hs : IndexedPartition.{u2, u1} ι α s) (x : α), Eq.{succ u2} ((fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.808 : IndexedPartition.Quotient.{u2, u1} ι α s hs) => ι) (IndexedPartition.proj.{u2, u1} ι α s hs x)) (FunLike.coe.{max (succ u2) (succ u1), succ u1, succ u2} (Equiv.{succ u1, succ u2} (IndexedPartition.Quotient.{u2, u1} ι α s hs) ι) (IndexedPartition.Quotient.{u2, u1} ι α s hs) (fun (_x : IndexedPartition.Quotient.{u2, u1} ι α s hs) => (fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.808 : IndexedPartition.Quotient.{u2, u1} ι α s hs) => ι) _x) (Equiv.instFunLikeEquiv.{succ u1, succ u2} (IndexedPartition.Quotient.{u2, u1} ι α s hs) ι) (Equiv.symm.{succ u2, succ u1} ι (IndexedPartition.Quotient.{u2, u1} ι α s hs) (IndexedPartition.equivQuotient.{u2, u1} ι α s hs)) (IndexedPartition.proj.{u2, u1} ι α s hs x)) (IndexedPartition.index.{u2, u1} ι α s hs x)
 Case conversion may be inaccurate. Consider using '#align indexed_partition.equiv_quotient_symm_proj_apply IndexedPartition.equivQuotient_symm_proj_applyₓ'. -/
 @[simp]
 theorem equivQuotient_symm_proj_apply (x : α) : hs.equivQuotient.symm (hs.proj x) = hs.index x :=
@@ -654,7 +654,7 @@ theorem class_of {x : α} : setOf (hs.Setoid.Rel x) = s (hs.index x) :=
 lean 3 declaration is
   forall {ι : Type.{u1}} {α : Type.{u2}} {s : ι -> (Set.{u2} α)} (hs : IndexedPartition.{u1, u2} ι α s) (x : IndexedPartition.Quotient.{u1, u2} ι α s hs), Eq.{succ u2} (Set.{u2} α) (Set.preimage.{u2, u2} α (IndexedPartition.Quotient.{u1, u2} ι α s hs) (IndexedPartition.proj.{u1, u2} ι α s hs) (Singleton.singleton.{u2, u2} (IndexedPartition.Quotient.{u1, u2} ι α s hs) (Set.{u2} (IndexedPartition.Quotient.{u1, u2} ι α s hs)) (Set.hasSingleton.{u2} (IndexedPartition.Quotient.{u1, u2} ι α s hs)) x)) (s (coeFn.{max 1 (max (succ u2) (succ u1)) (succ u1) (succ u2), max (succ u2) (succ u1)} (Equiv.{succ u2, succ u1} (IndexedPartition.Quotient.{u1, u2} ι α s hs) ι) (fun (_x : Equiv.{succ u2, succ u1} (IndexedPartition.Quotient.{u1, u2} ι α s hs) ι) => (IndexedPartition.Quotient.{u1, u2} ι α s hs) -> ι) (Equiv.hasCoeToFun.{succ u2, succ u1} (IndexedPartition.Quotient.{u1, u2} ι α s hs) ι) (Equiv.symm.{succ u1, succ u2} ι (IndexedPartition.Quotient.{u1, u2} ι α s hs) (IndexedPartition.equivQuotient.{u1, u2} ι α s hs)) x))
 but is expected to have type
-  forall {ι : Type.{u2}} {α : Type.{u1}} {s : ι -> (Set.{u1} α)} (hs : IndexedPartition.{u2, u1} ι α s) (x : IndexedPartition.Quotient.{u2, u1} ι α s hs), Eq.{succ u1} (Set.{u1} α) (Set.preimage.{u1, u1} α (IndexedPartition.Quotient.{u2, u1} ι α s hs) (IndexedPartition.proj.{u2, u1} ι α s hs) (Singleton.singleton.{u1, u1} (IndexedPartition.Quotient.{u2, u1} ι α s hs) (Set.{u1} (IndexedPartition.Quotient.{u2, u1} ι α s hs)) (Set.instSingletonSet.{u1} (IndexedPartition.Quotient.{u2, u1} ι α s hs)) x)) (s (FunLike.coe.{max (succ u2) (succ u1), succ u1, succ u2} (Equiv.{succ u1, succ u2} (IndexedPartition.Quotient.{u2, u1} ι α s hs) ι) (IndexedPartition.Quotient.{u2, u1} ι α s hs) (fun (_x : IndexedPartition.Quotient.{u2, u1} ι α s hs) => (fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.805 : IndexedPartition.Quotient.{u2, u1} ι α s hs) => ι) _x) (Equiv.instFunLikeEquiv.{succ u1, succ u2} (IndexedPartition.Quotient.{u2, u1} ι α s hs) ι) (Equiv.symm.{succ u2, succ u1} ι (IndexedPartition.Quotient.{u2, u1} ι α s hs) (IndexedPartition.equivQuotient.{u2, u1} ι α s hs)) x))
+  forall {ι : Type.{u2}} {α : Type.{u1}} {s : ι -> (Set.{u1} α)} (hs : IndexedPartition.{u2, u1} ι α s) (x : IndexedPartition.Quotient.{u2, u1} ι α s hs), Eq.{succ u1} (Set.{u1} α) (Set.preimage.{u1, u1} α (IndexedPartition.Quotient.{u2, u1} ι α s hs) (IndexedPartition.proj.{u2, u1} ι α s hs) (Singleton.singleton.{u1, u1} (IndexedPartition.Quotient.{u2, u1} ι α s hs) (Set.{u1} (IndexedPartition.Quotient.{u2, u1} ι α s hs)) (Set.instSingletonSet.{u1} (IndexedPartition.Quotient.{u2, u1} ι α s hs)) x)) (s (FunLike.coe.{max (succ u2) (succ u1), succ u1, succ u2} (Equiv.{succ u1, succ u2} (IndexedPartition.Quotient.{u2, u1} ι α s hs) ι) (IndexedPartition.Quotient.{u2, u1} ι α s hs) (fun (_x : IndexedPartition.Quotient.{u2, u1} ι α s hs) => (fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.808 : IndexedPartition.Quotient.{u2, u1} ι α s hs) => ι) _x) (Equiv.instFunLikeEquiv.{succ u1, succ u2} (IndexedPartition.Quotient.{u2, u1} ι α s hs) ι) (Equiv.symm.{succ u2, succ u1} ι (IndexedPartition.Quotient.{u2, u1} ι α s hs) (IndexedPartition.equivQuotient.{u2, u1} ι α s hs)) x))
 Case conversion may be inaccurate. Consider using '#align indexed_partition.proj_fiber IndexedPartition.proj_fiberₓ'. -/
 theorem proj_fiber (x : hs.Quotient) : hs.proj ⁻¹' {x} = s (hs.equivQuotient.symm x) :=
   Quotient.inductionOn' x fun x => by
Diff
@@ -47,7 +47,7 @@ namespace Setoid
 
 variable {α : Type _}
 
-/- ./././Mathport/Syntax/Translate/Basic.lean:628:2: warning: expanding binder collection (b «expr ∈ » c) -/
+/- ./././Mathport/Syntax/Translate/Basic.lean:635:2: warning: expanding binder collection (b «expr ∈ » c) -/
 #print Setoid.eq_of_mem_eqv_class /-
 /-- If x ∈ α is in 2 elements of a set of sets partitioning α, those 2 sets are equal. -/
 theorem eq_of_mem_eqv_class {c : Set (Set α)} (H : ∀ a, ∃! (b : _)(_ : b ∈ c), a ∈ b) {x b b'}
@@ -56,7 +56,7 @@ theorem eq_of_mem_eqv_class {c : Set (Set α)} (H : ∀ a, ∃! (b : _)(_ : b 
 #align setoid.eq_of_mem_eqv_class Setoid.eq_of_mem_eqv_class
 -/
 
-/- ./././Mathport/Syntax/Translate/Basic.lean:628:2: warning: expanding binder collection (b «expr ∈ » c) -/
+/- ./././Mathport/Syntax/Translate/Basic.lean:635:2: warning: expanding binder collection (b «expr ∈ » c) -/
 #print Setoid.mkClasses /-
 /-- Makes an equivalence relation from a set of sets partitioning α. -/
 def mkClasses (c : Set (Set α)) (H : ∀ a, ∃! (b : _)(_ : b ∈ c), a ∈ b) : Setoid α :=
@@ -154,7 +154,7 @@ theorem empty_not_mem_classes {r : Setoid α} : ∅ ∉ r.classes := fun ⟨y, h
 #align setoid.empty_not_mem_classes Setoid.empty_not_mem_classes
 -/
 
-/- ./././Mathport/Syntax/Translate/Basic.lean:628:2: warning: expanding binder collection (b «expr ∈ » r.classes) -/
+/- ./././Mathport/Syntax/Translate/Basic.lean:635:2: warning: expanding binder collection (b «expr ∈ » r.classes) -/
 #print Setoid.classes_eqv_classes /-
 /-- Equivalence classes partition the type. -/
 theorem classes_eqv_classes {r : Setoid α} (a) : ∃! (b : _)(_ : b ∈ r.classes), a ∈ b :=
@@ -174,7 +174,7 @@ theorem eq_of_mem_classes {r : Setoid α} {x b} (hc : b ∈ r.classes) (hb : x 
 #align setoid.eq_of_mem_classes Setoid.eq_of_mem_classes
 -/
 
-/- ./././Mathport/Syntax/Translate/Basic.lean:628:2: warning: expanding binder collection (b «expr ∈ » c) -/
+/- ./././Mathport/Syntax/Translate/Basic.lean:635:2: warning: expanding binder collection (b «expr ∈ » c) -/
 #print Setoid.eq_eqv_class_of_mem /-
 /-- The elements of a set of sets partitioning α are the equivalence classes of the
     equivalence relation defined by the set of sets. -/
@@ -188,7 +188,7 @@ theorem eq_eqv_class_of_mem {c : Set (Set α)} (H : ∀ a, ∃! (b : _)(_ : b 
 #align setoid.eq_eqv_class_of_mem Setoid.eq_eqv_class_of_mem
 -/
 
-/- ./././Mathport/Syntax/Translate/Basic.lean:628:2: warning: expanding binder collection (b «expr ∈ » c) -/
+/- ./././Mathport/Syntax/Translate/Basic.lean:635:2: warning: expanding binder collection (b «expr ∈ » c) -/
 #print Setoid.eqv_class_mem /-
 /-- The equivalence classes of the equivalence relation defined by a set of sets
     partitioning α are elements of the set of sets. -/
@@ -198,7 +198,7 @@ theorem eqv_class_mem {c : Set (Set α)} (H : ∀ a, ∃! (b : _)(_ : b ∈ c),
 #align setoid.eqv_class_mem Setoid.eqv_class_mem
 -/
 
-/- ./././Mathport/Syntax/Translate/Basic.lean:628:2: warning: expanding binder collection (b «expr ∈ » c) -/
+/- ./././Mathport/Syntax/Translate/Basic.lean:635:2: warning: expanding binder collection (b «expr ∈ » c) -/
 #print Setoid.eqv_class_mem' /-
 theorem eqv_class_mem' {c : Set (Set α)} (H : ∀ a, ∃! (b : _)(_ : b ∈ c), a ∈ b) {x} :
     { y : α | (mkClasses c H).Rel x y } ∈ c :=
@@ -215,7 +215,7 @@ lean 3 declaration is
 but is expected to have type
   forall {α : Type.{u1}} {c : Set.{u1} (Set.{u1} α)}, (forall (a : α), ExistsUnique.{succ u1} (Set.{u1} α) (fun (b : Set.{u1} α) => ExistsUnique.{0} (Membership.mem.{u1, u1} (Set.{u1} α) (Set.{u1} (Set.{u1} α)) (Set.instMembershipSet.{u1} (Set.{u1} α)) b c) (fun (H : Membership.mem.{u1, u1} (Set.{u1} α) (Set.{u1} (Set.{u1} α)) (Set.instMembershipSet.{u1} (Set.{u1} α)) b c) => Membership.mem.{u1, u1} α (Set.{u1} α) (Set.instMembershipSet.{u1} α) a b))) -> (Set.PairwiseDisjoint.{u1, u1} (Set.{u1} α) (Set.{u1} α) (CompleteSemilatticeInf.toPartialOrder.{u1} (Set.{u1} α) (CompleteLattice.toCompleteSemilatticeInf.{u1} (Set.{u1} α) (Order.Coframe.toCompleteLattice.{u1} (Set.{u1} α) (CompleteDistribLattice.toCoframe.{u1} (Set.{u1} α) (CompleteBooleanAlgebra.toCompleteDistribLattice.{u1} (Set.{u1} α) (Set.instCompleteBooleanAlgebraSet.{u1} α)))))) (BoundedOrder.toOrderBot.{u1} (Set.{u1} α) (Preorder.toLE.{u1} (Set.{u1} α) (PartialOrder.toPreorder.{u1} (Set.{u1} α) (CompleteSemilatticeInf.toPartialOrder.{u1} (Set.{u1} α) (CompleteLattice.toCompleteSemilatticeInf.{u1} (Set.{u1} α) (Order.Coframe.toCompleteLattice.{u1} (Set.{u1} α) (CompleteDistribLattice.toCoframe.{u1} (Set.{u1} α) (CompleteBooleanAlgebra.toCompleteDistribLattice.{u1} (Set.{u1} α) (Set.instCompleteBooleanAlgebraSet.{u1} α)))))))) (CompleteLattice.toBoundedOrder.{u1} (Set.{u1} α) (Order.Coframe.toCompleteLattice.{u1} (Set.{u1} α) (CompleteDistribLattice.toCoframe.{u1} (Set.{u1} α) (CompleteBooleanAlgebra.toCompleteDistribLattice.{u1} (Set.{u1} α) (Set.instCompleteBooleanAlgebraSet.{u1} α)))))) c (id.{succ u1} (Set.{u1} α)))
 Case conversion may be inaccurate. Consider using '#align setoid.eqv_classes_disjoint Setoid.eqv_classes_disjointₓ'. -/
-/- ./././Mathport/Syntax/Translate/Basic.lean:628:2: warning: expanding binder collection (b «expr ∈ » c) -/
+/- ./././Mathport/Syntax/Translate/Basic.lean:635:2: warning: expanding binder collection (b «expr ∈ » c) -/
 /-- Distinct elements of a set of sets partitioning α are disjoint. -/
 theorem eqv_classes_disjoint {c : Set (Set α)} (H : ∀ a, ∃! (b : _)(_ : b ∈ c), a ∈ b) :
     c.PairwiseDisjoint id := fun b₁ h₁ b₂ h₂ h =>
@@ -229,7 +229,7 @@ lean 3 declaration is
 but is expected to have type
   forall {α : Type.{u1}} {c : Set.{u1} (Set.{u1} α)}, (Eq.{succ u1} (Set.{u1} α) (Set.unionₛ.{u1} α c) (Set.univ.{u1} α)) -> (Set.PairwiseDisjoint.{u1, u1} (Set.{u1} α) (Set.{u1} α) (CompleteSemilatticeInf.toPartialOrder.{u1} (Set.{u1} α) (CompleteLattice.toCompleteSemilatticeInf.{u1} (Set.{u1} α) (Order.Coframe.toCompleteLattice.{u1} (Set.{u1} α) (CompleteDistribLattice.toCoframe.{u1} (Set.{u1} α) (CompleteBooleanAlgebra.toCompleteDistribLattice.{u1} (Set.{u1} α) (Set.instCompleteBooleanAlgebraSet.{u1} α)))))) (BoundedOrder.toOrderBot.{u1} (Set.{u1} α) (Preorder.toLE.{u1} (Set.{u1} α) (PartialOrder.toPreorder.{u1} (Set.{u1} α) (CompleteSemilatticeInf.toPartialOrder.{u1} (Set.{u1} α) (CompleteLattice.toCompleteSemilatticeInf.{u1} (Set.{u1} α) (Order.Coframe.toCompleteLattice.{u1} (Set.{u1} α) (CompleteDistribLattice.toCoframe.{u1} (Set.{u1} α) (CompleteBooleanAlgebra.toCompleteDistribLattice.{u1} (Set.{u1} α) (Set.instCompleteBooleanAlgebraSet.{u1} α)))))))) (CompleteLattice.toBoundedOrder.{u1} (Set.{u1} α) (Order.Coframe.toCompleteLattice.{u1} (Set.{u1} α) (CompleteDistribLattice.toCoframe.{u1} (Set.{u1} α) (CompleteBooleanAlgebra.toCompleteDistribLattice.{u1} (Set.{u1} α) (Set.instCompleteBooleanAlgebraSet.{u1} α)))))) c (id.{succ u1} (Set.{u1} α))) -> (forall (a : α), ExistsUnique.{succ u1} (Set.{u1} α) (fun (b : Set.{u1} α) => ExistsUnique.{0} (Membership.mem.{u1, u1} (Set.{u1} α) (Set.{u1} (Set.{u1} α)) (Set.instMembershipSet.{u1} (Set.{u1} α)) b c) (fun (H : Membership.mem.{u1, u1} (Set.{u1} α) (Set.{u1} (Set.{u1} α)) (Set.instMembershipSet.{u1} (Set.{u1} α)) b c) => Membership.mem.{u1, u1} α (Set.{u1} α) (Set.instMembershipSet.{u1} α) a b)))
 Case conversion may be inaccurate. Consider using '#align setoid.eqv_classes_of_disjoint_union Setoid.eqv_classes_of_disjoint_unionₓ'. -/
-/- ./././Mathport/Syntax/Translate/Basic.lean:628:2: warning: expanding binder collection (b «expr ∈ » c) -/
+/- ./././Mathport/Syntax/Translate/Basic.lean:635:2: warning: expanding binder collection (b «expr ∈ » c) -/
 /-- A set of disjoint sets covering α partition α (classical). -/
 theorem eqv_classes_of_disjoint_union {c : Set (Set α)} (hu : Set.unionₛ c = @Set.univ α)
     (H : c.PairwiseDisjoint id) (a) : ∃! (b : _)(_ : b ∈ c), a ∈ b :=
@@ -268,7 +268,7 @@ theorem unionₛ_classes (r : Setoid α) : ⋃₀ r.classes = Set.univ :=
 
 section Partition
 
-/- ./././Mathport/Syntax/Translate/Basic.lean:628:2: warning: expanding binder collection (b «expr ∈ » c) -/
+/- ./././Mathport/Syntax/Translate/Basic.lean:635:2: warning: expanding binder collection (b «expr ∈ » c) -/
 #print Setoid.IsPartition /-
 /-- A collection `c : set (set α)` of sets is a partition of `α` into pairwise
 disjoint sets if `∅ ∉ c` and each element `a : α` belongs to a unique set `b ∈ c`. -/

Changes in mathlib4

mathlib3
mathlib4
feat: ∃! x ∈ s, p x syntax (#12237)

More generally, adds a binderPred variant for ExistsUnique.

Uses this syntax to clean up Mathlib.Data.Setoid.Partition and remove Mathport warnings.

Diff
@@ -39,29 +39,25 @@ namespace Setoid
 
 variable {α : Type*}
 
-/- ./././Mathport/Syntax/Translate/Basic.lean:628:2:
--- warning: expanding binder collection (b «expr ∈ » c) -/
 /-- If x ∈ α is in 2 elements of a set of sets partitioning α, those 2 sets are equal. -/
-theorem eq_of_mem_eqv_class {c : Set (Set α)} (H : ∀ a, ∃! b, ∃! _ : b ∈ c, a ∈ b) {x b b'}
+theorem eq_of_mem_eqv_class {c : Set (Set α)} (H : ∀ a, ∃! b ∈ c, a ∈ b) {x b b'}
     (hc : b ∈ c) (hb : x ∈ b) (hc' : b' ∈ c) (hb' : x ∈ b') : b = b' :=
-  (H x).unique₂ hc hb hc' hb'
+  (H x).unique ⟨hc, hb⟩ ⟨hc', hb'⟩
 #align setoid.eq_of_mem_eqv_class Setoid.eq_of_mem_eqv_class
 
-/- ./././Mathport/Syntax/Translate/Basic.lean:628:2:
--- warning: expanding binder collection (b «expr ∈ » c) -/
 /-- Makes an equivalence relation from a set of sets partitioning α. -/
-def mkClasses (c : Set (Set α)) (H : ∀ a, ∃! b, ∃! _ : b ∈ c, a ∈ b) : Setoid α :=
-  ⟨fun x y => ∀ s ∈ c, x ∈ s → y ∈ s,
-    ⟨fun _ _ _ hx => hx, fun {x _y} h s hs hy =>
-      (H x).elim₂ fun t ht hx _ =>
-        have : s = t := eq_of_mem_eqv_class H hs hy ht (h t ht hx)
-        this.symm ▸ hx,
-      fun {_x y z} h1 h2 s hs hx =>
-      (H y).elim₂ fun t ht hy _ =>
-        (H z).elim₂ fun t' ht' hz _ =>
-          have hst : s = t := eq_of_mem_eqv_class H hs (h1 _ hs hx) ht hy
-          have htt' : t = t' := eq_of_mem_eqv_class H ht (h2 _ ht hy) ht' hz
-          (hst.trans htt').symm ▸ hz⟩⟩
+def mkClasses (c : Set (Set α)) (H : ∀ a, ∃! b ∈ c, a ∈ b) : Setoid α where
+  r x y := ∀ s ∈ c, x ∈ s → y ∈ s
+  iseqv.refl := fun _ _ _ hx => hx
+  iseqv.symm := fun {x _y} h s hs hy => by
+    obtain ⟨t, ⟨ht, hx⟩, _⟩ := H x
+    rwa [eq_of_mem_eqv_class H hs hy ht (h t ht hx)]
+  iseqv.trans := fun {_x y z} h1 h2 s hs hx => by
+    obtain ⟨t, ⟨ht, hy⟩, _⟩ := H y
+    obtain ⟨t', ⟨ht', hy'⟩, _⟩ := H z
+    have hst : s = t := eq_of_mem_eqv_class H hs (h1 _ hs hx) ht hy
+    have htt' : t = t' := eq_of_mem_eqv_class H ht (h2 _ ht hy) ht' hy'
+    rwa [hst, htt']
 #align setoid.mk_classes Setoid.mkClasses
 
 /-- Makes the equivalence classes of an equivalence relation. -/
@@ -112,12 +108,10 @@ theorem empty_not_mem_classes {r : Setoid α} : ∅ ∉ r.classes := fun ⟨y, h
   Set.not_mem_empty y <| hy.symm ▸ r.refl' y
 #align setoid.empty_not_mem_classes Setoid.empty_not_mem_classes
 
-/- ./././Mathport/Syntax/Translate/Basic.lean:628:2:
--- warning: expanding binder collection (b «expr ∈ » r.classes) -/
 /-- Equivalence classes partition the type. -/
-theorem classes_eqv_classes {r : Setoid α} (a) : ∃! b, ∃! _ : b ∈ r.classes, a ∈ b :=
-  ExistsUnique.intro₂ { x | r.Rel x a } (r.mem_classes a) (r.refl' _) <| by
-    rintro _ ⟨y, rfl⟩ ha
+theorem classes_eqv_classes {r : Setoid α} (a) : ∃! b ∈ r.classes, a ∈ b :=
+  ExistsUnique.intro { x | r.Rel x a } ⟨r.mem_classes a, r.refl' _⟩ <| by
+    rintro y ⟨⟨_, rfl⟩, ha⟩
     ext x
     exact ⟨fun hx => r.trans' hx (r.symm' ha), fun hx => r.trans' hx ha⟩
 #align setoid.classes_eqv_classes Setoid.classes_eqv_classes
@@ -128,52 +122,44 @@ theorem eq_of_mem_classes {r : Setoid α} {x b} (hc : b ∈ r.classes) (hb : x 
   eq_of_mem_eqv_class classes_eqv_classes hc hb hc' hb'
 #align setoid.eq_of_mem_classes Setoid.eq_of_mem_classes
 
-/- ./././Mathport/Syntax/Translate/Basic.lean:628:2:
--- warning: expanding binder collection (b «expr ∈ » c) -/
 /-- The elements of a set of sets partitioning α are the equivalence classes of the
     equivalence relation defined by the set of sets. -/
-theorem eq_eqv_class_of_mem {c : Set (Set α)} (H : ∀ a, ∃! b, ∃! _ : b ∈ c, a ∈ b) {s y}
-    (hs : s ∈ c) (hy : y ∈ s) : s = { x | (mkClasses c H).Rel x y } :=
-  Set.ext fun x =>
-    ⟨fun hs' => symm' (mkClasses c H) fun _b' hb' h' => eq_of_mem_eqv_class H hs hy hb' h' ▸ hs',
-      fun hx =>
-      (H x).elim₂ fun b' hc' hb' _h' =>
-        (eq_of_mem_eqv_class H hs hy hc' <| hx b' hc' hb').symm ▸ hb'⟩
+theorem eq_eqv_class_of_mem {c : Set (Set α)} (H : ∀ a, ∃! b ∈ c, a ∈ b) {s y}
+    (hs : s ∈ c) (hy : y ∈ s) : s = { x | (mkClasses c H).Rel x y } := by
+  ext x
+  constructor
+  · intro hx _s' hs' hx'
+    rwa [eq_of_mem_eqv_class H hs' hx' hs hx]
+  · intro hx
+    obtain ⟨b', ⟨hc, hb'⟩, _⟩ := H x
+    rwa [eq_of_mem_eqv_class H hs hy hc (hx b' hc hb')]
 #align setoid.eq_eqv_class_of_mem Setoid.eq_eqv_class_of_mem
 
-/- ./././Mathport/Syntax/Translate/Basic.lean:628:2:
--- warning: expanding binder collection (b «expr ∈ » c) -/
 /-- The equivalence classes of the equivalence relation defined by a set of sets
     partitioning α are elements of the set of sets. -/
-theorem eqv_class_mem {c : Set (Set α)} (H : ∀ a, ∃! b, ∃! _ : b ∈ c, a ∈ b) {y} :
+theorem eqv_class_mem {c : Set (Set α)} (H : ∀ a, ∃! b ∈ c, a ∈ b) {y} :
     { x | (mkClasses c H).Rel x y } ∈ c :=
-  (H y).elim₂ fun _b hc hy _hb => eq_eqv_class_of_mem H hc hy ▸ hc
+  (H y).elim fun _ hc _ => eq_eqv_class_of_mem H hc.1 hc.2 ▸ hc.1
 #align setoid.eqv_class_mem Setoid.eqv_class_mem
 
-/- ./././Mathport/Syntax/Translate/Basic.lean:628:2:
--- warning: expanding binder collection (b «expr ∈ » c) -/
-theorem eqv_class_mem' {c : Set (Set α)} (H : ∀ a, ∃! b, ∃! _ : b ∈ c, a ∈ b) {x} :
+theorem eqv_class_mem' {c : Set (Set α)} (H : ∀ a, ∃! b ∈ c, a ∈ b) {x} :
     { y : α | (mkClasses c H).Rel x y } ∈ c := by
   convert @Setoid.eqv_class_mem _ _ H x using 3
   rw [Setoid.comm']
 #align setoid.eqv_class_mem' Setoid.eqv_class_mem'
 
-/- ./././Mathport/Syntax/Translate/Basic.lean:628:2:
--- warning: expanding binder collection (b «expr ∈ » c) -/
 /-- Distinct elements of a set of sets partitioning α are disjoint. -/
-theorem eqv_classes_disjoint {c : Set (Set α)} (H : ∀ a, ∃! b, ∃! _ : b ∈ c, a ∈ b) :
+theorem eqv_classes_disjoint {c : Set (Set α)} (H : ∀ a, ∃! b ∈ c, a ∈ b) :
     c.PairwiseDisjoint id := fun _b₁ h₁ _b₂ h₂ h =>
   Set.disjoint_left.2 fun x hx1 hx2 =>
-    (H x).elim₂ fun _b _hc _hx _hb => h <| eq_of_mem_eqv_class H h₁ hx1 h₂ hx2
+    (H x).elim fun _b _hc _hx => h <| eq_of_mem_eqv_class H h₁ hx1 h₂ hx2
 #align setoid.eqv_classes_disjoint Setoid.eqv_classes_disjoint
 
-/- ./././Mathport/Syntax/Translate/Basic.lean:628:2:
--- warning: expanding binder collection (b «expr ∈ » c) -/
 /-- A set of disjoint sets covering α partition α (classical). -/
 theorem eqv_classes_of_disjoint_union {c : Set (Set α)} (hu : Set.sUnion c = @Set.univ α)
-    (H : c.PairwiseDisjoint id) (a) : ∃! b, ∃! _ : b ∈ c, a ∈ b :=
+    (H : c.PairwiseDisjoint id) (a) : ∃! b ∈ c, a ∈ b :=
   let ⟨b, hc, ha⟩ := Set.mem_sUnion.1 <| show a ∈ _ by rw [hu]; exact Set.mem_univ a
-  ExistsUnique.intro₂ b hc ha fun b' hc' ha' => H.elim_set hc' hc a ha' ha
+  ExistsUnique.intro b ⟨hc, ha⟩ fun b' hc' => H.elim_set hc'.1 hc _ hc'.2 ha
 #align setoid.eqv_classes_of_disjoint_union Setoid.eqv_classes_of_disjoint_union
 
 /-- Makes an equivalence relation from a set of disjoints sets covering α. -/
@@ -224,12 +210,9 @@ lemma quotientEquivClasses_mk_eq (r : Setoid α) (a : α) :
 
 section Partition
 
-/- ./././Mathport/Syntax/Translate/Basic.lean:628:2:
--- warning: expanding binder collection (b «expr ∈ » c) -/
 /-- A collection `c : Set (Set α)` of sets is a partition of `α` into pairwise
 disjoint sets if `∅ ∉ c` and each element `a : α` belongs to a unique set `b ∈ c`. -/
-def IsPartition (c : Set (Set α)) :=
-  ∅ ∉ c ∧ ∀ a, ∃! b, ∃! _ : b ∈ c, a ∈ b
+def IsPartition (c : Set (Set α)) := ∅ ∉ c ∧ ∀ a, ∃! b ∈ c, a ∈ b
 #align setoid.is_partition Setoid.IsPartition
 
 /-- A partition of `α` does not contain the empty set. -/
@@ -265,12 +248,14 @@ theorem exists_of_mem_partition {c : Set (Set α)} (hc : IsPartition c) {s} (hs
 
 /-- The equivalence classes of the equivalence relation defined by a partition of α equal
     the original partition. -/
-theorem classes_mkClasses (c : Set (Set α)) (hc : IsPartition c) : (mkClasses c hc.2).classes = c :=
-  Set.ext fun s => ⟨fun ⟨y, hs⟩ => (hc.2 y).elim₂ fun b hm hb _hy => by
-    rwa [show s = b from hs.symm ▸ Set.ext fun x =>
-      ⟨fun hx => symm' (mkClasses c hc.2) hx b hm hb, fun hx b' hc' hx' =>
-          eq_of_mem_eqv_class hc.2 hm hx hc' hx' ▸ hb⟩],
-    exists_of_mem_partition hc⟩
+theorem classes_mkClasses (c : Set (Set α)) (hc : IsPartition c) :
+    (mkClasses c hc.2).classes = c := by
+  ext s
+  constructor
+  · rintro ⟨y, rfl⟩
+    obtain ⟨b, ⟨hb, hy⟩, _⟩ := hc.2 y
+    rwa [← eq_eqv_class_of_mem _ hb hy]
+  · exact exists_of_mem_partition hc
 #align setoid.classes_mk_classes Setoid.classes_mkClasses
 
 /-- Defining `≤` on partitions as the `≤` defined on their induced equivalence relations. -/
feat: make ExistsUnique notation throw an error when used with more than one binder (#12218)

Zulip discussion

Diff
@@ -42,7 +42,7 @@ variable {α : Type*}
 /- ./././Mathport/Syntax/Translate/Basic.lean:628:2:
 -- warning: expanding binder collection (b «expr ∈ » c) -/
 /-- If x ∈ α is in 2 elements of a set of sets partitioning α, those 2 sets are equal. -/
-theorem eq_of_mem_eqv_class {c : Set (Set α)} (H : ∀ a, ∃! (b : _) (_ : b ∈ c), a ∈ b) {x b b'}
+theorem eq_of_mem_eqv_class {c : Set (Set α)} (H : ∀ a, ∃! b, ∃! _ : b ∈ c, a ∈ b) {x b b'}
     (hc : b ∈ c) (hb : x ∈ b) (hc' : b' ∈ c) (hb' : x ∈ b') : b = b' :=
   (H x).unique₂ hc hb hc' hb'
 #align setoid.eq_of_mem_eqv_class Setoid.eq_of_mem_eqv_class
@@ -50,7 +50,7 @@ theorem eq_of_mem_eqv_class {c : Set (Set α)} (H : ∀ a, ∃! (b : _) (_ : b 
 /- ./././Mathport/Syntax/Translate/Basic.lean:628:2:
 -- warning: expanding binder collection (b «expr ∈ » c) -/
 /-- Makes an equivalence relation from a set of sets partitioning α. -/
-def mkClasses (c : Set (Set α)) (H : ∀ a, ∃! (b : _) (_ : b ∈ c), a ∈ b) : Setoid α :=
+def mkClasses (c : Set (Set α)) (H : ∀ a, ∃! b, ∃! _ : b ∈ c, a ∈ b) : Setoid α :=
   ⟨fun x y => ∀ s ∈ c, x ∈ s → y ∈ s,
     ⟨fun _ _ _ hx => hx, fun {x _y} h s hs hy =>
       (H x).elim₂ fun t ht hx _ =>
@@ -115,7 +115,7 @@ theorem empty_not_mem_classes {r : Setoid α} : ∅ ∉ r.classes := fun ⟨y, h
 /- ./././Mathport/Syntax/Translate/Basic.lean:628:2:
 -- warning: expanding binder collection (b «expr ∈ » r.classes) -/
 /-- Equivalence classes partition the type. -/
-theorem classes_eqv_classes {r : Setoid α} (a) : ∃! (b : _) (_ : b ∈ r.classes), a ∈ b :=
+theorem classes_eqv_classes {r : Setoid α} (a) : ∃! b, ∃! _ : b ∈ r.classes, a ∈ b :=
   ExistsUnique.intro₂ { x | r.Rel x a } (r.mem_classes a) (r.refl' _) <| by
     rintro _ ⟨y, rfl⟩ ha
     ext x
@@ -132,7 +132,7 @@ theorem eq_of_mem_classes {r : Setoid α} {x b} (hc : b ∈ r.classes) (hb : x 
 -- warning: expanding binder collection (b «expr ∈ » c) -/
 /-- The elements of a set of sets partitioning α are the equivalence classes of the
     equivalence relation defined by the set of sets. -/
-theorem eq_eqv_class_of_mem {c : Set (Set α)} (H : ∀ a, ∃! (b : _) (_ : b ∈ c), a ∈ b) {s y}
+theorem eq_eqv_class_of_mem {c : Set (Set α)} (H : ∀ a, ∃! b, ∃! _ : b ∈ c, a ∈ b) {s y}
     (hs : s ∈ c) (hy : y ∈ s) : s = { x | (mkClasses c H).Rel x y } :=
   Set.ext fun x =>
     ⟨fun hs' => symm' (mkClasses c H) fun _b' hb' h' => eq_of_mem_eqv_class H hs hy hb' h' ▸ hs',
@@ -145,14 +145,14 @@ theorem eq_eqv_class_of_mem {c : Set (Set α)} (H : ∀ a, ∃! (b : _) (_ : b 
 -- warning: expanding binder collection (b «expr ∈ » c) -/
 /-- The equivalence classes of the equivalence relation defined by a set of sets
     partitioning α are elements of the set of sets. -/
-theorem eqv_class_mem {c : Set (Set α)} (H : ∀ a, ∃! (b : _) (_ : b ∈ c), a ∈ b) {y} :
+theorem eqv_class_mem {c : Set (Set α)} (H : ∀ a, ∃! b, ∃! _ : b ∈ c, a ∈ b) {y} :
     { x | (mkClasses c H).Rel x y } ∈ c :=
   (H y).elim₂ fun _b hc hy _hb => eq_eqv_class_of_mem H hc hy ▸ hc
 #align setoid.eqv_class_mem Setoid.eqv_class_mem
 
 /- ./././Mathport/Syntax/Translate/Basic.lean:628:2:
 -- warning: expanding binder collection (b «expr ∈ » c) -/
-theorem eqv_class_mem' {c : Set (Set α)} (H : ∀ a, ∃! (b : _) (_ : b ∈ c), a ∈ b) {x} :
+theorem eqv_class_mem' {c : Set (Set α)} (H : ∀ a, ∃! b, ∃! _ : b ∈ c, a ∈ b) {x} :
     { y : α | (mkClasses c H).Rel x y } ∈ c := by
   convert @Setoid.eqv_class_mem _ _ H x using 3
   rw [Setoid.comm']
@@ -161,7 +161,7 @@ theorem eqv_class_mem' {c : Set (Set α)} (H : ∀ a, ∃! (b : _) (_ : b ∈ c)
 /- ./././Mathport/Syntax/Translate/Basic.lean:628:2:
 -- warning: expanding binder collection (b «expr ∈ » c) -/
 /-- Distinct elements of a set of sets partitioning α are disjoint. -/
-theorem eqv_classes_disjoint {c : Set (Set α)} (H : ∀ a, ∃! (b : _) (_ : b ∈ c), a ∈ b) :
+theorem eqv_classes_disjoint {c : Set (Set α)} (H : ∀ a, ∃! b, ∃! _ : b ∈ c, a ∈ b) :
     c.PairwiseDisjoint id := fun _b₁ h₁ _b₂ h₂ h =>
   Set.disjoint_left.2 fun x hx1 hx2 =>
     (H x).elim₂ fun _b _hc _hx _hb => h <| eq_of_mem_eqv_class H h₁ hx1 h₂ hx2
@@ -171,7 +171,7 @@ theorem eqv_classes_disjoint {c : Set (Set α)} (H : ∀ a, ∃! (b : _) (_ : b
 -- warning: expanding binder collection (b «expr ∈ » c) -/
 /-- A set of disjoint sets covering α partition α (classical). -/
 theorem eqv_classes_of_disjoint_union {c : Set (Set α)} (hu : Set.sUnion c = @Set.univ α)
-    (H : c.PairwiseDisjoint id) (a) : ∃! (b : _) (_ : b ∈ c), a ∈ b :=
+    (H : c.PairwiseDisjoint id) (a) : ∃! b, ∃! _ : b ∈ c, a ∈ b :=
   let ⟨b, hc, ha⟩ := Set.mem_sUnion.1 <| show a ∈ _ by rw [hu]; exact Set.mem_univ a
   ExistsUnique.intro₂ b hc ha fun b' hc' ha' => H.elim_set hc' hc a ha' ha
 #align setoid.eqv_classes_of_disjoint_union Setoid.eqv_classes_of_disjoint_union
@@ -229,7 +229,7 @@ section Partition
 /-- A collection `c : Set (Set α)` of sets is a partition of `α` into pairwise
 disjoint sets if `∅ ∉ c` and each element `a : α` belongs to a unique set `b ∈ c`. -/
 def IsPartition (c : Set (Set α)) :=
-  ∅ ∉ c ∧ ∀ a, ∃! (b : _) (_ : b ∈ c), a ∈ b
+  ∅ ∉ c ∧ ∀ a, ∃! b, ∃! _ : b ∈ c, a ∈ b
 #align setoid.is_partition Setoid.IsPartition
 
 /-- A partition of `α` does not contain the empty set. -/
style: replace '.-/' by '. -/' (#11938)

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

Diff
@@ -502,7 +502,7 @@ theorem proj_fiber (x : hs.Quotient) : hs.proj ⁻¹' {x} = s (hs.equivQuotient.
 
 /-- Combine functions with disjoint domains into a new function.
 You can use the regular expression `def.*piecewise` to search for
-other ways to define piecewise functions in mathlib4.-/
+other ways to define piecewise functions in mathlib4. -/
 def piecewise {β : Type*} (f : ι → α → β) : α → β := fun x => f (hs.index x) x
 
 lemma piecewise_apply {β : Type*} {f : ι → α → β} (x : α) : hs.piecewise f x = f (hs.index x) x :=
@@ -512,7 +512,7 @@ open Function
 
 /-- A family of injective functions with pairwise disjoint
 domains and pairwise disjoint ranges can be glued together
-to form an injective function.-/
+to form an injective function. -/
 theorem piecewise_inj {β : Type*} {f : ι → α → β}
     (h_injOn : ∀ i, InjOn (f i) (s i))
     (h_disjoint : PairwiseDisjoint (univ : Set ι) fun i => (f i) '' (s i)) :
@@ -527,7 +527,7 @@ theorem piecewise_inj {β : Type*} {f : ι → α → β}
 
 /-- A family of bijective functions with pairwise disjoint
 domains and pairwise disjoint ranges can be glued together
-to form a bijective function.-/
+to form a bijective function. -/
 theorem piecewise_bij {β : Type*} {f : ι → α → β}
     {t : ι → Set β} (ht : IndexedPartition t)
     (hf : ∀ i, BijOn (f i) (s i) (t i)) :
style: homogenise porting notes (#11145)

Homogenises porting notes via capitalisation and addition of whitespace.

It makes the following changes:

  • converts "--porting note" into "-- Porting note";
  • converts "porting note" into "Porting note".
Diff
@@ -385,7 +385,7 @@ instance [Unique ι] [Inhabited α] : Inhabited (IndexedPartition fun _i : ι =>
       index := default
       mem_index := Set.mem_univ }⟩
 
--- porting note: `simpNF` complains about `mem_index`
+-- Porting note: `simpNF` complains about `mem_index`
 attribute [simp] some_mem --mem_index
 
 theorem exists_mem (x : α) : ∃ i, x ∈ s i :=
feat(Data/Setoid): another way to define piecewise functions (#7273)

Use IndexedPartition to define piecewise functions. This is natural for piecewise functions that are split into many pieces.​

Diff
@@ -1,11 +1,9 @@
 /-
 Copyright (c) 2019 Amelia Livingston. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
-Authors: Amelia Livingston, Bryan Gin-ge Chen, Patrick Massot
+Authors: Amelia Livingston, Bryan Gin-ge Chen, Patrick Massot, Wen Yang, Johan Commelin
 -/
-import Mathlib.Data.Fintype.Basic
 import Mathlib.Data.Set.Finite
-import Mathlib.Data.Setoid.Basic
 import Mathlib.Order.Partition.Finpartition
 
 #align_import data.setoid.partition from "leanprover-community/mathlib"@"b363547b3113d350d053abdf2884e9850a56b205"
@@ -502,4 +500,51 @@ theorem proj_fiber (x : hs.Quotient) : hs.proj ⁻¹' {x} = s (hs.equivQuotient.
     exact Quotient.eq''
 #align indexed_partition.proj_fiber IndexedPartition.proj_fiber
 
+/-- Combine functions with disjoint domains into a new function.
+You can use the regular expression `def.*piecewise` to search for
+other ways to define piecewise functions in mathlib4.-/
+def piecewise {β : Type*} (f : ι → α → β) : α → β := fun x => f (hs.index x) x
+
+lemma piecewise_apply {β : Type*} {f : ι → α → β} (x : α) : hs.piecewise f x = f (hs.index x) x :=
+  rfl
+
+open Function
+
+/-- A family of injective functions with pairwise disjoint
+domains and pairwise disjoint ranges can be glued together
+to form an injective function.-/
+theorem piecewise_inj {β : Type*} {f : ι → α → β}
+    (h_injOn : ∀ i, InjOn (f i) (s i))
+    (h_disjoint : PairwiseDisjoint (univ : Set ι) fun i => (f i) '' (s i)) :
+    Injective (piecewise hs f) := by
+  intro x y h
+  suffices hs.index x = hs.index y by
+    apply h_injOn (hs.index x) (hs.mem_index x) (this ▸ hs.mem_index y)
+    simpa only [piecewise_apply, this] using h
+  apply h_disjoint.elim trivial trivial
+  contrapose! h
+  exact h.ne_of_mem (mem_image_of_mem _ (hs.mem_index x)) (mem_image_of_mem _ (hs.mem_index y))
+
+/-- A family of bijective functions with pairwise disjoint
+domains and pairwise disjoint ranges can be glued together
+to form a bijective function.-/
+theorem piecewise_bij {β : Type*} {f : ι → α → β}
+    {t : ι → Set β} (ht : IndexedPartition t)
+    (hf : ∀ i, BijOn (f i) (s i) (t i)) :
+    Bijective (piecewise hs f) := by
+  set g := piecewise hs f with hg
+  have hg_bij : ∀ i, BijOn g (s i) (t i) := by
+    intro i
+    refine BijOn.congr (hf i) ?_
+    intro x hx
+    rw [hg, piecewise_apply, hs.mem_iff_index_eq.mp hx]
+  have hg_inj : InjOn g (⋃ i, s i) := by
+    refine injOn_of_injective ?_ (⋃ (i : ι), s i)
+    refine piecewise_inj hs (fun i ↦ BijOn.injOn (hf i)) ?h_disjoint
+    simp only [fun i ↦ BijOn.image_eq (hf i)]
+    rintro i - j - hij
+    exact ht.disjoint hij
+  rw [bijective_iff_bijOn_univ, ← hs.iUnion, ← ht.iUnion]
+  exact bijOn_iUnion hg_bij hg_inj
+
 end IndexedPartition
chore: Rename Finpartition.supParts (#10223)

This should be Finpartition.sup_parts according to the naming convention

Diff
@@ -326,7 +326,7 @@ def IsPartition.finpartition {c : Finset (Set α)} (hc : Setoid.IsPartition (c :
     Finpartition (Set.univ : Set α) where
   parts := c
   supIndep := Finset.supIndep_iff_pairwiseDisjoint.mpr <| eqv_classes_disjoint hc.2
-  supParts := c.sup_id_set_eq_sUnion.trans hc.sUnion_eq_univ
+  sup_parts := c.sup_id_set_eq_sUnion.trans hc.sUnion_eq_univ
   not_bot_mem := hc.left
 #align setoid.is_partition.finpartition Setoid.IsPartition.finpartition
 
@@ -336,7 +336,7 @@ end Setoid
 theorem Finpartition.isPartition_parts {α} (f : Finpartition (Set.univ : Set α)) :
     Setoid.IsPartition (f.parts : Set (Set α)) :=
   ⟨f.not_bot_mem,
-    Setoid.eqv_classes_of_disjoint_union (f.parts.sup_id_set_eq_sUnion.symm.trans f.supParts)
+    Setoid.eqv_classes_of_disjoint_union (f.parts.sup_id_set_eq_sUnion.symm.trans f.sup_parts)
       f.supIndep.pairwiseDisjoint⟩
 #align finpartition.is_partition_parts Finpartition.isPartition_parts
 
chore: Improve Finset lemma names (#8894)

Change a few lemma names that have historically bothered me.

  • Finset.card_le_of_subsetFinset.card_le_card
  • Multiset.card_le_of_leMultiset.card_le_card
  • Multiset.card_lt_of_ltMultiset.card_lt_card
  • Set.ncard_le_of_subsetSet.ncard_le_ncard
  • Finset.image_filterFinset.filter_image
  • CompleteLattice.finset_sup_compact_of_compactCompleteLattice.isCompactElement_finset_sup
Diff
@@ -89,7 +89,7 @@ theorem finite_classes_ker {α β : Type*} [Finite β] (f : α → β) : (Setoid
 theorem card_classes_ker_le {α β : Type*} [Fintype β] (f : α → β)
     [Fintype (Setoid.ker f).classes] : Fintype.card (Setoid.ker f).classes ≤ Fintype.card β := by
   classical exact
-      le_trans (Set.card_le_of_subset (classes_ker_subset_fiber_set f)) (Fintype.card_range_le _)
+      le_trans (Set.card_le_card (classes_ker_subset_fiber_set f)) (Fintype.card_range_le _)
 #align setoid.card_classes_ker_le Setoid.card_classes_ker_le
 
 /-- Two equivalence relations are equal iff all their equivalence classes are equal. -/
refactor: Use Pairwise wherever possible (#9236)

Performed with a regex search for ∀ (.) (.), \1 ≠ \2 →, and a few variants to catch implicit binders and explicit types.

I have deliberately avoided trying to make the analogous Set.Pairwise transformation (or any Pairwise (foo on bar) transformations) in this PR, to keep the diff small.

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

Diff
@@ -363,10 +363,10 @@ structure IndexedPartition {ι α : Type*} (s : ι → Set α) where
 
 /-- The non-constructive constructor for `IndexedPartition`. -/
 noncomputable def IndexedPartition.mk' {ι α : Type*} (s : ι → Set α)
-    (dis : ∀ i j, i ≠ j → Disjoint (s i) (s j)) (nonempty : ∀ i, (s i).Nonempty)
+    (dis : Pairwise fun i j => Disjoint (s i) (s j)) (nonempty : ∀ i, (s i).Nonempty)
     (ex : ∀ x, ∃ i, x ∈ s i) : IndexedPartition s
     where
-  eq_of_mem {_x _i _j} hxi hxj := by_contradiction fun h => (dis _ _ h).le_bot ⟨hxi, hxj⟩
+  eq_of_mem {_x _i _j} hxi hxj := by_contradiction fun h => (dis h).le_bot ⟨hxi, hxj⟩
   some i := (nonempty i).some
   some_mem i := (nonempty i).choose_spec
   index x := (ex x).choose
@@ -399,7 +399,7 @@ theorem iUnion : ⋃ i, s i = univ := by
   simp [hs.exists_mem x]
 #align indexed_partition.Union IndexedPartition.iUnion
 
-theorem disjoint : ∀ {i j}, i ≠ j → Disjoint (s i) (s j) := fun {_i _j} h =>
+theorem disjoint : Pairwise fun i j => Disjoint (s i) (s j) := fun {_i _j} h =>
   disjoint_left.mpr fun {_x} hxi hxj => h (hs.eq_of_mem hxi hxj)
 #align indexed_partition.disjoint IndexedPartition.disjoint
 
chore: space after (#8178)

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

Diff
@@ -213,7 +213,7 @@ noncomputable def quotientEquivClasses (r : Setoid α) : Quotient r ≃ Setoid.c
     simp only [Subtype.ext_iff, Quotient.lift_mk, Subtype.ext_iff] at h_eq
     apply Quotient.sound
     show a ∈ { x | Setoid.r x b }
-    rw [←h_eq]
+    rw [← h_eq]
     exact Setoid.refl a
   · rw [Quot.surjective_lift]
     intro ⟨c, a, hc⟩
feat(Data/Setoid/Partition): equivalence classes and quotient (#7444)

Adds the equivalence between the type of equivalence classes of an equivalence relation and its quotient.

Co-authored-by: Eric Wieser <wieser.eric@gmail.com>

Diff
@@ -197,6 +197,33 @@ theorem sUnion_classes (r : Setoid α) : ⋃₀ r.classes = Set.univ :=
   Set.eq_univ_of_forall fun x => Set.mem_sUnion.2 ⟨{ y | r.Rel y x }, ⟨x, rfl⟩, Setoid.refl _⟩
 #align setoid.sUnion_classes Setoid.sUnion_classes
 
+/-- The equivalence between the quotient by an equivalence relation and its
+type of equivalence classes. -/
+noncomputable def quotientEquivClasses (r : Setoid α) : Quotient r ≃ Setoid.classes r := by
+  let f (a : α) : Setoid.classes r := ⟨{ x | Setoid.r x a }, Setoid.mem_classes r a⟩
+  have f_respects_relation (a b : α) (a_rel_b : Setoid.r a b) : f a = f b := by
+    rw [Subtype.mk.injEq]
+    exact Setoid.eq_of_mem_classes (Setoid.mem_classes r a) (Setoid.symm a_rel_b)
+        (Setoid.mem_classes r b) (Setoid.refl b)
+  apply Equiv.ofBijective (Quot.lift f f_respects_relation)
+  constructor
+  · intro (q_a : Quotient r) (q_b : Quotient r) h_eq
+    induction' q_a using Quotient.ind with a
+    induction' q_b using Quotient.ind with b
+    simp only [Subtype.ext_iff, Quotient.lift_mk, Subtype.ext_iff] at h_eq
+    apply Quotient.sound
+    show a ∈ { x | Setoid.r x b }
+    rw [←h_eq]
+    exact Setoid.refl a
+  · rw [Quot.surjective_lift]
+    intro ⟨c, a, hc⟩
+    exact ⟨a, Subtype.ext hc.symm⟩
+
+@[simp]
+lemma quotientEquivClasses_mk_eq (r : Setoid α) (a : α) :
+    (quotientEquivClasses r (Quotient.mk r a) : Set α) = { x | r.Rel x a } :=
+  (@Subtype.ext_iff_val _ _ _ ⟨{ x | r.Rel x a }, Setoid.mem_classes r a⟩).mp rfl
+
 section Partition
 
 /- ./././Mathport/Syntax/Translate/Basic.lean:628:2:
chore: banish Type _ and Sort _ (#6499)

We remove all possible occurences of Type _ and Sort _ in favor of Type* and Sort*.

This has nice performance benefits.

Diff
@@ -39,7 +39,7 @@ setoid, equivalence, iseqv, relation, equivalence relation, partition, equivalen
 
 namespace Setoid
 
-variable {α : Type _}
+variable {α : Type*}
 
 /- ./././Mathport/Syntax/Translate/Basic.lean:628:2:
 -- warning: expanding binder collection (b «expr ∈ » c) -/
@@ -75,18 +75,18 @@ theorem mem_classes (r : Setoid α) (y) : { x | r.Rel x y } ∈ r.classes :=
   ⟨y, rfl⟩
 #align setoid.mem_classes Setoid.mem_classes
 
-theorem classes_ker_subset_fiber_set {β : Type _} (f : α → β) :
+theorem classes_ker_subset_fiber_set {β : Type*} (f : α → β) :
     (Setoid.ker f).classes ⊆ Set.range fun y => { x | f x = y } := by
   rintro s ⟨x, rfl⟩
   rw [Set.mem_range]
   exact ⟨f x, rfl⟩
 #align setoid.classes_ker_subset_fiber_set Setoid.classes_ker_subset_fiber_set
 
-theorem finite_classes_ker {α β : Type _} [Finite β] (f : α → β) : (Setoid.ker f).classes.Finite :=
+theorem finite_classes_ker {α β : Type*} [Finite β] (f : α → β) : (Setoid.ker f).classes.Finite :=
   (Set.finite_range _).subset <| classes_ker_subset_fiber_set f
 #align setoid.finite_classes_ker Setoid.finite_classes_ker
 
-theorem card_classes_ker_le {α β : Type _} [Fintype β] (f : α → β)
+theorem card_classes_ker_le {α β : Type*} [Fintype β] (f : α → β)
     [Fintype (Setoid.ker f).classes] : Fintype.card (Setoid.ker f).classes ≤ Fintype.card β := by
   classical exact
       le_trans (Set.card_le_of_subset (classes_ker_subset_fiber_set f)) (Fintype.card_range_le _)
@@ -321,7 +321,7 @@ an index to an element of the corresponding set.
 
 This type is primarily useful for definitional control of `s` - if this is not needed, then
 `Setoid.ker index` by itself may be sufficient. -/
-structure IndexedPartition {ι α : Type _} (s : ι → Set α) where
+structure IndexedPartition {ι α : Type*} (s : ι → Set α) where
   /-- two indexes are equal if they are equal in membership  -/
   eq_of_mem : ∀ {x i j}, x ∈ s i → x ∈ s j → i = j
   /-- sends an index to an element of the corresponding set-/
@@ -335,7 +335,7 @@ structure IndexedPartition {ι α : Type _} (s : ι → Set α) where
 #align indexed_partition IndexedPartition
 
 /-- The non-constructive constructor for `IndexedPartition`. -/
-noncomputable def IndexedPartition.mk' {ι α : Type _} (s : ι → Set α)
+noncomputable def IndexedPartition.mk' {ι α : Type*} (s : ι → Set α)
     (dis : ∀ i j, i ≠ j → Disjoint (s i) (s j)) (nonempty : ∀ i, (s i).Nonempty)
     (ex : ∀ x, ∃ i, x ∈ s i) : IndexedPartition s
     where
@@ -350,7 +350,7 @@ namespace IndexedPartition
 
 open Set
 
-variable {ι α : Type _} {s : ι → Set α} (hs : IndexedPartition s)
+variable {ι α : Type*} {s : ι → Set α} (hs : IndexedPartition s)
 
 /-- On a unique index set there is the obvious trivial partition -/
 instance [Unique ι] [Inhabited α] : Inhabited (IndexedPartition fun _i : ι => (Set.univ : Set α)) :=
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,17 +2,14 @@
 Copyright (c) 2019 Amelia Livingston. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Amelia Livingston, Bryan Gin-ge Chen, Patrick Massot
-
-! This file was ported from Lean 3 source module data.setoid.partition
-! leanprover-community/mathlib commit b363547b3113d350d053abdf2884e9850a56b205
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
 -/
 import Mathlib.Data.Fintype.Basic
 import Mathlib.Data.Set.Finite
 import Mathlib.Data.Setoid.Basic
 import Mathlib.Order.Partition.Finpartition
 
+#align_import data.setoid.partition from "leanprover-community/mathlib"@"b363547b3113d350d053abdf2884e9850a56b205"
+
 /-!
 # Equivalence relations: partitions
 
chore: cleanup whitespace (#5988)

Grepping for [^ .:{-] [^ :] and reviewing the results. Once I started I couldn't stop. :-)

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

Diff
@@ -159,7 +159,7 @@ theorem eqv_class_mem {c : Set (Set α)} (H : ∀ a, ∃! (b : _) (_ : b ∈ c),
 -- warning: expanding binder collection (b «expr ∈ » c) -/
 theorem eqv_class_mem' {c : Set (Set α)} (H : ∀ a, ∃! (b : _) (_ : b ∈ c), a ∈ b) {x} :
     { y : α | (mkClasses c H).Rel x y } ∈ c := by
-  convert @Setoid.eqv_class_mem _ _  H x using 3
+  convert @Setoid.eqv_class_mem _ _ H x using 3
   rw [Setoid.comm']
 #align setoid.eqv_class_mem' Setoid.eqv_class_mem'
 
fix: precedences of ⨆⋃⋂⨅ (#5614)
Diff
@@ -370,7 +370,7 @@ theorem exists_mem (x : α) : ∃ i, x ∈ s i :=
   ⟨hs.index x, hs.mem_index x⟩
 #align indexed_partition.exists_mem IndexedPartition.exists_mem
 
-theorem iUnion : (⋃ i, s i) = univ := by
+theorem iUnion : ⋃ i, s i = univ := by
   ext x
   simp [hs.exists_mem x]
 #align indexed_partition.Union IndexedPartition.iUnion
chore: formatting issues (#4947)

Co-authored-by: Scott Morrison <scott.morrison@anu.edu.au> Co-authored-by: Parcly Taxel <reddeloostw@gmail.com>

Diff
@@ -47,7 +47,7 @@ variable {α : Type _}
 /- ./././Mathport/Syntax/Translate/Basic.lean:628:2:
 -- warning: expanding binder collection (b «expr ∈ » c) -/
 /-- If x ∈ α is in 2 elements of a set of sets partitioning α, those 2 sets are equal. -/
-theorem eq_of_mem_eqv_class {c : Set (Set α)} (H : ∀ a, ∃! (b : _)(_ : b ∈ c), a ∈ b) {x b b'}
+theorem eq_of_mem_eqv_class {c : Set (Set α)} (H : ∀ a, ∃! (b : _) (_ : b ∈ c), a ∈ b) {x b b'}
     (hc : b ∈ c) (hb : x ∈ b) (hc' : b' ∈ c) (hb' : x ∈ b') : b = b' :=
   (H x).unique₂ hc hb hc' hb'
 #align setoid.eq_of_mem_eqv_class Setoid.eq_of_mem_eqv_class
@@ -55,7 +55,7 @@ theorem eq_of_mem_eqv_class {c : Set (Set α)} (H : ∀ a, ∃! (b : _)(_ : b 
 /- ./././Mathport/Syntax/Translate/Basic.lean:628:2:
 -- warning: expanding binder collection (b «expr ∈ » c) -/
 /-- Makes an equivalence relation from a set of sets partitioning α. -/
-def mkClasses (c : Set (Set α)) (H : ∀ a, ∃! (b : _)(_ : b ∈ c), a ∈ b) : Setoid α :=
+def mkClasses (c : Set (Set α)) (H : ∀ a, ∃! (b : _) (_ : b ∈ c), a ∈ b) : Setoid α :=
   ⟨fun x y => ∀ s ∈ c, x ∈ s → y ∈ s,
     ⟨fun _ _ _ hx => hx, fun {x _y} h s hs hy =>
       (H x).elim₂ fun t ht hx _ =>
@@ -120,7 +120,7 @@ theorem empty_not_mem_classes {r : Setoid α} : ∅ ∉ r.classes := fun ⟨y, h
 /- ./././Mathport/Syntax/Translate/Basic.lean:628:2:
 -- warning: expanding binder collection (b «expr ∈ » r.classes) -/
 /-- Equivalence classes partition the type. -/
-theorem classes_eqv_classes {r : Setoid α} (a) : ∃! (b : _)(_ : b ∈ r.classes), a ∈ b :=
+theorem classes_eqv_classes {r : Setoid α} (a) : ∃! (b : _) (_ : b ∈ r.classes), a ∈ b :=
   ExistsUnique.intro₂ { x | r.Rel x a } (r.mem_classes a) (r.refl' _) <| by
     rintro _ ⟨y, rfl⟩ ha
     ext x
@@ -137,7 +137,7 @@ theorem eq_of_mem_classes {r : Setoid α} {x b} (hc : b ∈ r.classes) (hb : x 
 -- warning: expanding binder collection (b «expr ∈ » c) -/
 /-- The elements of a set of sets partitioning α are the equivalence classes of the
     equivalence relation defined by the set of sets. -/
-theorem eq_eqv_class_of_mem {c : Set (Set α)} (H : ∀ a, ∃! (b : _)(_ : b ∈ c), a ∈ b) {s y}
+theorem eq_eqv_class_of_mem {c : Set (Set α)} (H : ∀ a, ∃! (b : _) (_ : b ∈ c), a ∈ b) {s y}
     (hs : s ∈ c) (hy : y ∈ s) : s = { x | (mkClasses c H).Rel x y } :=
   Set.ext fun x =>
     ⟨fun hs' => symm' (mkClasses c H) fun _b' hb' h' => eq_of_mem_eqv_class H hs hy hb' h' ▸ hs',
@@ -150,14 +150,14 @@ theorem eq_eqv_class_of_mem {c : Set (Set α)} (H : ∀ a, ∃! (b : _)(_ : b 
 -- warning: expanding binder collection (b «expr ∈ » c) -/
 /-- The equivalence classes of the equivalence relation defined by a set of sets
     partitioning α are elements of the set of sets. -/
-theorem eqv_class_mem {c : Set (Set α)} (H : ∀ a, ∃! (b : _)(_ : b ∈ c), a ∈ b) {y} :
+theorem eqv_class_mem {c : Set (Set α)} (H : ∀ a, ∃! (b : _) (_ : b ∈ c), a ∈ b) {y} :
     { x | (mkClasses c H).Rel x y } ∈ c :=
   (H y).elim₂ fun _b hc hy _hb => eq_eqv_class_of_mem H hc hy ▸ hc
 #align setoid.eqv_class_mem Setoid.eqv_class_mem
 
 /- ./././Mathport/Syntax/Translate/Basic.lean:628:2:
 -- warning: expanding binder collection (b «expr ∈ » c) -/
-theorem eqv_class_mem' {c : Set (Set α)} (H : ∀ a, ∃! (b : _)(_ : b ∈ c), a ∈ b) {x} :
+theorem eqv_class_mem' {c : Set (Set α)} (H : ∀ a, ∃! (b : _) (_ : b ∈ c), a ∈ b) {x} :
     { y : α | (mkClasses c H).Rel x y } ∈ c := by
   convert @Setoid.eqv_class_mem _ _  H x using 3
   rw [Setoid.comm']
@@ -166,7 +166,7 @@ theorem eqv_class_mem' {c : Set (Set α)} (H : ∀ a, ∃! (b : _)(_ : b ∈ c),
 /- ./././Mathport/Syntax/Translate/Basic.lean:628:2:
 -- warning: expanding binder collection (b «expr ∈ » c) -/
 /-- Distinct elements of a set of sets partitioning α are disjoint. -/
-theorem eqv_classes_disjoint {c : Set (Set α)} (H : ∀ a, ∃! (b : _)(_ : b ∈ c), a ∈ b) :
+theorem eqv_classes_disjoint {c : Set (Set α)} (H : ∀ a, ∃! (b : _) (_ : b ∈ c), a ∈ b) :
     c.PairwiseDisjoint id := fun _b₁ h₁ _b₂ h₂ h =>
   Set.disjoint_left.2 fun x hx1 hx2 =>
     (H x).elim₂ fun _b _hc _hx _hb => h <| eq_of_mem_eqv_class H h₁ hx1 h₂ hx2
@@ -176,7 +176,7 @@ theorem eqv_classes_disjoint {c : Set (Set α)} (H : ∀ a, ∃! (b : _)(_ : b 
 -- warning: expanding binder collection (b «expr ∈ » c) -/
 /-- A set of disjoint sets covering α partition α (classical). -/
 theorem eqv_classes_of_disjoint_union {c : Set (Set α)} (hu : Set.sUnion c = @Set.univ α)
-    (H : c.PairwiseDisjoint id) (a) : ∃! (b : _)(_ : b ∈ c), a ∈ b :=
+    (H : c.PairwiseDisjoint id) (a) : ∃! (b : _) (_ : b ∈ c), a ∈ b :=
   let ⟨b, hc, ha⟩ := Set.mem_sUnion.1 <| show a ∈ _ by rw [hu]; exact Set.mem_univ a
   ExistsUnique.intro₂ b hc ha fun b' hc' ha' => H.elim_set hc' hc a ha' ha
 #align setoid.eqv_classes_of_disjoint_union Setoid.eqv_classes_of_disjoint_union
@@ -207,7 +207,7 @@ section Partition
 /-- A collection `c : Set (Set α)` of sets is a partition of `α` into pairwise
 disjoint sets if `∅ ∉ c` and each element `a : α` belongs to a unique set `b ∈ c`. -/
 def IsPartition (c : Set (Set α)) :=
-  ∅ ∉ c ∧ ∀ a, ∃! (b : _)(_ : b ∈ c), a ∈ b
+  ∅ ∉ c ∧ ∀ a, ∃! (b : _) (_ : b ∈ c), a ∈ b
 #align setoid.is_partition Setoid.IsPartition
 
 /-- A partition of `α` does not contain the empty set. -/
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
@@ -175,14 +175,14 @@ theorem eqv_classes_disjoint {c : Set (Set α)} (H : ∀ a, ∃! (b : _)(_ : b 
 /- ./././Mathport/Syntax/Translate/Basic.lean:628:2:
 -- warning: expanding binder collection (b «expr ∈ » c) -/
 /-- A set of disjoint sets covering α partition α (classical). -/
-theorem eqv_classes_of_disjoint_union {c : Set (Set α)} (hu : Set.unionₛ c = @Set.univ α)
+theorem eqv_classes_of_disjoint_union {c : Set (Set α)} (hu : Set.sUnion c = @Set.univ α)
     (H : c.PairwiseDisjoint id) (a) : ∃! (b : _)(_ : b ∈ c), a ∈ b :=
-  let ⟨b, hc, ha⟩ := Set.mem_unionₛ.1 <| show a ∈ _ by rw [hu]; exact Set.mem_univ a
+  let ⟨b, hc, ha⟩ := Set.mem_sUnion.1 <| show a ∈ _ by rw [hu]; exact Set.mem_univ a
   ExistsUnique.intro₂ b hc ha fun b' hc' ha' => H.elim_set hc' hc a ha' ha
 #align setoid.eqv_classes_of_disjoint_union Setoid.eqv_classes_of_disjoint_union
 
 /-- Makes an equivalence relation from a set of disjoints sets covering α. -/
-def setoidOfDisjointUnion {c : Set (Set α)} (hu : Set.unionₛ c = @Set.univ α)
+def setoidOfDisjointUnion {c : Set (Set α)} (hu : Set.sUnion c = @Set.univ α)
     (H : c.PairwiseDisjoint id) : Setoid α :=
   Setoid.mkClasses c <| eqv_classes_of_disjoint_union hu H
 #align setoid.setoid_of_disjoint_union Setoid.setoidOfDisjointUnion
@@ -196,9 +196,9 @@ theorem mkClasses_classes (r : Setoid α) : mkClasses r.classes classes_eqv_clas
 #align setoid.mk_classes_classes Setoid.mkClasses_classes
 
 @[simp]
-theorem unionₛ_classes (r : Setoid α) : ⋃₀ r.classes = Set.univ :=
-  Set.eq_univ_of_forall fun x => Set.mem_unionₛ.2 ⟨{ y | r.Rel y x }, ⟨x, rfl⟩, Setoid.refl _⟩
-#align setoid.sUnion_classes Setoid.unionₛ_classes
+theorem sUnion_classes (r : Setoid α) : ⋃₀ r.classes = Set.univ :=
+  Set.eq_univ_of_forall fun x => Set.mem_sUnion.2 ⟨{ y | r.Rel y x }, ⟨x, rfl⟩, Setoid.refl _⟩
+#align setoid.sUnion_classes Setoid.sUnion_classes
 
 section Partition
 
@@ -225,14 +225,14 @@ theorem IsPartition.pairwiseDisjoint {c : Set (Set α)} (hc : IsPartition c) :
   eqv_classes_disjoint hc.2
 #align setoid.is_partition.pairwise_disjoint Setoid.IsPartition.pairwiseDisjoint
 
-theorem IsPartition.unionₛ_eq_univ {c : Set (Set α)} (hc : IsPartition c) : ⋃₀ c = Set.univ :=
+theorem IsPartition.sUnion_eq_univ {c : Set (Set α)} (hc : IsPartition c) : ⋃₀ c = Set.univ :=
   Set.eq_univ_of_forall fun x =>
-    Set.mem_unionₛ.2 <|
+    Set.mem_sUnion.2 <|
       let ⟨t, ht⟩ := hc.2 x
       ⟨t, by
         simp only [exists_unique_iff_exists] at ht
         tauto⟩
-#align setoid.is_partition.sUnion_eq_univ Setoid.IsPartition.unionₛ_eq_univ
+#align setoid.is_partition.sUnion_eq_univ Setoid.IsPartition.sUnion_eq_univ
 
 /-- All elements of a partition of α are the equivalence class of some y ∈ α. -/
 theorem exists_of_mem_partition {c : Set (Set α)} (hc : IsPartition c) {s} (hs : s ∈ c) :
@@ -302,7 +302,7 @@ def IsPartition.finpartition {c : Finset (Set α)} (hc : Setoid.IsPartition (c :
     Finpartition (Set.univ : Set α) where
   parts := c
   supIndep := Finset.supIndep_iff_pairwiseDisjoint.mpr <| eqv_classes_disjoint hc.2
-  supParts := c.sup_id_set_eq_unionₛ.trans hc.unionₛ_eq_univ
+  supParts := c.sup_id_set_eq_sUnion.trans hc.sUnion_eq_univ
   not_bot_mem := hc.left
 #align setoid.is_partition.finpartition Setoid.IsPartition.finpartition
 
@@ -312,7 +312,7 @@ end Setoid
 theorem Finpartition.isPartition_parts {α} (f : Finpartition (Set.univ : Set α)) :
     Setoid.IsPartition (f.parts : Set (Set α)) :=
   ⟨f.not_bot_mem,
-    Setoid.eqv_classes_of_disjoint_union (f.parts.sup_id_set_eq_unionₛ.symm.trans f.supParts)
+    Setoid.eqv_classes_of_disjoint_union (f.parts.sup_id_set_eq_sUnion.symm.trans f.supParts)
       f.supIndep.pairwiseDisjoint⟩
 #align finpartition.is_partition_parts Finpartition.isPartition_parts
 
@@ -370,10 +370,10 @@ theorem exists_mem (x : α) : ∃ i, x ∈ s i :=
   ⟨hs.index x, hs.mem_index x⟩
 #align indexed_partition.exists_mem IndexedPartition.exists_mem
 
-theorem unionᵢ : (⋃ i, s i) = univ := by
+theorem iUnion : (⋃ i, s i) = univ := by
   ext x
   simp [hs.exists_mem x]
-#align indexed_partition.Union IndexedPartition.unionᵢ
+#align indexed_partition.Union IndexedPartition.iUnion
 
 theorem disjoint : ∀ {i j}, i ≠ j → Disjoint (s i) (s j) := fun {_i _j} h =>
   disjoint_left.mpr fun {_x} hxi hxj => h (hs.eq_of_mem hxi hxj)
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
@@ -102,8 +102,7 @@ theorem eq_iff_classes_eq {r₁ r₂ : Setoid α} :
 #align setoid.eq_iff_classes_eq Setoid.eq_iff_classes_eq
 
 theorem rel_iff_exists_classes (r : Setoid α) {x y} : r.Rel x y ↔ ∃ c ∈ r.classes, x ∈ c ∧ y ∈ c :=
-  ⟨fun h => ⟨_, r.mem_classes y, h, r.refl' y⟩, fun ⟨c, ⟨z, hz⟩, hx, hy⟩ =>
-    by
+  ⟨fun h => ⟨_, r.mem_classes y, h, r.refl' y⟩, fun ⟨c, ⟨z, hz⟩, hx, hy⟩ => by
     subst c
     exact r.trans' hx (r.symm' hy)⟩
 #align setoid.rel_iff_exists_classes Setoid.rel_iff_exists_classes
@@ -122,8 +121,7 @@ theorem empty_not_mem_classes {r : Setoid α} : ∅ ∉ r.classes := fun ⟨y, h
 -- warning: expanding binder collection (b «expr ∈ » r.classes) -/
 /-- Equivalence classes partition the type. -/
 theorem classes_eqv_classes {r : Setoid α} (a) : ∃! (b : _)(_ : b ∈ r.classes), a ∈ b :=
-  ExistsUnique.intro₂ { x | r.Rel x a } (r.mem_classes a) (r.refl' _) <|
-    by
+  ExistsUnique.intro₂ { x | r.Rel x a } (r.mem_classes a) (r.refl' _) <| by
     rintro _ ⟨y, rfl⟩ ha
     ext x
     exact ⟨fun hx => r.trans' hx (r.symm' ha), fun hx => r.trans' hx ha⟩
@@ -282,8 +280,7 @@ protected def Partition.orderIso : Setoid α ≃o { C : Set (Set α) // IsPartit
   invFun C := mkClasses C.1 C.2.2
   left_inv := mkClasses_classes
   right_inv C := by rw [Subtype.ext_iff_val, ← classes_mkClasses C.1 C.2]
-  map_rel_iff' {r s} :=
-    by
+  map_rel_iff' {r s} := by
     conv_rhs => rw [← mkClasses_classes r, ← mkClasses_classes s]
 #align setoid.partition.order_iso Setoid.Partition.orderIso
 
feat: improvements to congr! and convert (#2606)
  • There is now configuration for congr!, convert, and convert_to to control parts of the congruence algorithm, in particular transparency settings when applying congruence lemmas.
  • congr! now applies congruence lemmas with reducible transparency by default. This prevents it from unfolding definitions when applying congruence lemmas. It also now tries both the LHS-biased and RHS-biased simp congruence lemmas, with a configuration option to set which it should try first.
  • There is now a new HEq congruence lemma generator that gives each hypothesis access to the proofs of previous hypotheses. This means that if you have an equality ⊢ ⟨a, x⟩ = ⟨b, y⟩ of sigma types, congr! turns this into goals ⊢ a = b and ⊢ a = b → HEq x y (note that congr! will also auto-introduce a = b for you in the second goal). This congruence lemma generator applies to more cases than the simp congruence lemma generator does.
  • congr! (and hence convert) are more careful about applying lemmas that don't force definitions to unfold. There were a number of cases in mathlib where the implementation of congr was being abused to unfold definitions.
  • With set_option trace.congr! true you can see what congr! sees when it is deciding on congruence lemmas.
  • There is also a bug fix in convert_to to do using 1 when there is no using clause, to match its documentation.

Note that congr! is more capable than congr at finding a way to equate left-hand sides and right-hand sides, so you will frequently need to limit its depth with a using clause. However, there is also a new heuristic to prevent considering unlikely-to-be-provable type equalities (controlled by the typeEqs option), which can help limit the depth automatically.

There is also a predefined configuration that you can invoke with, for example, convert (config := .unfoldSameFun) h, that causes it to behave more like congr, including using default transparency when unfolding.

Diff
@@ -161,8 +161,7 @@ theorem eqv_class_mem {c : Set (Set α)} (H : ∀ a, ∃! (b : _)(_ : b ∈ c),
 -- warning: expanding binder collection (b «expr ∈ » c) -/
 theorem eqv_class_mem' {c : Set (Set α)} (H : ∀ a, ∃! (b : _)(_ : b ∈ c), a ∈ b) {x} :
     { y : α | (mkClasses c H).Rel x y } ∈ c := by
-  convert @Setoid.eqv_class_mem _ _  H x
-  ext; dsimp
+  convert @Setoid.eqv_class_mem _ _  H x using 3
   rw [Setoid.comm']
 #align setoid.eqv_class_mem' Setoid.eqv_class_mem'
 
feat: port Data.Setoid.Partition (#2066)

port of data.setoid.partition

mostly simple fixes. Commented out simp of mem_index to address simpNF

Dependencies 7 + 235

236 files ported (97.1%)
102401 lines ported (97.1%)
Show graph

The unported dependencies are