l3lab/ntp-mathlib huggingface dataset:
@[to_additive]
theorem UniformGroup.ext {G : Type*} [Group G] {u v : UniformSpace G} (hu : @UniformGroup G u _)
    (hv : @UniformGroup G v _)
    (h : @nhds _ u.toTopologicalSpace 1 = @nhds _ v.toTopologicalSpace 1) : u = v :=
  UniformSpace.ext <| by
    

Proof state:
α : Type u_1
β : Type u_2
inst✝³ : UniformSpace α
inst✝² : Group α
inst✝¹ : UniformGroup α
G : Type u_3
inst✝ : Group G
u v : UniformSpace G
hu : UniformGroup G
hv : UniformGroup G
h : 𝓝 1 = 𝓝 1
⊢ 𝓤 G = 𝓤 G

Next tactic:
rw [@uniformity_eq_comap_nhds_one _ u _ hu, @uniformity_eq_comap_nhds_one _ v _ hv, h]
@[to_additive]
theorem UniformGroup.uniformity_countably_generated [(𝓝 (1 : α)).IsCountablyGenerated] :
    (𝓤 α).IsCountablyGenerated := by
  

Proof state:
α : Type u_1
β : Type u_2
inst✝³ : UniformSpace α
inst✝² : Group α
inst✝¹ : UniformGroup α
inst✝ : IsCountablyGenerated (𝓝 1)
⊢ IsCountablyGenerated (𝓤 α)

Next tactic:
rw [uniformity_eq_comap_nhds_one]
@[to_additive]
theorem UniformGroup.uniformity_countably_generated [(𝓝 (1 : α)).IsCountablyGenerated] :
    (𝓤 α).IsCountablyGenerated := by
  rw [uniformity_eq_comap_nhds_one]
  

Proof state:
α : Type u_1
β : Type u_2
inst✝³ : UniformSpace α
inst✝² : Group α
inst✝¹ : UniformGroup α
inst✝ : IsCountablyGenerated (𝓝 1)
⊢ IsCountablyGenerated (comap (fun x => x.2 / x.1) (𝓝 1))

Next tactic:
exact Filter.comap.isCountablyGenerated _ _
@[to_additive]
theorem uniformity_eq_comap_inv_mul_nhds_one :
    𝓤 α = comap (fun x : α × α => x.1⁻¹ * x.2) (𝓝 (1 : α)) := by
  

Proof state:
α : Type u_1
β : Type u_2
inst✝² : UniformSpace α
inst✝¹ : Group α
inst✝ : UniformGroup α
⊢ 𝓤 α = comap (fun x => x.1⁻¹ * x.2) (𝓝 1)

Next tactic:
rw [← comap_uniformity_mulOpposite, uniformity_eq_comap_nhds_one, ← op_one, ← comap_unop_nhds,
    comap_comap, comap_comap]
@[to_additive]
theorem uniformity_eq_comap_inv_mul_nhds_one :
    𝓤 α = comap (fun x : α × α => x.1⁻¹ * x.2) (𝓝 (1 : α)) := by
  rw [← comap_uniformity_mulOpposite, uniformity_eq_comap_nhds_one, ← op_one, ← comap_unop_nhds,
    comap_comap, comap_comap]
  

Proof state:
α : Type u_1
β : Type u_2
inst✝² : UniformSpace α
inst✝¹ : Group α
inst✝ : UniformGroup α
⊢ comap (unop ∘ (fun x => x.2 / x.1) ∘ fun p => (op p.1, op p.2)) (𝓝 1) = comap (fun x => x.1⁻¹ * x.2) (𝓝 1)

Next tactic:
simp [(· ∘ ·)]
@[to_additive]
theorem uniformity_eq_comap_inv_mul_nhds_one_swapped :
    𝓤 α = comap (fun x : α × α => x.2⁻¹ * x.1) (𝓝 (1 : α)) := by
  

Proof state:
α : Type u_1
β : Type u_2
inst✝² : UniformSpace α
inst✝¹ : Group α
inst✝ : UniformGroup α
⊢ 𝓤 α = comap (fun x => x.2⁻¹ * x.1) (𝓝 1)

Next tactic:
rw [← comap_swap_uniformity, uniformity_eq_comap_inv_mul_nhds_one, comap_comap]
@[to_additive]
theorem uniformity_eq_comap_inv_mul_nhds_one_swapped :
    𝓤 α = comap (fun x : α × α => x.2⁻¹ * x.1) (𝓝 (1 : α)) := by
  rw [← comap_swap_uniformity, uniformity_eq_comap_inv_mul_nhds_one, comap_comap]
  

