Theorem: IsPreconnected.biUnion_of_chain
File: Mathlib/Topology/Connected.lean

tactic: have h1 : ∀ {i j k : β}, i ∈ t → j ∈ t → k ∈ Ico i j → k ∈ t := fun hi hj hk =>
  ht.out hi hj (Ico_subset_Icc_self hk)
state_before: α : Type u
β : Type v
ι : Type ?u.13818
π : ι → Type ?u.13823
inst✝³ : TopologicalSpace α
s✝ t✝ u v : Set α
inst✝² : LinearOrder β
inst✝¹ : SuccOrder β
inst✝ : IsSuccArchimedean β
s : β → Set α
t : Set β
ht : OrdConnected t
H : ∀ (n : β), n ∈ t → IsPreconnected (s n)
K : ∀ (n : β), n ∈ t → succ n ∈ t → Set.Nonempty (s n ∩ s (succ n))
⊢ IsPreconnected (⋃ (n : β) (_ : n ∈ t), s n)

tactic: have h2 : ∀ {i j k : β}, i ∈ t → j ∈ t → k ∈ Ico i j → succ k ∈ t := fun hi hj hk =>
  ht.out hi hj ⟨hk.1.trans <| le_succ _, succ_le_of_lt hk.2⟩
state_before: α : Type u
β : Type v
ι : Type ?u.13818
π : ι → Type ?u.13823
inst✝³ : TopologicalSpace α
s✝ t✝ u v : Set α
inst✝² : LinearOrder β
inst✝¹ : SuccOrder β
inst✝ : IsSuccArchimedean β
s : β → Set α
t : Set β
ht : OrdConnected t
H : ∀ (n : β), n ∈ t → IsPreconnected (s n)
K : ∀ (n : β), n ∈ t → succ n ∈ t → Set.Nonempty (s n ∩ s (succ n))
h1 : ∀ {i j k : β}, i ∈ t → j ∈ t → k ∈ Ico i j → k ∈ t
⊢ IsPreconnected (⋃ (n : β) (_ : n ∈ t), s n)

tactic: have h3 : ∀ {i j k : β}, i ∈ t → j ∈ t → k ∈ Ico i j → (s k ∩ s (succ k)).Nonempty :=
  fun hi hj hk => K _ (h1 hi hj hk) (h2 hi hj hk)
state_before: α : Type u
β : Type v
ι : Type ?u.13818
π : ι → Type ?u.13823
inst✝³ : TopologicalSpace α
s✝ t✝ u v : Set α
inst✝² : LinearOrder β
inst✝¹ : SuccOrder β
inst✝ : IsSuccArchimedean β
s : β → Set α
t : Set β
ht : OrdConnected t
H : ∀ (n : β), n ∈ t → IsPreconnected (s n)
K : ∀ (n : β), n ∈ t → succ n ∈ t → Set.Nonempty (s n ∩ s (succ n))
h1 : ∀ {i j k : β}, i ∈ t → j ∈ t → k ∈ Ico i j → k ∈ t
h2 : ∀ {i j k : β}, i ∈ t → j ∈ t → k ∈ Ico i j → succ k ∈ t
⊢ IsPreconnected (⋃ (n : β) (_ : n ∈ t), s n)

tactic: refine' IsPreconnected.biUnion_of_reflTransGen H fun i hi j hj => _
state_before: α : Type u
β : Type v
ι : Type ?u.13818
π : ι → Type ?u.13823
inst✝³ : TopologicalSpace α
s✝ t✝ u v : Set α
inst✝² : LinearOrder β
inst✝¹ : SuccOrder β
inst✝ : IsSuccArchimedean β
s : β → Set α
t : Set β
ht : OrdConnected t
H : ∀ (n : β), n ∈ t → IsPreconnected (s n)
K : ∀ (n : β), n ∈ t → succ n ∈ t → Set.Nonempty (s n ∩ s (succ n))
h1 : ∀ {i j k : β}, i ∈ t → j ∈ t → k ∈ Ico i j → k ∈ t
h2 : ∀ {i j k : β}, i ∈ t → j ∈ t → k ∈ Ico i j → succ k ∈ t
h3 : ∀ {i j k : β}, i ∈ t → j ∈ t → k ∈ Ico i j → Set.Nonempty (s k ∩ s (succ k))
⊢ IsPreconnected (⋃ (n : β) (_ : n ∈ t), s n)

