topology.homotopy.H_spacesMathlib.Topology.Homotopy.HSpaces

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)

(last sync)

Changes in mathlib3port

mathlib3
mathlib3port
Diff
@@ -216,7 +216,7 @@ theorem qRight_zero_right (t : I) : (qRight (t, 0) : ℝ) = if (t : ℝ) ≤ 1 /
 
 #print unitInterval.qRight_one_right /-
 theorem qRight_one_right (t : I) : qRight (t, 1) = t :=
-  Eq.trans (by rw [Q_right]; congr; apply mul_div_cancel_left; exact two_ne_zero) <|
+  Eq.trans (by rw [Q_right]; congr; apply mul_div_cancel_left₀; exact two_ne_zero) <|
     Set.projIcc_val zero_le_one _
 #align unit_interval.Q_right_one_right unitInterval.qRight_one_right
 -/
Diff
@@ -3,8 +3,8 @@ Copyright (c) 2022 Filippo A. E. Nuccio Mortarino Majno di Capriglio. All rights
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Filippo A. E. Nuccio, Junyan Xu
 -/
-import Mathbin.Topology.CompactOpen
-import Mathbin.Topology.Homotopy.Path
+import Topology.CompactOpen
+import Topology.Homotopy.Path
 
 #align_import topology.homotopy.H_spaces from "leanprover-community/mathlib"@"af471b9e3ce868f296626d33189b4ce730fa4c00"
 
Diff
@@ -94,7 +94,7 @@ instance HSpace.prod (X : Type u) (Y : Type v) [TopologicalSpace X] [Topological
             (continuous_fst.prod_mk (continuous_fst.comp continuous_snd))).prod_mk
         (Continuous.comp HSpace.eHmul.1.1.2
           (continuous_fst.prod_mk (continuous_snd.comp continuous_snd)))
-    use ⟨G, hG⟩
+    use⟨G, hG⟩
     · rintro ⟨x, y⟩
       exacts [prod.mk.inj_iff.mpr ⟨HSpace.eHmul.1.2 x, HSpace.eHmul.1.2 y⟩]
     · rintro ⟨x, y⟩
@@ -114,7 +114,7 @@ instance HSpace.prod (X : Type u) (Y : Type v) [TopologicalSpace X] [Topological
             (continuous_fst.prod_mk (continuous_fst.comp continuous_snd))).prod_mk
         (Continuous.comp HSpace.hmulE.1.1.2
           (continuous_fst.prod_mk (continuous_snd.comp continuous_snd)))
-    use ⟨G, hG⟩
+    use⟨G, hG⟩
     · rintro ⟨x, y⟩
       exacts [prod.mk.inj_iff.mpr ⟨HSpace.hmulE.1.2 x, HSpace.hmulE.1.2 y⟩]
     · rintro ⟨x, y⟩
Diff
@@ -2,15 +2,12 @@
 Copyright (c) 2022 Filippo A. E. Nuccio Mortarino Majno di Capriglio. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Filippo A. E. Nuccio, Junyan Xu
-
-! This file was ported from Lean 3 source module topology.homotopy.H_spaces
-! leanprover-community/mathlib commit af471b9e3ce868f296626d33189b4ce730fa4c00
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
 -/
 import Mathbin.Topology.CompactOpen
 import Mathbin.Topology.Homotopy.Path
 
+#align_import topology.homotopy.H_spaces from "leanprover-community/mathlib"@"af471b9e3ce868f296626d33189b4ce730fa4c00"
+
 /-!
 # H-spaces
 
Diff
@@ -77,10 +77,10 @@ class HSpace (X : Type u) [TopologicalSpace X] where
 #align H_space HSpace
 -/
 
--- mathport name: H_space.Hmul
 -- We use the notation `⋀`, typeset as \And, to denote the binary operation `Hmul` on a H-space
 scoped[HSpaces] notation x "⋀" y => HSpace.hmul (x, y)
 
+#print HSpace.prod /-
 instance HSpace.prod (X : Type u) (Y : Type v) [TopologicalSpace X] [TopologicalSpace Y] [HSpace X]
     [HSpace Y] : HSpace (X × Y)
     where
