Module docstring
{"# Topology on the quotient group
In this file we define topology on G ⧸ N, where N is a subgroup of G,
and prove basic properties of this topology.
"}
{"# Topology on the quotient group
In this file we define topology on G ⧸ N, where N is a subgroup of G,
and prove basic properties of this topology.
"}
QuotientGroup.instTopologicalSpace
      instance
     (N : Subgroup G) : TopologicalSpace (G ⧸ N)
        @[to_additive]
instance instTopologicalSpace (N : Subgroup G) : TopologicalSpace (G ⧸ N) :=
  instTopologicalSpaceQuotient
        QuotientGroup.instCompactSpaceQuotientSubgroup
      instance
     [CompactSpace G] (N : Subgroup G) : CompactSpace (G ⧸ N)
        @[to_additive]
instance [CompactSpace G] (N : Subgroup G) : CompactSpace (G ⧸ N) :=
  Quotient.compactSpace
        QuotientGroup.isQuotientMap_mk
      theorem
     (N : Subgroup G) : IsQuotientMap (mk : G → G ⧸ N)
        @[to_additive]
theorem isQuotientMap_mk (N : Subgroup G) : IsQuotientMap (mk : G → G ⧸ N) :=
  isQuotientMap_quot_mk
        QuotientGroup.continuous_mk
      theorem
     {N : Subgroup G} : Continuous (mk : G → G ⧸ N)
        @[to_additive (attr := continuity, fun_prop)]
theorem continuous_mk {N : Subgroup G} : Continuous (mk : G → G ⧸ N) :=
  continuous_quot_mk
        QuotientGroup.isOpenMap_coe
      theorem
     : IsOpenMap ((↑) : G → G ⧸ N)
        @[to_additive]
theorem isOpenMap_coe : IsOpenMap ((↑) : G → G ⧸ N) := isOpenMap_quotient_mk'_mul
        QuotientGroup.isOpenQuotientMap_mk
      theorem
     : IsOpenQuotientMap (mk : G → G ⧸ N)
        @[to_additive]
theorem isOpenQuotientMap_mk : IsOpenQuotientMap (mk : G → G ⧸ N) :=
  MulAction.isOpenQuotientMap_quotientMk
        QuotientGroup.dense_preimage_mk
      theorem
     {s : Set (G ⧸ N)} : Dense ((↑) ⁻¹' s : Set G) ↔ Dense s
        @[to_additive (attr := simp)]
theorem dense_preimage_mk {s : Set (G ⧸ N)} : DenseDense ((↑) ⁻¹' s : Set G) ↔ Dense s :=
  isOpenQuotientMap_mk.dense_preimage_iff
        QuotientGroup.dense_image_mk
      theorem
     {s : Set G} : Dense (mk '' s : Set (G ⧸ N)) ↔ Dense (s * (N : Set G))
        @[to_additive]
theorem dense_image_mk {s : Set G} :
    DenseDense (mk '' s : Set (G ⧸ N)) ↔ Dense (s * (N : Set G)) := by
  rw [← dense_preimage_mk, preimage_image_mk_eq_mul]
        QuotientGroup.instContinuousSMul
      instance
     : ContinuousSMul G (G ⧸ N)
        @[to_additive]
instance instContinuousSMul : ContinuousSMul G (G ⧸ N) where
  continuous_smul := by
    rw [← (IsOpenQuotientMap.id.prodMap isOpenQuotientMap_mk).continuous_comp_iff]
    exact continuous_mk.comp continuous_mul
        QuotientGroup.instContinuousConstSMul
      instance
     : ContinuousConstSMul G (G ⧸ N)
        @[to_additive]
instance instContinuousConstSMul : ContinuousConstSMul G (G ⧸ N) := inferInstance
        QuotientGroup.instLocallyCompactSpace
      instance
     [LocallyCompactSpace G] (N : Subgroup G) : LocallyCompactSpace (G ⧸ N)
        /-- A quotient of a locally compact group is locally compact. -/
@[to_additive]
instance instLocallyCompactSpace [LocallyCompactSpace G] (N : Subgroup G) :
    LocallyCompactSpace (G ⧸ N) :=
  QuotientGroup.isOpenQuotientMap_mk.locallyCompactSpace
        QuotientGroup.nhds_eq
      theorem
     (x : G) : 𝓝 (x : G ⧸ N) = Filter.map (↑) (𝓝 x)
        /-- Neighborhoods in the quotient are precisely the map of neighborhoods in the prequotient. -/
@[to_additive
  "Neighborhoods in the quotient are precisely the map of neighborhoods in the prequotient."]
theorem nhds_eq (x : G) : 𝓝 (x : G ⧸ N) = Filter.map (↑) (𝓝 x) :=
  (isOpenQuotientMap_mk.map_nhds_eq _).symm
        QuotientGroup.instFirstCountableTopology
      instance
     [FirstCountableTopology G] : FirstCountableTopology (G ⧸ N)
        @[to_additive]
instance instFirstCountableTopology [FirstCountableTopology G] :
    FirstCountableTopology (G ⧸ N) where
  nhds_generated_countable := mk_surjective.forall.2 fun x ↦ nhds_eq N x ▸ inferInstance
        QuotientGroup.instSecondCountableTopology
      instance
     [SecondCountableTopology G] : SecondCountableTopology (G ⧸ N)
        /-- The quotient of a second countable topological group by a subgroup is second countable. -/
@[to_additive
  "The quotient of a second countable additive topological group by a subgroup is second
  countable."]
instance instSecondCountableTopology [SecondCountableTopology G] :
    SecondCountableTopology (G ⧸ N) :=
  ContinuousConstSMul.secondCountableTopology
        QuotientGroup.instIsTopologicalGroup
      instance
     [N.Normal] : IsTopologicalGroup (G ⧸ N)
        @[to_additive]
instance instIsTopologicalGroup [N.Normal] : IsTopologicalGroup (G ⧸ N) where
  continuous_mul := by
    rw [← (isOpenQuotientMap_mk.prodMap isOpenQuotientMap_mk).continuous_comp_iff]
    exact continuous_mk.comp continuous_mul
  continuous_inv := continuous_inv.quotient_map' _
        QuotientGroup.isClosedMap_coe
      theorem
     {H : Subgroup G} (hH : IsCompact (H : Set G)) : IsClosedMap ((↑) : G → G ⧸ H)
        @[to_additive]
theorem isClosedMap_coe {H : Subgroup G} (hH : IsCompact (H : Set G)) :
    IsClosedMap ((↑) : G → G ⧸ H) := by
  intro t ht
  rw [← (isQuotientMap_mk H).isClosed_preimage, preimage_image_mk_eq_mul]
  exact ht.mul_right_of_isCompact hH
        QuotientGroup.instT3Space
      instance
     [N.Normal] [hN : IsClosed (N : Set G)] : T3Space (G ⧸ N)
        @[to_additive]
instance instT3Space [N.Normal] [hN : IsClosed (N : Set G)] : T3Space (G ⧸ N) := by
  rw [← QuotientGroup.ker_mk' N] at hN
  haveI := IsTopologicalGroup.t1Space (G ⧸ N) ((isQuotientMap_mk N).isClosed_preimage.mp hN)
  infer_instance