Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(Topology/Group/Profinite): Profinite group is limit of finite group #16992

Open
wants to merge 128 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
128 commits
Select commit Hold shift + click to select a range
fd67dad
Update ProfiniteGrp.lean
Thmoas-Guan Sep 20, 2024
0bfb53b
Update ProfiniteGrp.lean
Thmoas-Guan Sep 20, 2024
50972f4
Create ClosedSubgroup.lean
Thmoas-Guan Sep 20, 2024
f2c089d
Update ProfiniteGrp.lean
Thmoas-Guan Sep 20, 2024
93669a4
Update OpenSubgroup.lean
Thmoas-Guan Sep 20, 2024
9027a87
add continuous mul equiv
Thmoas-Guan Sep 20, 2024
9da7264
add a theorem to ProfiniteGrp
Thmoas-Guan Sep 20, 2024
45bf888
Update Mathlib.lean
Thmoas-Guan Sep 20, 2024
e971d2f
Merge branch 'closed-subgroup' into open-normal-subgroup-in-clopen-nhds
Thmoas-Guan Sep 20, 2024
56427be
Update OpenSubgroup.lean
Thmoas-Guan Sep 20, 2024
67ba1df
Update OpenSubgroup.lean
Thmoas-Guan Sep 20, 2024
c4b9518
basic class instances
Thmoas-Guan Sep 21, 2024
079f9c5
fix layout
Thmoas-Guan Sep 21, 2024
02a364a
coe instances
Thmoas-Guan Sep 21, 2024
542d202
bijective lemmas
Thmoas-Guan Sep 21, 2024
ef9411e
refl lemmas
Thmoas-Guan Sep 21, 2024
c82bbcf
fix simpNF
Thmoas-Guan Sep 21, 2024
d77dc44
fix simpNF
Thmoas-Guan Sep 21, 2024
6f7e223
Update ContinuousMonoidHom.lean
Thmoas-Guan Sep 21, 2024
b8c2c87
symm lemmas
Thmoas-Guan Sep 21, 2024
0833559
trans lemmas
Thmoas-Guan Sep 21, 2024
03da44f
Merge branch 'open-normal-subgroup-in-clopen-nhds' into profinite-gro…
Thmoas-Guan Sep 21, 2024
14f9a55
Merge branch 'continuous-isomorphism' into profinite-group-is-limit-o…
Thmoas-Guan Sep 21, 2024
fe7f7af
prove profinite group is limit finite
Thmoas-Guan Sep 21, 2024
ccdb4d3
refine notation
Thmoas-Guan Sep 21, 2024
71c477e
Merge branch 'continuous-isomorphism' into profinite-group-is-limit-o…
Thmoas-Guan Sep 21, 2024
ceeefd2
Update ClosedSubgroup.lean
Thmoas-Guan Sep 22, 2024
18aac9a
Update ClosedSubgroup.lean
Thmoas-Guan Sep 22, 2024
ca14e96
Update ClosedSubgroup.lean
Thmoas-Guan Sep 22, 2024
28d59db
Update ClosedSubgroup.lean
Thmoas-Guan Sep 22, 2024
81033f6
Merge branch 'closed-subgroup' into open-normal-subgroup-in-clopen-nhds
Thmoas-Guan Sep 22, 2024
22d99bc
Update OpenSubgroup.lean
Thmoas-Guan Sep 22, 2024
78b71f1
Merge branch 'open-normal-subgroup-in-clopen-nhds' into profinite-gro…
Thmoas-Guan Sep 22, 2024
3783f5c
move lemma
Thmoas-Guan Sep 22, 2024
30d6250
Merge branch 'closed-subgroup' into open-normal-subgroup-in-clopen-nhds
Thmoas-Guan Sep 22, 2024
da57225
Merge branch 'closed-subgroup' into profinite-group-is-limit-of-finit…
Thmoas-Guan Sep 22, 2024
4b5dadb
Update ContinuousMonoidHom.lean
Thmoas-Guan Sep 23, 2024
8d88664
add coe to Homeomorph
Thmoas-Guan Sep 23, 2024
9cddc2a
add unique
Thmoas-Guan Sep 23, 2024
6cf5cd8
add map
Thmoas-Guan Sep 23, 2024
33abf7b
Merge branch 'continuous-isomorphism' into profinite-group-is-limit-o…
Thmoas-Guan Sep 23, 2024
bfe6f4c
Update ProfiniteGrp.lean
Thmoas-Guan Sep 23, 2024
78944c0
add preserve limit
Thmoas-Guan Sep 23, 2024
b7c18ce
add abbrev
Thmoas-Guan Sep 23, 2024
ba54b28
Merge branch 'limit-in-profinite-group' into profinite-group-is-limit…
Thmoas-Guan Sep 23, 2024
58d7b26
fix with new def
Thmoas-Guan Sep 23, 2024
51c5052
Update ProfiniteGrp.lean
Thmoas-Guan Sep 23, 2024
d54457d
Merge branch 'limit-in-profinite-group' into profinite-group-is-limit…
Thmoas-Guan Sep 23, 2024
b323e47
Update ProfiniteGrp.lean
Thmoas-Guan Sep 23, 2024
2be680c
rearrange files
Thmoas-Guan Sep 23, 2024
a1af760
Update docstring
Thmoas-Guan Sep 23, 2024
752a6ff
Merge branch 'limit-in-profinite-group' into profinite-group-is-limit…
Thmoas-Guan Sep 23, 2024
ea005a1
rearrange files
Thmoas-Guan Sep 23, 2024
3c83d8e
Update Mathlib.lean
Thmoas-Guan Sep 23, 2024
6cc5643
refine layout
Thmoas-Guan Sep 24, 2024
e2954a6
Merge branch 'limit-in-profinite-group' into profinite-group-is-limit…
Thmoas-Guan Sep 24, 2024
9ca1b8c
refine docstring
Thmoas-Guan Sep 27, 2024
2de3b53
Merge branch 'limit-in-profinite-group' into profinite-group-is-limit…
Thmoas-Guan Sep 27, 2024
129006c
add todo
dagurtomas Sep 27, 2024
d0b2840
refine proof
Thmoas-Guan Sep 28, 2024
160e25f
Merge branch 'limit-in-profinite-group' into profinite-group-is-limit…
Thmoas-Guan Sep 29, 2024
d237a57
Merge branch 'master' into profinite-group-is-limit-of-finite-group
Thmoas-Guan Sep 29, 2024
7699ae8
Merge remote-tracking branch 'upstream/master' into open-normal-subgroup
Thmoas-Guan Sep 29, 2024
d0fefb0
Merge remote-tracking branch 'upstream/master' into continuous-isomor…
Thmoas-Guan Sep 29, 2024
5e90673
Merge remote-tracking branch 'upstream/master' into open-normal-subgr…
Thmoas-Guan Sep 29, 2024
6a1a275
fix naming
Thmoas-Guan Sep 29, 2024
e6c4be7
Merge branch 'open-normal-subgroup-in-clopen-nhds' into profinite-gro…
Thmoas-Guan Sep 29, 2024
4368cd6
fix layout
Thmoas-Guan Sep 29, 2024
2698377
Merge branch 'open-normal-subgroup' into open-normal-subgroup-in-clop…
Thmoas-Guan Sep 29, 2024
70b5805
Merge branch 'open-normal-subgroup-in-clopen-nhds' into profinite-gro…
Thmoas-Guan Sep 29, 2024
fbdf631
Merge branch 'master' into continuous-isomorphism
Thmoas-Guan Sep 29, 2024
950ea17
Merge branch 'master' into profinite-group-is-limit-of-finite-group
Thmoas-Guan Sep 29, 2024
a3b5ea3
Merge branch 'master' into open-normal-subgroup-in-clopen-nhds
Thmoas-Guan Sep 29, 2024
bd2212b
Merge branch 'master' into continuous-isomorphism
Thmoas-Guan Oct 1, 2024
dc64612
Merge branch 'master' into profinite-group-is-limit-of-finite-group
Thmoas-Guan Oct 1, 2024
91e47ca
fix lemmas with new definition
Thmoas-Guan Oct 1, 2024
1ff2e92
Merge branch 'continuous-isomorphism' into profinite-group-is-limit-o…
Thmoas-Guan Oct 1, 2024
3d0d5a7
Merge branch 'master' into profinite-group-is-limit-of-finite-group
Thmoas-Guan Oct 4, 2024
a1dcf48
Merge branch 'master' into open-normal-subgroup-in-clopen-nhds
Thmoas-Guan Oct 4, 2024
4c93d2b
fix import problem
Thmoas-Guan Oct 14, 2024
1539108
create ClopenNhdofOne.lean
Thmoas-Guan Oct 14, 2024
4738bb1
Merge branch 'open-normal-subgroup-in-clopen-nhds' into profinite-gro…
Thmoas-Guan Oct 14, 2024
b5fce9b
fix import with new arrangement
Thmoas-Guan Oct 14, 2024
f62e7fc
fix docstring
Thmoas-Guan Oct 17, 2024
0e63833
fix docstring
Thmoas-Guan Oct 17, 2024
9e563a0
Update OpenSubgroup.lean
Thmoas-Guan Oct 18, 2024
b44ef59
Merge remote-tracking branch 'upstream/Infinite-Galois-Theory-New-Bas…
Thmoas-Guan Oct 18, 2024
a255eda
Merge remote-tracking branch 'upstream/Infinite-Galois-Theory-New-New…
Thmoas-Guan Oct 19, 2024
3f41bd1
fix lemmas with new definitions
Thmoas-Guan Oct 19, 2024
15d439b
Merge remote-tracking branch 'upstream/Infinite-Galois-Theory-New-New…
Thmoas-Guan Oct 19, 2024
c090878
Merge branch 'continuous-isomorphism' into profinite-group-is-limit-o…
Thmoas-Guan Oct 19, 2024
6f50182
Merge remote-tracking branch 'upstream/master' into continuous-isomor…
Thmoas-Guan Oct 21, 2024
2bbaa26
fix theorems with new definition
Thmoas-Guan Oct 21, 2024
8738881
Merge remote-tracking branch 'upstream/master' into continuous-isomor…
Thmoas-Guan Oct 21, 2024
4e24e49
Merge branch 'continuous-isomorphism' into profinite-group-is-limit-o…
Thmoas-Guan Oct 21, 2024
b1f3d14
Merge remote-tracking branch 'upstream/Infinite-Galois-Theory-New-Bas…
Thmoas-Guan Oct 23, 2024
0b49c65
add instance
Thmoas-Guan Oct 26, 2024
9aadcb4
Merge branch 'open-normal-subgroup-in-clopen-nhds' into profinite-gro…
Thmoas-Guan Oct 26, 2024
be1ac05
fix instance
Thmoas-Guan Oct 26, 2024
83ab8ed
Merge branch 'open-normal-subgroup-in-clopen-nhds' into profinite-gro…
Thmoas-Guan Oct 26, 2024
7fd971c
fix def
Thmoas-Guan Oct 26, 2024
070f392
Merge branch 'open-normal-subgroup-in-clopen-nhds' into profinite-gro…
Thmoas-Guan Oct 26, 2024
a1fa303
move lemma
Thmoas-Guan Oct 27, 2024
f46e204
Merge branch 'open-normal-subgroup-in-clopen-nhds' into profinite-gro…
Thmoas-Guan Oct 27, 2024
510506d
refine proof with induction
Thmoas-Guan Oct 29, 2024
cde653a
Merge branch 'open-normal-subgroup-in-clopen-nhds' into profinite-gro…
Thmoas-Guan Oct 29, 2024
f0a504c
add missing docstring
Thmoas-Guan Oct 29, 2024
5a70645
Merge branch 'open-normal-subgroup-in-clopen-nhds' into profinite-gro…
Thmoas-Guan Oct 29, 2024
a9e4584
fix proof with new definition
Thmoas-Guan Oct 29, 2024
a028fb6
prove every clopen nhd of one contain an open subgroup
Thmoas-Guan Oct 29, 2024
5c5a4d3
Merge branch 'open-normal-subgroup-in-clopen-nhds-of-one' into profin…
Thmoas-Guan Oct 29, 2024
82966d3
Merge remote-tracking branch 'upstream/master' into continuous-isomor…
Thmoas-Guan Oct 29, 2024
e772471
fix lemmas with new definitions
Thmoas-Guan Oct 29, 2024
cfc7818
Merge branch 'continuous-isomorphism' into profinite-group-is-limit-o…
Thmoas-Guan Oct 29, 2024
77353bc
Merge remote-tracking branch 'upstream/master' into open-normal-subgr…
Thmoas-Guan Oct 29, 2024
c3e6b8f
restate lemma with existence
Thmoas-Guan Oct 30, 2024
6cbb225
Merge branch 'open-normal-subgroup-in-clopen-nhds-of-one' into profin…
Thmoas-Guan Oct 30, 2024
0b6636b
fix proofs with new definition
Thmoas-Guan Oct 30, 2024
ac49c16
fix layout
Thmoas-Guan Oct 30, 2024
7bc46ad
update docstring
Thmoas-Guan Oct 30, 2024
95e4a73
remove terminal simp only
Thmoas-Guan Oct 30, 2024
e882944
update docstring
Thmoas-Guan Oct 30, 2024
0b4fd00
Merge branch 'open-normal-subgroup-in-clopen-nhds-of-one' into profin…
Thmoas-Guan Oct 30, 2024
3623826
fix proof with new lemma
Thmoas-Guan Oct 30, 2024
ea429f1
Merge remote-tracking branch 'upstream/master' into profinite-group-i…
Thmoas-Guan Oct 31, 2024
45d9435
Merge remote-tracking branch 'upstream/master' into continuous-isomor…
Thmoas-Guan Oct 31, 2024
f4ce0ca
fix lemma with new definitions
Thmoas-Guan Oct 31, 2024
3207622
Merge branch 'continuous-isomorphism' into profinite-group-is-limit-o…
Thmoas-Guan Oct 31, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Mathlib.lean
Original file line number Diff line number Diff line change
Expand Up @@ -4622,6 +4622,7 @@ import Mathlib.Topology.Algebra.Affine
import Mathlib.Topology.Algebra.Algebra
import Mathlib.Topology.Algebra.Algebra.Rat
import Mathlib.Topology.Algebra.Category.ProfiniteGrp.Basic
import Mathlib.Topology.Algebra.Category.ProfiniteGrp.Limits
import Mathlib.Topology.Algebra.ClopenNhdofOne
import Mathlib.Topology.Algebra.ClosedSubgroup
import Mathlib.Topology.Algebra.ConstMulAction
Expand Down
7 changes: 7 additions & 0 deletions Mathlib/Algebra/Group/Subgroup/Basic.lean
Original file line number Diff line number Diff line change
Expand Up @@ -2226,6 +2226,13 @@ theorem inf_subgroupOf_inf_normal_of_left {A' A : Subgroup G} (B : Subgroup G) (
instance normal_inf_normal (H K : Subgroup G) [hH : H.Normal] [hK : K.Normal] : (H ⊓ K).Normal :=
⟨fun n hmem g => ⟨hH.conj_mem n hmem.1 g, hK.conj_mem n hmem.2 g⟩⟩

@[to_additive]
theorem normal_iInf_normal {ι G : Type*} [Group G] {a : ι → Subgroup G}
(norm : ∀ i : ι , (a i).Normal) : (iInf a).Normal := ⟨
fun g g_in_iInf h => by
rw [Subgroup.mem_iInf] at *
exact fun i => (norm i).conj_mem g (g_in_iInf i) h⟩

@[to_additive]
theorem subgroupOf_sup (A A' B : Subgroup G) (hA : A ≤ B) (hA' : A' ≤ B) :
(A ⊔ A').subgroupOf B = A.subgroupOf B ⊔ A'.subgroupOf B := by
Expand Down
8 changes: 8 additions & 0 deletions Mathlib/Topology/Algebra/Category/ProfiniteGrp/Basic.lean
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,14 @@ def ofClosedSubgroup {G : ProfiniteGrp} (H : ClosedSubgroup G) : ProfiniteGrp :
letI : CompactSpace H := inferInstance
of H.1

/-- A topological group that has a ContinuousMulEquiv to a profinite group is profinite. -/
def ofContinuousMulEquivProfiniteGrp {G : ProfiniteGrp.{u}} {H : Type v} [TopologicalSpace H]
[Group H] [TopologicalGroup H] (e : G ≃ₜ* H) : ProfiniteGrp.{v} :=
letI : CompactSpace H := Homeomorph.compactSpace e.toHomeomorph
letI : TotallyDisconnectedSpace G := Profinite.instTotallyDisconnectedSpaceαTopologicalSpaceToTop
letI : TotallyDisconnectedSpace H := Homeomorph.totallyDisconnectedSpace e.toHomeomorph
.of H

/-- The functor mapping a profinite group to its underlying profinite space. -/
def profiniteGrpToProfinite : ProfiniteGrp ⥤ Profinite where
obj G := G.toProfinite
Expand Down
143 changes: 143 additions & 0 deletions Mathlib/Topology/Algebra/Category/ProfiniteGrp/Limits.lean
Original file line number Diff line number Diff line change
@@ -0,0 +1,143 @@
/-
Copyright (c) 2024 Jujian Zhang. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Jujian Zhang, Nailin Guan, Youle Fang, Yuyang Zhao
-/
import Mathlib.Topology.Algebra.Category.ProfiniteGrp.Basic
import Mathlib.Topology.Algebra.ClopenNhdofOne

/-!
# A profinite group is the projective limit of finite groups
In a profinite group `P` :
* `QuotientOpenNormalSubgroup` : The functor that maps open normal subgroup of `P` to
the quotient group of it (which is finite, as shown by previous lemmas).

* `CanonicalQuotientMap` : The continuous homomorphism from `P` to the limit of the quotient group
of open normal subgroup ordered by inclusion of the open normal subgroup.

* `canonicalQuotientMap_surjective` : The `CanonicalQuotientMap` is surjective, proven by
demonstrating that its range is dense and closed.

* `OpenNormalSubgroupSubClopenNhdsOfOne` : For any open neighborhood of `1` there is an
open normal subgroup contained within it.

* `canonicalQuotientMap_injective` : The `CanonicalQuotientMap` is injective. This is proven by
showing that for any element not equal to one, the image of it on the coordinate of
the open normal subgroup that doesn't contain it is not equal to 1, thus not in the kernel.

* `ContinuousMulEquivLimitQuotientOpenNormalSubgroup` : The `CanonicalQuotientMap` can serve as a
`ContinuousMulEquiv`, with the continuity of other side given by
`Continuous.homeoOfEquivCompactToT2`.

-/

universe u

open CategoryTheory Topology TopologicalGroup

namespace ProfiniteGrp

theorem exist_openNormalSubgroup_sub_open_nhd_of_one {G : Type*} [Group G] [TopologicalSpace G]
[TopologicalGroup G] [CompactSpace G] [TotallyDisconnectedSpace G] {U : Set G}
(UOpen : IsOpen U) (einU : 1 ∈ U) : ∃ H : OpenNormalSubgroup G, (H : Set G) ⊆ U := by
rcases ((Filter.HasBasis.mem_iff' ((nhds_basis_clopen (1 : G))) U ).mp <|
mem_nhds_iff.mpr (by use U)) with ⟨W, hW, h⟩
rcases exist_openNormalSubgroup_sub_clopen_nhd_of_one hW.2 hW.1 with ⟨H, hH⟩
exact ⟨H, fun _ a ↦ h (hH a)⟩

section

instance (P : ProfiniteGrp) : SmallCategory (OpenNormalSubgroup P) :=
Preorder.smallCategory (OpenNormalSubgroup ↑P.toProfinite.toTop)

/-- Define the functor from OpenNormalSubgroup of a profinite group to the quotient group of it as
a `FiniteGrp` -/
def QuotientOpenNormalSubgroup (P : ProfiniteGrp) :
OpenNormalSubgroup P ⥤ FiniteGrp := {
obj := fun H => FiniteGrp.of (P ⧸ H.toSubgroup)
map := fun {H K} fHK => QuotientGroup.map H.toSubgroup K.toSubgroup (.id _) <|
Subgroup.comap_id (N := P) K ▸ leOfHom fHK
map_id := fun H => by
simp only [QuotientGroup.map_id]
rfl
map_comp := fun {X Y Z} f g => (QuotientGroup.map_comp_map
X.toSubgroup Y.toSubgroup Z.toSubgroup (.id _) (.id _)
(Subgroup.comap_id Y.toSubgroup ▸ leOfHom f)
(Subgroup.comap_id Z.toSubgroup ▸ leOfHom g)).symm }

/-- Defining the canonical projection from a profinite group to the limit of the quotient groups
as a subgroup of the product space -/
def CanonicalQuotientMap (P : ProfiniteGrp.{u}) : P ⟶
limit ((QuotientOpenNormalSubgroup P) ⋙ (forget₂ FiniteGrp ProfiniteGrp)) where
toFun := fun p => { val := fun H => QuotientGroup.mk p
property := fun _ => rfl }
map_one' := Subtype.val_inj.mp (by ext H; rfl)
map_mul' := fun x y => Subtype.val_inj.mp (by ext H; rfl)
continuous_toFun := continuous_induced_rng.mpr (continuous_pi fun H ↦ by
dsimp
apply Continuous.mk
intro s _
rw [← (Set.biUnion_preimage_singleton QuotientGroup.mk s)]
refine isOpen_iUnion (fun i ↦ isOpen_iUnion (fun _ ↦ ?_))
convert IsOpen.leftCoset H.toOpenSubgroup.isOpen' (Quotient.out' i)
ext x
simp only [Set.mem_preimage, Set.mem_singleton_iff]
nth_rw 1 [← QuotientGroup.out_eq' i, eq_comm, QuotientGroup.eq]
symm
apply Set.mem_smul_set_iff_inv_smul_mem )

theorem canonicalQuotientMap_dense (P : ProfiniteGrp.{u}) : Dense <|
Set.range (CanonicalQuotientMap P) :=
dense_iff_inter_open.mpr
fun U ⟨s, hsO, hsv⟩ ⟨⟨spc, hspc⟩, uDefaultSpec⟩ => (by
simp_rw [← hsv, Set.mem_preimage] at uDefaultSpec
rcases (isOpen_pi_iff.mp hsO) _ uDefaultSpec with ⟨J, fJ, hJ1, hJ2⟩
let M := iInf (fun (j : J) => j.1.1.1)
haveI hM : M.Normal := Subgroup.normal_iInf_normal fun j => j.1.isNormal'
haveI hMOpen : IsOpen (M : Set P) := by
rw [Subgroup.coe_iInf]
exact isOpen_iInter_of_finite fun i => i.1.1.isOpen'
let m : OpenNormalSubgroup P := { M with isOpen' := hMOpen }
rcases QuotientGroup.mk'_surjective M (spc m) with ⟨origin, horigin⟩
use (CanonicalQuotientMap P).toFun origin
refine ⟨?_, ⟨origin, rfl⟩⟩
rw [← hsv]
apply hJ2
intro a a_in_J
let M_to_Na : m ⟶ a := (iInf_le (fun (j : J) => j.1.1.1) ⟨a, a_in_J⟩).hom
rw [← (P.CanonicalQuotientMap.toFun origin).property M_to_Na]
show (P.QuotientOpenNormalSubgroup.map M_to_Na) (QuotientGroup.mk' M origin) ∈ _
rw [horigin]
exact Set.mem_of_eq_of_mem (hspc M_to_Na) (hJ1 a a_in_J).2 )

theorem canonicalQuotientMap_surjective (P : ProfiniteGrp.{u}) :
Function.Surjective (CanonicalQuotientMap P) := by
have : IsClosedMap P.CanonicalQuotientMap := P.CanonicalQuotientMap.continuous_toFun.isClosedMap
haveI compact_s: IsCompact (Set.univ : Set P) := CompactSpace.isCompact_univ
have : IsClosed (P.CanonicalQuotientMap '' Set.univ) := this _ <| IsCompact.isClosed compact_s
apply closure_eq_iff_isClosed.mpr at this
rw [Set.image_univ, Dense.closure_eq <| canonicalQuotientMap_dense P] at this
exact Set.range_iff_surjective.mp (id this.symm)

theorem canonicalQuotientMap_injective (P : ProfiniteGrp.{u}) :
Function.Injective (CanonicalQuotientMap P) := by
show Function.Injective (CanonicalQuotientMap P).toMonoidHom
rw [← MonoidHom.ker_eq_bot_iff, Subgroup.eq_bot_iff_forall]
intro x h
by_contra xne1
rcases exist_openNormalSubgroup_sub_open_nhd_of_one (isOpen_compl_singleton)
(Set.mem_compl_singleton_iff.mpr fun a => xne1 a.symm) with ⟨H, hH⟩
exact hH ((QuotientGroup.eq_one_iff x).mp (congrFun (Subtype.val_inj.mpr h) H)) rfl

/-- Make the equivilence into a ContinuousMulEquiv -/
noncomputable def ContinuousMulEquivLimitQuotientOpenNormalSubgroup (P : ProfiniteGrp.{u}) :
P ≃ₜ* (limit ((QuotientOpenNormalSubgroup P) ⋙ (forget₂ FiniteGrp ProfiniteGrp))) := {
(Continuous.homeoOfEquivCompactToT2
(f := Equiv.ofBijective _ ⟨canonicalQuotientMap_injective P, canonicalQuotientMap_surjective P⟩)
P.CanonicalQuotientMap.continuous_toFun)
with
map_mul' := (CanonicalQuotientMap P).map_mul' }

end

end ProfiniteGrp
Loading