Theorem: TopologicalSpace.isTopologicalBasis_of_subbasis
File: Mathlib/Topology/Bases.lean

tactic: subst t
state_before: α : Type u
t : TopologicalSpace α
s : Set (Set α)
hs : t = generateFrom s
⊢ IsTopologicalBasis ((fun f => ⋂₀ f) '' {f | Set.Finite f ∧ f ⊆ s})

tactic: letI := generateFrom s
state_before: α : Type u
s : Set (Set α)
⊢ IsTopologicalBasis ((fun f => ⋂₀ f) '' {f | Set.Finite f ∧ f ⊆ s})

tactic: refine' ⟨_, _, le_antisymm (le_generateFrom _) <| generateFrom_anti fun t ht => _⟩
state_before: α : Type u
s : Set (Set α)
this : TopologicalSpace α := generateFrom s
⊢ IsTopologicalBasis ((fun f => ⋂₀ f) '' {f | Set.Finite f ∧ f ⊆ s})

tactic: rintro _ ⟨t₁, ⟨hft₁, ht₁b⟩, rfl⟩ _ ⟨t₂, ⟨hft₂, ht₂b⟩, rfl⟩ x h
state_before: case refine'_1
α : Type u
s : Set (Set α)
this : TopologicalSpace α := generateFrom s
⊢ ∀ (t₁ : Set α),
    t₁ ∈ (fun f => ⋂₀ f) '' {f | Set.Finite f ∧ f ⊆ s} →
      ∀ (t₂ : Set α),
        t₂ ∈ (fun f => ⋂₀ f) '' {f | Set.Finite f ∧ f ⊆ s} →
          ∀ (x : α), x ∈ t₁ ∩ t₂ → ∃ t₃, t₃ ∈ (fun f => ⋂₀ f) '' {f | Set.Finite f ∧ f ⊆ s} ∧ x ∈ t₃ ∧ t₃ ⊆ t₁ ∩ t₂

tactic: exact ⟨_, ⟨_, ⟨hft₁.union hft₂, union_subset ht₁b ht₂b⟩, sInter_union t₁ t₂⟩, h, Subset.rfl⟩
state_before: case refine'_1.intro.intro.intro.intro.intro.intro
α : Type u
s : Set (Set α)
this : TopologicalSpace α := generateFrom s
t₁ : Set (Set α)
hft₁ : Set.Finite t₁
ht₁b : t₁ ⊆ s
t₂ : Set (Set α)
hft₂ : Set.Finite t₂
ht₂b : t₂ ⊆ s
x : α
h : x ∈ (fun f => ⋂₀ f) t₁ ∩ (fun f => ⋂₀ f) t₂
⊢ ∃ t₃, t₃ ∈ (fun f => ⋂₀ f) '' {f | Set.Finite f ∧ f ⊆ s} ∧ x ∈ t₃ ∧ t₃ ⊆ (fun f => ⋂₀ f) t₁ ∩ (fun f => ⋂₀ f) t₂

tactic: rw [sUnion_image, iUnion₂_eq_univ_iff]
state_before: case refine'_2
α : Type u
s : Set (Set α)
this : TopologicalSpace α := generateFrom s
⊢ ⋃₀ ((fun f => ⋂₀ f) '' {f | Set.Finite f ∧ f ⊆ s}) = univ

tactic: exact fun x => ⟨∅, ⟨finite_empty, empty_subset _⟩, sInter_empty.substr <| mem_univ x⟩
state_before: case refine'_2
α : Type u
s : Set (Set α)
this : TopologicalSpace α := generateFrom s
⊢ ∀ (a : α), ∃ i j, a ∈ ⋂₀ i

tactic: rintro _ ⟨t, ⟨hft, htb⟩, rfl⟩
state_before: case refine'_3
α : Type u
s : Set (Set α)
this : TopologicalSpace α := generateFrom s
⊢ ∀ (s_1 : Set α), s_1 ∈ (fun f => ⋂₀ f) '' {f | Set.Finite f ∧ f ⊆ s} → IsOpen s_1

tactic: apply isOpen_sInter
state_before: case refine'_3.intro.intro.intro
α : Type u
s : Set (Set α)
this : TopologicalSpace α := generateFrom s
t : Set (Set α)
hft : Set.Finite t
htb : t ⊆ s
⊢ IsOpen ((fun f => ⋂₀ f) t)

tactic: exacts [hft, fun s hs => GenerateOpen.basic _ <| htb hs]
state_before: case refine'_3.intro.intro.intro.hs
α : Type u
s : Set (Set α)
this : TopologicalSpace α := generateFrom s
t : Set (Set α)
hft : Set.Finite t
htb : t ⊆ s
⊢ Set.Finite t

case refine'_3.intro.intro.intro.a
α : Type u
s : Set (Set α)
this : TopologicalSpace α := generateFrom s
t : Set (Set α)
hft : Set.Finite t
htb : t ⊆ s
⊢ ∀ (t_1 : Set α), t_1 ∈ t → IsOpen t_1

tactic: rw [← sInter_singleton t]
state_before: case refine'_4
α : Type u
s : Set (Set α)
this : TopologicalSpace α := generateFrom s
t : Set α
ht : t ∈ s
⊢ t ∈ (fun f => ⋂₀ f) '' {f | Set.Finite f ∧ f ⊆ s}

tactic: exact ⟨{t}, ⟨finite_singleton t, singleton_subset_iff.2 ht⟩, rfl⟩
state_before: case refine'_4
α : Type u
s : Set (Set α)
this : TopologicalSpace α := generateFrom s
t : Set α
ht : t ∈ s
⊢ ⋂₀ {t} ∈ (fun f => ⋂₀ f) '' {f | Set.Finite f ∧ f ⊆ s}