@@ -130,9 +130,11 @@ instance HSpace.prod (X : Type u) (Y : Type v) [TopologicalSpace X] [Topological
               homotopy_rel.eq_fst HSpace.hmulE t (set.mem_singleton_iff.mpr h.2)⟩,
           prod.mk.inj_iff.mpr ⟨(HSpace.hmulE.2 t x h.1).2, (HSpace.hmulE.2 t y h.2).2⟩⟩
 #align H_space.prod HSpace.prod
+-/
 
 namespace TopologicalGroup
 
+#print TopologicalGroup.toHSpace /-
 /-- The definition `to_H_space` is not an instance because its `@additive` version would
 lead to a diamond since a topological field would inherit two `H_space` structures, one from the
 `mul_one_class` and one from the `add_zero_class`. In the case of a group, we make
@@ -148,6 +150,7 @@ def toHSpace (M : Type u) [MulOneClass M] [TopologicalSpace M] [ContinuousMul M]
   hmulE := (HomotopyRel.refl _ _).cast rfl (by ext1; apply mul_one)
 #align topological_group.to_H_space TopologicalGroup.toHSpace
 #align topological_add_group.to_H_space TopologicalAddGroup.toHSpace
+-/
 
 #print TopologicalGroup.hSpace /-
 @[to_additive]
@@ -158,10 +161,12 @@ instance (priority := 600) hSpace (G : Type u) [TopologicalSpace G] [Group G] [T
 #align topological_add_group.H_space TopologicalAddGroup.hSpace
 -/
 
+#print TopologicalGroup.one_eq_hSpace_e /-
 theorem one_eq_hSpace_e {G : Type u} [TopologicalSpace G] [Group G] [TopologicalGroup G] :
     (1 : G) = HSpace.e :=
   rfl
 #align topological_group.one_eq_H_space_e TopologicalGroup.one_eq_hSpace_e
+-/
 
 /- In the following example we see that the `H-space` structure on the product of two topological
 groups is definitionally equally to the product `H-space`-structure of the two groups.-/
@@ -181,10 +186,12 @@ def qRight (p : I × I) : I :=
 #align unit_interval.Q_right unitInterval.qRight
 -/
 
+#print unitInterval.continuous_qRight /-
 theorem continuous_qRight : Continuous qRight :=
   continuous_projIcc.comp <|
     Continuous.div (by continuity) (by continuity) fun x => (add_pos zero_lt_one).ne'
 #align unit_interval.continuous_Q_right unitInterval.continuous_qRight
+-/
 
 #print unitInterval.qRight_zero_left /-
 theorem qRight_zero_left (θ : I) : qRight (0, θ) = 0 :=
@@ -200,6 +207,7 @@ theorem qRight_one_left (θ : I) : qRight (1, θ) = 1 :=
 #align unit_interval.Q_right_one_left unitInterval.qRight_one_left
 -/
 
+#print unitInterval.qRight_zero_right /-
 theorem qRight_zero_right (t : I) : (qRight (t, 0) : ℝ) = if (t : ℝ) ≤ 1 / 2 then 2 * t else 1 :=
   by
   simp only [Q_right, coe_zero, add_zero, div_one]
@@ -207,6 +215,7 @@ theorem qRight_zero_right (t : I) : (qRight (t, 0) : ℝ) = if (t : ℝ) ≤ 1 /
   · rw [Set.projIcc_of_mem _ ((mul_pos_mem_iff zero_lt_two).2 _)]; exacts [rfl, ⟨t.2.1, h⟩]
   · rw [(Set.projIcc_eq_right _).2]; · rfl; · linarith; · exact zero_lt_one
 #align unit_interval.Q_right_zero_right unitInterval.qRight_zero_right
+-/
 
 #print unitInterval.qRight_one_right /-
 theorem qRight_one_right (t : I) : qRight (t, 1) = t :=
@@ -235,11 +244,13 @@ def delayReflRight (θ : I) (γ : Path x y) : Path x y
 #align path.delay_refl_right Path.delayReflRight
 -/
 
+#print Path.continuous_delayReflRight /-
 theorem continuous_delayReflRight : Continuous fun p : I × Path x y => delayReflRight p.1 p.2 :=
   continuous_uncurry_iff.mp <|
     (continuous_snd.comp continuous_fst).path_eval <|
       continuous_qRight.comp <| continuous_snd.prod_mk <| continuous_fst.comp continuous_fst
 #align path.continuous_delay_refl_right Path.continuous_delayReflRight
+-/
 
 #print Path.delayReflRight_zero /-
 theorem delayReflRight_zero (γ : Path x y) : delayReflRight 0 γ = γ.trans (Path.refl y) :=
@@ -267,11 +278,13 @@ def delayReflLeft (θ : I) (γ : Path x y) : Path x y :=
 #align path.delay_refl_left Path.delayReflLeft
 -/
 
+#print Path.continuous_delayReflLeft /-
 theorem continuous_delayReflLeft : Continuous fun p : I × Path x y => delayReflLeft p.1 p.2 :=
   Path.continuous_symm.comp <|
     continuous_delayReflRight.comp <|
       continuous_fst.prod_mk <| Path.continuous_symm.comp continuous_snd
 #align path.continuous_delay_refl_left Path.continuous_delayReflLeft
+-/
 
 #print Path.delayReflLeft_zero /-
 theorem delayReflLeft_zero (γ : Path x y) : delayReflLeft 0 γ = (Path.refl x).trans γ := by
Diff
@@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Filippo A. E. Nuccio, Junyan Xu
 
 ! This file was ported from Lean 3 source module topology.homotopy.H_spaces
-! leanprover-community/mathlib commit 729d23f9e1640e1687141be89b106d3c8f9d10c0
+! leanprover-community/mathlib commit af471b9e3ce868f296626d33189b4ce730fa4c00
 ! Please do not edit these lines, except to modify the commit id
 ! if you have ported upstream changes.
 -/
@@ -14,6 +14,9 @@ import Mathbin.Topology.Homotopy.Path
 /-!
 # H-spaces
 
+> THIS FILE IS SYNCHRONIZED WITH MATHLIB4.
+> Any changes to this file require a corresponding PR to mathlib4.
+
 This file defines H-spaces mainly following the approach proposed by Serre in his paper
 *Homologie singulière des espaces fibrés*. The idea beaneath `H-spaces` is that they are topological
 spaces with a binary operation `⋀ : X → X → X` that is a homotopic-theoretic weakening of an
@@ -59,6 +62,7 @@ open scoped unitInterval
 
 open Path ContinuousMap Set.Icc TopologicalSpace
 
+#print HSpace /-
 /-- A topological space `X` is an H-space if it behaves like a (potentially non-associative)
 topological group, but where the axioms for a group only hold up to homotopy.
 -/
@@ -71,6 +75,7 @@ class HSpace (X : Type u) [TopologicalSpace X] where
   hmulE :
     (Hmul.comp <| (ContinuousMap.id X).prod_mk <| const X e).HomotopyRel (ContinuousMap.id X) {e}
 #align H_space HSpace
+-/
 
 -- mathport name: H_space.Hmul
 -- We use the notation `⋀`, typeset as \And, to denote the binary operation `Hmul` on a H-space
@@ -142,14 +147,16 @@ def toHSpace (M : Type u) [MulOneClass M] [TopologicalSpace M] [ContinuousMul M]
   eHmul := (HomotopyRel.refl _ _).cast rfl (by ext1; apply one_mul)
   hmulE := (HomotopyRel.refl _ _).cast rfl (by ext1; apply mul_one)
 #align topological_group.to_H_space TopologicalGroup.toHSpace
-#align topological_add_group.to_H_space TopologicalAddGroup.to_H_space
+#align topological_add_group.to_H_space TopologicalAddGroup.toHSpace
 
+#print TopologicalGroup.hSpace /-
 @[to_additive]
 instance (priority := 600) hSpace (G : Type u) [TopologicalSpace G] [Group G] [TopologicalGroup G] :
     HSpace G :=
   toHSpace G
 #align topological_group.H_space TopologicalGroup.hSpace
-#align topological_add_group.H_space TopologicalAddGroup.H_space
+#align topological_add_group.H_space TopologicalAddGroup.hSpace
+-/
 
 theorem one_eq_hSpace_e {G : Type u} [TopologicalSpace G] [Group G] [TopologicalGroup G] :
     (1 : G) = HSpace.e :=
@@ -166,26 +173,32 @@ end TopologicalGroup
 
 namespace unitInterval
 
+#print unitInterval.qRight /-
 /-- `Q_right` is analogous to the function `Q` defined on p. 475 of [serre1951] that helps proving
 continuity of `delay_refl_right`.-/
 def qRight (p : I × I) : I :=
   Set.projIcc 0 1 zero_le_one (2 * p.1 / (1 + p.2))
 #align unit_interval.Q_right unitInterval.qRight
+-/
 
 theorem continuous_qRight : Continuous qRight :=
   continuous_projIcc.comp <|
     Continuous.div (by continuity) (by continuity) fun x => (add_pos zero_lt_one).ne'
 #align unit_interval.continuous_Q_right unitInterval.continuous_qRight
 
+#print unitInterval.qRight_zero_left /-
 theorem qRight_zero_left (θ : I) : qRight (0, θ) = 0 :=
   Set.projIcc_of_le_left _ <| by simp only [coe_zero, MulZeroClass.mul_zero, zero_div]
 #align unit_interval.Q_right_zero_left unitInterval.qRight_zero_left
+-/
 
+#print unitInterval.qRight_one_left /-
 theorem qRight_one_left (θ : I) : qRight (1, θ) = 1 :=
   Set.projIcc_of_right_le _ <|
     (le_div_iff <| add_pos zero_lt_one).2 <| by dsimp only; rw [coe_one, one_mul, mul_one];
       apply add_le_add_left (le_one _)
 #align unit_interval.Q_right_one_left unitInterval.qRight_one_left
+-/
 
 theorem qRight_zero_right (t : I) : (qRight (t, 0) : ℝ) = if (t : ℝ) ≤ 1 / 2 then 2 * t else 1 :=
   by
@@ -195,10 +208,12 @@ theorem qRight_zero_right (t : I) : (qRight (t, 0) : ℝ) = if (t : ℝ) ≤ 1 /
   · rw [(Set.projIcc_eq_right _).2]; · rfl; · linarith; · exact zero_lt_one
 #align unit_interval.Q_right_zero_right unitInterval.qRight_zero_right
 
+#print unitInterval.qRight_one_right /-
 theorem qRight_one_right (t : I) : qRight (t, 1) = t :=
   Eq.trans (by rw [Q_right]; congr; apply mul_div_cancel_left; exact two_ne_zero) <|
     Set.projIcc_val zero_le_one _
 #align unit_interval.Q_right_one_right unitInterval.qRight_one_right
+-/
 
 end unitInterval
 
@@ -208,6 +223,7 @@ open unitInterval
 
 variable {X : Type u} [TopologicalSpace X] {x y : X}
 
+#print Path.delayReflRight /-
 /-- This is the function analogous to the one on p. 475 of [serre1951], defining a homotopy from
 the product path `γ ∧ e` to `γ`.-/
 def delayReflRight (θ : I) (γ : Path x y) : Path x y
@@ -217,6 +233,7 @@ def delayReflRight (θ : I) (γ : Path x y) : Path x y
   source' := by dsimp only; rw [Q_right_zero_left, γ.source]
   target' := by dsimp only; rw [Q_right_one_left, γ.target]
 #align path.delay_refl_right Path.delayReflRight
+-/
 
 theorem continuous_delayReflRight : Continuous fun p : I × Path x y => delayReflRight p.1 p.2 :=
   continuous_uncurry_iff.mp <|
@@ -224,6 +241,7 @@ theorem continuous_delayReflRight : Continuous fun p : I × Path x y => delayRef
       continuous_qRight.comp <| continuous_snd.prod_mk <| continuous_fst.comp continuous_fst
 #align path.continuous_delay_refl_right Path.continuous_delayReflRight
 
+#print Path.delayReflRight_zero /-
 theorem delayReflRight_zero (γ : Path x y) : delayReflRight 0 γ = γ.trans (Path.refl y) :=
   by
   ext t
@@ -233,16 +251,21 @@ theorem delayReflRight_zero (γ : Path x y) : delayReflRight 0 γ = γ.trans (Pa
   all_goals apply congr_arg γ; ext1; rw [Q_right_zero_right]
   exacts [if_neg h, if_pos h]
 #align path.delay_refl_right_zero Path.delayReflRight_zero
+-/
 
+#print Path.delayReflRight_one /-
 theorem delayReflRight_one (γ : Path x y) : delayReflRight 1 γ = γ := by ext t;
   exact congr_arg γ (Q_right_one_right t)
 #align path.delay_refl_right_one Path.delayReflRight_one
+-/
 
+#print Path.delayReflLeft /-
 /-- This is the function on p. 475 of [serre1951], defining a homotopy from a path `γ` to the
 product path `e ∧ γ`.-/
 def delayReflLeft (θ : I) (γ : Path x y) : Path x y :=
   (delayReflRight θ γ.symm).symm
 #align path.delay_refl_left Path.delayReflLeft
+-/
 
 theorem continuous_delayReflLeft : Continuous fun p : I × Path x y => delayReflLeft p.1 p.2 :=
   Path.continuous_symm.comp <|
@@ -250,13 +273,17 @@ theorem continuous_delayReflLeft : Continuous fun p : I × Path x y => delayRefl
       continuous_fst.prod_mk <| Path.continuous_symm.comp continuous_snd
 #align path.continuous_delay_refl_left Path.continuous_delayReflLeft
 
+#print Path.delayReflLeft_zero /-
 theorem delayReflLeft_zero (γ : Path x y) : delayReflLeft 0 γ = (Path.refl x).trans γ := by
   simp only [delay_refl_left, delay_refl_right_zero, trans_symm, refl_symm, Path.symm_symm]
 #align path.delay_refl_left_zero Path.delayReflLeft_zero
+-/
 
+#print Path.delayReflLeft_one /-
 theorem delayReflLeft_one (γ : Path x y) : delayReflLeft 1 γ = γ := by
   simp only [delay_refl_left, delay_refl_right_one, Path.symm_symm]
 #align path.delay_refl_left_one Path.delayReflLeft_one
+-/
 
 /-- The loop space at x carries a structure of a `H-space`. Note that the field `e_Hmul`
 (resp. `Hmul_e`) neither implies nor is implied by `path.homotopy.refl_trans`
Diff
@@ -94,7 +94,7 @@ instance HSpace.prod (X : Type u) (Y : Type v) [TopologicalSpace X] [Topological
           (continuous_fst.prod_mk (continuous_snd.comp continuous_snd)))
     use ⟨G, hG⟩
     · rintro ⟨x, y⟩
-      exacts[prod.mk.inj_iff.mpr ⟨HSpace.eHmul.1.2 x, HSpace.eHmul.1.2 y⟩]
+      exacts [prod.mk.inj_iff.mpr ⟨HSpace.eHmul.1.2 x, HSpace.eHmul.1.2 y⟩]
     · rintro ⟨x, y⟩
       exact prod.mk.inj_iff.mpr ⟨HSpace.eHmul.1.3 x, HSpace.eHmul.1.3 y⟩
     · rintro t ⟨x, y⟩ h
@@ -114,7 +114,7 @@ instance HSpace.prod (X : Type u) (Y : Type v) [TopologicalSpace X] [Topological
           (continuous_fst.prod_mk (continuous_snd.comp continuous_snd)))
     use ⟨G, hG⟩
     · rintro ⟨x, y⟩
-      exacts[prod.mk.inj_iff.mpr ⟨HSpace.hmulE.1.2 x, HSpace.hmulE.1.2 y⟩]
+      exacts [prod.mk.inj_iff.mpr ⟨HSpace.hmulE.1.2 x, HSpace.hmulE.1.2 y⟩]
     · rintro ⟨x, y⟩
       exact prod.mk.inj_iff.mpr ⟨HSpace.hmulE.1.3 x, HSpace.hmulE.1.3 y⟩
     · rintro t ⟨x, y⟩ h
@@ -191,12 +191,12 @@ theorem qRight_zero_right (t : I) : (qRight (t, 0) : ℝ) = if (t : ℝ) ≤ 1 /
   by
   simp only [Q_right, coe_zero, add_zero, div_one]
   split_ifs
-  · rw [Set.projIcc_of_mem _ ((mul_pos_mem_iff zero_lt_two).2 _)]; exacts[rfl, ⟨t.2.1, h⟩]
+  · rw [Set.projIcc_of_mem _ ((mul_pos_mem_iff zero_lt_two).2 _)]; exacts [rfl, ⟨t.2.1, h⟩]
   · rw [(Set.projIcc_eq_right _).2]; · rfl; · linarith; · exact zero_lt_one
 #align unit_interval.Q_right_zero_right unitInterval.qRight_zero_right
 
 theorem qRight_one_right (t : I) : qRight (t, 1) = t :=
-  Eq.trans (by rw [Q_right]; congr ; apply mul_div_cancel_left; exact two_ne_zero) <|
+  Eq.trans (by rw [Q_right]; congr; apply mul_div_cancel_left; exact two_ne_zero) <|
     Set.projIcc_val zero_le_one _
 #align unit_interval.Q_right_one_right unitInterval.qRight_one_right
 
@@ -231,7 +231,7 @@ theorem delayReflRight_zero (γ : Path x y) : delayReflRight 0 γ = γ.trans (Pa
     refl_apply]
   split_ifs; swap; conv_rhs => rw [← γ.target]
   all_goals apply congr_arg γ; ext1; rw [Q_right_zero_right]
-  exacts[if_neg h, if_pos h]
+  exacts [if_neg h, if_pos h]
 #align path.delay_refl_right_zero Path.delayReflRight_zero
 
 theorem delayReflRight_one (γ : Path x y) : delayReflRight 1 γ = γ := by ext t;
Diff
@@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Filippo A. E. Nuccio, Junyan Xu
 
 ! This file was ported from Lean 3 source module topology.homotopy.H_spaces
-! leanprover-community/mathlib commit 8d33f09cd7089ecf074b4791907588245aec5d1b
+! leanprover-community/mathlib commit 729d23f9e1640e1687141be89b106d3c8f9d10c0
 ! Please do not edit these lines, except to modify the commit id
 ! if you have ported upstream changes.
 -/
@@ -15,9 +15,34 @@ import Mathbin.Topology.Homotopy.Path
 # H-spaces
 
 This file defines H-spaces mainly following the approach proposed by Serre in his paper
-*Homologie singulière des espaces fibrés*. The main results are the H-space `instance` on every
-topological group, and the H-space structure on the loop space (based at `x : X` of any topological
-space `X`, for which we introduce the notation `Ω_[x]`.
+*Homologie singulière des espaces fibrés*. The idea beaneath `H-spaces` is that they are topological
+spaces with a binary operation `⋀ : X → X → X` that is a homotopic-theoretic weakening of an
+operation what would make `X` into a topological monoid. In particular, there exists a "neutral
+element" `e : X` such that `λ x, e ⋀ x` and `λ x, x ⋀ e` are homotopic to the identity on `X`, see
+[the Wikipedia page of H-spaces](https://en.wikipedia.org/wiki/H-space).
+
+Some notable properties of `H-spaces` are
+* Their fundamental group is always abelian (by the same argument for topological groups);
+* Their cohomology ring comes equipped with a structure of a Hopf-algebra;
+* The loop space based at every `x : X` carries a structure of an `H-spaces`.
+
+## Main Results
+
+* Every topological group `G` is an `H-space` using its operation `* : G → G → G` (this is already
+true if `G` has an instance of a `mul_one_class` and `continuous_mul`);
+* Given two `H-spaces` `X` and `Y`, their product is again an `H`-space. We show in an example that
+starting with two topological groups `G, G'`, the `H`-space structure on `G × G'` is definitionally
+equal to the product of `H-space` structures on `G` and `G'`.
+* The loop space based at every `x : X` carries a structure of an `H-spaces`.
+
+## To Do
+* Prove that for every `normed_add_torsor Z` and every `z : Z`, the operation
+`λ x y, midpoint x y` defines a `H-space` structure with `z` as a "neutral element".
+* Prove that `S^0`, `S^1`, `S^3` and `S^7` are the unique spheres that are `H-spaces`, where the
+first three inherit the structure because they are topological groups (they are Lie groups,
+actually), isomorphic to the invertible elements in `ℤ`, in `ℂ` and in the quaternion; and the
+fourth from the fact that `S^7` coincides with the octonions of norm 1 (it is not a group, in
+particular, only has an instance of `mul_one_class`).
 
 ## References
 
@@ -103,14 +128,26 @@ instance HSpace.prod (X : Type u) (Y : Type v) [TopologicalSpace X] [Topological
 
 namespace TopologicalGroup
 
-@[to_additive]
-instance (priority := 600) hSpace (G : Type u) [TopologicalSpace G] [Group G] [TopologicalGroup G] :
-    HSpace G where
+/-- The definition `to_H_space` is not an instance because its `@additive` version would
+lead to a diamond since a topological field would inherit two `H_space` structures, one from the
+`mul_one_class` and one from the `add_zero_class`. In the case of a group, we make
+`topological_group.H_space` an instance."-/
+@[to_additive
+      "The definition `to_H_space` is not an instance because it comes together with a\nmultiplicative version which would lead to a diamond since a topological field would inherit two\n`H_space` structures, one from the `mul_one_class` and one from the `add_zero_class`. In the case\nof an additive group, we make `topological_group.H_space` an instance."]
+def toHSpace (M : Type u) [MulOneClass M] [TopologicalSpace M] [ContinuousMul M] : HSpace M
+    where
   hmul := ⟨Function.uncurry Mul.mul, continuous_mul⟩
   e := 1
   hmul_e_e := one_mul 1
   eHmul := (HomotopyRel.refl _ _).cast rfl (by ext1; apply one_mul)
   hmulE := (HomotopyRel.refl _ _).cast rfl (by ext1; apply mul_one)
+#align topological_group.to_H_space TopologicalGroup.toHSpace
+#align topological_add_group.to_H_space TopologicalAddGroup.to_H_space
+
+@[to_additive]
+instance (priority := 600) hSpace (G : Type u) [TopologicalSpace G] [Group G] [TopologicalGroup G] :
+    HSpace G :=
+  toHSpace G
 #align topological_group.H_space TopologicalGroup.hSpace
 #align topological_add_group.H_space TopologicalAddGroup.H_space
 
@@ -119,12 +156,10 @@ theorem one_eq_hSpace_e {G : Type u} [TopologicalSpace G] [Group G] [Topological
   rfl
 #align topological_group.one_eq_H_space_e TopologicalGroup.one_eq_hSpace_e
 
-/-
-In the following example we see that the `H-space` structure on the product of two topological
-groups is definitionally equally to the product `H-space`-structure of the two groups.
--/
+/- In the following example we see that the `H-space` structure on the product of two topological
+groups is definitionally equally to the product `H-space`-structure of the two groups.-/
 example {G G' : Type u} [TopologicalSpace G] [Group G] [TopologicalGroup G] [TopologicalSpace G']
-    [Group G'] [TopologicalGroup G'] : TopologicalGroup.hSpace (G × G') = HSpace.prod G G' :=
+    [Group G'] [TopologicalGroup G'] : toHSpace (G × G') = HSpace.prod G G' :=
   rfl
 
 end TopologicalGroup
Diff
@@ -30,7 +30,7 @@ universe u v
 
 noncomputable section
 
-open unitInterval
+open scoped unitInterval
 
 open Path ContinuousMap Set.Icc TopologicalSpace
 
Diff
@@ -109,16 +109,8 @@ instance (priority := 600) hSpace (G : Type u) [TopologicalSpace G] [Group G] [T
   hmul := ⟨Function.uncurry Mul.mul, continuous_mul⟩
   e := 1
   hmul_e_e := one_mul 1
-  eHmul :=
-    (HomotopyRel.refl _ _).cast rfl
-      (by
-        ext1
-        apply one_mul)
-  hmulE :=
-    (HomotopyRel.refl _ _).cast rfl
-      (by
-        ext1
-        apply mul_one)
+  eHmul := (HomotopyRel.refl _ _).cast rfl (by ext1; apply one_mul)
+  hmulE := (HomotopyRel.refl _ _).cast rfl (by ext1; apply mul_one)
 #align topological_group.H_space TopologicalGroup.hSpace
 #align topological_add_group.H_space TopologicalAddGroup.H_space
 
@@ -156,9 +148,7 @@ theorem qRight_zero_left (θ : I) : qRight (0, θ) = 0 :=
 
 theorem qRight_one_left (θ : I) : qRight (1, θ) = 1 :=
   Set.projIcc_of_right_le _ <|
-    (le_div_iff <| add_pos zero_lt_one).2 <| by
-      dsimp only
-      rw [coe_one, one_mul, mul_one]
+    (le_div_iff <| add_pos zero_lt_one).2 <| by dsimp only; rw [coe_one, one_mul, mul_one];
       apply add_le_add_left (le_one _)
 #align unit_interval.Q_right_one_left unitInterval.qRight_one_left
 
@@ -166,21 +156,12 @@ theorem qRight_zero_right (t : I) : (qRight (t, 0) : ℝ) = if (t : ℝ) ≤ 1 /
   by
   simp only [Q_right, coe_zero, add_zero, div_one]
   split_ifs
-  · rw [Set.projIcc_of_mem _ ((mul_pos_mem_iff zero_lt_two).2 _)]
-    exacts[rfl, ⟨t.2.1, h⟩]
-  · rw [(Set.projIcc_eq_right _).2]
-    · rfl
-    · linarith
-    · exact zero_lt_one
+  · rw [Set.projIcc_of_mem _ ((mul_pos_mem_iff zero_lt_two).2 _)]; exacts[rfl, ⟨t.2.1, h⟩]
+  · rw [(Set.projIcc_eq_right _).2]; · rfl; · linarith; · exact zero_lt_one
 #align unit_interval.Q_right_zero_right unitInterval.qRight_zero_right
 
 theorem qRight_one_right (t : I) : qRight (t, 1) = t :=
-  Eq.trans
-      (by
-        rw [Q_right]
-        congr
-        apply mul_div_cancel_left
-        exact two_ne_zero) <|
+  Eq.trans (by rw [Q_right]; congr ; apply mul_div_cancel_left; exact two_ne_zero) <|
     Set.projIcc_val zero_le_one _
 #align unit_interval.Q_right_one_right unitInterval.qRight_one_right
 
@@ -198,12 +179,8 @@ def delayReflRight (θ : I) (γ : Path x y) : Path x y
     where
   toFun t := γ (qRight (t, θ))
   continuous_toFun := γ.Continuous.comp (continuous_qRight.comp <| Continuous.Prod.mk_left θ)
-  source' := by
-    dsimp only
-    rw [Q_right_zero_left, γ.source]
-  target' := by
-    dsimp only
-    rw [Q_right_one_left, γ.target]
+  source' := by dsimp only; rw [Q_right_zero_left, γ.source]
+  target' := by dsimp only; rw [Q_right_one_left, γ.target]
 #align path.delay_refl_right Path.delayReflRight
 
 theorem continuous_delayReflRight : Continuous fun p : I × Path x y => delayReflRight p.1 p.2 :=
@@ -222,9 +199,7 @@ theorem delayReflRight_zero (γ : Path x y) : delayReflRight 0 γ = γ.trans (Pa
   exacts[if_neg h, if_pos h]
 #align path.delay_refl_right_zero Path.delayReflRight_zero
 
-theorem delayReflRight_one (γ : Path x y) : delayReflRight 1 γ = γ :=
-  by
-  ext t
+theorem delayReflRight_one (γ : Path x y) : delayReflRight 1 γ = γ := by ext t;
   exact congr_arg γ (Q_right_one_right t)
 #align path.delay_refl_right_one Path.delayReflRight_one
 
@@ -261,16 +236,12 @@ instance (x : X) : HSpace (Path x x)
     { toHomotopy :=
         ⟨⟨fun p : I × Path x x => delayReflLeft p.1 p.2, continuous_delayReflLeft⟩,
           delayReflLeft_zero, delayReflLeft_one⟩
-      prop' := by
-        rintro t _ (rfl : _ = _)
-        exact ⟨refl_trans_refl.symm, rfl⟩ }
+      prop' := by rintro t _ (rfl : _ = _); exact ⟨refl_trans_refl.symm, rfl⟩ }
   hmulE :=
     { toHomotopy :=
         ⟨⟨fun p : I × Path x x => delayReflRight p.1 p.2, continuous_delayReflRight⟩,
           delayReflRight_zero, delayReflRight_one⟩
-      prop' := by
-        rintro t _ (rfl : _ = _)
-        exact ⟨refl_trans_refl.symm, rfl⟩ }
+      prop' := by rintro t _ (rfl : _ = _); exact ⟨refl_trans_refl.symm, rfl⟩ }
 
 end Path
 

Changes in mathlib4

mathlib3
mathlib4
chore: adapt to multiple goal linter 3 (#12372)

A PR analogous to #12338 and #12361: reformatting proofs following the multiple goals linter of #12339.

Diff
@@ -237,7 +237,8 @@ theorem delayReflRight_zero (γ : Path x y) : delayReflRight 0 γ = γ.trans (Pa
   ext t
   simp only [delayReflRight, trans_apply, refl_extend, Path.coe_mk_mk, Function.comp_apply,
     refl_apply]
-  split_ifs with h; swap; conv_rhs => rw [← γ.target]
+  split_ifs with h; swap
+  on_goal 1 => conv_rhs => rw [← γ.target]
   all_goals apply congr_arg γ; ext1; rw [qRight_zero_right]
   exacts [if_neg h, if_pos h]
 #align path.delay_refl_right_zero Path.delayReflRight_zero
feat: Axiomatise b ≠ 0 → a * b / b = a (#12424)

This lets us unify a few lemmas between GroupWithZero and EuclideanDomain and two lemmas that were previously proved separately for Nat, Int, Polynomial.

Diff
@@ -203,14 +203,7 @@ theorem qRight_zero_right (t : I) :
 #align unit_interval.Q_right_zero_right unitInterval.qRight_zero_right
 
 theorem qRight_one_right (t : I) : qRight (t, 1) = t :=
-  Eq.trans
-      (by
-        rw [qRight]
-        congr
-        norm_num
-        apply mul_div_cancel_left₀
-        exact two_ne_zero) <|
-    Set.projIcc_val zero_le_one _
+  Eq.trans (by rw [qRight]; norm_num) <| Set.projIcc_val zero_le_one _
 #align unit_interval.Q_right_one_right unitInterval.qRight_one_right
 
 end unitInterval
style: replace '.-/' by '. -/' (#11938)

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

Diff
@@ -155,7 +155,7 @@ theorem one_eq_hSpace_e {G : Type u} [TopologicalSpace G] [Group G] [Topological
 #align topological_group.one_eq_H_space_e TopologicalGroup.one_eq_hSpace_e
 
 /- In the following example we see that the H-space structure on the product of two topological
-groups is definitionally equally to the product H-space-structure of the two groups.-/
+groups is definitionally equally to the product H-space-structure of the two groups. -/
 example {G G' : Type u} [TopologicalSpace G] [Group G] [TopologicalGroup G] [TopologicalSpace G']
     [Group G'] [TopologicalGroup G'] : TopologicalGroup.hSpace (G × G') = HSpace.prod G G' := by
   simp only [HSpace.prod]
@@ -167,7 +167,7 @@ end TopologicalGroup
 namespace unitInterval
 
 /-- `qRight` is analogous to the function `Q` defined on p. 475 of [serre1951] that helps proving
-continuity of `delayReflRight`.-/
+continuity of `delayReflRight`. -/
 def qRight (p : I × I) : I :=
   Set.projIcc 0 1 zero_le_one (2 * p.1 / (1 + p.2))
 #align unit_interval.Q_right unitInterval.qRight
@@ -222,7 +222,7 @@ open unitInterval
 variable {X : Type u} [TopologicalSpace X] {x y : X}
 
 /-- This is the function analogous to the one on p. 475 of [serre1951], defining a homotopy from
-the product path `γ ∧ e` to `γ`.-/
+the product path `γ ∧ e` to `γ`. -/
 def delayReflRight (θ : I) (γ : Path x y) : Path x y where
   toFun t := γ (qRight (t, θ))
   continuous_toFun := γ.continuous.comp (continuous_qRight.comp <| Continuous.Prod.mk_left θ)
@@ -255,7 +255,7 @@ theorem delayReflRight_one (γ : Path x y) : delayReflRight 1 γ = γ := by
 #align path.delay_refl_right_one Path.delayReflRight_one
 
 /-- This is the function on p. 475 of [serre1951], defining a homotopy from a path `γ` to the
-product path `e ∧ γ`.-/
+product path `e ∧ γ`. -/
 def delayReflLeft (θ : I) (γ : Path x y) : Path x y :=
   (delayReflRight θ γ.symm).symm
 #align path.delay_refl_left Path.delayReflLeft
doc(Topology): fix more mathlib3 names in doc comments (#11948)
Diff
@@ -48,7 +48,7 @@ particular, only has an instance of `MulOneClass`).
 * [J.-P. Serre, *Homologie singulière des espaces fibrés. Applications*,
   Ann. of Math (2) 1951, 54, 425–505][serre1951]
 -/
--- Porting note: `H_space` already contains an upper case letter
+-- Porting note: `HSpace` already contains an upper case letter
 set_option linter.uppercaseLean3 false
 universe u v
 
doc: document some notation (#11922)

We cannot literally use @[inherit_doc] in these cases, but we can slightly modify the underlying docstring or a turn a regular comment into a doc comment.

Diff
@@ -71,7 +71,7 @@ class HSpace (X : Type u) [TopologicalSpace X] where
     (hmul.comp <| (ContinuousMap.id X).prodMk <| const X e).HomotopyRel (ContinuousMap.id X) {e}
 #align H_space HSpace
 
--- We use the notation `⋀`, typeset as \And, to denote the binary operation `hmul` on an H-space
+/-- The binary operation `hmul` on an `H`-space -/
 scoped[HSpaces] notation x "⋀" y => HSpace.hmul (x, y)
 
 -- Porting note: opening `HSpaces` so that the above notation works
chore: Rename mul-div cancellation lemmas (#11530)

Lemma names around cancellation of multiplication and division are a mess.

This PR renames a handful of them according to the following table (each big row contains the multiplicative statement, then the three rows contain the GroupWithZero lemma name, the Group lemma, the AddGroup lemma name).

| Statement | New name | Old name | |

Diff
@@ -208,7 +208,7 @@ theorem qRight_one_right (t : I) : qRight (t, 1) = t :=
         rw [qRight]
         congr
         norm_num
-        apply mul_div_cancel_left
+        apply mul_div_cancel_left₀
         exact two_ne_zero) <|
     Set.projIcc_val zero_le_one _
 #align unit_interval.Q_right_one_right unitInterval.qRight_one_right
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
@@ -48,7 +48,7 @@ particular, only has an instance of `MulOneClass`).
 * [J.-P. Serre, *Homologie singulière des espaces fibrés. Applications*,
   Ann. of Math (2) 1951, 54, 425–505][serre1951]
 -/
--- porting note: `H_space` already contains an upper case letter
+-- Porting note: `H_space` already contains an upper case letter
 set_option linter.uppercaseLean3 false
 universe u v
 
@@ -74,13 +74,13 @@ class HSpace (X : Type u) [TopologicalSpace X] where
 -- We use the notation `⋀`, typeset as \And, to denote the binary operation `hmul` on an H-space
 scoped[HSpaces] notation x "⋀" y => HSpace.hmul (x, y)
 
--- porting note: opening `HSpaces` so that the above notation works
+-- Porting note: opening `HSpaces` so that the above notation works
 open HSpaces
 
 instance HSpace.prod (X : Type u) (Y : Type v) [TopologicalSpace X] [TopologicalSpace Y] [HSpace X]
     [HSpace Y] : HSpace (X × Y) where
   hmul := ⟨fun p => (p.1.1 ⋀ p.2.1, p.1.2 ⋀ p.2.2), by
-    -- porting note: was `continuity`
+    -- Porting note: was `continuity`
     exact ((map_continuous HSpace.hmul).comp ((continuous_fst.comp continuous_fst).prod_mk
         (continuous_fst.comp continuous_snd))).prod_mk ((map_continuous HSpace.hmul).comp
         ((continuous_snd.comp continuous_fst).prod_mk (continuous_snd.comp continuous_snd)))
chore: replace Lean 3 syntax λ x, in doc comments (#10727)

Use Lean 4 syntax fun x ↦ instead, matching the style guide. This is close to exhaustive for doc comments; mathlib has about 460 remaining uses of λ (not all in Lean 3 syntax).

Diff
@@ -15,8 +15,9 @@ import Mathlib.Topology.Homotopy.Basic
 This file defines H-spaces mainly following the approach proposed by Serre in his paper
 *Homologie singulière des espaces fibrés*. The idea beneath `H-spaces` is that they are topological
 spaces with a binary operation `⋀ : X → X → X` that is a homotopic-theoretic weakening of an
-operation what would make `X` into a topological monoid. In particular, there exists a "neutral
-element" `e : X` such that `λ x, e ⋀ x` and `λ x, x ⋀ e` are homotopic to the identity on `X`, see
+operation what would make `X` into a topological monoid.
+In particular, there exists a "neutral element" `e : X` such that `fun x ↦e ⋀ x` and
+`fun x ↦x ⋀ e` are homotopic to the identity on `X`, see
 [the Wikipedia page of H-spaces](https://en.wikipedia.org/wiki/H-space).
 
 Some notable properties of `H-spaces` are
@@ -35,7 +36,7 @@ equal to the product of `H-space` structures on `G` and `G'`.
 
 ## To Do
 * Prove that for every `NormedAddTorsor Z` and every `z : Z`, the operation
-`λ x y, midpoint x y` defines an `H-space` structure with `z` as a "neutral element".
+`fun x y ↦ midpoint x y` defines an `H-space` structure with `z` as a "neutral element".
 * Prove that `S^0`, `S^1`, `S^3` and `S^7` are the unique spheres that are `H-spaces`, where the
 first three inherit the structure because they are topological groups (they are Lie groups,
 actually), isomorphic to the invertible elements in `ℤ`, in `ℂ` and in the quaternion; and the
chore: reduce imports (#9830)

This uses the improved shake script from #9772 to reduce imports across mathlib. The corresponding noshake.json file has been added to #9772.

Co-authored-by: Mario Carneiro <di.gama@gmail.com>

Diff
@@ -4,7 +4,8 @@ Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Filippo A. E. Nuccio, Junyan Xu
 -/
 import Mathlib.Topology.CompactOpen
-import Mathlib.Topology.Homotopy.Path
+import Mathlib.Topology.Connected.PathConnected
+import Mathlib.Topology.Homotopy.Basic
 
 #align_import topology.homotopy.H_spaces from "leanprover-community/mathlib"@"729d23f9e1640e1687141be89b106d3c8f9d10c0"
 
refactor: remove redundant condition in HomotopyRel (#7848)

For a homotopy F between f₀ and f₁ to be a homotopy relative to a set S, it suffices that F (t, x) = f₀ x for all x ∈ S and t : I, from which F (t, x) = f₁ x can be derived.

Also add HomotopyRel.compContinuousMap.

Diff
@@ -91,21 +91,17 @@ instance HSpace.prod (X : Type u) (Y : Type v) [TopologicalSpace X] [Topological
     let G : I × X × Y → X × Y := fun p => (HSpace.eHmul (p.1, p.2.1), HSpace.eHmul (p.1, p.2.2))
     have hG : Continuous G :=
       (Continuous.comp HSpace.eHmul.1.1.2
-            (continuous_fst.prod_mk (continuous_fst.comp continuous_snd))).prod_mk
+          (continuous_fst.prod_mk (continuous_fst.comp continuous_snd))).prod_mk
         (Continuous.comp HSpace.eHmul.1.1.2
           (continuous_fst.prod_mk (continuous_snd.comp continuous_snd)))
     use! ⟨G, hG⟩
     · rintro ⟨x, y⟩
-      exacts [Prod.mk.inj_iff.mpr ⟨HSpace.eHmul.1.2 x, HSpace.eHmul.1.2 y⟩]
+      exact Prod.ext (HSpace.eHmul.1.2 x) (HSpace.eHmul.1.2 y)
     · rintro ⟨x, y⟩
-      exact Prod.mk.inj_iff.mpr ⟨HSpace.eHmul.1.3 x, HSpace.eHmul.1.3 y⟩
+      exact Prod.ext (HSpace.eHmul.1.3 x) (HSpace.eHmul.1.3 y)
     · rintro t ⟨x, y⟩ h
-      replace h := Prod.mk.inj_iff.mp (Set.mem_singleton_iff.mp h)
-      exact
-        ⟨Prod.mk.inj_iff.mpr
-            ⟨HomotopyRel.eq_fst HSpace.eHmul t (Set.mem_singleton_iff.mpr h.1),
-              HomotopyRel.eq_fst HSpace.eHmul t (Set.mem_singleton_iff.mpr h.2)⟩,
-          Prod.mk.inj_iff.mpr ⟨(HSpace.eHmul.2 t x h.1).2, (HSpace.eHmul.2 t y h.2).2⟩⟩
+      replace h := Prod.mk.inj_iff.mp h
+      exact Prod.ext (HSpace.eHmul.2 t x h.1) (HSpace.eHmul.2 t y h.2)
   hmulE := by
     let G : I × X × Y → X × Y := fun p => (HSpace.hmulE (p.1, p.2.1), HSpace.hmulE (p.1, p.2.2))
     have hG : Continuous G :=
@@ -115,16 +111,12 @@ instance HSpace.prod (X : Type u) (Y : Type v) [TopologicalSpace X] [Topological
           (continuous_fst.prod_mk (continuous_snd.comp continuous_snd)))
     use! ⟨G, hG⟩
     · rintro ⟨x, y⟩
-      exacts [Prod.mk.inj_iff.mpr ⟨HSpace.hmulE.1.2 x, HSpace.hmulE.1.2 y⟩]
+      exact Prod.ext (HSpace.hmulE.1.2 x) (HSpace.hmulE.1.2 y)
     · rintro ⟨x, y⟩
-      exact Prod.mk.inj_iff.mpr ⟨HSpace.hmulE.1.3 x, HSpace.hmulE.1.3 y⟩
+      exact Prod.ext (HSpace.hmulE.1.3 x) (HSpace.hmulE.1.3 y)
     · rintro t ⟨x, y⟩ h
-      replace h := Prod.mk.inj_iff.mp (Set.mem_singleton_iff.mp h)
-      exact
-        ⟨Prod.mk.inj_iff.mpr
-            ⟨HomotopyRel.eq_fst HSpace.hmulE t (Set.mem_singleton_iff.mpr h.1),
-              HomotopyRel.eq_fst HSpace.hmulE t (Set.mem_singleton_iff.mpr h.2)⟩,
-          Prod.mk.inj_iff.mpr ⟨(HSpace.hmulE.2 t x h.1).2, (HSpace.hmulE.2 t y h.2).2⟩⟩
+      replace h := Prod.mk.inj_iff.mp h
+      exact Prod.ext (HSpace.hmulE.2 t x h.1) (HSpace.hmulE.2 t y h.2)
 #align H_space.prod HSpace.prod
 
 
@@ -290,13 +282,13 @@ instance (x : X) : HSpace (Path x x) where
   hmul_e_e := refl_trans_refl
   eHmul :=
     { toHomotopy :=
-        ⟨⟨fun p : I × Path x x => delayReflLeft p.1 p.2, continuous_delayReflLeft⟩,
+        ⟨⟨fun p : I × Path x x ↦ delayReflLeft p.1 p.2, continuous_delayReflLeft⟩,
           delayReflLeft_zero, delayReflLeft_one⟩
-      prop' := by rintro t _ (rfl : _ = _); exact ⟨refl_trans_refl.symm, rfl⟩ }
+      prop' := by rintro t _ rfl; exact refl_trans_refl.symm }
   hmulE :=
     { toHomotopy :=
-        ⟨⟨fun p : I × Path x x => delayReflRight p.1 p.2, continuous_delayReflRight⟩,
+        ⟨⟨fun p : I × Path x x ↦ delayReflRight p.1 p.2, continuous_delayReflRight⟩,
           delayReflRight_zero, delayReflRight_one⟩
-      prop' := by rintro t _ (rfl : _ = _); exact ⟨refl_trans_refl.symm, rfl⟩ }
+      prop' := by rintro t _ rfl; exact refl_trans_refl.symm }
 
 end Path
chore: tidy various files (#7009)
Diff
@@ -26,20 +26,20 @@ Some notable properties of `H-spaces` are
 ## Main Results
 
 * Every topological group `G` is an `H-space` using its operation `* : G → G → G` (this is already
-true if `G` has an instance of a `mul_one_class` and `continuous_mul`);
+true if `G` has an instance of a `MulOneClass` and `ContinuousMul`);
 * Given two `H-spaces` `X` and `Y`, their product is again an `H`-space. We show in an example that
 starting with two topological groups `G, G'`, the `H`-space structure on `G × G'` is definitionally
 equal to the product of `H-space` structures on `G` and `G'`.
 * The loop space based at every `x : X` carries a structure of an `H-spaces`.
 
 ## To Do
-* Prove that for every `normed_add_torsor Z` and every `z : Z`, the operation
+* Prove that for every `NormedAddTorsor Z` and every `z : Z`, the operation
 `λ x y, midpoint x y` defines an `H-space` structure with `z` as a "neutral element".
 * Prove that `S^0`, `S^1`, `S^3` and `S^7` are the unique spheres that are `H-spaces`, where the
 first three inherit the structure because they are topological groups (they are Lie groups,
 actually), isomorphic to the invertible elements in `ℤ`, in `ℂ` and in the quaternion; and the
 fourth from the fact that `S^7` coincides with the octonions of norm 1 (it is not a group, in
-particular, only has an instance of `mul_one_class`).
+particular, only has an instance of `MulOneClass`).
 
 ## References
 
@@ -69,7 +69,6 @@ class HSpace (X : Type u) [TopologicalSpace X] where
     (hmul.comp <| (ContinuousMap.id X).prodMk <| const X e).HomotopyRel (ContinuousMap.id X) {e}
 #align H_space HSpace
 
--- mathport name: H_space.Hmul
 -- We use the notation `⋀`, typeset as \And, to denote the binary operation `hmul` on an H-space
 scoped[HSpaces] notation x "⋀" y => HSpace.hmul (x, y)
 
@@ -131,15 +130,15 @@ instance HSpace.prod (X : Type u) (Y : Type v) [TopologicalSpace X] [Topological
 
 namespace TopologicalGroup
 
-/-- The definition `to_H_space` is not an instance because its `@additive` version would
-lead to a diamond since a topological field would inherit two `H_space` structures, one from the
-`mul_one_class` and one from the `add_zero_class`. In the case of a group, we make
-`topological_group.H_space` an instance."-/
+/-- The definition `toHSpace` is not an instance because its additive version would
+lead to a diamond since a topological field would inherit two `HSpace` structures, one from the
+`MulOneClass` and one from the `AddZeroClass`. In the case of a group, we make
+`TopologicalGroup.hSpace` an instance."-/
 @[to_additive
-      "The definition `to_H_space` is not an instance because it comes together with a
+      "The definition `toHSpace` is not an instance because it comes together with a
       multiplicative version which would lead to a diamond since a topological field would inherit
-      two `H_space` structures, one from the `mul_one_class` and one from the `add_zero_class`.
-      In the case of an additive group, we make `topological_group.H_space` an instance."]
+      two `HSpace` structures, one from the `MulOneClass` and one from the `AddZeroClass`.
+      In the case of an additive group, we make `TopologicalAddGroup.hSpace` an instance."]
 def toHSpace (M : Type u) [MulOneClass M] [TopologicalSpace M] [ContinuousMul M] : HSpace M where
   hmul := ⟨Function.uncurry Mul.mul, continuous_mul⟩
   e := 1
@@ -161,8 +160,8 @@ theorem one_eq_hSpace_e {G : Type u} [TopologicalSpace G] [Group G] [Topological
   rfl
 #align topological_group.one_eq_H_space_e TopologicalGroup.one_eq_hSpace_e
 
-/- In the following example we see that the `H-space` structure on the product of two topological
-groups is definitionally equally to the product `H-space`-structure of the two groups.-/
+/- In the following example we see that the H-space structure on the product of two topological
+groups is definitionally equally to the product H-space-structure of the two groups.-/
 example {G G' : Type u} [TopologicalSpace G] [Group G] [TopologicalGroup G] [TopologicalSpace G']
     [Group G'] [TopologicalGroup G'] : TopologicalGroup.hSpace (G × G') = HSpace.prod G G' := by
   simp only [HSpace.prod]
@@ -281,7 +280,7 @@ theorem delayReflLeft_one (γ : Path x y) : delayReflLeft 1 γ = γ := by
   simp only [delayReflLeft, delayReflRight_one, Path.symm_symm]
 #align path.delay_refl_left_one Path.delayReflLeft_one
 
-/-- The loop space at x carries a structure of an `H-space`. Note that the field `eHmul`
+/-- The loop space at x carries a structure of an H-space. Note that the field `eHmul`
 (resp. `hmulE`) neither implies nor is implied by `Path.Homotopy.reflTrans`
 (resp. `Path.Homotopy.transRefl`).
 -/
fix: let use provide last constructor argument, introduce mathlib3-like flattening use! (#5350)

Changes:

  • use now by default discharges with try with_reducible use_discharger with a custom discharger tactic rather than try with_reducible rfl, which makes it be closer to exists and the use in mathlib3. It doesn't go so far as to do try with_reducible trivial since that involves the contradiction tactic.
  • this discharger is configurable with use (discharger := tacticSeq...)
  • the use evaluation loop will try refining after constructor failure, so it can be used to fill in all arguments rather than all but the last, like in mathlib3 (closes #5072) but with the caveat that it only works so long as the last argument is not an inductive type (like Eq).
  • adds use!, which is nearly the same as the mathlib3 use and fills in constructor arguments along the nodes and leaves of the nested constructor expressions. This version tries refining before applying constructors, so it can be used like exact for the last argument.

The difference between mathlib3 use and this use! is that (1) use! uses a different tactic to discharge goals (mathlib3 used trivial', which did reducible refl, but also contradiction, which we don't emulate) (2) it does not rewrite using exists_prop. Regarding 2, this feature seems to be less useful now that bounded existentials encode the bound using a conjunction rather than with nested existentials. We do have exists_prop as part of use_discharger however.

Co-authored-by: Floris van Doorn <fpvdoorn@gmail.com>

Diff
@@ -95,8 +95,7 @@ instance HSpace.prod (X : Type u) (Y : Type v) [TopologicalSpace X] [Topological
             (continuous_fst.prod_mk (continuous_fst.comp continuous_snd))).prod_mk
         (Continuous.comp HSpace.eHmul.1.1.2
           (continuous_fst.prod_mk (continuous_snd.comp continuous_snd)))
-    -- porting note: was `use ⟨G, hG⟩`
-    refine ⟨⟨⟨G, hG⟩, ?_, ?_⟩, ?_⟩
+    use! ⟨G, hG⟩
     · rintro ⟨x, y⟩
       exacts [Prod.mk.inj_iff.mpr ⟨HSpace.eHmul.1.2 x, HSpace.eHmul.1.2 y⟩]
     · rintro ⟨x, y⟩
@@ -115,8 +114,7 @@ instance HSpace.prod (X : Type u) (Y : Type v) [TopologicalSpace X] [Topological
             (continuous_fst.prod_mk (continuous_fst.comp continuous_snd))).prod_mk
         (Continuous.comp HSpace.hmulE.1.1.2
           (continuous_fst.prod_mk (continuous_snd.comp continuous_snd)))
-    -- porting note: was `use ⟨G, hG⟩`
-    refine ⟨⟨⟨G, hG⟩, ?_, ?_⟩, ?_⟩
+    use! ⟨G, hG⟩
     · rintro ⟨x, y⟩
       exacts [Prod.mk.inj_iff.mpr ⟨HSpace.hmulE.1.2 x, HSpace.hmulE.1.2 y⟩]
     · rintro ⟨x, y⟩
chore: script to replace headers with #align_import statements (#5979)

Open in Gitpod

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

Diff
@@ -2,15 +2,12 @@
 Copyright (c) 2022 Filippo A. E. Nuccio Mortarino Majno di Capriglio. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Filippo A. E. Nuccio, Junyan Xu
-
-! This file was ported from Lean 3 source module topology.homotopy.H_spaces
-! leanprover-community/mathlib commit 729d23f9e1640e1687141be89b106d3c8f9d10c0
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
 -/
 import Mathlib.Topology.CompactOpen
 import Mathlib.Topology.Homotopy.Path
 
+#align_import topology.homotopy.H_spaces from "leanprover-community/mathlib"@"729d23f9e1640e1687141be89b106d3c8f9d10c0"
+
 /-!
 # H-spaces
 
chore: fix grammar in docs (#5668)
Diff
@@ -73,7 +73,7 @@ class HSpace (X : Type u) [TopologicalSpace X] where
 #align H_space HSpace
 
 -- mathport name: H_space.Hmul
--- We use the notation `⋀`, typeset as \And, to denote the binary operation `hmul` on a H-space
+-- We use the notation `⋀`, typeset as \And, to denote the binary operation `hmul` on an H-space
 scoped[HSpaces] notation x "⋀" y => HSpace.hmul (x, y)
 
 -- porting note: opening `HSpaces` so that the above notation works
@@ -286,7 +286,7 @@ theorem delayReflLeft_one (γ : Path x y) : delayReflLeft 1 γ = γ := by
   simp only [delayReflLeft, delayReflRight_one, Path.symm_symm]
 #align path.delay_refl_left_one Path.delayReflLeft_one
 
-/-- The loop space at x carries a structure of a `H-space`. Note that the field `eHmul`
+/-- The loop space at x carries a structure of an `H-space`. Note that the field `eHmul`
 (resp. `hmulE`) neither implies nor is implied by `Path.Homotopy.reflTrans`
 (resp. `Path.Homotopy.transRefl`).
 -/
chore: fix grammar 3/3 (#5003)

Part 3 of #5001

Diff
@@ -37,7 +37,7 @@ equal to the product of `H-space` structures on `G` and `G'`.
 
 ## To Do
 * Prove that for every `normed_add_torsor Z` and every `z : Z`, the operation
-`λ x y, midpoint x y` defines a `H-space` structure with `z` as a "neutral element".
+`λ x y, midpoint x y` defines an `H-space` structure with `z` as a "neutral element".
 * Prove that `S^0`, `S^1`, `S^3` and `S^7` are the unique spheres that are `H-spaces`, where the
 first three inherit the structure because they are topological groups (they are Lie groups,
 actually), isomorphic to the invertible elements in `ℤ`, in `ℂ` and in the quaternion; and the
chore: fix many typos (#4967)

These are all doc fixes

Diff
@@ -15,7 +15,7 @@ import Mathlib.Topology.Homotopy.Path
 # H-spaces
 
 This file defines H-spaces mainly following the approach proposed by Serre in his paper
-*Homologie singulière des espaces fibrés*. The idea beaneath `H-spaces` is that they are topological
+*Homologie singulière des espaces fibrés*. The idea beneath `H-spaces` is that they are topological
 spaces with a binary operation `⋀ : X → X → X` that is a homotopic-theoretic weakening of an
 operation what would make `X` into a topological monoid. In particular, there exists a "neutral
 element" `e : X` such that `λ x, e ⋀ x` and `λ x, x ⋀ e` are homotopic to the identity on `X`, see
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
@@ -101,7 +101,7 @@ instance HSpace.prod (X : Type u) (Y : Type v) [TopologicalSpace X] [Topological
     -- porting note: was `use ⟨G, hG⟩`
     refine ⟨⟨⟨G, hG⟩, ?_, ?_⟩, ?_⟩
     · rintro ⟨x, y⟩
-      exacts[Prod.mk.inj_iff.mpr ⟨HSpace.eHmul.1.2 x, HSpace.eHmul.1.2 y⟩]
+      exacts [Prod.mk.inj_iff.mpr ⟨HSpace.eHmul.1.2 x, HSpace.eHmul.1.2 y⟩]
     · rintro ⟨x, y⟩
       exact Prod.mk.inj_iff.mpr ⟨HSpace.eHmul.1.3 x, HSpace.eHmul.1.3 y⟩
     · rintro t ⟨x, y⟩ h
@@ -121,7 +121,7 @@ instance HSpace.prod (X : Type u) (Y : Type v) [TopologicalSpace X] [Topological
     -- porting note: was `use ⟨G, hG⟩`
     refine ⟨⟨⟨G, hG⟩, ?_, ?_⟩, ?_⟩
     · rintro ⟨x, y⟩
-      exacts[Prod.mk.inj_iff.mpr ⟨HSpace.hmulE.1.2 x, HSpace.hmulE.1.2 y⟩]
+      exacts [Prod.mk.inj_iff.mpr ⟨HSpace.hmulE.1.2 x, HSpace.hmulE.1.2 y⟩]
     · rintro ⟨x, y⟩
       exact Prod.mk.inj_iff.mpr ⟨HSpace.hmulE.1.3 x, HSpace.hmulE.1.3 y⟩
     · rintro t ⟨x, y⟩ h
@@ -258,7 +258,7 @@ theorem delayReflRight_zero (γ : Path x y) : delayReflRight 0 γ = γ.trans (Pa
     refl_apply]
   split_ifs with h; swap; conv_rhs => rw [← γ.target]
   all_goals apply congr_arg γ; ext1; rw [qRight_zero_right]
-  exacts[if_neg h, if_pos h]
+  exacts [if_neg h, if_pos h]
 #align path.delay_refl_right_zero Path.delayReflRight_zero
 
 theorem delayReflRight_one (γ : Path x y) : delayReflRight 1 γ = γ := by
feat: port Topology.Homotopy.HSpaces (#4334)

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

Dependencies 10 + 561

562 files ported (98.3%)
243706 lines ported (97.9%)
Show graph

The unported dependencies are

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