tactic: exact reflTransGen_of_succ _ (fun k hk => ⟨h3 hi hj hk, h1 hi hj hk⟩) fun k hk =>
    ⟨by rw [inter_comm]; exact h3 hj hi hk, h2 hj hi hk⟩
state_before: α : Type u
β : Type v
ι : Type ?u.13818
π : ι → Type ?u.13823
inst✝³ : TopologicalSpace α
s✝ t✝ u v : Set α
inst✝² : LinearOrder β
inst✝¹ : SuccOrder β
inst✝ : IsSuccArchimedean β
s : β → Set α
t : Set β
ht : OrdConnected t
H : ∀ (n : β), n ∈ t → IsPreconnected (s n)
K : ∀ (n : β), n ∈ t → succ n ∈ t → Set.Nonempty (s n ∩ s (succ n))
h1 : ∀ {i j k : β}, i ∈ t → j ∈ t → k ∈ Ico i j → k ∈ t
h2 : ∀ {i j k : β}, i ∈ t → j ∈ t → k ∈ Ico i j → succ k ∈ t
h3 : ∀ {i j k : β}, i ∈ t → j ∈ t → k ∈ Ico i j → Set.Nonempty (s k ∩ s (succ k))
i : β
hi : i ∈ t
j : β
hj : j ∈ t
⊢ ReflTransGen (fun i j => Set.Nonempty (s i ∩ s j) ∧ i ∈ t) i j

tactic: rw [inter_comm]
state_before: α : Type u
β : Type v
ι : Type ?u.13818
π : ι → Type ?u.13823
inst✝³ : TopologicalSpace α
s✝ t✝ u v : Set α
inst✝² : LinearOrder β
inst✝¹ : SuccOrder β
inst✝ : IsSuccArchimedean β
s : β → Set α
t : Set β
ht : OrdConnected t
H : ∀ (n : β), n ∈ t → IsPreconnected (s n)
K : ∀ (n : β), n ∈ t → succ n ∈ t → Set.Nonempty (s n ∩ s (succ n))
h1 : ∀ {i j k : β}, i ∈ t → j ∈ t → k ∈ Ico i j → k ∈ t
h2 : ∀ {i j k : β}, i ∈ t → j ∈ t → k ∈ Ico i j → succ k ∈ t
h3 : ∀ {i j k : β}, i ∈ t → j ∈ t → k ∈ Ico i j → Set.Nonempty (s k ∩ s (succ k))
i : β
hi : i ∈ t
j : β
hj : j ∈ t
k : β
hk : k ∈ Ico j i
⊢ Set.Nonempty (s (succ k) ∩ s k)

tactic: exact h3 hj hi hk
state_before: α : Type u
β : Type v
ι : Type ?u.13818
π : ι → Type ?u.13823
inst✝³ : TopologicalSpace α
s✝ t✝ u v : Set α
inst✝² : LinearOrder β
inst✝¹ : SuccOrder β
inst✝ : IsSuccArchimedean β
s : β → Set α
t : Set β
ht : OrdConnected t
H : ∀ (n : β), n ∈ t → IsPreconnected (s n)
K : ∀ (n : β), n ∈ t → succ n ∈ t → Set.Nonempty (s n ∩ s (succ n))
h1 : ∀ {i j k : β}, i ∈ t → j ∈ t → k ∈ Ico i j → k ∈ t
h2 : ∀ {i j k : β}, i ∈ t → j ∈ t → k ∈ Ico i j → succ k ∈ t
h3 : ∀ {i j k : β}, i ∈ t → j ∈ t → k ∈ Ico i j → Set.Nonempty (s k ∩ s (succ k))
i : β
hi : i ∈ t
j : β
hj : j ∈ t
k : β
hk : k ∈ Ico j i
⊢ Set.Nonempty (s k ∩ s (succ k))