Theorem: Set.disjoint_ordT5Nhd
File: Mathlib/Data/Set/Intervals/OrdConnectedComponent.lean

tactic: rw [disjoint_iff_inf_le]
state_before: α : Type u_1
inst✝ : LinearOrder α
s t : Set α
x y z : α
⊢ Disjoint (ordT5Nhd s t) (ordT5Nhd t s)

tactic: rintro x ⟨hx₁, hx₂⟩
state_before: α : Type u_1
inst✝ : LinearOrder α
s t : Set α
x y z : α
⊢ ordT5Nhd s t ⊓ ordT5Nhd t s ≤ ⊥

tactic: rcases mem_iUnion₂.1 hx₁ with ⟨a, has, ha⟩
state_before: case intro
α : Type u_1
inst✝ : LinearOrder α
s t : Set α
x✝ y z x : α
hx₁ : x ∈ ordT5Nhd s t
hx₂ : x ∈ ordT5Nhd t s
⊢ x ∈ ⊥

tactic: clear hx₁
state_before: case intro.intro.intro
α : Type u_1
inst✝ : LinearOrder α
s t : Set α
x✝ y z x : α
hx₁ : x ∈ ordT5Nhd s t
hx₂ : x ∈ ordT5Nhd t s
a : α
has : a ∈ s
ha : x ∈ ordConnectedComponent (tᶜ ∩ ordConnectedSection (ordSeparatingSet s t)ᶜ) a
⊢ x ∈ ⊥

tactic: rcases mem_iUnion₂.1 hx₂ with ⟨b, hbt, hb⟩
state_before: case intro.intro.intro
α : Type u_1
inst✝ : LinearOrder α
s t : Set α
x✝ y z x : α
hx₂ : x ∈ ordT5Nhd t s
a : α
has : a ∈ s
ha : x ∈ ordConnectedComponent (tᶜ ∩ ordConnectedSection (ordSeparatingSet s t)ᶜ) a
⊢ x ∈ ⊥

tactic: clear hx₂
state_before: case intro.intro.intro.intro.intro
α : Type u_1
inst✝ : LinearOrder α
s t : Set α
x✝ y z x : α
hx₂ : x ∈ ordT5Nhd t s
a : α
has : a ∈ s
ha : x ∈ ordConnectedComponent (tᶜ ∩ ordConnectedSection (ordSeparatingSet s t)ᶜ) a
b : α
hbt : b ∈ t
hb : x ∈ ordConnectedComponent (sᶜ ∩ ordConnectedSection (ordSeparatingSet t s)ᶜ) b
⊢ x ∈ ⊥

tactic: rw [mem_ordConnectedComponent, subset_inter_iff] at ha hb
state_before: case intro.intro.intro.intro.intro
α : Type u_1
inst✝ : LinearOrder α
s t : Set α
x✝ y z x a : α
has : a ∈ s
ha : x ∈ ordConnectedComponent (tᶜ ∩ ordConnectedSection (ordSeparatingSet s t)ᶜ) a
b : α
hbt : b ∈ t
hb : x ∈ ordConnectedComponent (sᶜ ∩ ordConnectedSection (ordSeparatingSet t s)ᶜ) b
⊢ x ∈ ⊥

tactic: cases' le_total a b with hab hab
state_before: case intro.intro.intro.intro.intro
α : Type u_1
inst✝ : LinearOrder α
s t : Set α
x✝ y z x a : α
has : a ∈ s
ha : [[a, x]] ⊆ tᶜ ∧ [[a, x]] ⊆ ordConnectedSection (ordSeparatingSet s t)ᶜ
b : α
hbt : b ∈ t
hb : [[b, x]] ⊆ sᶜ ∧ [[b, x]] ⊆ ordConnectedSection (ordSeparatingSet t s)ᶜ
⊢ x ∈ ⊥

