Theorem: Std.RBNode.Path.zoom_zoomed₂
File: Std/Data/RBMap/Alter.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'✝)
hp : Zoomed cut path
path' : Path α✝
t' : RBNode α✝
c✝ : RBColor
l✝ : RBNode α✝
v✝ : α✝
r✝ : RBNode α✝
e : zoom cut (node c✝ l✝ v✝ r✝) path = (t', path')
⊢ Zoomed cut path'

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'✝)
hp : Zoomed cut path
path' : Path α✝
t' : RBNode α✝
c✝ : RBColor
l✝ : RBNode α✝
v✝ : α✝
r✝ : RBNode α✝
⊢ zoom cut (node c✝ l✝ v✝ r✝) path = (t', path') → Zoomed cut path'

tactic: split
state_before: α✝ : Type u_1
cut : α✝ → Ordering
t : RBNode α✝
path : Path α✝
t'✝ : RBNode α✝
path'✝ : Path α✝
e : zoom cut t path = (t'✝, path'✝)
hp : Zoomed cut 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') →
    Zoomed cut path'

tactic: next h => exact fun e => zoom_zoomed₂ e ⟨h, hp⟩
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'✝)
hp : Zoomed cut 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') → Zoomed cut path'

tactic: exact fun e => zoom_zoomed₂ e ⟨h, hp⟩
state_before: α✝ : Type u_1
cut : α✝ → Ordering
t : RBNode α✝
path : Path α✝
t'✝ : RBNode α✝
path'✝ : Path α✝
e : zoom cut t path = (t'✝, path'✝)
hp : Zoomed cut path
path' : Path α✝
t' : RBNode α✝
c✝ : RBColor
l✝ : RBNode α✝
v✝ : α✝
r✝ : RBNode α✝
x✝ : Ordering
h : cut v✝ = Ordering.lt
⊢ zoom cut l✝ (left c✝ path v✝ r✝) = (t', path') → Zoomed cut path'

tactic: next h => exact fun e => zoom_zoomed₂ e ⟨h, hp⟩
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'✝)
hp : Zoomed cut 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') → Zoomed cut path'

tactic: exact fun e => zoom_zoomed₂ e ⟨h, hp⟩
state_before: α✝ : Type u_1
cut : α✝ → Ordering
t : RBNode α✝
path : Path α✝
t'✝ : RBNode α✝
path'✝ : Path α✝
e : zoom cut t path = (t'✝, path'✝)
hp : Zoomed cut path
path' : Path α✝
t' : RBNode α✝
c✝ : RBColor
l✝ : RBNode α✝
v✝ : α✝
r✝ : RBNode α✝
x✝ : Ordering
h : cut v✝ = Ordering.gt
⊢ zoom cut r✝ (right c✝ l✝ v✝ path) = (t', path') → Zoomed cut path'

tactic: intro e
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'✝)
hp : Zoomed cut 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') → Zoomed cut path'

tactic: cases e
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'✝)
hp : Zoomed cut path
path' : Path α✝
t' : RBNode α✝
c✝ : RBColor
l✝ : RBNode α✝
v✝ : α✝
r✝ : RBNode α✝
x✝ : Ordering
heq✝ : cut v✝ = Ordering.eq
e : (node c✝ l✝ v✝ r✝, path) = (t', path')
⊢ Zoomed cut path'

tactic: exact hp
state_before: case h_3.refl
α✝ : Type u_1
cut : α✝ → Ordering
t : RBNode α✝
path : Path α✝
t' : RBNode α✝
path' : Path α✝
e : zoom cut t path = (t', path')
hp : Zoomed cut path
c✝ : RBColor
l✝ : RBNode α✝
v✝ : α✝
r✝ : RBNode α✝
x✝ : Ordering
heq✝ : cut v✝ = Ordering.eq
⊢ Zoomed cut path