Proof state:
α : Type u_1
β : Type u_2
inst✝² : UniformSpace α
inst✝¹ : Group α
inst✝ : UniformGroup α
⊢ comap ((fun x => x.1⁻¹ * x.2) ∘ Prod.swap) (𝓝 1) = comap (fun x => x.2⁻¹ * x.1) (𝓝 1)

Next tactic:
rfl
@[to_additive]
theorem Filter.HasBasis.uniformity_of_nhds_one {ι} {p : ι → Prop} {U : ι → Set α}
    (h : (𝓝 (1 : α)).HasBasis p U) :
    (𝓤 α).HasBasis p fun i => { x : α × α | x.2 / x.1 ∈ U i } := by
  

Proof state:
α : Type u_1
β : Type u_2
inst✝² : UniformSpace α
inst✝¹ : Group α
inst✝ : UniformGroup α
ι : Sort u_3
p : ι → Prop
U : ι → Set α
h : HasBasis (𝓝 1) p U
⊢ HasBasis (𝓤 α) p fun i => {x | x.2 / x.1 ∈ U i}

Next tactic:
rw [uniformity_eq_comap_nhds_one]
@[to_additive]
theorem Filter.HasBasis.uniformity_of_nhds_one {ι} {p : ι → Prop} {U : ι → Set α}
    (h : (𝓝 (1 : α)).HasBasis p U) :
    (𝓤 α).HasBasis p fun i => { x : α × α | x.2 / x.1 ∈ U i } := by
  rw [uniformity_eq_comap_nhds_one]
  

Proof state:
α : Type u_1
β : Type u_2
inst✝² : UniformSpace α
inst✝¹ : Group α
inst✝ : UniformGroup α
ι : Sort u_3
p : ι → Prop
U : ι → Set α
h : HasBasis (𝓝 1) p U
⊢ HasBasis (Filter.comap (fun x => x.2 / x.1) (𝓝 1)) p fun i => {x | x.2 / x.1 ∈ U i}

Next tactic:
exact h.comap _
@[to_additive]
theorem Filter.HasBasis.uniformity_of_nhds_one_inv_mul {ι} {p : ι → Prop} {U : ι → Set α}
    (h : (𝓝 (1 : α)).HasBasis p U) :
    (𝓤 α).HasBasis p fun i => { x : α × α | x.1⁻¹ * x.2 ∈ U i } := by
  

Proof state:
α : Type u_1
β : Type u_2
inst✝² : UniformSpace α
inst✝¹ : Group α
inst✝ : UniformGroup α
ι : Sort u_3
p : ι → Prop
U : ι → Set α
h : HasBasis (𝓝 1) p U
⊢ HasBasis (𝓤 α) p fun i => {x | x.1⁻¹ * x.2 ∈ U i}

Next tactic:
rw [uniformity_eq_comap_inv_mul_nhds_one]
@[to_additive]
theorem Filter.HasBasis.uniformity_of_nhds_one_inv_mul {ι} {p : ι → Prop} {U : ι → Set α}
    (h : (𝓝 (1 : α)).HasBasis p U) :
    (𝓤 α).HasBasis p fun i => { x : α × α | x.1⁻¹ * x.2 ∈ U i } := by
  rw [uniformity_eq_comap_inv_mul_nhds_one]
  

Proof state:
α : Type u_1
β : Type u_2
inst✝² : UniformSpace α
inst✝¹ : Group α
inst✝ : UniformGroup α
ι : Sort u_3
p : ι → Prop
U : ι → Set α
h : HasBasis (𝓝 1) p U
⊢ HasBasis (Filter.comap (fun x => x.1⁻¹ * x.2) (𝓝 1)) p fun i => {x | x.1⁻¹ * x.2 ∈ U i}

Next tactic:
exact h.comap _
@[to_additive]
theorem Filter.HasBasis.uniformity_of_nhds_one_swapped {ι} {p : ι → Prop} {U : ι → Set α}
    (h : (𝓝 (1 : α)).HasBasis p U) :
    (𝓤 α).HasBasis p fun i => { x : α × α | x.1 / x.2 ∈ U i } := by
  

