l3lab/ntp-mathlib huggingface dataset:
theorem frontier_inter_subset (s t : Set α) :
    frontier (s ∩ t) ⊆ frontier s ∩ closure t ∪ closure s ∩ frontier t := by
  

Proof state:
α : Type u
β : Type v
ι : Sort w
a : α
s✝ s₁ s₂ t✝ : Set α
p p₁ p₂ : α → Prop
inst✝ : TopologicalSpace α
s t : Set α
⊢ frontier (s ∩ t) ⊆ frontier s ∩ closure t ∪ closure s ∩ frontier t

Next tactic:
simp only [frontier_eq_closure_inter_closure, compl_inter, closure_union]
theorem frontier_inter_subset (s t : Set α) :
    frontier (s ∩ t) ⊆ frontier s ∩ closure t ∪ closure s ∩ frontier t := by
  simp only [frontier_eq_closure_inter_closure, compl_inter, closure_union]
  

Proof state:
α : Type u
β : Type v
ι : Sort w
a : α
s✝ s₁ s₂ t✝ : Set α
p p₁ p₂ : α → Prop
inst✝ : TopologicalSpace α
s t : Set α
⊢ closure (s ∩ t) ∩ (closure sᶜ ∪ closure tᶜ) ⊆
    closure s ∩ closure sᶜ ∩ closure t ∪ closure s ∩ (closure t ∩ closure tᶜ)

Next tactic:
refine' (inter_subset_inter_left _ (closure_inter_subset_inter_closure s t)).trans_eq _
theorem frontier_inter_subset (s t : Set α) :
    frontier (s ∩ t) ⊆ frontier s ∩ closure t ∪ closure s ∩ frontier t := by
  simp only [frontier_eq_closure_inter_closure, compl_inter, closure_union]
  refine' (inter_subset_inter_left _ (closure_inter_subset_inter_closure s t)).trans_eq _
  

Proof state:
α : Type u
β : Type v
ι : Sort w
a : α
s✝ s₁ s₂ t✝ : Set α
p p₁ p₂ : α → Prop
inst✝ : TopologicalSpace α
s t : Set α
⊢ closure s ∩ closure t ∩ (closure sᶜ ∪ closure tᶜ) =
    closure s ∩ closure sᶜ ∩ closure t ∪ closure s ∩ (closure t ∩ closure tᶜ)

Next tactic:
simp only [inter_distrib_left, inter_distrib_right, inter_assoc, inter_comm (closure t)]
theorem frontier_union_subset (s t : Set α) :
    frontier (s ∪ t) ⊆ frontier s ∩ closure tᶜ ∪ closure sᶜ ∩ frontier t := by
  

Proof state:
α : Type u
β : Type v
ι : Sort w
a : α
s✝ s₁ s₂ t✝ : Set α
p p₁ p₂ : α → Prop
inst✝ : TopologicalSpace α
s t : Set α
⊢ frontier (s ∪ t) ⊆ frontier s ∩ closure tᶜ ∪ closure sᶜ ∩ frontier t

Next tactic:
simpa only [frontier_compl, ← compl_union] using frontier_inter_subset sᶜ tᶜ
theorem IsClosed.frontier_eq {s : Set α} (hs : IsClosed s) : frontier s = s \ interior s := by
  

Proof state:
α : Type u
β : Type v
ι : Sort w
a : α
s✝ s₁ s₂ t : Set α
p p₁ p₂ : α → Prop
inst✝ : TopologicalSpace α
s : Set α
hs : IsClosed s
⊢ frontier s = s \ interior s

Next tactic:
rw [frontier, hs.closure_eq]
theorem IsOpen.frontier_eq {s : Set α} (hs : IsOpen s) : frontier s = closure s \ s := by
  

Proof state:
α : Type u
β : Type v
ι : Sort w
a : α
s✝ s₁ s₂ t : Set α
p p₁ p₂ : α → Prop
inst✝ : TopologicalSpace α
s : Set α
hs : IsOpen s
⊢ frontier s = closure s \ s

Next tactic:
rw [frontier, hs.interior_eq]
theorem IsOpen.inter_frontier_eq {s : Set α} (hs : IsOpen s) : s ∩ frontier s = ∅ := by
  

Proof state:
α : Type u
β : Type v
ι : Sort w
a : α
s✝ s₁ s₂ t : Set α
p p₁ p₂ : α → Prop
inst✝ : TopologicalSpace α
s : Set α
hs : IsOpen s
⊢ s ∩ frontier s = ∅

Next tactic:
rw [hs.frontier_eq, inter_diff_self]
/-- The frontier of a set is closed. -/
theorem isClosed_frontier {s : Set α} : IsClosed (frontier s) := by
  

