l3lab/ntp-mathlib huggingface dataset:
instance linearOrderedAddCommGroupWithTop : LinearOrderedAddCommGroupWithTop (WithTop α) where
  __ := WithTop.linearOrderedAddCommMonoidWithTop
  __ := Option.nontrivial
  neg := Option.map fun a : α => -a
  neg_top := Option.map_none
  add_neg_cancel := by
    rintro (a | a) ha
    · exact (ha rfl).elim
    · 

Proof state:
case some
α : Type u_1
inst✝ : LinearOrderedAddCommGroup α
a✝ b c d : α
src✝¹ : LinearOrderedAddCommMonoidWithTop (WithTop α) := linearOrderedAddCommMonoidWithTop
src✝ : Nontrivial (Option α) := Option.nontrivial
a : α
ha : Option.some a ≠ ⊤
⊢ Option.some a + -Option.some a = 0

Next tactic:
exact WithTop.coe_add.symm.trans (WithTop.coe_eq_coe.2 (add_neg_self a))
theorem dual_ordConnectedComponent :
    ordConnectedComponent (ofDual ⁻¹' s) (toDual x) = ofDual ⁻¹' ordConnectedComponent s x :=
  ext <| (Surjective.forall toDual.surjective).2 fun x => by
    

Proof state:
α : Type u_1
inst✝ : LinearOrder α
s t : Set α
x✝ y z x : α
⊢ toDual x ∈ ordConnectedComponent (⇑ofDual ⁻¹' s) (toDual x✝) ↔ toDual x ∈ ⇑ofDual ⁻¹' ordConnectedComponent s x✝

Next tactic:
rw [mem_ordConnectedComponent, dual_uIcc]
theorem dual_ordConnectedComponent :
    ordConnectedComponent (ofDual ⁻¹' s) (toDual x) = ofDual ⁻¹' ordConnectedComponent s x :=
  ext <| (Surjective.forall toDual.surjective).2 fun x => by
    rw [mem_ordConnectedComponent, dual_uIcc]
    

Proof state:
α : Type u_1
inst✝ : LinearOrder α
s t : Set α
x✝ y z x : α
⊢ ⇑ofDual ⁻¹' [[x✝, x]] ⊆ ⇑ofDual ⁻¹' s ↔ toDual x ∈ ⇑ofDual ⁻¹' ordConnectedComponent s x✝

Next tactic:
rfl
@[simp]
theorem self_mem_ordConnectedComponent : x ∈ ordConnectedComponent s x ↔ x ∈ s := by
  

Proof state:
α : Type u_1
inst✝ : LinearOrder α
s t : Set α
x y z : α
⊢ x ∈ ordConnectedComponent s x ↔ x ∈ s

Next tactic:
rw [mem_ordConnectedComponent, uIcc_self, singleton_subset_iff]
@[simp]
theorem ordConnectedComponent_eq_empty : ordConnectedComponent s x = ∅ ↔ x ∉ s := by
  

Proof state:
α : Type u_1
inst✝ : LinearOrder α
s t : Set α
x y z : α
⊢ ordConnectedComponent s x = ∅ ↔ x ∉ s

Next tactic:
rw [← not_nonempty_iff_eq_empty, nonempty_ordConnectedComponent]
@[simp]
theorem ordConnectedComponent_univ : ordConnectedComponent univ x = univ := by
  

Proof state:
α : Type u_1
inst✝ : LinearOrder α
s t : Set α
x y z : α
⊢ ordConnectedComponent univ x = univ

Next tactic:
simp [ordConnectedComponent]
theorem ordConnectedComponent_inter (s t : Set α) (x : α) :
    ordConnectedComponent (s ∩ t) x = ordConnectedComponent s x ∩ ordConnectedComponent t x := by
  

Proof state:
α : Type u_1
inst✝ : LinearOrder α
s✝ t✝ : Set α
x✝ y z : α
s t : Set α
x : α
⊢ ordConnectedComponent (s ∩ t) x = ordConnectedComponent s x ∩ ordConnectedComponent t x

Next tactic:
simp [ordConnectedComponent, setOf_and]
theorem mem_ordConnectedComponent_comm :
    y ∈ ordConnectedComponent s x ↔ x ∈ ordConnectedComponent s y := by
  

Proof state:
α : Type u_1
inst✝ : LinearOrder α
s t : Set α
x y z : α
⊢ y ∈ ordConnectedComponent s x ↔ x ∈ ordConnectedComponent s y

Next tactic:
rw [mem_ordConnectedComponent, mem_ordConnectedComponent, uIcc_comm]
@[simp]
theorem ordConnectedProj_eq {x y : s} :
    ordConnectedProj s x = ordConnectedProj s y ↔ [[(x : α), y]] ⊆ s := by
  

Proof state:
α : Type u_1
inst✝ : LinearOrder α
s t : Set α
x✝ y✝ z : α
x y : ↑s
⊢ ordConnectedProj s x = ordConnectedProj s y ↔ [[↑x, ↑y]] ⊆ s

Next tactic:
constructor
@[simp]
theorem ordConnectedProj_eq {x y : s} :
    ordConnectedProj s x = ordConnectedProj s y ↔ [[(x : α), y]] ⊆ s := by
  constructor <;> 

Proof state:
case mp
α : Type u_1
inst✝ : LinearOrder α
s t : Set α
x✝ y✝ z : α
x y : ↑s
⊢ ordConnectedProj s x = ordConnectedProj s y → [[↑x, ↑y]] ⊆ s

Next tactic:
intro h
@[simp]
theorem ordConnectedProj_eq {x y : s} :
    ordConnectedProj s x = ordConnectedProj s y ↔ [[(x : α), y]] ⊆ s := by
  constructor <;> 

Proof state:
case mpr
α : Type u_1
inst✝ : LinearOrder α
s t : Set α
x✝ y✝ z : α
x y : ↑s
⊢ [[↑x, ↑y]] ⊆ s → ordConnectedProj s x = ordConnectedProj s y

Next tactic:
intro h
@[simp]
theorem ordConnectedProj_eq {x y : s} :
    ordConnectedProj s x = ordConnectedProj s y ↔ [[(x : α), y]] ⊆ s := by
  constructor <;> intro h
  · 

Proof state:
case mp
α : Type u_1
inst✝ : LinearOrder α
s t : Set α
x✝ y✝ z : α
x y : ↑s
h : ordConnectedProj s x = ordConnectedProj s y
⊢ [[↑x, ↑y]] ⊆ s

Next tactic:
rw [← mem_ordConnectedComponent, ← ordConnectedComponent_ordConnectedProj, h,
      ordConnectedComponent_ordConnectedProj, self_mem_ordConnectedComponent]
@[simp]
theorem ordConnectedProj_eq {x y : s} :
    ordConnectedProj s x = ordConnectedProj s y ↔ [[(x : α), y]] ⊆ s := by
  constructor <;> intro h
  · rw [← mem_ordConnectedComponent, ← ordConnectedComponent_ordConnectedProj, h,
      ordConnectedComponent_ordConnectedProj, self_mem_ordConnectedComponent]
    

Proof state:
case mp
α : Type u_1
inst✝ : LinearOrder α
s t : Set α
x✝ y✝ z : α
x y : ↑s
h : ordConnectedProj s x = ordConnectedProj s y
⊢ ↑y ∈ s

Next tactic:
exact y.2
@[simp]
theorem ordConnectedProj_eq {x y : s} :
    ordConnectedProj s x = ordConnectedProj s y ↔ [[(x : α), y]] ⊆ s := by
  constructor <;> intro h
  · rw [← mem_ordConnectedComponent, ← ordConnectedComponent_ordConnectedProj, h,
      ordConnectedComponent_ordConnectedProj, self_mem_ordConnectedComponent]
    exact y.2
  · 

Proof state:
case mpr
α : Type u_1
inst✝ : LinearOrder α
s t : Set α
x✝ y✝ z : α
x y : ↑s
h : [[↑x, ↑y]] ⊆ s
⊢ ordConnectedProj s x = ordConnectedProj s y

Next tactic:
simp only [ordConnectedProj, ordConnectedComponent_eq h]
theorem dual_ordConnectedSection (s : Set α) :
    ordConnectedSection (ofDual ⁻¹' s) = ofDual ⁻¹' ordConnectedSection s := by
  

Proof state:
α : Type u_1
inst✝ : LinearOrder α
s✝ t : Set α
x y z : α
s : Set α
⊢ ordConnectedSection (⇑ofDual ⁻¹' s) = ⇑ofDual ⁻¹' ordConnectedSection s

Next tactic:
simp only [ordConnectedSection]
theorem dual_ordConnectedSection (s : Set α) :
    ordConnectedSection (ofDual ⁻¹' s) = ofDual ⁻¹' ordConnectedSection s := by
  simp only [ordConnectedSection]
  

Proof state:
α : Type u_1
inst✝ : LinearOrder α
s✝ t : Set α
x y z : α
s : Set α
⊢ range (ordConnectedProj (⇑ofDual ⁻¹' s)) = ⇑ofDual ⁻¹' range (ordConnectedProj s)

Next tactic:
simp (config := { unfoldPartialApp := true }) only [ordConnectedProj]
theorem dual_ordConnectedSection (s : Set α) :
    ordConnectedSection (ofDual ⁻¹' s) = ofDual ⁻¹' ordConnectedSection s := by
  simp only [ordConnectedSection]
  simp (config := { unfoldPartialApp := true }) only [ordConnectedProj]
  

Proof state:
α : Type u_1
inst✝ : LinearOrder α
s✝ t : Set α
x y z : α
s : Set α
⊢ (range fun x => Nonempty.some (_ : Set.Nonempty (ordConnectedComponent (⇑ofDual ⁻¹' s) ↑x))) =
    ⇑ofDual ⁻¹' range fun x => Nonempty.some (_ : Set.Nonempty (ordConnectedComponent s ↑x))

Next tactic:
ext x
theorem dual_ordConnectedSection (s : Set α) :
    ordConnectedSection (ofDual ⁻¹' s) = ofDual ⁻¹' ordConnectedSection s := by
  simp only [ordConnectedSection]
  simp (config := { unfoldPartialApp := true }) only [ordConnectedProj]
  ext x
  

Proof state:
case h
α : Type u_1
inst✝ : LinearOrder α
s✝ t : Set α
x✝ y z : α
s : Set α
x : αᵒᵈ
⊢ (x ∈ range fun x => Nonempty.some (_ : Set.Nonempty (ordConnectedComponent (⇑ofDual ⁻¹' s) ↑x))) ↔
    x ∈ ⇑ofDual ⁻¹' range fun x => Nonempty.some (_ : Set.Nonempty (ordConnectedComponent s ↑x))

Next tactic:
simp only [mem_range, Subtype.exists, mem_preimage, OrderDual.exists, dual_ordConnectedComponent,
    ofDual_toDual]
theorem dual_ordConnectedSection (s : Set α) :
    ordConnectedSection (ofDual ⁻¹' s) = ofDual ⁻¹' ordConnectedSection s := by
  simp only [ordConnectedSection]
  simp (config := { unfoldPartialApp := true }) only [ordConnectedProj]
  ext x
  simp only [mem_range, Subtype.exists, mem_preimage, OrderDual.exists, dual_ordConnectedComponent,
    ofDual_toDual]
  

Proof state:
case h
α : Type u_1
inst✝ : LinearOrder α
s✝ t : Set α
x✝ y z : α
s : Set α
x : αᵒᵈ
⊢ (∃ a, ∃ (h : a ∈ s), Nonempty.some (_ : Set.Nonempty (⇑ofDual ⁻¹' ordConnectedComponent s a)) = x) ↔
    ∃ a,
      ∃ (h : a ∈ s),
        Nonempty.some (_ : Set.Nonempty (ordConnectedComponent s ↑{ val := a, property := (_ : a ∈ s) })) = ofDual x

Next tactic:
tauto
theorem eq_of_mem_ordConnectedSection_of_uIcc_subset (hx : x ∈ ordConnectedSection s)
    (hy : y ∈ ordConnectedSection s) (h : [[x, y]] ⊆ s) : x = y := by
  

Proof state:
α : Type u_1
inst✝ : LinearOrder α
s t : Set α
x y z : α
hx : x ∈ ordConnectedSection s
hy : y ∈ ordConnectedSection s
h : [[x, y]] ⊆ s
⊢ x = y

Next tactic:
rcases hx with ⟨x, rfl⟩
theorem eq_of_mem_ordConnectedSection_of_uIcc_subset (hx : x ∈ ordConnectedSection s)
    (hy : y ∈ ordConnectedSection s) (h : [[x, y]] ⊆ s) : x = y := by
  rcases hx with ⟨x, rfl⟩; 

Proof state:
case intro
α : Type u_1
inst✝ : LinearOrder α
s t : Set α
y z : α
hy : y ∈ ordConnectedSection s
x : ↑s
h : [[ordConnectedProj s x, y]] ⊆ s
⊢ ordConnectedProj s x = y

Next tactic:
rcases hy with ⟨y, rfl⟩
theorem eq_of_mem_ordConnectedSection_of_uIcc_subset (hx : x ∈ ordConnectedSection s)
    (hy : y ∈ ordConnectedSection s) (h : [[x, y]] ⊆ s) : x = y := by
  rcases hx with ⟨x, rfl⟩; rcases hy with ⟨y, rfl⟩
  

Proof state:
case intro.intro
α : Type u_1
inst✝ : LinearOrder α
s t : Set α
z : α
x y : ↑s
h : [[ordConnectedProj s x, ordConnectedProj s y]] ⊆ s
⊢ ordConnectedProj s x = ordConnectedProj s y

Next tactic:
exact
    ordConnectedProj_eq.2
      (mem_ordConnectedComponent_trans
        (mem_ordConnectedComponent_trans (ordConnectedProj_mem_ordConnectedComponent _ _) h)
        (mem_ordConnectedComponent_ordConnectedProj _ _))
theorem dual_ordSeparatingSet :
    ordSeparatingSet (ofDual ⁻¹' s) (ofDual ⁻¹' t) = ofDual ⁻¹' ordSeparatingSet s t := by
  

Proof state:
α : Type u_1
inst✝ : LinearOrder α
s t : Set α
x y z : α
⊢ ordSeparatingSet (⇑ofDual ⁻¹' s) (⇑ofDual ⁻¹' t) = ⇑ofDual ⁻¹' ordSeparatingSet s t

Next tactic:
simp only [ordSeparatingSet, mem_preimage, ← toDual.surjective.iUnion_comp, ofDual_toDual,
    dual_ordConnectedComponent, ← preimage_compl, preimage_inter, preimage_iUnion]
theorem disjoint_ordT5Nhd : Disjoint (ordT5Nhd s t) (ordT5Nhd t s) := by
  

Proof state:
α : Type u_1
inst✝ : LinearOrder α
s t : Set α
x y z : α
⊢ Disjoint (ordT5Nhd s t) (ordT5Nhd t s)

Next tactic:
rw [disjoint_iff_inf_le]
theorem disjoint_ordT5Nhd : Disjoint (ordT5Nhd s t) (ordT5Nhd t s) := by
  rw [disjoint_iff_inf_le]
  

Proof state:
α : Type u_1
inst✝ : LinearOrder α
s t : Set α
x y z : α
⊢ ordT5Nhd s t ⊓ ordT5Nhd t s ≤ ⊥

Next tactic:
rintro x ⟨hx₁, hx₂⟩
theorem disjoint_ordT5Nhd : Disjoint (ordT5Nhd s t) (ordT5Nhd t s) := by
  rw [disjoint_iff_inf_le]
  rintro x ⟨hx₁, hx₂⟩
  

Proof state:
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 ∈ ⊥

Next tactic:
rcases mem_iUnion₂.1 hx₁ with ⟨a, has, ha⟩
theorem disjoint_ordT5Nhd : Disjoint (ordT5Nhd s t) (ordT5Nhd t s) := by
  rw [disjoint_iff_inf_le]
  rintro x ⟨hx₁, hx₂⟩
  rcases mem_iUnion₂.1 hx₁ with ⟨a, has, ha⟩
  

Proof state:
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 ∈ ⊥

Next tactic:
clear hx₁
theorem disjoint_ordT5Nhd : Disjoint (ordT5Nhd s t) (ordT5Nhd t s) := by
  rw [disjoint_iff_inf_le]
  rintro x ⟨hx₁, hx₂⟩
  rcases mem_iUnion₂.1 hx₁ with ⟨a, has, ha⟩
  clear hx₁
  

Proof state:
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 ∈ ⊥

Next tactic:
rcases mem_iUnion₂.1 hx₂ with ⟨b, hbt, hb⟩
theorem disjoint_ordT5Nhd : Disjoint (ordT5Nhd s t) (ordT5Nhd t s) := by
  rw [disjoint_iff_inf_le]
  rintro x ⟨hx₁, hx₂⟩
  rcases mem_iUnion₂.1 hx₁ with ⟨a, has, ha⟩
  clear hx₁
  rcases mem_iUnion₂.1 hx₂ with ⟨b, hbt, hb⟩
  

Proof state:
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 ∈ ⊥

Next tactic:
clear hx₂
theorem disjoint_ordT5Nhd : Disjoint (ordT5Nhd s t) (ordT5Nhd t s) := by
  rw [disjoint_iff_inf_le]
  rintro x ⟨hx₁, hx₂⟩
  rcases mem_iUnion₂.1 hx₁ with ⟨a, has, ha⟩
  clear hx₁
  rcases mem_iUnion₂.1 hx₂ with ⟨b, hbt, hb⟩
  clear hx₂
  

Proof state:
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 ∈ ⊥

Next tactic:
rw [mem_ordConnectedComponent, subset_inter_iff] at ha hb
theorem disjoint_ordT5Nhd : Disjoint (ordT5Nhd s t) (ordT5Nhd t s) := by
  rw [disjoint_iff_inf_le]
  rintro x ⟨hx₁, hx₂⟩
  rcases mem_iUnion₂.1 hx₁ with ⟨a, has, ha⟩
  clear hx₁
  rcases mem_iUnion₂.1 hx₂ with ⟨b, hbt, hb⟩
  clear hx₂
  rw [mem_ordConnectedComponent, subset_inter_iff] at ha hb
  

Proof state:
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 ∈ ⊥

Next tactic:
rcases le_total a b with hab | hab
theorem disjoint_ordT5Nhd : Disjoint (ordT5Nhd s t) (ordT5Nhd t s) := by
  rw [disjoint_iff_inf_le]
  rintro x ⟨hx₁, hx₂⟩
  rcases mem_iUnion₂.1 hx₁ with ⟨a, has, ha⟩
  clear hx₁
  rcases mem_iUnion₂.1 hx₂ with ⟨b, hbt, hb⟩
  clear hx₂
  rw [mem_ordConnectedComponent, subset_inter_iff] at ha hb
  rcases le_total a b with hab | hab
  

Proof state:
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 ∈ ⊥

Next tactic:
on_goal 2 => swap_var a ↔ b, s ↔ t, ha ↔ hb, has ↔ hbt
theorem disjoint_ordT5Nhd : Disjoint (ordT5Nhd s t) (ordT5Nhd t s) := by
  rw [disjoint_iff_inf_le]
  rintro x ⟨hx₁, hx₂⟩
  rcases mem_iUnion₂.1 hx₁ with ⟨a, has, ha⟩
  clear hx₁
  rcases mem_iUnion₂.1 hx₂ with ⟨b, hbt, hb⟩
  clear hx₂
  rw [mem_ordConnectedComponent, subset_inter_iff] at ha hb
  rcases le_total a b with hab | hab
  on_goal 2 => 

Proof state:
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 ∈ ⊥

Next tactic:
swap_var a ↔ b, s ↔ t, ha ↔ hb, has ↔ hbt
theorem disjoint_ordT5Nhd : Disjoint (ordT5Nhd s t) (ordT5Nhd t s) := by
  rw [disjoint_iff_inf_le]
  rintro x ⟨hx₁, hx₂⟩
  rcases mem_iUnion₂.1 hx₁ with ⟨a, has, ha⟩
  clear hx₁
  rcases mem_iUnion₂.1 hx₂ with ⟨b, hbt, hb⟩
  clear hx₂
  rw [mem_ordConnectedComponent, subset_inter_iff] at ha hb
  rcases le_total a b with hab | hab
  on_goal 2 => swap_var a ↔ b, s ↔ t, ha ↔ hb, has ↔ hbt
  

Proof state:
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 α
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 ∈ ⊥

Next tactic:
all_goals
-- porting note: wlog not implemented yet, the following replaces the three previous lines
-- wlog (discharger := tactic.skip) hab : a ≤ b := le_total a b using a b s t, b a t s
    cases' ha with ha ha'
    cases' hb with hb hb'
    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'
    clear ha' hb'
    rcases le_total x a with hxa | hax
    · exact hb (Icc_subset_uIcc' ⟨hxa, hab⟩) has
    rcases le_total b x with hbx | hxb
    · exact ha (Icc_subset_uIcc ⟨hab, hbx⟩) hbt
    have h' : x ∈ ordSeparatingSet s t := ⟨mem_iUnion₂.2 ⟨a, has, ha⟩, mem_iUnion₂.2 ⟨b, hbt, hb⟩⟩
    -- porting note: lift not implemented yet
    -- lift x to ordSeparatingSet s t using this
    suffices ordConnectedComponent (ordSeparatingSet s t) x ⊆ [[a, b]] from
      hsub (this <| ordConnectedProj_mem_ordConnectedComponent _ ⟨x, h'⟩) (mem_range_self _)
    rintro y (hy : [[x, y]] ⊆ ordSeparatingSet s t)
    rw [uIcc_of_le hab, mem_Icc, ← not_lt, ← not_lt]
    have sol1 := fun (hya : y < a) =>
        (disjoint_left (t := ordSeparatingSet s t)).1 disjoint_left_ordSeparatingSet has
          (hy <| Icc_subset_uIcc' ⟨hya.le, hax⟩)
    have sol2 := fun (hby : b < y) =>
        (disjoint_left (t := ordSeparatingSet s t)).1 disjoint_right_ordSeparatingSet hbt
          (hy <| Icc_subset_uIcc ⟨hxb, hby.le⟩)
    exact ⟨sol1, sol2⟩
theorem disjoint_ordT5Nhd : Disjoint (ordT5Nhd s t) (ordT5Nhd t s) := by
  rw [disjoint_iff_inf_le]
  rintro x ⟨hx₁, hx₂⟩
  rcases mem_iUnion₂.1 hx₁ with ⟨a, has, ha⟩
  clear hx₁
  rcases mem_iUnion₂.1 hx₂ with ⟨b, hbt, hb⟩
  clear hx₂
  rw [mem_ordConnectedComponent, subset_inter_iff] at ha hb
  rcases le_total a b with hab | hab
  on_goal 2 => swap_var a ↔ b, s ↔ t, ha ↔ hb, has ↔ hbt
  all_goals
-- porting note: wlog not implemented yet, the following replaces the three previous lines
-- wlog (discharger := tactic.skip) hab : a ≤ b := le_total a b using a b s t, b a t s
    

Proof state:
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 ∈ ⊥

Next tactic:
cases' ha with ha ha'
theorem disjoint_ordT5Nhd : Disjoint (ordT5Nhd s t) (ordT5Nhd t s) := by
  rw [disjoint_iff_inf_le]
  rintro x ⟨hx₁, hx₂⟩
  rcases mem_iUnion₂.1 hx₁ with ⟨a, has, ha⟩
  clear hx₁
  rcases mem_iUnion₂.1 hx₂ with ⟨b, hbt, hb⟩
  clear hx₂
  rw [mem_ordConnectedComponent, subset_inter_iff] at ha hb
  rcases le_total a b with hab | hab
  on_goal 2 => swap_var a ↔ b, s ↔ t, ha ↔ hb, has ↔ hbt
  all_goals
-- porting note: wlog not implemented yet, the following replaces the three previous lines
-- wlog (discharger := tactic.skip) hab : a ≤ b := le_total a b using a b s t, b a t s
    cases' ha with ha ha'
    

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

Next tactic:
cases' hb with hb hb'
theorem disjoint_ordT5Nhd : Disjoint (ordT5Nhd s t) (ordT5Nhd t s) := by
  rw [disjoint_iff_inf_le]
  rintro x ⟨hx₁, hx₂⟩
  rcases mem_iUnion₂.1 hx₁ with ⟨a, has, ha⟩
  clear hx₁
  rcases mem_iUnion₂.1 hx₂ with ⟨b, hbt, hb⟩
  clear hx₂
  rw [mem_ordConnectedComponent, subset_inter_iff] at ha hb
  rcases le_total a b with hab | hab
  on_goal 2 => swap_var a ↔ b, s ↔ t, ha ↔ hb, has ↔ hbt
  all_goals
-- porting note: wlog not implemented yet, the following replaces the three previous lines
-- wlog (discharger := tactic.skip) hab : a ≤ b := le_total a b using a b s t, b a t s
    cases' ha with ha ha'
    cases' hb with hb hb'
    

Proof state:
case intro.intro.intro.intro.intro.inl.intro.intro
α : Type u_1
inst✝ : LinearOrder α
s t : Set α
x✝ y z x a : α
has : a ∈ s
b : α
hbt : b ∈ t
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 ∈ ⊥

Next 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'
theorem disjoint_ordT5Nhd : Disjoint (ordT5Nhd s t) (ordT5Nhd t s) := by
  rw [disjoint_iff_inf_le]
  rintro x ⟨hx₁, hx₂⟩
  rcases mem_iUnion₂.1 hx₁ with ⟨a, has, ha⟩
  clear hx₁
  rcases mem_iUnion₂.1 hx₂ with ⟨b, hbt, hb⟩
  clear hx₂
  rw [mem_ordConnectedComponent, subset_inter_iff] at ha hb
  rcases le_total a b with hab | hab
  on_goal 2 => swap_var a ↔ b, s ↔ t, ha ↔ hb, has ↔ hbt
  all_goals
-- porting note: wlog not implemented yet, the following replaces the three previous lines
-- wlog (discharger := tactic.skip) hab : a ≤ b := le_total a b using a b s t, b a t s
    cases' ha with ha ha'
    cases' hb with hb hb'
    have hsub : [[a, b]] ⊆ (ordSeparatingSet s t).ordConnectedSectionᶜ := by
      

Proof state:
α : Type u_1
inst✝ : LinearOrder α
s t : Set α
x✝ y z x a : α
has : a ∈ s
b : α
hbt : b ∈ t
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))ᶜ

Next tactic:
rw [ordSeparatingSet_comm, uIcc_comm] at hb'
theorem disjoint_ordT5Nhd : Disjoint (ordT5Nhd s t) (ordT5Nhd t s) := by
  rw [disjoint_iff_inf_le]
  rintro x ⟨hx₁, hx₂⟩
  rcases mem_iUnion₂.1 hx₁ with ⟨a, has, ha⟩
  clear hx₁
  rcases mem_iUnion₂.1 hx₂ with ⟨b, hbt, hb⟩
  clear hx₂
  rw [mem_ordConnectedComponent, subset_inter_iff] at ha hb
  rcases le_total a b with hab | hab
  on_goal 2 => swap_var a ↔ b, s ↔ t, ha ↔ hb, has ↔ hbt
  all_goals
-- porting note: wlog not implemented yet, the following replaces the three previous lines
-- wlog (discharger := tactic.skip) hab : a ≤ b := le_total a b using a b s t, b a t s
    cases' ha with ha ha'
    cases' hb with hb hb'
    have hsub : [[a, b]] ⊆ (ordSeparatingSet s t).ordConnectedSectionᶜ := by
      rw [ordSeparatingSet_comm, uIcc_comm] at hb'
      

Proof state:
α : Type u_1
inst✝ : LinearOrder α
s t : Set α
x✝ y z x a : α
has : a ∈ s
b : α
hbt : b ∈ t
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))ᶜ

Next tactic:
calc
        [[a, b]] ⊆ [[a, x]] ∪ [[x, b]] := uIcc_subset_uIcc_union_uIcc
        _ ⊆ (ordSeparatingSet s t).ordConnectedSectionᶜ := union_subset ha' hb'