Proof state:
α : Type u_1
β : Type u_2
inst✝² : UniformSpace α
inst✝¹ : Group α
inst✝ : UniformGroup α
ι : Sort u_3
p : ι → Prop
U : ι → Set α
h : HasBasis (𝓝 1) p U
⊢ HasBasis (𝓤 α) p fun i => {x | x.1 / x.2 ∈ U i}

Next tactic:
rw [uniformity_eq_comap_nhds_one_swapped]
@[to_additive]
theorem Filter.HasBasis.uniformity_of_nhds_one_swapped {ι} {p : ι → Prop} {U : ι → Set α}
    (h : (𝓝 (1 : α)).HasBasis p U) :
    (𝓤 α).HasBasis p fun i => { x : α × α | x.1 / x.2 ∈ U i } := by
  rw [uniformity_eq_comap_nhds_one_swapped]
  

Proof state:
α : Type u_1
β : Type u_2
inst✝² : UniformSpace α
inst✝¹ : Group α
inst✝ : UniformGroup α
ι : Sort u_3
p : ι → Prop
U : ι → Set α
h : HasBasis (𝓝 1) p U
⊢ HasBasis (Filter.comap (fun x => x.1 / x.2) (𝓝 1)) p fun i => {x | x.1 / x.2 ∈ U i}

Next tactic:
exact h.comap _
@[to_additive]
theorem Filter.HasBasis.uniformity_of_nhds_one_inv_mul_swapped {ι} {p : ι → Prop} {U : ι → Set α}
    (h : (𝓝 (1 : α)).HasBasis p U) :
    (𝓤 α).HasBasis p fun i => { x : α × α | x.2⁻¹ * x.1 ∈ U i } := by
  

Proof state:
α : Type u_1
β : Type u_2
inst✝² : UniformSpace α
inst✝¹ : Group α
inst✝ : UniformGroup α
ι : Sort u_3
p : ι → Prop
U : ι → Set α
h : HasBasis (𝓝 1) p U
⊢ HasBasis (𝓤 α) p fun i => {x | x.2⁻¹ * x.1 ∈ U i}

Next tactic:
rw [uniformity_eq_comap_inv_mul_nhds_one_swapped]
@[to_additive]
theorem Filter.HasBasis.uniformity_of_nhds_one_inv_mul_swapped {ι} {p : ι → Prop} {U : ι → Set α}
    (h : (𝓝 (1 : α)).HasBasis p U) :
    (𝓤 α).HasBasis p fun i => { x : α × α | x.2⁻¹ * x.1 ∈ U i } := by
  rw [uniformity_eq_comap_inv_mul_nhds_one_swapped]
  

Proof state:
α : Type u_1
β : Type u_2
inst✝² : UniformSpace α
inst✝¹ : Group α
inst✝ : UniformGroup α
ι : Sort u_3
p : ι → Prop
U : ι → Set α
h : HasBasis (𝓝 1) p U
⊢ HasBasis (Filter.comap (fun x => x.2⁻¹ * x.1) (𝓝 1)) p fun i => {x | x.2⁻¹ * x.1 ∈ U i}

Next tactic:
exact h.comap _
@[to_additive]
theorem group_separationRel (x y : α) : (x, y) ∈ separationRel α ↔ x / y ∈ closure ({1} : Set α) :=
  have : Embedding fun a => a * (y / x) := (uniformEmbedding_translate_mul (y / x)).embedding
  show (x, y) ∈ ⋂₀ (𝓤 α).sets ↔ x / y ∈ closure ({1} : Set α) by
    

Proof state:
α : Type u_1
β : Type u_2
inst✝² : UniformSpace α
inst✝¹ : Group α
inst✝ : UniformGroup α
x y : α
this : Embedding fun a => a * (y / x)
⊢ (x, y) ∈ ⋂₀ (𝓤 α).sets ↔ x / y ∈ closure {1}

Next tactic:
rw [this.closure_eq_preimage_closure_image, uniformity_eq_comap_nhds_one α, sInter_comap_sets]
@[to_additive]
theorem group_separationRel (x y : α) : (x, y) ∈ separationRel α ↔ x / y ∈ closure ({1} : Set α) :=
  have : Embedding fun a => a * (y / x) := (uniformEmbedding_translate_mul (y / x)).embedding
  show (x, y) ∈ ⋂₀ (𝓤 α).sets ↔ x / y ∈ closure ({1} : Set α) by
    rw [this.closure_eq_preimage_closure_image, uniformity_eq_comap_nhds_one α, sInter_comap_sets]
    

