l3lab/ntp-mathlib huggingface dataset:
/-- A version of `UniformEquicontinuous.closure` applicable to subsets of types which embed
continuously into `β → α` with the product topology. It turns out we don't need any other condition
on the embedding than continuity, but in practice this will mostly be applied to `FunLike` types
where the coercion is injective. -/
theorem UniformEquicontinuous.closure' {A : Set Y} {u : Y → β → α}
    (hA : UniformEquicontinuous (u ∘ (↑) : A → β → α)) (hu : Continuous u) :
    UniformEquicontinuous (u ∘ (↑) : closure A → β → α) := by
  intro U hU
  rcases mem_uniformity_isClosed hU with ⟨V, hV, hVclosed, hVU⟩
  filter_upwards [hA V hV]
  rintro ⟨x, y⟩ hxy
  rw [SetCoe.forall] at *
  

Proof state:
case h.mk
ι : Type u_1
κ : Type u_2
X : Type u_3
Y : Type u_4
Z : Type u_5
α : Type u_6
β : Type u_7
γ : Type u_8
𝓕 : Type u_9
inst✝⁵ : TopologicalSpace X
inst✝⁴ : TopologicalSpace Y
inst✝³ : TopologicalSpace Z
inst✝² : UniformSpace α
inst✝¹ : UniformSpace β
inst✝ : UniformSpace γ
A : Set Y
u : Y → β → α
hA : UniformEquicontinuous (u ∘ Subtype.val)
hu : Continuous u
U : Set (α × α)
hU : U ∈ 𝓤 α
V : Set (α × α)
hV : V ∈ 𝓤 α
hVclosed : IsClosed V
hVU : V ⊆ U
x y : β
hxy :
  ∀ (x_1 : Y) (h : x_1 ∈ A),
    ((u ∘ Subtype.val) { val := x_1, property := h } (x, y).1,
        (u ∘ Subtype.val) { val := x_1, property := h } (x, y).2) ∈
      V
⊢ ∀ (x_1 : Y) (h : x_1 ∈ closure A),
    ((u ∘ Subtype.val) { val := x_1, property := h } (x, y).1,
        (u ∘ Subtype.val) { val := x_1, property := h } (x, y).2) ∈
      U

Next tactic:
change A ⊆ (fun f => (u f x, u f y)) ⁻¹' V at hxy
/-- A version of `UniformEquicontinuous.closure` applicable to subsets of types which embed
continuously into `β → α` with the product topology. It turns out we don't need any other condition
on the embedding than continuity, but in practice this will mostly be applied to `FunLike` types
where the coercion is injective. -/
theorem UniformEquicontinuous.closure' {A : Set Y} {u : Y → β → α}
    (hA : UniformEquicontinuous (u ∘ (↑) : A → β → α)) (hu : Continuous u) :
    UniformEquicontinuous (u ∘ (↑) : closure A → β → α) := by
  intro U hU
  rcases mem_uniformity_isClosed hU with ⟨V, hV, hVclosed, hVU⟩
  filter_upwards [hA V hV]
  rintro ⟨x, y⟩ hxy
  rw [SetCoe.forall] at *
  change A ⊆ (fun f => (u f x, u f y)) ⁻¹' V at hxy
  

Proof state:
case h.mk
ι : Type u_1
κ : Type u_2
X : Type u_3
Y : Type u_4
Z : Type u_5
α : Type u_6
β : Type u_7
γ : Type u_8
𝓕 : Type u_9
inst✝⁵ : TopologicalSpace X
inst✝⁴ : TopologicalSpace Y
inst✝³ : TopologicalSpace Z
inst✝² : UniformSpace α
inst✝¹ : UniformSpace β
inst✝ : UniformSpace γ
A : Set Y
u : Y → β → α
hA : UniformEquicontinuous (u ∘ Subtype.val)
hu : Continuous u
U : Set (α × α)
hU : U ∈ 𝓤 α
V : Set (α × α)
hV : V ∈ 𝓤 α
hVclosed : IsClosed V
hVU : V ⊆ U
x y : β
hxy : A ⊆ (fun f => (u f x, u f y)) ⁻¹' V
⊢ ∀ (x_1 : Y) (h : x_1 ∈ closure A),
    ((u ∘ Subtype.val) { val := x_1, property := h } (x, y).1,
        (u ∘ Subtype.val) { val := x_1, property := h } (x, y).2) ∈
      U

Next tactic:
refine' (closure_minimal hxy <| hVclosed.preimage <| _).trans (preimage_mono hVU)
/-- A version of `UniformEquicontinuous.closure` applicable to subsets of types which embed
continuously into `β → α` with the product topology. It turns out we don't need any other condition
on the embedding than continuity, but in practice this will mostly be applied to `FunLike` types
where the coercion is injective. -/
theorem UniformEquicontinuous.closure' {A : Set Y} {u : Y → β → α}
    (hA : UniformEquicontinuous (u ∘ (↑) : A → β → α)) (hu : Continuous u) :
    UniformEquicontinuous (u ∘ (↑) : closure A → β → α) := by
  intro U hU
  rcases mem_uniformity_isClosed hU with ⟨V, hV, hVclosed, hVU⟩
  filter_upwards [hA V hV]
  rintro ⟨x, y⟩ hxy
  rw [SetCoe.forall] at *
  change A ⊆ (fun f => (u f x, u f y)) ⁻¹' V at hxy
  refine' (closure_minimal hxy <| hVclosed.preimage <| _).trans (preimage_mono hVU)
  

