Theorem: IsClosed.isClopenable
File: Mathlib/Topology/MetricSpace/Polish.lean

tactic: haveI : PolishSpace s := hs.polishSpace
state_before: α : Type u_1
β : Type ?u.35108
inst✝¹ : TopologicalSpace α
inst✝ : PolishSpace α
s : Set α
hs : IsClosed s
⊢ IsClopenable s

tactic: let t : Set α := sᶜ
state_before: α : Type u_1
β : Type ?u.35108
inst✝¹ : TopologicalSpace α
inst✝ : PolishSpace α
s : Set α
hs : IsClosed s
this : PolishSpace ↑s
⊢ IsClopenable s

tactic: haveI : PolishSpace t := hs.isOpen_compl.polishSpace
state_before: α : Type u_1
β : Type ?u.35108
inst✝¹ : TopologicalSpace α
inst✝ : PolishSpace α
s : Set α
hs : IsClosed s
this : PolishSpace ↑s
t : Set α := sᶜ
⊢ IsClopenable s

tactic: let f : s ⊕ t ≃ α := Equiv.Set.sumCompl s
state_before: α : Type u_1
β : Type ?u.35108
inst✝¹ : TopologicalSpace α
inst✝ : PolishSpace α
s : Set α
hs : IsClosed s
this✝ : PolishSpace ↑s
t : Set α := sᶜ
this : PolishSpace ↑t
⊢ IsClopenable s

tactic: have hle : TopologicalSpace.coinduced f instTopologicalSpaceSum ≤ ‹_›
state_before: α : Type u_1
β : Type ?u.35108
inst✝¹ : TopologicalSpace α
inst✝ : PolishSpace α
s : Set α
hs : IsClosed s
this✝ : PolishSpace ↑s
t : Set α := sᶜ
this : PolishSpace ↑t
f : ↑s ⊕ ↑t ≃ α := Equiv.Set.sumCompl s
⊢ IsClopenable s

tactic: refine ⟨.coinduced f instTopologicalSpaceSum, hle, ?_, hs.mono hle, ?_⟩
state_before: α : Type u_1
β : Type ?u.35108
inst✝¹ : TopologicalSpace α
inst✝ : PolishSpace α
s : Set α
hs : IsClosed s
this✝ : PolishSpace ↑s
t : Set α := sᶜ
this : PolishSpace ↑t
f : ↑s ⊕ ↑t ≃ α := Equiv.Set.sumCompl s
hle : coinduced (↑f) instTopologicalSpaceSum ≤ inst✝¹
⊢ IsClopenable s

tactic: simp only [instTopologicalSpaceSum, coinduced_sup, coinduced_compose, sup_le_iff,
  ← continuous_iff_coinduced_le]
state_before: case hle
α : Type u_1
β : Type ?u.35108
inst✝¹ : TopologicalSpace α
inst✝ : PolishSpace α
s : Set α
hs : IsClosed s
this✝ : PolishSpace ↑s
t : Set α := sᶜ
this : PolishSpace ↑t
f : ↑s ⊕ ↑t ≃ α := Equiv.Set.sumCompl s
⊢ coinduced (↑f) instTopologicalSpaceSum ≤ inst✝¹

tactic: exact ⟨continuous_subtype_val, continuous_subtype_val⟩
state_before: case hle
α : Type u_1
β : Type ?u.35108
inst✝¹ : TopologicalSpace α
inst✝ : PolishSpace α
s : Set α
hs : IsClosed s
this✝ : PolishSpace ↑s
t : Set α := sᶜ
this : PolishSpace ↑t
f : ↑s ⊕ ↑t ≃ α := Equiv.Set.sumCompl s
⊢ Continuous (↑(Equiv.Set.sumCompl s) ∘ Sum.inl) ∧ Continuous (↑(Equiv.Set.sumCompl s) ∘ Sum.inr)

tactic: rw [← f.induced_symm]
state_before: case refine_1
α : Type u_1
β : Type ?u.35108
inst✝¹ : TopologicalSpace α
inst✝ : PolishSpace α
s : Set α
hs : IsClosed s
this✝ : PolishSpace ↑s
t : Set α := sᶜ
this : PolishSpace ↑t
f : ↑s ⊕ ↑t ≃ α := Equiv.Set.sumCompl s
hle : coinduced (↑f) instTopologicalSpaceSum ≤ inst✝¹
⊢ PolishSpace α

tactic: exact f.symm.polishSpace_induced
state_before: case refine_1
α : Type u_1
β : Type ?u.35108
inst✝¹ : TopologicalSpace α
inst✝ : PolishSpace α
s : Set α
hs : IsClosed s
this✝ : PolishSpace ↑s
t : Set α := sᶜ
this : PolishSpace ↑t
f : ↑s ⊕ ↑t ≃ α := Equiv.Set.sumCompl s
hle : coinduced (↑f) instTopologicalSpaceSum ≤ inst✝¹
⊢ PolishSpace α

tactic: rw [isOpen_coinduced, isOpen_sum_iff]
state_before: case refine_2
α : Type u_1
β : Type ?u.35108
inst✝¹ : TopologicalSpace α
inst✝ : PolishSpace α
s : Set α
hs : IsClosed s
this✝ : PolishSpace ↑s
t : Set α := sᶜ
this : PolishSpace ↑t
f : ↑s ⊕ ↑t ≃ α := Equiv.Set.sumCompl s
hle : coinduced (↑f) instTopologicalSpaceSum ≤ inst✝¹
⊢ IsOpen s

tactic: convert And.intro (isOpen_univ (α := s)) (isOpen_empty (α := (sᶜ : Set α)))
  <;> ext ⟨x, hx⟩ <;> simpa using hx
state_before: case refine_2
α : Type u_1
β : Type ?u.35108
inst✝¹ : TopologicalSpace α
inst✝ : PolishSpace α
s : Set α
hs : IsClosed s
this✝ : PolishSpace ↑s
t : Set α := sᶜ
this : PolishSpace ↑t
f : ↑s ⊕ ↑t ≃ α := Equiv.Set.sumCompl s
hle : coinduced (↑f) instTopologicalSpaceSum ≤ inst✝¹
⊢ IsOpen (Sum.inl ⁻¹' (↑f ⁻¹' s)) ∧ IsOpen (Sum.inr ⁻¹' (↑f ⁻¹' s))