tactic: on_goal 2 => swap_var a ↔ b, s ↔ t, ha ↔ hb, has ↔ hbt
state_before: case intro.intro.intro.intro.intro.inl
α : Type u_1
inst✝ : LinearOrder α
s t : Set α
x✝ y z x a : α
has : a ∈ s
ha : [[a, x]] ⊆ tᶜ ∧ [[a, x]] ⊆ ordConnectedSection (ordSeparatingSet s t)ᶜ
b : α
hbt : b ∈ t
hb : [[b, x]] ⊆ sᶜ ∧ [[b, x]] ⊆ ordConnectedSection (ordSeparatingSet t s)ᶜ
hab : a ≤ b
⊢ x ∈ ⊥

case intro.intro.intro.intro.intro.inr
α : Type u_1
inst✝ : LinearOrder α
s t : Set α
x✝ y z x a : α
has : a ∈ s
ha : [[a, x]] ⊆ tᶜ ∧ [[a, x]] ⊆ ordConnectedSection (ordSeparatingSet s t)ᶜ
b : α
hbt : b ∈ t
hb : [[b, x]] ⊆ sᶜ ∧ [[b, x]] ⊆ ordConnectedSection (ordSeparatingSet t s)ᶜ
hab : b ≤ a
⊢ x ∈ ⊥

tactic: swap_var a ↔ b, s ↔ t, ha ↔ hb, has ↔ hbt
state_before: case intro.intro.intro.intro.intro.inr
α : Type u_1
inst✝ : LinearOrder α
s t : Set α
x✝ y z x a : α
has : a ∈ s
ha : [[a, x]] ⊆ tᶜ ∧ [[a, x]] ⊆ ordConnectedSection (ordSeparatingSet s t)ᶜ
b : α
hbt : b ∈ t
hb : [[b, x]] ⊆ sᶜ ∧ [[b, x]] ⊆ ordConnectedSection (ordSeparatingSet t s)ᶜ
hab : b ≤ a
⊢ x ∈ ⊥

tactic: swap_var a ↔ b, s ↔ t, ha ↔ hb, has ↔ hbt
state_before: case intro.intro.intro.intro.intro.inr
α : Type u_1
inst✝ : LinearOrder α
s t : Set α
x✝ y z x a : α
has : a ∈ s
ha : [[a, x]] ⊆ tᶜ ∧ [[a, x]] ⊆ ordConnectedSection (ordSeparatingSet s t)ᶜ
b : α
hbt : b ∈ t
hb : [[b, x]] ⊆ sᶜ ∧ [[b, x]] ⊆ ordConnectedSection (ordSeparatingSet t s)ᶜ
hab : b ≤ a
⊢ x ∈ ⊥

tactic: cases' ha with ha ha'
state_before: case intro.intro.intro.intro.intro.inr
α : Type u_1
inst✝ : LinearOrder α
t s : Set α
x✝ y z x b : α
hbt : b ∈ t
hb : [[b, x]] ⊆ sᶜ ∧ [[b, x]] ⊆ ordConnectedSection (ordSeparatingSet t s)ᶜ
a : α
has : a ∈ s
ha : [[a, x]] ⊆ tᶜ ∧ [[a, x]] ⊆ ordConnectedSection (ordSeparatingSet s t)ᶜ
hab : a ≤ b
⊢ x ∈ ⊥

tactic: cases' hb with hb hb'
state_before: case intro.intro.intro.intro.intro.inr.intro
α : Type u_1
inst✝ : LinearOrder α
t s : Set α
x✝ y z x b : α
hbt : b ∈ t
hb : [[b, x]] ⊆ sᶜ ∧ [[b, x]] ⊆ ordConnectedSection (ordSeparatingSet t s)ᶜ
a : α
has : a ∈ s
hab : a ≤ b
ha : [[a, x]] ⊆ tᶜ
ha' : [[a, x]] ⊆ ordConnectedSection (ordSeparatingSet s t)ᶜ
⊢ x ∈ ⊥

tactic: have hsub : [[a, b]] ⊆ (ordSeparatingSet s t).ordConnectedSectionᶜ := by
  rw [ordSeparatingSet_comm, uIcc_comm] at hb'
  calc
    [[a, b]] ⊆ [[a, x]] ∪ [[x, b]] := uIcc_subset_uIcc_union_uIcc
    _ ⊆ (ordSeparatingSet s t).ordConnectedSectionᶜ := union_subset ha' hb'
