Theorem: isPreconnected_iff_subset_of_disjoint_closed
File: Mathlib/Topology/Connected.lean

tactic: constructor <;> intro h
state_before: α : Type u
β : Type v
ι : Type ?u.102865
π : ι → Type ?u.102870
inst✝ : TopologicalSpace α
s t u v : Set α
⊢ IsPreconnected s ↔ ∀ (u v : Set α), IsClosed u → IsClosed v → s ⊆ u ∪ v → s ∩ (u ∩ v) = ∅ → s ⊆ u ∨ s ⊆ v

tactic: intro u v hu hv hs huv
state_before: case mp
α : Type u
β : Type v
ι : Type ?u.102865
π : ι → Type ?u.102870
inst✝ : TopologicalSpace α
s t u v : Set α
h : IsPreconnected s
⊢ ∀ (u v : Set α), IsClosed u → IsClosed v → s ⊆ u ∪ v → s ∩ (u ∩ v) = ∅ → s ⊆ u ∨ s ⊆ v

tactic: rw [isPreconnected_closed_iff] at h
state_before: case mp
α : Type u
β : Type v
ι : Type ?u.102865
π : ι → Type ?u.102870
inst✝ : TopologicalSpace α
s t u✝ v✝ : Set α
h : IsPreconnected s
u v : Set α
hu : IsClosed u
hv : IsClosed v
hs : s ⊆ u ∪ v
huv : s ∩ (u ∩ v) = ∅
⊢ s ⊆ u ∨ s ⊆ v

tactic: specialize h u v hu hv hs
state_before: case mp
α : Type u
β : Type v
ι : Type ?u.102865
π : ι → Type ?u.102870
inst✝ : TopologicalSpace α
s t u✝ v✝ : Set α
h :
  ∀ (t t' : Set α),
    IsClosed t → IsClosed t' → s ⊆ t ∪ t' → Set.Nonempty (s ∩ t) → Set.Nonempty (s ∩ t') → Set.Nonempty (s ∩ (t ∩ t'))
u v : Set α
hu : IsClosed u
hv : IsClosed v
hs : s ⊆ u ∪ v
huv : s ∩ (u ∩ v) = ∅
⊢ s ⊆ u ∨ s ⊆ v

tactic: contrapose! huv
state_before: case mp
α : Type u
β : Type v
ι : Type ?u.102865
π : ι → Type ?u.102870
inst✝ : TopologicalSpace α
s t u✝ v✝ u v : Set α
hu : IsClosed u
hv : IsClosed v
hs : s ⊆ u ∪ v
huv : s ∩ (u ∩ v) = ∅
h : Set.Nonempty (s ∩ u) → Set.Nonempty (s ∩ v) → Set.Nonempty (s ∩ (u ∩ v))
⊢ s ⊆ u ∨ s ⊆ v

tactic: rw [← nonempty_iff_ne_empty]
state_before: case mp
α : Type u
β : Type v
ι : Type ?u.102865
π : ι → Type ?u.102870
inst✝ : TopologicalSpace α
s t u✝ v✝ u v : Set α
hu : IsClosed u
hv : IsClosed v
hs : s ⊆ u ∪ v
h : Set.Nonempty (s ∩ u) → Set.Nonempty (s ∩ v) → Set.Nonempty (s ∩ (u ∩ v))
huv : ¬s ⊆ u ∧ ¬s ⊆ v
⊢ s ∩ (u ∩ v) ≠ ∅

tactic: simp [not_subset] at huv
state_before: case mp
α : Type u
β : Type v
ι : Type ?u.102865
π : ι → Type ?u.102870
inst✝ : TopologicalSpace α
s t u✝ v✝ u v : Set α
hu : IsClosed u
hv : IsClosed v
hs : s ⊆ u ∪ v
h : Set.Nonempty (s ∩ u) → Set.Nonempty (s ∩ v) → Set.Nonempty (s ∩ (u ∩ v))
huv : ¬s ⊆ u ∧ ¬s ⊆ v
⊢ Set.Nonempty (s ∩ (u ∩ v))

tactic: rcases huv with ⟨⟨x, hxs, hxu⟩, ⟨y, hys, hyv⟩⟩
state_before: case mp
α : Type u
β : Type v
ι : Type ?u.102865
π : ι → Type ?u.102870
inst✝ : TopologicalSpace α
s t u✝ v✝ u v : Set α
hu : IsClosed u
hv : IsClosed v
hs : s ⊆ u ∪ v
h : Set.Nonempty (s ∩ u) → Set.Nonempty (s ∩ v) → Set.Nonempty (s ∩ (u ∩ v))
huv : (∃ a, a ∈ s ∧ ¬a ∈ u) ∧ ∃ a, a ∈ s ∧ ¬a ∈ v
⊢ Set.Nonempty (s ∩ (u ∩ v))

