Theorem: Batteries.RBNode.upperBound?_ge'
File: .lake/packages/batteries/Batteries/Data/RBMap/Lemmas.lean

tactic: exact H
state_before: case nil
α : Type u_1
cut : α → Ordering
x : α
ub : Option α
H : ∀ {x : α}, x ∈ ub → cut x ≠ Ordering.gt
⊢ upperBound? cut nil ub = some x → cut x ≠ Ordering.gt
state_after: no goals

tactic: simp [upperBound?]
state_before: case node
α : Type u_1
cut : α → Ordering
x : α
c✝ : RBColor
l✝ : RBNode α
v✝ : α
r✝ : RBNode α
ihl :
  ∀ {ub : Option α}, (∀ {x : α}, x ∈ ub → cut x ≠ Ordering.gt) → upperBound? cut l✝ ub = some x → cut x ≠ Ordering.gt
ihr :
  ∀ {ub : Option α}, (∀ {x : α}, x ∈ ub → cut x ≠ Ordering.gt) → upperBound? cut r✝ ub = some x → cut x ≠ Ordering.gt
ub : Option α
H : ∀ {x : α}, x ∈ ub → cut x ≠ Ordering.gt
⊢ upperBound? cut (node c✝ l✝ v✝ r✝) ub = some x → cut x ≠ Ordering.gt
state_after: case node
α : Type u_1
cut : α → Ordering
x : α
c✝ : RBColor
l✝ : RBNode α
v✝ : α
r✝ : RBNode α
ihl :
  ∀ {ub : Option α}, (∀ {x : α}, x ∈ ub → cut x ≠ Ordering.gt) → upperBound? cut l✝ ub = some x → cut x ≠ Ordering.gt
ihr :
  ∀ {ub : Option α}, (∀ {x : α}, x ∈ ub → cut x ≠ Ordering.gt) → upperBound? cut r✝ ub = some x → cut x ≠ Ordering.gt
ub : Option α
H : ∀ {x : α}, x ∈ ub → cut x ≠ Ordering.gt
⊢ (match cut v✝ with
      | Ordering.lt => upperBound? cut l✝ (some v✝)
      | Ordering.gt => upperBound? cut r✝ ub
      | Ordering.eq => some v✝) =
      some x →
    ¬cut x = Ordering.gt

tactic: split
state_before: case node
α : Type u_1
cut : α → Ordering
x : α
c✝ : RBColor
l✝ : RBNode α
v✝ : α
r✝ : RBNode α
ihl :
  ∀ {ub : Option α}, (∀ {x : α}, x ∈ ub → cut x ≠ Ordering.gt) → upperBound? cut l✝ ub = some x → cut x ≠ Ordering.gt
ihr :
  ∀ {ub : Option α}, (∀ {x : α}, x ∈ ub → cut x ≠ Ordering.gt) → upperBound? cut r✝ ub = some x → cut x ≠ Ordering.gt
ub : Option α
H : ∀ {x : α}, x ∈ ub → cut x ≠ Ordering.gt
⊢ (match cut v✝ with
      | Ordering.lt => upperBound? cut l✝ (some v✝)
      | Ordering.gt => upperBound? cut r✝ ub
      | Ordering.eq => some v✝) =
      some x →
    ¬cut x = Ordering.gt
state_after: case node.h_1
α : Type u_1
cut : α → Ordering
x : α
c✝ : RBColor
l✝ : RBNode α
v✝ : α
r✝ : RBNode α
ihl :
  ∀ {ub : Option α}, (∀ {x : α}, x ∈ ub → cut x ≠ Ordering.gt) → upperBound? cut l✝ ub = some x → cut x ≠ Ordering.gt
ihr :
  ∀ {ub : Option α}, (∀ {x : α}, x ∈ ub → cut x ≠ Ordering.gt) → upperBound? cut r✝ ub = some x → cut x ≠ Ordering.gt