Proof state:
α : Type u_1
β : Type u_2
inst✝² : UniformSpace α
inst✝¹ : Group α
inst✝ : UniformGroup α
x y : α
this : Embedding fun a => a * (y / x)
⊢ (x, y) ∈ ⋂ U ∈ 𝓝 1, (fun x => x.2 / x.1) ⁻¹' U ↔
    x / y ∈ (fun a => a * (y / x)) ⁻¹' closure ((fun a => a * (y / x)) '' {1})

Next tactic:
simp [mem_closure_iff_nhds, inter_singleton_nonempty, sub_eq_add_neg, add_assoc]
@[to_additive]
theorem uniformContinuous_of_tendsto_one {hom : Type*} [UniformSpace β] [Group β] [UniformGroup β]
    [MonoidHomClass hom α β] {f : hom} (h : Tendsto f (𝓝 1) (𝓝 1)) : UniformContinuous f := by
  

Proof state:
α : Type u_1
β : Type u_2
inst✝⁶ : UniformSpace α
inst✝⁵ : Group α
inst✝⁴ : UniformGroup α
hom : Type u_3
inst✝³ : UniformSpace β
inst✝² : Group β
inst✝¹ : UniformGroup β
inst✝ : MonoidHomClass hom α β
f : hom
h : Tendsto (⇑f) (𝓝 1) (𝓝 1)
⊢ UniformContinuous ⇑f

Next tactic:
have :
    ((fun x : β × β => x.2 / x.1) ∘ fun x : α × α => (f x.1, f x.2)) = fun x : α × α =>
      f (x.2 / x.1) := by ext; simp only [Function.comp_apply, map_div]
@[to_additive]
theorem uniformContinuous_of_tendsto_one {hom : Type*} [UniformSpace β] [Group β] [UniformGroup β]
    [MonoidHomClass hom α β] {f : hom} (h : Tendsto f (𝓝 1) (𝓝 1)) : UniformContinuous f := by
  have :
    ((fun x : β × β => x.2 / x.1) ∘ fun x : α × α => (f x.1, f x.2)) = fun x : α × α =>
      f (x.2 / x.1) := by 

Proof state:
α : Type u_1
β : Type u_2
inst✝⁶ : UniformSpace α
inst✝⁵ : Group α
inst✝⁴ : UniformGroup α
hom : Type u_3
inst✝³ : UniformSpace β
inst✝² : Group β
inst✝¹ : UniformGroup β
inst✝ : MonoidHomClass hom α β
f : hom
h : Tendsto (⇑f) (𝓝 1) (𝓝 1)
⊢ ((fun x => x.2 / x.1) ∘ fun x => (f x.1, f x.2)) = fun x => f (x.2 / x.1)

Next tactic:
ext
@[to_additive]
theorem uniformContinuous_of_tendsto_one {hom : Type*} [UniformSpace β] [Group β] [UniformGroup β]
    [MonoidHomClass hom α β] {f : hom} (h : Tendsto f (𝓝 1) (𝓝 1)) : UniformContinuous f := by
  have :
    ((fun x : β × β => x.2 / x.1) ∘ fun x : α × α => (f x.1, f x.2)) = fun x : α × α =>
      f (x.2 / x.1) := by ext; 

Proof state:
case h
α : Type u_1
β : Type u_2
inst✝⁶ : UniformSpace α
inst✝⁵ : Group α
inst✝⁴ : UniformGroup α
hom : Type u_3
inst✝³ : UniformSpace β
inst✝² : Group β
inst✝¹ : UniformGroup β
inst✝ : MonoidHomClass hom α β
f : hom
h : Tendsto (⇑f) (𝓝 1) (𝓝 1)
x✝ : α × α
⊢ ((fun x => x.2 / x.1) ∘ fun x => (f x.1, f x.2)) x✝ = f (x✝.2 / x✝.1)

Next tactic:
simp only [Function.comp_apply, map_div]
@[to_additive]
theorem uniformContinuous_of_tendsto_one {hom : Type*} [UniformSpace β] [Group β] [UniformGroup β]
    [MonoidHomClass hom α β] {f : hom} (h : Tendsto f (𝓝 1) (𝓝 1)) : UniformContinuous f := by
  have :
    ((fun x : β × β => x.2 / x.1) ∘ fun x : α × α => (f x.1, f x.2)) = fun x : α × α =>
      f (x.2 / x.1) := by ext; simp only [Function.comp_apply, map_div]
  