Proof state:
case h.mk
ι : Type u_1
κ : Type u_2
X : Type u_3
Y : Type u_4
Z : Type u_5
α : Type u_6
β : Type u_7
γ : Type u_8
𝓕 : Type u_9
inst✝⁵ : TopologicalSpace X
inst✝⁴ : TopologicalSpace Y
inst✝³ : TopologicalSpace Z
inst✝² : UniformSpace α
inst✝¹ : UniformSpace β
inst✝ : UniformSpace γ
A : Set Y
u : Y → β → α
hA : UniformEquicontinuous (u ∘ Subtype.val)
hu : Continuous u
U : Set (α × α)
hU : U ∈ 𝓤 α
V : Set (α × α)
hV : V ∈ 𝓤 α
hVclosed : IsClosed V
hVU : V ⊆ U
x y : β
hxy : A ⊆ (fun f => (u f x, u f y)) ⁻¹' V
⊢ Continuous fun f => (u f x, u f y)

Next tactic:
exact Continuous.prod_mk ((continuous_apply x).comp hu) ((continuous_apply y).comp hu)
/-- If `F : ι → X → α` is a family of functions equicontinuous at `x`,
it tends to `f y` along a filter `l` for any `y ∈ s`,
the limit function `f` tends to `z` along `𝓝[s] x`, and `x ∈ closure s`,
then `(F · x)` tends to `z` along `l`.

In some sense, this is a converse of `EquicontinuousAt.closure`. -/
theorem EquicontinuousAt.tendsto_of_mem_closure {l : Filter ι} {F : ι → X → α} {f : X → α}
    {s : Set X} {x : X} {z : α} (hF : EquicontinuousAt F x) (hf : Tendsto f (𝓝[s] x) (𝓝 z))
    (hs : ∀ y ∈ s, Tendsto (F · y) l (𝓝 (f y))) (hx : x ∈ closure s) :
    Tendsto (F · x) l (𝓝 z) := by
  

Proof state:
ι : Type u_1
κ : Type u_2
X : Type u_3
Y : Type u_4
Z : Type u_5
α : Type u_6
β : Type u_7
γ : Type u_8
𝓕 : Type u_9
inst✝⁵ : TopologicalSpace X
inst✝⁴ : TopologicalSpace Y
inst✝³ : TopologicalSpace Z
inst✝² : UniformSpace α
inst✝¹ : UniformSpace β
inst✝ : UniformSpace γ
l : Filter ι
F : ι → X → α
f : X → α
s : Set X
x : X
z : α
hF : EquicontinuousAt F x
hf : Tendsto f (𝓝[s] x) (𝓝 z)
hs : ∀ y ∈ s, Tendsto (fun x => F x y) l (𝓝 (f y))
hx : x ∈ closure s
⊢ Tendsto (fun x_1 => F x_1 x) l (𝓝 z)

Next tactic:
rw [(nhds_basis_uniformity (𝓤 α).basis_sets).tendsto_right_iff] at hf ⊢
/-- If `F : ι → X → α` is a family of functions equicontinuous at `x`,
it tends to `f y` along a filter `l` for any `y ∈ s`,
the limit function `f` tends to `z` along `𝓝[s] x`, and `x ∈ closure s`,
then `(F · x)` tends to `z` along `l`.

In some sense, this is a converse of `EquicontinuousAt.closure`. -/
theorem EquicontinuousAt.tendsto_of_mem_closure {l : Filter ι} {F : ι → X → α} {f : X → α}
    {s : Set X} {x : X} {z : α} (hF : EquicontinuousAt F x) (hf : Tendsto f (𝓝[s] x) (𝓝 z))
    (hs : ∀ y ∈ s, Tendsto (F · y) l (𝓝 (f y))) (hx : x ∈ closure s) :
    Tendsto (F · x) l (𝓝 z) := by
  rw [(nhds_basis_uniformity (𝓤 α).basis_sets).tendsto_right_iff] at hf ⊢
  

Proof state:
ι : Type u_1
κ : Type u_2
X : Type u_3
Y : Type u_4
Z : Type u_5
α : Type u_6
β : Type u_7
γ : Type u_8
𝓕 : Type u_9
inst✝⁵ : TopologicalSpace X
inst✝⁴ : TopologicalSpace Y
inst✝³ : TopologicalSpace Z
inst✝² : UniformSpace α
inst✝¹ : UniformSpace β
inst✝ : UniformSpace γ
l : Filter ι
F : ι → X → α
f : X → α
s : Set X
x : X
z : α
hF : EquicontinuousAt F x
hf : ∀ i ∈ 𝓤 α, ∀ᶠ (x : X) in 𝓝[s] x, f x ∈ {y | (y, z) ∈ id i}
hs : ∀ y ∈ s, Tendsto (fun x => F x y) l (𝓝 (f y))
hx : x ∈ closure s
⊢ ∀ i ∈ 𝓤 α, ∀ᶠ (x_1 : ι) in l, F x_1 x ∈ {y | (y, z) ∈ id i}

