Theorem: Sigma.isConnected_iff
File: Mathlib/Topology/Connected/Basic.lean

tactic: refine ⟨fun hs => ?_, ?_⟩
state_before: α : Type u
β : Type v
ι : Type u_1
π : ι → Type u_2
inst✝¹ : TopologicalSpace α
s✝ t u v : Set α
inst✝ : (i : ι) → TopologicalSpace (π i)
s : Set ((i : ι) × π i)
⊢ IsConnected s ↔ ∃ i t, IsConnected t ∧ s = mk i '' t
state_after: case refine_1
α : Type u
β : Type v
ι : Type u_1
π : ι → Type u_2
inst✝¹ : TopologicalSpace α
s✝ t u v : Set α
inst✝ : (i : ι) → TopologicalSpace (π i)
s : Set ((i : ι) × π i)
hs : IsConnected s
⊢ ∃ i t, IsConnected t ∧ s = mk i '' t

case refine_2
α : Type u
β : Type v
ι : Type u_1
π : ι → Type u_2
inst✝¹ : TopologicalSpace α
s✝ t u v : Set α
inst✝ : (i : ι) → TopologicalSpace (π i)
s : Set ((i : ι) × π i)
⊢ (∃ i t, IsConnected t ∧ s = mk i '' t) → IsConnected s

tactic: obtain ⟨⟨i, x⟩, hx⟩ := hs.nonempty
state_before: case refine_1
α : Type u
β : Type v
ι : Type u_1
π : ι → Type u_2
inst✝¹ : TopologicalSpace α
s✝ t u v : Set α
inst✝ : (i : ι) → TopologicalSpace (π i)
s : Set ((i : ι) × π i)
hs : IsConnected s
⊢ ∃ i t, IsConnected t ∧ s = mk i '' t
state_after: case refine_1.intro.mk
α : Type u
β : Type v
ι : Type u_1
π : ι → Type u_2
inst✝¹ : TopologicalSpace α
s✝ t u v : Set α
inst✝ : (i : ι) → TopologicalSpace (π i)
s : Set ((i : ι) × π i)
hs : IsConnected s
i : ι
x : π i
hx : ⟨i, x⟩ ∈ s
⊢ ∃ i t, IsConnected t ∧ s = mk i '' t

tactic: have : s ⊆ range (Sigma.mk i) :=
  hs.isPreconnected.subset_isClopen isClopen_range_sigmaMk ⟨⟨i, x⟩, hx, x, rfl⟩
state_before: case refine_1.intro.mk
α : Type u
β : Type v
ι : Type u_1
π : ι → Type u_2
inst✝¹ : TopologicalSpace α
s✝ t u v : Set α
inst✝ : (i : ι) → TopologicalSpace (π i)
s : Set ((i : ι) × π i)
hs : IsConnected s
i : ι
x : π i
hx : ⟨i, x⟩ ∈ s
⊢ ∃ i t, IsConnected t ∧ s = mk i '' t
state_after: case refine_1.intro.mk
α : Type u
β : Type v
ι : Type u_1
π : ι → Type u_2
inst✝¹ : TopologicalSpace α
s✝ t u v : Set α
inst✝ : (i : ι) → TopologicalSpace (π i)
s : Set ((i : ι) × π i)
hs : IsConnected s
i : ι
x : π i
hx : ⟨i, x⟩ ∈ s
this : s ⊆ range (mk i)
⊢ ∃ i t, IsConnected t ∧ s = mk i '' t

tactic: exact ⟨i, Sigma.mk i ⁻¹' s, hs.preimage_of_isOpenMap sigma_mk_injective isOpenMap_sigmaMk this,
  (Set.image_preimage_eq_of_subset this).symm⟩
state_before: case refine_1.intro.mk
α : Type u
β : Type v
ι : Type u_1
π : ι → Type u_2
inst✝¹ : TopologicalSpace α
s✝ t u v : Set α
inst✝ : (i : ι) → TopologicalSpace (π i)
s : Set ((i : ι) × π i)
hs : IsConnected s
i : ι
x : π i
hx : ⟨i, x⟩ ∈ s
this : s ⊆ range (mk i)
⊢ ∃ i t, IsConnected t ∧ s = mk i '' t
state_after: no goals

tactic: rintro ⟨i, t, ht, rfl⟩
state_before: case refine_2
α : Type u
β : Type v
ι : Type u_1
π : ι → Type u_2
inst✝¹ : TopologicalSpace α
s✝ t u v : Set α
inst✝ : (i : ι) → TopologicalSpace (π i)
s : Set ((i : ι) × π i)
⊢ (∃ i t, IsConnected t ∧ s = mk i '' t) → IsConnected s
state_after: case refine_2.intro.intro.intro
α : Type u
β : Type v
ι : Type u_1
π : ι → Type u_2
inst✝¹ : TopologicalSpace α
s t✝ u v : Set α
inst✝ : (i : ι) → TopologicalSpace (π i)
i : ι
t : Set (π i)
ht : IsConnected t
⊢ IsConnected (mk i '' t)

tactic: exact ht.image _ continuous_sigmaMk.continuousOn
state_before: case refine_2.intro.intro.intro
α : Type u
β : Type v
ι : Type u_1
π : ι → Type u_2
inst✝¹ : TopologicalSpace α
s t✝ u v : Set α
inst✝ : (i : ι) → TopologicalSpace (π i)
i : ι
t : Set (π i)
ht : IsConnected t
⊢ IsConnected (mk i '' t)
state_after: no goals