state_before: case intro.intro.intro.intro.intro.inr.intro.intro
α : Type u_1
inst✝ : LinearOrder α
t s : Set α
x✝ y z x b : α
hbt : b ∈ t
a : α
has : a ∈ s
hab : a ≤ b
ha : [[a, x]] ⊆ tᶜ
ha' : [[a, x]] ⊆ ordConnectedSection (ordSeparatingSet s t)ᶜ
hb : [[b, x]] ⊆ sᶜ
hb' : [[b, x]] ⊆ ordConnectedSection (ordSeparatingSet t s)ᶜ
⊢ x ∈ ⊥

tactic: clear ha' hb'
state_before: case intro.intro.intro.intro.intro.inr.intro.intro
α : Type u_1
inst✝ : LinearOrder α
t s : Set α
x✝ y z x b : α
hbt : b ∈ t
a : α
has : a ∈ s
hab : a ≤ b
ha : [[a, x]] ⊆ tᶜ
ha' : [[a, x]] ⊆ ordConnectedSection (ordSeparatingSet s t)ᶜ
hb : [[b, x]] ⊆ sᶜ
hb' : [[b, x]] ⊆ ordConnectedSection (ordSeparatingSet t s)ᶜ
hsub : [[a, b]] ⊆ ordConnectedSection (ordSeparatingSet s t)ᶜ
⊢ x ∈ ⊥

tactic: cases' le_total x a with hxa hax
state_before: case intro.intro.intro.intro.intro.inr.intro.intro
α : Type u_1
inst✝ : LinearOrder α
t s : Set α
x✝ y z x b : α
hbt : b ∈ t
a : α
has : a ∈ s
hab : a ≤ b
ha : [[a, x]] ⊆ tᶜ
hb : [[b, x]] ⊆ sᶜ
hsub : [[a, b]] ⊆ ordConnectedSection (ordSeparatingSet s t)ᶜ
⊢ x ∈ ⊥

tactic: cases' le_total b x with hbx hxb
state_before: case intro.intro.intro.intro.intro.inr.intro.intro.inr
α : Type u_1
inst✝ : LinearOrder α
t s : Set α
x✝ y z x b : α
hbt : b ∈ t
a : α
has : a ∈ s
hab : a ≤ b
ha : [[a, x]] ⊆ tᶜ
hb : [[b, x]] ⊆ sᶜ
hsub : [[a, b]] ⊆ ordConnectedSection (ordSeparatingSet s t)ᶜ
hax : a ≤ x
⊢ x ∈ ⊥

tactic: have h' : x ∈ ordSeparatingSet s t := ⟨mem_iUnion₂.2 ⟨a, has, ha⟩, mem_iUnion₂.2 ⟨b, hbt, hb⟩⟩
state_before: case intro.intro.intro.intro.intro.inr.intro.intro.inr.inr
α : Type u_1
inst✝ : LinearOrder α
t s : Set α
x✝ y z x b : α
hbt : b ∈ t
a : α
has : a ∈ s
hab : a ≤ b
ha : [[a, x]] ⊆ tᶜ
hb : [[b, x]] ⊆ sᶜ
hsub : [[a, b]] ⊆ ordConnectedSection (ordSeparatingSet s t)ᶜ
hax : a ≤ x
hxb : x ≤ b
⊢ x ∈ ⊥

tactic: suffices : ordConnectedComponent (ordSeparatingSet s t) x ⊆ [[a, b]]
state_before: case intro.intro.intro.intro.intro.inr.intro.intro.inr.inr
α : Type u_1
inst✝ : LinearOrder α
t s : Set α
x✝ y z x b : α
hbt : b ∈ t
a : α
has : a ∈ s
hab : a ≤ b
ha : [[a, x]] ⊆ tᶜ
hb : [[b, x]] ⊆ sᶜ
hsub : [[a, b]] ⊆ ordConnectedSection (ordSeparatingSet s t)ᶜ
hax : a ≤ x
hxb : x ≤ b
h' : x ∈ ordSeparatingSet s t
⊢ x ∈ ⊥