Proof state:
α : Type u
β : Type v
ι : Sort w
a : α
s✝ s₁ s₂ t : Set α
p p₁ p₂ : α → Prop
inst✝ : TopologicalSpace α
s : Set α
⊢ IsClosed (frontier s)

Next tactic:
rw [frontier_eq_closure_inter_closure]
/-- The frontier of a set is closed. -/
theorem isClosed_frontier {s : Set α} : IsClosed (frontier s) := by
  rw [frontier_eq_closure_inter_closure]; 

Proof state:
α : Type u
β : Type v
ι : Sort w
a : α
s✝ s₁ s₂ t : Set α
p p₁ p₂ : α → Prop
inst✝ : TopologicalSpace α
s : Set α
⊢ IsClosed (closure s ∩ closure sᶜ)

Next tactic:
exact IsClosed.inter isClosed_closure isClosed_closure
/-- The frontier of a closed set has no interior point. -/
theorem interior_frontier {s : Set α} (h : IsClosed s) : interior (frontier s) = ∅ := by
  

Proof state:
α : Type u
β : Type v
ι : Sort w
a : α
s✝ s₁ s₂ t : Set α
p p₁ p₂ : α → Prop
inst✝ : TopologicalSpace α
s : Set α
h : IsClosed s
⊢ interior (frontier s) = ∅

Next tactic:
have A : frontier s = s \ interior s := h.frontier_eq
/-- The frontier of a closed set has no interior point. -/
theorem interior_frontier {s : Set α} (h : IsClosed s) : interior (frontier s) = ∅ := by
  have A : frontier s = s \ interior s := h.frontier_eq
  

Proof state:
α : Type u
β : Type v
ι : Sort w
a : α
s✝ s₁ s₂ t : Set α
p p₁ p₂ : α → Prop
inst✝ : TopologicalSpace α
s : Set α
h : IsClosed s
A : frontier s = s \ interior s
⊢ interior (frontier s) = ∅

Next tactic:
have B : interior (frontier s) ⊆ interior s := by rw [A]; exact interior_mono (diff_subset _ _)
/-- The frontier of a closed set has no interior point. -/
theorem interior_frontier {s : Set α} (h : IsClosed s) : interior (frontier s) = ∅ := by
  have A : frontier s = s \ interior s := h.frontier_eq
  have B : interior (frontier s) ⊆ interior s := by 

Proof state:
α : Type u
β : Type v
ι : Sort w
a : α
s✝ s₁ s₂ t : Set α
p p₁ p₂ : α → Prop
inst✝ : TopologicalSpace α
s : Set α
h : IsClosed s
A : frontier s = s \ interior s
⊢ interior (frontier s) ⊆ interior s

Next tactic:
rw [A]
/-- The frontier of a closed set has no interior point. -/
theorem interior_frontier {s : Set α} (h : IsClosed s) : interior (frontier s) = ∅ := by
  have A : frontier s = s \ interior s := h.frontier_eq
  have B : interior (frontier s) ⊆ interior s := by rw [A]; 

Proof state:
α : Type u
β : Type v
ι : Sort w
a : α
s✝ s₁ s₂ t : Set α
p p₁ p₂ : α → Prop
inst✝ : TopologicalSpace α
s : Set α
h : IsClosed s
A : frontier s = s \ interior s
⊢ interior (s \ interior s) ⊆ interior s

Next tactic:
exact interior_mono (diff_subset _ _)
/-- The frontier of a closed set has no interior point. -/
theorem interior_frontier {s : Set α} (h : IsClosed s) : interior (frontier s) = ∅ := by
  have A : frontier s = s \ interior s := h.frontier_eq
  have B : interior (frontier s) ⊆ interior s := by rw [A]; exact interior_mono (diff_subset _ _)
  

Proof state:
α : Type u
β : Type v
ι : Sort w
a : α
s✝ s₁ s₂ t : Set α
p p₁ p₂ : α → Prop
inst✝ : TopologicalSpace α
s : Set α
h : IsClosed s
A : frontier s = s \ interior s
B : interior (frontier s) ⊆ interior s
⊢ interior (frontier s) = ∅

Next tactic:
have C : interior (frontier s) ⊆ frontier s := interior_subset
/-- The frontier of a closed set has no interior point. -/
theorem interior_frontier {s : Set α} (h : IsClosed s) : interior (frontier s) = ∅ := by
  have A : frontier s = s \ interior s := h.frontier_eq
  have B : interior (frontier s) ⊆ interior s := by rw [A]; exact interior_mono (diff_subset _ _)
  have C : interior (frontier s) ⊆ frontier s := interior_subset
  

Proof state:
α : Type u
β : Type v
ι : Sort w
a : α
s✝ s₁ s₂ t : Set α
p p₁ p₂ : α → Prop
inst✝ : TopologicalSpace α
s : Set α
h : IsClosed s
A : frontier s = s \ interior s
B : interior (frontier s) ⊆ interior s
C : interior (frontier s) ⊆ frontier s
⊢ interior (frontier s) = ∅

