Theorem: Batteries.RBNode.Path.zoom_zoomed₁
File: .lake/packages/batteries/Batteries/Data/RBMap/Lemmas.lean

tactic: revert e
state_before: α✝ : Type u_1
cut : α✝ → Ordering
t : RBNode α✝
path : Path α✝
t'✝ : RBNode α✝
path'✝ : Path α✝
e✝ : zoom cut t path = (t'✝, path'✝)
path' : Path α✝
t' : RBNode α✝
c✝ : RBColor
l✝ : RBNode α✝
v✝ : α✝
r✝ : RBNode α✝
e : zoom cut (node c✝ l✝ v✝ r✝) path = (t', path')
⊢ OnRoot (fun x => cut x = Ordering.eq) t'
state_after: α✝ : Type u_1
cut : α✝ → Ordering
t : RBNode α✝
path : Path α✝
t'✝ : RBNode α✝
path'✝ : Path α✝
e : zoom cut t path = (t'✝, path'✝)
path' : Path α✝
t' : RBNode α✝
c✝ : RBColor
l✝ : RBNode α✝
v✝ : α✝
r✝ : RBNode α✝
⊢ zoom cut (node c✝ l✝ v✝ r✝) path = (t', path') → OnRoot (fun x => cut x = Ordering.eq) t'

tactic: unfold zoom
state_before: α✝ : Type u_1
cut : α✝ → Ordering
t : RBNode α✝
path : Path α✝
t'✝ : RBNode α✝
path'✝ : Path α✝
e : zoom cut t path = (t'✝, path'✝)
path' : Path α✝
t' : RBNode α✝
c✝ : RBColor
l✝ : RBNode α✝
v✝ : α✝
r✝ : RBNode α✝
⊢ zoom cut (node c✝ l✝ v✝ r✝) path = (t', path') → OnRoot (fun x => cut x = Ordering.eq) t'
state_after: α✝ : Type u_1
cut : α✝ → Ordering
t : RBNode α✝
path : Path α✝
t'✝ : RBNode α✝
path'✝ : Path α✝
e : zoom cut t path = (t'✝, path'✝)
path' : Path α✝
t' : RBNode α✝
c✝ : RBColor
l✝ : RBNode α✝
v✝ : α✝
r✝ : RBNode α✝
⊢ (match cut v✝ with
      | Ordering.lt => zoom cut l✝ (left c✝ path v✝ r✝)
      | Ordering.gt => zoom cut r✝ (right c✝ l✝ v✝ path)
      | Ordering.eq => (node c✝ l✝ v✝ r✝, path)) =
      (t', path') →
    OnRoot (fun x => cut x = Ordering.eq) t'

tactic: split
state_before: α✝ : Type u_1
cut : α✝ → Ordering
t : RBNode α✝
path : Path α✝
t'✝ : RBNode α✝
path'✝ : Path α✝
e : zoom cut t path = (t'✝, path'✝)
path' : Path α✝
t' : RBNode α✝
c✝ : RBColor
l✝ : RBNode α✝
v✝ : α✝
r✝ : RBNode α✝
⊢ (match cut v✝ with
      | Ordering.lt => zoom cut l✝ (left c✝ path v✝ r✝)
      | Ordering.gt => zoom cut r✝ (right c✝ l✝ v✝ path)
      | Ordering.eq => (node c✝ l✝ v✝ r✝, path)) =
      (t', path') →
    OnRoot (fun x => cut x = Ordering.eq) t'
state_after: case h_1
α✝ : Type u_1
cut : α✝ → Ordering
t : RBNode α✝
path : Path α✝
t'✝ : RBNode α✝
path'✝ : Path α✝
e : zoom cut t path = (t'✝, path'✝)
path' : Path α✝
t' : RBNode α✝
c✝ : RBColor
l✝ : RBNode α✝
v✝ : α✝
r✝ : RBNode α✝
x✝ : Ordering
heq✝ : cut v✝ = Ordering.lt
⊢ zoom cut l✝ (left c✝ path v✝ r✝) = (t', path') → OnRoot (fun x => cut x = Ordering.eq) t'

case h_2
α✝ : Type u_1
cut : α✝ → Ordering
t : RBNode α✝
path : Path α✝
t'✝ : RBNode α✝
path'✝ : Path α✝
e : zoom cut t path = (t'✝, path'✝)
path' : Path α✝
t' : RBNode α✝
c✝ : RBColor
l✝ : RBNode α✝
v✝ : α✝
r✝ : RBNode α✝
x✝ : Ordering
heq✝ : cut v✝ = Ordering.gt
⊢ zoom cut r✝ (right c✝ l✝ v✝ path) = (t', path') → OnRoot (fun x => cut x = Ordering.eq) t'

case h_3
α✝ : Type u_1
cut : α✝ → Ordering
t : RBNode α✝
path : Path α✝
t'✝ : RBNode α✝
path'✝ : Path α✝
e : zoom cut t path = (t'✝, path'✝)
path' : Path α✝
t' : RBNode α✝
c✝ : RBColor
l✝ : RBNode α✝
v✝ : α✝
r✝ : RBNode α✝
x✝ : Ordering
heq✝ : cut v✝ = Ordering.eq
⊢ (node c✝ l✝ v✝ r✝, path) = (t', path') → OnRoot (fun x => cut x = Ordering.eq) t'

