Theorem: PolishSpace.IsClopenable.iUnion
File: Mathlib/Topology/MetricSpace/Polish.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
t : TopologicalSpace α
inst✝ : PolishSpace α
s : ℕ → Set α
hs : ∀ (n : ℕ), IsClopenable (s n)
⊢ IsClopenable (⋃ n, s n)
state_after: α : Type u_1
β : Type u_2
t : TopologicalSpace α
inst✝ : PolishSpace α
s : ℕ → Set α
m : ℕ → TopologicalSpace α
mt : ∀ (n : ℕ), m n ≤ t
m_polish : ∀ (n : ℕ), PolishSpace α
h✝ : ∀ (n : ℕ), IsClosed (s n)
m_open : ∀ (n : ℕ), IsOpen (s n)
⊢ IsClopenable (⋃ n, s n)
tactic: choose m mt m_polish _ m_open using hs
state_before: α : Type u_1
β : Type u_2
t : TopologicalSpace α
inst✝ : PolishSpace α
s : ℕ → Set α
m : ℕ → TopologicalSpace α
mt : ∀ (n : ℕ), m n ≤ t
m_polish : ∀ (n : ℕ), PolishSpace α
h✝ : ∀ (n : ℕ), IsClosed (s n)
m_open : ∀ (n : ℕ), IsOpen (s n)
⊢ IsClopenable (⋃ n, s n)
state_after: case intro.intro.intro
α : Type u_1
β : Type u_2
t : TopologicalSpace α
inst✝ : PolishSpace α
s : ℕ → Set α
m : ℕ → TopologicalSpace α
mt : ∀ (n : ℕ), m n ≤ t
m_polish : ∀ (n : ℕ), PolishSpace α
h✝ : ∀ (n : ℕ), IsClosed (s n)
m_open : ∀ (n : ℕ), IsOpen (s n)
t' : TopologicalSpace α
t'm : ∀ (n : ℕ), t' ≤ m n
t'_polish : PolishSpace α
⊢ IsClopenable (⋃ n, s n)
tactic: obtain ⟨t', t'm, -, t'_polish⟩ :
      ∃ t' : TopologicalSpace α, (∀ n : ℕ, t' ≤ m n) ∧ t' ≤ t ∧ @PolishSpace α t' :=
    exists_polishSpace_forall_le m mt m_polish
state_before: case intro.intro.intro
α : Type u_1
β : Type u_2
t : TopologicalSpace α
inst✝ : PolishSpace α
s : ℕ → Set α
m : ℕ → TopologicalSpace α
mt : ∀ (n : ℕ), m n ≤ t
m_polish : ∀ (n : ℕ), PolishSpace α
h✝ : ∀ (n : ℕ), IsClosed (s n)
m_open : ∀ (n : ℕ), IsOpen (s n)
t' : TopologicalSpace α
t'm : ∀ (n : ℕ), t' ≤ m n
t'_polish : PolishSpace α
⊢ IsClopenable (⋃ n, s n)
state_after: case intro.intro.intro
α : Type u_1
β : Type u_2
t : TopologicalSpace α
inst✝ : PolishSpace α
s : ℕ → Set α
m : ℕ → TopologicalSpace α
mt : ∀ (n : ℕ), m n ≤ t
m_polish : ∀ (n : ℕ), PolishSpace α
h✝ : ∀ (n : ℕ), IsClosed (s n)
m_open : ∀ (n : ℕ), IsOpen (s n)
t' : TopologicalSpace α
t'm : ∀ (n : ℕ), t' ≤ m n
t'_polish : PolishSpace α
A : IsOpen (⋃ n, s n)
⊢ IsClopenable (⋃ n, s n)
tactic: have A : IsOpen[t'] (⋃ n, s n) := by
    apply isOpen_iUnion
    intro n
    apply t'm n
    exact m_open n
state_before: case intro.intro.intro
α : Type u_1
β : Type u_2
t : TopologicalSpace α
inst✝ : PolishSpace α
s : ℕ → Set α
m : ℕ → TopologicalSpace α
mt : ∀ (n : ℕ), m n ≤ t
m_polish : ∀ (n : ℕ), PolishSpace α
h✝ : ∀ (n : ℕ), IsClosed (s n)
m_open : ∀ (n : ℕ), IsOpen (s n)
t' : TopologicalSpace α
t'm : ∀ (n : ℕ), t' ≤ m n
t'_polish : PolishSpace α
A : IsOpen (⋃ n, s n)
⊢ IsClopenable (⋃ n, s n)
state_after: case intro.intro.intro.intro.intro.intro.intro
α : Type u_1
β : Type u_2
t : TopologicalSpace α
inst✝ : PolishSpace α
s : ℕ → Set α
m : ℕ → TopologicalSpace α
mt : ∀ (n : ℕ), m n ≤ t
m_polish : ∀ (n : ℕ), PolishSpace α
h✝ : ∀ (n : ℕ), IsClosed (s n)
m_open : ∀ (n : ℕ), IsOpen (s n)
t' : TopologicalSpace α
t'm : ∀ (n : ℕ), t' ≤ m n
t'_polish : PolishSpace α
A : IsOpen (⋃ n, s n)
t'' : TopologicalSpace α
t''_le : t'' ≤ t'
t''_polish : PolishSpace α
h1 : IsClosed (⋃ n, s n)
h2 : IsOpen (⋃ n, s n)
⊢ IsClopenable (⋃ n, s n)
tactic: obtain ⟨t'', t''_le, t''_polish, h1, h2⟩ : ∃ t'' : TopologicalSpace α,
      t'' ≤ t' ∧ @PolishSpace α t'' ∧ IsClosed[t''] (⋃ n, s n) ∧ IsOpen[t''] (⋃ n, s n) :=
    @IsOpen.isClopenable α t' t'_polish _ A
state_before: case intro.intro.intro.intro.intro.intro.intro
α : Type u_1
β : Type u_2
t : TopologicalSpace α
inst✝ : PolishSpace α
s : ℕ → Set α
m : ℕ → TopologicalSpace α
mt : ∀ (n : ℕ), m n ≤ t
m_polish : ∀ (n : ℕ), PolishSpace α
h✝ : ∀ (n : ℕ), IsClosed (s n)
m_open : ∀ (n : ℕ), IsOpen (s n)
t' : TopologicalSpace α
t'm : ∀ (n : ℕ), t' ≤ m n
t'_polish : PolishSpace α
A : IsOpen (⋃ n, s n)
t'' : TopologicalSpace α
t''_le : t'' ≤ t'
t''_polish : PolishSpace α
h1 : IsClosed (⋃ n, s n)
h2 : IsOpen (⋃ n, s n)
⊢ IsClopenable (⋃ n, s n)
state_after: no goals
tactic: exact ⟨t'', t''_le.trans ((t'm 0).trans (mt 0)), t''_polish, h1, h2⟩