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

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

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

tactic: refine ⟨?_, ?_, le_antisymm (le_generateFrom ?_) <| generateFrom_anti fun t ht => ?_⟩
state_before: α : Type u
β : Type u_1
B : Set (Set α)
s✝ : Set α
s : Set (Set α)
this : TopologicalSpace α := generateFrom s
⊢ IsTopologicalBasis ((fun f => ⋂₀ f) '' {f | f.Finite ∧ f ⊆ s})
state_after: case refine_1
α : Type u
β : Type u_1
B : Set (Set α)
s✝ : Set α
s : Set (Set α)
this : TopologicalSpace α := generateFrom s
⊢ ∀ t₁ ∈ (fun f => ⋂₀ f) '' {f | f.Finite ∧ f ⊆ s},
    ∀ t₂ ∈ (fun f => ⋂₀ f) '' {f | f.Finite ∧ f ⊆ s},
      ∀ x ∈ t₁ ∩ t₂, ∃ t₃ ∈ (fun f => ⋂₀ f) '' {f | f.Finite ∧ f ⊆ s}, x ∈ t₃ ∧ t₃ ⊆ t₁ ∩ t₂

case refine_2
α : Type u
β : Type u_1
B : Set (Set α)
s✝ : Set α
s : Set (Set α)
this : TopologicalSpace α := generateFrom s
⊢ ⋃₀ ((fun f => ⋂₀ f) '' {f | f.Finite ∧ f ⊆ s}) = univ

case refine_3
α : Type u
β : Type u_1
B : Set (Set α)
s✝ : Set α
s : Set (Set α)
this : TopologicalSpace α := generateFrom s
⊢ ∀ s_1 ∈ (fun f => ⋂₀ f) '' {f | f.Finite ∧ f ⊆ s}, IsOpen s_1

case refine_4
α : Type u
β : Type u_1
B : Set (Set α)
s✝ : Set α
s : Set (Set α)
this : TopologicalSpace α := generateFrom s
t : Set α
ht : t ∈ s
⊢ t ∈ (fun f => ⋂₀ f) '' {f | f.Finite ∧ f ⊆ s}

tactic: rintro _ ⟨t₁, ⟨hft₁, ht₁b⟩, rfl⟩ _ ⟨t₂, ⟨hft₂, ht₂b⟩, rfl⟩ x h
state_before: case refine_1
α : Type u
β : Type u_1
B : Set (Set α)
s✝ : Set α
s : Set (Set α)
this : TopologicalSpace α := generateFrom s
⊢ ∀ t₁ ∈ (fun f => ⋂₀ f) '' {f | f.Finite ∧ f ⊆ s},
    ∀ t₂ ∈ (fun f => ⋂₀ f) '' {f | f.Finite ∧ f ⊆ s},
      ∀ x ∈ t₁ ∩ t₂, ∃ t₃ ∈ (fun f => ⋂₀ f) '' {f | f.Finite ∧ f ⊆ s}, x ∈ t₃ ∧ t₃ ⊆ t₁ ∩ t₂
state_after: case refine_1.intro.intro.intro.intro.intro.intro
α : Type u
β : Type u_1
B : Set (Set α)
s✝ : Set α
s : Set (Set α)
this : TopologicalSpace α := generateFrom s
t₁ : Set (Set α)
hft₁ : t₁.Finite
ht₁b : t₁ ⊆ s
t₂ : Set (Set α)
hft₂ : t₂.Finite
ht₂b : t₂ ⊆ s
x : α
h : x ∈ (fun f => ⋂₀ f) t₁ ∩ (fun f => ⋂₀ f) t₂
⊢ ∃ t₃ ∈ (fun f => ⋂₀ f) '' {f | f.Finite ∧ f ⊆ s}, x ∈ t₃ ∧ t₃ ⊆ (fun f => ⋂₀ f) t₁ ∩ (fun f => ⋂₀ f) 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
β : Type u_1
B : Set (Set α)
s✝ : Set α
s : Set (Set α)
this : TopologicalSpace α := generateFrom s
t₁ : Set (Set α)
hft₁ : t₁.Finite
ht₁b : t₁ ⊆ s
t₂ : Set (Set α)
hft₂ : t₂.Finite
ht₂b : t₂ ⊆ s
x : α
h : x ∈ (fun f => ⋂₀ f) t₁ ∩ (fun f => ⋂₀ f) t₂
⊢ ∃ t₃ ∈ (fun f => ⋂₀ f) '' {f | f.Finite ∧ f ⊆ s}, x ∈ t₃ ∧ t₃ ⊆ (fun f => ⋂₀ f) t₁ ∩ (fun f => ⋂₀ f) t₂
state_after: no goals

tactic: rw [sUnion_image, iUnion₂_eq_univ_iff]
state_before: case refine_2
α : Type u
β : Type u_1
B : Set (Set α)
s✝ : Set α
s : Set (Set α)
this : TopologicalSpace α := generateFrom s
⊢ ⋃₀ ((fun f => ⋂₀ f) '' {f | f.Finite ∧ f ⊆ s}) = univ
state_after: case refine_2
α : Type u
β : Type u_1
B : Set (Set α)
s✝ : Set α
s : Set (Set α)
this : TopologicalSpace α := generateFrom s
⊢ ∀ (a : α), ∃ i, ∃ (_ : i ∈ {f | f.Finite ∧ f ⊆ s}), a ∈ ⋂₀ i

tactic: exact fun x => ⟨∅, ⟨finite_empty, empty_subset _⟩, sInter_empty.substr <| mem_univ x⟩
state_before: case refine_2
α : Type u
β : Type u_1
B : Set (Set α)
s✝ : Set α
s : Set (Set α)
this : TopologicalSpace α := generateFrom s
⊢ ∀ (a : α), ∃ i, ∃ (_ : i ∈ {f | f.Finite ∧ f ⊆ s}), a ∈ ⋂₀ i
state_after: no goals

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

tactic: exact hft.isOpen_sInter fun s hs ↦ GenerateOpen.basic _ <| htb hs
state_before: case refine_3.intro.intro.intro
α : Type u
β : Type u_1
B : Set (Set α)
s✝ : Set α
s : Set (Set α)
this : TopologicalSpace α := generateFrom s
t : Set (Set α)
hft : t.Finite
htb : t ⊆ s
⊢ IsOpen ((fun f => ⋂₀ f) t)
state_after: no goals

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

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