tactic: exact zoom_zoomed₁
state_before: case h_1
α✝ : Type u_1
cut : α✝ → Ordering
t : RBNode α✝
path : Path α✝
t'✝ : RBNode α✝
path'✝ : Path α✝
e : zoom cut t path = (t'✝, path'✝)
path' : Path α✝
t' : RBNode α✝
c✝ : RBColor
l✝ : RBNode α✝
v✝ : α✝
r✝ : RBNode α✝
x✝ : Ordering
heq✝ : cut v✝ = Ordering.lt
⊢ zoom cut l✝ (left c✝ path v✝ r✝) = (t', path') → OnRoot (fun x => cut x = Ordering.eq) t'
state_after: no goals

tactic: exact zoom_zoomed₁
state_before: case h_2
α✝ : Type u_1
cut : α✝ → Ordering
t : RBNode α✝
path : Path α✝
t'✝ : RBNode α✝
path'✝ : Path α✝
e : zoom cut t path = (t'✝, path'✝)
path' : Path α✝
t' : RBNode α✝
c✝ : RBColor
l✝ : RBNode α✝
v✝ : α✝
r✝ : RBNode α✝
x✝ : Ordering
heq✝ : cut v✝ = Ordering.gt
⊢ zoom cut r✝ (right c✝ l✝ v✝ path) = (t', path') → OnRoot (fun x => cut x = Ordering.eq) t'
state_after: no goals

tactic: next H => intro e; cases e; exact H
state_before: case h_3
α✝ : Type u_1
cut : α✝ → Ordering
t : RBNode α✝
path : Path α✝
t'✝ : RBNode α✝
path'✝ : Path α✝
e : zoom cut t path = (t'✝, path'✝)
path' : Path α✝
t' : RBNode α✝
c✝ : RBColor
l✝ : RBNode α✝
v✝ : α✝
r✝ : RBNode α✝
x✝ : Ordering
heq✝ : cut v✝ = Ordering.eq
⊢ (node c✝ l✝ v✝ r✝, path) = (t', path') → OnRoot (fun x => cut x = Ordering.eq) t'
state_after: no goals

tactic: intro e
state_before: α✝ : Type u_1
cut : α✝ → Ordering
t : RBNode α✝
path : Path α✝
t'✝ : RBNode α✝
path'✝ : Path α✝
e : zoom cut t path = (t'✝, path'✝)
path' : Path α✝
t' : RBNode α✝
c✝ : RBColor
l✝ : RBNode α✝
v✝ : α✝
r✝ : RBNode α✝
x✝ : Ordering
H : cut v✝ = Ordering.eq
⊢ (node c✝ l✝ v✝ r✝, path) = (t', path') → OnRoot (fun x => cut x = Ordering.eq) t'
state_after: α✝ : Type u_1
cut : α✝ → Ordering
t : RBNode α✝
path : Path α✝
t'✝ : RBNode α✝
path'✝ : Path α✝
e✝ : zoom cut t path = (t'✝, path'✝)
path' : Path α✝
t' : RBNode α✝
c✝ : RBColor
l✝ : RBNode α✝
v✝ : α✝
r✝ : RBNode α✝
x✝ : Ordering
H : cut v✝ = Ordering.eq
e : (node c✝ l✝ v✝ r✝, path) = (t', path')
⊢ OnRoot (fun x => cut x = Ordering.eq) t'

tactic: cases e
state_before: α✝ : Type u_1
cut : α✝ → Ordering
t : RBNode α✝
path : Path α✝
t'✝ : RBNode α✝
path'✝ : Path α✝
e✝ : zoom cut t path = (t'✝, path'✝)
path' : Path α✝
t' : RBNode α✝
c✝ : RBColor
l✝ : RBNode α✝
v✝ : α✝
r✝ : RBNode α✝
x✝ : Ordering
H : cut v✝ = Ordering.eq
e : (node c✝ l✝ v✝ r✝, path) = (t', path')
⊢ OnRoot (fun x => cut x = Ordering.eq) t'
state_after: case refl
α✝ : Type u_1
cut : α✝ → Ordering
t : RBNode α✝
path : Path α✝
t' : RBNode α✝
path' : Path α✝
e : zoom cut t path = (t', path')
c✝ : RBColor
l✝ : RBNode α✝
v✝ : α✝
r✝ : RBNode α✝
x✝ : Ordering
H : cut v✝ = Ordering.eq
⊢ OnRoot (fun x => cut x = Ordering.eq) (node c✝ l✝ v✝ r✝)

tactic: exact H
state_before: case refl
α✝ : Type u_1
cut : α✝ → Ordering
t : RBNode α✝
path : Path α✝
t' : RBNode α✝
path' : Path α✝
e : zoom cut t path = (t', path')
c✝ : RBColor
l✝ : RBNode α✝
v✝ : α✝
r✝ : RBNode α✝
x✝ : Ordering
H : cut v✝ = Ordering.eq
⊢ OnRoot (fun x => cut x = Ordering.eq) (node c✝ l✝ v✝ r✝)
state_after: no goals