-- Mathlib/Topology/GDelta/UniformSpace.lean
theorem IsGδ.setOf_continuousAt [UniformSpace Y] [IsCountablyGenerated (𝓤 Y)] (f : X → Y) :
    IsGδ { x | ContinuousAt f x }

Proof state:
case intro.intro.intro.intro.intro
X : Type u_1
Y : Type u_2
inst✝² : TopologicalSpace X
inst✝¹ : UniformSpace Y
inst✝ : (𝓤 Y).IsCountablyGenerated
f : X → Y
U : ℕ → Set (Y × Y)
left✝ : ∀ (i : ℕ), U i ∈ 𝓤 Y ∧ IsOpen (U i) ∧ SymmetricRel (U i)
hU : (𝓤 Y).HasAntitoneBasis fun i => id (U i)
k : ℕ
x : X
s : Set X
hsU : ∀ x ∈ s ×ˢ s, (f x.1, f x.2) ∈ U k
hsx : x ∈ s
hso : IsOpen s
⊢ {x | ∃ ia, (x ∈ ia ∧ IsOpen ia) ∧ ∀ x ∈ ia ×ˢ ia, (f x.1, f x.2) ∈ U k} ∈ 𝓝 x

Tactic:
filter_upwards [IsOpen.mem_nhds hso hsx] with _ hy using ⟨s, ⟨hy, hso⟩, hsU⟩

Result:
no goals

Proof state:
case intro.intro
X : Type u_1
Y : Type u_2
inst✝² : TopologicalSpace X
inst✝¹ : UniformSpace Y
inst✝ : (𝓤 Y).IsCountablyGenerated
f : X → Y
U : ℕ → Set (Y × Y)
left✝ : ∀ (i : ℕ), U i ∈ 𝓤 Y ∧ IsOpen (U i) ∧ SymmetricRel (U i)
hU : (𝓤 Y).HasAntitoneBasis fun i => id (U i)
⊢ IsGδ (⋂ i, {x | ∃ ia, (x ∈ ia ∧ IsOpen ia) ∧ ∀ x ∈ ia ×ˢ ia, (f x.1, f x.2) ∈ U i})

Tactic:
refine .iInter fun k ↦ IsOpen.isGδ <| isOpen_iff_mem_nhds.2 fun x ↦ ?_

Result:
case intro.intro
X : Type u_1
Y : Type u_2
inst✝² : TopologicalSpace X
inst✝¹ : UniformSpace Y
inst✝ : (𝓤 Y).IsCountablyGenerated
f : X → Y
U : ℕ → Set (Y × Y)
left✝ : ∀ (i : ℕ), U i ∈ 𝓤 Y ∧ IsOpen (U i) ∧ SymmetricRel (U i)
hU : (𝓤 Y).HasAntitoneBasis fun i => id (U i)
k : ℕ
x : X
⊢ x ∈ {x | ∃ ia, (x ∈ ia ∧ IsOpen ia) ∧ ∀ x ∈ ia ×ˢ ia, (f x.1, f x.2) ∈ U k} →
    {x | ∃ ia, (x ∈ ia ∧ IsOpen ia) ∧ ∀ x ∈ ia ×ˢ ia, (f x.1, f x.2) ∈ U k} ∈ 𝓝 x

Proof state:
case intro.intro
X : Type u_1
Y : Type u_2
inst✝² : TopologicalSpace X
inst✝¹ : UniformSpace Y
inst✝ : (𝓤 Y).IsCountablyGenerated
f : X → Y
U : ℕ → Set (Y × Y)
left✝ : ∀ (i : ℕ), U i ∈ 𝓤 Y ∧ IsOpen (U i) ∧ SymmetricRel (U i)
hU : (𝓤 Y).HasAntitoneBasis fun i => id (U i)
⊢ IsGδ {x | Tendsto (fun x => (f x.1, f x.2)) (𝓝 x ×ˢ 𝓝 x) (𝓤 Y)}

Tactic:
simp only [(nhds_basis_opens _).prod_self.tendsto_iff hU.toHasBasis, forall_prop_of_true,
  setOf_forall, id]

Result:
case intro.intro
X : Type u_1
Y : Type u_2
inst✝² : TopologicalSpace X
inst✝¹ : UniformSpace Y
inst✝ : (𝓤 Y).IsCountablyGenerated
f : X → Y
U : ℕ → Set (Y × Y)
left✝ : ∀ (i : ℕ), U i ∈ 𝓤 Y ∧ IsOpen (U i) ∧ SymmetricRel (U i)
hU : (𝓤 Y).HasAntitoneBasis fun i => id (U i)
⊢ IsGδ (⋂ i, {x | ∃ ia, (x ∈ ia ∧ IsOpen ia) ∧ ∀ x ∈ ia ×ˢ ia, (f x.1, f x.2) ∈ U i})

