l3lab/ntp-mathlib huggingface dataset:
/-- The (topological-space) closure of a subgroup of a topological group is
itself a subgroup. -/
@[to_additive
  "The (topological-space) closure of an additive subgroup of an additive topological group is
  itself an additive subgroup."]
def Subgroup.topologicalClosure (s : Subgroup G) : Subgroup G :=
  { s.toSubmonoid.topologicalClosure with
    carrier := _root_.closure (s : Set G)
    inv_mem' := fun {g} hg => by 

Proof state:
G : Type w
H : Type x
α : Type u
β : Type v
inst✝³ : TopologicalSpace G
inst✝² : Group G
inst✝¹ : TopologicalGroup G
inst✝ : TopologicalSpace α
f : α → G
s✝ : Set α
x : α
s : Subgroup G
src✝ : Submonoid G := Submonoid.topologicalClosure s.toSubmonoid
g : G
hg :
  g ∈
    {
          toSubsemigroup :=
            { carrier := _root_.closure ↑s,
              mul_mem' := (_ : ∀ {a b : G}, a ∈ src✝.carrier → b ∈ src✝.carrier → a * b ∈ src✝.carrier) },
          one_mem' := (_ : 1 ∈ src✝.carrier) }.toSubsemigroup.carrier
⊢ g⁻¹ ∈
    {
          toSubsemigroup :=
            { carrier := _root_.closure ↑s,
              mul_mem' := (_ : ∀ {a b : G}, a ∈ src✝.carrier → b ∈ src✝.carrier → a * b ∈ src✝.carrier) },
          one_mem' := (_ : 1 ∈ src✝.carrier) }.toSubsemigroup.carrier

Next tactic:
simpa only [← Set.mem_inv, inv_closure, inv_coe_set] using hg
@[to_additive]
theorem DenseRange.topologicalClosure_map_subgroup [Group H] [TopologicalSpace H]
    [TopologicalGroup H] {f : G →* H} (hf : Continuous f) (hf' : DenseRange f) {s : Subgroup G}
    (hs : s.topologicalClosure = ⊤) : (s.map f).topologicalClosure = ⊤ := by
  

Proof state:
G : Type w
H : Type x
α : Type u
β : Type v
inst✝⁶ : TopologicalSpace G
inst✝⁵ : Group G
inst✝⁴ : TopologicalGroup G
inst✝³ : TopologicalSpace α
f✝ : α → G
s✝ : Set α
x : α
inst✝² : Group H
inst✝¹ : TopologicalSpace H
inst✝ : TopologicalGroup H
f : G →* H
hf : Continuous ⇑f
hf' : DenseRange ⇑f
s : Subgroup G
hs : Subgroup.topologicalClosure s = ⊤
⊢ Subgroup.topologicalClosure (Subgroup.map f s) = ⊤

Next tactic:
rw [SetLike.ext'_iff] at hs ⊢
@[to_additive]
theorem DenseRange.topologicalClosure_map_subgroup [Group H] [TopologicalSpace H]
    [TopologicalGroup H] {f : G →* H} (hf : Continuous f) (hf' : DenseRange f) {s : Subgroup G}
    (hs : s.topologicalClosure = ⊤) : (s.map f).topologicalClosure = ⊤ := by
  rw [SetLike.ext'_iff] at hs ⊢
  

Proof state:
G : Type w
H : Type x
α : Type u
β : Type v
inst✝⁶ : TopologicalSpace G
inst✝⁵ : Group G
inst✝⁴ : TopologicalGroup G
inst✝³ : TopologicalSpace α
f✝ : α → G
s✝ : Set α
x : α
inst✝² : Group H
inst✝¹ : TopologicalSpace H
inst✝ : TopologicalGroup H
f : G →* H
hf : Continuous ⇑f
hf' : DenseRange ⇑f
s : Subgroup G
hs : ↑(Subgroup.topologicalClosure s) = ↑⊤
⊢ ↑(Subgroup.topologicalClosure (Subgroup.map f s)) = ↑⊤

Next tactic:
simp only [Subgroup.topologicalClosure_coe, Subgroup.coe_top, ← dense_iff_closure_eq] at hs ⊢
@[to_additive]
theorem DenseRange.topologicalClosure_map_subgroup [Group H] [TopologicalSpace H]
    [TopologicalGroup H] {f : G →* H} (hf : Continuous f) (hf' : DenseRange f) {s : Subgroup G}
    (hs : s.topologicalClosure = ⊤) : (s.map f).topologicalClosure = ⊤ := by
  rw [SetLike.ext'_iff] at hs ⊢
  simp only [Subgroup.topologicalClosure_coe, Subgroup.coe_top, ← dense_iff_closure_eq] at hs ⊢
  

Proof state:
G : Type w
H : Type x
α : Type u
β : Type v
inst✝⁶ : TopologicalSpace G
inst✝⁵ : Group G
inst✝⁴ : TopologicalGroup G
inst✝³ : TopologicalSpace α
f✝ : α → G
s✝ : Set α
x : α
inst✝² : Group H
inst✝¹ : TopologicalSpace H
inst✝ : TopologicalGroup H
f : G →* H
hf : Continuous ⇑f
hf' : DenseRange ⇑f
s : Subgroup G
hs : Dense ↑s
⊢ Dense ↑(Subgroup.map f s)

Next tactic:
exact hf'.dense_image hf hs
/-- The topological closure of a normal subgroup is normal.-/
@[to_additive "The topological closure of a normal additive subgroup is normal."]
theorem Subgroup.is_normal_topologicalClosure {G : Type*} [TopologicalSpace G] [Group G]
    [TopologicalGroup G] (N : Subgroup G) [N.Normal] : (Subgroup.topologicalClosure N).Normal where
  conj_mem n hn g := by
    

Proof state:
G✝ : Type w
H : Type x
α : Type u
β : Type v
inst✝⁷ : TopologicalSpace G✝
inst✝⁶ : Group G✝
inst✝⁵ : TopologicalGroup G✝
inst✝⁴ : TopologicalSpace α
f : α → G✝
s : Set α
x : α
G : Type u_1
inst✝³ : TopologicalSpace G
inst✝² : Group G
inst✝¹ : TopologicalGroup G
N : Subgroup G
inst✝ : Normal N
n : G
hn : n ∈ topologicalClosure N
g : G
⊢ g * n * g⁻¹ ∈ topologicalClosure N

Next tactic:
apply map_mem_closure (TopologicalGroup.continuous_conj g) hn
/-- The topological closure of a normal subgroup is normal.-/
@[to_additive "The topological closure of a normal additive subgroup is normal."]
theorem Subgroup.is_normal_topologicalClosure {G : Type*} [TopologicalSpace G] [Group G]
    [TopologicalGroup G] (N : Subgroup G) [N.Normal] : (Subgroup.topologicalClosure N).Normal where
  conj_mem n hn g := by
    apply map_mem_closure (TopologicalGroup.continuous_conj g) hn
    

Proof state:
G✝ : Type w
H : Type x
α : Type u
β : Type v
inst✝⁷ : TopologicalSpace G✝
inst✝⁶ : Group G✝
inst✝⁵ : TopologicalGroup G✝
inst✝⁴ : TopologicalSpace α
f : α → G✝
s : Set α
x : α
G : Type u_1
inst✝³ : TopologicalSpace G
inst✝² : Group G
inst✝¹ : TopologicalGroup G
N : Subgroup G
inst✝ : Normal N
n : G
hn : n ∈ topologicalClosure N
g : G
⊢ MapsTo (fun h => g * h * g⁻¹) ↑N ↑N

Next tactic:
exact fun m hm => Subgroup.Normal.conj_mem inferInstance m hm g
@[to_additive]
theorem mul_mem_connectedComponent_one {G : Type*} [TopologicalSpace G] [MulOneClass G]
    [ContinuousMul G] {g h : G} (hg : g ∈ connectedComponent (1 : G))
    (hh : h ∈ connectedComponent (1 : G)) : g * h ∈ connectedComponent (1 : G) := by
  

Proof state:
G✝ : Type w
H : Type x
α : Type u
β : Type v
inst✝⁶ : TopologicalSpace G✝
inst✝⁵ : Group G✝
inst✝⁴ : TopologicalGroup G✝
inst✝³ : TopologicalSpace α
f : α → G✝
s : Set α
x : α
G : Type u_1
inst✝² : TopologicalSpace G
inst✝¹ : MulOneClass G
inst✝ : ContinuousMul G
g h : G
hg : g ∈ connectedComponent 1
hh : h ∈ connectedComponent 1
⊢ g * h ∈ connectedComponent 1

Next tactic:
rw [connectedComponent_eq hg]
@[to_additive]
theorem mul_mem_connectedComponent_one {G : Type*} [TopologicalSpace G] [MulOneClass G]
    [ContinuousMul G] {g h : G} (hg : g ∈ connectedComponent (1 : G))
    (hh : h ∈ connectedComponent (1 : G)) : g * h ∈ connectedComponent (1 : G) := by
  rw [connectedComponent_eq hg]
  

Proof state:
G✝ : Type w
H : Type x
α : Type u
β : Type v
inst✝⁶ : TopologicalSpace G✝
inst✝⁵ : Group G✝
inst✝⁴ : TopologicalGroup G✝
inst✝³ : TopologicalSpace α
f : α → G✝
s : Set α
x : α
G : Type u_1
inst✝² : TopologicalSpace G
inst✝¹ : MulOneClass G
inst✝ : ContinuousMul G
g h : G
hg : g ∈ connectedComponent 1
hh : h ∈ connectedComponent 1
⊢ g * h ∈ connectedComponent g

Next tactic:
have hmul : g ∈ connectedComponent (g * h) := by
    apply Continuous.image_connectedComponent_subset (continuous_mul_left g)
    rw [← connectedComponent_eq hh]
    exact ⟨(1 : G), mem_connectedComponent, by simp only [mul_one]⟩
@[to_additive]
theorem mul_mem_connectedComponent_one {G : Type*} [TopologicalSpace G] [MulOneClass G]
    [ContinuousMul G] {g h : G} (hg : g ∈ connectedComponent (1 : G))
    (hh : h ∈ connectedComponent (1 : G)) : g * h ∈ connectedComponent (1 : G) := by
  rw [connectedComponent_eq hg]
  have hmul : g ∈ connectedComponent (g * h) := by
    

Proof state:
G✝ : Type w
H : Type x
α : Type u
β : Type v
inst✝⁶ : TopologicalSpace G✝
inst✝⁵ : Group G✝
inst✝⁴ : TopologicalGroup G✝
inst✝³ : TopologicalSpace α
f : α → G✝
s : Set α
x : α
G : Type u_1
inst✝² : TopologicalSpace G
inst✝¹ : MulOneClass G
inst✝ : ContinuousMul G
g h : G
hg : g ∈ connectedComponent 1
hh : h ∈ connectedComponent 1
⊢ g ∈ connectedComponent (g * h)

Next tactic:
apply Continuous.image_connectedComponent_subset (continuous_mul_left g)
@[to_additive]
theorem mul_mem_connectedComponent_one {G : Type*} [TopologicalSpace G] [MulOneClass G]
    [ContinuousMul G] {g h : G} (hg : g ∈ connectedComponent (1 : G))
    (hh : h ∈ connectedComponent (1 : G)) : g * h ∈ connectedComponent (1 : G) := by
  rw [connectedComponent_eq hg]
  have hmul : g ∈ connectedComponent (g * h) := by
    apply Continuous.image_connectedComponent_subset (continuous_mul_left g)
    

Proof state:
case a
G✝ : Type w
H : Type x
α : Type u
β : Type v
inst✝⁶ : TopologicalSpace G✝
inst✝⁵ : Group G✝
inst✝⁴ : TopologicalGroup G✝
inst✝³ : TopologicalSpace α
f : α → G✝
s : Set α
x : α
G : Type u_1
inst✝² : TopologicalSpace G
inst✝¹ : MulOneClass G
inst✝ : ContinuousMul G
g h : G
hg : g ∈ connectedComponent 1
hh : h ∈ connectedComponent 1
⊢ g ∈ (fun b => g * b) '' connectedComponent h

Next tactic:
rw [← connectedComponent_eq hh]
@[to_additive]
theorem mul_mem_connectedComponent_one {G : Type*} [TopologicalSpace G] [MulOneClass G]
    [ContinuousMul G] {g h : G} (hg : g ∈ connectedComponent (1 : G))
    (hh : h ∈ connectedComponent (1 : G)) : g * h ∈ connectedComponent (1 : G) := by
  rw [connectedComponent_eq hg]
  have hmul : g ∈ connectedComponent (g * h) := by
    apply Continuous.image_connectedComponent_subset (continuous_mul_left g)
    rw [← connectedComponent_eq hh]
    

Proof state:
case a
G✝ : Type w
H : Type x
α : Type u
β : Type v
inst✝⁶ : TopologicalSpace G✝
inst✝⁵ : Group G✝
inst✝⁴ : TopologicalGroup G✝
inst✝³ : TopologicalSpace α
f : α → G✝
s : Set α
x : α
G : Type u_1
inst✝² : TopologicalSpace G
inst✝¹ : MulOneClass G
inst✝ : ContinuousMul G
g h : G
hg : g ∈ connectedComponent 1
hh : h ∈ connectedComponent 1
⊢ g ∈ (fun b => g * b) '' connectedComponent 1

Next tactic:
exact ⟨(1 : G), mem_connectedComponent, by simp only [mul_one]⟩
@[to_additive]
theorem mul_mem_connectedComponent_one {G : Type*} [TopologicalSpace G] [MulOneClass G]
    [ContinuousMul G] {g h : G} (hg : g ∈ connectedComponent (1 : G))
    (hh : h ∈ connectedComponent (1 : G)) : g * h ∈ connectedComponent (1 : G) := by
  rw [connectedComponent_eq hg]
  have hmul : g ∈ connectedComponent (g * h) := by
    apply Continuous.image_connectedComponent_subset (continuous_mul_left g)
    rw [← connectedComponent_eq hh]
    exact ⟨(1 : G), mem_connectedComponent, by 

Proof state:
G✝ : Type w
H : Type x
α : Type u
β : Type v
inst✝⁶ : TopologicalSpace G✝
inst✝⁵ : Group G✝
inst✝⁴ : TopologicalGroup G✝
inst✝³ : TopologicalSpace α
f : α → G✝
s : Set α
x : α
G : Type u_1
inst✝² : TopologicalSpace G
inst✝¹ : MulOneClass G
inst✝ : ContinuousMul G
g h : G
hg : g ∈ connectedComponent 1
hh : h ∈ connectedComponent 1
⊢ (fun b => g * b) 1 = g

Next tactic:
simp only [mul_one]
@[to_additive]
theorem mul_mem_connectedComponent_one {G : Type*} [TopologicalSpace G] [MulOneClass G]
    [ContinuousMul G] {g h : G} (hg : g ∈ connectedComponent (1 : G))
    (hh : h ∈ connectedComponent (1 : G)) : g * h ∈ connectedComponent (1 : G) := by
  rw [connectedComponent_eq hg]
  have hmul : g ∈ connectedComponent (g * h) := by
    apply Continuous.image_connectedComponent_subset (continuous_mul_left g)
    rw [← connectedComponent_eq hh]
    exact ⟨(1 : G), mem_connectedComponent, by simp only [mul_one]⟩
  

Proof state:
G✝ : Type w
H : Type x
α : Type u
β : Type v
inst✝⁶ : TopologicalSpace G✝
inst✝⁵ : Group G✝
inst✝⁴ : TopologicalGroup G✝
inst✝³ : TopologicalSpace α
f : α → G✝
s : Set α
x : α
G : Type u_1
inst✝² : TopologicalSpace G
inst✝¹ : MulOneClass G
inst✝ : ContinuousMul G
g h : G
hg : g ∈ connectedComponent 1
hh : h ∈ connectedComponent 1
hmul : g ∈ connectedComponent (g * h)
⊢ g * h ∈ connectedComponent g

Next tactic:
simpa [← connectedComponent_eq hmul] using mem_connectedComponent
@[to_additive]
theorem inv_mem_connectedComponent_one {G : Type*} [TopologicalSpace G] [Group G]
    [TopologicalGroup G] {g : G} (hg : g ∈ connectedComponent (1 : G)) :
    g⁻¹ ∈ connectedComponent (1 : G) := by
  

Proof state:
G✝ : Type w
H : Type x
α : Type u
β : Type v
inst✝⁶ : TopologicalSpace G✝
inst✝⁵ : Group G✝
inst✝⁴ : TopologicalGroup G✝
inst✝³ : TopologicalSpace α
f : α → G✝
s : Set α
x : α
G : Type u_1
inst✝² : TopologicalSpace G
inst✝¹ : Group G
inst✝ : TopologicalGroup G
g : G
hg : g ∈ connectedComponent 1
⊢ g⁻¹ ∈ connectedComponent 1

Next tactic:
rw [← inv_one]
@[to_additive]
theorem inv_mem_connectedComponent_one {G : Type*} [TopologicalSpace G] [Group G]
    [TopologicalGroup G] {g : G} (hg : g ∈ connectedComponent (1 : G)) :
    g⁻¹ ∈ connectedComponent (1 : G) := by
  rw [← inv_one]
  

Proof state:
G✝ : Type w
H : Type x
α : Type u
β : Type v
inst✝⁶ : TopologicalSpace G✝
inst✝⁵ : Group G✝
inst✝⁴ : TopologicalGroup G✝
inst✝³ : TopologicalSpace α
f : α → G✝
s : Set α
x : α
G : Type u_1
inst✝² : TopologicalSpace G
inst✝¹ : Group G
inst✝ : TopologicalGroup G
g : G
hg : g ∈ connectedComponent 1
⊢ g⁻¹ ∈ connectedComponent 1⁻¹

Next tactic:
exact
    Continuous.image_connectedComponent_subset continuous_inv _
      ((Set.mem_image _ _ _).mp ⟨g, hg, rfl⟩)
variable (G) in
@[to_additive]
lemma Subgroup.coe_topologicalClosure_bot :
    ((⊥ : Subgroup G).topologicalClosure : Set G) = _root_.closure ({1} : Set G) := by 

Proof state:
G : Type w
H : Type x
α : Type u
β : Type v
inst✝³ : TopologicalSpace G
inst✝² : Group G
inst✝¹ : TopologicalGroup G
inst✝ : TopologicalSpace α
f : α → G
s : Set α
x : α
⊢ ↑(topologicalClosure ⊥) = _root_.closure {1}

Next tactic:
simp
@[to_additive exists_nhds_half_neg]
theorem exists_nhds_split_inv {s : Set G} (hs : s ∈ 𝓝 (1 : G)) :
    ∃ V ∈ 𝓝 (1 : G), ∀ v ∈ V, ∀ w ∈ V, v / w ∈ s := by
  

Proof state:
G : Type w
H : Type x
α : Type u
β : Type v
inst✝³ : TopologicalSpace G
inst✝² : Group G
inst✝¹ : TopologicalGroup G
inst✝ : TopologicalSpace α
f : α → G
s✝ : Set α
x : α
s : Set G
hs : s ∈ 𝓝 1
⊢ ∃ V ∈ 𝓝 1, ∀ v ∈ V, ∀ w ∈ V, v / w ∈ s

Next tactic:
have : (fun p : G × G => p.1 * p.2⁻¹) ⁻¹' s ∈ 𝓝 ((1, 1) : G × G) :=
    continuousAt_fst.mul continuousAt_snd.inv (by simpa)
@[to_additive exists_nhds_half_neg]
theorem exists_nhds_split_inv {s : Set G} (hs : s ∈ 𝓝 (1 : G)) :
    ∃ V ∈ 𝓝 (1 : G), ∀ v ∈ V, ∀ w ∈ V, v / w ∈ s := by
  have : (fun p : G × G => p.1 * p.2⁻¹) ⁻¹' s ∈ 𝓝 ((1, 1) : G × G) :=
    continuousAt_fst.mul continuousAt_snd.inv (by 

Proof state:
G : Type w
H : Type x
α : Type u
β : Type v
inst✝³ : TopologicalSpace G
inst✝² : Group G
inst✝¹ : TopologicalGroup G
inst✝ : TopologicalSpace α
f : α → G
s✝ : Set α
x : α
s : Set G
hs : s ∈ 𝓝 1
⊢ s ∈ 𝓝 ((fun x => x.1 * x.2⁻¹) (1, 1))

Next tactic:
simpa
@[to_additive exists_nhds_half_neg]
theorem exists_nhds_split_inv {s : Set G} (hs : s ∈ 𝓝 (1 : G)) :
    ∃ V ∈ 𝓝 (1 : G), ∀ v ∈ V, ∀ w ∈ V, v / w ∈ s := by
  have : (fun p : G × G => p.1 * p.2⁻¹) ⁻¹' s ∈ 𝓝 ((1, 1) : G × G) :=
    continuousAt_fst.mul continuousAt_snd.inv (by simpa)
  

Proof state:
G : Type w
H : Type x
α : Type u
β : Type v
inst✝³ : TopologicalSpace G
inst✝² : Group G
inst✝¹ : TopologicalGroup G
inst✝ : TopologicalSpace α
f : α → G
s✝ : Set α
x : α
s : Set G
hs : s ∈ 𝓝 1
this : (fun p => p.1 * p.2⁻¹) ⁻¹' s ∈ 𝓝 (1, 1)
⊢ ∃ V ∈ 𝓝 1, ∀ v ∈ V, ∀ w ∈ V, v / w ∈ s

Next tactic:
simpa only [div_eq_mul_inv, nhds_prod_eq, mem_prod_self_iff, prod_subset_iff, mem_preimage] using
    this
@[to_additive]
theorem nhds_translation_mul_inv (x : G) : comap (· * x⁻¹) (𝓝 1) = 𝓝 x :=
  ((Homeomorph.mulRight x⁻¹).comap_nhds_eq 1).trans <| show 𝓝 (1 * x⁻¹⁻¹) = 𝓝 x by 

Proof state:
G : Type w
H : Type x
α : Type u
β : Type v
inst✝³ : TopologicalSpace G
inst✝² : Group G
inst✝¹ : TopologicalGroup G
inst✝ : TopologicalSpace α
f : α → G
s : Set α
x✝ : α
x : G
⊢ 𝓝 (1 * x⁻¹⁻¹) = 𝓝 x

Next tactic:
simp
@[to_additive]
theorem map_mul_left_nhds_one (x : G) : map (x * ·) (𝓝 1) = 𝓝 x := by 

Proof state:
G : Type w
H : Type x
α : Type u
β : Type v
inst✝³ : TopologicalSpace G
inst✝² : Group G
inst✝¹ : TopologicalGroup G
inst✝ : TopologicalSpace α
f : α → G
s : Set α
x✝ : α
x : G
⊢ map (fun x_1 => x * x_1) (𝓝 1) = 𝓝 x

Next tactic:
simp
@[to_additive]
theorem map_mul_right_nhds_one (x : G) : map (· * x) (𝓝 1) = 𝓝 x := by 

Proof state:
G : Type w
H : Type x
α : Type u
β : Type v
inst✝³ : TopologicalSpace G
inst✝² : Group G
inst✝¹ : TopologicalGroup G
inst✝ : TopologicalSpace α
f : α → G
s : Set α
x✝ : α
x : G
⊢ map (fun x_1 => x_1 * x) (𝓝 1) = 𝓝 x

Next tactic:
simp
@[to_additive]
theorem Filter.HasBasis.nhds_of_one {ι : Sort*} {p : ι → Prop} {s : ι → Set G}
    (hb : HasBasis (𝓝 1 : Filter G) p s) (x : G) :
    HasBasis (𝓝 x) p fun i => { y | y / x ∈ s i } := by
  

Proof state:
G : Type w
H : Type x
α : Type u
β : Type v
inst✝³ : TopologicalSpace G
inst✝² : Group G
inst✝¹ : TopologicalGroup G
inst✝ : TopologicalSpace α
f : α → G
s✝ : Set α
x✝ : α
ι : Sort u_1
p : ι → Prop
s : ι → Set G
hb : HasBasis (𝓝 1) p s
x : G
⊢ HasBasis (𝓝 x) p fun i => {y | y / x ∈ s i}

Next tactic:
rw [← nhds_translation_mul_inv]
@[to_additive]
theorem Filter.HasBasis.nhds_of_one {ι : Sort*} {p : ι → Prop} {s : ι → Set G}
    (hb : HasBasis (𝓝 1 : Filter G) p s) (x : G) :
    HasBasis (𝓝 x) p fun i => { y | y / x ∈ s i } := by
  rw [← nhds_translation_mul_inv]
  

Proof state:
G : Type w
H : Type x
α : Type u
β : Type v
inst✝³ : TopologicalSpace G
inst✝² : Group G
inst✝¹ : TopologicalGroup G
inst✝ : TopologicalSpace α
f : α → G
s✝ : Set α
x✝ : α
ι : Sort u_1
p : ι → Prop
s : ι → Set G
hb : HasBasis (𝓝 1) p s
x : G
⊢ HasBasis (Filter.comap (fun x_1 => x_1 * x⁻¹) (𝓝 1)) p fun i => {y | y / x ∈ s i}

Next tactic:
simp_rw [div_eq_mul_inv]
@[to_additive]
theorem Filter.HasBasis.nhds_of_one {ι : Sort*} {p : ι → Prop} {s : ι → Set G}
    (hb : HasBasis (𝓝 1 : Filter G) p s) (x : G) :
    HasBasis (𝓝 x) p fun i => { y | y / x ∈ s i } := by
  rw [← nhds_translation_mul_inv]
  simp_rw [div_eq_mul_inv]
  

Proof state:
G : Type w
H : Type x
α : Type u
β : Type v
inst✝³ : TopologicalSpace G
inst✝² : Group G
inst✝¹ : TopologicalGroup G
inst✝ : TopologicalSpace α
f : α → G
s✝ : Set α
x✝ : α
ι : Sort u_1
p : ι → Prop
s : ι → Set G
hb : HasBasis (𝓝 1) p s
x : G
⊢ HasBasis (Filter.comap (fun x_1 => x_1 * x⁻¹) (𝓝 1)) p fun i => {y | y * x⁻¹ ∈ s i}

Next tactic:
exact hb.comap _
@[to_additive]
theorem mem_closure_iff_nhds_one {x : G} {s : Set G} :
    x ∈ closure s ↔ ∀ U ∈ (𝓝 1 : Filter G), ∃ y ∈ s, y / x ∈ U := by
  

Proof state:
G : Type w
H : Type x
α : Type u
β : Type v
inst✝³ : TopologicalSpace G
inst✝² : Group G
inst✝¹ : TopologicalGroup G
inst✝ : TopologicalSpace α
f : α → G
s✝ : Set α
x✝ : α
x : G
s : Set G
⊢ x ∈ closure s ↔ ∀ U ∈ 𝓝 1, ∃ y ∈ s, y / x ∈ U

Next tactic:
rw [mem_closure_iff_nhds_basis ((𝓝 1 : Filter G).basis_sets.nhds_of_one x)]
@[to_additive]
theorem mem_closure_iff_nhds_one {x : G} {s : Set G} :
    x ∈ closure s ↔ ∀ U ∈ (𝓝 1 : Filter G), ∃ y ∈ s, y / x ∈ U := by
  rw [mem_closure_iff_nhds_basis ((𝓝 1 : Filter G).basis_sets.nhds_of_one x)]
  

Proof state:
G : Type w
H : Type x
α : Type u
β : Type v
inst✝³ : TopologicalSpace G
inst✝² : Group G
inst✝¹ : TopologicalGroup G
inst✝ : TopologicalSpace α
f : α → G
s✝ : Set α
x✝ : α
x : G
s : Set G
⊢ (∀ i ∈ 𝓝 1, ∃ y ∈ s, y ∈ {y | y / x ∈ id i}) ↔ ∀ U ∈ 𝓝 1, ∃ y ∈ s, y / x ∈ U

Next tactic:
simp_rw [Set.mem_setOf, id]
/-- A monoid homomorphism (a bundled morphism of a type that implements `MonoidHomClass`) from a
topological group to a topological monoid is continuous provided that it is continuous at one. See
also `uniformContinuous_of_continuousAt_one`. -/
@[to_additive
  "An additive monoid homomorphism (a bundled morphism of a type that implements
  `AddMonoidHomClass`) from an additive topological group to an additive topological monoid is
  continuous provided that it is continuous at zero. See also
  `uniformContinuous_of_continuousAt_zero`."]
theorem continuous_of_continuousAt_one {M hom : Type*} [MulOneClass M] [TopologicalSpace M]
    [ContinuousMul M] [MonoidHomClass hom G M] (f : hom) (hf : ContinuousAt f 1) :
    Continuous f :=
  continuous_iff_continuousAt.2 fun x => by
    

Proof state:
G : Type w
H : Type x
α : Type u
β : Type v
inst✝⁷ : TopologicalSpace G
inst✝⁶ : Group G
inst✝⁵ : TopologicalGroup G
inst✝⁴ : TopologicalSpace α
f✝ : α → G
s : Set α
x✝ : α
M : Type u_1
hom : Type u_2
inst✝³ : MulOneClass M
inst✝² : TopologicalSpace M
inst✝¹ : ContinuousMul M
inst✝ : MonoidHomClass hom G M
f : hom
hf : ContinuousAt (⇑f) 1
x : G
⊢ ContinuousAt (⇑f) x

Next tactic:
simpa only [ContinuousAt, ← map_mul_left_nhds_one x, tendsto_map'_iff, (· ∘ ·), map_mul,
      map_one, mul_one] using hf.tendsto.const_mul (f x)
@[to_additive continuous_of_continuousAt_zero₂]
theorem continuous_of_continuousAt_one₂ {H M : Type*} [CommMonoid M] [TopologicalSpace M]
    [ContinuousMul M] [Group H] [TopologicalSpace H] [TopologicalGroup H] (f : G →* H →* M)
    (hf : ContinuousAt (fun x : G × H ↦ f x.1 x.2) (1, 1))
    (hl : ∀ x, ContinuousAt (f x) 1) (hr : ∀ y, ContinuousAt (f · y) 1) :
    Continuous (fun x : G × H ↦ f x.1 x.2) := continuous_iff_continuousAt.2 fun (x, y) => by
  

Proof state:
G : Type w
H✝ : Type x
α : Type u
β : Type v
inst✝⁹ : TopologicalSpace G
inst✝⁸ : Group G
inst✝⁷ : TopologicalGroup G
inst✝⁶ : TopologicalSpace α
f✝ : α → G
s : Set α
x✝¹ : α
H : Type u_1
M : Type u_2
inst✝⁵ : CommMonoid M
inst✝⁴ : TopologicalSpace M
inst✝³ : ContinuousMul M
inst✝² : Group H
inst✝¹ : TopologicalSpace H
inst✝ : TopologicalGroup H
f : G →* H →* M
hf : ContinuousAt (fun x => (f x.1) x.2) (1, 1)
hl : ∀ (x : G), ContinuousAt (⇑(f x)) 1
hr : ∀ (y : H), ContinuousAt (fun x => (f x) y) 1
x✝ : G × H
x : G
y : H
⊢ ContinuousAt (fun x => (f x.1) x.2) (x, y)

Next tactic:
simp only [ContinuousAt, nhds_prod_eq, ← map_mul_left_nhds_one x, ← map_mul_left_nhds_one y,
    prod_map_map_eq, tendsto_map'_iff, (· ∘ ·), map_mul, MonoidHom.mul_apply] at *
@[to_additive continuous_of_continuousAt_zero₂]
theorem continuous_of_continuousAt_one₂ {H M : Type*} [CommMonoid M] [TopologicalSpace M]
    [ContinuousMul M] [Group H] [TopologicalSpace H] [TopologicalGroup H] (f : G →* H →* M)
    (hf : ContinuousAt (fun x : G × H ↦ f x.1 x.2) (1, 1))
    (hl : ∀ x, ContinuousAt (f x) 1) (hr : ∀ y, ContinuousAt (f · y) 1) :
    Continuous (fun x : G × H ↦ f x.1 x.2) := continuous_iff_continuousAt.2 fun (x, y) => by
  simp only [ContinuousAt, nhds_prod_eq, ← map_mul_left_nhds_one x, ← map_mul_left_nhds_one y,
    prod_map_map_eq, tendsto_map'_iff, (· ∘ ·), map_mul, MonoidHom.mul_apply] at *
  

Proof state:
G : Type w
H✝ : Type x
α : Type u
β : Type v
inst✝⁹ : TopologicalSpace G
inst✝⁸ : Group G
inst✝⁷ : TopologicalGroup G
inst✝⁶ : TopologicalSpace α
f✝ : α → G
s : Set α
x✝¹ : α
H : Type u_1
M : Type u_2
inst✝⁵ : CommMonoid M
inst✝⁴ : TopologicalSpace M
inst✝³ : ContinuousMul M
inst✝² : Group H
inst✝¹ : TopologicalSpace H
inst✝ : TopologicalGroup H
f : G →* H →* M
hl : ∀ (x : G), Tendsto (⇑(f x)) (𝓝 1) (𝓝 ((f x) 1))
hr : ∀ (y : H), Tendsto (fun x => (f x) y) (𝓝 1) (𝓝 ((f 1) y))
x✝ : G × H
x : G
y : H
hf : Tendsto (fun x => (f x.1) x.2) (𝓝 1 ×ˢ 𝓝 1) (𝓝 ((f 1) 1))
⊢ Tendsto (fun x_1 => (f x) y * (f x_1.1) y * ((f x) x_1.2 * (f x_1.1) x_1.2)) (𝓝 1 ×ˢ 𝓝 1) (𝓝 ((f x) y))

Next tactic:
refine ((tendsto_const_nhds.mul ((hr y).comp tendsto_fst)).mul
    (((hl x).comp tendsto_snd).mul hf)).mono_right (le_of_eq ?_)
@[to_additive continuous_of_continuousAt_zero₂]
theorem continuous_of_continuousAt_one₂ {H M : Type*} [CommMonoid M] [TopologicalSpace M]
    [ContinuousMul M] [Group H] [TopologicalSpace H] [TopologicalGroup H] (f : G →* H →* M)
    (hf : ContinuousAt (fun x : G × H ↦ f x.1 x.2) (1, 1))
    (hl : ∀ x, ContinuousAt (f x) 1) (hr : ∀ y, ContinuousAt (f · y) 1) :
    Continuous (fun x : G × H ↦ f x.1 x.2) := continuous_iff_continuousAt.2 fun (x, y) => by
  simp only [ContinuousAt, nhds_prod_eq, ← map_mul_left_nhds_one x, ← map_mul_left_nhds_one y,
    prod_map_map_eq, tendsto_map'_iff, (· ∘ ·), map_mul, MonoidHom.mul_apply] at *
  refine ((tendsto_const_nhds.mul ((hr y).comp tendsto_fst)).mul
    (((hl x).comp tendsto_snd).mul hf)).mono_right (le_of_eq ?_)
  

Proof state:
G : Type w
H✝ : Type x
α : Type u
β : Type v
inst✝⁹ : TopologicalSpace G
inst✝⁸ : Group G
inst✝⁷ : TopologicalGroup G
inst✝⁶ : TopologicalSpace α
f✝ : α → G
s : Set α
x✝¹ : α
H : Type u_1
M : Type u_2
inst✝⁵ : CommMonoid M
inst✝⁴ : TopologicalSpace M
inst✝³ : ContinuousMul M
inst✝² : Group H
inst✝¹ : TopologicalSpace H
inst✝ : TopologicalGroup H
f : G →* H →* M
hl : ∀ (x : G), Tendsto (⇑(f x)) (𝓝 1) (𝓝 ((f x) 1))
hr : ∀ (y : H), Tendsto (fun x => (f x) y) (𝓝 1) (𝓝 ((f 1) y))
x✝ : G × H
x : G
y : H
hf : Tendsto (fun x => (f x.1) x.2) (𝓝 1 ×ˢ 𝓝 1) (𝓝 ((f 1) 1))
⊢ 𝓝 ((f x) y * (f 1) y * ((f x) 1 * (f 1) 1)) = 𝓝 ((f x) y)

Next tactic:
simp only [map_one, mul_one, MonoidHom.one_apply]