Next tactic:
intro U hU
/-- If `F : ι → X → α` is a family of functions equicontinuous at `x`,
it tends to `f y` along a filter `l` for any `y ∈ s`,
the limit function `f` tends to `z` along `𝓝[s] x`, and `x ∈ closure s`,
then `(F · x)` tends to `z` along `l`.

In some sense, this is a converse of `EquicontinuousAt.closure`. -/
theorem EquicontinuousAt.tendsto_of_mem_closure {l : Filter ι} {F : ι → X → α} {f : X → α}
    {s : Set X} {x : X} {z : α} (hF : EquicontinuousAt F x) (hf : Tendsto f (𝓝[s] x) (𝓝 z))
    (hs : ∀ y ∈ s, Tendsto (F · y) l (𝓝 (f y))) (hx : x ∈ closure s) :
    Tendsto (F · x) l (𝓝 z) := by
  rw [(nhds_basis_uniformity (𝓤 α).basis_sets).tendsto_right_iff] at hf ⊢
  intro U hU
  

Proof state:
ι : Type u_1
κ : Type u_2
X : Type u_3
Y : Type u_4
Z : Type u_5
α : Type u_6
β : Type u_7
γ : Type u_8
𝓕 : Type u_9
inst✝⁵ : TopologicalSpace X
inst✝⁴ : TopologicalSpace Y
inst✝³ : TopologicalSpace Z
inst✝² : UniformSpace α
inst✝¹ : UniformSpace β
inst✝ : UniformSpace γ
l : Filter ι
F : ι → X → α
f : X → α
s : Set X
x : X
z : α
hF : EquicontinuousAt F x
hf : ∀ i ∈ 𝓤 α, ∀ᶠ (x : X) in 𝓝[s] x, f x ∈ {y | (y, z) ∈ id i}
hs : ∀ y ∈ s, Tendsto (fun x => F x y) l (𝓝 (f y))
hx : x ∈ closure s
U : Set (α × α)
hU : U ∈ 𝓤 α
⊢ ∀ᶠ (x_1 : ι) in l, F x_1 x ∈ {y | (y, z) ∈ id U}

Next tactic:
rcases comp_comp_symm_mem_uniformity_sets hU with ⟨V, hV, hVs, hVU⟩
/-- If `F : ι → X → α` is a family of functions equicontinuous at `x`,
it tends to `f y` along a filter `l` for any `y ∈ s`,
the limit function `f` tends to `z` along `𝓝[s] x`, and `x ∈ closure s`,
then `(F · x)` tends to `z` along `l`.

In some sense, this is a converse of `EquicontinuousAt.closure`. -/
theorem EquicontinuousAt.tendsto_of_mem_closure {l : Filter ι} {F : ι → X → α} {f : X → α}
    {s : Set X} {x : X} {z : α} (hF : EquicontinuousAt F x) (hf : Tendsto f (𝓝[s] x) (𝓝 z))
    (hs : ∀ y ∈ s, Tendsto (F · y) l (𝓝 (f y))) (hx : x ∈ closure s) :
    Tendsto (F · x) l (𝓝 z) := by
  rw [(nhds_basis_uniformity (𝓤 α).basis_sets).tendsto_right_iff] at hf ⊢
  intro U hU
  rcases comp_comp_symm_mem_uniformity_sets hU with ⟨V, hV, hVs, hVU⟩
  

Proof state:
case intro.intro.intro
ι : Type u_1
κ : Type u_2
X : Type u_3
Y : Type u_4
Z : Type u_5
α : Type u_6
β : Type u_7
γ : Type u_8
𝓕 : Type u_9
inst✝⁵ : TopologicalSpace X
inst✝⁴ : TopologicalSpace Y
inst✝³ : TopologicalSpace Z
inst✝² : UniformSpace α
inst✝¹ : UniformSpace β
inst✝ : UniformSpace γ
l : Filter ι
F : ι → X → α
f : X → α
s : Set X
x : X
z : α
hF : EquicontinuousAt F x
hf : ∀ i ∈ 𝓤 α, ∀ᶠ (x : X) in 𝓝[s] x, f x ∈ {y | (y, z) ∈ id i}
hs : ∀ y ∈ s, Tendsto (fun x => F x y) l (𝓝 (f y))
hx : x ∈ closure s
U : Set (α × α)
hU : U ∈ 𝓤 α
V : Set (α × α)
hV : V ∈ 𝓤 α
hVs : SymmetricRel V
hVU : V ○ V ○ V ⊆ U
⊢ ∀ᶠ (x_1 : ι) in l, F x_1 x ∈ {y | (y, z) ∈ id U}

