Theorem: transGen_wcovBy_of_le
File: Mathlib/Order/Interval/Finset/Basic.lean

tactic: have : (Ico x y).card < (Icc x y).card := card_lt_card <|
  ⟨Ico_subset_Icc_self, not_subset.mpr ⟨y, ⟨right_mem_Icc.mpr hxy, right_not_mem_Ico⟩⟩⟩
state_before: ι : Type u_1
α : Type u_2
inst✝¹ : Preorder α
inst✝ : LocallyFiniteOrder α
x y : α
hxy : x ≤ y
⊢ TransGen (fun x x_1 => x ⩿ x_1) x y
state_after: ι : Type u_1
α : Type u_2
inst✝¹ : Preorder α
inst✝ : LocallyFiniteOrder α
x y : α
hxy : x ≤ y
this : (Ico x y).card < (Icc x y).card
⊢ TransGen (fun x x_1 => x ⩿ x_1) x y

tactic: by_cases hxy' : y ≤ x
state_before: ι : Type u_1
α : Type u_2
inst✝¹ : Preorder α
inst✝ : LocallyFiniteOrder α
x y : α
hxy : x ≤ y
this : (Ico x y).card < (Icc x y).card
⊢ TransGen (fun x x_1 => x ⩿ x_1) x y
state_after: case pos
ι : Type u_1
α : Type u_2
inst✝¹ : Preorder α
inst✝ : LocallyFiniteOrder α
x y : α
hxy : x ≤ y
this : (Ico x y).card < (Icc x y).card
hxy' : y ≤ x
⊢ TransGen (fun x x_1 => x ⩿ x_1) x y

case neg
ι : Type u_1
α : Type u_2
inst✝¹ : Preorder α
inst✝ : LocallyFiniteOrder α
x y : α
hxy : x ≤ y
this : (Ico x y).card < (Icc x y).card
hxy' : ¬y ≤ x
⊢ TransGen (fun x x_1 => x ⩿ x_1) x y

tactic: exact .single <| wcovBy_of_le_of_le hxy hxy'
state_before: case pos
ι : Type u_1
α : Type u_2
inst✝¹ : Preorder α
inst✝ : LocallyFiniteOrder α
x y : α
hxy : x ≤ y
this : (Ico x y).card < (Icc x y).card
hxy' : y ≤ x
⊢ TransGen (fun x x_1 => x ⩿ x_1) x y
state_after: no goals

tactic: have h_non : (Ico x y).Nonempty := ⟨x, mem_Ico.mpr ⟨le_rfl, lt_of_le_not_le hxy hxy'⟩⟩
state_before: case neg
ι : Type u_1
α : Type u_2
inst✝¹ : Preorder α
inst✝ : LocallyFiniteOrder α
x y : α
hxy : x ≤ y
this : (Ico x y).card < (Icc x y).card
hxy' : ¬y ≤ x
⊢ TransGen (fun x x_1 => x ⩿ x_1) x y
state_after: case neg
ι : Type u_1
α : Type u_2
inst✝¹ : Preorder α
inst✝ : LocallyFiniteOrder α
x y : α
hxy : x ≤ y
this : (Ico x y).card < (Icc x y).card
hxy' : ¬y ≤ x
h_non : (Ico x y).Nonempty
⊢ TransGen (fun x x_1 => x ⩿ x_1) x y

tactic: obtain ⟨z, z_mem, hz⟩ := (Ico x y).exists_maximal h_non
state_before: case neg
ι : Type u_1
α : Type u_2
inst✝¹ : Preorder α
inst✝ : LocallyFiniteOrder α
x y : α
hxy : x ≤ y
this : (Ico x y).card < (Icc x y).card
hxy' : ¬y ≤ x
h_non : (Ico x y).Nonempty
⊢ TransGen (fun x x_1 => x ⩿ x_1) x y
state_after: case neg.intro.intro
ι : Type u_1
α : Type u_2
inst✝¹ : Preorder α
inst✝ : LocallyFiniteOrder α
x y : α
hxy : x ≤ y
this : (Ico x y).card < (Icc x y).card
hxy' : ¬y ≤ x
h_non : (Ico x y).Nonempty
z : α
z_mem : z ∈ Ico x y
hz : ∀ x_1 ∈ Ico x y, ¬z < x_1
⊢ TransGen (fun x x_1 => x ⩿ x_1) x y

