l3lab/ntp-mathlib huggingface dataset:
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'
      calc
        [[a, b]] ⊆ [[a, x]] ∪ [[x, b]] := uIcc_subset_uIcc_union_uIcc
        _ ⊆ (ordSeparatingSet s t).ordConnectedSectionᶜ := union_subset ha' 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))ᶜ
hsub : [[a, b]] ⊆ (ordConnectedSection (ordSeparatingSet s t))ᶜ
⊢ x ∈ ⊥

Next tactic:
clear 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
      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'
    

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ᶜ
hb : [[b, x]] ⊆ sᶜ
hsub : [[a, b]] ⊆ (ordConnectedSection (ordSeparatingSet s t))ᶜ
⊢ x ∈ ⊥

Next tactic:
rcases le_total x a with hxa | hax
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'
      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
    · 

Proof state:
case intro.intro.intro.intro.intro.inl.intro.intro.inl
α : 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ᶜ
hb : [[b, x]] ⊆ sᶜ
hsub : [[a, b]] ⊆ (ordConnectedSection (ordSeparatingSet s t))ᶜ
hxa : x ≤ a
⊢ x ∈ ⊥

Next tactic:
exact hb (Icc_subset_uIcc' ⟨hxa, hab⟩) has
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'
      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
    

Proof state:
case intro.intro.intro.intro.intro.inl.intro.intro.inr
α : 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ᶜ
hb : [[b, x]] ⊆ sᶜ
hsub : [[a, b]] ⊆ (ordConnectedSection (ordSeparatingSet s t))ᶜ
hax : a ≤ x
⊢ x ∈ ⊥

Next tactic:
rcases le_total b x with hbx | hxb
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'
      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
    · 

Proof state:
case intro.intro.intro.intro.intro.inl.intro.intro.inr.inl
α : 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ᶜ
hb : [[b, x]] ⊆ sᶜ
hsub : [[a, b]] ⊆ (ordConnectedSection (ordSeparatingSet s t))ᶜ
hax : a ≤ x
hbx : b ≤ x
⊢ x ∈ ⊥

Next tactic:
exact ha (Icc_subset_uIcc ⟨hab, hbx⟩) 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
  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
    

Proof state:
case intro.intro.intro.intro.intro.inl.intro.intro.inr.inr
α : 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ᶜ
hb : [[b, x]] ⊆ sᶜ
hsub : [[a, b]] ⊆ (ordConnectedSection (ordSeparatingSet s t))ᶜ
hax : a ≤ x
hxb : x ≤ b
⊢ x ∈ ⊥

Next tactic:
have h' : x ∈ ordSeparatingSet s t := ⟨mem_iUnion₂.2 ⟨a, has, ha⟩, mem_iUnion₂.2 ⟨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⟩
  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'
      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
    

Proof state:
case intro.intro.intro.intro.intro.inl.intro.intro.inr.inr
α : 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ᶜ
hb : [[b, x]] ⊆ sᶜ
hsub : [[a, b]] ⊆ (ordConnectedSection (ordSeparatingSet s t))ᶜ
hax : a ≤ x
hxb : x ≤ b
h' : x ∈ ordSeparatingSet s t
⊢ x ∈ ⊥

Next tactic:
suffices ordConnectedComponent (ordSeparatingSet s t) x ⊆ [[a, b]] from
      hsub (this <| ordConnectedProj_mem_ordConnectedComponent _ ⟨x, h'⟩) (mem_range_self _)
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'
      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 _)
    

Proof state:
case intro.intro.intro.intro.intro.inl.intro.intro.inr.inr
α : 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ᶜ
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]]

Next tactic:
rintro y (hy : [[x, y]] ⊆ ordSeparatingSet s t)
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'
      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)
    

Proof state:
case intro.intro.intro.intro.intro.inl.intro.intro.inr.inr
α : 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ᶜ
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]]

Next tactic:
rw [uIcc_of_le hab, mem_Icc, ← not_lt, ← not_lt]
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'
      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]
    

Proof state:
case intro.intro.intro.intro.intro.inl.intro.intro.inr.inr
α : 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ᶜ
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

Next 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⟩)
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'
      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⟩)
    

Proof state:
case intro.intro.intro.intro.intro.inl.intro.intro.inr.inr
α : 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ᶜ
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

Next 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⟩)
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'
      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⟩)
    

Proof state:
case intro.intro.intro.intro.intro.inl.intro.intro.inr.inr
α : 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ᶜ
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

Next tactic:
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.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:
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.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 ∈ ⊥

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.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 ∈ ⊥

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'