Proof state:
α : Type u_1
β : Type u_2
inst✝⁶ : UniformSpace α
inst✝⁵ : Group α
inst✝⁴ : UniformGroup α
hom : Type u_3
inst✝³ : UniformSpace β
inst✝² : Group β
inst✝¹ : UniformGroup β
inst✝ : MonoidHomClass hom α β
f : hom
h : Tendsto (⇑f) (𝓝 1) (𝓝 1)
this : ((fun x => x.2 / x.1) ∘ fun x => (f x.1, f x.2)) = fun x => f (x.2 / x.1)
⊢ UniformContinuous ⇑f

Next tactic:
rw [UniformContinuous, uniformity_eq_comap_nhds_one α, uniformity_eq_comap_nhds_one β,
    tendsto_comap_iff, this]
@[to_additive]
theorem uniformContinuous_of_tendsto_one {hom : Type*} [UniformSpace β] [Group β] [UniformGroup β]
    [MonoidHomClass hom α β] {f : hom} (h : Tendsto f (𝓝 1) (𝓝 1)) : UniformContinuous f := by
  have :
    ((fun x : β × β => x.2 / x.1) ∘ fun x : α × α => (f x.1, f x.2)) = fun x : α × α =>
      f (x.2 / x.1) := by ext; simp only [Function.comp_apply, map_div]
  rw [UniformContinuous, uniformity_eq_comap_nhds_one α, uniformity_eq_comap_nhds_one β,
    tendsto_comap_iff, this]
  

Proof state:
α : Type u_1
β : Type u_2
inst✝⁶ : UniformSpace α
inst✝⁵ : Group α
inst✝⁴ : UniformGroup α
hom : Type u_3
inst✝³ : UniformSpace β
inst✝² : Group β
inst✝¹ : UniformGroup β
inst✝ : MonoidHomClass hom α β
f : hom
h : Tendsto (⇑f) (𝓝 1) (𝓝 1)
this : ((fun x => x.2 / x.1) ∘ fun x => (f x.1, f x.2)) = fun x => f (x.2 / x.1)
⊢ Tendsto (fun x => f (x.2 / x.1)) (comap (fun x => x.2 / x.1) (𝓝 1)) (𝓝 1)