Next tactic:
rw [mem_closure_iff_nhdsWithin_neBot] at hx
/-- If `F : ι → X → α` is a family of functions equicontinuous at `x`,
it tends to `f y` along a filter `l` for any `y ∈ s`,
the limit function `f` tends to `z` along `𝓝[s] x`, and `x ∈ closure s`,
then `(F · x)` tends to `z` along `l`.

In some sense, this is a converse of `EquicontinuousAt.closure`. -/
theorem EquicontinuousAt.tendsto_of_mem_closure {l : Filter ι} {F : ι → X → α} {f : X → α}
    {s : Set X} {x : X} {z : α} (hF : EquicontinuousAt F x) (hf : Tendsto f (𝓝[s] x) (𝓝 z))
    (hs : ∀ y ∈ s, Tendsto (F · y) l (𝓝 (f y))) (hx : x ∈ closure s) :
    Tendsto (F · x) l (𝓝 z) := by
  rw [(nhds_basis_uniformity (𝓤 α).basis_sets).tendsto_right_iff] at hf ⊢
  intro U hU
  rcases comp_comp_symm_mem_uniformity_sets hU with ⟨V, hV, hVs, hVU⟩
  rw [mem_closure_iff_nhdsWithin_neBot] at hx
  

Proof state:
case intro.intro.intro
ι : Type u_1
κ : Type u_2
X : Type u_3
Y : Type u_4
Z : Type u_5
α : Type u_6
β : Type u_7
γ : Type u_8
𝓕 : Type u_9
inst✝⁵ : TopologicalSpace X
inst✝⁴ : TopologicalSpace Y
inst✝³ : TopologicalSpace Z
inst✝² : UniformSpace α
inst✝¹ : UniformSpace β
inst✝ : UniformSpace γ
l : Filter ι
F : ι → X → α
f : X → α
s : Set X
x : X
z : α
hF : EquicontinuousAt F x
hf : ∀ i ∈ 𝓤 α, ∀ᶠ (x : X) in 𝓝[s] x, f x ∈ {y | (y, z) ∈ id i}
hs : ∀ y ∈ s, Tendsto (fun x => F x y) l (𝓝 (f y))
hx : NeBot (𝓝[s] x)
U : Set (α × α)
hU : U ∈ 𝓤 α
V : Set (α × α)
hV : V ∈ 𝓤 α
hVs : SymmetricRel V
hVU : V ○ V ○ V ⊆ U
⊢ ∀ᶠ (x_1 : ι) in l, F x_1 x ∈ {y | (y, z) ∈ id U}

Next tactic:
have : ∀ᶠ y in 𝓝[s] x, y ∈ s ∧ (∀ i, (F i x, F i y) ∈ V) ∧ (f y, z) ∈ V :=
    eventually_mem_nhdsWithin.and <| ((hF V hV).filter_mono nhdsWithin_le_nhds).and (hf V hV)
/-- If `F : ι → X → α` is a family of functions equicontinuous at `x`,
it tends to `f y` along a filter `l` for any `y ∈ s`,
the limit function `f` tends to `z` along `𝓝[s] x`, and `x ∈ closure s`,
then `(F · x)` tends to `z` along `l`.

In some sense, this is a converse of `EquicontinuousAt.closure`. -/
theorem EquicontinuousAt.tendsto_of_mem_closure {l : Filter ι} {F : ι → X → α} {f : X → α}
    {s : Set X} {x : X} {z : α} (hF : EquicontinuousAt F x) (hf : Tendsto f (𝓝[s] x) (𝓝 z))
    (hs : ∀ y ∈ s, Tendsto (F · y) l (𝓝 (f y))) (hx : x ∈ closure s) :
    Tendsto (F · x) l (𝓝 z) := by
  rw [(nhds_basis_uniformity (𝓤 α).basis_sets).tendsto_right_iff] at hf ⊢
  intro U hU
  rcases comp_comp_symm_mem_uniformity_sets hU with ⟨V, hV, hVs, hVU⟩
  rw [mem_closure_iff_nhdsWithin_neBot] at hx
  have : ∀ᶠ y in 𝓝[s] x, y ∈ s ∧ (∀ i, (F i x, F i y) ∈ V) ∧ (f y, z) ∈ V :=
    eventually_mem_nhdsWithin.and <| ((hF V hV).filter_mono nhdsWithin_le_nhds).and (hf V hV)
  

