Theorem: Batteries.RBNode.IsCut.congr
File: .lake/packages/batteries/Batteries/Data/RBMap/Lemmas.lean

tactic: cases ey : cut y
state_before: α✝ : Sort u_1
cmp : α✝ → α✝ → Ordering
cut : α✝ → Ordering
x y : α✝
inst✝¹ : IsCut cmp cut
inst✝ : TransCmp cmp
H : cmp x y = Ordering.eq
⊢ cut x = cut y
state_after: case lt
α✝ : Sort u_1
cmp : α✝ → α✝ → Ordering
cut : α✝ → Ordering
x y : α✝
inst✝¹ : IsCut cmp cut
inst✝ : TransCmp cmp
H : cmp x y = Ordering.eq
ey : cut y = Ordering.lt
⊢ cut x = Ordering.lt

case eq
α✝ : Sort u_1
cmp : α✝ → α✝ → Ordering
cut : α✝ → Ordering
x y : α✝
inst✝¹ : IsCut cmp cut
inst✝ : TransCmp cmp
H : cmp x y = Ordering.eq
ey : cut y = Ordering.eq
⊢ cut x = Ordering.eq

case gt
α✝ : Sort u_1
cmp : α✝ → α✝ → Ordering
cut : α✝ → Ordering
x y : α✝
inst✝¹ : IsCut cmp cut
inst✝ : TransCmp cmp
H : cmp x y = Ordering.eq
ey : cut y = Ordering.gt
⊢ cut x = Ordering.gt

tactic: exact IsCut.le_lt_trans (fun h => nomatch H.symm.trans <| OrientedCmp.cmp_eq_gt.1 h) ey
state_before: case lt
α✝ : Sort u_1
cmp : α✝ → α✝ → Ordering
cut : α✝ → Ordering
x y : α✝
inst✝¹ : IsCut cmp cut
inst✝ : TransCmp cmp
H : cmp x y = Ordering.eq
ey : cut y = Ordering.lt
⊢ cut x = Ordering.lt
state_after: no goals

tactic: cases ex : cut x
state_before: case eq
α✝ : Sort u_1
cmp : α✝ → α✝ → Ordering
cut : α✝ → Ordering
x y : α✝
inst✝¹ : IsCut cmp cut
inst✝ : TransCmp cmp
H : cmp x y = Ordering.eq
ey : cut y = Ordering.eq
⊢ cut x = Ordering.eq
state_after: case eq.lt
α✝ : Sort u_1
cmp : α✝ → α✝ → Ordering
cut : α✝ → Ordering
x y : α✝
inst✝¹ : IsCut cmp cut
inst✝ : TransCmp cmp
H : cmp x y = Ordering.eq
ey : cut y = Ordering.eq
ex : cut x = Ordering.lt
⊢ Ordering.lt = Ordering.eq

case eq.eq
α✝ : Sort u_1
cmp : α✝ → α✝ → Ordering
cut : α✝ → Ordering
x y : α✝
inst✝¹ : IsCut cmp cut
inst✝ : TransCmp cmp
H : cmp x y = Ordering.eq
ey : cut y = Ordering.eq
ex : cut x = Ordering.eq
⊢ Ordering.eq = Ordering.eq

case eq.gt
α✝ : Sort u_1
cmp : α✝ → α✝ → Ordering
cut : α✝ → Ordering
x y : α✝
inst✝¹ : IsCut cmp cut
inst✝ : TransCmp cmp
H : cmp x y = Ordering.eq
ey : cut y = Ordering.eq
ex : cut x = Ordering.gt
⊢ Ordering.gt = Ordering.eq

tactic: exact IsCut.le_lt_trans (fun h => nomatch H.symm.trans h) ex |>.symm.trans ey
state_before: case eq.lt
α✝ : Sort u_1
cmp : α✝ → α✝ → Ordering
cut : α✝ → Ordering
x y : α✝
inst✝¹ : IsCut cmp cut
inst✝ : TransCmp cmp
H : cmp x y = Ordering.eq
ey : cut y = Ordering.eq
ex : cut x = Ordering.lt
⊢ Ordering.lt = Ordering.eq
state_after: no goals

tactic: rfl
state_before: case eq.eq
α✝ : Sort u_1
cmp : α✝ → α✝ → Ordering
cut : α✝ → Ordering
x y : α✝
inst✝¹ : IsCut cmp cut
inst✝ : TransCmp cmp
H : cmp x y = Ordering.eq
ey : cut y = Ordering.eq
ex : cut x = Ordering.eq
⊢ Ordering.eq = Ordering.eq
state_after: no goals

tactic: refine IsCut.le_gt_trans (cmp := cmp) (fun h => ?_) ex |>.symm.trans ey
state_before: case eq.gt
α✝ : Sort u_1
cmp : α✝ → α✝ → Ordering
cut : α✝ → Ordering
x y : α✝
inst✝¹ : IsCut cmp cut
inst✝ : TransCmp cmp
H : cmp x y = Ordering.eq
ey : cut y = Ordering.eq
ex : cut x = Ordering.gt
⊢ Ordering.gt = Ordering.eq
state_after: case eq.gt
α✝ : Sort u_1
cmp : α✝ → α✝ → Ordering
cut : α✝ → Ordering
x y : α✝
inst✝¹ : IsCut cmp cut
inst✝ : TransCmp cmp
H : cmp x y = Ordering.eq
ey : cut y = Ordering.eq
ex : cut x = Ordering.gt
h : cmp y x = Ordering.gt
⊢ False

tactic: cases H.symm.trans <| OrientedCmp.cmp_eq_gt.1 h
state_before: case eq.gt
α✝ : Sort u_1
cmp : α✝ → α✝ → Ordering
cut : α✝ → Ordering
x y : α✝
inst✝¹ : IsCut cmp cut
inst✝ : TransCmp cmp
H : cmp x y = Ordering.eq
ey : cut y = Ordering.eq
ex : cut x = Ordering.gt
h : cmp y x = Ordering.gt
⊢ False
state_after: no goals

tactic: exact IsCut.le_gt_trans (fun h => nomatch H.symm.trans h) ey
state_before: case gt
α✝ : Sort u_1
cmp : α✝ → α✝ → Ordering
cut : α✝ → Ordering
x y : α✝
inst✝¹ : IsCut cmp cut
inst✝ : TransCmp cmp
H : cmp x y = Ordering.eq
ey : cut y = Ordering.gt
⊢ cut x = Ordering.gt
state_after: no goals