-- Mathlib/Topology/UniformSpace/Basic.lean
theorem uniformity_hasBasis_closed :
    HasBasis (𝓤 α) (fun V : Set (α × α) => V ∈ 𝓤 α ∧ IsClosed V) id

Proof state:
case intro.intro.intro
α : Type ua
inst✝ : UniformSpace α
t : Set (α × α)
h : t ∈ 𝓤 α
w : Set (α × α)
w_in : w ∈ 𝓤 α
w_symm : SymmetricRel w
r : w ○ w ○ w ⊆ t
⊢ closure w ⊆ w ○ w ○ w

Tactic:
rw [closure_eq_uniformity]

Result:
case intro.intro.intro
α : Type ua
inst✝ : UniformSpace α
t : Set (α × α)
h : t ∈ 𝓤 α
w : Set (α × α)
w_in : w ∈ 𝓤 α
w_symm : SymmetricRel w
r : w ○ w ○ w ⊆ t
⊢ ⋂ V ∈ {V | V ∈ 𝓤 α ∧ SymmetricRel V}, V ○ w ○ V ⊆ w ○ w ○ w

Proof state:
α : Type ua
inst✝ : UniformSpace α
⊢ (𝓤 α).HasBasis (fun V => V ∈ 𝓤 α ∧ IsClosed V) id

Tactic:
refine Filter.hasBasis_self.2 fun t h => ?_

Result:
α : Type ua
inst✝ : UniformSpace α
t : Set (α × α)
h : t ∈ 𝓤 α
⊢ ∃ r ∈ 𝓤 α, IsClosed r ∧ r ⊆ t

Proof state:
case intro.intro.intro
α : Type ua
inst✝ : UniformSpace α
t : Set (α × α)
h : t ∈ 𝓤 α
w : Set (α × α)
w_in : w ∈ 𝓤 α
w_symm : SymmetricRel w
r : w ○ w ○ w ⊆ t
⊢ closure w ⊆ t

Tactic:
refine Subset.trans ?_ r

Result:
case intro.intro.intro
α : Type ua
inst✝ : UniformSpace α
t : Set (α × α)
h : t ∈ 𝓤 α
w : Set (α × α)
w_in : w ∈ 𝓤 α
w_symm : SymmetricRel w
r : w ○ w ○ w ⊆ t
⊢ closure w ⊆ w ○ w ○ w

Proof state:
case intro.intro.intro
α : Type ua
inst✝ : UniformSpace α
t : Set (α × α)
h : t ∈ 𝓤 α
w : Set (α × α)
w_in : w ∈ 𝓤 α
w_symm : SymmetricRel w
r : w ○ w ○ w ⊆ t
⊢ ∃ r ∈ 𝓤 α, IsClosed r ∧ r ⊆ t

Tactic:
refine ⟨closure w, mem_of_superset w_in subset_closure, isClosed_closure, ?_⟩

Result:
case intro.intro.intro
α : Type ua
inst✝ : UniformSpace α
t : Set (α × α)
h : t ∈ 𝓤 α
w : Set (α × α)
w_in : w ∈ 𝓤 α
w_symm : SymmetricRel w
r : w ○ w ○ w ⊆ t
⊢ closure w ⊆ t

Proof state:
α : Type ua
inst✝ : UniformSpace α
t : Set (α × α)
h : t ∈ 𝓤 α
⊢ ∃ r ∈ 𝓤 α, IsClosed r ∧ r ⊆ t

Tactic:
rcases comp_comp_symm_mem_uniformity_sets h with ⟨w, w_in, w_symm, r⟩

Result:
case intro.intro.intro
α : Type ua
inst✝ : UniformSpace α
t : Set (α × α)
h : t ∈ 𝓤 α
w : Set (α × α)
w_in : w ∈ 𝓤 α
w_symm : SymmetricRel w
r : w ○ w ○ w ⊆ t
⊢ ∃ r ∈ 𝓤 α, IsClosed r ∧ r ⊆ t

Proof state:
case intro.intro.intro.h.i
α : Type ua
inst✝ : UniformSpace α
t : Set (α × α)
h : t ∈ 𝓤 α
w : Set (α × α)
w_in : w ∈ 𝓤 α
w_symm : SymmetricRel w
r : w ○ w ○ w ⊆ t
⊢ w ∈ {V | V ∈ 𝓤 α ∧ SymmetricRel V}

Tactic:
exact ⟨w_in, w_symm⟩

Result:
no goals

Proof state:
case intro.intro.intro
α : Type ua
inst✝ : UniformSpace α
t : Set (α × α)
h : t ∈ 𝓤 α
w : Set (α × α)
w_in : w ∈ 𝓤 α
w_symm : SymmetricRel w
r : w ○ w ○ w ⊆ t
⊢ ⋂ V ∈ {V | V ∈ 𝓤 α ∧ SymmetricRel V}, V ○ w ○ V ⊆ w ○ w ○ w

Tactic:
apply iInter_subset_of_subset

Result:
case intro.intro.intro.h
α : Type ua
inst✝ : UniformSpace α
t : Set (α × α)
h : t ∈ 𝓤 α
w : Set (α × α)
w_in : w ∈ 𝓤 α
w_symm : SymmetricRel w
r : w ○ w ○ w ⊆ t
⊢ ⋂ (_ : ?intro.intro.intro.i ∈ {V | V ∈ 𝓤 α ∧ SymmetricRel V}), ?intro.intro.intro.i ○ w ○ ?intro.intro.intro.i ⊆
    w ○ w ○ w

case intro.intro.intro.i
α : Type ua
inst✝ : UniformSpace α
t : Set (α × α)
h : t ∈ 𝓤 α
w : Set (α × α)
w_in : w ∈ 𝓤 α
w_symm : SymmetricRel w
r : w ○ w ○ w ⊆ t
⊢ Set (α × α)

Proof state:
case intro.intro.intro.h
α : Type ua
inst✝ : UniformSpace α
t : Set (α × α)
h : t ∈ 𝓤 α
w : Set (α × α)
w_in : w ∈ 𝓤 α
w_symm : SymmetricRel w
r : w ○ w ○ w ⊆ t
⊢ ⋂ (_ : ?intro.intro.intro.i ∈ {V | V ∈ 𝓤 α ∧ SymmetricRel V}), ?intro.intro.intro.i ○ w ○ ?intro.intro.intro.i ⊆
    w ○ w ○ w

case intro.intro.intro.i
α : Type ua
inst✝ : UniformSpace α
t : Set (α × α)
h : t ∈ 𝓤 α
w : Set (α × α)
w_in : w ∈ 𝓤 α
w_symm : SymmetricRel w
r : w ○ w ○ w ⊆ t
⊢ Set (α × α)

Tactic:
apply iInter_subset

Result:
case intro.intro.intro.h.i
α : Type ua
inst✝ : UniformSpace α
t : Set (α × α)
h : t ∈ 𝓤 α
w : Set (α × α)
w_in : w ∈ 𝓤 α
w_symm : SymmetricRel w
r : w ○ w ○ w ⊆ t
⊢ w ∈ {V | V ∈ 𝓤 α ∧ SymmetricRel V}