l3lab/ntp-mathlib huggingface dataset:
/-- The trivial group filter basis consists of `{1}` only. The associated topology
is discrete. -/
@[to_additive "The trivial additive group filter basis consists of `{0}` only. The associated
topology is discrete."]
instance : Inhabited (GroupFilterBasis G) := ⟨by
  refine'
    { sets := {{1}}
      nonempty := singleton_nonempty _.. }
  all_goals simp only [exists_prop, mem_singleton_iff]
  · 

Proof state:
case refine'_1
G : Type u
inst✝ : Group G
B : GroupFilterBasis G
⊢ ∀ {x y : Set G}, x = {1} → y = {1} → ∃ z, z = {1} ∧ z ⊆ x ∩ y

Next tactic:
rintro - - rfl rfl
/-- The trivial group filter basis consists of `{1}` only. The associated topology
is discrete. -/
@[to_additive "The trivial additive group filter basis consists of `{0}` only. The associated
topology is discrete."]
instance : Inhabited (GroupFilterBasis G) := ⟨by
  refine'
    { sets := {{1}}
      nonempty := singleton_nonempty _.. }
  all_goals simp only [exists_prop, mem_singleton_iff]
  · rintro - - rfl rfl
    

Proof state:
case refine'_1
G : Type u
inst✝ : Group G
B : GroupFilterBasis G
⊢ ∃ z, z = {1} ∧ z ⊆ {1} ∩ {1}

Next tactic:
use {1}
/-- The trivial group filter basis consists of `{1}` only. The associated topology
is discrete. -/
@[to_additive "The trivial additive group filter basis consists of `{0}` only. The associated
topology is discrete."]
instance : Inhabited (GroupFilterBasis G) := ⟨by
  refine'
    { sets := {{1}}
      nonempty := singleton_nonempty _.. }
  all_goals simp only [exists_prop, mem_singleton_iff]
  · rintro - - rfl rfl
    use {1}
    

Proof state:
case h
G : Type u
inst✝ : Group G
B : GroupFilterBasis G
⊢ {1} = {1} ∧ {1} ⊆ {1} ∩ {1}

Next tactic:
simp
/-- The trivial group filter basis consists of `{1}` only. The associated topology
is discrete. -/
@[to_additive "The trivial additive group filter basis consists of `{0}` only. The associated
topology is discrete."]
instance : Inhabited (GroupFilterBasis G) := ⟨by
  refine'
    { sets := {{1}}
      nonempty := singleton_nonempty _.. }
  all_goals simp only [exists_prop, mem_singleton_iff]
  · rintro - - rfl rfl
    use {1}
    simp
  · 

Proof state:
case refine'_2
G : Type u
inst✝ : Group G
B : GroupFilterBasis G
⊢ ∀ {U : Set G}, U = {1} → 1 ∈ U

Next tactic:
simp
/-- The trivial group filter basis consists of `{1}` only. The associated topology
is discrete. -/
@[to_additive "The trivial additive group filter basis consists of `{0}` only. The associated
topology is discrete."]
instance : Inhabited (GroupFilterBasis G) := ⟨by
  refine'
    { sets := {{1}}
      nonempty := singleton_nonempty _.. }
  all_goals simp only [exists_prop, mem_singleton_iff]
  · rintro - - rfl rfl
    use {1}
    simp
  · simp
  · 

Proof state:
case refine'_3
G : Type u
inst✝ : Group G
B : GroupFilterBasis G
⊢ ∀ {U : Set G}, U = {1} → ∃ V, V = {1} ∧ V * V ⊆ U

Next tactic:
rintro - rfl
/-- The trivial group filter basis consists of `{1}` only. The associated topology
is discrete. -/
@[to_additive "The trivial additive group filter basis consists of `{0}` only. The associated
topology is discrete."]
instance : Inhabited (GroupFilterBasis G) := ⟨by
  refine'
    { sets := {{1}}
      nonempty := singleton_nonempty _.. }
  all_goals simp only [exists_prop, mem_singleton_iff]
  · rintro - - rfl rfl
    use {1}
    simp
  · simp
  · rintro - rfl
    

Proof state:
case refine'_3
G : Type u
inst✝ : Group G
B : GroupFilterBasis G
⊢ ∃ V, V = {1} ∧ V * V ⊆ {1}

Next tactic:
use {1}
/-- The trivial group filter basis consists of `{1}` only. The associated topology
is discrete. -/
@[to_additive "The trivial additive group filter basis consists of `{0}` only. The associated
topology is discrete."]
instance : Inhabited (GroupFilterBasis G) := ⟨by
  refine'
    { sets := {{1}}
      nonempty := singleton_nonempty _.. }
  all_goals simp only [exists_prop, mem_singleton_iff]
  · rintro - - rfl rfl
    use {1}
    simp
  · simp
  · rintro - rfl
    use {1}
    

Proof state:
case h
G : Type u
inst✝ : Group G
B : GroupFilterBasis G
⊢ {1} = {1} ∧ {1} * {1} ⊆ {1}

Next tactic:
simp
/-- The trivial group filter basis consists of `{1}` only. The associated topology
is discrete. -/
@[to_additive "The trivial additive group filter basis consists of `{0}` only. The associated
topology is discrete."]
instance : Inhabited (GroupFilterBasis G) := ⟨by
  refine'
    { sets := {{1}}
      nonempty := singleton_nonempty _.. }
  all_goals simp only [exists_prop, mem_singleton_iff]
  · rintro - - rfl rfl
    use {1}
    simp
  · simp
  · rintro - rfl
    use {1}
    simp
  · 

Proof state:
case refine'_4
G : Type u
inst✝ : Group G
B : GroupFilterBasis G
⊢ ∀ {U : Set G}, U = {1} → ∃ V, V = {1} ∧ V ⊆ (fun x => x⁻¹) ⁻¹' U

Next tactic:
rintro - rfl
/-- The trivial group filter basis consists of `{1}` only. The associated topology
is discrete. -/
@[to_additive "The trivial additive group filter basis consists of `{0}` only. The associated
topology is discrete."]
instance : Inhabited (GroupFilterBasis G) := ⟨by
  refine'
    { sets := {{1}}
      nonempty := singleton_nonempty _.. }
  all_goals simp only [exists_prop, mem_singleton_iff]
  · rintro - - rfl rfl
    use {1}
    simp
  · simp
  · rintro - rfl
    use {1}
    simp
  · rintro - rfl
    

Proof state:
case refine'_4
G : Type u
inst✝ : Group G
B : GroupFilterBasis G
⊢ ∃ V, V = {1} ∧ V ⊆ (fun x => x⁻¹) ⁻¹' {1}

Next tactic:
use {1}
/-- The trivial group filter basis consists of `{1}` only. The associated topology
is discrete. -/
@[to_additive "The trivial additive group filter basis consists of `{0}` only. The associated
topology is discrete."]
instance : Inhabited (GroupFilterBasis G) := ⟨by
  refine'
    { sets := {{1}}
      nonempty := singleton_nonempty _.. }
  all_goals simp only [exists_prop, mem_singleton_iff]
  · rintro - - rfl rfl
    use {1}
    simp
  · simp
  · rintro - rfl
    use {1}
    simp
  · rintro - rfl
    use {1}
    

Proof state:
case h
G : Type u
inst✝ : Group G
B : GroupFilterBasis G
⊢ {1} = {1} ∧ {1} ⊆ (fun x => x⁻¹) ⁻¹' {1}

Next tactic:
simp
/-- The trivial group filter basis consists of `{1}` only. The associated topology
is discrete. -/
@[to_additive "The trivial additive group filter basis consists of `{0}` only. The associated
topology is discrete."]
instance : Inhabited (GroupFilterBasis G) := ⟨by
  refine'
    { sets := {{1}}
      nonempty := singleton_nonempty _.. }
  all_goals simp only [exists_prop, mem_singleton_iff]
  · rintro - - rfl rfl
    use {1}
    simp
  · simp
  · rintro - rfl
    use {1}
    simp
  · rintro - rfl
    use {1}
    simp
  · 

Proof state:
case refine'_5
G : Type u
inst✝ : Group G
B : GroupFilterBasis G
⊢ ∀ (x₀ : G) {U : Set G}, U = {1} → ∃ V, V = {1} ∧ V ⊆ (fun x => x₀ * x * x₀⁻¹) ⁻¹' U

Next tactic:
rintro x₀ - rfl
/-- The trivial group filter basis consists of `{1}` only. The associated topology
is discrete. -/
@[to_additive "The trivial additive group filter basis consists of `{0}` only. The associated
topology is discrete."]
instance : Inhabited (GroupFilterBasis G) := ⟨by
  refine'
    { sets := {{1}}
      nonempty := singleton_nonempty _.. }
  all_goals simp only [exists_prop, mem_singleton_iff]
  · rintro - - rfl rfl
    use {1}
    simp
  · simp
  · rintro - rfl
    use {1}
    simp
  · rintro - rfl
    use {1}
    simp
  · rintro x₀ - rfl
    

Proof state:
case refine'_5
G : Type u
inst✝ : Group G
B : GroupFilterBasis G
x₀ : G
⊢ ∃ V, V = {1} ∧ V ⊆ (fun x => x₀ * x * x₀⁻¹) ⁻¹' {1}

Next tactic:
use {1}
/-- The trivial group filter basis consists of `{1}` only. The associated topology
is discrete. -/
@[to_additive "The trivial additive group filter basis consists of `{0}` only. The associated
topology is discrete."]
instance : Inhabited (GroupFilterBasis G) := ⟨by
  refine'
    { sets := {{1}}
      nonempty := singleton_nonempty _.. }
  all_goals simp only [exists_prop, mem_singleton_iff]
  · rintro - - rfl rfl
    use {1}
    simp
  · simp
  · rintro - rfl
    use {1}
    simp
  · rintro - rfl
    use {1}
    simp
  · rintro x₀ - rfl
    use {1}
    

Proof state:
case h
G : Type u
inst✝ : Group G
B : GroupFilterBasis G
x₀ : G
⊢ {1} = {1} ∧ {1} ⊆ (fun x => x₀ * x * x₀⁻¹) ⁻¹' {1}

Next tactic:
simp
@[to_additive (attr := simp)]
theorem N_one (B : GroupFilterBasis G) : B.N 1 = B.toFilterBasis.filter := by
  

Proof state:
G : Type u
inst✝ : Group G
B✝ B : GroupFilterBasis G
⊢ N B 1 = FilterBasis.filter toFilterBasis

Next tactic:
simp only [N, one_mul, map_id']
@[to_additive]
theorem nhds_eq (B : GroupFilterBasis G) {x₀ : G} : @nhds G B.topology x₀ = B.N x₀ := by
  

Proof state:
G : Type u
inst✝ : Group G
B✝ B : GroupFilterBasis G
x₀ : G
⊢ 𝓝 x₀ = N B x₀

Next tactic:
rw [TopologicalSpace.nhds_mkOfNhds]
@[to_additive]
theorem nhds_eq (B : GroupFilterBasis G) {x₀ : G} : @nhds G B.topology x₀ = B.N x₀ := by
  rw [TopologicalSpace.nhds_mkOfNhds]
  · 

Proof state:
case h₀
G : Type u
inst✝ : Group G
B✝ B : GroupFilterBasis G
x₀ : G
⊢ pure ≤ N B

Next tactic:
intro x U U_in
@[to_additive]
theorem nhds_eq (B : GroupFilterBasis G) {x₀ : G} : @nhds G B.topology x₀ = B.N x₀ := by
  rw [TopologicalSpace.nhds_mkOfNhds]
  · intro x U U_in
    

Proof state:
case h₀
G : Type u
inst✝ : Group G
B✝ B : GroupFilterBasis G
x₀ x : G
U : Set G
U_in : U ∈ N B x
⊢ U ∈ pure x

Next tactic:
rw [(B.hasBasis x).mem_iff] at U_in
@[to_additive]
theorem nhds_eq (B : GroupFilterBasis G) {x₀ : G} : @nhds G B.topology x₀ = B.N x₀ := by
  rw [TopologicalSpace.nhds_mkOfNhds]
  · intro x U U_in
    rw [(B.hasBasis x).mem_iff] at U_in
    

Proof state:
case h₀
G : Type u
inst✝ : Group G
B✝ B : GroupFilterBasis G
x₀ x : G
U : Set G
U_in : ∃ i ∈ B, (fun y => x * y) '' i ⊆ U
⊢ U ∈ pure x

Next tactic:
rcases U_in with ⟨V, V_in, H⟩
@[to_additive]
theorem nhds_eq (B : GroupFilterBasis G) {x₀ : G} : @nhds G B.topology x₀ = B.N x₀ := by
  rw [TopologicalSpace.nhds_mkOfNhds]
  · intro x U U_in
    rw [(B.hasBasis x).mem_iff] at U_in
    rcases U_in with ⟨V, V_in, H⟩
    

Proof state:
case h₀.intro.intro
G : Type u
inst✝ : Group G
B✝ B : GroupFilterBasis G
x₀ x : G
U V : Set G
V_in : V ∈ B
H : (fun y => x * y) '' V ⊆ U
⊢ U ∈ pure x

Next tactic:
simpa [mem_pure] using H (mem_image_of_mem _ (GroupFilterBasis.one V_in))
@[to_additive]
theorem nhds_eq (B : GroupFilterBasis G) {x₀ : G} : @nhds G B.topology x₀ = B.N x₀ := by
  rw [TopologicalSpace.nhds_mkOfNhds]
  · intro x U U_in
    rw [(B.hasBasis x).mem_iff] at U_in
    rcases U_in with ⟨V, V_in, H⟩
    simpa [mem_pure] using H (mem_image_of_mem _ (GroupFilterBasis.one V_in))
  · 

Proof state:
case h₁
G : Type u
inst✝ : Group G
B✝ B : GroupFilterBasis G
x₀ : G
⊢ ∀ (a : G), ∀ s ∈ N B a, ∃ t ∈ N B a, t ⊆ s ∧ ∀ a' ∈ t, s ∈ N B a'

Next tactic:
intro x U U_in
@[to_additive]
theorem nhds_eq (B : GroupFilterBasis G) {x₀ : G} : @nhds G B.topology x₀ = B.N x₀ := by
  rw [TopologicalSpace.nhds_mkOfNhds]
  · intro x U U_in
    rw [(B.hasBasis x).mem_iff] at U_in
    rcases U_in with ⟨V, V_in, H⟩
    simpa [mem_pure] using H (mem_image_of_mem _ (GroupFilterBasis.one V_in))
  · intro x U U_in
    

Proof state:
case h₁
G : Type u
inst✝ : Group G
B✝ B : GroupFilterBasis G
x₀ x : G
U : Set G
U_in : U ∈ N B x
⊢ ∃ t ∈ N B x, t ⊆ U ∧ ∀ a' ∈ t, U ∈ N B a'

Next tactic:
rw [(B.hasBasis x).mem_iff] at U_in
@[to_additive]
theorem nhds_eq (B : GroupFilterBasis G) {x₀ : G} : @nhds G B.topology x₀ = B.N x₀ := by
  rw [TopologicalSpace.nhds_mkOfNhds]
  · intro x U U_in
    rw [(B.hasBasis x).mem_iff] at U_in
    rcases U_in with ⟨V, V_in, H⟩
    simpa [mem_pure] using H (mem_image_of_mem _ (GroupFilterBasis.one V_in))
  · intro x U U_in
    rw [(B.hasBasis x).mem_iff] at U_in
    

Proof state:
case h₁
G : Type u
inst✝ : Group G
B✝ B : GroupFilterBasis G
x₀ x : G
U : Set G
U_in : ∃ i ∈ B, (fun y => x * y) '' i ⊆ U
⊢ ∃ t ∈ N B x, t ⊆ U ∧ ∀ a' ∈ t, U ∈ N B a'

Next tactic:
rcases U_in with ⟨V, V_in, H⟩
@[to_additive]
theorem nhds_eq (B : GroupFilterBasis G) {x₀ : G} : @nhds G B.topology x₀ = B.N x₀ := by
  rw [TopologicalSpace.nhds_mkOfNhds]
  · intro x U U_in
    rw [(B.hasBasis x).mem_iff] at U_in
    rcases U_in with ⟨V, V_in, H⟩
    simpa [mem_pure] using H (mem_image_of_mem _ (GroupFilterBasis.one V_in))
  · intro x U U_in
    rw [(B.hasBasis x).mem_iff] at U_in
    rcases U_in with ⟨V, V_in, H⟩
    

Proof state:
case h₁.intro.intro
G : Type u
inst✝ : Group G
B✝ B : GroupFilterBasis G
x₀ x : G
U V : Set G
V_in : V ∈ B
H : (fun y => x * y) '' V ⊆ U
⊢ ∃ t ∈ N B x, t ⊆ U ∧ ∀ a' ∈ t, U ∈ N B a'

Next tactic:
rcases GroupFilterBasis.mul V_in with ⟨W, W_in, hW⟩
@[to_additive]
theorem nhds_eq (B : GroupFilterBasis G) {x₀ : G} : @nhds G B.topology x₀ = B.N x₀ := by
  rw [TopologicalSpace.nhds_mkOfNhds]
  · intro x U U_in
    rw [(B.hasBasis x).mem_iff] at U_in
    rcases U_in with ⟨V, V_in, H⟩
    simpa [mem_pure] using H (mem_image_of_mem _ (GroupFilterBasis.one V_in))
  · intro x U U_in
    rw [(B.hasBasis x).mem_iff] at U_in
    rcases U_in with ⟨V, V_in, H⟩
    rcases GroupFilterBasis.mul V_in with ⟨W, W_in, hW⟩
    

Proof state:
case h₁.intro.intro.intro.intro
G : Type u
inst✝ : Group G
B✝ B : GroupFilterBasis G
x₀ x : G
U V : Set G
V_in : V ∈ B
H : (fun y => x * y) '' V ⊆ U
W : Set G
W_in : W ∈ B
hW : W * W ⊆ V
⊢ ∃ t ∈ N B x, t ⊆ U ∧ ∀ a' ∈ t, U ∈ N B a'

Next tactic:
use (fun y ↦ x * y) '' W, image_mem_map (FilterBasis.mem_filter_of_mem _ W_in)
@[to_additive]
theorem nhds_eq (B : GroupFilterBasis G) {x₀ : G} : @nhds G B.topology x₀ = B.N x₀ := by
  rw [TopologicalSpace.nhds_mkOfNhds]
  · intro x U U_in
    rw [(B.hasBasis x).mem_iff] at U_in
    rcases U_in with ⟨V, V_in, H⟩
    simpa [mem_pure] using H (mem_image_of_mem _ (GroupFilterBasis.one V_in))
  · intro x U U_in
    rw [(B.hasBasis x).mem_iff] at U_in
    rcases U_in with ⟨V, V_in, H⟩
    rcases GroupFilterBasis.mul V_in with ⟨W, W_in, hW⟩
    use (fun y ↦ x * y) '' W, image_mem_map (FilterBasis.mem_filter_of_mem _ W_in)
    

Proof state:
case right
G : Type u
inst✝ : Group G
B✝ B : GroupFilterBasis G
x₀ x : G
U V : Set G
V_in : V ∈ B
H : (fun y => x * y) '' V ⊆ U
W : Set G
W_in : W ∈ B
hW : W * W ⊆ V
⊢ (fun y => x * y) '' W ⊆ U ∧ ∀ a' ∈ (fun y => x * y) '' W, U ∈ N B a'

Next tactic:
constructor
@[to_additive]
theorem nhds_eq (B : GroupFilterBasis G) {x₀ : G} : @nhds G B.topology x₀ = B.N x₀ := by
  rw [TopologicalSpace.nhds_mkOfNhds]
  · intro x U U_in
    rw [(B.hasBasis x).mem_iff] at U_in
    rcases U_in with ⟨V, V_in, H⟩
    simpa [mem_pure] using H (mem_image_of_mem _ (GroupFilterBasis.one V_in))
  · intro x U U_in
    rw [(B.hasBasis x).mem_iff] at U_in
    rcases U_in with ⟨V, V_in, H⟩
    rcases GroupFilterBasis.mul V_in with ⟨W, W_in, hW⟩
    use (fun y ↦ x * y) '' W, image_mem_map (FilterBasis.mem_filter_of_mem _ W_in)
    constructor
    · 

Proof state:
case right.left
G : Type u
inst✝ : Group G
B✝ B : GroupFilterBasis G
x₀ x : G
U V : Set G
V_in : V ∈ B
H : (fun y => x * y) '' V ⊆ U
W : Set G
W_in : W ∈ B
hW : W * W ⊆ V
⊢ (fun y => x * y) '' W ⊆ U

Next tactic:
rw [image_subset_iff] at H ⊢
@[to_additive]
theorem nhds_eq (B : GroupFilterBasis G) {x₀ : G} : @nhds G B.topology x₀ = B.N x₀ := by
  rw [TopologicalSpace.nhds_mkOfNhds]
  · intro x U U_in
    rw [(B.hasBasis x).mem_iff] at U_in
    rcases U_in with ⟨V, V_in, H⟩
    simpa [mem_pure] using H (mem_image_of_mem _ (GroupFilterBasis.one V_in))
  · intro x U U_in
    rw [(B.hasBasis x).mem_iff] at U_in
    rcases U_in with ⟨V, V_in, H⟩
    rcases GroupFilterBasis.mul V_in with ⟨W, W_in, hW⟩
    use (fun y ↦ x * y) '' W, image_mem_map (FilterBasis.mem_filter_of_mem _ W_in)
    constructor
    · rw [image_subset_iff] at H ⊢
      

Proof state:
case right.left
G : Type u
inst✝ : Group G
B✝ B : GroupFilterBasis G
x₀ x : G
U V : Set G
V_in : V ∈ B
H : V ⊆ (fun y => x * y) ⁻¹' U
W : Set G
W_in : W ∈ B
hW : W * W ⊆ V
⊢ W ⊆ (fun y => x * y) ⁻¹' U

Next tactic:
exact ((B.prod_subset_self W_in).trans hW).trans H
@[to_additive]
theorem nhds_eq (B : GroupFilterBasis G) {x₀ : G} : @nhds G B.topology x₀ = B.N x₀ := by
  rw [TopologicalSpace.nhds_mkOfNhds]
  · intro x U U_in
    rw [(B.hasBasis x).mem_iff] at U_in
    rcases U_in with ⟨V, V_in, H⟩
    simpa [mem_pure] using H (mem_image_of_mem _ (GroupFilterBasis.one V_in))
  · intro x U U_in
    rw [(B.hasBasis x).mem_iff] at U_in
    rcases U_in with ⟨V, V_in, H⟩
    rcases GroupFilterBasis.mul V_in with ⟨W, W_in, hW⟩
    use (fun y ↦ x * y) '' W, image_mem_map (FilterBasis.mem_filter_of_mem _ W_in)
    constructor
    · rw [image_subset_iff] at H ⊢
      exact ((B.prod_subset_self W_in).trans hW).trans H
    · 

Proof state:
case right.right
G : Type u
inst✝ : Group G
B✝ B : GroupFilterBasis G
x₀ x : G
U V : Set G
V_in : V ∈ B
H : (fun y => x * y) '' V ⊆ U
W : Set G
W_in : W ∈ B
hW : W * W ⊆ V
⊢ ∀ a' ∈ (fun y => x * y) '' W, U ∈ N B a'

Next tactic:
rintro y ⟨t, tW, rfl⟩
@[to_additive]
theorem nhds_eq (B : GroupFilterBasis G) {x₀ : G} : @nhds G B.topology x₀ = B.N x₀ := by
  rw [TopologicalSpace.nhds_mkOfNhds]
  · intro x U U_in
    rw [(B.hasBasis x).mem_iff] at U_in
    rcases U_in with ⟨V, V_in, H⟩
    simpa [mem_pure] using H (mem_image_of_mem _ (GroupFilterBasis.one V_in))
  · intro x U U_in
    rw [(B.hasBasis x).mem_iff] at U_in
    rcases U_in with ⟨V, V_in, H⟩
    rcases GroupFilterBasis.mul V_in with ⟨W, W_in, hW⟩
    use (fun y ↦ x * y) '' W, image_mem_map (FilterBasis.mem_filter_of_mem _ W_in)
    constructor
    · rw [image_subset_iff] at H ⊢
      exact ((B.prod_subset_self W_in).trans hW).trans H
    · rintro y ⟨t, tW, rfl⟩
      

Proof state:
case right.right.intro.intro
G : Type u
inst✝ : Group G
B✝ B : GroupFilterBasis G
x₀ x : G
U V : Set G
V_in : V ∈ B
H : (fun y => x * y) '' V ⊆ U
W : Set G
W_in : W ∈ B
hW : W * W ⊆ V
t : G
tW : t ∈ W
⊢ U ∈ N B ((fun y => x * y) t)

Next tactic:
rw [(B.hasBasis _).mem_iff]
@[to_additive]
theorem nhds_eq (B : GroupFilterBasis G) {x₀ : G} : @nhds G B.topology x₀ = B.N x₀ := by
  rw [TopologicalSpace.nhds_mkOfNhds]
  · intro x U U_in
    rw [(B.hasBasis x).mem_iff] at U_in
    rcases U_in with ⟨V, V_in, H⟩
    simpa [mem_pure] using H (mem_image_of_mem _ (GroupFilterBasis.one V_in))
  · intro x U U_in
    rw [(B.hasBasis x).mem_iff] at U_in
    rcases U_in with ⟨V, V_in, H⟩
    rcases GroupFilterBasis.mul V_in with ⟨W, W_in, hW⟩
    use (fun y ↦ x * y) '' W, image_mem_map (FilterBasis.mem_filter_of_mem _ W_in)
    constructor
    · rw [image_subset_iff] at H ⊢
      exact ((B.prod_subset_self W_in).trans hW).trans H
    · rintro y ⟨t, tW, rfl⟩
      rw [(B.hasBasis _).mem_iff]
      

Proof state:
case right.right.intro.intro
G : Type u
inst✝ : Group G
B✝ B : GroupFilterBasis G
x₀ x : G
U V : Set G
V_in : V ∈ B
H : (fun y => x * y) '' V ⊆ U
W : Set G
W_in : W ∈ B
hW : W * W ⊆ V
t : G
tW : t ∈ W
⊢ ∃ i ∈ B, (fun y => (fun y => x * y) t * y) '' i ⊆ U

Next tactic:
use W, W_in
@[to_additive]
theorem nhds_eq (B : GroupFilterBasis G) {x₀ : G} : @nhds G B.topology x₀ = B.N x₀ := by
  rw [TopologicalSpace.nhds_mkOfNhds]
  · intro x U U_in
    rw [(B.hasBasis x).mem_iff] at U_in
    rcases U_in with ⟨V, V_in, H⟩
    simpa [mem_pure] using H (mem_image_of_mem _ (GroupFilterBasis.one V_in))
  · intro x U U_in
    rw [(B.hasBasis x).mem_iff] at U_in
    rcases U_in with ⟨V, V_in, H⟩
    rcases GroupFilterBasis.mul V_in with ⟨W, W_in, hW⟩
    use (fun y ↦ x * y) '' W, image_mem_map (FilterBasis.mem_filter_of_mem _ W_in)
    constructor
    · rw [image_subset_iff] at H ⊢
      exact ((B.prod_subset_self W_in).trans hW).trans H
    · rintro y ⟨t, tW, rfl⟩
      rw [(B.hasBasis _).mem_iff]
      use W, W_in
      

Proof state:
case right
G : Type u
inst✝ : Group G
B✝ B : GroupFilterBasis G
x₀ x : G
U V : Set G
V_in : V ∈ B
H : (fun y => x * y) '' V ⊆ U
W : Set G
W_in : W ∈ B
hW : W * W ⊆ V
t : G
tW : t ∈ W
⊢ (fun y => (fun y => x * y) t * y) '' W ⊆ U

Next tactic:
apply Subset.trans _ H
@[to_additive]
theorem nhds_eq (B : GroupFilterBasis G) {x₀ : G} : @nhds G B.topology x₀ = B.N x₀ := by
  rw [TopologicalSpace.nhds_mkOfNhds]
  · intro x U U_in
    rw [(B.hasBasis x).mem_iff] at U_in
    rcases U_in with ⟨V, V_in, H⟩
    simpa [mem_pure] using H (mem_image_of_mem _ (GroupFilterBasis.one V_in))
  · intro x U U_in
    rw [(B.hasBasis x).mem_iff] at U_in
    rcases U_in with ⟨V, V_in, H⟩
    rcases GroupFilterBasis.mul V_in with ⟨W, W_in, hW⟩
    use (fun y ↦ x * y) '' W, image_mem_map (FilterBasis.mem_filter_of_mem _ W_in)
    constructor
    · rw [image_subset_iff] at H ⊢
      exact ((B.prod_subset_self W_in).trans hW).trans H
    · rintro y ⟨t, tW, rfl⟩
      rw [(B.hasBasis _).mem_iff]
      use W, W_in
      apply Subset.trans _ H
      

Proof state:
G : Type u
inst✝ : Group G
B✝ B : GroupFilterBasis G
x₀ x : G
U V : Set G
V_in : V ∈ B
H : (fun y => x * y) '' V ⊆ U
W : Set G
W_in : W ∈ B
hW : W * W ⊆ V
t : G
tW : t ∈ W
⊢ (fun y => (fun y => x * y) t * y) '' W ⊆ (fun y => x * y) '' V

Next tactic:
clear H
@[to_additive]
theorem nhds_eq (B : GroupFilterBasis G) {x₀ : G} : @nhds G B.topology x₀ = B.N x₀ := by
  rw [TopologicalSpace.nhds_mkOfNhds]
  · intro x U U_in
    rw [(B.hasBasis x).mem_iff] at U_in
    rcases U_in with ⟨V, V_in, H⟩
    simpa [mem_pure] using H (mem_image_of_mem _ (GroupFilterBasis.one V_in))
  · intro x U U_in
    rw [(B.hasBasis x).mem_iff] at U_in
    rcases U_in with ⟨V, V_in, H⟩
    rcases GroupFilterBasis.mul V_in with ⟨W, W_in, hW⟩
    use (fun y ↦ x * y) '' W, image_mem_map (FilterBasis.mem_filter_of_mem _ W_in)
    constructor
    · rw [image_subset_iff] at H ⊢
      exact ((B.prod_subset_self W_in).trans hW).trans H
    · rintro y ⟨t, tW, rfl⟩
      rw [(B.hasBasis _).mem_iff]
      use W, W_in
      apply Subset.trans _ H
      clear H
      

Proof state:
G : Type u
inst✝ : Group G
B✝ B : GroupFilterBasis G
x₀ x : G
U V : Set G
V_in : V ∈ B
W : Set G
W_in : W ∈ B
hW : W * W ⊆ V
t : G
tW : t ∈ W
⊢ (fun y => (fun y => x * y) t * y) '' W ⊆ (fun y => x * y) '' V

Next tactic:
rintro z ⟨w, wW, rfl⟩
@[to_additive]
theorem nhds_eq (B : GroupFilterBasis G) {x₀ : G} : @nhds G B.topology x₀ = B.N x₀ := by
  rw [TopologicalSpace.nhds_mkOfNhds]
  · intro x U U_in
    rw [(B.hasBasis x).mem_iff] at U_in
    rcases U_in with ⟨V, V_in, H⟩
    simpa [mem_pure] using H (mem_image_of_mem _ (GroupFilterBasis.one V_in))
  · intro x U U_in
    rw [(B.hasBasis x).mem_iff] at U_in
    rcases U_in with ⟨V, V_in, H⟩
    rcases GroupFilterBasis.mul V_in with ⟨W, W_in, hW⟩
    use (fun y ↦ x * y) '' W, image_mem_map (FilterBasis.mem_filter_of_mem _ W_in)
    constructor
    · rw [image_subset_iff] at H ⊢
      exact ((B.prod_subset_self W_in).trans hW).trans H
    · rintro y ⟨t, tW, rfl⟩
      rw [(B.hasBasis _).mem_iff]
      use W, W_in
      apply Subset.trans _ H
      clear H
      rintro z ⟨w, wW, rfl⟩
      

Proof state:
case intro.intro
G : Type u
inst✝ : Group G
B✝ B : GroupFilterBasis G
x₀ x : G
U V : Set G
V_in : V ∈ B
W : Set G
W_in : W ∈ B
hW : W * W ⊆ V
t : G
tW : t ∈ W
w : G
wW : w ∈ W
⊢ (fun y => (fun y => x * y) t * y) w ∈ (fun y => x * y) '' V

Next tactic:
exact ⟨t * w, hW (mul_mem_mul tW wW), by simp [mul_assoc]⟩
@[to_additive]
theorem nhds_eq (B : GroupFilterBasis G) {x₀ : G} : @nhds G B.topology x₀ = B.N x₀ := by
  rw [TopologicalSpace.nhds_mkOfNhds]
  · intro x U U_in
    rw [(B.hasBasis x).mem_iff] at U_in
    rcases U_in with ⟨V, V_in, H⟩
    simpa [mem_pure] using H (mem_image_of_mem _ (GroupFilterBasis.one V_in))
  · intro x U U_in
    rw [(B.hasBasis x).mem_iff] at U_in
    rcases U_in with ⟨V, V_in, H⟩
    rcases GroupFilterBasis.mul V_in with ⟨W, W_in, hW⟩
    use (fun y ↦ x * y) '' W, image_mem_map (FilterBasis.mem_filter_of_mem _ W_in)
    constructor
    · rw [image_subset_iff] at H ⊢
      exact ((B.prod_subset_self W_in).trans hW).trans H
    · rintro y ⟨t, tW, rfl⟩
      rw [(B.hasBasis _).mem_iff]
      use W, W_in
      apply Subset.trans _ H
      clear H
      rintro z ⟨w, wW, rfl⟩
      exact ⟨t * w, hW (mul_mem_mul tW wW), by 

Proof state:
G : Type u
inst✝ : Group G
B✝ B : GroupFilterBasis G
x₀ x : G
U V : Set G
V_in : V ∈ B
W : Set G
W_in : W ∈ B
hW : W * W ⊆ V
t : G
tW : t ∈ W
w : G
wW : w ∈ W
⊢ (fun y => x * y) (t * w) = (fun y => (fun y => x * y) t * y) w

Next tactic:
simp [mul_assoc]
@[to_additive]
theorem nhds_one_eq (B : GroupFilterBasis G) :
    @nhds G B.topology (1 : G) = B.toFilterBasis.filter := by
  

Proof state:
G : Type u
inst✝ : Group G
B✝ B : GroupFilterBasis G
⊢ 𝓝 1 = FilterBasis.filter toFilterBasis

Next tactic:
rw [B.nhds_eq]