ub : Option α
H : ∀ {x : α}, x ∈ ub → cut x ≠ Ordering.gt
x✝ : Ordering
heq✝ : cut v✝ = Ordering.lt
⊢ upperBound? cut l✝ (some v✝) = some x → ¬cut x = Ordering.gt

case node.h_2
α : Type u_1
cut : α → Ordering
x : α
c✝ : RBColor
l✝ : RBNode α
v✝ : α
r✝ : RBNode α
ihl :
  ∀ {ub : Option α}, (∀ {x : α}, x ∈ ub → cut x ≠ Ordering.gt) → upperBound? cut l✝ ub = some x → cut x ≠ Ordering.gt
ihr :
  ∀ {ub : Option α}, (∀ {x : α}, x ∈ ub → cut x ≠ Ordering.gt) → upperBound? cut r✝ ub = some x → cut x ≠ Ordering.gt
ub : Option α
H : ∀ {x : α}, x ∈ ub → cut x ≠ Ordering.gt
x✝ : Ordering
heq✝ : cut v✝ = Ordering.gt
⊢ upperBound? cut r✝ ub = some x → ¬cut x = Ordering.gt

case node.h_3
α : Type u_1
cut : α → Ordering
x : α
c✝ : RBColor
l✝ : RBNode α
v✝ : α
r✝ : RBNode α
ihl :
  ∀ {ub : Option α}, (∀ {x : α}, x ∈ ub → cut x ≠ Ordering.gt) → upperBound? cut l✝ ub = some x → cut x ≠ Ordering.gt
ihr :
  ∀ {ub : Option α}, (∀ {x : α}, x ∈ ub → cut x ≠ Ordering.gt) → upperBound? cut r✝ ub = some x → cut x ≠ Ordering.gt
ub : Option α
H : ∀ {x : α}, x ∈ ub → cut x ≠ Ordering.gt
x✝ : Ordering
heq✝ : cut v✝ = Ordering.eq
⊢ some v✝ = some x → ¬cut x = Ordering.gt

tactic: next hv => exact ihl fun | rfl, e => nomatch hv.symm.trans e
state_before: case node.h_1
α : Type u_1
cut : α → Ordering
x : α
c✝ : RBColor
l✝ : RBNode α
v✝ : α
r✝ : RBNode α
ihl :
  ∀ {ub : Option α}, (∀ {x : α}, x ∈ ub → cut x ≠ Ordering.gt) → upperBound? cut l✝ ub = some x → cut x ≠ Ordering.gt
ihr :
  ∀ {ub : Option α}, (∀ {x : α}, x ∈ ub → cut x ≠ Ordering.gt) → upperBound? cut r✝ ub = some x → cut x ≠ Ordering.gt
ub : Option α
H : ∀ {x : α}, x ∈ ub → cut x ≠ Ordering.gt
x✝ : Ordering
heq✝ : cut v✝ = Ordering.lt
⊢ upperBound? cut l✝ (some v✝) = some x → ¬cut x = Ordering.gt
state_after: no goals

tactic: exact ihl fun | rfl, e => nomatch hv.symm.trans e
state_before: α : Type u_1
cut : α → Ordering
x : α
c✝ : RBColor
l✝ : RBNode α
v✝ : α
r✝ : RBNode α
ihl :
  ∀ {ub : Option α}, (∀ {x : α}, x ∈ ub → cut x ≠ Ordering.gt) → upperBound? cut l✝ ub = some x → cut x ≠ Ordering.gt
ihr :
  ∀ {ub : Option α}, (∀ {x : α}, x ∈ ub → cut x ≠ Ordering.gt) → upperBound? cut r✝ ub = some x → cut x ≠ Ordering.gt
ub : Option α
H : ∀ {x : α}, x ∈ ub → cut x ≠ Ordering.gt
x✝ : Ordering
hv : cut v✝ = Ordering.lt
⊢ upperBound? cut l✝ (some v✝) = some x → ¬cut x = Ordering.gt
state_after: no goals