tactic: exact hsub (this <| ordConnectedProj_mem_ordConnectedComponent _ ⟨x, h'⟩) (mem_range_self _)
state_before: case intro.intro.intro.intro.intro.inr.intro.intro.inr.inr
α : Type u_1
inst✝ : LinearOrder α
t s : Set α
x✝ y z x b : α
hbt : b ∈ t
a : α
has : a ∈ s
hab : a ≤ b
ha : [[a, x]] ⊆ tᶜ
hb : [[b, x]] ⊆ sᶜ
hsub : [[a, b]] ⊆ ordConnectedSection (ordSeparatingSet s t)ᶜ
hax : a ≤ x
hxb : x ≤ b
h' : x ∈ ordSeparatingSet s t
this : ordConnectedComponent (ordSeparatingSet s t) x ⊆ [[a, b]]
⊢ x ∈ ⊥

case this
α : Type u_1
inst✝ : LinearOrder α
t s : Set α
x✝ y z x b : α
hbt : b ∈ t
a : α
has : a ∈ s
hab : a ≤ b
ha : [[a, x]] ⊆ tᶜ
hb : [[b, x]] ⊆ sᶜ
hsub : [[a, b]] ⊆ ordConnectedSection (ordSeparatingSet s t)ᶜ
hax : a ≤ x
hxb : x ≤ b
h' : x ∈ ordSeparatingSet s t
⊢ ordConnectedComponent (ordSeparatingSet s t) x ⊆ [[a, b]]

tactic: rintro y (hy : [[x, y]] ⊆ ordSeparatingSet s t)
state_before: case this
α : Type u_1
inst✝ : LinearOrder α
t s : Set α
x✝ y z x b : α
hbt : b ∈ t
a : α
has : a ∈ s
hab : a ≤ b
ha : [[a, x]] ⊆ tᶜ
hb : [[b, x]] ⊆ sᶜ
hsub : [[a, b]] ⊆ ordConnectedSection (ordSeparatingSet s t)ᶜ
hax : a ≤ x
hxb : x ≤ b
h' : x ∈ ordSeparatingSet s t
⊢ ordConnectedComponent (ordSeparatingSet s t) x ⊆ [[a, b]]

tactic: rw [uIcc_of_le hab, mem_Icc, ← not_lt, ← not_lt]
state_before: case this
α : Type u_1
inst✝ : LinearOrder α
t s : Set α
x✝ y✝ z x b : α
hbt : b ∈ t
a : α
has : a ∈ s
hab : a ≤ b
ha : [[a, x]] ⊆ tᶜ
hb : [[b, x]] ⊆ sᶜ
hsub : [[a, b]] ⊆ ordConnectedSection (ordSeparatingSet s t)ᶜ
hax : a ≤ x
hxb : x ≤ b
h' : x ∈ ordSeparatingSet s t
y : α
hy : [[x, y]] ⊆ ordSeparatingSet s t
⊢ y ∈ [[a, b]]

tactic: have sol1 := fun (hya : y < a) =>
    (disjoint_left (t := ordSeparatingSet s t)).1 disjoint_left_ordSeparatingSet has
      (hy <| Icc_subset_uIcc' ⟨hya.le, hax⟩)
state_before: case this
α : Type u_1
inst✝ : LinearOrder α
t s : Set α
x✝ y✝ z x b : α
hbt : b ∈ t
a : α
has : a ∈ s
hab : a ≤ b
ha : [[a, x]] ⊆ tᶜ
hb : [[b, x]] ⊆ sᶜ
hsub : [[a, b]] ⊆ ordConnectedSection (ordSeparatingSet s t)ᶜ
hax : a ≤ x
hxb : x ≤ b
h' : x ∈ ordSeparatingSet s t
y : α
hy : [[x, y]] ⊆ ordSeparatingSet s t
⊢ ¬y < a ∧ ¬b < y

tactic: have sol2 := fun (hby : b < y) =>
    (disjoint_left (t := ordSeparatingSet s t)).1 disjoint_right_ordSeparatingSet hbt
      (hy <| Icc_subset_uIcc ⟨hxb, hby.le⟩)
state_before: case this
α : Type u_1
inst✝ : LinearOrder α
t s : Set α
x✝ y✝ z x b : α
hbt : b ∈ t
a : α
has : a ∈ s
hab : a ≤ b
ha : [[a, x]] ⊆ tᶜ
hb : [[b, x]] ⊆ sᶜ
hsub : [[a, b]] ⊆ ordConnectedSection (ordSeparatingSet s t)ᶜ
hax : a ≤ x
hxb : x ≤ b
h' : x ∈ ordSeparatingSet s t
y : α
hy : [[x, y]] ⊆ ordSeparatingSet s t
sol1 : y < a → False
⊢ ¬y < a ∧ ¬b < y

tactic: exact ⟨sol1, sol2⟩
state_before: case this
α : Type u_1
inst✝ : LinearOrder α
t s : Set α
x✝ y✝ z x b : α
hbt : b ∈ t
a : α
has : a ∈ s
hab : a ≤ b
ha : [[a, x]] ⊆ tᶜ
hb : [[b, x]] ⊆ sᶜ
hsub : [[a, b]] ⊆ ordConnectedSection (ordSeparatingSet s t)ᶜ
hax : a ≤ x
hxb : x ≤ b
h' : x ∈ ordSeparatingSet s t
y : α
hy : [[x, y]] ⊆ ordSeparatingSet s t
sol1 : y < a → False
sol2 : b < y → False
⊢ ¬y < a ∧ ¬b < y

tactic: rw [ordSeparatingSet_comm, uIcc_comm] at hb'
state_before: α : Type u_1
inst✝ : LinearOrder α
t s : Set α
x✝ y z x b : α
hbt : b ∈ t
a : α
has : a ∈ s
hab : a ≤ b
ha : [[a, x]] ⊆ tᶜ
ha' : [[a, x]] ⊆ ordConnectedSection (ordSeparatingSet s t)ᶜ
hb : [[b, x]] ⊆ sᶜ
hb' : [[b, x]] ⊆ ordConnectedSection (ordSeparatingSet t s)ᶜ
⊢ [[a, b]] ⊆ ordConnectedSection (ordSeparatingSet s t)ᶜ

tactic: calc
  [[a, b]] ⊆ [[a, x]] ∪ [[x, b]] := uIcc_subset_uIcc_union_uIcc
  _ ⊆ (ordSeparatingSet s t).ordConnectedSectionᶜ := union_subset ha' hb'
state_before: α : Type u_1
inst✝ : LinearOrder α
t s : Set α
x✝ y z x b : α
hbt : b ∈ t
a : α
has : a ∈ s
hab : a ≤ b
ha : [[a, x]] ⊆ tᶜ
ha' : [[a, x]] ⊆ ordConnectedSection (ordSeparatingSet s t)ᶜ
hb : [[b, x]] ⊆ sᶜ
hb' : [[x, b]] ⊆ ordConnectedSection (ordSeparatingSet s t)ᶜ
⊢ [[a, b]] ⊆ ordConnectedSection (ordSeparatingSet s t)ᶜ

tactic: exact hb (Icc_subset_uIcc' ⟨hxa, hab⟩) has
state_before: case intro.intro.intro.intro.intro.inr.intro.intro.inl
α : Type u_1
inst✝ : LinearOrder α
t s : Set α
x✝ y z x b : α
hbt : b ∈ t
a : α
has : a ∈ s
hab : a ≤ b
ha : [[a, x]] ⊆ tᶜ
hb : [[b, x]] ⊆ sᶜ
hsub : [[a, b]] ⊆ ordConnectedSection (ordSeparatingSet s t)ᶜ
hxa : x ≤ a
⊢ x ∈ ⊥

tactic: exact ha (Icc_subset_uIcc ⟨hab, hbx⟩) hbt
state_before: case intro.intro.intro.intro.intro.inr.intro.intro.inr.inl
α : Type u_1
inst✝ : LinearOrder α
t s : Set α
x✝ y z x b : α
hbt : b ∈ t
a : α
has : a ∈ s
hab : a ≤ b
ha : [[a, x]] ⊆ tᶜ
hb : [[b, x]] ⊆ sᶜ
hsub : [[a, b]] ⊆ ordConnectedSection (ordSeparatingSet s t)ᶜ
hax : a ≤ x
hbx : b ≤ x
⊢ x ∈ ⊥