Proof state:
case intro.intro.intro
ι : Type u_1
κ : Type u_2
X : Type u_3
Y : Type u_4
Z : Type u_5
α : Type u_6
β : Type u_7
γ : Type u_8
𝓕 : Type u_9
inst✝⁵ : TopologicalSpace X
inst✝⁴ : TopologicalSpace Y
inst✝³ : TopologicalSpace Z
inst✝² : UniformSpace α
inst✝¹ : UniformSpace β
inst✝ : UniformSpace γ
l : Filter ι
F : ι → X → α
f : X → α
s : Set X
x : X
z : α
hF : EquicontinuousAt F x
hf : ∀ i ∈ 𝓤 α, ∀ᶠ (x : X) in 𝓝[s] x, f x ∈ {y | (y, z) ∈ id i}
hs : ∀ y ∈ s, Tendsto (fun x => F x y) l (𝓝 (f y))
hx : NeBot (𝓝[s] x)
U : Set (α × α)
hU : U ∈ 𝓤 α
V : Set (α × α)
hV : V ∈ 𝓤 α
hVs : SymmetricRel V
hVU : V ○ V ○ V ⊆ U
this : ∀ᶠ (y : X) in 𝓝[s] x, y ∈ s ∧ (∀ (i : ι), (F i x, F i y) ∈ V) ∧ (f y, z) ∈ V
⊢ ∀ᶠ (x_1 : ι) in l, F x_1 x ∈ {y | (y, z) ∈ id U}

Next tactic:
rcases this.exists with ⟨y, hys, hFy, hfy⟩
/-- If `F : ι → X → α` is a family of functions equicontinuous at `x`,
it tends to `f y` along a filter `l` for any `y ∈ s`,
the limit function `f` tends to `z` along `𝓝[s] x`, and `x ∈ closure s`,
then `(F · x)` tends to `z` along `l`.

In some sense, this is a converse of `EquicontinuousAt.closure`. -/
theorem EquicontinuousAt.tendsto_of_mem_closure {l : Filter ι} {F : ι → X → α} {f : X → α}
    {s : Set X} {x : X} {z : α} (hF : EquicontinuousAt F x) (hf : Tendsto f (𝓝[s] x) (𝓝 z))
    (hs : ∀ y ∈ s, Tendsto (F · y) l (𝓝 (f y))) (hx : x ∈ closure s) :
    Tendsto (F · x) l (𝓝 z) := by
  rw [(nhds_basis_uniformity (𝓤 α).basis_sets).tendsto_right_iff] at hf ⊢
  intro U hU
  rcases comp_comp_symm_mem_uniformity_sets hU with ⟨V, hV, hVs, hVU⟩
  rw [mem_closure_iff_nhdsWithin_neBot] at hx
  have : ∀ᶠ y in 𝓝[s] x, y ∈ s ∧ (∀ i, (F i x, F i y) ∈ V) ∧ (f y, z) ∈ V :=
    eventually_mem_nhdsWithin.and <| ((hF V hV).filter_mono nhdsWithin_le_nhds).and (hf V hV)
  rcases this.exists with ⟨y, hys, hFy, hfy⟩
  

Proof state:
case intro.intro.intro.intro.intro.intro
ι : Type u_1
κ : Type u_2
X : Type u_3
Y : Type u_4
Z : Type u_5
α : Type u_6
β : Type u_7
γ : Type u_8
𝓕 : Type u_9
inst✝⁵ : TopologicalSpace X
inst✝⁴ : TopologicalSpace Y
inst✝³ : TopologicalSpace Z
inst✝² : UniformSpace α
inst✝¹ : UniformSpace β
inst✝ : UniformSpace γ
l : Filter ι
F : ι → X → α
f : X → α
s : Set X
x : X
z : α
hF : EquicontinuousAt F x
hf : ∀ i ∈ 𝓤 α, ∀ᶠ (x : X) in 𝓝[s] x, f x ∈ {y | (y, z) ∈ id i}
hs : ∀ y ∈ s, Tendsto (fun x => F x y) l (𝓝 (f y))
hx : NeBot (𝓝[s] x)
U : Set (α × α)
hU : U ∈ 𝓤 α
V : Set (α × α)
hV : V ∈ 𝓤 α
hVs : SymmetricRel V
hVU : V ○ V ○ V ⊆ U
this : ∀ᶠ (y : X) in 𝓝[s] x, y ∈ s ∧ (∀ (i : ι), (F i x, F i y) ∈ V) ∧ (f y, z) ∈ V
y : X
hys : y ∈ s
hFy : ∀ (i : ι), (F i x, F i y) ∈ V
hfy : (f y, z) ∈ V
⊢ ∀ᶠ (x_1 : ι) in l, F x_1 x ∈ {y | (y, z) ∈ id U}

Next tactic:
filter_upwards [hs y hys (ball_mem_nhds _ hV)] with i hi
/-- If `F : ι → X → α` is a family of functions equicontinuous at `x`,
it tends to `f y` along a filter `l` for any `y ∈ s`,
the limit function `f` tends to `z` along `𝓝[s] x`, and `x ∈ closure s`,
then `(F · x)` tends to `z` along `l`.

