topology.category.CompactumMathlib.Topology.Category.Compactum

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)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(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
@@ -97,7 +97,7 @@ namespace Compactum
 /-- The forgetful functor to Type* -/
 def forget : Compactum ⥤ Type _ :=
   Monad.forget _
-deriving CreatesLimits, Faithful
+deriving CreatesLimits, CategoryTheory.Functor.Faithful
 #align Compactum.forget Compactum.forget
 -/
 
@@ -508,13 +508,14 @@ namespace compactumToCompHaus
 
 #print compactumToCompHaus.full /-
 /-- The functor Compactum_to_CompHaus is full. -/
-def full : Full compactumToCompHaus.{u} where preimage X Y f := Compactum.homOfContinuous f.1 f.2
+def full : CategoryTheory.Functor.Full compactumToCompHaus.{u}
+    where preimage X Y f := Compactum.homOfContinuous f.1 f.2
 #align Compactum_to_CompHaus.full compactumToCompHaus.full
 -/
 
 #print compactumToCompHaus.faithful /-
 /-- The functor Compactum_to_CompHaus is faithful. -/
-theorem faithful : Faithful compactumToCompHaus :=
+theorem faithful : CategoryTheory.Functor.Faithful compactumToCompHaus :=
   { }
 #align Compactum_to_CompHaus.faithful compactumToCompHaus.faithful
 -/
@@ -537,14 +538,14 @@ def isoOfTopologicalSpace {D : CompHaus} :
 
 #print compactumToCompHaus.essSurj /-
 /-- The functor Compactum_to_CompHaus is essentially surjective. -/
-theorem essSurj : EssSurj compactumToCompHaus :=
+theorem essSurj : CategoryTheory.Functor.EssSurj compactumToCompHaus :=
   { mem_essImage := fun X => ⟨Compactum.ofTopologicalSpace X, ⟨isoOfTopologicalSpace⟩⟩ }
 #align Compactum_to_CompHaus.ess_surj compactumToCompHaus.essSurj
 -/
 
 #print compactumToCompHaus.isEquivalence /-
 /-- The functor Compactum_to_CompHaus is an equivalence of categories. -/
-noncomputable instance isEquivalence : IsEquivalence compactumToCompHaus :=
+noncomputable instance isEquivalence : CategoryTheory.Functor.IsEquivalence compactumToCompHaus :=
   by
   apply equivalence.of_fully_faithfully_ess_surj _
   exact compactumToCompHaus.full
Diff
@@ -236,7 +236,7 @@ private theorem basic_inter {X : Compactum} (A B : Set X) : basic (A ∩ B) = ba
 private theorem subset_cl {X : Compactum} (A : Set X) : A ⊆ cl A := fun a ha =>
   ⟨X.incl a, ha, by simp⟩
 
-/- ./././Mathport/Syntax/Translate/Basic.lean:641:2: warning: expanding binder collection (B C «expr ∈ » C0) -/
+/- ./././Mathport/Syntax/Translate/Basic.lean:642:2: warning: expanding binder collection (B C «expr ∈ » C0) -/
 private theorem cl_cl {X : Compactum} (A : Set X) : cl (cl A) ⊆ cl A :=
   by
   rintro _ ⟨F, hF, rfl⟩
@@ -312,7 +312,7 @@ theorem isClosed_cl {X : Compactum} (A : Set X) : IsClosed (cl A) :=
 #align Compactum.is_closed_cl Compactum.isClosed_cl
 -/
 
-/- ./././Mathport/Syntax/Translate/Basic.lean:641:2: warning: expanding binder collection (S1 S2 «expr ∈ » T0) -/
+/- ./././Mathport/Syntax/Translate/Basic.lean:642:2: warning: expanding binder collection (S1 S2 «expr ∈ » T0) -/
 #print Compactum.str_eq_of_le_nhds /-
 theorem str_eq_of_le_nhds {X : Compactum} (F : Ultrafilter X) (x : X) : ↑F ≤ 𝓝 x → X.str F = x :=
   by
Diff
@@ -197,7 +197,7 @@ theorem isClosed_iff {X : Compactum} (S : Set X) :
   · intro cond F h
     by_contra c
     specialize cond F c
-    rw [compl_mem_iff_not_mem] at cond 
+    rw [compl_mem_iff_not_mem] at cond
     contradiction
   · intro h1 F h2
     specialize h1 F
@@ -269,7 +269,7 @@ private theorem cl_cl {X : Compactum} (A : Set X) : cl (cl A) ⊆ cl A :=
     have : (Q ∩ cl A).Nonempty := Filter.nonempty_of_mem (inter_mem hQ hF)
     rcases this with ⟨q, hq1, P, hq2, hq3⟩
     refine' ⟨P, hq2, _⟩
-    rw [← hq3] at hq1 
+    rw [← hq3] at hq1
     simpa
   -- Suffices to show that the intersection of any finite subcollection of C1 is nonempty.
   suffices ∀ T : fsu, ι T ⊆ C1 → (⋂₀ ι T).Nonempty
@@ -330,9 +330,9 @@ theorem str_eq_of_le_nhds {X : Compactum} (F : Ultrafilter X) (x : X) : ↑F ≤
     by
     intro A hA h
     by_contra H
-    rw [le_nhds_iff] at cond 
+    rw [le_nhds_iff] at cond
     specialize cond (Aᶜ) H hA.is_open_compl
-    rw [Ultrafilter.mem_coe, Ultrafilter.compl_mem_iff_not_mem] at cond 
+    rw [Ultrafilter.mem_coe, Ultrafilter.compl_mem_iff_not_mem] at cond
     contradiction
   -- If A ∈ F, then x ∈ cl A.
   have claim2 : ∀ A : Set X, A ∈ F → x ∈ cl A :=
@@ -452,7 +452,7 @@ noncomputable def ofTopologicalSpace (X : Type _) [TopologicalSpace X] [CompactS
   unit' := by ext x; exact lim_eq (pure_le_nhds _)
   assoc' := by
     ext FF
-    change Ultrafilter (Ultrafilter X) at FF 
+    change Ultrafilter (Ultrafilter X) at FF
     set x := (Ultrafilter.map Ultrafilter.lim FF).lim with c1
     have c2 : ∀ (U : Set X) (F : Ultrafilter X), F.lim ∈ U → IsOpen U → U ∈ F :=
       by
@@ -483,7 +483,7 @@ noncomputable def ofTopologicalSpace (X : Type _) [TopologicalSpace X] [CompactS
 def homOfContinuous {X Y : Compactum} (f : X → Y) (cont : Continuous f) : X ⟶ Y :=
   { f
     h' := by
-      rw [continuous_iff_ultrafilter] at cont 
+      rw [continuous_iff_ultrafilter] at cont
       ext (F : Ultrafilter X)
       specialize cont (X.str F) F (le_nhds_of_str_eq F (X.str F) rfl)
       have := str_eq_of_le_nhds (Ultrafilter.map f F) _ Cont
@@ -527,7 +527,7 @@ def isoOfTopologicalSpace {D : CompHaus} :
   Hom :=
     { toFun := id
       continuous_toFun :=
-        continuous_def.2 fun _ h => by rw [isOpen_iff_ultrafilter'] at h ; exact h }
+        continuous_def.2 fun _ h => by rw [isOpen_iff_ultrafilter'] at h; exact h }
   inv :=
     { toFun := id
       continuous_toFun :=
Diff
@@ -3,12 +3,12 @@ Copyright (c) 2020 Adam Topaz. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Adam Topaz
 -/
-import Mathbin.CategoryTheory.Monad.Types
-import Mathbin.CategoryTheory.Monad.Limits
-import Mathbin.CategoryTheory.Equivalence
-import Mathbin.Topology.Category.CompHaus.Basic
-import Mathbin.Topology.Category.Profinite.Basic
-import Mathbin.Data.Set.Constructions
+import CategoryTheory.Monad.Types
+import CategoryTheory.Monad.Limits
+import CategoryTheory.Equivalence
+import Topology.Category.CompHaus.Basic
+import Topology.Category.Profinite.Basic
+import Data.Set.Constructions
 
 #align_import topology.category.Compactum from "leanprover-community/mathlib"@"6b31d1eebd64eab86d5bd9936bfaada6ca8b5842"
 
@@ -236,7 +236,7 @@ private theorem basic_inter {X : Compactum} (A B : Set X) : basic (A ∩ B) = ba
 private theorem subset_cl {X : Compactum} (A : Set X) : A ⊆ cl A := fun a ha =>
   ⟨X.incl a, ha, by simp⟩
 
-/- ./././Mathport/Syntax/Translate/Basic.lean:635:2: warning: expanding binder collection (B C «expr ∈ » C0) -/
+/- ./././Mathport/Syntax/Translate/Basic.lean:641:2: warning: expanding binder collection (B C «expr ∈ » C0) -/
 private theorem cl_cl {X : Compactum} (A : Set X) : cl (cl A) ⊆ cl A :=
   by
   rintro _ ⟨F, hF, rfl⟩
@@ -312,7 +312,7 @@ theorem isClosed_cl {X : Compactum} (A : Set X) : IsClosed (cl A) :=
 #align Compactum.is_closed_cl Compactum.isClosed_cl
 -/
 
-/- ./././Mathport/Syntax/Translate/Basic.lean:635:2: warning: expanding binder collection (S1 S2 «expr ∈ » T0) -/
+/- ./././Mathport/Syntax/Translate/Basic.lean:641:2: warning: expanding binder collection (S1 S2 «expr ∈ » T0) -/
 #print Compactum.str_eq_of_le_nhds /-
 theorem str_eq_of_le_nhds {X : Compactum} (F : Ultrafilter X) (x : X) : ↑F ≤ 𝓝 x → X.str F = x :=
   by
Diff
@@ -2,11 +2,6 @@
 Copyright (c) 2020 Adam Topaz. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Adam Topaz
-
-! This file was ported from Lean 3 source module topology.category.Compactum
-! leanprover-community/mathlib commit 6b31d1eebd64eab86d5bd9936bfaada6ca8b5842
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
 -/
 import Mathbin.CategoryTheory.Monad.Types
 import Mathbin.CategoryTheory.Monad.Limits
@@ -15,6 +10,8 @@ import Mathbin.Topology.Category.CompHaus.Basic
 import Mathbin.Topology.Category.Profinite.Basic
 import Mathbin.Data.Set.Constructions
 
+#align_import topology.category.Compactum from "leanprover-community/mathlib"@"6b31d1eebd64eab86d5bd9936bfaada6ca8b5842"
+
 /-!
 
 # Compacta and Compact Hausdorff Spaces
@@ -239,7 +236,7 @@ private theorem basic_inter {X : Compactum} (A B : Set X) : basic (A ∩ B) = ba
 private theorem subset_cl {X : Compactum} (A : Set X) : A ⊆ cl A := fun a ha =>
   ⟨X.incl a, ha, by simp⟩
 
-/- ./././Mathport/Syntax/Translate/Basic.lean:638:2: warning: expanding binder collection (B C «expr ∈ » C0) -/
+/- ./././Mathport/Syntax/Translate/Basic.lean:635:2: warning: expanding binder collection (B C «expr ∈ » C0) -/
 private theorem cl_cl {X : Compactum} (A : Set X) : cl (cl A) ⊆ cl A :=
   by
   rintro _ ⟨F, hF, rfl⟩
@@ -315,7 +312,7 @@ theorem isClosed_cl {X : Compactum} (A : Set X) : IsClosed (cl A) :=
 #align Compactum.is_closed_cl Compactum.isClosed_cl
 -/
 
-/- ./././Mathport/Syntax/Translate/Basic.lean:638:2: warning: expanding binder collection (S1 S2 «expr ∈ » T0) -/
+/- ./././Mathport/Syntax/Translate/Basic.lean:635:2: warning: expanding binder collection (S1 S2 «expr ∈ » T0) -/
 #print Compactum.str_eq_of_le_nhds /-
 theorem str_eq_of_le_nhds {X : Compactum} (F : Ultrafilter X) (x : X) : ↑F ≤ 𝓝 x → X.str F = x :=
   by
Diff
@@ -489,7 +489,7 @@ def homOfContinuous {X Y : Compactum} (f : X → Y) (cont : Continuous f) : X 
       rw [continuous_iff_ultrafilter] at cont 
       ext (F : Ultrafilter X)
       specialize cont (X.str F) F (le_nhds_of_str_eq F (X.str F) rfl)
-      have := str_eq_of_le_nhds (Ultrafilter.map f F) _ cont
+      have := str_eq_of_le_nhds (Ultrafilter.map f F) _ Cont
       simpa only [← this, types_comp_apply, of_type_functor_map] }
 #align Compactum.hom_of_continuous Compactum.homOfContinuous
 -/
Diff
@@ -84,7 +84,6 @@ open CategoryTheory Filter Ultrafilter TopologicalSpace CategoryTheory.Limits Fi
 
 open scoped Classical Topology
 
--- mathport name: exprβ
 local notation "β" => ofTypeMonad Ultrafilter
 
 #print Compactum /-
@@ -131,21 +130,28 @@ instance {X Y : Compactum} : CoeFun (X ⟶ Y) fun f => X → Y :=
 instance : HasLimits Compactum :=
   hasLimits_of_hasLimits_createsLimits forget
 
+#print Compactum.str /-
 /-- The structure map for a compactum, essentially sending an ultrafilter to its limit. -/
 def str (X : Compactum) : Ultrafilter X → X :=
   X.a
 #align Compactum.str Compactum.str
+-/
 
+#print Compactum.join /-
 /-- The monadic join. -/
 def join (X : Compactum) : Ultrafilter (Ultrafilter X) → Ultrafilter X :=
   β.μ.app _
 #align Compactum.join Compactum.join
+-/
 
+#print Compactum.incl /-
 /-- The inclusion of `X` into `ultrafilter X`. -/
 def incl (X : Compactum) : X → Ultrafilter X :=
   β.η.app _
 #align Compactum.incl Compactum.incl
+-/
 
+#print Compactum.str_incl /-
 @[simp]
 theorem str_incl (X : Compactum) (x : X) : X.str (X.incl x) = x :=
   by
@@ -153,7 +159,9 @@ theorem str_incl (X : Compactum) (x : X) : X.str (X.incl x) = x :=
   rw [monad.algebra.unit]
   rfl
 #align Compactum.str_incl Compactum.str_incl
+-/
 
+#print Compactum.str_hom_commute /-
 @[simp]
 theorem str_hom_commute (X Y : Compactum) (f : X ⟶ Y) (xs : Ultrafilter X) :
     f (X.str xs) = Y.str (map f xs) :=
@@ -162,7 +170,9 @@ theorem str_hom_commute (X Y : Compactum) (f : X ⟶ Y) (xs : Ultrafilter X) :
   rw [← f.h]
   rfl
 #align Compactum.str_hom_commute Compactum.str_hom_commute
+-/
 
+#print Compactum.join_distrib /-
 @[simp]
 theorem join_distrib (X : Compactum) (uux : Ultrafilter (Ultrafilter X)) :
     X.str (X.join uux) = X.str (map X.str uux) :=
@@ -171,6 +181,7 @@ theorem join_distrib (X : Compactum) (uux : Ultrafilter (Ultrafilter X)) :
   rw [monad.algebra.assoc]
   rfl
 #align Compactum.join_distrib Compactum.join_distrib
+-/
 
 instance {X : Compactum} : TopologicalSpace X
     where
@@ -180,6 +191,7 @@ instance {X : Compactum} : TopologicalSpace X
   isOpen_sUnion := fun S h1 F ⟨T, hT, h2⟩ =>
     mem_of_superset (h1 T hT _ h2) (Set.subset_sUnion_of_mem hT)
 
+#print Compactum.isClosed_iff /-
 theorem isClosed_iff {X : Compactum} (S : Set X) :
     IsClosed S ↔ ∀ F : Ultrafilter X, S ∈ F → X.str F ∈ S :=
   by
@@ -194,6 +206,7 @@ theorem isClosed_iff {X : Compactum} (S : Set X) :
     specialize h1 F
     cases F.mem_or_compl_mem S; exacts [absurd (h1 h) h2, h]
 #align Compactum.is_closed_iff Compactum.isClosed_iff
+-/
 
 instance {X : Compactum} : CompactSpace X :=
   by
@@ -293,14 +306,17 @@ private theorem cl_cl {X : Compactum} (A : Set X) : cl (cl A) ⊆ cl A :=
   intro t ht
   exact finite_inter_closure.basic (@hT t ht)
 
+#print Compactum.isClosed_cl /-
 theorem isClosed_cl {X : Compactum} (A : Set X) : IsClosed (cl A) :=
   by
   rw [is_closed_iff]
   intro F hF
   exact cl_cl _ ⟨F, hF, rfl⟩
 #align Compactum.is_closed_cl Compactum.isClosed_cl
+-/
 
 /- ./././Mathport/Syntax/Translate/Basic.lean:638:2: warning: expanding binder collection (S1 S2 «expr ∈ » T0) -/
+#print Compactum.str_eq_of_le_nhds /-
 theorem str_eq_of_le_nhds {X : Compactum} (F : Ultrafilter X) (x : X) : ↑F ≤ 𝓝 x → X.str F = x :=
   by
   -- Notation to be used in this proof.
@@ -381,10 +397,13 @@ theorem str_eq_of_le_nhds {X : Compactum} (F : Ultrafilter X) (x : X) : ↑F ≤
   intro t ht
   exact finite_inter_closure.basic (@hT t ht)
 #align Compactum.str_eq_of_le_nhds Compactum.str_eq_of_le_nhds
+-/
 
+#print Compactum.le_nhds_of_str_eq /-
 theorem le_nhds_of_str_eq {X : Compactum} (F : Ultrafilter X) (x : X) : X.str F = x → ↑F ≤ 𝓝 x :=
   fun h => le_nhds_iff.mpr fun s hx hs => hs _ <| by rwa [h]
 #align Compactum.le_nhds_of_str_eq Compactum.le_nhds_of_str_eq
+-/
 
 -- All the hard work above boils down to this t2_space instance.
 instance {X : Compactum} : T2Space X :=
@@ -393,13 +412,16 @@ instance {X : Compactum} : T2Space X :=
   intro _ _ F hx hy
   rw [← str_eq_of_le_nhds _ _ hx, ← str_eq_of_le_nhds _ _ hy]
 
+#print Compactum.lim_eq_str /-
 /-- The structure map of a compactum actually computes limits. -/
 theorem lim_eq_str {X : Compactum} (F : Ultrafilter X) : F.lim = X.str F :=
   by
   rw [Ultrafilter.lim_eq_iff_le_nhds, le_nhds_iff]
   tauto
 #align Compactum.Lim_eq_str Compactum.lim_eq_str
+-/
 
+#print Compactum.cl_eq_closure /-
 theorem cl_eq_closure {X : Compactum} (A : Set X) : cl A = closure A :=
   by
   ext
@@ -410,7 +432,9 @@ theorem cl_eq_closure {X : Compactum} (A : Set X) : cl A = closure A :=
   · rintro ⟨F, h1, h2⟩
     exact ⟨F, h1, str_eq_of_le_nhds _ _ h2⟩
 #align Compactum.cl_eq_closure Compactum.cl_eq_closure
+-/
 
+#print Compactum.continuous_of_hom /-
 /-- Any morphism of compacta is continuous. -/
 theorem continuous_of_hom {X Y : Compactum} (f : X ⟶ Y) : Continuous f :=
   by
@@ -420,6 +444,7 @@ theorem continuous_of_hom {X Y : Compactum} (f : X ⟶ Y) : Continuous f :=
   apply le_nhds_of_str_eq
   rw [← str_hom_commute, str_eq_of_le_nhds _ x h]
 #align Compactum.continuous_of_hom Compactum.continuous_of_hom
+-/
 
 #print Compactum.ofTopologicalSpace /-
 /-- Given any compact Hausdorff space, we construct a Compactum. -/
@@ -456,6 +481,7 @@ noncomputable def ofTopologicalSpace (X : Type _) [TopologicalSpace X] [CompactS
 #align Compactum.of_topological_space Compactum.ofTopologicalSpace
 -/
 
+#print Compactum.homOfContinuous /-
 /-- Any continuous map between Compacta is a morphism of compacta. -/
 def homOfContinuous {X Y : Compactum} (f : X → Y) (cont : Continuous f) : X ⟶ Y :=
   { f
@@ -466,6 +492,7 @@ def homOfContinuous {X Y : Compactum} (f : X → Y) (cont : Continuous f) : X 
       have := str_eq_of_le_nhds (Ultrafilter.map f F) _ cont
       simpa only [← this, types_comp_apply, of_type_functor_map] }
 #align Compactum.hom_of_continuous Compactum.homOfContinuous
+-/
 
 end Compactum
 
@@ -495,6 +522,7 @@ theorem faithful : Faithful compactumToCompHaus :=
 #align Compactum_to_CompHaus.faithful compactumToCompHaus.faithful
 -/
 
+#print compactumToCompHaus.isoOfTopologicalSpace /-
 /-- This definition is used to prove essential surjectivity of Compactum_to_CompHaus. -/
 def isoOfTopologicalSpace {D : CompHaus} :
     compactumToCompHaus.obj (Compactum.ofTopologicalSpace D) ≅ D
@@ -508,6 +536,7 @@ def isoOfTopologicalSpace {D : CompHaus} :
       continuous_toFun :=
         continuous_def.2 fun _ h1 => by rw [isOpen_iff_ultrafilter']; intro _ h2; exact h1 _ h2 }
 #align Compactum_to_CompHaus.iso_of_topological_space compactumToCompHaus.isoOfTopologicalSpace
+-/
 
 #print compactumToCompHaus.essSurj /-
 /-- The functor Compactum_to_CompHaus is essentially surjective. -/
Diff
@@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Adam Topaz
 
 ! This file was ported from Lean 3 source module topology.category.Compactum
-! leanprover-community/mathlib commit f2ce6086713c78a7f880485f7917ea547a215982
+! leanprover-community/mathlib commit 6b31d1eebd64eab86d5bd9936bfaada6ca8b5842
 ! Please do not edit these lines, except to modify the commit id
 ! if you have ported upstream changes.
 -/
@@ -19,6 +19,9 @@ import Mathbin.Data.Set.Constructions
 
 # Compacta and Compact Hausdorff Spaces
 
+> THIS FILE IS SYNCHRONIZED WITH MATHLIB4.
+> Any changes to this file require a corresponding PR to mathlib4.
+
 Recall that, given a monad `M` on `Type*`, an *algebra* for `M` consists of the following data:
 - A type `X : Type*`
 - A "structure" map `M X → X`.
Diff
@@ -223,7 +223,7 @@ private theorem basic_inter {X : Compactum} (A B : Set X) : basic (A ∩ B) = ba
 private theorem subset_cl {X : Compactum} (A : Set X) : A ⊆ cl A := fun a ha =>
   ⟨X.incl a, ha, by simp⟩
 
-/- ./././Mathport/Syntax/Translate/Basic.lean:635:2: warning: expanding binder collection (B C «expr ∈ » C0) -/
+/- ./././Mathport/Syntax/Translate/Basic.lean:638:2: warning: expanding binder collection (B C «expr ∈ » C0) -/
 private theorem cl_cl {X : Compactum} (A : Set X) : cl (cl A) ⊆ cl A :=
   by
   rintro _ ⟨F, hF, rfl⟩
@@ -297,7 +297,7 @@ theorem isClosed_cl {X : Compactum} (A : Set X) : IsClosed (cl A) :=
   exact cl_cl _ ⟨F, hF, rfl⟩
 #align Compactum.is_closed_cl Compactum.isClosed_cl
 
-/- ./././Mathport/Syntax/Translate/Basic.lean:635:2: warning: expanding binder collection (S1 S2 «expr ∈ » T0) -/
+/- ./././Mathport/Syntax/Translate/Basic.lean:638:2: warning: expanding binder collection (S1 S2 «expr ∈ » T0) -/
 theorem str_eq_of_le_nhds {X : Compactum} (F : Ultrafilter X) (x : X) : ↑F ≤ 𝓝 x → X.str F = x :=
   by
   -- Notation to be used in this proof.
Diff
@@ -84,29 +84,37 @@ open scoped Classical Topology
 -- mathport name: exprβ
 local notation "β" => ofTypeMonad Ultrafilter
 
+#print Compactum /-
 /-- The type `Compactum` of Compacta, defined as algebras for the ultrafilter monad. -/
 def Compactum :=
   Monad.Algebra β
 deriving Category, Inhabited
 #align Compactum Compactum
+-/
 
 namespace Compactum
 
+#print Compactum.forget /-
 /-- The forgetful functor to Type* -/
 def forget : Compactum ⥤ Type _ :=
   Monad.forget _
 deriving CreatesLimits, Faithful
 #align Compactum.forget Compactum.forget
+-/
 
+#print Compactum.free /-
 /-- The "free" Compactum functor. -/
 def free : Type _ ⥤ Compactum :=
   Monad.free _
 #align Compactum.free Compactum.free
+-/
 
+#print Compactum.adj /-
 /-- The adjunction between `free` and `forget`. -/
 def adj : free ⊣ forget :=
   Monad.adj _
 #align Compactum.adj Compactum.adj
+-/
 
 -- Basic instances
 instance : ConcreteCategory Compactum where forget := forget
@@ -410,6 +418,7 @@ theorem continuous_of_hom {X Y : Compactum} (f : X ⟶ Y) : Continuous f :=
   rw [← str_hom_commute, str_eq_of_le_nhds _ x h]
 #align Compactum.continuous_of_hom Compactum.continuous_of_hom
 
+#print Compactum.ofTopologicalSpace /-
 /-- Given any compact Hausdorff space, we construct a Compactum. -/
 noncomputable def ofTopologicalSpace (X : Type _) [TopologicalSpace X] [CompactSpace X]
     [T2Space X] : Compactum where
@@ -442,6 +451,7 @@ noncomputable def ofTopologicalSpace (X : Type _) [TopologicalSpace X] [CompactS
     rw [le_nhds_iff]
     exact c4
 #align Compactum.of_topological_space Compactum.ofTopologicalSpace
+-/
 
 /-- Any continuous map between Compacta is a morphism of compacta. -/
 def homOfContinuous {X Y : Compactum} (f : X → Y) (cont : Continuous f) : X ⟶ Y :=
@@ -456,6 +466,7 @@ def homOfContinuous {X Y : Compactum} (f : X → Y) (cont : Continuous f) : X 
 
 end Compactum
 
+#print compactumToCompHaus /-
 /-- The functor functor from Compactum to CompHaus. -/
 def compactumToCompHaus : Compactum ⥤ CompHaus
     where
@@ -464,17 +475,22 @@ def compactumToCompHaus : Compactum ⥤ CompHaus
     { toFun := f
       continuous_toFun := Compactum.continuous_of_hom _ }
 #align Compactum_to_CompHaus compactumToCompHaus
+-/
 
 namespace compactumToCompHaus
 
+#print compactumToCompHaus.full /-
 /-- The functor Compactum_to_CompHaus is full. -/
 def full : Full compactumToCompHaus.{u} where preimage X Y f := Compactum.homOfContinuous f.1 f.2
 #align Compactum_to_CompHaus.full compactumToCompHaus.full
+-/
 
+#print compactumToCompHaus.faithful /-
 /-- The functor Compactum_to_CompHaus is faithful. -/
 theorem faithful : Faithful compactumToCompHaus :=
   { }
 #align Compactum_to_CompHaus.faithful compactumToCompHaus.faithful
+-/
 
 /-- This definition is used to prove essential surjectivity of Compactum_to_CompHaus. -/
 def isoOfTopologicalSpace {D : CompHaus} :
@@ -490,11 +506,14 @@ def isoOfTopologicalSpace {D : CompHaus} :
         continuous_def.2 fun _ h1 => by rw [isOpen_iff_ultrafilter']; intro _ h2; exact h1 _ h2 }
 #align Compactum_to_CompHaus.iso_of_topological_space compactumToCompHaus.isoOfTopologicalSpace
 
+#print compactumToCompHaus.essSurj /-
 /-- The functor Compactum_to_CompHaus is essentially surjective. -/
 theorem essSurj : EssSurj compactumToCompHaus :=
   { mem_essImage := fun X => ⟨Compactum.ofTopologicalSpace X, ⟨isoOfTopologicalSpace⟩⟩ }
 #align Compactum_to_CompHaus.ess_surj compactumToCompHaus.essSurj
+-/
 
+#print compactumToCompHaus.isEquivalence /-
 /-- The functor Compactum_to_CompHaus is an equivalence of categories. -/
 noncomputable instance isEquivalence : IsEquivalence compactumToCompHaus :=
   by
@@ -503,16 +522,20 @@ noncomputable instance isEquivalence : IsEquivalence compactumToCompHaus :=
   exact compactumToCompHaus.faithful
   exact compactumToCompHaus.essSurj
 #align Compactum_to_CompHaus.is_equivalence compactumToCompHaus.isEquivalence
+-/
 
 end compactumToCompHaus
 
+#print compactumToCompHausCompForget /-
 /-- The forgetful functors of `Compactum` and `CompHaus` are compatible via
 `Compactum_to_CompHaus`. -/
 def compactumToCompHausCompForget :
     compactumToCompHaus ⋙ CategoryTheory.forget CompHaus ≅ Compactum.forget :=
   (NatIso.ofComponents fun X => eqToIso rfl) <| by intro X Y f; dsimp; simpa
 #align Compactum_to_CompHaus_comp_forget compactumToCompHausCompForget
+-/
 
+#print CompHaus.forgetCreatesLimits /-
 /-
 TODO: `forget CompHaus` is monadic, as it is isomorphic to the composition
 of an equivalence with the monadic functor `forget Compactum`.
@@ -531,10 +554,13 @@ noncomputable instance CompHaus.forgetCreatesLimits : CreatesLimits (forget Comp
   exact Compactum_to_CompHaus.as_equivalence.symm.unit_iso
   exact creates_limits_of_nat_iso e.symm
 #align CompHaus.forget_creates_limits CompHaus.forgetCreatesLimits
+-/
 
+#print Profinite.forgetCreatesLimits /-
 noncomputable instance Profinite.forgetCreatesLimits : CreatesLimits (forget Profinite) :=
   by
   change creates_limits (profiniteToCompHaus ⋙ forget _)
   infer_instance
 #align Profinite.forget_creates_limits Profinite.forgetCreatesLimits
+-/
 
Diff
@@ -118,7 +118,7 @@ instance {X Y : Compactum} : CoeFun (X ⟶ Y) fun f => X → Y :=
   ⟨fun f => f.f⟩
 
 instance : HasLimits Compactum :=
-  has_limits_of_has_limits_creates_limits forget
+  hasLimits_of_hasLimits_createsLimits forget
 
 /-- The structure map for a compactum, essentially sending an ultrafilter to its limit. -/
 def str (X : Compactum) : Ultrafilter X → X :=
@@ -196,7 +196,7 @@ instance {X : Compactum} : CompactSpace X :=
 
 /-- A local definition used only in the proofs. -/
 private def basic {X : Compactum} (A : Set X) : Set (Ultrafilter X) :=
-  { F | A ∈ F }
+  {F | A ∈ F}
 
 /-- A local definition used only in the proofs. -/
 private def cl {X : Compactum} (A : Set X) : Set X :=
@@ -207,7 +207,7 @@ private theorem basic_inter {X : Compactum} (A B : Set X) : basic (A ∩ B) = ba
   ext G
   constructor
   · intro hG
-    constructor <;> filter_upwards [hG]with _
+    constructor <;> filter_upwards [hG] with _
     exacts [And.left, And.right]
   · rintro ⟨h1, h2⟩
     exact inter_mem h1 h2
@@ -223,8 +223,8 @@ private theorem cl_cl {X : Compactum} (A : Set X) : cl (cl A) ⊆ cl A :=
   let fsu := Finset (Set (Ultrafilter X))
   let ssu := Set (Set (Ultrafilter X))
   let ι : fsu → ssu := coe
-  let C0 : ssu := { Z | ∃ B ∈ F, X.str ⁻¹' B = Z }
-  let AA := { G : Ultrafilter X | A ∈ G }
+  let C0 : ssu := {Z | ∃ B ∈ F, X.str ⁻¹' B = Z}
+  let AA := {G : Ultrafilter X | A ∈ G}
   let C1 := insert AA C0
   let C2 := finite_inter_closure C1
   -- C0 is closed under intersections.
@@ -296,7 +296,7 @@ theorem str_eq_of_le_nhds {X : Compactum} (F : Ultrafilter X) (x : X) : ↑F ≤
   let fsu := Finset (Set (Ultrafilter X))
   let ssu := Set (Set (Ultrafilter X))
   let ι : fsu → ssu := coe
-  let T0 : ssu := { S | ∃ A ∈ F, S = basic A }
+  let T0 : ssu := {S | ∃ A ∈ F, S = basic A}
   let AA := X.str ⁻¹' {x}
   let T1 := insert AA T0
   let T2 := finite_inter_closure T1
@@ -429,7 +429,7 @@ noncomputable def ofTopologicalSpace (X : Type _) [TopologicalSpace X] [CompactS
       rw [le_nhds_iff]
       intro U hx hU
       exact mem_coe.2 (c2 _ _ (by rwa [← c1]) hU)
-    have c4 : ∀ U : Set X, x ∈ U → IsOpen U → { G : Ultrafilter X | U ∈ G } ∈ FF :=
+    have c4 : ∀ U : Set X, x ∈ U → IsOpen U → {G : Ultrafilter X | U ∈ G} ∈ FF :=
       by
       intro U hx hU
       suffices Ultrafilter.lim ⁻¹' U ∈ FF
Diff
@@ -86,14 +86,16 @@ local notation "β" => ofTypeMonad Ultrafilter
 
 /-- The type `Compactum` of Compacta, defined as algebras for the ultrafilter monad. -/
 def Compactum :=
-  Monad.Algebra β deriving Category, Inhabited
+  Monad.Algebra β
+deriving Category, Inhabited
 #align Compactum Compactum
 
 namespace Compactum
 
 /-- The forgetful functor to Type* -/
 def forget : Compactum ⥤ Type _ :=
-  Monad.forget _ deriving CreatesLimits, Faithful
+  Monad.forget _
+deriving CreatesLimits, Faithful
 #align Compactum.forget Compactum.forget
 
 /-- The "free" Compactum functor. -/
@@ -175,11 +177,11 @@ theorem isClosed_iff {X : Compactum} (S : Set X) :
   · intro cond F h
     by_contra c
     specialize cond F c
-    rw [compl_mem_iff_not_mem] at cond
+    rw [compl_mem_iff_not_mem] at cond 
     contradiction
   · intro h1 F h2
     specialize h1 F
-    cases F.mem_or_compl_mem S; exacts[absurd (h1 h) h2, h]
+    cases F.mem_or_compl_mem S; exacts [absurd (h1 h) h2, h]
 #align Compactum.is_closed_iff Compactum.isClosed_iff
 
 instance {X : Compactum} : CompactSpace X :=
@@ -206,7 +208,7 @@ private theorem basic_inter {X : Compactum} (A B : Set X) : basic (A ∩ B) = ba
   constructor
   · intro hG
     constructor <;> filter_upwards [hG]with _
-    exacts[And.left, And.right]
+    exacts [And.left, And.right]
   · rintro ⟨h1, h2⟩
     exact inter_mem h1 h2
 
@@ -246,7 +248,7 @@ private theorem cl_cl {X : Compactum} (A : Set X) : cl (cl A) ⊆ cl A :=
     have : (Q ∩ cl A).Nonempty := Filter.nonempty_of_mem (inter_mem hQ hF)
     rcases this with ⟨q, hq1, P, hq2, hq3⟩
     refine' ⟨P, hq2, _⟩
-    rw [← hq3] at hq1
+    rw [← hq3] at hq1 
     simpa
   -- Suffices to show that the intersection of any finite subcollection of C1 is nonempty.
   suffices ∀ T : fsu, ι T ⊆ C1 → (⋂₀ ι T).Nonempty
@@ -304,9 +306,9 @@ theorem str_eq_of_le_nhds {X : Compactum} (F : Ultrafilter X) (x : X) : ↑F ≤
     by
     intro A hA h
     by_contra H
-    rw [le_nhds_iff] at cond
+    rw [le_nhds_iff] at cond 
     specialize cond (Aᶜ) H hA.is_open_compl
-    rw [Ultrafilter.mem_coe, Ultrafilter.compl_mem_iff_not_mem] at cond
+    rw [Ultrafilter.mem_coe, Ultrafilter.compl_mem_iff_not_mem] at cond 
     contradiction
   -- If A ∈ F, then x ∈ cl A.
   have claim2 : ∀ A : Set X, A ∈ F → x ∈ cl A :=
@@ -416,7 +418,7 @@ noncomputable def ofTopologicalSpace (X : Type _) [TopologicalSpace X] [CompactS
   unit' := by ext x; exact lim_eq (pure_le_nhds _)
   assoc' := by
     ext FF
-    change Ultrafilter (Ultrafilter X) at FF
+    change Ultrafilter (Ultrafilter X) at FF 
     set x := (Ultrafilter.map Ultrafilter.lim FF).lim with c1
     have c2 : ∀ (U : Set X) (F : Ultrafilter X), F.lim ∈ U → IsOpen U → U ∈ F :=
       by
@@ -445,7 +447,7 @@ noncomputable def ofTopologicalSpace (X : Type _) [TopologicalSpace X] [CompactS
 def homOfContinuous {X Y : Compactum} (f : X → Y) (cont : Continuous f) : X ⟶ Y :=
   { f
     h' := by
-      rw [continuous_iff_ultrafilter] at cont
+      rw [continuous_iff_ultrafilter] at cont 
       ext (F : Ultrafilter X)
       specialize cont (X.str F) F (le_nhds_of_str_eq F (X.str F) rfl)
       have := str_eq_of_le_nhds (Ultrafilter.map f F) _ cont
@@ -481,7 +483,7 @@ def isoOfTopologicalSpace {D : CompHaus} :
   Hom :=
     { toFun := id
       continuous_toFun :=
-        continuous_def.2 fun _ h => by rw [isOpen_iff_ultrafilter'] at h; exact h }
+        continuous_def.2 fun _ h => by rw [isOpen_iff_ultrafilter'] at h ; exact h }
   inv :=
     { toFun := id
       continuous_toFun :=
Diff
@@ -79,7 +79,7 @@ universe u
 
 open CategoryTheory Filter Ultrafilter TopologicalSpace CategoryTheory.Limits FiniteInter
 
-open Classical Topology
+open scoped Classical Topology
 
 -- mathport name: exprβ
 local notation "β" => ofTypeMonad Ultrafilter
Diff
@@ -179,8 +179,7 @@ theorem isClosed_iff {X : Compactum} (S : Set X) :
     contradiction
   · intro h1 F h2
     specialize h1 F
-    cases F.mem_or_compl_mem S
-    exacts[absurd (h1 h) h2, h]
+    cases F.mem_or_compl_mem S; exacts[absurd (h1 h) h2, h]
 #align Compactum.is_closed_iff Compactum.isClosed_iff
 
 instance {X : Compactum} : CompactSpace X :=
@@ -414,9 +413,7 @@ noncomputable def ofTopologicalSpace (X : Type _) [TopologicalSpace X] [CompactS
     [T2Space X] : Compactum where
   A := X
   a := Ultrafilter.lim
-  unit' := by
-    ext x
-    exact lim_eq (pure_le_nhds _)
+  unit' := by ext x; exact lim_eq (pure_le_nhds _)
   assoc' := by
     ext FF
     change Ultrafilter (Ultrafilter X) at FF
@@ -484,16 +481,11 @@ def isoOfTopologicalSpace {D : CompHaus} :
   Hom :=
     { toFun := id
       continuous_toFun :=
-        continuous_def.2 fun _ h => by
-          rw [isOpen_iff_ultrafilter'] at h
-          exact h }
+        continuous_def.2 fun _ h => by rw [isOpen_iff_ultrafilter'] at h; exact h }
   inv :=
     { toFun := id
       continuous_toFun :=
-        continuous_def.2 fun _ h1 => by
-          rw [isOpen_iff_ultrafilter']
-          intro _ h2
-          exact h1 _ h2 }
+        continuous_def.2 fun _ h1 => by rw [isOpen_iff_ultrafilter']; intro _ h2; exact h1 _ h2 }
 #align Compactum_to_CompHaus.iso_of_topological_space compactumToCompHaus.isoOfTopologicalSpace
 
 /-- The functor Compactum_to_CompHaus is essentially surjective. -/
@@ -516,11 +508,7 @@ end compactumToCompHaus
 `Compactum_to_CompHaus`. -/
 def compactumToCompHausCompForget :
     compactumToCompHaus ⋙ CategoryTheory.forget CompHaus ≅ Compactum.forget :=
-  (NatIso.ofComponents fun X => eqToIso rfl) <|
-    by
-    intro X Y f
-    dsimp
-    simpa
+  (NatIso.ofComponents fun X => eqToIso rfl) <| by intro X Y f; dsimp; simpa
 #align Compactum_to_CompHaus_comp_forget compactumToCompHausCompForget
 
 /-
Diff
@@ -196,12 +196,10 @@ instance {X : Compactum} : CompactSpace X :=
 /-- A local definition used only in the proofs. -/
 private def basic {X : Compactum} (A : Set X) : Set (Ultrafilter X) :=
   { F | A ∈ F }
-#align Compactum.basic Compactum.basic
 
 /-- A local definition used only in the proofs. -/
 private def cl {X : Compactum} (A : Set X) : Set X :=
   X.str '' basic A
-#align Compactum.cl Compactum.cl
 
 private theorem basic_inter {X : Compactum} (A B : Set X) : basic (A ∩ B) = basic A ∩ basic B :=
   by
@@ -212,11 +210,9 @@ private theorem basic_inter {X : Compactum} (A B : Set X) : basic (A ∩ B) = ba
     exacts[And.left, And.right]
   · rintro ⟨h1, h2⟩
     exact inter_mem h1 h2
-#align Compactum.basic_inter Compactum.basic_inter
 
 private theorem subset_cl {X : Compactum} (A : Set X) : A ⊆ cl A := fun a ha =>
   ⟨X.incl a, ha, by simp⟩
-#align Compactum.subset_cl Compactum.subset_cl
 
 /- ./././Mathport/Syntax/Translate/Basic.lean:635:2: warning: expanding binder collection (B C «expr ∈ » C0) -/
 private theorem cl_cl {X : Compactum} (A : Set X) : cl (cl A) ⊆ cl A :=
@@ -284,7 +280,6 @@ private theorem cl_cl {X : Compactum} (A : Set X) : cl (cl A) ⊆ cl A :=
   apply claim4.finite_inter_mem
   intro t ht
   exact finite_inter_closure.basic (@hT t ht)
-#align Compactum.cl_cl Compactum.cl_cl
 
 theorem isClosed_cl {X : Compactum} (A : Set X) : IsClosed (cl A) :=
   by
Diff
@@ -164,8 +164,8 @@ instance {X : Compactum} : TopologicalSpace X
   IsOpen U := ∀ F : Ultrafilter X, X.str F ∈ U → U ∈ F
   isOpen_univ _ _ := Filter.univ_sets _
   isOpen_inter S T h3 h4 h5 h6 := Filter.inter_sets _ (h3 _ h6.1) (h4 _ h6.2)
-  isOpen_unionₛ := fun S h1 F ⟨T, hT, h2⟩ =>
-    mem_of_superset (h1 T hT _ h2) (Set.subset_unionₛ_of_mem hT)
+  isOpen_sUnion := fun S h1 F ⟨T, hT, h2⟩ =>
+    mem_of_superset (h1 T hT _ h2) (Set.subset_sUnion_of_mem hT)
 
 theorem isClosed_iff {X : Compactum} (S : Set X) :
     IsClosed S ↔ ∀ F : Ultrafilter X, S ∈ F → X.str F ∈ S :=
Diff
@@ -417,7 +417,7 @@ theorem continuous_of_hom {X Y : Compactum} (f : X ⟶ Y) : Continuous f :=
 /-- Given any compact Hausdorff space, we construct a Compactum. -/
 noncomputable def ofTopologicalSpace (X : Type _) [TopologicalSpace X] [CompactSpace X]
     [T2Space X] : Compactum where
-  a := X
+  A := X
   a := Ultrafilter.lim
   unit' := by
     ext x
Diff
@@ -218,7 +218,7 @@ private theorem subset_cl {X : Compactum} (A : Set X) : A ⊆ cl A := fun a ha =
   ⟨X.incl a, ha, by simp⟩
 #align Compactum.subset_cl Compactum.subset_cl
 
-/- ./././Mathport/Syntax/Translate/Basic.lean:628:2: warning: expanding binder collection (B C «expr ∈ » C0) -/
+/- ./././Mathport/Syntax/Translate/Basic.lean:635:2: warning: expanding binder collection (B C «expr ∈ » C0) -/
 private theorem cl_cl {X : Compactum} (A : Set X) : cl (cl A) ⊆ cl A :=
   by
   rintro _ ⟨F, hF, rfl⟩
@@ -293,7 +293,7 @@ theorem isClosed_cl {X : Compactum} (A : Set X) : IsClosed (cl A) :=
   exact cl_cl _ ⟨F, hF, rfl⟩
 #align Compactum.is_closed_cl Compactum.isClosed_cl
 
-/- ./././Mathport/Syntax/Translate/Basic.lean:628:2: warning: expanding binder collection (S1 S2 «expr ∈ » T0) -/
+/- ./././Mathport/Syntax/Translate/Basic.lean:635:2: warning: expanding binder collection (S1 S2 «expr ∈ » T0) -/
 theorem str_eq_of_le_nhds {X : Compactum} (F : Ultrafilter X) (x : X) : ↑F ≤ 𝓝 x → X.str F = x :=
   by
   -- Notation to be used in this proof.
Diff
@@ -116,7 +116,7 @@ instance {X Y : Compactum} : CoeFun (X ⟶ Y) fun f => X → Y :=
   ⟨fun f => f.f⟩
 
 instance : HasLimits Compactum :=
-  hasLimitsOfHasLimitsCreatesLimits forget
+  has_limits_of_has_limits_creates_limits forget
 
 /-- The structure map for a compactum, essentially sending an ultrafilter to its limit. -/
 def str (X : Compactum) : Ultrafilter X → X :=

Changes in mathlib4

mathlib3
mathlib4
chore(CategoryTheory): make Functor.Full a Prop (#12449)

Before this PR, Functor.Full contained the data of the preimage of maps by a full functor F. This PR makes Functor.Full a proposition. This is to prevent any diamond to appear.

The lemma Functor.image_preimage is also renamed Functor.map_preimage.

Co-authored-by: Joël Riou <37772949+joelriou@users.noreply.github.com>

Diff
@@ -441,11 +441,12 @@ def compactumToCompHaus : Compactum ⥤ CompHaus where
 namespace compactumToCompHaus
 
 /-- The functor `compactumToCompHaus` is full. -/
-def full : compactumToCompHaus.{u}.Full where preimage X Y {f} := Compactum.homOfContinuous f.1 f.2
+instance full : compactumToCompHaus.{u}.Full where
+  map_surjective f := ⟨Compactum.homOfContinuous f.1 f.2, rfl⟩
 #align Compactum_to_CompHaus.full compactumToCompHaus.full
 
 /-- The functor `compactumToCompHaus` is faithful. -/
-theorem faithful : compactumToCompHaus.Faithful where
+instance faithful : compactumToCompHaus.Faithful where
   -- Porting note: this used to be obviously (though it consumed a bit of memory)
   map_injective := by
     intro _ _ _ _ h
@@ -473,16 +474,13 @@ def isoOfTopologicalSpace {D : CompHaus} :
 #align Compactum_to_CompHaus.iso_of_topological_space compactumToCompHaus.isoOfTopologicalSpace
 
 /-- The functor `compactumToCompHaus` is essentially surjective. -/
-theorem essSurj : compactumToCompHaus.EssSurj :=
+instance essSurj : compactumToCompHaus.EssSurj :=
   { mem_essImage := fun X => ⟨Compactum.ofTopologicalSpace X, ⟨isoOfTopologicalSpace⟩⟩ }
 #align Compactum_to_CompHaus.ess_surj compactumToCompHaus.essSurj
 
 /-- The functor `compactumToCompHaus` is an equivalence of categories. -/
-noncomputable instance isEquivalence : compactumToCompHaus.IsEquivalence := by
-  have := compactumToCompHaus.full
-  have := compactumToCompHaus.faithful
-  have := compactumToCompHaus.essSurj
-  apply Functor.IsEquivalence.ofFullyFaithfullyEssSurj _
+noncomputable instance isEquivalence : compactumToCompHaus.IsEquivalence :=
+  Functor.IsEquivalence.ofFullyFaithfullyEssSurj _
 #align Compactum_to_CompHaus.is_equivalence compactumToCompHaus.isEquivalence
 
 end compactumToCompHaus
chore(CategoryTheory): move Full, Faithful, EssSurj, IsEquivalence and ReflectsIsomorphisms to the Functor namespace (#11985)

These notions on functors are now Functor.Full, Functor.Faithful, Functor.EssSurj, Functor.IsEquivalence, Functor.ReflectsIsomorphisms. Deprecated aliases are introduced for the previous names.

Diff
@@ -95,8 +95,8 @@ def forget : Compactum ⥤ Type* :=
   -- Porting note: deriving fails, adding manually. Note `CreatesLimits` now noncomputable
 #align Compactum.forget Compactum.forget
 
-instance : Faithful forget :=
-  show Faithful <| Monad.forget _ from inferInstance
+instance : forget.Faithful :=
+  show (Monad.forget _).Faithful from inferInstance
 
 noncomputable instance : CreatesLimits forget :=
   show CreatesLimits <| Monad.forget _ from inferInstance
@@ -441,11 +441,11 @@ def compactumToCompHaus : Compactum ⥤ CompHaus where
 namespace compactumToCompHaus
 
 /-- The functor `compactumToCompHaus` is full. -/
-def full : Full compactumToCompHaus.{u} where preimage X Y {f} := Compactum.homOfContinuous f.1 f.2
+def full : compactumToCompHaus.{u}.Full where preimage X Y {f} := Compactum.homOfContinuous f.1 f.2
 #align Compactum_to_CompHaus.full compactumToCompHaus.full
 
 /-- The functor `compactumToCompHaus` is faithful. -/
-theorem faithful : Faithful compactumToCompHaus where
+theorem faithful : compactumToCompHaus.Faithful where
   -- Porting note: this used to be obviously (though it consumed a bit of memory)
   map_injective := by
     intro _ _ _ _ h
@@ -473,16 +473,16 @@ def isoOfTopologicalSpace {D : CompHaus} :
 #align Compactum_to_CompHaus.iso_of_topological_space compactumToCompHaus.isoOfTopologicalSpace
 
 /-- The functor `compactumToCompHaus` is essentially surjective. -/
-theorem essSurj : EssSurj compactumToCompHaus :=
+theorem essSurj : compactumToCompHaus.EssSurj :=
   { mem_essImage := fun X => ⟨Compactum.ofTopologicalSpace X, ⟨isoOfTopologicalSpace⟩⟩ }
 #align Compactum_to_CompHaus.ess_surj compactumToCompHaus.essSurj
 
 /-- The functor `compactumToCompHaus` is an equivalence of categories. -/
-noncomputable instance isEquivalence : IsEquivalence compactumToCompHaus := by
+noncomputable instance isEquivalence : compactumToCompHaus.IsEquivalence := by
   have := compactumToCompHaus.full
   have := compactumToCompHaus.faithful
   have := compactumToCompHaus.essSurj
-  apply Equivalence.ofFullyFaithfullyEssSurj _
+  apply Functor.IsEquivalence.ofFullyFaithfullyEssSurj _
 #align Compactum_to_CompHaus.is_equivalence compactumToCompHaus.isEquivalence
 
 end compactumToCompHaus
chore: scope open Classical (#11199)

We remove all but one open Classicals, instead preferring to use open scoped Classical. The only real side-effect this led to is moving a couple declarations to use Exists.choose instead of Classical.choose.

The first few commits are explicitly labelled regex replaces for ease of review.

Diff
@@ -77,7 +77,8 @@ universe u
 
 open CategoryTheory Filter Ultrafilter TopologicalSpace CategoryTheory.Limits FiniteInter
 
-open Classical Topology
+open scoped Classical
+open Topology
 
 local notation "β" => ofTypeMonad Ultrafilter
 
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
@@ -71,7 +71,7 @@ We also add wrappers around structures which already exist. Here are the main on
 
 -/
 
--- porting note: "Compactum" is already upper case
+-- Porting note: "Compactum" is already upper case
 set_option linter.uppercaseLean3 false
 universe u
 
chore: remove terminal, terminal refines (#10762)

I replaced a few "terminal" refine/refine's with exact.

The strategy was very simple-minded: essentially any refine whose following line had smaller indentation got replaced by exact and then I cleaned up the mess.

This PR certainly leaves some further terminal refines, but maybe the current change is beneficial.

Diff
@@ -270,7 +270,7 @@ private theorem cl_cl {X : Compactum} (A : Set X) : cl (cl A) ⊆ cl A := by
   -- Finish
   apply claim4.finiteInter_mem T
   intro t ht
-  refine' finiteInterClosure.basic (@hT t ht)
+  exact finiteInterClosure.basic (@hT t ht)
 
 theorem isClosed_cl {X : Compactum} (A : Set X) : IsClosed (cl A) := by
   rw [isClosed_iff]
chore: cleanup typo in filter_upwards (#7719)

mathport was forgetting a space in filter_upwards [...]with instead of filter_upwards [...] with.

Diff
@@ -205,7 +205,7 @@ private theorem basic_inter {X : Compactum} (A B : Set X) : basic (A ∩ B) = ba
   ext G
   constructor
   · intro hG
-    constructor <;> filter_upwards [hG]with _
+    constructor <;> filter_upwards [hG] with _
     exacts [And.left, And.right]
   · rintro ⟨h1, h2⟩
     exact inter_mem h1 h2
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
@@ -16,8 +16,8 @@ import Mathlib.Data.Set.Constructions
 
 # Compacta and Compact Hausdorff Spaces
 
-Recall that, given a monad `M` on `Type _`, an *algebra* for `M` consists of the following data:
-- A type `X : Type _`
+Recall that, given a monad `M` on `Type*`, an *algebra* for `M` consists of the following data:
+- A type `X : Type*`
 - A "structure" map `M X → X`.
 This data must also satisfy a distributivity and unit axiom, and algebras for `M` form a category
 in an evident way.
@@ -41,7 +41,7 @@ map `Ultrafilter X → X` for an algebra `X` of the ultrafilter monad should be
 sending an ultrafilter to its limit in `X`. The topology on `X` is then defined by mimicking the
 characterization of open sets in terms of ultrafilters.
 
-Any `X : Compactum` is endowed with a coercion to `Type _`, as well as the following instances:
+Any `X : Compactum` is endowed with a coercion to `Type*`, as well as the following instances:
 - `TopologicalSpace X`.
 - `CompactSpace X`.
 - `T2Space X`.
@@ -55,9 +55,9 @@ topological space which satisfies `CompactSpace` and `T2Space`.
 We also add wrappers around structures which already exist. Here are the main ones, all in the
 `Compactum` namespace:
 
-- `forget : Compactum ⥤ Type _` is the forgetful functor, which induces a `ConcreteCategory`
+- `forget : Compactum ⥤ Type*` is the forgetful functor, which induces a `ConcreteCategory`
   instance for `Compactum`.
-- `free : Type _ ⥤ Compactum` is the left adjoint to `forget`, and the adjunction is in `adj`.
+- `free : Type* ⥤ Compactum` is the left adjoint to `forget`, and the adjunction is in `adj`.
 - `str : Ultrafilter X → X` is the structure map for `X : Compactum`.
   The notation `X.str` is preferred.
 - `join : Ultrafilter (Ultrafilter X) → Ultrafilter X` is the monadic join for `X : Compactum`.
@@ -88,8 +88,8 @@ def Compactum :=
 
 namespace Compactum
 
-/-- The forgetful functor to Type _ -/
-def forget : Compactum ⥤ Type _ :=
+/-- The forgetful functor to Type* -/
+def forget : Compactum ⥤ Type* :=
   Monad.forget _ --deriving CreatesLimits, Faithful
   -- Porting note: deriving fails, adding manually. Note `CreatesLimits` now noncomputable
 #align Compactum.forget Compactum.forget
@@ -101,7 +101,7 @@ noncomputable instance : CreatesLimits forget :=
   show CreatesLimits <| Monad.forget _ from inferInstance
 
 /-- The "free" Compactum functor. -/
-def free : Type _ ⥤ Compactum :=
+def free : Type* ⥤ Compactum :=
   Monad.free _
 #align Compactum.free Compactum.free
 
@@ -114,7 +114,7 @@ def adj : free ⊣ forget :=
 instance : ConcreteCategory Compactum where forget := forget
 
 -- Porting note: changed from forget to X.A
-instance : CoeSort Compactum (Type _) :=
+instance : CoeSort Compactum (Type*) :=
   ⟨fun X => X.A⟩
 
 instance {X Y : Compactum} : CoeFun (X ⟶ Y) fun _ => X → Y :=
@@ -386,7 +386,7 @@ theorem continuous_of_hom {X Y : Compactum} (f : X ⟶ Y) : Continuous f := by
 #align Compactum.continuous_of_hom Compactum.continuous_of_hom
 
 /-- Given any compact Hausdorff space, we construct a Compactum. -/
-noncomputable def ofTopologicalSpace (X : Type _) [TopologicalSpace X] [CompactSpace X]
+noncomputable def ofTopologicalSpace (X : Type*) [TopologicalSpace X] [CompactSpace X]
     [T2Space X] : Compactum where
   A := X
   a := Ultrafilter.lim
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,11 +2,6 @@
 Copyright (c) 2020 Adam Topaz. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Adam Topaz
-
-! This file was ported from Lean 3 source module topology.category.Compactum
-! leanprover-community/mathlib commit f2ce6086713c78a7f880485f7917ea547a215982
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
 -/
 import Mathlib.CategoryTheory.Monad.Types
 import Mathlib.CategoryTheory.Monad.Limits
@@ -15,6 +10,8 @@ import Mathlib.Topology.Category.CompHaus.Basic
 import Mathlib.Topology.Category.Profinite.Basic
 import Mathlib.Data.Set.Constructions
 
+#align_import topology.category.Compactum from "leanprover-community/mathlib"@"f2ce6086713c78a7f880485f7917ea547a215982"
+
 /-!
 
 # Compacta and Compact Hausdorff Spaces
fix: change compl precedence (#5586)

Co-authored-by: Yury G. Kudryashov <urkud@urkud.name>

Diff
@@ -296,7 +296,7 @@ theorem str_eq_of_le_nhds {X : Compactum} (F : Ultrafilter X) (x : X) : ↑F ≤
     intro A hA h
     by_contra H
     rw [le_nhds_iff] at cond
-    specialize cond (Aᶜ) H hA.isOpen_compl
+    specialize cond Aᶜ H hA.isOpen_compl
     rw [Ultrafilter.mem_coe, Ultrafilter.compl_mem_iff_not_mem] at cond
     contradiction
   -- If A ∈ F, then x ∈ cl A.
chore: tidy various files (#5355)
Diff
@@ -19,8 +19,8 @@ import Mathlib.Data.Set.Constructions
 
 # Compacta and Compact Hausdorff Spaces
 
-Recall that, given a monad `M` on `Type*`, an *algebra* for `M` consists of the following data:
-- A type `X : Type*`
+Recall that, given a monad `M` on `Type _`, an *algebra* for `M` consists of the following data:
+- A type `X : Type _`
 - A "structure" map `M X → X`.
 This data must also satisfy a distributivity and unit axiom, and algebras for `M` form a category
 in an evident way.
@@ -37,14 +37,14 @@ Here are the main objects introduced in this file.
 - `Compactum` is the type of compacta, which we define as algebras for the ultrafilter monad.
 - `compactumToCompHaus` is the functor `Compactum ⥤ CompHaus`. Here `CompHaus` is the usual
   category of compact Hausdorff spaces.
-- `compactumToCompHaus.isEquivalence` is a term of type `is_equivalence compactumToCompHaus`.
+- `compactumToCompHaus.isEquivalence` is a term of type `IsEquivalence compactumToCompHaus`.
 
 The proof of this equivalence is a bit technical. But the idea is quite simply that the structure
 map `Ultrafilter X → X` for an algebra `X` of the ultrafilter monad should be considered as the map
 sending an ultrafilter to its limit in `X`. The topology on `X` is then defined by mimicking the
 characterization of open sets in terms of ultrafilters.
 
-Any `X : Compactum` is endowed with a coercion to `Type*`, as well as the following instances:
+Any `X : Compactum` is endowed with a coercion to `Type _`, as well as the following instances:
 - `TopologicalSpace X`.
 - `CompactSpace X`.
 - `T2Space X`.
@@ -58,9 +58,9 @@ topological space which satisfies `CompactSpace` and `T2Space`.
 We also add wrappers around structures which already exist. Here are the main ones, all in the
 `Compactum` namespace:
 
-- `forget : Compactum ⥤ Type*` is the forgetful functor, which induces a `concrete_category`
+- `forget : Compactum ⥤ Type _` is the forgetful functor, which induces a `ConcreteCategory`
   instance for `Compactum`.
-- `free : Type* ⥤ Compactum` is the left adjoint to `forget`, and the adjunction is in `adj`.
+- `free : Type _ ⥤ Compactum` is the left adjoint to `forget`, and the adjunction is in `adj`.
 - `str : Ultrafilter X → X` is the structure map for `X : Compactum`.
   The notation `X.str` is preferred.
 - `join : Ultrafilter (Ultrafilter X) → Ultrafilter X` is the monadic join for `X : Compactum`.
@@ -82,7 +82,6 @@ open CategoryTheory Filter Ultrafilter TopologicalSpace CategoryTheory.Limits Fi
 
 open Classical Topology
 
--- mathport name: exprβ
 local notation "β" => ofTypeMonad Ultrafilter
 
 /-- The type `Compactum` of Compacta, defined as algebras for the ultrafilter monad. -/
@@ -92,7 +91,7 @@ def Compactum :=
 
 namespace Compactum
 
-/-- The forgetful functor to Type* -/
+/-- The forgetful functor to Type _ -/
 def forget : Compactum ⥤ Type _ :=
   Monad.forget _ --deriving CreatesLimits, Faithful
   -- Porting note: deriving fails, adding manually. Note `CreatesLimits` now noncomputable
@@ -102,7 +101,7 @@ instance : Faithful forget :=
   show Faithful <| Monad.forget _ from inferInstance
 
 noncomputable instance : CreatesLimits forget :=
-show CreatesLimits <| Monad.forget _ from inferInstance
+  show CreatesLimits <| Monad.forget _ from inferInstance
 
 /-- The "free" Compactum functor. -/
 def free : Type _ ⥤ Compactum :=
@@ -200,12 +199,10 @@ instance {X : Compactum} : CompactSpace X := by
 /-- A local definition used only in the proofs. -/
 private def basic {X : Compactum} (A : Set X) : Set (Ultrafilter X) :=
   { F | A ∈ F }
--- Porting note: removed #align declaration since it is a private lemma
 
 /-- A local definition used only in the proofs. -/
 private def cl {X : Compactum} (A : Set X) : Set X :=
   X.str '' basic A
--- Porting note: removed #align declaration since it is a private lemma
 
 private theorem basic_inter {X : Compactum} (A B : Set X) : basic (A ∩ B) = basic A ∩ basic B := by
   ext G
@@ -215,11 +212,9 @@ private theorem basic_inter {X : Compactum} (A B : Set X) : basic (A ∩ B) = ba
     exacts [And.left, And.right]
   · rintro ⟨h1, h2⟩
     exact inter_mem h1 h2
--- Porting note: removed #align declaration since it is a private lemma
 
 private theorem subset_cl {X : Compactum} (A : Set X) : A ⊆ cl A := fun a ha =>
   ⟨X.incl a, ha, by simp⟩
--- Porting note: removed #align declaration since it is a private lemma
 
 private theorem cl_cl {X : Compactum} (A : Set X) : cl (cl A) ⊆ cl A := by
   rintro _ ⟨F, hF, rfl⟩
@@ -279,7 +274,6 @@ private theorem cl_cl {X : Compactum} (A : Set X) : cl (cl A) ⊆ cl A := by
   apply claim4.finiteInter_mem T
   intro t ht
   refine' finiteInterClosure.basic (@hT t ht)
--- Porting note: removed #align declaration since it is a private lemma
 
 theorem isClosed_cl {X : Compactum} (A : Set X) : IsClosed (cl A) := by
   rw [isClosed_iff]
@@ -362,7 +356,7 @@ theorem le_nhds_of_str_eq {X : Compactum} (F : Ultrafilter X) (x : X) : X.str F
   fun h => le_nhds_iff.mpr fun s hx hs => hs _ <| by rwa [h]
 #align Compactum.le_nhds_of_str_eq Compactum.le_nhds_of_str_eq
 
--- All the hard work above boils down to this t2_space instance.
+-- All the hard work above boils down to this `T2Space` instance.
 instance {X : Compactum} : T2Space X := by
   rw [t2_iff_ultrafilter]
   intro _ _ F hx hy
@@ -448,11 +442,11 @@ def compactumToCompHaus : Compactum ⥤ CompHaus where
 
 namespace compactumToCompHaus
 
-/-- The functor Compactum_to_CompHaus is full. -/
+/-- The functor `compactumToCompHaus` is full. -/
 def full : Full compactumToCompHaus.{u} where preimage X Y {f} := Compactum.homOfContinuous f.1 f.2
 #align Compactum_to_CompHaus.full compactumToCompHaus.full
 
-/-- The functor Compactum_to_CompHaus is faithful. -/
+/-- The functor `compactumToCompHaus` is faithful. -/
 theorem faithful : Faithful compactumToCompHaus where
   -- Porting note: this used to be obviously (though it consumed a bit of memory)
   map_injective := by
@@ -462,7 +456,7 @@ theorem faithful : Faithful compactumToCompHaus where
     apply congrArg (fun f => f.toFun) h
 #align Compactum_to_CompHaus.faithful compactumToCompHaus.faithful
 
-/-- This definition is used to prove essential surjectivity of Compactum_to_CompHaus. -/
+/-- This definition is used to prove essential surjectivity of `compactumToCompHaus`. -/
 def isoOfTopologicalSpace {D : CompHaus} :
     compactumToCompHaus.obj (Compactum.ofTopologicalSpace D) ≅ D where
   hom :=
@@ -480,12 +474,12 @@ def isoOfTopologicalSpace {D : CompHaus} :
           exact h1 _ h2 }
 #align Compactum_to_CompHaus.iso_of_topological_space compactumToCompHaus.isoOfTopologicalSpace
 
-/-- The functor Compactum_to_CompHaus is essentially surjective. -/
+/-- The functor `compactumToCompHaus` is essentially surjective. -/
 theorem essSurj : EssSurj compactumToCompHaus :=
   { mem_essImage := fun X => ⟨Compactum.ofTopologicalSpace X, ⟨isoOfTopologicalSpace⟩⟩ }
 #align Compactum_to_CompHaus.ess_surj compactumToCompHaus.essSurj
 
-/-- The functor Compactum_to_CompHaus is an equivalence of categories. -/
+/-- The functor `compactumToCompHaus` is an equivalence of categories. -/
 noncomputable instance isEquivalence : IsEquivalence compactumToCompHaus := by
   have := compactumToCompHaus.full
   have := compactumToCompHaus.faithful
@@ -506,7 +500,7 @@ def compactumToCompHausCompForget :
 TODO: `forget CompHaus` is monadic, as it is isomorphic to the composition
 of an equivalence with the monadic functor `forget Compactum`.
 Once we have the API to transfer monadicity of functors along such isomorphisms,
-the instance `creates_limits (forget CompHaus)` can be deduced from this
+the instance `CreatesLimits (forget CompHaus)` can be deduced from this
 monadicity.
 -/
 noncomputable instance CompHaus.forgetCreatesLimits : CreatesLimits (forget CompHaus) := by
chore: formatting issues (#4947)

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

Diff
@@ -99,7 +99,7 @@ def forget : Compactum ⥤ Type _ :=
 #align Compactum.forget Compactum.forget
 
 instance : Faithful forget :=
-show Faithful <| Monad.forget _ from inferInstance
+  show Faithful <| Monad.forget _ from inferInstance
 
 noncomputable instance : CreatesLimits forget :=
 show CreatesLimits <| Monad.forget _ from inferInstance
chore: add space after exacts (#4945)

Too often tempted to change these during other PRs, so doing a mass edit here.

Co-authored-by: Scott Morrison <scott.morrison@anu.edu.au>

Diff
@@ -185,7 +185,7 @@ theorem isClosed_iff {X : Compactum} (S : Set X) :
   · intro h1 F h2
     specialize h1 F
     cases' F.mem_or_compl_mem S with h h
-    exacts[absurd (h1 h) h2, h]
+    exacts [absurd (h1 h) h2, h]
 #align Compactum.is_closed_iff Compactum.isClosed_iff
 
 instance {X : Compactum} : CompactSpace X := by
@@ -212,7 +212,7 @@ private theorem basic_inter {X : Compactum} (A B : Set X) : basic (A ∩ B) = ba
   constructor
   · intro hG
     constructor <;> filter_upwards [hG]with _
-    exacts[And.left, And.right]
+    exacts [And.left, And.right]
   · rintro ⟨h1, h2⟩
     exact inter_mem h1 h2
 -- Porting note: removed #align declaration since it is a private lemma
chore: review of automation in category theory (#4793)

Clean up of automation in the category theory library. Leaving out unnecessary proof steps, or fields done by aesop_cat, and making more use of available autoparameters.

Co-authored-by: Scott Morrison <scott.morrison@anu.edu.au>

Diff
@@ -499,10 +499,7 @@ end compactumToCompHaus
 `compactumToCompHaus`. -/
 def compactumToCompHausCompForget :
     compactumToCompHaus ⋙ CategoryTheory.forget CompHaus ≅ Compactum.forget :=
-  (NatIso.ofComponents fun X => eqToIso rfl) <| by
-    intro X Y f
-    dsimp
-    simp
+  NatIso.ofComponents fun X => eqToIso rfl
 #align Compactum_to_CompHaus_comp_forget compactumToCompHausCompForget
 
 /-
feat: port Topology.Category.Compactum (#3872)

Co-authored-by: Moritz Firsching <firsching@google.com> Co-authored-by: Matthew Ballard <matt@mrb.email> Co-authored-by: Johan Commelin <johan@commelin.net>

Dependencies 10 + 748

749 files ported (98.7%)
310951 lines ported (98.3%)
Show graph

The unported dependencies are

The following 1 dependencies have changed in mathlib3 since they were ported, which may complicate porting this file