Next tactic:
exact Tendsto.comp h tendsto_comap
/-- A group homomorphism (a bundled morphism of a type that implements `MonoidHomClass`) between
two uniform groups is uniformly continuous provided that it is continuous at one. See also
`continuous_of_continuousAt_one`. -/
@[to_additive "An additive group homomorphism (a bundled morphism of a type that implements
`AddMonoidHomClass`) between two uniform additive groups is uniformly continuous provided that it
is continuous at zero. See also `continuous_of_continuousAt_zero`."]
theorem uniformContinuous_of_continuousAt_one {hom : Type*} [UniformSpace β] [Group β]
    [UniformGroup β] [MonoidHomClass hom α β] (f : hom) (hf : ContinuousAt f 1) :
    UniformContinuous f :=
  uniformContinuous_of_tendsto_one (by 

Proof state:
α : Type u_1
β : Type u_2
inst✝⁶ : UniformSpace α
inst✝⁵ : Group α
inst✝⁴ : UniformGroup α
hom : Type u_3
inst✝³ : UniformSpace β
inst✝² : Group β
inst✝¹ : UniformGroup β
inst✝ : MonoidHomClass hom α β
f : hom
hf : ContinuousAt (⇑f) 1
⊢ Tendsto (⇑f) (𝓝 1) (𝓝 1)

Next tactic:
simpa using hf.tendsto
/-- A homomorphism from a uniform group to a discrete uniform group is continuous if and only if
its kernel is open. -/
@[to_additive "A homomorphism from a uniform additive group to a discrete uniform additive group is
continuous if and only if its kernel is open."]
theorem UniformGroup.uniformContinuous_iff_open_ker {hom : Type*} [UniformSpace β]
    [DiscreteTopology β] [Group β] [UniformGroup β] [MonoidHomClass hom α β] {f : hom} :
    UniformContinuous f ↔ IsOpen ((f : α →* β).ker : Set α) := by
  

Proof state:
α : Type u_1
β : Type u_2
inst✝⁷ : UniformSpace α
inst✝⁶ : Group α
inst✝⁵ : UniformGroup α
hom : Type u_3
inst✝⁴ : UniformSpace β
inst✝³ : DiscreteTopology β
inst✝² : Group β
inst✝¹ : UniformGroup β
inst✝ : MonoidHomClass hom α β
f : hom
⊢ UniformContinuous ⇑f ↔ IsOpen ↑(MonoidHom.ker ↑f)

Next tactic:
refine' ⟨fun hf => _, fun hf => _⟩
/-- A homomorphism from a uniform group to a discrete uniform group is continuous if and only if
its kernel is open. -/
@[to_additive "A homomorphism from a uniform additive group to a discrete uniform additive group is
continuous if and only if its kernel is open."]
theorem UniformGroup.uniformContinuous_iff_open_ker {hom : Type*} [UniformSpace β]
    [DiscreteTopology β] [Group β] [UniformGroup β] [MonoidHomClass hom α β] {f : hom} :
    UniformContinuous f ↔ IsOpen ((f : α →* β).ker : Set α) := by
  refine' ⟨fun hf => _, fun hf => _⟩
  · 

Proof state:
case refine'_1
α : Type u_1
β : Type u_2
inst✝⁷ : UniformSpace α
inst✝⁶ : Group α
inst✝⁵ : UniformGroup α
hom : Type u_3
inst✝⁴ : UniformSpace β
inst✝³ : DiscreteTopology β
inst✝² : Group β
inst✝¹ : UniformGroup β
inst✝ : MonoidHomClass hom α β
f : hom
hf : UniformContinuous ⇑f
⊢ IsOpen ↑(MonoidHom.ker ↑f)

Next tactic:
apply (isOpen_discrete ({1} : Set β)).preimage hf.continuous
/-- A homomorphism from a uniform group to a discrete uniform group is continuous if and only if
its kernel is open. -/
@[to_additive "A homomorphism from a uniform additive group to a discrete uniform additive group is
continuous if and only if its kernel is open."]
theorem UniformGroup.uniformContinuous_iff_open_ker {hom : Type*} [UniformSpace β]
    [DiscreteTopology β] [Group β] [UniformGroup β] [MonoidHomClass hom α β] {f : hom} :
    UniformContinuous f ↔ IsOpen ((f : α →* β).ker : Set α) := by
  refine' ⟨fun hf => _, fun hf => _⟩
  · apply (isOpen_discrete ({1} : Set β)).preimage hf.continuous
  · 

Proof state:
case refine'_2
α : Type u_1
β : Type u_2
inst✝⁷ : UniformSpace α
inst✝⁶ : Group α
inst✝⁵ : UniformGroup α
hom : Type u_3
inst✝⁴ : UniformSpace β
inst✝³ : DiscreteTopology β
inst✝² : Group β
inst✝¹ : UniformGroup β
inst✝ : MonoidHomClass hom α β
f : hom
hf : IsOpen ↑(MonoidHom.ker ↑f)
⊢ UniformContinuous ⇑f

Next tactic:
apply uniformContinuous_of_continuousAt_one
/-- A homomorphism from a uniform group to a discrete uniform group is continuous if and only if
its kernel is open. -/
@[to_additive "A homomorphism from a uniform additive group to a discrete uniform additive group is
continuous if and only if its kernel is open."]
theorem UniformGroup.uniformContinuous_iff_open_ker {hom : Type*} [UniformSpace β]
    [DiscreteTopology β] [Group β] [UniformGroup β] [MonoidHomClass hom α β] {f : hom} :
    UniformContinuous f ↔ IsOpen ((f : α →* β).ker : Set α) := by
  refine' ⟨fun hf => _, fun hf => _⟩
  · apply (isOpen_discrete ({1} : Set β)).preimage hf.continuous
  · apply uniformContinuous_of_continuousAt_one
    

Proof state:
case refine'_2.hf
α : Type u_1
β : Type u_2
inst✝⁷ : UniformSpace α
inst✝⁶ : Group α
inst✝⁵ : UniformGroup α
hom : Type u_3
inst✝⁴ : UniformSpace β
inst✝³ : DiscreteTopology β
inst✝² : Group β
inst✝¹ : UniformGroup β
inst✝ : MonoidHomClass hom α β
f : hom
hf : IsOpen ↑(MonoidHom.ker ↑f)
⊢ ContinuousAt (⇑f) 1

Next tactic:
rw [ContinuousAt, nhds_discrete β, map_one, tendsto_pure]
/-- A homomorphism from a uniform group to a discrete uniform group is continuous if and only if
its kernel is open. -/
@[to_additive "A homomorphism from a uniform additive group to a discrete uniform additive group is
continuous if and only if its kernel is open."]
theorem UniformGroup.uniformContinuous_iff_open_ker {hom : Type*} [UniformSpace β]
    [DiscreteTopology β] [Group β] [UniformGroup β] [MonoidHomClass hom α β] {f : hom} :
    UniformContinuous f ↔ IsOpen ((f : α →* β).ker : Set α) := by
  refine' ⟨fun hf => _, fun hf => _⟩
  · apply (isOpen_discrete ({1} : Set β)).preimage hf.continuous
  · apply uniformContinuous_of_continuousAt_one
    rw [ContinuousAt, nhds_discrete β, map_one, tendsto_pure]
    

Proof state:
case refine'_2.hf
α : Type u_1
β : Type u_2
inst✝⁷ : UniformSpace α
inst✝⁶ : Group α
inst✝⁵ : UniformGroup α
hom : Type u_3
inst✝⁴ : UniformSpace β
inst✝³ : DiscreteTopology β
inst✝² : Group β
inst✝¹ : UniformGroup β
inst✝ : MonoidHomClass hom α β
f : hom
hf : IsOpen ↑(MonoidHom.ker ↑f)
⊢ ∀ᶠ (x : α) in 𝓝 1, f x = 1

Next tactic:
exact hf.mem_nhds (map_one f)
@[to_additive]
theorem uniformContinuous_monoidHom_of_continuous {hom : Type*} [UniformSpace β] [Group β]
    [UniformGroup β] [MonoidHomClass hom α β] {f : hom} (h : Continuous f) : UniformContinuous f :=
  uniformContinuous_of_tendsto_one <|
    suffices Tendsto f (𝓝 1) (𝓝 (f 1)) by 

Proof state:
α : Type u_1
β : Type u_2
inst✝⁶ : UniformSpace α
inst✝⁵ : Group α
inst✝⁴ : UniformGroup α
hom : Type u_3
inst✝³ : UniformSpace β
inst✝² : Group β
inst✝¹ : UniformGroup β
inst✝ : MonoidHomClass hom α β
f : hom
h : Continuous ⇑f
this : Tendsto (⇑f) (𝓝 1) (𝓝 (f 1))
⊢ Tendsto (⇑f) (𝓝 1) (𝓝 1)

Next tactic:
rwa [map_one] at this
@[to_additive]
theorem totallyBounded_iff_subset_finite_iUnion_nhds_one {s : Set α} :
    TotallyBounded s ↔ ∀ U ∈ 𝓝 (1 : α), ∃ t : Set α, t.Finite ∧ s ⊆ ⋃ y ∈ t, y • U :=
  (𝓝 (1 : α)).basis_sets.uniformity_of_nhds_one_inv_mul_swapped.totallyBounded_iff.trans <| by
    

Proof state:
α : Type u_1
β : Type u_2
inst✝² : UniformSpace α
inst✝¹ : Group α
inst✝ : UniformGroup α
s : Set α
⊢ (∀ i ∈ 𝓝 1, ∃ t, Set.Finite t ∧ s ⊆ ⋃ y ∈ t, {x | (x, y) ∈ {x | x.2⁻¹ * x.1 ∈ id i}}) ↔
    ∀ U ∈ 𝓝 1, ∃ t, Set.Finite t ∧ s ⊆ ⋃ y ∈ t, y • U

Next tactic:
simp [← preimage_smul_inv, preimage]
@[to_additive]
theorem UniformCauchySeqOn.mul (hf : UniformCauchySeqOn f l s) (hf' : UniformCauchySeqOn f' l s) :
    UniformCauchySeqOn (f * f') l s := fun u hu => by
  

Proof state:
α : Type u_1
β : Type u_2
inst✝² : UniformSpace α
inst✝¹ : Group α
inst✝ : UniformGroup α
ι : Type u_3
l : Filter ι
l' : Filter β
f f' : ι → β → α
g g' : β → α
s : Set β
hf : UniformCauchySeqOn f l s
hf' : UniformCauchySeqOn f' l s
u : Set (α × α)
hu : u ∈ 𝓤 α
⊢ ∀ᶠ (m : ι × ι) in l ×ˢ l, ∀ x ∈ s, ((f * f') m.1 x, (f * f') m.2 x) ∈ u

Next tactic:
simpa using (uniformContinuous_mul.comp_uniformCauchySeqOn (hf.prod' hf')) u hu
@[to_additive]
theorem UniformCauchySeqOn.div (hf : UniformCauchySeqOn f l s) (hf' : UniformCauchySeqOn f' l s) :
    UniformCauchySeqOn (f / f') l s := fun u hu => by
  

Proof state:
α : Type u_1
β : Type u_2
inst✝² : UniformSpace α
inst✝¹ : Group α
inst✝ : UniformGroup α
ι : Type u_3
l : Filter ι
l' : Filter β
f f' : ι → β → α
g g' : β → α
s : Set β
hf : UniformCauchySeqOn f l s
hf' : UniformCauchySeqOn f' l s
u : Set (α × α)
hu : u ∈ 𝓤 α
⊢ ∀ᶠ (m : ι × ι) in l ×ˢ l, ∀ x ∈ s, ((f / f') m.1 x, (f / f') m.2 x) ∈ u

Next tactic:
simpa using (uniformContinuous_div.comp_uniformCauchySeqOn (hf.prod' hf')) u hu
/-- The right uniformity on a topological group (as opposed to the left uniformity).

Warning: in general the right and left uniformities do not coincide and so one does not obtain a
`UniformGroup` structure. Two important special cases where they _do_ coincide are for
commutative groups (see `comm_topologicalGroup_is_uniform`) and for compact groups (see
`topologicalGroup_is_uniform_of_compactSpace`). -/
@[to_additive "The right uniformity on a topological additive group (as opposed to the left
uniformity).

Warning: in general the right and left uniformities do not coincide and so one does not obtain a
`UniformAddGroup` structure. Two important special cases where they _do_ coincide are for
commutative additive groups (see `comm_topologicalAddGroup_is_uniform`) and for compact
additive groups (see `topologicalAddGroup_is_uniform_of_compactSpace`)."]
def TopologicalGroup.toUniformSpace : UniformSpace G where
  uniformity := comap (fun p : G × G => p.2 / p.1) (𝓝 1)
  refl := (Tendsto.mono_right (by 

Proof state:
G : Type u_1
inst✝² : Group G
inst✝¹ : TopologicalSpace G
inst✝ : TopologicalGroup G
⊢ Tendsto (fun p => p.2 / p.1) (𝓟 idRel) (pure 1)

Next tactic:
simp
/-- The right uniformity on a topological group (as opposed to the left uniformity).

Warning: in general the right and left uniformities do not coincide and so one does not obtain a
`UniformGroup` structure. Two important special cases where they _do_ coincide are for
commutative groups (see `comm_topologicalGroup_is_uniform`) and for compact groups (see
`topologicalGroup_is_uniform_of_compactSpace`). -/
@[to_additive "The right uniformity on a topological additive group (as opposed to the left
uniformity).

Warning: in general the right and left uniformities do not coincide and so one does not obtain a
`UniformAddGroup` structure. Two important special cases where they _do_ coincide are for
commutative additive groups (see `comm_topologicalAddGroup_is_uniform`) and for compact
additive groups (see `topologicalAddGroup_is_uniform_of_compactSpace`)."]
def TopologicalGroup.toUniformSpace : UniformSpace G where
  uniformity := comap (fun p : G × G => p.2 / p.1) (𝓝 1)
  refl := (Tendsto.mono_right (by simp) (pure_le_nhds _)).le_comap
  symm :=
    have : Tendsto (fun p : G × G ↦ (p.2 / p.1)⁻¹) (comap (fun p : G × G ↦ p.2 / p.1) (𝓝 1))
      (𝓝 1⁻¹) := tendsto_id.inv.comp tendsto_comap
    by 

Proof state:
G : Type u_1
inst✝² : Group G
inst✝¹ : TopologicalSpace G
inst✝ : TopologicalGroup G
this : Tendsto (fun p => (p.2 / p.1)⁻¹) (comap (fun p => p.2 / p.1) (𝓝 1)) (𝓝 1⁻¹)
⊢ Tendsto Prod.swap (comap (fun p => p.2 / p.1) (𝓝 1)) (comap (fun p => p.2 / p.1) (𝓝 1))

Next tactic:
simpa [tendsto_comap_iff]