Theorem: isGδ_iff_eq_iInter_nat
File: Mathlib/Topology/GDelta.lean

tactic: refine ⟨?_, ?_⟩
state_before: X : Type u_1
Y : Type u_2
ι : Type u_3
ι' : Sort u_4
inst✝ : TopologicalSpace X
s : Set X
⊢ IsGδ s ↔ ∃ f, (∀ (n : ℕ), IsOpen (f n)) ∧ s = ⋂ n, f n
state_after: case refine_1
X : Type u_1
Y : Type u_2
ι : Type u_3
ι' : Sort u_4
inst✝ : TopologicalSpace X
s : Set X
⊢ IsGδ s → ∃ f, (∀ (n : ℕ), IsOpen (f n)) ∧ s = ⋂ n, f n

case refine_2
X : Type u_1
Y : Type u_2
ι : Type u_3
ι' : Sort u_4
inst✝ : TopologicalSpace X
s : Set X
⊢ (∃ f, (∀ (n : ℕ), IsOpen (f n)) ∧ s = ⋂ n, f n) → IsGδ s

tactic: rintro ⟨T, hT, T_count, rfl⟩
state_before: case refine_1
X : Type u_1
Y : Type u_2
ι : Type u_3
ι' : Sort u_4
inst✝ : TopologicalSpace X
s : Set X
⊢ IsGδ s → ∃ f, (∀ (n : ℕ), IsOpen (f n)) ∧ s = ⋂ n, f n
state_after: case refine_1.intro.intro.intro
X : Type u_1
Y : Type u_2
ι : Type u_3
ι' : Sort u_4
inst✝ : TopologicalSpace X
T : Set (Set X)
hT : ∀ t ∈ T, IsOpen t
T_count : T.Countable
⊢ ∃ f, (∀ (n : ℕ), IsOpen (f n)) ∧ ⋂₀ T = ⋂ n, f n

tactic: rcases Set.eq_empty_or_nonempty T with rfl|hT
state_before: case refine_1.intro.intro.intro
X : Type u_1
Y : Type u_2
ι : Type u_3
ι' : Sort u_4
inst✝ : TopologicalSpace X
T : Set (Set X)
hT : ∀ t ∈ T, IsOpen t
T_count : T.Countable
⊢ ∃ f, (∀ (n : ℕ), IsOpen (f n)) ∧ ⋂₀ T = ⋂ n, f n
state_after: case refine_1.intro.intro.intro.inl
X : Type u_1
Y : Type u_2
ι : Type u_3
ι' : Sort u_4
inst✝ : TopologicalSpace X
hT : ∀ t ∈ ∅, IsOpen t
T_count : ∅.Countable
⊢ ∃ f, (∀ (n : ℕ), IsOpen (f n)) ∧ ⋂₀ ∅ = ⋂ n, f n

case refine_1.intro.intro.intro.inr
X : Type u_1
Y : Type u_2
ι : Type u_3
ι' : Sort u_4
inst✝ : TopologicalSpace X
T : Set (Set X)
hT✝ : ∀ t ∈ T, IsOpen t
T_count : T.Countable
hT : T.Nonempty
⊢ ∃ f, (∀ (n : ℕ), IsOpen (f n)) ∧ ⋂₀ T = ⋂ n, f n

tactic: exact ⟨fun _n ↦ univ, fun _n ↦ isOpen_univ, by simp⟩
state_before: case refine_1.intro.intro.intro.inl
X : Type u_1
Y : Type u_2
ι : Type u_3
ι' : Sort u_4
inst✝ : TopologicalSpace X
hT : ∀ t ∈ ∅, IsOpen t
T_count : ∅.Countable
⊢ ∃ f, (∀ (n : ℕ), IsOpen (f n)) ∧ ⋂₀ ∅ = ⋂ n, f n
state_after: no goals