In some sense, this is a converse of `EquicontinuousAt.closure`. -/
theorem EquicontinuousAt.tendsto_of_mem_closure {l : Filter ι} {F : ι → X → α} {f : X → α}
    {s : Set X} {x : X} {z : α} (hF : EquicontinuousAt F x) (hf : Tendsto f (𝓝[s] x) (𝓝 z))
    (hs : ∀ y ∈ s, Tendsto (F · y) l (𝓝 (f y))) (hx : x ∈ closure s) :
    Tendsto (F · x) l (𝓝 z) := by
  rw [(nhds_basis_uniformity (𝓤 α).basis_sets).tendsto_right_iff] at hf ⊢
  intro U hU
  rcases comp_comp_symm_mem_uniformity_sets hU with ⟨V, hV, hVs, hVU⟩
  rw [mem_closure_iff_nhdsWithin_neBot] at hx
  have : ∀ᶠ y in 𝓝[s] x, y ∈ s ∧ (∀ i, (F i x, F i y) ∈ V) ∧ (f y, z) ∈ V :=
    eventually_mem_nhdsWithin.and <| ((hF V hV).filter_mono nhdsWithin_le_nhds).and (hf V hV)
  rcases this.exists with ⟨y, hys, hFy, hfy⟩
  filter_upwards [hs y hys (ball_mem_nhds _ hV)] with i hi
  

Proof state:
case h
ι : Type u_1
κ : Type u_2
X : Type u_3
Y : Type u_4
Z : Type u_5
α : Type u_6
β : Type u_7
γ : Type u_8
𝓕 : Type u_9
inst✝⁵ : TopologicalSpace X
inst✝⁴ : TopologicalSpace Y
inst✝³ : TopologicalSpace Z
inst✝² : UniformSpace α
inst✝¹ : UniformSpace β
inst✝ : UniformSpace γ
l : Filter ι
F : ι → X → α
f : X → α
s : Set X
x : X
z : α
hF : EquicontinuousAt F x
hf : ∀ i ∈ 𝓤 α, ∀ᶠ (x : X) in 𝓝[s] x, f x ∈ {y | (y, z) ∈ id i}
hs : ∀ y ∈ s, Tendsto (fun x => F x y) l (𝓝 (f y))
hx : NeBot (𝓝[s] x)
U : Set (α × α)
hU : U ∈ 𝓤 α
V : Set (α × α)
hV : V ∈ 𝓤 α
hVs : SymmetricRel V
hVU : V ○ V ○ V ⊆ U
this : ∀ᶠ (y : X) in 𝓝[s] x, y ∈ s ∧ (∀ (i : ι), (F i x, F i y) ∈ V) ∧ (f y, z) ∈ V
y : X
hys : y ∈ s
hFy : ∀ (i : ι), (F i x, F i y) ∈ V
hfy : (f y, z) ∈ V
i : ι
hi : i ∈ (fun x => F x y) ⁻¹' ball (f y) V
⊢ (F i x, z) ∈ id U

Next tactic:
exact hVU ⟨_, ⟨_, hFy i, (mem_ball_symmetry hVs).2 hi⟩, hfy⟩
@[ext]
theorem ext {X Y : Center C} (f g : X ⟶ Y) (w : f.f = g.f) : f = g := by
  

Proof state:
C : Type u₁
inst✝¹ : Category.{v₁, u₁} C
inst✝ : MonoidalCategory C
X Y : Center C
f g : X ⟶ Y
w : f.f = g.f
⊢ f = g

Next tactic:
cases f
@[ext]
theorem ext {X Y : Center C} (f g : X ⟶ Y) (w : f.f = g.f) : f = g := by
  cases f; 

Proof state:
case mk
C : Type u₁
inst✝¹ : Category.{v₁, u₁} C
inst✝ : MonoidalCategory C
X Y : Center C
g : X ⟶ Y
f✝ : X.fst ⟶ Y.fst
comm✝ : ∀ (U : C), (f✝ ⊗ 𝟙 U) ≫ (HalfBraiding.β Y.snd U).hom = (HalfBraiding.β X.snd U).hom ≫ (𝟙 U ⊗ f✝)
w : (Hom.mk f✝).f = g.f
⊢ Hom.mk f✝ = g

Next tactic:
cases g
@[ext]
theorem ext {X Y : Center C} (f g : X ⟶ Y) (w : f.f = g.f) : f = g := by
  cases f; cases g; 

Proof state:
case mk.mk
C : Type u₁
inst✝¹ : Category.{v₁, u₁} C
inst✝ : MonoidalCategory C
X Y : Center C
f✝¹ : X.fst ⟶ Y.fst
comm✝¹ : ∀ (U : C), (f✝¹ ⊗ 𝟙 U) ≫ (HalfBraiding.β Y.snd U).hom = (HalfBraiding.β X.snd U).hom ≫ (𝟙 U ⊗ f✝¹)
f✝ : X.fst ⟶ Y.fst
comm✝ : ∀ (U : C), (f✝ ⊗ 𝟙 U) ≫ (HalfBraiding.β Y.snd U).hom = (HalfBraiding.β X.snd U).hom ≫ (𝟙 U ⊗ f✝)
w : (Hom.mk f✝¹).f = (Hom.mk f✝).f
⊢ Hom.mk f✝¹ = Hom.mk f✝