Proof state:
case intro.intro
X : Type u_1
Y : Type u_2
inst✝² : TopologicalSpace X
inst✝¹ : UniformSpace Y
inst✝ : (𝓤 Y).IsCountablyGenerated
f : X → Y
U : ℕ → Set (Y × Y)
left✝ : ∀ (i : ℕ), U i ∈ 𝓤 Y ∧ IsOpen (U i) ∧ SymmetricRel (U i)
hU : (𝓤 Y).HasAntitoneBasis fun i => id (U i)
⊢ IsGδ {x | ContinuousAt f x}

Tactic:
simp only [Uniform.continuousAt_iff_prod, nhds_prod_eq]

Result:
case intro.intro
X : Type u_1
Y : Type u_2
inst✝² : TopologicalSpace X
inst✝¹ : UniformSpace Y
inst✝ : (𝓤 Y).IsCountablyGenerated
f : X → Y
U : ℕ → Set (Y × Y)
left✝ : ∀ (i : ℕ), U i ∈ 𝓤 Y ∧ IsOpen (U i) ∧ SymmetricRel (U i)
hU : (𝓤 Y).HasAntitoneBasis fun i => id (U i)
⊢ IsGδ {x | Tendsto (fun x => (f x.1, f x.2)) (𝓝 x ×ˢ 𝓝 x) (𝓤 Y)}

Proof state:
X : Type u_1
Y : Type u_2
inst✝² : TopologicalSpace X
inst✝¹ : UniformSpace Y
inst✝ : (𝓤 Y).IsCountablyGenerated
f : X → Y
⊢ IsGδ {x | ContinuousAt f x}

Tactic:
obtain ⟨U, _, hU⟩ := (@uniformity_hasBasis_open_symmetric Y _).exists_antitone_subbasis

Result:
case intro.intro
X : Type u_1
Y : Type u_2
inst✝² : TopologicalSpace X
inst✝¹ : UniformSpace Y
inst✝ : (𝓤 Y).IsCountablyGenerated
f : X → Y
U : ℕ → Set (Y × Y)
left✝ : ∀ (i : ℕ), U i ∈ 𝓤 Y ∧ IsOpen (U i) ∧ SymmetricRel (U i)
hU : (𝓤 Y).HasAntitoneBasis fun i => id (U i)
⊢ IsGδ {x | ContinuousAt f x}

Proof state:
case intro.intro
X : Type u_1
Y : Type u_2
inst✝² : TopologicalSpace X
inst✝¹ : UniformSpace Y
inst✝ : (𝓤 Y).IsCountablyGenerated
f : X → Y
U : ℕ → Set (Y × Y)
left✝ : ∀ (i : ℕ), U i ∈ 𝓤 Y ∧ IsOpen (U i) ∧ SymmetricRel (U i)
hU : (𝓤 Y).HasAntitoneBasis fun i => id (U i)
k : ℕ
x : X
⊢ x ∈ {x | ∃ ia, (x ∈ ia ∧ IsOpen ia) ∧ ∀ x ∈ ia ×ˢ ia, (f x.1, f x.2) ∈ U k} →
    {x | ∃ ia, (x ∈ ia ∧ IsOpen ia) ∧ ∀ x ∈ ia ×ˢ ia, (f x.1, f x.2) ∈ U k} ∈ 𝓝 x

Tactic:
rintro ⟨s, ⟨hsx, hso⟩, hsU⟩

Result:
case intro.intro.intro.intro.intro
X : Type u_1
Y : Type u_2
inst✝² : TopologicalSpace X
inst✝¹ : UniformSpace Y
inst✝ : (𝓤 Y).IsCountablyGenerated
f : X → Y
U : ℕ → Set (Y × Y)
left✝ : ∀ (i : ℕ), U i ∈ 𝓤 Y ∧ IsOpen (U i) ∧ SymmetricRel (U i)
hU : (𝓤 Y).HasAntitoneBasis fun i => id (U i)
k : ℕ
x : X
s : Set X
hsU : ∀ x ∈ s ×ˢ s, (f x.1, f x.2) ∈ U k
hsx : x ∈ s
hso : IsOpen s
⊢ {x | ∃ ia, (x ∈ ia ∧ IsOpen ia) ∧ ∀ x ∈ ia ×ˢ ia, (f x.1, f x.2) ∈ U k} ∈ 𝓝 x