Skip to content

Commit 756396d

Browse files
committed
chore(Topology/Constructions): split out results about sums, products and distributivity (#22827)
And move all homeomorphism related to direct sums, products and distributivity into the new file. This resolves a large file warning. It mostly reduces transitive imports (and causes mild increases in other places, and didn't import `Homeomorph.Defs` before). This is also necessary to break an import cycle in #22137. Co-authored-by: grunweg <rothgami@math.hu-berlin.de>
1 parent 2496b17 commit 756396d

File tree

8 files changed

+996
-943
lines changed

8 files changed

+996
-943
lines changed

Mathlib.lean

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5711,6 +5711,7 @@ import Mathlib.Topology.Connected.Separation
57115711
import Mathlib.Topology.Connected.TotallyDisconnected
57125712
import Mathlib.Topology.Constructible
57135713
import Mathlib.Topology.Constructions
5714+
import Mathlib.Topology.Constructions.SumProd
57145715
import Mathlib.Topology.ContinuousMap.Algebra
57155716
import Mathlib.Topology.ContinuousMap.Basic
57165717
import Mathlib.Topology.ContinuousMap.Bounded.Basic

Mathlib/Dynamics/TopologicalEntropy/DynamicalEntourage.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
44
Authors: Damien Thomine, Pietro Monticone
55
-/
66
import Mathlib.Order.Interval.Finset.Nat
7-
import Mathlib.Topology.Constructions
7+
import Mathlib.Topology.Constructions.SumProd
88
import Mathlib.Topology.UniformSpace.Defs
99

1010
/-!

Mathlib/Topology/CompactOpen.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ Authors: Reid Barton
55
-/
66
import Mathlib.Topology.Hom.ContinuousEval
77
import Mathlib.Topology.ContinuousMap.Basic
8-
import Mathlib.Topology.Homeomorph.Lemmas
8+
import Mathlib.Topology.Separation.Regular
99

1010
/-!
1111
# The compact-open topology

Mathlib/Topology/Compactness/Paracompact.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ Copyright (c) 2021 Yury Kudryashov. All rights reserved.
33
Released under Apache 2.0 license as described in the file LICENSE.
44
Authors: Reid Barton, Yury Kudryashov
55
-/
6-
import Mathlib.Topology.Homeomorph.Lemmas
76
import Mathlib.Data.Option.Basic
7+
import Mathlib.Topology.Separation.Regular
88

99
/-!
1010
# Paracompact topological spaces

Mathlib/Topology/Constructions.lean

Lines changed: 4 additions & 764 deletions
Large diffs are not rendered by default.

Mathlib/Topology/Constructions/SumProd.lean

Lines changed: 987 additions & 0 deletions
Large diffs are not rendered by default.

Mathlib/Topology/FiberBundle/IsHomeomorphicTrivialBundle.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ Copyright (c) 2019 Sébastien Gouëzel. All rights reserved.
33
Released under Apache 2.0 license as described in the file LICENSE.
44
Authors: Sébastien Gouëzel
55
-/
6-
import Mathlib.Topology.Homeomorph.Lemmas
6+
import Mathlib.Topology.Constructions.SumProd
77

88
/-!
99
# Maps equivariantly-homeomorphic to projection in a product

Mathlib/Topology/Homeomorph/Lemmas.lean

Lines changed: 0 additions & 175 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ Authors: Johannes Hölzl, Patrick Massot, Sébastien Gouëzel, Zhouhang Zhou, Re
66
import Mathlib.Logic.Equiv.Fin
77
import Mathlib.Topology.Connected.LocallyConnected
88
import Mathlib.Topology.DenseEmbedding
9-
import Mathlib.Topology.Homeomorph.Defs
109

1110
/-!
1211
# Further properties of homeomorphisms
@@ -208,169 +207,8 @@ def setCongr {s t : Set X} (h : s = t) : s ≃ₜ t where
208207
continuous_invFun := continuous_inclusion h.symm.subset
209208
toEquiv := Equiv.setCongr h
210209

211-
/-- Sum of two homeomorphisms. -/
212-
def sumCongr (h₁ : X ≃ₜ X') (h₂ : Y ≃ₜ Y') : X ⊕ Y ≃ₜ X' ⊕ Y' where
213-
continuous_toFun := h₁.continuous.sumMap h₂.continuous
214-
continuous_invFun := h₁.symm.continuous.sumMap h₂.symm.continuous
215-
toEquiv := h₁.toEquiv.sumCongr h₂.toEquiv
216-
217-
@[simp]
218-
lemma sumCongr_symm (h₁ : X ≃ₜ X') (h₂ : Y ≃ₜ Y') :
219-
(sumCongr h₁ h₂).symm = sumCongr h₁.symm h₂.symm := rfl
220-
221-
@[simp]
222-
theorem sumCongr_refl : sumCongr (.refl X) (.refl Y) = .refl (X ⊕ Y) := by
223-
ext i
224-
cases i <;> rfl
225-
226-
@[simp]
227-
theorem sumCongr_trans {X'' Y'' : Type*} [TopologicalSpace X''] [TopologicalSpace Y'']
228-
(h₁ : X ≃ₜ X') (h₂ : Y ≃ₜ Y') (h₃ : X' ≃ₜ X'') (h₄ : Y' ≃ₜ Y'') :
229-
(sumCongr h₁ h₂).trans (sumCongr h₃ h₄) = sumCongr (h₁.trans h₃) (h₂.trans h₄) := by
230-
ext i
231-
cases i <;> rfl
232-
233-
/-- Product of two homeomorphisms. -/
234-
def prodCongr (h₁ : X ≃ₜ X') (h₂ : Y ≃ₜ Y') : X × Y ≃ₜ X' × Y' where
235-
toEquiv := h₁.toEquiv.prodCongr h₂.toEquiv
236-
237-
@[simp]
238-
theorem prodCongr_symm (h₁ : X ≃ₜ X') (h₂ : Y ≃ₜ Y') :
239-
(h₁.prodCongr h₂).symm = h₁.symm.prodCongr h₂.symm :=
240-
rfl
241-
242-
@[simp]
243-
theorem coe_prodCongr (h₁ : X ≃ₜ X') (h₂ : Y ≃ₜ Y') : ⇑(h₁.prodCongr h₂) = Prod.map h₁ h₂ :=
244-
rfl
245-
246-
-- Commutativity and associativity of the disjoint union of topological spaces,
247-
-- and the sum with an empty space.
248-
section sum
249-
250-
variable (X Y W Z)
251-
252-
/-- `X ⊕ Y` is homeomorphic to `Y ⊕ X`. -/
253-
def sumComm : X ⊕ Y ≃ₜ Y ⊕ X where
254-
toEquiv := Equiv.sumComm X Y
255-
continuous_toFun := continuous_sum_swap
256-
continuous_invFun := continuous_sum_swap
257-
258-
@[simp]
259-
theorem sumComm_symm : (sumComm X Y).symm = sumComm Y X :=
260-
rfl
261-
262-
@[simp]
263-
theorem coe_sumComm : ⇑(sumComm X Y) = Sum.swap :=
264-
rfl
265-
266-
@[continuity, fun_prop]
267-
lemma continuous_sumAssoc : Continuous (Equiv.sumAssoc X Y Z) :=
268-
Continuous.sumElim (by fun_prop) (by fun_prop)
269-
270-
@[continuity, fun_prop]
271-
lemma continuous_sumAssoc_symm : Continuous (Equiv.sumAssoc X Y Z).symm :=
272-
Continuous.sumElim (by fun_prop) (by fun_prop)
273-
274-
/-- `(X ⊕ Y) ⊕ Z` is homeomorphic to `X ⊕ (Y ⊕ Z)`. -/
275-
def sumAssoc : (X ⊕ Y) ⊕ Z ≃ₜ X ⊕ Y ⊕ Z where
276-
toEquiv := Equiv.sumAssoc X Y Z
277-
continuous_toFun := continuous_sumAssoc X Y Z
278-
continuous_invFun := continuous_sumAssoc_symm X Y Z
279-
280-
@[simp]
281-
lemma sumAssoc_toEquiv : (sumAssoc X Y Z).toEquiv = Equiv.sumAssoc X Y Z := rfl
282-
283-
/-- Four-way commutativity of the disjoint union. The name matches `add_add_add_comm`. -/
284-
def sumSumSumComm : (X ⊕ Y) ⊕ W ⊕ Z ≃ₜ (X ⊕ W) ⊕ Y ⊕ Z where
285-
toEquiv := Equiv.sumSumSumComm X Y W Z
286-
continuous_toFun := by
287-
unfold Equiv.sumSumSumComm
288-
dsimp only
289-
have : Continuous (Sum.map (Sum.map (@id X) ⇑(Equiv.sumComm Y W)) (@id Z)) := by continuity
290-
fun_prop
291-
continuous_invFun := by
292-
unfold Equiv.sumSumSumComm
293-
dsimp only
294-
have : Continuous (Sum.map (Sum.map (@id X) (Equiv.sumComm Y W).symm) (@id Z)) := by continuity
295-
fun_prop
296-
297-
@[simp]
298-
lemma sumSumSumComm_toEquiv : (sumSumSumComm X Y W Z).toEquiv = (Equiv.sumSumSumComm X Y W Z) := rfl
299-
300-
@[simp]
301-
lemma sumSumSumComm_symm : (sumSumSumComm X Y W Z).symm = (sumSumSumComm X W Y Z) := rfl
302-
303-
/-- The sum of `X` with any empty topological space is homeomorphic to `X`. -/
304-
@[simps! -fullyApplied apply]
305-
def sumEmpty [IsEmpty Y] : X ⊕ Y ≃ₜ X where
306-
toEquiv := Equiv.sumEmpty X Y
307-
continuous_toFun := Continuous.sumElim continuous_id (by fun_prop)
308-
continuous_invFun := continuous_inl
309-
310-
/-- The sum of `X` with any empty topological space is homeomorphic to `X`. -/
311-
def emptySum [IsEmpty Y] : Y ⊕ X ≃ₜ X := (sumComm Y X).trans (sumEmpty X Y)
312-
313-
@[simp] theorem coe_emptySum [IsEmpty Y] : (emptySum X Y).toEquiv = Equiv.emptySum Y X := rfl
314-
315-
end sum
316-
317-
-- Commutativity and associativity of the product of top. spaces, and the product with `PUnit`.
318210
section prod
319211

320-
variable (X Y W Z)
321-
322-
/-- `X × Y` is homeomorphic to `Y × X`. -/
323-
def prodComm : X × Y ≃ₜ Y × X where
324-
continuous_toFun := continuous_snd.prod_mk continuous_fst
325-
continuous_invFun := continuous_snd.prod_mk continuous_fst
326-
toEquiv := Equiv.prodComm X Y
327-
328-
@[simp]
329-
theorem prodComm_symm : (prodComm X Y).symm = prodComm Y X :=
330-
rfl
331-
332-
@[simp]
333-
theorem coe_prodComm : ⇑(prodComm X Y) = Prod.swap :=
334-
rfl
335-
336-
/-- `(X × Y) × Z` is homeomorphic to `X × (Y × Z)`. -/
337-
def prodAssoc : (X × Y) × Z ≃ₜ X × Y × Z where
338-
continuous_toFun := continuous_fst.fst.prod_mk (continuous_fst.snd.prod_mk continuous_snd)
339-
continuous_invFun := (continuous_fst.prod_mk continuous_snd.fst).prod_mk continuous_snd.snd
340-
toEquiv := Equiv.prodAssoc X Y Z
341-
342-
@[simp]
343-
lemma prodAssoc_toEquiv : (prodAssoc X Y Z).toEquiv = Equiv.prodAssoc X Y Z := rfl
344-
345-
/-- Four-way commutativity of `prod`. The name matches `mul_mul_mul_comm`. -/
346-
def prodProdProdComm : (X × Y) × W × Z ≃ₜ (X × W) × Y × Z where
347-
toEquiv := Equiv.prodProdProdComm X Y W Z
348-
continuous_toFun := by
349-
unfold Equiv.prodProdProdComm
350-
dsimp only
351-
fun_prop
352-
continuous_invFun := by
353-
unfold Equiv.prodProdProdComm
354-
dsimp only
355-
fun_prop
356-
357-
@[simp]
358-
theorem prodProdProdComm_symm : (prodProdProdComm X Y W Z).symm = prodProdProdComm X W Y Z :=
359-
rfl
360-
361-
/-- `X × {*}` is homeomorphic to `X`. -/
362-
@[simps! -fullyApplied apply]
363-
def prodPUnit : X × PUnit ≃ₜ X where
364-
toEquiv := Equiv.prodPUnit X
365-
continuous_toFun := continuous_fst
366-
continuous_invFun := continuous_id.prod_mk continuous_const
367-
368-
/-- `{*} × X` is homeomorphic to `X`. -/
369-
def punitProd : PUnit × X ≃ₜ X :=
370-
(prodComm _ _).trans (prodPUnit _)
371-
372-
@[simp] theorem coe_punitProd : ⇑(punitProd X) = Prod.snd := rfl
373-
374212
/-- The product over `S ⊕ T` of a family of topological spaces
375213
is homeomorphic to the product of (the product over `S`) and (the product over `T`).
376214
@@ -480,19 +318,6 @@ theorem _root_.Fin.appendHomeomorph_toEquiv (m n : ℕ) :
480318

481319
section Distrib
482320

483-
/-- `(X ⊕ Y) × Z` is homeomorphic to `X × Z ⊕ Y × Z`. -/
484-
@[simps!]
485-
def sumProdDistrib : (X ⊕ Y) × Z ≃ₜ (X × Z) ⊕ (Y × Z) :=
486-
Homeomorph.symm <|
487-
homeomorphOfContinuousOpen (Equiv.sumProdDistrib X Y Z).symm
488-
((continuous_inl.prodMap continuous_id).sumElim
489-
(continuous_inr.prodMap continuous_id)) <|
490-
(isOpenMap_inl.prodMap IsOpenMap.id).sumElim (isOpenMap_inr.prodMap IsOpenMap.id)
491-
492-
/-- `X × (Y ⊕ Z)` is homeomorphic to `X × Y ⊕ X × Z`. -/
493-
def prodSumDistrib : X × (Y ⊕ Z) ≃ₜ (X × Y) ⊕ (X × Z) :=
494-
(prodComm _ _).trans <| sumProdDistrib.trans <| sumCongr (prodComm _ _) (prodComm _ _)
495-
496321
variable {ι : Type*} {X : ι → Type*} [∀ i, TopologicalSpace (X i)]
497322

498323
/-- `(Σ i, X i) × Y` is homeomorphic to `Σ i, (X i × Y)`. -/

0 commit comments

Comments
 (0)