Theorem: Std.RBNode.Ordered.lowerBound?_least_lb
File: Std/Data/RBMap/Lemmas.lean

tactic: intro.
state_before: case nil
α : Type u_1
cmp : α → α → Ordering
cut : α → Ordering
x y : α
inst✝¹ : TransCmp cmp
inst✝ : IsCut cmp cut
lb : Option α
h : Ordered cmp nil
hlb : ∀ {x : α}, x ∈ lb → All (fun x_1 => cmpLT cmp x x_1) nil
⊢ x ∈ lowerBound? cut nil lb → y ∈ nil → cut x = Ordering.gt → cmp x y = Ordering.lt → cut y = Ordering.lt

tactic: simp [lowerBound?]
state_before: case node
α : Type u_1
cmp : α → α → Ordering
cut : α → Ordering
x y : α
inst✝¹ : TransCmp cmp
inst✝ : IsCut cmp cut
c✝ : RBColor
l✝ : RBNode α
v✝ : α
r✝ : RBNode α
ihl :
  ∀ {lb : Option α},
    Ordered cmp l✝ →
      (∀ {x : α}, x ∈ lb → All (fun x_1 => cmpLT cmp x x_1) l✝) →
        x ∈ lowerBound? cut l✝ lb → y ∈ l✝ → cut x = Ordering.gt → cmp x y = Ordering.lt → cut y = Ordering.lt
ihr :
  ∀ {lb : Option α},
    Ordered cmp r✝ →
      (∀ {x : α}, x ∈ lb → All (fun x_1 => cmpLT cmp x x_1) r✝) →
        x ∈ lowerBound? cut r✝ lb → y ∈ r✝ → cut x = Ordering.gt → cmp x y = Ordering.lt → cut y = Ordering.lt
lb : Option α
h : Ordered cmp (node c✝ l✝ v✝ r✝)
hlb : ∀ {x : α}, x ∈ lb → All (fun x_1 => cmpLT cmp x x_1) (node c✝ l✝ v✝ r✝)
⊢ x ∈ lowerBound? cut (node c✝ l✝ v✝ r✝) lb →
    y ∈ node c✝ l✝ v✝ r✝ → cut x = Ordering.gt → cmp x y = Ordering.lt → cut y = Ordering.lt

tactic: split <;> rename_i hv <;> rintro h₁ (rfl | hy' | hy') hx h₂
state_before: case node
α : Type u_1
cmp : α → α → Ordering
cut : α → Ordering
x y : α
inst✝¹ : TransCmp cmp
inst✝ : IsCut cmp cut
c✝ : RBColor
l✝ : RBNode α
v✝ : α
r✝ : RBNode α
ihl :
  ∀ {lb : Option α},
    Ordered cmp l✝ →
      (∀ {x : α}, x ∈ lb → All (fun x_1 => cmpLT cmp x x_1) l✝) →
        x ∈ lowerBound? cut l✝ lb → y ∈ l✝ → cut x = Ordering.gt → cmp x y = Ordering.lt → cut y = Ordering.lt
ihr :
  ∀ {lb : Option α},
    Ordered cmp r✝ →
      (∀ {x : α}, x ∈ lb → All (fun x_1 => cmpLT cmp x x_1) r✝) →
        x ∈ lowerBound? cut r✝ lb → y ∈ r✝ → cut x = Ordering.gt → cmp x y = Ordering.lt → cut y = Ordering.lt
lb : Option α
h : Ordered cmp (node c✝ l✝ v✝ r✝)
hlb : ∀ {x : α}, x ∈ lb → All (fun x_1 => cmpLT cmp x x_1) (node c✝ l✝ v✝ r✝)
⊢ (match cut v✝ with
      | Ordering.lt => lowerBound? cut l✝ lb
      | Ordering.gt => lowerBound? cut r✝ (some v✝)
      | Ordering.eq => some v✝) =
      some x →
    y = v✝ ∨ y ∈ l✝ ∨ y ∈ r✝ → cut x = Ordering.gt → cmp x y = Ordering.lt → cut y = Ordering.lt

tactic: exact hv
state_before: case node.h_1.inl
α : Type u_1
cmp : α → α → Ordering
cut : α → Ordering
x y : α
inst✝¹ : TransCmp cmp
inst✝ : IsCut cmp cut
c✝ : RBColor
l✝ r✝ : RBNode α
ihl :
  ∀ {lb : Option α},
    Ordered cmp l✝ →
      (∀ {x : α}, x ∈ lb → All (fun x_1 => cmpLT cmp x x_1) l✝) →
        x ∈ lowerBound? cut l✝ lb → y ∈ l✝ → cut x = Ordering.gt → cmp x y = Ordering.lt → cut y = Ordering.lt