tactic: have hxv : x ∈ v := or_iff_not_imp_left.mp (hs hxs) hxu
state_before: case mp.intro.intro.intro.intro.intro
α : Type u
β : Type v
ι : Type ?u.102865
π : ι → Type ?u.102870
inst✝ : TopologicalSpace α
s t u✝ v✝ u v : Set α
hu : IsClosed u
hv : IsClosed v
hs : s ⊆ u ∪ v
h : Set.Nonempty (s ∩ u) → Set.Nonempty (s ∩ v) → Set.Nonempty (s ∩ (u ∩ v))
x : α
hxs : x ∈ s
hxu : ¬x ∈ u
y : α
hys : y ∈ s
hyv : ¬y ∈ v
⊢ Set.Nonempty (s ∩ (u ∩ v))

tactic: have hyu : y ∈ u := or_iff_not_imp_right.mp (hs hys) hyv
state_before: case mp.intro.intro.intro.intro.intro
α : Type u
β : Type v
ι : Type ?u.102865
π : ι → Type ?u.102870
inst✝ : TopologicalSpace α
s t u✝ v✝ u v : Set α
hu : IsClosed u
hv : IsClosed v
hs : s ⊆ u ∪ v
h : Set.Nonempty (s ∩ u) → Set.Nonempty (s ∩ v) → Set.Nonempty (s ∩ (u ∩ v))
x : α
hxs : x ∈ s
hxu : ¬x ∈ u
y : α
hys : y ∈ s
hyv : ¬y ∈ v
hxv : x ∈ v
⊢ Set.Nonempty (s ∩ (u ∩ v))

tactic: exact h ⟨y, hys, hyu⟩ ⟨x, hxs, hxv⟩
state_before: case mp.intro.intro.intro.intro.intro
α : Type u
β : Type v
ι : Type ?u.102865
π : ι → Type ?u.102870
inst✝ : TopologicalSpace α
s t u✝ v✝ u v : Set α
hu : IsClosed u
hv : IsClosed v
hs : s ⊆ u ∪ v
h : Set.Nonempty (s ∩ u) → Set.Nonempty (s ∩ v) → Set.Nonempty (s ∩ (u ∩ v))
x : α
hxs : x ∈ s
hxu : ¬x ∈ u
y : α
hys : y ∈ s
hyv : ¬y ∈ v
hxv : x ∈ v
hyu : y ∈ u
⊢ Set.Nonempty (s ∩ (u ∩ v))

tactic: rw [isPreconnected_closed_iff]
state_before: case mpr
α : Type u
β : Type v
ι : Type ?u.102865
π : ι → Type ?u.102870
inst✝ : TopologicalSpace α
s t u v : Set α
h : ∀ (u v : Set α), IsClosed u → IsClosed v → s ⊆ u ∪ v → s ∩ (u ∩ v) = ∅ → s ⊆ u ∨ s ⊆ v
⊢ IsPreconnected s

tactic: intro u v hu hv hs hsu hsv
state_before: case mpr
α : Type u
β : Type v
ι : Type ?u.102865
π : ι → Type ?u.102870
inst✝ : TopologicalSpace α
s t u v : Set α
h : ∀ (u v : Set α), IsClosed u → IsClosed v → s ⊆ u ∪ v → s ∩ (u ∩ v) = ∅ → s ⊆ u ∨ s ⊆ v
⊢ ∀ (t t' : Set α),
    IsClosed t → IsClosed t' → s ⊆ t ∪ t' → Set.Nonempty (s ∩ t) → Set.Nonempty (s ∩ t') → Set.Nonempty (s ∩ (t ∩ t'))

tactic: rw [nonempty_iff_ne_empty]
state_before: case mpr
α : Type u
β : Type v
ι : Type ?u.102865
π : ι → Type ?u.102870
inst✝ : TopologicalSpace α
s t u✝ v✝ : Set α
h : ∀ (u v : Set α), IsClosed u → IsClosed v → s ⊆ u ∪ v → s ∩ (u ∩ v) = ∅ → s ⊆ u ∨ s ⊆ v
u v : Set α
hu : IsClosed u
hv : IsClosed v
hs : s ⊆ u ∪ v
hsu : Set.Nonempty (s ∩ u)
hsv : Set.Nonempty (s ∩ v)
⊢ Set.Nonempty (s ∩ (u ∩ v))

tactic: intro H
state_before: case mpr
α : Type u
β : Type v
ι : Type ?u.102865
π : ι → Type ?u.102870
inst✝ : TopologicalSpace α
s t u✝ v✝ : Set α
h : ∀ (u v : Set α), IsClosed u → IsClosed v → s ⊆ u ∪ v → s ∩ (u ∩ v) = ∅ → s ⊆ u ∨ s ⊆ v
u v : Set α
hu : IsClosed u
hv : IsClosed v
hs : s ⊆ u ∪ v
hsu : Set.Nonempty (s ∩ u)
hsv : Set.Nonempty (s ∩ v)
⊢ s ∩ (u ∩ v) ≠ ∅