tactic: exact ihr H
state_before: case node.h_2
α : Type u_1
cut : α → Ordering
x : α
c✝ : RBColor
l✝ : RBNode α
v✝ : α
r✝ : RBNode α
ihl :
  ∀ {ub : Option α}, (∀ {x : α}, x ∈ ub → cut x ≠ Ordering.gt) → upperBound? cut l✝ ub = some x → cut x ≠ Ordering.gt
ihr :
  ∀ {ub : Option α}, (∀ {x : α}, x ∈ ub → cut x ≠ Ordering.gt) → upperBound? cut r✝ ub = some x → cut x ≠ Ordering.gt
ub : Option α
H : ∀ {x : α}, x ∈ ub → cut x ≠ Ordering.gt
x✝ : Ordering
heq✝ : cut v✝ = Ordering.gt
⊢ upperBound? cut r✝ ub = some x → ¬cut x = Ordering.gt
state_after: no goals

tactic: next hv => intro | rfl, e => cases hv.symm.trans e
state_before: case node.h_3
α : Type u_1
cut : α → Ordering
x : α
c✝ : RBColor
l✝ : RBNode α
v✝ : α
r✝ : RBNode α
ihl :
  ∀ {ub : Option α}, (∀ {x : α}, x ∈ ub → cut x ≠ Ordering.gt) → upperBound? cut l✝ ub = some x → cut x ≠ Ordering.gt
ihr :
  ∀ {ub : Option α}, (∀ {x : α}, x ∈ ub → cut x ≠ Ordering.gt) → upperBound? cut r✝ ub = some x → cut x ≠ Ordering.gt
ub : Option α
H : ∀ {x : α}, x ∈ ub → cut x ≠ Ordering.gt
x✝ : Ordering
heq✝ : cut v✝ = Ordering.eq
⊢ some v✝ = some x → ¬cut x = Ordering.gt
state_after: no goals

tactic: intro | rfl, e => cases hv.symm.trans e
state_before: α : Type u_1
cut : α → Ordering
x : α
c✝ : RBColor
l✝ : RBNode α
v✝ : α
r✝ : RBNode α
ihl :
  ∀ {ub : Option α}, (∀ {x : α}, x ∈ ub → cut x ≠ Ordering.gt) → upperBound? cut l✝ ub = some x → cut x ≠ Ordering.gt
ihr :
  ∀ {ub : Option α}, (∀ {x : α}, x ∈ ub → cut x ≠ Ordering.gt) → upperBound? cut r✝ ub = some x → cut x ≠ Ordering.gt
ub : Option α
H : ∀ {x : α}, x ∈ ub → cut x ≠ Ordering.gt
x✝ : Ordering
hv : cut v✝ = Ordering.eq
⊢ some v✝ = some x → ¬cut x = Ordering.gt
state_after: no goals

tactic: cases hv.symm.trans e
state_before: α : Type u_1
cut : α → Ordering
x : α
c✝ : RBColor
l✝ : RBNode α
v✝ : α
r✝ : RBNode α
ub : Option α
H : ∀ {x : α}, x ∈ ub → cut x ≠ Ordering.gt
x✝² : Ordering
hv : cut v✝ = Ordering.eq
x✝¹ : some v✝ = some x
x✝ : cut x = Ordering.gt
e : cut v✝ = Ordering.gt
ihl :
  ∀ {ub : Option α}, (∀ {x : α}, x ∈ ub → cut x ≠ Ordering.gt) → upperBound? cut l✝ ub = some v✝ → cut v✝ ≠ Ordering.gt
ihr :
  ∀ {ub : Option α}, (∀ {x : α}, x ∈ ub → cut x ≠ Ordering.gt) → upperBound? cut r✝ ub = some v✝ → cut v✝ ≠ Ordering.gt
⊢ False
state_after: no goals