tactic: simp
state_before: X : Type u_1
Y : Type u_2
ι : Type u_3
ι' : Sort u_4
inst✝ : TopologicalSpace X
hT : ∀ t ∈ ∅, IsOpen t
T_count : ∅.Countable
⊢ ⋂₀ ∅ = ⋂ n, (fun _n => univ) n
state_after: no goals

tactic: obtain ⟨f, hf⟩ : ∃ (f : ℕ → Set X), T = range f := Countable.exists_eq_range T_count hT
state_before: case refine_1.intro.intro.intro.inr
X : Type u_1
Y : Type u_2
ι : Type u_3
ι' : Sort u_4
inst✝ : TopologicalSpace X
T : Set (Set X)
hT✝ : ∀ t ∈ T, IsOpen t
T_count : T.Countable
hT : T.Nonempty
⊢ ∃ f, (∀ (n : ℕ), IsOpen (f n)) ∧ ⋂₀ T = ⋂ n, f n
state_after: case refine_1.intro.intro.intro.inr.intro
X : Type u_1
Y : Type u_2
ι : Type u_3
ι' : Sort u_4
inst✝ : TopologicalSpace X
T : Set (Set X)
hT✝ : ∀ t ∈ T, IsOpen t
T_count : T.Countable
hT : T.Nonempty
f : ℕ → Set X
hf : T = range f
⊢ ∃ f, (∀ (n : ℕ), IsOpen (f n)) ∧ ⋂₀ T = ⋂ n, f n

tactic: exact ⟨f, by aesop, by simp [hf]⟩
state_before: case refine_1.intro.intro.intro.inr.intro
X : Type u_1
Y : Type u_2
ι : Type u_3
ι' : Sort u_4
inst✝ : TopologicalSpace X
T : Set (Set X)
hT✝ : ∀ t ∈ T, IsOpen t
T_count : T.Countable
hT : T.Nonempty
f : ℕ → Set X
hf : T = range f
⊢ ∃ f, (∀ (n : ℕ), IsOpen (f n)) ∧ ⋂₀ T = ⋂ n, f n
state_after: no goals

tactic: aesop
state_before: X : Type u_1
Y : Type u_2
ι : Type u_3
ι' : Sort u_4
inst✝ : TopologicalSpace X
T : Set (Set X)
hT✝ : ∀ t ∈ T, IsOpen t
T_count : T.Countable
hT : T.Nonempty
f : ℕ → Set X
hf : T = range f
⊢ ∀ (n : ℕ), IsOpen (f n)
state_after: no goals

tactic: simp [hf]
state_before: X : Type u_1
Y : Type u_2
ι : Type u_3
ι' : Sort u_4
inst✝ : TopologicalSpace X
T : Set (Set X)
hT✝ : ∀ t ∈ T, IsOpen t
T_count : T.Countable
hT : T.Nonempty
f : ℕ → Set X
hf : T = range f
⊢ ⋂₀ T = ⋂ n, f n
state_after: no goals

tactic: rintro ⟨f, hf, rfl⟩
state_before: case refine_2
X : Type u_1
Y : Type u_2
ι : Type u_3
ι' : Sort u_4
inst✝ : TopologicalSpace X
s : Set X
⊢ (∃ f, (∀ (n : ℕ), IsOpen (f n)) ∧ s = ⋂ n, f n) → IsGδ s
state_after: case refine_2.intro.intro
X : Type u_1
Y : Type u_2
ι : Type u_3
ι' : Sort u_4
inst✝ : TopologicalSpace X
f : ℕ → Set X
hf : ∀ (n : ℕ), IsOpen (f n)
⊢ IsGδ (⋂ n, f n)

tactic: exact .iInter_of_isOpen hf
state_before: case refine_2.intro.intro
X : Type u_1
Y : Type u_2
ι : Type u_3
ι' : Sort u_4
inst✝ : TopologicalSpace X
f : ℕ → Set X
hf : ∀ (n : ℕ), IsOpen (f n)
⊢ IsGδ (⋂ n, f n)
state_after: no goals