topology.extremally_disconnectedMathlib.Topology.ExtremallyDisconnected

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)

(last sync)

Changes in mathlib3port

mathlib3
mathlib3port
Diff
@@ -3,7 +3,7 @@ Copyright (c) 2021 Johan Commelin. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Johan Commelin
 -/
-import Mathbin.Topology.StoneCech
+import Topology.StoneCech
 
 #align_import topology.extremally_disconnected from "leanprover-community/mathlib"@"9d2f0748e6c50d7a2657c564b1ff2c695b39148d"
 
Diff
@@ -2,14 +2,11 @@
 Copyright (c) 2021 Johan Commelin. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Johan Commelin
-
-! This file was ported from Lean 3 source module topology.extremally_disconnected
-! leanprover-community/mathlib commit 9d2f0748e6c50d7a2657c564b1ff2c695b39148d
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
 -/
 import Mathbin.Topology.StoneCech
 
+#align_import topology.extremally_disconnected from "leanprover-community/mathlib"@"9d2f0748e6c50d7a2657c564b1ff2c695b39148d"
+
 /-!
 # Extremally disconnected spaces
 
Diff
@@ -62,8 +62,6 @@ class ExtremallyDisconnected : Prop where
 
 section
 
-include X
-
 #print CompactT2.Projective /-
 /-- The assertion `compact_t2.projective` states that given continuous maps
 `f : X → Z` and `g : Y → Z` with `g` surjective between `t_2`, compact topological spaces,
Diff
@@ -44,7 +44,7 @@ noncomputable section
 
 open Set
 
-open Classical
+open scoped Classical
 
 universe u v w
 
Diff
@@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Johan Commelin
 
 ! This file was ported from Lean 3 source module topology.extremally_disconnected
-! leanprover-community/mathlib commit 7e281deff072232a3c5b3e90034bd65dde396312
+! leanprover-community/mathlib commit 9d2f0748e6c50d7a2657c564b1ff2c695b39148d
 ! Please do not edit these lines, except to modify the commit id
 ! if you have ported upstream changes.
 -/
@@ -13,6 +13,9 @@ import Mathbin.Topology.StoneCech
 /-!
 # Extremally disconnected spaces
 
+> THIS FILE IS SYNCHRONIZED WITH MATHLIB4.
+> Any changes to this file require a corresponding PR to mathlib4.
+
 An extremally disconnected topological space is a space in which the closure of every open set is
 open. Such spaces are also called Stonean spaces. They are the projective objects in the category of
 compact Hausdorff spaces.
Diff
@@ -49,16 +49,19 @@ variable (X : Type u) [TopologicalSpace X]
 
 open Function
 
+#print ExtremallyDisconnected /-
 /-- An extremally disconnected topological space is a space
 in which the closure of every open set is open. -/
 class ExtremallyDisconnected : Prop where
   open_closure : ∀ U : Set X, IsOpen U → IsOpen (closure U)
 #align extremally_disconnected ExtremallyDisconnected
+-/
 
 section
 
 include X
 
+#print CompactT2.Projective /-
 /-- The assertion `compact_t2.projective` states that given continuous maps
 `f : X → Z` and `g : Y → Z` with `g` surjective between `t_2`, compact topological spaces,
 there exists a continuous lift `h : X → Y`, such that `f = g ∘ h`. -/
@@ -68,11 +71,13 @@ def CompactT2.Projective : Prop :=
       ∀ {f : X → Z} {g : Y → Z} (hf : Continuous f) (hg : Continuous g) (g_sur : surjective g),
         ∃ h : X → Y, Continuous h ∧ g ∘ h = f
 #align compact_t2.projective CompactT2.Projective
+-/
 
 end
 
 variable {X}
 
+#print StoneCech.projective /-
 theorem StoneCech.projective [DiscreteTopology X] : CompactT2.Projective (StoneCech X) :=
   by
   intro Y Z _tsY _tsZ _csY _t2Y _csZ _csZ f g hf hg g_sur