Next tactic:
congr
/-- Construct an isomorphism in the Drinfeld center from
a morphism whose underlying morphism is an isomorphism.
-/
@[simps]
def isoMk {X Y : Center C} (f : X ⟶ Y) [IsIso f.f] : X ≅ Y where
  hom := f
  inv := ⟨inv f.f,
    fun U => by 

Proof state:
C : Type u₁
inst✝² : Category.{v₁, u₁} C
inst✝¹ : MonoidalCategory C
X Y : Center C
f : X ⟶ Y
inst✝ : IsIso f.f
U : C
⊢ (inv f.f ⊗ 𝟙 U) ≫ (HalfBraiding.β X.snd U).hom = (HalfBraiding.β Y.snd U).hom ≫ (𝟙 U ⊗ inv f.f)

Next tactic:
simp [← cancel_epi (f.f ⊗ 𝟙 U), ← comp_tensor_id_assoc, ← id_tensor_comp]
instance isIso_of_f_isIso {X Y : Center C} (f : X ⟶ Y) [IsIso f.f] : IsIso f := by
  

Proof state:
C : Type u₁
inst✝² : Category.{v₁, u₁} C
inst✝¹ : MonoidalCategory C
X Y : Center C
f : X ⟶ Y
inst✝ : IsIso f.f
⊢ IsIso f

Next tactic:
change IsIso (isoMk f).hom
instance isIso_of_f_isIso {X Y : Center C} (f : X ⟶ Y) [IsIso f.f] : IsIso f := by
  change IsIso (isoMk f).hom
  

Proof state:
C : Type u₁
inst✝² : Category.{v₁, u₁} C
inst✝¹ : MonoidalCategory C
X Y : Center C
f : X ⟶ Y
inst✝ : IsIso f.f
⊢ IsIso (isoMk f).hom