Next tactic:
have : interior (frontier s) ⊆ interior s ∩ (s \ interior s) :=
    subset_inter B (by simpa [A] using C)
/-- The frontier of a closed set has no interior point. -/
theorem interior_frontier {s : Set α} (h : IsClosed s) : interior (frontier s) = ∅ := by
  have A : frontier s = s \ interior s := h.frontier_eq
  have B : interior (frontier s) ⊆ interior s := by rw [A]; exact interior_mono (diff_subset _ _)
  have C : interior (frontier s) ⊆ frontier s := interior_subset
  have : interior (frontier s) ⊆ interior s ∩ (s \ interior s) :=
    subset_inter B (by 

Proof state:
α : Type u
β : Type v
ι : Sort w
a : α
s✝ s₁ s₂ t : Set α
p p₁ p₂ : α → Prop
inst✝ : TopologicalSpace α
s : Set α
h : IsClosed s
A : frontier s = s \ interior s
B : interior (frontier s) ⊆ interior s
C : interior (frontier s) ⊆ frontier s
⊢ interior (frontier s) ⊆ s \ interior s

Next tactic:
simpa [A] using C
/-- The frontier of a closed set has no interior point. -/
theorem interior_frontier {s : Set α} (h : IsClosed s) : interior (frontier s) = ∅ := by
  have A : frontier s = s \ interior s := h.frontier_eq
  have B : interior (frontier s) ⊆ interior s := by rw [A]; exact interior_mono (diff_subset _ _)
  have C : interior (frontier s) ⊆ frontier s := interior_subset
  have : interior (frontier s) ⊆ interior s ∩ (s \ interior s) :=
    subset_inter B (by simpa [A] using C)
  

Proof state:
α : Type u
β : Type v
ι : Sort w
a : α
s✝ s₁ s₂ t : Set α
p p₁ p₂ : α → Prop
inst✝ : TopologicalSpace α
s : Set α
h : IsClosed s
A : frontier s = s \ interior s
B : interior (frontier s) ⊆ interior s
C : interior (frontier s) ⊆ frontier s
this : interior (frontier s) ⊆ interior s ∩ (s \ interior s)
⊢ interior (frontier s) = ∅

Next tactic:
rwa [inter_diff_self, subset_empty_iff] at this
theorem frontier_eq_inter_compl_interior {s : Set α} :
    frontier s = (interior s)ᶜ ∩ (interior sᶜ)ᶜ := by
  

Proof state:
α : Type u
β : Type v
ι : Sort w
a : α
s✝ s₁ s₂ t : Set α
p p₁ p₂ : α → Prop
inst✝ : TopologicalSpace α
s : Set α
⊢ frontier s = (interior s)ᶜ ∩ (interior sᶜ)ᶜ

Next tactic:
rw [← frontier_compl, ← closure_compl, ← diff_eq, closure_diff_interior]
theorem compl_frontier_eq_union_interior {s : Set α} :
    (frontier s)ᶜ = interior s ∪ interior sᶜ := by
  

Proof state:
α : Type u
β : Type v
ι : Sort w
a : α
s✝ s₁ s₂ t : Set α
p p₁ p₂ : α → Prop
inst✝ : TopologicalSpace α
s : Set α
⊢ (frontier s)ᶜ = interior s ∪ interior sᶜ

Next tactic:
rw [frontier_eq_inter_compl_interior]
theorem compl_frontier_eq_union_interior {s : Set α} :
    (frontier s)ᶜ = interior s ∪ interior sᶜ := by
  rw [frontier_eq_inter_compl_interior]
  

Proof state:
α : Type u
β : Type v
ι : Sort w
a : α
s✝ s₁ s₂ t : Set α
p p₁ p₂ : α → Prop
inst✝ : TopologicalSpace α
s : Set α
⊢ ((interior s)ᶜ ∩ (interior sᶜ)ᶜ)ᶜ = interior s ∪ interior sᶜ

Next tactic:
simp only [compl_inter, compl_compl]
theorem nhds_def' (a : α) : 𝓝 a = ⨅ (s : Set α) (_ : IsOpen s) (_ : a ∈ s), 𝓟 s := by
  

Proof state:
α : Type u
β : Type v
ι : Sort w
a✝ : α
s s₁ s₂ t : Set α
p p₁ p₂ : α → Prop
inst✝ : TopologicalSpace α
a : α
⊢ 𝓝 a = ⨅ s, ⨅ (_ : IsOpen s), ⨅ (_ : a ∈ s), 𝓟 s

Next tactic:
simp only [nhds_def, mem_setOf_eq, @and_comm (a ∈ _), iInf_and]
/-- The open sets containing `a` are a basis for the neighborhood filter. See `nhds_basis_opens'`
for a variant using open neighborhoods instead. -/
theorem nhds_basis_opens (a : α) :
    (𝓝 a).HasBasis (fun s : Set α => a ∈ s ∧ IsOpen s) fun s => s := by
  

Proof state:
α : Type u
β : Type v
ι : Sort w
a✝ : α
s s₁ s₂ t : Set α
p p₁ p₂ : α → Prop
inst✝ : TopologicalSpace α
a : α
⊢ HasBasis (𝓝 a) (fun s => a ∈ s ∧ IsOpen s) fun s => s

Next tactic:
rw [nhds_def]
/-- The open sets containing `a` are a basis for the neighborhood filter. See `nhds_basis_opens'`
for a variant using open neighborhoods instead. -/
theorem nhds_basis_opens (a : α) :
    (𝓝 a).HasBasis (fun s : Set α => a ∈ s ∧ IsOpen s) fun s => s := by
  rw [nhds_def]
  

Proof state:
α : Type u
β : Type v
ι : Sort w
a✝ : α
s s₁ s₂ t : Set α
p p₁ p₂ : α → Prop
inst✝ : TopologicalSpace α
a : α
⊢ HasBasis (⨅ s ∈ {s | a ∈ s ∧ IsOpen s}, 𝓟 s) (fun s => a ∈ s ∧ IsOpen s) fun s => s

Next tactic:
exact hasBasis_biInf_principal
    (fun s ⟨has, hs⟩ t ⟨hat, ht⟩ =>
      ⟨s ∩ t, ⟨⟨has, hat⟩, IsOpen.inter hs ht⟩, ⟨inter_subset_left _ _, inter_subset_right _ _⟩⟩)
    ⟨univ, ⟨mem_univ a, isOpen_univ⟩⟩
theorem nhds_basis_closeds (a : α) : (𝓝 a).HasBasis (fun s : Set α => a ∉ s ∧ IsClosed s) compl :=
  ⟨fun t => (nhds_basis_opens a).mem_iff.trans <|
    compl_surjective.exists.trans <| by 

Proof state:
α : Type u
β : Type v
ι : Sort w
a✝ : α
s s₁ s₂ t✝ : Set α
p p₁ p₂ : α → Prop
inst✝ : TopologicalSpace α
a : α
t : Set α
⊢ (∃ x, (a ∈ xᶜ ∧ IsOpen xᶜ) ∧ xᶜ ⊆ t) ↔ ∃ i, (a ∉ i ∧ IsClosed i) ∧ iᶜ ⊆ t

Next tactic:
simp only [isOpen_compl_iff, mem_compl_iff]
/-- A filter lies below the neighborhood filter at `a` iff it contains every open set around `a`. -/
theorem le_nhds_iff {f a} : f ≤ 𝓝 a ↔ ∀ s : Set α, a ∈ s → IsOpen s → s ∈ f := by 

Proof state:
α : Type u
β : Type v
ι : Sort w
a✝ : α
s s₁ s₂ t : Set α
p p₁ p₂ : α → Prop
inst✝ : TopologicalSpace α
f : Filter α
a : α
⊢ f ≤ 𝓝 a ↔ ∀ (s : Set α), a ∈ s → IsOpen s → s ∈ f

Next tactic:
simp [nhds_def]
/-- To show a filter is above the neighborhood filter at `a`, it suffices to show that it is above
the principal filter of some open set `s` containing `a`. -/
theorem nhds_le_of_le {f a} {s : Set α} (h : a ∈ s) (o : IsOpen s) (sf : 𝓟 s ≤ f) : 𝓝 a ≤ f := by
  

Proof state:
α : Type u
β : Type v
ι : Sort w
a✝ : α
s✝ s₁ s₂ t : Set α
p p₁ p₂ : α → Prop
inst✝ : TopologicalSpace α
f : Filter α
a : α
s : Set α
h : a ∈ s
o : IsOpen s
sf : 𝓟 s ≤ f
⊢ 𝓝 a ≤ f

Next tactic:
rw [nhds_def]
/-- To show a filter is above the neighborhood filter at `a`, it suffices to show that it is above
the principal filter of some open set `s` containing `a`. -/
theorem nhds_le_of_le {f a} {s : Set α} (h : a ∈ s) (o : IsOpen s) (sf : 𝓟 s ≤ f) : 𝓝 a ≤ f := by
  rw [nhds_def]; 

Proof state:
α : Type u
β : Type v
ι : Sort w
a✝ : α
s✝ s₁ s₂ t : Set α
p p₁ p₂ : α → Prop
inst✝ : TopologicalSpace α
f : Filter α
a : α
s : Set α
h : a ∈ s
o : IsOpen s
sf : 𝓟 s ≤ f
⊢ ⨅ s ∈ {s | a ∈ s ∧ IsOpen s}, 𝓟 s ≤ f

Next tactic:
exact iInf₂_le_of_le s ⟨h, o⟩ sf
/-- A predicate is true in a neighborhood of `a` iff it is true for all the points in an open set
containing `a`. -/
theorem eventually_nhds_iff {a : α} {p : α → Prop} :
    (∀ᶠ x in 𝓝 a, p x) ↔ ∃ t : Set α, (∀ x ∈ t, p x) ∧ IsOpen t ∧ a ∈ t :=
  mem_nhds_iff.trans <| by 

Proof state:
α : Type u
β : Type v
ι : Sort w
a✝ : α
s s₁ s₂ t : Set α
p✝ p₁ p₂ : α → Prop
inst✝ : TopologicalSpace α
a : α
p : α → Prop
⊢ (∃ t ⊆ {x | (fun x => p x) x}, IsOpen t ∧ a ∈ t) ↔ ∃ t, (∀ x ∈ t, p x) ∧ IsOpen t ∧ a ∈ t

Next tactic:
simp only [subset_def, exists_prop, mem_setOf_eq]
/-- The open neighborhoods of `a` are a basis for the neighborhood filter. See `nhds_basis_opens`
for a variant using open sets around `a` instead. -/
theorem nhds_basis_opens' (a : α) :
    (𝓝 a).HasBasis (fun s : Set α => s ∈ 𝓝 a ∧ IsOpen s) fun x => x := by
  

Proof state:
α : Type u
β : Type v
ι : Sort w
a✝ : α
s s₁ s₂ t : Set α
p p₁ p₂ : α → Prop
inst✝ : TopologicalSpace α
a : α
⊢ HasBasis (𝓝 a) (fun s => s ∈ 𝓝 a ∧ IsOpen s) fun x => x

Next tactic:
convert nhds_basis_opens a using 2
/-- The open neighborhoods of `a` are a basis for the neighborhood filter. See `nhds_basis_opens`
for a variant using open sets around `a` instead. -/
theorem nhds_basis_opens' (a : α) :
    (𝓝 a).HasBasis (fun s : Set α => s ∈ 𝓝 a ∧ IsOpen s) fun x => x := by
  convert nhds_basis_opens a using 2
  

Proof state:
case h.e'_4.h.a
α : Type u
β : Type v
ι : Sort w
a✝ : α
s s₁ s₂ t : Set α
p p₁ p₂ : α → Prop
inst✝ : TopologicalSpace α
a : α
x✝ : Set α
⊢ x✝ ∈ 𝓝 a ∧ IsOpen x✝ ↔ a ∈ x✝ ∧ IsOpen x✝

Next tactic:
exact and_congr_left_iff.2 IsOpen.mem_nhds_iff
/-- If `U` is a neighborhood of each point of a set `s` then it is a neighborhood of s:
it contains an open set containing `s`. -/
theorem exists_open_set_nhds' {s U : Set α} (h : U ∈ ⨆ x ∈ s, 𝓝 x) :
    ∃ V : Set α, s ⊆ V ∧ IsOpen V ∧ V ⊆ U :=
  exists_open_set_nhds (by 

Proof state:
α : Type u
β : Type v
ι : Sort w
a : α
s✝ s₁ s₂ t : Set α
p p₁ p₂ : α → Prop
inst✝ : TopologicalSpace α
s U : Set α
h : U ∈ ⨆ x ∈ s, 𝓝 x
⊢ ∀ x ∈ s, U ∈ 𝓝 x

Next tactic:
simpa using h
@[simp]
theorem frequently_frequently_nhds {p : α → Prop} {a : α} :
    (∃ᶠ y in 𝓝 a, ∃ᶠ x in 𝓝 y, p x) ↔ ∃ᶠ x in 𝓝 a, p x := by
  

Proof state:
α : Type u
β : Type v
ι : Sort w
a✝ : α
s s₁ s₂ t : Set α
p✝ p₁ p₂ : α → Prop
inst✝ : TopologicalSpace α
p : α → Prop
a : α
⊢ (∃ᶠ (y : α) in 𝓝 a, ∃ᶠ (x : α) in 𝓝 y, p x) ↔ ∃ᶠ (x : α) in 𝓝 a, p x

Next tactic:
rw [← not_iff_not]
@[simp]
theorem frequently_frequently_nhds {p : α → Prop} {a : α} :
    (∃ᶠ y in 𝓝 a, ∃ᶠ x in 𝓝 y, p x) ↔ ∃ᶠ x in 𝓝 a, p x := by
  rw [← not_iff_not]
  

Proof state:
α : Type u
β : Type v
ι : Sort w
a✝ : α
s s₁ s₂ t : Set α
p✝ p₁ p₂ : α → Prop
inst✝ : TopologicalSpace α
p : α → Prop
a : α
⊢ (¬∃ᶠ (y : α) in 𝓝 a, ∃ᶠ (x : α) in 𝓝 y, p x) ↔ ¬∃ᶠ (x : α) in 𝓝 a, p x

Next tactic:
simp only [not_frequently, eventually_eventually_nhds]
theorem all_mem_nhds (x : α) (P : Set α → Prop) (hP : ∀ s t, s ⊆ t → P s → P t) :
    (∀ s ∈ 𝓝 x, P s) ↔ ∀ s, IsOpen s → x ∈ s → P s :=
  ((nhds_basis_opens x).forall_iff hP).trans <| by 

Proof state:
α : Type u
β : Type v
ι : Sort w
a : α
s s₁ s₂ t : Set α
p p₁ p₂ : α → Prop
inst✝ : TopologicalSpace α
x : α
P : Set α → Prop
hP : ∀ (s t : Set α), s ⊆ t → P s → P t
⊢ (∀ (i : Set α), x ∈ i ∧ IsOpen i → P i) ↔ ∀ (s : Set α), IsOpen s → x ∈ s → P s

Next tactic:
simp only [@and_comm (x ∈ _), and_imp]
theorem tendsto_atTop_nhds [Nonempty β] [SemilatticeSup β] {f : β → α} {a : α} :
    Tendsto f atTop (𝓝 a) ↔ ∀ U : Set α, a ∈ U → IsOpen U → ∃ N, ∀ n, N ≤ n → f n ∈ U :=
  (atTop_basis.tendsto_iff (nhds_basis_opens a)).trans <| by
    

Proof state:
α : Type u
β : Type v
ι : Sort w
a✝ : α
s s₁ s₂ t : Set α
p p₁ p₂ : α → Prop
inst✝² : TopologicalSpace α
inst✝¹ : Nonempty β
inst✝ : SemilatticeSup β
f : β → α
a : α
⊢ (∀ (ib : Set α), a ∈ ib ∧ IsOpen ib → ∃ ia, True ∧ ∀ x ∈ Ici ia, f x ∈ ib) ↔
    ∀ (U : Set α), a ∈ U → IsOpen U → ∃ N, ∀ (n : β), N ≤ n → f n ∈ U

Next tactic:
simp only [and_imp, exists_prop, true_and_iff, mem_Ici, ge_iff_le]
theorem clusterPt_iff_not_disjoint {x : α} {F : Filter α} :
    ClusterPt x F ↔ ¬Disjoint (𝓝 x) F := by
  

Proof state:
α : Type u
β : Type v
ι : Sort w
a : α
s s₁ s₂ t : Set α
p p₁ p₂ : α → Prop
inst✝ : TopologicalSpace α
x : α
F : Filter α
⊢ ClusterPt x F ↔ ¬Disjoint (𝓝 x) F

Next tactic:
rw [disjoint_iff, ClusterPt, neBot_iff]
theorem clusterPt_principal_iff_frequently {x : α} {s : Set α} :
    ClusterPt x (𝓟 s) ↔ ∃ᶠ y in 𝓝 x, y ∈ s := by
  

Proof state:
α : Type u
β : Type v
ι : Sort w
a : α
s✝ s₁ s₂ t : Set α
p p₁ p₂ : α → Prop
inst✝ : TopologicalSpace α
x : α
s : Set α
⊢ ClusterPt x (𝓟 s) ↔ ∃ᶠ (y : α) in 𝓝 x, y ∈ s

Next tactic:
simp only [clusterPt_principal_iff, frequently_iff, Set.Nonempty, exists_prop, mem_inter_iff]
theorem ClusterPt.of_le_nhds {x : α} {f : Filter α} (H : f ≤ 𝓝 x) [NeBot f] : ClusterPt x f := by
  

Proof state:
α : Type u
β : Type v
ι : Sort w
a : α
s s₁ s₂ t : Set α
p p₁ p₂ : α → Prop
inst✝¹ : TopologicalSpace α
x : α
f : Filter α
H : f ≤ 𝓝 x
inst✝ : NeBot f
⊢ ClusterPt x f

Next tactic:
rwa [ClusterPt, inf_eq_right.mpr H]
theorem ClusterPt.of_nhds_le {x : α} {f : Filter α} (H : 𝓝 x ≤ f) : ClusterPt x f := by
  

Proof state:
α : Type u
β : Type v
ι : Sort w
a : α
s s₁ s₂ t : Set α
p p₁ p₂ : α → Prop
inst✝ : TopologicalSpace α
x : α
f : Filter α
H : 𝓝 x ≤ f
⊢ ClusterPt x f

Next tactic:
simp only [ClusterPt, inf_eq_left.mpr H, nhds_neBot]
theorem mapClusterPt_iff {ι : Type*} (x : α) (F : Filter ι) (u : ι → α) :
    MapClusterPt x F u ↔ ∀ s ∈ 𝓝 x, ∃ᶠ a in F, u a ∈ s := by
  

Proof state:
α : Type u
β : Type v
ι✝ : Sort w
a : α
s s₁ s₂ t : Set α
p p₁ p₂ : α → Prop
inst✝ : TopologicalSpace α
ι : Type u_1
x : α
F : Filter ι
u : ι → α
⊢ MapClusterPt x F u ↔ ∀ s ∈ 𝓝 x, ∃ᶠ (a : ι) in F, u a ∈ s

Next tactic:
simp_rw [MapClusterPt, ClusterPt, inf_neBot_iff_frequently_left, frequently_map]
theorem mapClusterPt_iff {ι : Type*} (x : α) (F : Filter ι) (u : ι → α) :
    MapClusterPt x F u ↔ ∀ s ∈ 𝓝 x, ∃ᶠ a in F, u a ∈ s := by
  simp_rw [MapClusterPt, ClusterPt, inf_neBot_iff_frequently_left, frequently_map]
  

Proof state:
α : Type u
β : Type v
ι✝ : Sort w
a : α
s s₁ s₂ t : Set α
p p₁ p₂ : α → Prop
inst✝ : TopologicalSpace α
ι : Type u_1
x : α
F : Filter ι
u : ι → α
⊢ (∀ {p : α → Prop}, (∀ᶠ (x : α) in 𝓝 x, p x) → ∃ᶠ (a : ι) in F, p (u a)) ↔ ∀ s ∈ 𝓝 x, ∃ᶠ (a : ι) in F, u a ∈ s

Next tactic:
rfl
theorem mapClusterPt_of_comp {ι δ : Type*} {F : Filter ι} {φ : δ → ι} {p : Filter δ} {x : α}
    {u : ι → α} [NeBot p] (h : Tendsto φ p F) (H : Tendsto (u ∘ φ) p (𝓝 x)) :
    MapClusterPt x F u := by
  

Proof state:
α : Type u
β : Type v
ι✝ : Sort w
a : α
s s₁ s₂ t : Set α
p✝ p₁ p₂ : α → Prop
inst✝¹ : TopologicalSpace α
ι : Type u_1
δ : Type u_2
F : Filter ι
φ : δ → ι
p : Filter δ
x : α
u : ι → α
inst✝ : NeBot p
h : Tendsto φ p F
H : Tendsto (u ∘ φ) p (𝓝 x)
⊢ MapClusterPt x F u

Next tactic:
have :=
    calc
      map (u ∘ φ) p = map u (map φ p) := map_map
      _ ≤ map u F := map_mono h
theorem mapClusterPt_of_comp {ι δ : Type*} {F : Filter ι} {φ : δ → ι} {p : Filter δ} {x : α}
    {u : ι → α} [NeBot p] (h : Tendsto φ p F) (H : Tendsto (u ∘ φ) p (𝓝 x)) :
    MapClusterPt x F u := by
  have :=
    calc
      map (u ∘ φ) p = map u (map φ p) := map_map
      _ ≤ map u F := map_mono h
  

Proof state:
α : Type u
β : Type v
ι✝ : Sort w
a : α
s s₁ s₂ t : Set α
p✝ p₁ p₂ : α → Prop
inst✝¹ : TopologicalSpace α
ι : Type u_1
δ : Type u_2
F : Filter ι
φ : δ → ι
p : Filter δ
x : α
u : ι → α
inst✝ : NeBot p
h : Tendsto φ p F
H : Tendsto (u ∘ φ) p (𝓝 x)
this : map (u ∘ φ) p ≤ map u F
⊢ MapClusterPt x F u

Next tactic:
have : map (u ∘ φ) p ≤ 𝓝 x ⊓ map u F := le_inf H this
theorem mapClusterPt_of_comp {ι δ : Type*} {F : Filter ι} {φ : δ → ι} {p : Filter δ} {x : α}
    {u : ι → α} [NeBot p] (h : Tendsto φ p F) (H : Tendsto (u ∘ φ) p (𝓝 x)) :
    MapClusterPt x F u := by
  have :=
    calc
      map (u ∘ φ) p = map u (map φ p) := map_map
      _ ≤ map u F := map_mono h
  have : map (u ∘ φ) p ≤ 𝓝 x ⊓ map u F := le_inf H this
  

Proof state:
α : Type u
β : Type v
ι✝ : Sort w
a : α
s s₁ s₂ t : Set α
p✝ p₁ p₂ : α → Prop
inst✝¹ : TopologicalSpace α
ι : Type u_1
δ : Type u_2
F : Filter ι
φ : δ → ι
p : Filter δ
x : α
u : ι → α
inst✝ : NeBot p
h : Tendsto φ p F
H : Tendsto (u ∘ φ) p (𝓝 x)
this✝ : map (u ∘ φ) p ≤ map u F
this : map (u ∘ φ) p ≤ 𝓝 x ⊓ map u F
⊢ MapClusterPt x F u

Next tactic:
exact neBot_of_le this
theorem acc_iff_cluster (x : α) (F : Filter α) : AccPt x F ↔ ClusterPt x (𝓟 {x}ᶜ ⊓ F) := by
  

Proof state:
α : Type u
β : Type v
ι : Sort w
a : α
s s₁ s₂ t : Set α
p p₁ p₂ : α → Prop
inst✝ : TopologicalSpace α
x : α
F : Filter α
⊢ AccPt x F ↔ ClusterPt x (𝓟 {x}ᶜ ⊓ F)

Next tactic:
rw [AccPt, nhdsWithin, ClusterPt, inf_assoc]
/-- `x` is an accumulation point of a set `C` iff it is a cluster point of `C ∖ {x}`.-/
theorem acc_principal_iff_cluster (x : α) (C : Set α) :
    AccPt x (𝓟 C) ↔ ClusterPt x (𝓟 (C \ {x})) := by
  

Proof state:
α : Type u
β : Type v
ι : Sort w
a : α
s s₁ s₂ t : Set α
p p₁ p₂ : α → Prop
inst✝ : TopologicalSpace α
x : α
C : Set α
⊢ AccPt x (𝓟 C) ↔ ClusterPt x (𝓟 (C \ {x}))

Next tactic:
rw [acc_iff_cluster, inf_principal, inter_comm, diff_eq]
/-- `x` is an accumulation point of a set `C` iff every neighborhood
of `x` contains a point of `C` other than `x`. -/
theorem accPt_iff_nhds (x : α) (C : Set α) : AccPt x (𝓟 C) ↔ ∀ U ∈ 𝓝 x, ∃ y ∈ U ∩ C, y ≠ x := by
  

Proof state:
α : Type u
β : Type v
ι : Sort w
a : α
s s₁ s₂ t : Set α
p p₁ p₂ : α → Prop
inst✝ : TopologicalSpace α
x : α
C : Set α
⊢ AccPt x (𝓟 C) ↔ ∀ U ∈ 𝓝 x, ∃ y ∈ U ∩ C, y ≠ x

Next tactic:
simp [acc_principal_iff_cluster, clusterPt_principal_iff, Set.Nonempty, exists_prop, and_assoc,
    @and_comm (¬_ = x)]
/-- `x` is an accumulation point of a set `C` iff
there are points near `x` in `C` and different from `x`.-/
theorem accPt_iff_frequently (x : α) (C : Set α) : AccPt x (𝓟 C) ↔ ∃ᶠ y in 𝓝 x, y ≠ x ∧ y ∈ C := by
  

Proof state:
α : Type u
β : Type v
ι : Sort w
a : α
s s₁ s₂ t : Set α
p p₁ p₂ : α → Prop
inst✝ : TopologicalSpace α
x : α
C : Set α
⊢ AccPt x (𝓟 C) ↔ ∃ᶠ (y : α) in 𝓝 x, y ≠ x ∧ y ∈ C

Next tactic:
simp [acc_principal_iff_cluster, clusterPt_principal_iff_frequently, and_comm]
theorem interior_eq_nhds' {s : Set α} : interior s = { a | s ∈ 𝓝 a } :=
  Set.ext fun x => by 

Proof state:
α : Type u
β : Type v
ι : Sort w
a : α
s✝ s₁ s₂ t : Set α
p p₁ p₂ : α → Prop
inst✝ : TopologicalSpace α
s : Set α
x : α
⊢ x ∈ interior s ↔ x ∈ {a | s ∈ 𝓝 a}

Next tactic:
simp only [mem_interior, mem_nhds_iff, mem_setOf_eq]
theorem interior_eq_nhds {s : Set α} : interior s = { a | 𝓝 a ≤ 𝓟 s } :=
  interior_eq_nhds'.trans <| by 

Proof state:
α : Type u
β : Type v
ι : Sort w
a : α
s✝ s₁ s₂ t : Set α
p p₁ p₂ : α → Prop
inst✝ : TopologicalSpace α
s : Set α
⊢ {a | s ∈ 𝓝 a} = {a | 𝓝 a ≤ 𝓟 s}

Next tactic:
simp only [le_principal_iff]
theorem isOpen_setOf_eventually_nhds {p : α → Prop} : IsOpen { x | ∀ᶠ y in 𝓝 x, p y } := by
  

Proof state:
α : Type u
β : Type v
ι : Sort w
a : α
s s₁ s₂ t : Set α
p✝ p₁ p₂ : α → Prop
inst✝ : TopologicalSpace α
p : α → Prop
⊢ IsOpen {x | ∀ᶠ (y : α) in 𝓝 x, p y}

Next tactic:
simp only [← interior_setOf_eq, isOpen_interior]