tactic: have z_card : (Icc x z).card <(Icc x y).card := calc
  (Icc x z).card ≤ (Ico x y).card :=
    card_le_card <| Icc_subset_Ico_right (mem_Ico.mp z_mem).2
  _              < (Icc x y).card := this
state_before: case neg.intro.intro
ι : Type u_1
α : Type u_2
inst✝¹ : Preorder α
inst✝ : LocallyFiniteOrder α
x y : α
hxy : x ≤ y
this : (Ico x y).card < (Icc x y).card
hxy' : ¬y ≤ x
h_non : (Ico x y).Nonempty
z : α
z_mem : z ∈ Ico x y
hz : ∀ x_1 ∈ Ico x y, ¬z < x_1
⊢ TransGen (fun x x_1 => x ⩿ x_1) x y
state_after: case neg.intro.intro
ι : Type u_1
α : Type u_2
inst✝¹ : Preorder α
inst✝ : LocallyFiniteOrder α
x y : α
hxy : x ≤ y
this : (Ico x y).card < (Icc x y).card
hxy' : ¬y ≤ x
h_non : (Ico x y).Nonempty
z : α
z_mem : z ∈ Ico x y
hz : ∀ x_1 ∈ Ico x y, ¬z < x_1
z_card : (Icc x z).card < (Icc x y).card
⊢ TransGen (fun x x_1 => x ⩿ x_1) x y

tactic: have h₁ := transGen_wcovBy_of_le (mem_Ico.mp z_mem).1
state_before: case neg.intro.intro
ι : Type u_1
α : Type u_2
inst✝¹ : Preorder α
inst✝ : LocallyFiniteOrder α
x y : α
hxy : x ≤ y
this : (Ico x y).card < (Icc x y).card
hxy' : ¬y ≤ x
h_non : (Ico x y).Nonempty
z : α
z_mem : z ∈ Ico x y
hz : ∀ x_1 ∈ Ico x y, ¬z < x_1
z_card : (Icc x z).card < (Icc x y).card
⊢ TransGen (fun x x_1 => x ⩿ x_1) x y
state_after: case neg.intro.intro
ι : Type u_1
α : Type u_2
inst✝¹ : Preorder α
inst✝ : LocallyFiniteOrder α
x y : α
hxy : x ≤ y
this : (Ico x y).card < (Icc x y).card
hxy' : ¬y ≤ x
h_non : (Ico x y).Nonempty
z : α
z_mem : z ∈ Ico x y
hz : ∀ x_1 ∈ Ico x y, ¬z < x_1
z_card : (Icc x z).card < (Icc x y).card
h₁ : TransGen (fun x x_1 => x ⩿ x_1) x z
⊢ TransGen (fun x x_1 => x ⩿ x_1) x y

tactic: have h₂ : z ⩿ y := by
  refine ⟨(mem_Ico.mp z_mem).2.le, fun c hzc hcy ↦ hz c ?_ hzc⟩
  exact mem_Ico.mpr <| ⟨(mem_Ico.mp z_mem).1.trans hzc.le, hcy⟩