Next tactic:
infer_instance
/-- Auxiliary definition for the `MonoidalCategory` instance on `Center C`. -/
@[simps]
def tensorObj (X Y : Center C) : Center C :=
  ⟨X.1 ⊗ Y.1,
    { β := fun U =>
        α_ _ _ _ ≪≫
          (Iso.refl X.1 ⊗ Y.2.β U) ≪≫ (α_ _ _ _).symm ≪≫ (X.2.β U ⊗ Iso.refl Y.1) ≪≫ α_ _ _ _
      monoidal := fun U U' => by
        

Proof state:
C : Type u₁
inst✝¹ : Category.{v₁, u₁} C
inst✝ : MonoidalCategory C
X Y : Center C
U U' : C
⊢ ((fun U =>
          α_ X.fst Y.fst U ≪≫
            (Iso.refl X.fst ⊗ HalfBraiding.β Y.snd U) ≪≫
              (α_ X.fst U Y.fst).symm ≪≫ (HalfBraiding.β X.snd U ⊗ Iso.refl Y.fst) ≪≫ α_ U X.fst Y.fst)
        (U ⊗ U')).hom =
    (α_ (X.fst ⊗ Y.fst) U U').inv ≫
      (((fun U =>
                α_ X.fst Y.fst U ≪≫
                  (Iso.refl X.fst ⊗ HalfBraiding.β Y.snd U) ≪≫
                    (α_ X.fst U Y.fst).symm ≪≫ (HalfBraiding.β X.snd U ⊗ Iso.refl Y.fst) ≪≫ α_ U X.fst Y.fst)
              U).hom ⊗
          𝟙 U') ≫
        (α_ U (X.fst ⊗ Y.fst) U').hom ≫
          (𝟙 U ⊗
              ((fun U =>
                    α_ X.fst Y.fst U ≪≫
                      (Iso.refl X.fst ⊗ HalfBraiding.β Y.snd U) ≪≫
                        (α_ X.fst U Y.fst).symm ≪≫ (HalfBraiding.β X.snd U ⊗ Iso.refl Y.fst) ≪≫ α_ U X.fst Y.fst)
                  U').hom) ≫
            (α_ U U' (X.fst ⊗ Y.fst)).inv

Next tactic:
dsimp
/-- Auxiliary definition for the `MonoidalCategory` instance on `Center C`. -/
@[simps]
def tensorObj (X Y : Center C) : Center C :=
  ⟨X.1 ⊗ Y.1,
    { β := fun U =>
        α_ _ _ _ ≪≫
          (Iso.refl X.1 ⊗ Y.2.β U) ≪≫ (α_ _ _ _).symm ≪≫ (X.2.β U ⊗ Iso.refl Y.1) ≪≫ α_ _ _ _
      monoidal := fun U U' => by
        dsimp
        

Proof state:
C : Type u₁
inst✝¹ : Category.{v₁, u₁} C
inst✝ : MonoidalCategory C
X Y : Center C
U U' : C
⊢ (α_ X.fst Y.fst (U ⊗ U')).hom ≫
      (𝟙 X.fst ⊗ (HalfBraiding.β Y.snd (U ⊗ U')).hom) ≫
        (α_ X.fst (U ⊗ U') Y.fst).inv ≫
          ((HalfBraiding.β X.snd (U ⊗ U')).hom ⊗ 𝟙 Y.fst) ≫ (α_ (U ⊗ U') X.fst Y.fst).hom =
    (α_ (X.fst ⊗ Y.fst) U U').inv ≫
      ((α_ X.fst Y.fst U).hom ≫
            (𝟙 X.fst ⊗ (HalfBraiding.β Y.snd U).hom) ≫
              (α_ X.fst U Y.fst).inv ≫ ((HalfBraiding.β X.snd U).hom ⊗ 𝟙 Y.fst) ≫ (α_ U X.fst Y.fst).hom ⊗
          𝟙 U') ≫
        (α_ U (X.fst ⊗ Y.fst) U').hom ≫
          (𝟙 U ⊗
              (α_ X.fst Y.fst U').hom ≫
                (𝟙 X.fst ⊗ (HalfBraiding.β Y.snd U').hom) ≫
                  (α_ X.fst U' Y.fst).inv ≫ ((HalfBraiding.β X.snd U').hom ⊗ 𝟙 Y.fst) ≫ (α_ U' X.fst Y.fst).hom) ≫
            (α_ U U' (X.fst ⊗ Y.fst)).inv

Next tactic:
simp only [comp_tensor_id, id_tensor_comp, Category.assoc, HalfBraiding.monoidal]
/-- Auxiliary definition for the `MonoidalCategory` instance on `Center C`. -/
@[simps]
def tensorObj (X Y : Center C) : Center C :=
  ⟨X.1 ⊗ Y.1,
    { β := fun U =>
        α_ _ _ _ ≪≫
          (Iso.refl X.1 ⊗ Y.2.β U) ≪≫ (α_ _ _ _).symm ≪≫ (X.2.β U ⊗ Iso.refl Y.1) ≪≫ α_ _ _ _
      monoidal := fun U U' => by
        dsimp
        simp only [comp_tensor_id, id_tensor_comp, Category.assoc, HalfBraiding.monoidal]
        -- On the RHS, we'd like to commute `((X.snd.β U).hom ⊗ 𝟙 Y.fst) ⊗ 𝟙 U'`
        -- and `𝟙 U ⊗ 𝟙 X.fst ⊗ (Y.snd.β U').hom` past each other,
        -- but there are some associators we need to get out of the way first.
        

Proof state:
C : Type u₁
inst✝¹ : Category.{v₁, u₁} C
inst✝ : MonoidalCategory C
X Y : Center C
U U' : C
⊢ (α_ X.fst Y.fst (U ⊗ U')).hom ≫
      (𝟙 X.fst ⊗ (α_ Y.fst U U').inv) ≫
        (𝟙 X.fst ⊗ (HalfBraiding.β Y.snd U).hom ⊗ 𝟙 U') ≫
          (𝟙 X.fst ⊗ (α_ U Y.fst U').hom) ≫
            (𝟙 X.fst ⊗ 𝟙 U ⊗ (HalfBraiding.β Y.snd U').hom) ≫
              (𝟙 X.fst ⊗ (α_ U U' Y.fst).inv) ≫
                (α_ X.fst (U ⊗ U') Y.fst).inv ≫
                  ((α_ X.fst U U').inv ⊗ 𝟙 Y.fst) ≫
                    (((HalfBraiding.β X.snd U).hom ⊗ 𝟙 U') ⊗ 𝟙 Y.fst) ≫
                      ((α_ U X.fst U').hom ⊗ 𝟙 Y.fst) ≫
                        ((𝟙 U ⊗ (HalfBraiding.β X.snd U').hom) ⊗ 𝟙 Y.fst) ≫
                          ((α_ U U' X.fst).inv ⊗ 𝟙 Y.fst) ≫ (α_ (U ⊗ U') X.fst Y.fst).hom =
    (α_ (X.fst ⊗ Y.fst) U U').inv ≫
      ((α_ X.fst Y.fst U).hom ⊗ 𝟙 U') ≫
        ((𝟙 X.fst ⊗ (HalfBraiding.β Y.snd U).hom) ⊗ 𝟙 U') ≫
          ((α_ X.fst U Y.fst).inv ⊗ 𝟙 U') ≫
            (((HalfBraiding.β X.snd U).hom ⊗ 𝟙 Y.fst) ⊗ 𝟙 U') ≫
              ((α_ U X.fst Y.fst).hom ⊗ 𝟙 U') ≫
                (α_ U (X.fst ⊗ Y.fst) U').hom ≫
                  (𝟙 U ⊗ (α_ X.fst Y.fst U').hom) ≫
                    (𝟙 U ⊗ 𝟙 X.fst ⊗ (HalfBraiding.β Y.snd U').hom) ≫
                      (𝟙 U ⊗ (α_ X.fst U' Y.fst).inv) ≫
                        (𝟙 U ⊗ (HalfBraiding.β X.snd U').hom ⊗ 𝟙 Y.fst) ≫
                          (𝟙 U ⊗ (α_ U' X.fst Y.fst).hom) ≫ (α_ U U' (X.fst ⊗ Y.fst)).inv

Next tactic:
slice_rhs 6 8 => rw [pentagon]