ihr :
  ∀ {lb : Option α},
    Ordered cmp r✝ →
      (∀ {x : α}, x ∈ lb → All (fun x_1 => cmpLT cmp x x_1) r✝) →
        x ∈ lowerBound? cut r✝ lb → y ∈ r✝ → cut x = Ordering.gt → cmp x y = Ordering.lt → cut y = Ordering.lt
lb : Option α
x✝ : Ordering
h₁ : lowerBound? cut l✝ lb = some x
h : Ordered cmp (node c✝ l✝ y r✝)
hlb : ∀ {x : α}, x ∈ lb → All (fun x_1 => cmpLT cmp x x_1) (node c✝ l✝ y r✝)
hv : cut y = Ordering.lt
hx : cut x = Ordering.gt
h₂ : cmp x y = Ordering.lt
⊢ cut y = Ordering.lt

tactic: exact ihl h.2.2.1 (fun h => (hlb h).2.1) h₁ hy' hx h₂
state_before: case node.h_1.inr.inl
α : Type u_1
cmp : α → α → Ordering
cut : α → Ordering
x y : α
inst✝¹ : TransCmp cmp
inst✝ : IsCut cmp cut
c✝ : RBColor
l✝ : RBNode α
v✝ : α
r✝ : RBNode α
ihl :
  ∀ {lb : Option α},
    Ordered cmp l✝ →
      (∀ {x : α}, x ∈ lb → All (fun x_1 => cmpLT cmp x x_1) l✝) →
        x ∈ lowerBound? cut l✝ lb → y ∈ l✝ → cut x = Ordering.gt → cmp x y = Ordering.lt → cut y = Ordering.lt
ihr :
  ∀ {lb : Option α},
    Ordered cmp r✝ →
      (∀ {x : α}, x ∈ lb → All (fun x_1 => cmpLT cmp x x_1) r✝) →
        x ∈ lowerBound? cut r✝ lb → y ∈ r✝ → cut x = Ordering.gt → cmp x y = Ordering.lt → cut y = Ordering.lt
lb : Option α
h : Ordered cmp (node c✝ l✝ v✝ r✝)
hlb : ∀ {x : α}, x ∈ lb → All (fun x_1 => cmpLT cmp x x_1) (node c✝ l✝ v✝ r✝)
x✝ : Ordering
hv : cut v✝ = Ordering.lt
h₁ : lowerBound? cut l✝ lb = some x
hy' : y ∈ l✝
hx : cut x = Ordering.gt
h₂ : cmp x y = Ordering.lt
⊢ cut y = Ordering.lt