state_before: case neg.intro.intro
ι : Type u_1
α : Type u_2
inst✝¹ : Preorder α
inst✝ : LocallyFiniteOrder α
x y : α
hxy : x ≤ y
this : (Ico x y).card < (Icc x y).card
hxy' : ¬y ≤ x
h_non : (Ico x y).Nonempty
z : α
z_mem : z ∈ Ico x y
hz : ∀ x_1 ∈ Ico x y, ¬z < x_1
z_card : (Icc x z).card < (Icc x y).card
h₁ : TransGen (fun x x_1 => x ⩿ x_1) x z
⊢ TransGen (fun x x_1 => x ⩿ x_1) x y
state_after: case neg.intro.intro
ι : Type u_1
α : Type u_2
inst✝¹ : Preorder α
inst✝ : LocallyFiniteOrder α
x y : α
hxy : x ≤ y
this : (Ico x y).card < (Icc x y).card
hxy' : ¬y ≤ x
h_non : (Ico x y).Nonempty
z : α
z_mem : z ∈ Ico x y
hz : ∀ x_1 ∈ Ico x y, ¬z < x_1
z_card : (Icc x z).card < (Icc x y).card
h₁ : TransGen (fun x x_1 => x ⩿ x_1) x z
h₂ : z ⩿ y
⊢ TransGen (fun x x_1 => x ⩿ x_1) x y

tactic: exact .tail h₁ h₂
state_before: case neg.intro.intro
ι : Type u_1
α : Type u_2
inst✝¹ : Preorder α
inst✝ : LocallyFiniteOrder α
x y : α
hxy : x ≤ y
this : (Ico x y).card < (Icc x y).card
hxy' : ¬y ≤ x
h_non : (Ico x y).Nonempty
z : α
z_mem : z ∈ Ico x y
hz : ∀ x_1 ∈ Ico x y, ¬z < x_1
z_card : (Icc x z).card < (Icc x y).card
h₁ : TransGen (fun x x_1 => x ⩿ x_1) x z
h₂ : z ⩿ y
⊢ TransGen (fun x x_1 => x ⩿ x_1) x y
state_after: no goals

tactic: refine ⟨(mem_Ico.mp z_mem).2.le, fun c hzc hcy ↦ hz c ?_ hzc⟩
state_before: ι : Type u_1
α : Type u_2
inst✝¹ : Preorder α
inst✝ : LocallyFiniteOrder α
x y : α
hxy : x ≤ y
this : (Ico x y).card < (Icc x y).card
hxy' : ¬y ≤ x
h_non : (Ico x y).Nonempty
z : α
z_mem : z ∈ Ico x y
hz : ∀ x_1 ∈ Ico x y, ¬z < x_1
z_card : (Icc x z).card < (Icc x y).card
h₁ : TransGen (fun x x_1 => x ⩿ x_1) x z
⊢ z ⩿ y
state_after: ι : Type u_1
α : Type u_2
inst✝¹ : Preorder α
inst✝ : LocallyFiniteOrder α
x y : α
hxy : x ≤ y
this : (Ico x y).card < (Icc x y).card
hxy' : ¬y ≤ x
h_non : (Ico x y).Nonempty
z : α
z_mem : z ∈ Ico x y
hz : ∀ x_1 ∈ Ico x y, ¬z < x_1
z_card : (Icc x z).card < (Icc x y).card
h₁ : TransGen (fun x x_1 => x ⩿ x_1) x z
c : α
hzc : z < c
hcy : c < y
⊢ c ∈ Ico x y

tactic: exact mem_Ico.mpr <| ⟨(mem_Ico.mp z_mem).1.trans hzc.le, hcy⟩
state_before: ι : Type u_1
α : Type u_2
inst✝¹ : Preorder α
inst✝ : LocallyFiniteOrder α
x y : α
hxy : x ≤ y
this : (Ico x y).card < (Icc x y).card
hxy' : ¬y ≤ x
h_non : (Ico x y).Nonempty
z : α
z_mem : z ∈ Ico x y
hz : ∀ x_1 ∈ Ico x y, ¬z < x_1
z_card : (Icc x z).card < (Icc x y).card
h₁ : TransGen (fun x x_1 => x ⩿ x_1) x z
c : α
hzc : z < c
hcy : c < y
⊢ c ∈ Ico x y
state_after: no goals