@@ -85,9 +90,11 @@ theorem StoneCech.projective [DiscreteTopology X] : CompactT2.Projective (StoneC
   refine' ⟨h, hh, dense_range_stone_cech_unit.equalizer (hg.comp hh) hf _⟩
   rw [comp.assoc, stoneCechExtend_extends ht, ← comp.assoc, hs, comp.left_id]
 #align stone_cech.projective StoneCech.projective
+-/
 
 /- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
 /- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
+#print CompactT2.Projective.extremallyDisconnected /-
 protected theorem CompactT2.Projective.extremallyDisconnected [CompactSpace X] [T2Space X]
     (h : CompactT2.Projective X) : ExtremallyDisconnected X :=
   by
@@ -124,4 +131,5 @@ protected theorem CompactT2.Projective.extremallyDisconnected [CompactSpace X] [
   · rw [← hφ₁ x]
     exact hx.1
 #align compact_t2.projective.extremally_disconnected CompactT2.Projective.extremallyDisconnected
+-/
 

Changes in mathlib4

mathlib3
mathlib4
style: replace '.-/' by '. -/' (#11938)

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

Diff
@@ -248,7 +248,7 @@ noncomputable def ExtremallyDisconnected.homeoCompactToT2 [ExtremallyDisconnecte
 
 /-- Theorem 2.5 in [Gleason, *Projective topological spaces*][gleason1958]:
 in the category of compact spaces and continuous maps,
-the projective spaces are precisely the extremally disconnected spaces.-/
+the projective spaces are precisely the extremally disconnected spaces. -/
 protected theorem CompactT2.ExtremallyDisconnected.projective [ExtremallyDisconnected A]
     [CompactSpace A] [T2Space A] : CompactT2.Projective A := by
   -- let $B$ and $C$ be compact; let $f : B \twoheadrightarrow C$ and $\phi : A \to C$ be continuous
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
@@ -32,7 +32,8 @@ compact Hausdorff spaces.
 
 noncomputable section
 
-open Classical Function Set
+open scoped Classical
+open Function Set
 
 universe u
 
feat(Mathlib.Topology.Compactness.Compact): add sInter version of Cantor's intersection theorem (#10956)

The iInter version of Cantor's intersection theorem is already present: IsCompact.nonempty_iInter_of_directed_nonempty_compact_closed. The proof of the added sInter version takes advantage of the iInter version.

Much of the addition due to conversation with Sebastien Gouezel on Zulip.

Open in Gitpod

Diff
@@ -162,7 +162,7 @@ lemma exists_compact_surjective_zorn_subset [T1Space A] [CompactSpace D] {π : D
   · refine eq_univ_of_forall fun a => inter_nonempty_iff_exists_left.mp ?_
     -- apply Cantor's intersection theorem
     refine iInter_inter (ι := C) (π ⁻¹' {a}) _ ▸
-      IsCompact.nonempty_iInter_of_directed_nonempty_compact_closed _
+      IsCompact.nonempty_iInter_of_directed_nonempty_isCompact_isClosed _
       ?_ (fun c => ?_) (fun c => IsClosed.isCompact ?_) (fun c => ?_)
     · replace C_chain : IsChain (· ⊇ ·) C := C_chain.symm
       have : ∀ s t : Set D, s ⊇ t → _ ⊇ _ := fun _ _ => inter_subset_inter_left <| π ⁻¹' {a}
chore: remove stream-of-consciousness uses of have, replace and suffices (#10640)

No changes to tactic file, it's just boring fixes throughout the library.

This follows on from #6964.

Co-authored-by: sgouezel <sebastien.gouezel@univ-rennes1.fr> Co-authored-by: Eric Wieser <wieser.eric@gmail.com>

Diff
@@ -291,8 +291,8 @@ instance instExtremallyDisconnected {ι : Type*} {π : ι → Type*} [∀ i, Top
   rw [isOpen_sigma_iff] at hs ⊢
   intro i
   rcases h₀ i with ⟨h₀⟩
-  suffices h : Sigma.mk i ⁻¹' closure s = closure (Sigma.mk i ⁻¹' s)
-  · rw [h]
+  suffices h : Sigma.mk i ⁻¹' closure s = closure (Sigma.mk i ⁻¹' s) by
+    rw [h]
     exact h₀ _ (hs i)
   apply IsOpenMap.preimage_closure_eq_closure_preimage
   · intro U _
chore(Topology): remove autoImplicit from most remaining files (#9865)
Diff
@@ -30,8 +30,6 @@ compact Hausdorff spaces.
 [Gleason, *Projective topological spaces*][gleason1958]
 -/
 
-set_option autoImplicit true
-
 noncomputable section
 
 open Classical Function Set
@@ -286,7 +284,7 @@ end
 
 -- Note: It might be possible to use Gleason for this instead
 /-- The sigma-type of extremally disconnected spaces is extremally disconnected. -/
-instance instExtremallyDisconnected {π : ι → Type*} [∀ i, TopologicalSpace (π i)]
+instance instExtremallyDisconnected {ι : Type*} {π : ι → Type*} [∀ i, TopologicalSpace (π i)]
     [h₀ : ∀ i, ExtremallyDisconnected (π i)] : ExtremallyDisconnected (Σ i, π i) := by
   constructor
   intro s hs
chore(Function): rename some lemmas (#9738)
  • Merge Function.left_id and Function.comp.left_id into Function.id_comp.
  • Merge Function.right_id and Function.comp.right_id into Function.comp_id.
  • Merge Function.comp_const_right and Function.comp_const into Function.comp_const, use explicit arguments.
  • Move Function.const_comp to Mathlib.Init.Function, use explicit arguments.
Diff
@@ -90,7 +90,7 @@ theorem StoneCech.projective [DiscreteTopology X] : CompactT2.Projective (StoneC
   let h : StoneCech X → Y := stoneCechExtend ht
   have hh : Continuous h := continuous_stoneCechExtend ht
   refine' ⟨h, hh, denseRange_stoneCechUnit.equalizer (hg.comp hh) hf _⟩
-  rw [comp.assoc, stoneCechExtend_extends ht, ← comp.assoc, hs, comp.left_id]
+  rw [comp.assoc, stoneCechExtend_extends ht, ← comp.assoc, hs, id_comp]
 #align stone_cech.projective StoneCech.projective
 
 protected theorem CompactT2.Projective.extremallyDisconnected [CompactSpace X] [T2Space X]
@@ -274,7 +274,7 @@ protected theorem CompactT2.ExtremallyDisconnected.projective [ExtremallyDisconn
   have π₂_cont : Continuous π₂ := continuous_snd.comp continuous_subtype_val
   refine ⟨E.restrict π₂ ∘ ρ'.symm, ⟨π₂_cont.continuousOn.restrict.comp ρ'.symm.continuous, ?_⟩⟩
   suffices f ∘ E.restrict π₂ = φ ∘ ρ' by
-    rw [← comp.assoc, this, comp.assoc, Homeomorph.self_comp_symm, comp.right_id]
+    rw [← comp.assoc, this, comp.assoc, Homeomorph.self_comp_symm, comp_id]
   ext x
   exact x.val.mem.symm
 
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
@@ -55,7 +55,7 @@ section TotallySeparated
 instance [ExtremallyDisconnected X] [T2Space X] : TotallySeparatedSpace X :=
 { isTotallySeparated_univ := by
     intro x _ y _ hxy
-    obtain ⟨U, V, hUV⟩ := T2Space.t2 x y hxy
+    obtain ⟨U, V, hUV⟩ := T2Space.t2 hxy
     refine ⟨closure U, (closure U)ᶜ, ExtremallyDisconnected.open_closure U hUV.1,
       by simp only [isOpen_compl_iff, isClosed_closure], subset_closure hUV.2.2.1, ?_,
       by simp only [Set.union_compl_self, Set.subset_univ], disjoint_compl_right⟩
feat: make Set.monad not an instance and add (Subtype.val '' ·) coercion (#8413)

The monad instance on Set isn't computationally relevant, and it causes Lean's monad lifting coercion logic to activate. We introduce a coercion instance for the case that's actually used in practice: when s : Set X and t : Set s then (t : Set X) ought to be Subtype.val '' t. This way we do not see Lean.Internal.coeM terms.

If the monad is still wanted, it can be activated using a local attribute or by using the SetM.run function.

Diff
@@ -151,8 +151,9 @@ lemma exists_compact_surjective_zorn_subset [T1Space A] [CompactSpace D] {π : D
     refine ⟨E, isCompact_iff_compactSpace.mp E_closed.isCompact, E_surj, ?_⟩
     intro E₀ E₀_min E₀_closed
     contrapose! E₀_min
-    exact eq_univ_of_coe_eq <|
-      E_min E₀ ⟨E₀_closed.trans E_closed, image_coe_eq_restrict_image ▸ E₀_min⟩ coe_subset
+    exact eq_univ_of_image_val_eq <|
+      E_min E₀ ⟨E₀_closed.trans E_closed, image_image_val_eq_restrict_image ▸ E₀_min⟩
+        image_val_subset
   -- suffices to prove intersection of chain is minimal
   intro C C_sub C_chain
   -- prove intersection of chain is closed
feat: let push_neg replace not (Set.Nonempty s) with s = emptyset (#8000)

Co-authored-by: Kyle Miller <kmill31415@gmail.com>

Diff
@@ -62,7 +62,7 @@ instance [ExtremallyDisconnected X] [T2Space X] : TotallySeparatedSpace X :=
     rw [Set.mem_compl_iff, mem_closure_iff]
     push_neg
     refine' ⟨V, ⟨hUV.2.1, hUV.2.2.2.1, _⟩⟩
-    rw [Set.not_nonempty_iff_eq_empty, ← Set.disjoint_iff_inter_eq_empty, disjoint_comm]
+    rw [← Set.disjoint_iff_inter_eq_empty, disjoint_comm]
     exact hUV.2.2.2.2 }
 
 end TotallySeparated
chore: tidy various files (#7009)
Diff
@@ -204,7 +204,7 @@ lemma image_subset_closure_compl_image_compl_of_isOpen {ρ : E → A} (ρ_cont :
 /-- Lemma 2.2 in [Gleason, *Projective topological spaces*][gleason1958]:
 in an extremally disconnected space, if $U_1$ and $U_2$ are disjoint open sets,
 then $\overline{U_1}$ and $\overline{U_2}$ are also disjoint. -/
-lemma ExtremallyDisconnected.disjoint_closure_of_disjoint_IsOpen [ExtremallyDisconnected A]
+lemma ExtremallyDisconnected.disjoint_closure_of_disjoint_isOpen [ExtremallyDisconnected A]
     {U₁ U₂ : Set A} (h : Disjoint U₁ U₂) (hU₁ : IsOpen U₁) (hU₂ : IsOpen U₂) :
     Disjoint (closure U₁) (closure U₂) :=
   (h.closure_right hU₁).closure_left <| open_closure U₂ hU₂
@@ -229,7 +229,7 @@ private lemma ExtremallyDisconnected.homeoCompactToT2_injective [ExtremallyDisco
       image_univ_of_surjective ρ_surj]
   -- apply Lemma 2.2 to prove their closures are disjoint
   have disj'' : Disjoint (closure (ρ '' G₁ᶜ)ᶜ) (closure (ρ '' G₂ᶜ)ᶜ) :=
-    disjoint_closure_of_disjoint_IsOpen disj' G₁_open' G₂_open'
+    disjoint_closure_of_disjoint_isOpen disj' G₁_open' G₂_open'
   -- apply Lemma 2.1 to prove $\rho(x_1) = \rho(x_2)$ lies in their intersection
   have hx₁' := image_subset_closure_compl_image_compl_of_isOpen ρ_cont ρ_surj zorn_subset G₁_open <|
     mem_image_of_mem ρ hx₁
chore: tidy various files (#6838)
Diff
@@ -56,18 +56,13 @@ instance [ExtremallyDisconnected X] [T2Space X] : TotallySeparatedSpace X :=
 { isTotallySeparated_univ := by
     intro x _ y _ hxy
     obtain ⟨U, V, hUV⟩ := T2Space.t2 x y hxy
-    use closure U
-    use (closure U)ᶜ
-    refine ⟨ExtremallyDisconnected.open_closure U hUV.1,
+    refine ⟨closure U, (closure U)ᶜ, ExtremallyDisconnected.open_closure U hUV.1,
       by simp only [isOpen_compl_iff, isClosed_closure], subset_closure hUV.2.2.1, ?_,
       by simp only [Set.union_compl_self, Set.subset_univ], disjoint_compl_right⟩
-    simp only [Set.mem_compl_iff]
-    rw [mem_closure_iff]
+    rw [Set.mem_compl_iff, mem_closure_iff]
     push_neg
     refine' ⟨V, ⟨hUV.2.1, hUV.2.2.2.1, _⟩⟩
-    rw [Set.nonempty_iff_ne_empty]
-    simp only [not_not]
-    rw [← Set.disjoint_iff_inter_eq_empty, disjoint_comm]
+    rw [Set.not_nonempty_iff_eq_empty, ← Set.disjoint_iff_inter_eq_empty, disjoint_comm]
     exact hUV.2.2.2.2 }
 
 end TotallySeparated
@@ -297,19 +292,15 @@ instance instExtremallyDisconnected {π : ι → Type*} [∀ i, TopologicalSpace
   rw [isOpen_sigma_iff] at hs ⊢
   intro i
   rcases h₀ i with ⟨h₀⟩
-  have h₁ : IsOpen (closure (Sigma.mk i ⁻¹' s))
-  · apply h₀
-    exact hs i
-  suffices h₂ : Sigma.mk i ⁻¹' closure s = closure (Sigma.mk i ⁻¹' s)
-  · rwa [h₂]
+  suffices h : Sigma.mk i ⁻¹' closure s = closure (Sigma.mk i ⁻¹' s)
+  · rw [h]
+    exact h₀ _ (hs i)
   apply IsOpenMap.preimage_closure_eq_closure_preimage
-  intro U _
-  · rw [isOpen_sigma_iff]
+  · intro U _
+    rw [isOpen_sigma_iff]
     intro j
     by_cases ij : i = j
-    · rw [← ij]
-      rw [sigma_mk_preimage_image_eq_self]
-      assumption
+    · rwa [← ij, sigma_mk_preimage_image_eq_self]
     · rw [sigma_mk_preimage_image' ij]
-      apply isOpen_empty
+      exact isOpen_empty
   · continuity
fix: disable autoImplicit globally (#6528)

Autoimplicits are highly controversial and also defeat the performance-improving work in #6474.

The intent of this PR is to make autoImplicit opt-in on a per-file basis, by disabling it in the lakefile and enabling it again with set_option autoImplicit true in the few files that rely on it.

That also keeps this PR small, as opposed to attempting to "fix" files to not need it any more.

I claim that many of the uses of autoImplicit in these files are accidental; situations such as:

  • Assuming variables are in scope, but pasting the lemma in the wrong section
  • Pasting in a lemma from a scratch file without checking to see if the variable names are consistent with the rest of the file
  • Making a copy-paste error between lemmas and forgetting to add an explicit arguments.

Having set_option autoImplicit false as the default prevents these types of mistake being made in the 90% of files where autoImplicits are not used at all, and causes them to be caught by CI during review.

I think there were various points during the port where we encouraged porters to delete the universes u v lines; I think having autoparams for universe variables only would cover a lot of the cases we actually use them, while avoiding any real shortcomings.

A Zulip poll (after combining overlapping votes accordingly) was in favor of this change with 5:5:18 as the no:dontcare:yes vote ratio.

While this PR was being reviewed, a handful of files gained some more likely-accidental autoImplicits. In these places, set_option autoImplicit true has been placed locally within a section, rather than at the top of the file.

Diff
@@ -30,6 +30,8 @@ compact Hausdorff spaces.
 [Gleason, *Projective topological spaces*][gleason1958]
 -/
 
+set_option autoImplicit true
+
 noncomputable section
 
 open Classical Function Set
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
@@ -288,7 +288,7 @@ end
 
 -- Note: It might be possible to use Gleason for this instead
 /-- The sigma-type of extremally disconnected spaces is extremally disconnected. -/
-instance instExtremallyDisconnected {π : ι → Type _} [∀ i, TopologicalSpace (π i)]
+instance instExtremallyDisconnected {π : ι → Type*} [∀ i, TopologicalSpace (π i)]
     [h₀ : ∀ i, ExtremallyDisconnected (π i)] : ExtremallyDisconnected (Σ i, π i) := by
   constructor
   intro s hs
feat(Topology/ExtremallyDisconnected): prove Gleason's theorem (#5634)

This work was done during the 2023 Copenhagen masterclass on formalisation of condensed mathematics. Numerous participants contributed.

Co-authored-by: Filippo A E Nuccio <filippo.nuccio@univ-st-etienne.fr> Co-authored-by: Dagur Ásgeirsson <dagurtomas@gmail.com> Co-authored-by: Nikolas Kuhn <nikolaskuhn@gmx.de>

Diff
@@ -3,6 +3,7 @@ Copyright (c) 2021 Johan Commelin. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Johan Commelin
 -/
+import Mathlib.Topology.Homeomorph
 import Mathlib.Topology.StoneCech
 
 #align_import topology.extremally_disconnected from "leanprover-community/mathlib"@"7e281deff072232a3c5b3e90034bd65dde396312"
@@ -19,34 +20,30 @@ compact Hausdorff spaces.
 * `ExtremallyDisconnected`: Predicate for a space to be extremally disconnected.
 * `CompactT2.Projective`: Predicate for a topological space to be a projective object in the
   category of compact Hausdorff spaces.
-* `CompactT2.Projective.extremallyDisconnected`: Compact Hausdorff spaces that are
-  projective are extremally disconnected.
-
-# TODO
-
-Prove the converse to `CompactT2.Projective.extremallyDisconnected`, namely that a compact,
-Hausdorff, extremally disconnected space is a projective object in the category of compact Hausdorff
-spaces.
+* `CompactT2.Projective.extremallyDisconnected`: Compact Hausdorff spaces that are projective are
+  extremally disconnected.
+* `CompactT2.ExtremallyDisconnected.projective`: Extremally disconnected spaces are projective
+  objects in the category of compact Hausdorff spaces.
 
 ## References
 
 [Gleason, *Projective topological spaces*][gleason1958]
 -/
 
+noncomputable section
 
-open Set
+open Classical Function Set
 
-open Classical
+universe u
 
-universe u v w
+section
 
 variable (X : Type u) [TopologicalSpace X]
 
-open Function
-
 /-- An extremally disconnected topological space is a space
 in which the closure of every open set is open. -/
 class ExtremallyDisconnected : Prop where
+  /-- The closure of every open set is open. -/
   open_closure : ∀ U : Set X, IsOpen U → IsOpen (closure U)
 #align extremally_disconnected ExtremallyDisconnected
 
@@ -85,8 +82,6 @@ def CompactT2.Projective : Prop :=
         ∃ h : X → Y, Continuous h ∧ g ∘ h = f
 #align compact_t2.projective CompactT2.Projective
 
-end
-
 variable {X}
 
 theorem StoneCech.projective [DiscreteTopology X] : CompactT2.Projective (StoneCech X) := by
@@ -116,16 +111,16 @@ protected theorem CompactT2.Projective.extremallyDisconnected [CompactSpace X] [
   have f_sur : Surjective f := by
     intro x
     by_cases hx : x ∈ U
-    · exact ⟨⟨(x, false), Or.inr ⟨subset_closure hx, Set.mem_singleton _⟩⟩, rfl⟩
-    · exact ⟨⟨(x, true), Or.inl ⟨hx, Set.mem_singleton _⟩⟩, rfl⟩
+    · exact ⟨⟨(x, false), Or.inr ⟨subset_closure hx, mem_singleton _⟩⟩, rfl⟩
+    · exact ⟨⟨(x, true), Or.inl ⟨hx, mem_singleton _⟩⟩, rfl⟩
   haveI : CompactSpace Z := isCompact_iff_compactSpace.mp hZ.isCompact
   obtain ⟨g, hg, g_sec⟩ := h continuous_id f_cont f_sur
   let φ := Subtype.val ∘ g
   have hφ : Continuous φ := continuous_subtype_val.comp hg
   have hφ₁ : ∀ x, (φ x).1 = x := congr_fun g_sec
   suffices closure U = φ ⁻¹' Z₂ by
-    rw [this, Set.preimage_comp, ← isClosed_compl_iff, ← preimage_compl, ←
-      preimage_subtype_coe_eq_compl Subset.rfl]
+    rw [this, preimage_comp, ← isClosed_compl_iff, ← preimage_compl,
+      ← preimage_subtype_coe_eq_compl Subset.rfl]
     · exact hZ₁.preimage hφ
     · rw [hZ₁₂.inter_eq, inter_empty]
   refine' (closure_minimal _ <| hZ₂.preimage hφ).antisymm fun x hx => _
@@ -139,11 +134,162 @@ protected theorem CompactT2.Projective.extremallyDisconnected [CompactSpace X] [
     exact hx.1
 #align compact_t2.projective.extremally_disconnected CompactT2.Projective.extremallyDisconnected
 
+end
+
+section
+
+variable {A D E : Type u} [TopologicalSpace A] [TopologicalSpace D] [TopologicalSpace E]
+
+/-- Lemma 2.4 in [Gleason, *Projective topological spaces*][gleason1958]:
+a continuous surjection $\pi$ from a compact space $D$ to a Fréchet space $A$ restricts to
+a compact subset $E$ of $D$, such that $\pi$ maps $E$ onto $A$ and satisfies the
+"Zorn subset condition", where $\pi(E_0) \ne A$ for any proper closed subset $E_0 \subsetneq E$. -/
+lemma exists_compact_surjective_zorn_subset [T1Space A] [CompactSpace D] {π : D → A}
+    (π_cont : Continuous π) (π_surj : π.Surjective) : ∃ E : Set D, CompactSpace E ∧ π '' E = univ ∧
+    ∀ E₀ : Set E, E₀ ≠ univ → IsClosed E₀ → E.restrict π '' E₀ ≠ univ := by
+  -- suffices to apply Zorn's lemma on the subsets of $D$ that are closed and mapped onto $A$
+  let S : Set <| Set D := {E : Set D | IsClosed E ∧ π '' E = univ}
+  suffices ∀ (C : Set <| Set D) (_ : C ⊆ S) (_ : IsChain (· ⊆ ·) C), ∃ s ∈ S, ∀ c ∈ C, s ⊆ c by
+    rcases zorn_superset S this with ⟨E, ⟨E_closed, E_surj⟩, E_min⟩
+    refine ⟨E, isCompact_iff_compactSpace.mp E_closed.isCompact, E_surj, ?_⟩
+    intro E₀ E₀_min E₀_closed
+    contrapose! E₀_min
+    exact eq_univ_of_coe_eq <|
+      E_min E₀ ⟨E₀_closed.trans E_closed, image_coe_eq_restrict_image ▸ E₀_min⟩ coe_subset
+  -- suffices to prove intersection of chain is minimal
+  intro C C_sub C_chain
+  -- prove intersection of chain is closed
+  refine ⟨iInter (fun c : C => c), ⟨isClosed_iInter fun ⟨_, h⟩ => (C_sub h).left, ?_⟩,
+    fun c hc _ h => mem_iInter.mp h ⟨c, hc⟩⟩
+  -- prove intersection of chain is mapped onto $A$
+  by_cases hC : Nonempty C
+  · refine eq_univ_of_forall fun a => inter_nonempty_iff_exists_left.mp ?_
+    -- apply Cantor's intersection theorem
+    refine iInter_inter (ι := C) (π ⁻¹' {a}) _ ▸
+      IsCompact.nonempty_iInter_of_directed_nonempty_compact_closed _
+      ?_ (fun c => ?_) (fun c => IsClosed.isCompact ?_) (fun c => ?_)
+    · replace C_chain : IsChain (· ⊇ ·) C := C_chain.symm
+      have : ∀ s t : Set D, s ⊇ t → _ ⊇ _ := fun _ _ => inter_subset_inter_left <| π ⁻¹' {a}
+      exact (directedOn_iff_directed.mp C_chain.directedOn).mono_comp (· ⊇ ·) this
+    · rw [← image_inter_nonempty_iff, (C_sub c.mem).right, univ_inter]
+      exact singleton_nonempty a
+    all_goals exact (C_sub c.mem).left.inter <| (T1Space.t1 a).preimage π_cont
+  · rw [@iInter_of_empty _ _ <| not_nonempty_iff.mp hC, image_univ_of_surjective π_surj]
+
+/-- Lemma 2.1 in [Gleason, *Projective topological spaces*][gleason1958]:
+if $\rho$ is a continuous surjection from a topological space $E$ to a topological space $A$
+satisfying the "Zorn subset condition", then $\rho(G)$ is contained in
+the closure of $A \setminus \rho(E \setminus G)}$ for any open set $G$ of $E$. -/
+lemma image_subset_closure_compl_image_compl_of_isOpen {ρ : E → A} (ρ_cont : Continuous ρ)
+    (ρ_surj : ρ.Surjective) (zorn_subset : ∀ E₀ : Set E, E₀ ≠ univ → IsClosed E₀ → ρ '' E₀ ≠ univ)
+    {G : Set E} (hG : IsOpen G) : ρ '' G ⊆ closure ((ρ '' Gᶜ)ᶜ) := by
+  -- suffices to prove for nonempty $G$
+  by_cases G_empty : G = ∅
+  · simpa only [G_empty, image_empty] using empty_subset _
+  · -- let $a \in \rho(G)$
+    intro a ha
+    rw [mem_closure_iff]
+    -- let $N$ be a neighbourhood of $a$
+    intro N N_open hN
+    -- get $x \in A$ from nonempty open $G \cap \rho^{-1}(N)$
+    rcases (G.mem_image ρ a).mp ha with ⟨e, he, rfl⟩
+    have nonempty : (G ∩ ρ⁻¹' N).Nonempty := ⟨e, mem_inter he <| mem_preimage.mpr hN⟩
+    have is_open : IsOpen <| G ∩ ρ⁻¹' N := hG.inter <| N_open.preimage ρ_cont
+    have ne_univ : ρ '' (G ∩ ρ⁻¹' N)ᶜ ≠ univ :=
+      zorn_subset _ (compl_ne_univ.mpr nonempty) is_open.isClosed_compl
+    rcases nonempty_compl.mpr ne_univ with ⟨x, hx⟩
+    -- prove $x \in N \cap (A \setminus \rho(E \setminus G))$
+    have hx' : x ∈ (ρ '' Gᶜ)ᶜ := fun h => hx <| image_subset ρ (by simp) h
+    rcases ρ_surj x with ⟨y, rfl⟩
+    have hy : y ∈ G ∩ ρ⁻¹' N := by simpa using mt (mem_image_of_mem ρ) <| mem_compl hx
+    exact ⟨ρ y, mem_inter (mem_preimage.mp <| mem_of_mem_inter_right hy) hx'⟩
+
+/-- Lemma 2.2 in [Gleason, *Projective topological spaces*][gleason1958]:
+in an extremally disconnected space, if $U_1$ and $U_2$ are disjoint open sets,
+then $\overline{U_1}$ and $\overline{U_2}$ are also disjoint. -/
+lemma ExtremallyDisconnected.disjoint_closure_of_disjoint_IsOpen [ExtremallyDisconnected A]
+    {U₁ U₂ : Set A} (h : Disjoint U₁ U₂) (hU₁ : IsOpen U₁) (hU₂ : IsOpen U₂) :
+    Disjoint (closure U₁) (closure U₂) :=
+  (h.closure_right hU₁).closure_left <| open_closure U₂ hU₂
+
+private lemma ExtremallyDisconnected.homeoCompactToT2_injective [ExtremallyDisconnected A]
+    [T2Space A] [T2Space E] [CompactSpace E] {ρ : E → A} (ρ_cont : Continuous ρ)
+    (ρ_surj : ρ.Surjective) (zorn_subset : ∀ E₀ : Set E, E₀ ≠ univ → IsClosed E₀ → ρ '' E₀ ≠ univ) :
+    ρ.Injective := by
+  -- let $x_1, x_2 \in E$ be distinct points such that $\rho(x_1) = \rho(x_2)$
+  intro x₁ x₂ hρx
+  by_contra hx
+  -- let $G_1$ and $G_2$ be disjoint open neighbourhoods of $x_1$ and $x_2$ respectively
+  rcases t2_separation hx with ⟨G₁, G₂, G₁_open, G₂_open, hx₁, hx₂, disj⟩
+  -- prove $A \setminus \rho(E - G_1)$ and $A \setminus \rho(E - G_2)$ are disjoint
+  have G₁_comp : IsCompact G₁ᶜ := IsClosed.isCompact G₁_open.isClosed_compl
+  have G₂_comp : IsCompact G₂ᶜ := IsClosed.isCompact G₂_open.isClosed_compl
+  have G₁_open' : IsOpen (ρ '' G₁ᶜ)ᶜ := (G₁_comp.image ρ_cont).isClosed.isOpen_compl
+  have G₂_open' : IsOpen (ρ '' G₂ᶜ)ᶜ := (G₂_comp.image ρ_cont).isClosed.isOpen_compl
+  have disj' : Disjoint (ρ '' G₁ᶜ)ᶜ (ρ '' G₂ᶜ)ᶜ := by
+    rw [disjoint_iff_inter_eq_empty, ← compl_union, ← image_union, ← compl_inter,
+      disjoint_iff_inter_eq_empty.mp disj, compl_empty, compl_empty_iff,
+      image_univ_of_surjective ρ_surj]
+  -- apply Lemma 2.2 to prove their closures are disjoint
+  have disj'' : Disjoint (closure (ρ '' G₁ᶜ)ᶜ) (closure (ρ '' G₂ᶜ)ᶜ) :=
+    disjoint_closure_of_disjoint_IsOpen disj' G₁_open' G₂_open'
+  -- apply Lemma 2.1 to prove $\rho(x_1) = \rho(x_2)$ lies in their intersection
+  have hx₁' := image_subset_closure_compl_image_compl_of_isOpen ρ_cont ρ_surj zorn_subset G₁_open <|
+    mem_image_of_mem ρ hx₁
+  have hx₂' := image_subset_closure_compl_image_compl_of_isOpen ρ_cont ρ_surj zorn_subset G₂_open <|
+    mem_image_of_mem ρ hx₂
+  exact disj''.ne_of_mem hx₁' hx₂' hρx
+
+/-- Lemma 2.3 in [Gleason, *Projective topological spaces*][gleason1958]:
+a continuous surjection from a compact Hausdorff space to an extremally disconnected Hausdorff space
+satisfying the "Zorn subset condition" is a homeomorphism. -/
+noncomputable def ExtremallyDisconnected.homeoCompactToT2 [ExtremallyDisconnected A] [T2Space A]
+    [T2Space E] [CompactSpace E] {ρ : E → A} (ρ_cont : Continuous ρ) (ρ_surj : ρ.Surjective)
+    (zorn_subset : ∀ E₀ : Set E, E₀ ≠ univ → IsClosed E₀ → ρ '' E₀ ≠ univ) : E ≃ₜ A :=
+  ρ_cont.homeoOfEquivCompactToT2
+    (f := Equiv.ofBijective ρ ⟨homeoCompactToT2_injective ρ_cont ρ_surj zorn_subset, ρ_surj⟩)
+
+/-- Theorem 2.5 in [Gleason, *Projective topological spaces*][gleason1958]:
+in the category of compact spaces and continuous maps,
+the projective spaces are precisely the extremally disconnected spaces.-/
+protected theorem CompactT2.ExtremallyDisconnected.projective [ExtremallyDisconnected A]
+    [CompactSpace A] [T2Space A] : CompactT2.Projective A := by
+  -- let $B$ and $C$ be compact; let $f : B \twoheadrightarrow C$ and $\phi : A \to C$ be continuous
+  intro B C _ _ _ _ _ _ φ f φ_cont f_cont f_surj
+  -- let $D := \{(a, b) : \phi(a) = f(b)\}$ with projections $\pi_1 : D \to A$ and $\pi_2 : D \to B$
+  let D : Set <| A × B := {x | φ x.fst = f x.snd}
+  have D_comp : CompactSpace D := isCompact_iff_compactSpace.mp
+    (isClosed_eq (φ_cont.comp continuous_fst) (f_cont.comp continuous_snd)).isCompact
+  -- apply Lemma 2.4 to get closed $E$ satisfying "Zorn subset condition"
+  let π₁ : D → A := Prod.fst ∘ Subtype.val
+  have π₁_cont : Continuous π₁ := continuous_fst.comp continuous_subtype_val
+  have π₁_surj : π₁.Surjective := fun a => ⟨⟨⟨a, _⟩, (f_surj <| φ a).choose_spec.symm⟩, rfl⟩
+  rcases exists_compact_surjective_zorn_subset π₁_cont π₁_surj with ⟨E, _, E_onto, E_min⟩
+  -- apply Lemma 2.3 to get homeomorphism $\pi_1|_E : E \to A$
+  let ρ : E → A := E.restrict π₁
+  have ρ_cont : Continuous ρ := π₁_cont.continuousOn.restrict
+  have ρ_surj : ρ.Surjective := fun a => by
+    rcases (E_onto ▸ mem_univ a : a ∈ π₁ '' E) with ⟨d, ⟨hd, rfl⟩⟩; exact ⟨⟨d, hd⟩, rfl⟩
+  let ρ' := ExtremallyDisconnected.homeoCompactToT2 ρ_cont ρ_surj E_min
+  -- prove $\rho := \pi_2|_E \circ \pi_1|_E^{-1}$ satisfies $\phi = f \circ \rho$
+  let π₂ : D → B := Prod.snd ∘ Subtype.val
+  have π₂_cont : Continuous π₂ := continuous_snd.comp continuous_subtype_val
+  refine ⟨E.restrict π₂ ∘ ρ'.symm, ⟨π₂_cont.continuousOn.restrict.comp ρ'.symm.continuous, ?_⟩⟩
+  suffices f ∘ E.restrict π₂ = φ ∘ ρ' by
+    rw [← comp.assoc, this, comp.assoc, Homeomorph.self_comp_symm, comp.right_id]
+  ext x
+  exact x.val.mem.symm
+
+protected theorem CompactT2.projective_iff_extremallyDisconnnected [CompactSpace A] [T2Space A] :
+    Projective A ↔ ExtremallyDisconnected A :=
+  ⟨Projective.extremallyDisconnected, fun _ => ExtremallyDisconnected.projective⟩
+
+end
+
 -- Note: It might be possible to use Gleason for this instead
-/-- The sigma-type of extremally disconneted spaces is extremally disconnected -/
-instance instExtremallyDisconnected
-    {π : ι → Type _} [∀ i, TopologicalSpace (π i)] [h₀ : ∀ i, ExtremallyDisconnected (π i)] :
-    ExtremallyDisconnected (Σi, π i) := by
+/-- The sigma-type of extremally disconnected spaces is extremally disconnected. -/
+instance instExtremallyDisconnected {π : ι → Type _} [∀ i, TopologicalSpace (π i)]
+    [h₀ : ∀ i, ExtremallyDisconnected (π i)] : ExtremallyDisconnected (Σ i, π i) := by
   constructor
   intro s hs
   rw [isOpen_sigma_iff] at hs ⊢
feat: define the category of extremally disconnected compact Hausdorff spaces (#5761)

Co-authored-by: Adam Topaz [topaz@ualberta.ca](mailto:topaz@ualberta.ca) @adamtopaz Basics of the category Stonean of extremally disconnected compact Hausdorff spaces. This work was done during the 2023 Copenhagen masterclass on formalisation of condensed mathematics. Numerous participants contributed.

Diff
@@ -34,8 +34,6 @@ spaces.
 -/
 
 
-noncomputable section
-
 open Set
 
 open Classical
@@ -52,6 +50,29 @@ class ExtremallyDisconnected : Prop where
   open_closure : ∀ U : Set X, IsOpen U → IsOpen (closure U)
 #align extremally_disconnected ExtremallyDisconnected
 
+section TotallySeparated
+
+/-- Extremally disconnected spaces are totally separated. -/
+instance [ExtremallyDisconnected X] [T2Space X] : TotallySeparatedSpace X :=
+{ isTotallySeparated_univ := by
+    intro x _ y _ hxy
+    obtain ⟨U, V, hUV⟩ := T2Space.t2 x y hxy
+    use closure U
+    use (closure U)ᶜ
+    refine ⟨ExtremallyDisconnected.open_closure U hUV.1,
+      by simp only [isOpen_compl_iff, isClosed_closure], subset_closure hUV.2.2.1, ?_,
+      by simp only [Set.union_compl_self, Set.subset_univ], disjoint_compl_right⟩
+    simp only [Set.mem_compl_iff]
+    rw [mem_closure_iff]
+    push_neg
+    refine' ⟨V, ⟨hUV.2.1, hUV.2.2.2.1, _⟩⟩
+    rw [Set.nonempty_iff_ne_empty]
+    simp only [not_not]
+    rw [← Set.disjoint_iff_inter_eq_empty, disjoint_comm]
+    exact hUV.2.2.2.2 }
+
+end TotallySeparated
+
 section
 
 /-- The assertion `CompactT2.Projective` states that given continuous maps
@@ -117,3 +138,30 @@ protected theorem CompactT2.Projective.extremallyDisconnected [CompactSpace X] [
   · rw [← hφ₁ x]
     exact hx.1
 #align compact_t2.projective.extremally_disconnected CompactT2.Projective.extremallyDisconnected
+
+-- Note: It might be possible to use Gleason for this instead
+/-- The sigma-type of extremally disconneted spaces is extremally disconnected -/
+instance instExtremallyDisconnected
+    {π : ι → Type _} [∀ i, TopologicalSpace (π i)] [h₀ : ∀ i, ExtremallyDisconnected (π i)] :
+    ExtremallyDisconnected (Σi, π i) := by
+  constructor
+  intro s hs
+  rw [isOpen_sigma_iff] at hs ⊢
+  intro i
+  rcases h₀ i with ⟨h₀⟩
+  have h₁ : IsOpen (closure (Sigma.mk i ⁻¹' s))
+  · apply h₀
+    exact hs i
+  suffices h₂ : Sigma.mk i ⁻¹' closure s = closure (Sigma.mk i ⁻¹' s)
+  · rwa [h₂]
+  apply IsOpenMap.preimage_closure_eq_closure_preimage
+  intro U _
+  · rw [isOpen_sigma_iff]
+    intro j
+    by_cases ij : i = j
+    · rw [← ij]
+      rw [sigma_mk_preimage_image_eq_self]
+      assumption
+    · rw [sigma_mk_preimage_image' ij]
+      apply isOpen_empty
+  · continuity
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,14 +2,11 @@
 Copyright (c) 2021 Johan Commelin. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Johan Commelin
-
-! This file was ported from Lean 3 source module topology.extremally_disconnected
-! leanprover-community/mathlib commit 7e281deff072232a3c5b3e90034bd65dde396312
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
 -/
 import Mathlib.Topology.StoneCech
 
+#align_import topology.extremally_disconnected from "leanprover-community/mathlib"@"7e281deff072232a3c5b3e90034bd65dde396312"
+
 /-!
 # Extremally disconnected spaces
 
feat: port Topology.ExtremallyDisconnected (#3616)

Dependencies 8 + 305

306 files ported (97.5%)
133888 lines ported (96.4%)
Show graph

The unported dependencies are