tactic: exact IsCut.lt_trans (cut := cut) (cmp := cmp) (All_def.1 h.2.1 _ hy').1 hv
state_before: case node.h_1.inr.inr
α : Type u_1
cmp : α → α → Ordering
cut : α → Ordering
x y : α
inst✝¹ : TransCmp cmp
inst✝ : IsCut cmp cut
c✝ : RBColor
l✝ : RBNode α
v✝ : α
r✝ : RBNode α
ihl :
  ∀ {lb : Option α},
    Ordered cmp l✝ →
      (∀ {x : α}, x ∈ lb → All (fun x_1 => cmpLT cmp x x_1) l✝) →
        x ∈ lowerBound? cut l✝ lb → y ∈ l✝ → cut x = Ordering.gt → cmp x y = Ordering.lt → cut y = Ordering.lt
ihr :
  ∀ {lb : Option α},
    Ordered cmp r✝ →
      (∀ {x : α}, x ∈ lb → All (fun x_1 => cmpLT cmp x x_1) r✝) →
        x ∈ lowerBound? cut r✝ lb → y ∈ r✝ → cut x = Ordering.gt → cmp x y = Ordering.lt → cut y = Ordering.lt
lb : Option α
h : Ordered cmp (node c✝ l✝ v✝ r✝)
hlb : ∀ {x : α}, x ∈ lb → All (fun x_1 => cmpLT cmp x x_1) (node c✝ l✝ v✝ r✝)
x✝ : Ordering
hv : cut v✝ = Ordering.lt
h₁ : lowerBound? cut l✝ lb = some x
hy' : y ∈ r✝
hx : cut x = Ordering.gt
h₂ : cmp x y = Ordering.lt
⊢ cut y = Ordering.lt

tactic: rcases lowerBound?_mem_lb h₁ with h₁ | ⟨⟨⟩⟩
state_before: case node.h_2.inl
α : Type u_1
cmp : α → α → Ordering
cut : α → Ordering
x y : α
inst✝¹ : TransCmp cmp
inst✝ : IsCut cmp cut
c✝ : RBColor
l✝ r✝ : RBNode α
ihl :
  ∀ {lb : Option α},
    Ordered cmp l✝ →
      (∀ {x : α}, x ∈ lb → All (fun x_1 => cmpLT cmp x x_1) l✝) →
        x ∈ lowerBound? cut l✝ lb → y ∈ l✝ → cut x = Ordering.gt → cmp x y = Ordering.lt → cut y = Ordering.lt
ihr :
  ∀ {lb : Option α},
    Ordered cmp r✝ →
      (∀ {x : α}, x ∈ lb → All (fun x_1 => cmpLT cmp x x_1) r✝) →
        x ∈ lowerBound? cut r✝ lb → y ∈ r✝ → cut x = Ordering.gt → cmp x y = Ordering.lt → cut y = Ordering.lt
lb : Option α
x✝ : Ordering
h : Ordered cmp (node c✝ l✝ y r✝)
hlb : ∀ {x : α}, x ∈ lb → All (fun x_1 => cmpLT cmp x x_1) (node c✝ l✝ y r✝)
hv : cut y = Ordering.gt
h₁ : lowerBound? cut r✝ (some y) = some x
hx : cut x = Ordering.gt
h₂ : cmp x y = Ordering.lt
⊢ cut y = Ordering.lt

tactic: cases TransCmp.lt_asymm h₂ (All_def.1 h.2.1 _ h₁).1
state_before: case node.h_2.inl.inl
α : Type u_1
cmp : α → α → Ordering
cut : α → Ordering
x y : α
inst✝¹ : TransCmp cmp
inst✝ : IsCut cmp cut
c✝ : RBColor
l✝ r✝ : RBNode α
ihl :
  ∀ {lb : Option α},
    Ordered cmp l✝ →
      (∀ {x : α}, x ∈ lb → All (fun x_1 => cmpLT cmp x x_1) l✝) →
        x ∈ lowerBound? cut l✝ lb → y ∈ l✝ → cut x = Ordering.gt → cmp x y = Ordering.lt → cut y = Ordering.lt
ihr :
  ∀ {lb : Option α},
    Ordered cmp r✝ →
      (∀ {x : α}, x ∈ lb → All (fun x_1 => cmpLT cmp x x_1) r✝) →
        x ∈ lowerBound? cut r✝ lb → y ∈ r✝ → cut x = Ordering.gt → cmp x y = Ordering.lt → cut y = Ordering.lt
lb : Option α
x✝ : Ordering
h : Ordered cmp (node c✝ l✝ y r✝)
hlb : ∀ {x : α}, x ∈ lb → All (fun x_1 => cmpLT cmp x x_1) (node c✝ l✝ y r✝)
hv : cut y = Ordering.gt
h₁✝ : lowerBound? cut r✝ (some y) = some x
hx : cut x = Ordering.gt
h₂ : cmp x y = Ordering.lt
h₁ : x ∈ r✝
⊢ cut y = Ordering.lt

tactic: cases TransCmp.lt_asymm h₂ h₂
state_before: case node.h_2.inl.inr.refl
α : Type u_1
cmp : α → α → Ordering
cut : α → Ordering
x : α
inst✝¹ : TransCmp cmp
inst✝ : IsCut cmp cut
c✝ : RBColor
l✝ r✝ : RBNode α
lb : Option α
x✝ : Ordering
hx : cut x = Ordering.gt
ihl :
  ∀ {lb : Option α},
    Ordered cmp l✝ →
      (∀ {x : α}, x ∈ lb → All (fun x_1 => cmpLT cmp x x_1) l✝) →
        x ∈ lowerBound? cut l✝ lb → x ∈ l✝ → cut x = Ordering.gt → cmp x x = Ordering.lt → cut x = Ordering.lt
ihr :
  ∀ {lb : Option α},
    Ordered cmp r✝ →
      (∀ {x : α}, x ∈ lb → All (fun x_1 => cmpLT cmp x x_1) r✝) →
        x ∈ lowerBound? cut r✝ lb → x ∈ r✝ → cut x = Ordering.gt → cmp x x = Ordering.lt → cut x = Ordering.lt
h : Ordered cmp (node c✝ l✝ x r✝)
hlb : ∀ {x_1 : α}, x_1 ∈ lb → All (fun x => cmpLT cmp x_1 x) (node c✝ l✝ x r✝)
hv : cut x = Ordering.gt
h₁ : lowerBound? cut r✝ (some x) = some x
h₂ : cmp x x = Ordering.lt
⊢ cut x = Ordering.lt

tactic: refine (TransCmp.lt_asymm h₂ ?_).elim
state_before: case node.h_2.inr.inl
α : Type u_1
cmp : α → α → Ordering
cut : α → Ordering
x y : α
inst✝¹ : TransCmp cmp
inst✝ : IsCut cmp cut
c✝ : RBColor
l✝ : RBNode α
v✝ : α
r✝ : RBNode α
ihl :
  ∀ {lb : Option α},
    Ordered cmp l✝ →
      (∀ {x : α}, x ∈ lb → All (fun x_1 => cmpLT cmp x x_1) l✝) →
        x ∈ lowerBound? cut l✝ lb → y ∈ l✝ → cut x = Ordering.gt → cmp x y = Ordering.lt → cut y = Ordering.lt
ihr :
  ∀ {lb : Option α},
    Ordered cmp r✝ →
      (∀ {x : α}, x ∈ lb → All (fun x_1 => cmpLT cmp x x_1) r✝) →
        x ∈ lowerBound? cut r✝ lb → y ∈ r✝ → cut x = Ordering.gt → cmp x y = Ordering.lt → cut y = Ordering.lt
lb : Option α
h : Ordered cmp (node c✝ l✝ v✝ r✝)
hlb : ∀ {x : α}, x ∈ lb → All (fun x_1 => cmpLT cmp x x_1) (node c✝ l✝ v✝ r✝)
x✝ : Ordering
hv : cut v✝ = Ordering.gt
h₁ : lowerBound? cut r✝ (some v✝) = some x
hy' : y ∈ l✝
hx : cut x = Ordering.gt
h₂ : cmp x y = Ordering.lt
⊢ cut y = Ordering.lt

tactic: have := (All_def.1 h.1 _ hy').1
state_before: case node.h_2.inr.inl
α : Type u_1
cmp : α → α → Ordering
cut : α → Ordering
x y : α
inst✝¹ : TransCmp cmp
inst✝ : IsCut cmp cut
c✝ : RBColor
l✝ : RBNode α
v✝ : α
r✝ : RBNode α
ihl :
  ∀ {lb : Option α},
    Ordered cmp l✝ →
      (∀ {x : α}, x ∈ lb → All (fun x_1 => cmpLT cmp x x_1) l✝) →
        x ∈ lowerBound? cut l✝ lb → y ∈ l✝ → cut x = Ordering.gt → cmp x y = Ordering.lt → cut y = Ordering.lt
ihr :
  ∀ {lb : Option α},
    Ordered cmp r✝ →
      (∀ {x : α}, x ∈ lb → All (fun x_1 => cmpLT cmp x x_1) r✝) →
        x ∈ lowerBound? cut r✝ lb → y ∈ r✝ → cut x = Ordering.gt → cmp x y = Ordering.lt → cut y = Ordering.lt
lb : Option α
h : Ordered cmp (node c✝ l✝ v✝ r✝)
hlb : ∀ {x : α}, x ∈ lb → All (fun x_1 => cmpLT cmp x x_1) (node c✝ l✝ v✝ r✝)
x✝ : Ordering
hv : cut v✝ = Ordering.gt
h₁ : lowerBound? cut r✝ (some v✝) = some x
hy' : y ∈ l✝
hx : cut x = Ordering.gt
h₂ : cmp x y = Ordering.lt
⊢ cmp y x = Ordering.lt

tactic: rcases lowerBound?_mem_lb h₁ with h₁ | ⟨⟨⟩⟩
state_before: case node.h_2.inr.inl
α : Type u_1
cmp : α → α → Ordering
cut : α → Ordering
x y : α
inst✝¹ : TransCmp cmp
inst✝ : IsCut cmp cut
c✝ : RBColor
l✝ : RBNode α
v✝ : α
r✝ : RBNode α
ihl :
  ∀ {lb : Option α},
    Ordered cmp l✝ →
      (∀ {x : α}, x ∈ lb → All (fun x_1 => cmpLT cmp x x_1) l✝) →
        x ∈ lowerBound? cut l✝ lb → y ∈ l✝ → cut x = Ordering.gt → cmp x y = Ordering.lt → cut y = Ordering.lt
ihr :
  ∀ {lb : Option α},
    Ordered cmp r✝ →
      (∀ {x : α}, x ∈ lb → All (fun x_1 => cmpLT cmp x x_1) r✝) →
        x ∈ lowerBound? cut r✝ lb → y ∈ r✝ → cut x = Ordering.gt → cmp x y = Ordering.lt → cut y = Ordering.lt
lb : Option α
h : Ordered cmp (node c✝ l✝ v✝ r✝)
hlb : ∀ {x : α}, x ∈ lb → All (fun x_1 => cmpLT cmp x x_1) (node c✝ l✝ v✝ r✝)
x✝ : Ordering
hv : cut v✝ = Ordering.gt
h₁ : lowerBound? cut r✝ (some v✝) = some x
hy' : y ∈ l✝
hx : cut x = Ordering.gt
h₂ : cmp x y = Ordering.lt
this : cmp y v✝ = Ordering.lt
⊢ cmp y x = Ordering.lt

tactic: exact TransCmp.lt_trans this (All_def.1 h.2.1 _ h₁).1
state_before: case node.h_2.inr.inl.inl
α : Type u_1
cmp : α → α → Ordering
cut : α → Ordering
x y : α
inst✝¹ : TransCmp cmp
inst✝ : IsCut cmp cut
c✝ : RBColor
l✝ : RBNode α
v✝ : α
r✝ : RBNode α
ihl :
  ∀ {lb : Option α},
    Ordered cmp l✝ →
      (∀ {x : α}, x ∈ lb → All (fun x_1 => cmpLT cmp x x_1) l✝) →
        x ∈ lowerBound? cut l✝ lb → y ∈ l✝ → cut x = Ordering.gt → cmp x y = Ordering.lt → cut y = Ordering.lt
ihr :
  ∀ {lb : Option α},
    Ordered cmp r✝ →
      (∀ {x : α}, x ∈ lb → All (fun x_1 => cmpLT cmp x x_1) r✝) →
        x ∈ lowerBound? cut r✝ lb → y ∈ r✝ → cut x = Ordering.gt → cmp x y = Ordering.lt → cut y = Ordering.lt
lb : Option α
h : Ordered cmp (node c✝ l✝ v✝ r✝)
hlb : ∀ {x : α}, x ∈ lb → All (fun x_1 => cmpLT cmp x x_1) (node c✝ l✝ v✝ r✝)
x✝ : Ordering
hv : cut v✝ = Ordering.gt
h₁✝ : lowerBound? cut r✝ (some v✝) = some x
hy' : y ∈ l✝
hx : cut x = Ordering.gt
h₂ : cmp x y = Ordering.lt
this : cmp y v✝ = Ordering.lt
h₁ : x ∈ r✝
⊢ cmp y x = Ordering.lt

tactic: exact this
state_before: case node.h_2.inr.inl.inr.refl
α : Type u_1
cmp : α → α → Ordering
cut : α → Ordering
x y : α
inst✝¹ : TransCmp cmp
inst✝ : IsCut cmp cut
c✝ : RBColor
l✝ r✝ : RBNode α
ihl :
  ∀ {lb : Option α},
    Ordered cmp l✝ →
      (∀ {x : α}, x ∈ lb → All (fun x_1 => cmpLT cmp x x_1) l✝) →
        x ∈ lowerBound? cut l✝ lb → y ∈ l✝ → cut x = Ordering.gt → cmp x y = Ordering.lt → cut y = Ordering.lt
ihr :
  ∀ {lb : Option α},
    Ordered cmp r✝ →
      (∀ {x : α}, x ∈ lb → All (fun x_1 => cmpLT cmp x x_1) r✝) →
        x ∈ lowerBound? cut r✝ lb → y ∈ r✝ → cut x = Ordering.gt → cmp x y = Ordering.lt → cut y = Ordering.lt
lb : Option α
x✝ : Ordering
hy' : y ∈ l✝
hx : cut x = Ordering.gt
h₂ : cmp x y = Ordering.lt
h : Ordered cmp (node c✝ l✝ x r✝)
hlb : ∀ {x_1 : α}, x_1 ∈ lb → All (fun x => cmpLT cmp x_1 x) (node c✝ l✝ x r✝)
hv : cut x = Ordering.gt
h₁ : lowerBound? cut r✝ (some x) = some x
this : cmp y x = Ordering.lt
⊢ cmp y x = Ordering.lt

tactic: exact ihr h.2.2.2 (by rintro _ ⟨⟨⟩⟩; exact h.2.1) h₁ hy' hx h₂
state_before: case node.h_2.inr.inr
α : Type u_1
cmp : α → α → Ordering
cut : α → Ordering
x y : α
inst✝¹ : TransCmp cmp
inst✝ : IsCut cmp cut
c✝ : RBColor
l✝ : RBNode α
v✝ : α
r✝ : RBNode α
ihl :
  ∀ {lb : Option α},
    Ordered cmp l✝ →
      (∀ {x : α}, x ∈ lb → All (fun x_1 => cmpLT cmp x x_1) l✝) →
        x ∈ lowerBound? cut l✝ lb → y ∈ l✝ → cut x = Ordering.gt → cmp x y = Ordering.lt → cut y = Ordering.lt
ihr :
  ∀ {lb : Option α},
    Ordered cmp r✝ →
      (∀ {x : α}, x ∈ lb → All (fun x_1 => cmpLT cmp x x_1) r✝) →
        x ∈ lowerBound? cut r✝ lb → y ∈ r✝ → cut x = Ordering.gt → cmp x y = Ordering.lt → cut y = Ordering.lt
lb : Option α
h : Ordered cmp (node c✝ l✝ v✝ r✝)
hlb : ∀ {x : α}, x ∈ lb → All (fun x_1 => cmpLT cmp x x_1) (node c✝ l✝ v✝ r✝)
x✝ : Ordering
hv : cut v✝ = Ordering.gt
h₁ : lowerBound? cut r✝ (some v✝) = some x
hy' : y ∈ r✝
hx : cut x = Ordering.gt
h₂ : cmp x y = Ordering.lt
⊢ cut y = Ordering.lt

tactic: rintro _ ⟨⟨⟩⟩
state_before: α : Type u_1
cmp : α → α → Ordering
cut : α → Ordering
x y : α
inst✝¹ : TransCmp cmp
inst✝ : IsCut cmp cut
c✝ : RBColor
l✝ : RBNode α
v✝ : α
r✝ : RBNode α
ihl :
  ∀ {lb : Option α},
    Ordered cmp l✝ →
      (∀ {x : α}, x ∈ lb → All (fun x_1 => cmpLT cmp x x_1) l✝) →
        x ∈ lowerBound? cut l✝ lb → y ∈ l✝ → cut x = Ordering.gt → cmp x y = Ordering.lt → cut y = Ordering.lt
ihr :
  ∀ {lb : Option α},
    Ordered cmp r✝ →
      (∀ {x : α}, x ∈ lb → All (fun x_1 => cmpLT cmp x x_1) r✝) →
        x ∈ lowerBound? cut r✝ lb → y ∈ r✝ → cut x = Ordering.gt → cmp x y = Ordering.lt → cut y = Ordering.lt
lb : Option α
h : Ordered cmp (node c✝ l✝ v✝ r✝)
hlb : ∀ {x : α}, x ∈ lb → All (fun x_1 => cmpLT cmp x x_1) (node c✝ l✝ v✝ r✝)
x✝ : Ordering
hv : cut v✝ = Ordering.gt
h₁ : lowerBound? cut r✝ (some v✝) = some x
hy' : y ∈ r✝
hx : cut x = Ordering.gt
h₂ : cmp x y = Ordering.lt
⊢ ∀ {x : α}, x ∈ some v✝ → All (fun x_1 => cmpLT cmp x x_1) r✝

tactic: exact h.2.1
state_before: case refl
α : Type u_1
cmp : α → α → Ordering
cut : α → Ordering
x y : α
inst✝¹ : TransCmp cmp
inst✝ : IsCut cmp cut
c✝ : RBColor
l✝ : RBNode α
v✝ : α
r✝ : RBNode α
ihl :
  ∀ {lb : Option α},
    Ordered cmp l✝ →
      (∀ {x : α}, x ∈ lb → All (fun x_1 => cmpLT cmp x x_1) l✝) →
        x ∈ lowerBound? cut l✝ lb → y ∈ l✝ → cut x = Ordering.gt → cmp x y = Ordering.lt → cut y = Ordering.lt
ihr :
  ∀ {lb : Option α},
    Ordered cmp r✝ →
      (∀ {x : α}, x ∈ lb → All (fun x_1 => cmpLT cmp x x_1) r✝) →
        x ∈ lowerBound? cut r✝ lb → y ∈ r✝ → cut x = Ordering.gt → cmp x y = Ordering.lt → cut y = Ordering.lt
lb : Option α
h : Ordered cmp (node c✝ l✝ v✝ r✝)
hlb : ∀ {x : α}, x ∈ lb → All (fun x_1 => cmpLT cmp x x_1) (node c✝ l✝ v✝ r✝)
x✝ : Ordering
hv : cut v✝ = Ordering.gt
h₁ : lowerBound? cut r✝ (some v✝) = some x
hy' : y ∈ r✝
hx : cut x = Ordering.gt
h₂ : cmp x y = Ordering.lt
⊢ All (fun x => cmpLT cmp v✝ x) r✝

tactic: cases h₁
state_before: case node.h_3.inl
α : Type u_1
cmp : α → α → Ordering
cut : α → Ordering
x y : α
inst✝¹ : TransCmp cmp
inst✝ : IsCut cmp cut
c✝ : RBColor
l✝ r✝ : RBNode α
ihl :
  ∀ {lb : Option α},
    Ordered cmp l✝ →
      (∀ {x : α}, x ∈ lb → All (fun x_1 => cmpLT cmp x x_1) l✝) →
        x ∈ lowerBound? cut l✝ lb → y ∈ l✝ → cut x = Ordering.gt → cmp x y = Ordering.lt → cut y = Ordering.lt
ihr :
  ∀ {lb : Option α},
    Ordered cmp r✝ →
      (∀ {x : α}, x ∈ lb → All (fun x_1 => cmpLT cmp x x_1) r✝) →
        x ∈ lowerBound? cut r✝ lb → y ∈ r✝ → cut x = Ordering.gt → cmp x y = Ordering.lt → cut y = Ordering.lt
lb : Option α
x✝ : Ordering
h : Ordered cmp (node c✝ l✝ y r✝)
hlb : ∀ {x : α}, x ∈ lb → All (fun x_1 => cmpLT cmp x x_1) (node c✝ l✝ y r✝)
hv : cut y = Ordering.eq
h₁ : some y = some x
hx : cut x = Ordering.gt
h₂ : cmp x y = Ordering.lt
⊢ cut y = Ordering.lt

tactic: cases TransCmp.lt_asymm h₂ h₂
state_before: case node.h_3.inl.refl
α : Type u_1
cmp : α → α → Ordering
cut : α → Ordering
x : α
inst✝¹ : TransCmp cmp
inst✝ : IsCut cmp cut
c✝ : RBColor
l✝ r✝ : RBNode α
lb : Option α
x✝ : Ordering
hx : cut x = Ordering.gt
ihl :
  ∀ {lb : Option α},
    Ordered cmp l✝ →
      (∀ {x : α}, x ∈ lb → All (fun x_1 => cmpLT cmp x x_1) l✝) →
        x ∈ lowerBound? cut l✝ lb → x ∈ l✝ → cut x = Ordering.gt → cmp x x = Ordering.lt → cut x = Ordering.lt
ihr :
  ∀ {lb : Option α},
    Ordered cmp r✝ →
      (∀ {x : α}, x ∈ lb → All (fun x_1 => cmpLT cmp x x_1) r✝) →
        x ∈ lowerBound? cut r✝ lb → x ∈ r✝ → cut x = Ordering.gt → cmp x x = Ordering.lt → cut x = Ordering.lt
h : Ordered cmp (node c✝ l✝ x r✝)
hlb : ∀ {x_1 : α}, x_1 ∈ lb → All (fun x => cmpLT cmp x_1 x) (node c✝ l✝ x r✝)
hv : cut x = Ordering.eq
h₂ : cmp x x = Ordering.lt
⊢ cut x = Ordering.lt

tactic: cases h₁
state_before: case node.h_3.inr.inl
α : Type u_1
cmp : α → α → Ordering
cut : α → Ordering
x y : α
inst✝¹ : TransCmp cmp
inst✝ : IsCut cmp cut
c✝ : RBColor
l✝ : RBNode α
v✝ : α
r✝ : RBNode α
ihl :
  ∀ {lb : Option α},
    Ordered cmp l✝ →
      (∀ {x : α}, x ∈ lb → All (fun x_1 => cmpLT cmp x x_1) l✝) →
        x ∈ lowerBound? cut l✝ lb → y ∈ l✝ → cut x = Ordering.gt → cmp x y = Ordering.lt → cut y = Ordering.lt
ihr :
  ∀ {lb : Option α},
    Ordered cmp r✝ →
      (∀ {x : α}, x ∈ lb → All (fun x_1 => cmpLT cmp x x_1) r✝) →
        x ∈ lowerBound? cut r✝ lb → y ∈ r✝ → cut x = Ordering.gt → cmp x y = Ordering.lt → cut y = Ordering.lt
lb : Option α
h : Ordered cmp (node c✝ l✝ v✝ r✝)
hlb : ∀ {x : α}, x ∈ lb → All (fun x_1 => cmpLT cmp x x_1) (node c✝ l✝ v✝ r✝)
x✝ : Ordering
hv : cut v✝ = Ordering.eq
h₁ : some v✝ = some x
hy' : y ∈ l✝
hx : cut x = Ordering.gt
h₂ : cmp x y = Ordering.lt
⊢ cut y = Ordering.lt

tactic: cases hx.symm.trans hv
state_before: case node.h_3.inr.inl.refl
α : Type u_1
cmp : α → α → Ordering
cut : α → Ordering
x y : α
inst✝¹ : TransCmp cmp
inst✝ : IsCut cmp cut
c✝ : RBColor
l✝ r✝ : RBNode α
ihl :
  ∀ {lb : Option α},
    Ordered cmp l✝ →
      (∀ {x : α}, x ∈ lb → All (fun x_1 => cmpLT cmp x x_1) l✝) →
        x ∈ lowerBound? cut l✝ lb → y ∈ l✝ → cut x = Ordering.gt → cmp x y = Ordering.lt → cut y = Ordering.lt
ihr :
  ∀ {lb : Option α},
    Ordered cmp r✝ →
      (∀ {x : α}, x ∈ lb → All (fun x_1 => cmpLT cmp x x_1) r✝) →
        x ∈ lowerBound? cut r✝ lb → y ∈ r✝ → cut x = Ordering.gt → cmp x y = Ordering.lt → cut y = Ordering.lt
lb : Option α
x✝ : Ordering
hy' : y ∈ l✝
hx : cut x = Ordering.gt
h₂ : cmp x y = Ordering.lt
h : Ordered cmp (node c✝ l✝ x r✝)
hlb : ∀ {x_1 : α}, x_1 ∈ lb → All (fun x => cmpLT cmp x_1 x) (node c✝ l✝ x r✝)
hv : cut x = Ordering.eq
⊢ cut y = Ordering.lt

tactic: cases h₁
state_before: case node.h_3.inr.inr
α : Type u_1
cmp : α → α → Ordering
cut : α → Ordering
x y : α
inst✝¹ : TransCmp cmp
inst✝ : IsCut cmp cut
c✝ : RBColor
l✝ : RBNode α
v✝ : α
r✝ : RBNode α
ihl :
  ∀ {lb : Option α},
    Ordered cmp l✝ →
      (∀ {x : α}, x ∈ lb → All (fun x_1 => cmpLT cmp x x_1) l✝) →
        x ∈ lowerBound? cut l✝ lb → y ∈ l✝ → cut x = Ordering.gt → cmp x y = Ordering.lt → cut y = Ordering.lt
ihr :
  ∀ {lb : Option α},
    Ordered cmp r✝ →
      (∀ {x : α}, x ∈ lb → All (fun x_1 => cmpLT cmp x x_1) r✝) →
        x ∈ lowerBound? cut r✝ lb → y ∈ r✝ → cut x = Ordering.gt → cmp x y = Ordering.lt → cut y = Ordering.lt
lb : Option α
h : Ordered cmp (node c✝ l✝ v✝ r✝)
hlb : ∀ {x : α}, x ∈ lb → All (fun x_1 => cmpLT cmp x x_1) (node c✝ l✝ v✝ r✝)
x✝ : Ordering
hv : cut v✝ = Ordering.eq
h₁ : some v✝ = some x
hy' : y ∈ r✝
hx : cut x = Ordering.gt
h₂ : cmp x y = Ordering.lt
⊢ cut y = Ordering.lt

tactic: cases hx.symm.trans hv
state_before: case node.h_3.inr.inr.refl
α : Type u_1
cmp : α → α → Ordering
cut : α → Ordering
x y : α
inst✝¹ : TransCmp cmp
inst✝ : IsCut cmp cut
c✝ : RBColor
l✝ r✝ : RBNode α
ihl :
  ∀ {lb : Option α},
    Ordered cmp l✝ →
      (∀ {x : α}, x ∈ lb → All (fun x_1 => cmpLT cmp x x_1) l✝) →
        x ∈ lowerBound? cut l✝ lb → y ∈ l✝ → cut x = Ordering.gt → cmp x y = Ordering.lt → cut y = Ordering.lt
ihr :
  ∀ {lb : Option α},
    Ordered cmp r✝ →
      (∀ {x : α}, x ∈ lb → All (fun x_1 => cmpLT cmp x x_1) r✝) →
        x ∈ lowerBound? cut r✝ lb → y ∈ r✝ → cut x = Ordering.gt → cmp x y = Ordering.lt → cut y = Ordering.lt
lb : Option α
x✝ : Ordering
hy' : y ∈ r✝
hx : cut x = Ordering.gt
h₂ : cmp x y = Ordering.lt
h : Ordered cmp (node c✝ l✝ x r✝)
hlb : ∀ {x_1 : α}, x_1 ∈ lb → All (fun x => cmpLT cmp x_1 x) (node c✝ l✝ x r✝)
hv : cut x = Ordering.eq
⊢ cut y = Ordering.lt