tactic: specialize h u v hu hv hs H
state_before: case mpr
α : Type u
β : Type v
ι : Type ?u.102865
π : ι → Type ?u.102870
inst✝ : TopologicalSpace α
s t u✝ v✝ : Set α
h : ∀ (u v : Set α), IsClosed u → IsClosed v → s ⊆ u ∪ v → s ∩ (u ∩ v) = ∅ → s ⊆ u ∨ s ⊆ v
u v : Set α
hu : IsClosed u
hv : IsClosed v
hs : s ⊆ u ∪ v
hsu : Set.Nonempty (s ∩ u)
hsv : Set.Nonempty (s ∩ v)
H : s ∩ (u ∩ v) = ∅
⊢ False

tactic: contrapose H
state_before: case mpr
α : Type u
β : Type v
ι : Type ?u.102865
π : ι → Type ?u.102870
inst✝ : TopologicalSpace α
s t u✝ v✝ u v : Set α
hu : IsClosed u
hv : IsClosed v
hs : s ⊆ u ∪ v
hsu : Set.Nonempty (s ∩ u)
hsv : Set.Nonempty (s ∩ v)
H : s ∩ (u ∩ v) = ∅
h : s ⊆ u ∨ s ⊆ v
⊢ False

tactic: apply Nonempty.ne_empty
state_before: case mpr
α : Type u
β : Type v
ι : Type ?u.102865
π : ι → Type ?u.102870
inst✝ : TopologicalSpace α
s t u✝ v✝ u v : Set α
hu : IsClosed u
hv : IsClosed v
hs : s ⊆ u ∪ v
hsu : Set.Nonempty (s ∩ u)
hsv : Set.Nonempty (s ∩ v)
h : s ⊆ u ∨ s ⊆ v
H : ¬False
⊢ ¬s ∩ (u ∩ v) = ∅

tactic: cases' h with h h
state_before: case mpr.a
α : Type u
β : Type v
ι : Type ?u.102865
π : ι → Type ?u.102870
inst✝ : TopologicalSpace α
s t u✝ v✝ u v : Set α
hu : IsClosed u
hv : IsClosed v
hs : s ⊆ u ∪ v
hsu : Set.Nonempty (s ∩ u)
hsv : Set.Nonempty (s ∩ v)
h : s ⊆ u ∨ s ⊆ v
H : ¬False
⊢ Set.Nonempty (s ∩ (u ∩ v))

tactic: rcases hsv with ⟨x, hxs, hxv⟩
state_before: case mpr.a.inl
α : Type u
β : Type v
ι : Type ?u.102865
π : ι → Type ?u.102870
inst✝ : TopologicalSpace α
s t u✝ v✝ u v : Set α
hu : IsClosed u
hv : IsClosed v
hs : s ⊆ u ∪ v
hsu : Set.Nonempty (s ∩ u)
hsv : Set.Nonempty (s ∩ v)
H : ¬False
h : s ⊆ u
⊢ Set.Nonempty (s ∩ (u ∩ v))

tactic: exact ⟨x, hxs, ⟨h hxs, hxv⟩⟩
state_before: case mpr.a.inl.intro.intro
α : Type u
β : Type v
ι : Type ?u.102865
π : ι → Type ?u.102870
inst✝ : TopologicalSpace α
s t u✝ v✝ u v : Set α
hu : IsClosed u
hv : IsClosed v
hs : s ⊆ u ∪ v
hsu : Set.Nonempty (s ∩ u)
H : ¬False
h : s ⊆ u
x : α
hxs : x ∈ s
hxv : x ∈ v
⊢ Set.Nonempty (s ∩ (u ∩ v))

tactic: rcases hsu with ⟨x, hxs, hxu⟩
state_before: case mpr.a.inr
α : Type u
β : Type v
ι : Type ?u.102865
π : ι → Type ?u.102870
inst✝ : TopologicalSpace α
s t u✝ v✝ u v : Set α
hu : IsClosed u
hv : IsClosed v
hs : s ⊆ u ∪ v
hsu : Set.Nonempty (s ∩ u)
hsv : Set.Nonempty (s ∩ v)
H : ¬False
h : s ⊆ v
⊢ Set.Nonempty (s ∩ (u ∩ v))

tactic: exact ⟨x, hxs, ⟨hxu, h hxs⟩⟩
state_before: case mpr.a.inr.intro.intro
α : Type u
β : Type v
ι : Type ?u.102865
π : ι → Type ?u.102870
inst✝ : TopologicalSpace α
s t u✝ v✝ u v : Set α
hu : IsClosed u
hv : IsClosed v
hs : s ⊆ u ∪ v
hsv : Set.Nonempty (s ∩ v)
H : ¬False
h : s ⊆ v
x : α
hxs : x ∈ s
hxu : x ∈ u
⊢ Set.Nonempty (s ∩ (u ∩ v))