case cons =>
  intro b y hby hpb _ x hax hab
  apply KVChain.eq_of_toList_eq
  rw [toList_mergeWith_cons_right]
  rw [KVChain.toList_cons]
  rw [toList_mergeWith_cons_right]
  conv =>
    lhs
    rw [insertWithAux_cons_rel hab]
    rw [toList_fst_insertWithAux_eq_append]
    rw [toList_snd_insertWithAux_inv]
    rw [List.reverseAux_append_left]
α : Type u
r : α → α → Prop
inst✝¹ : StrictLinearOrder r
inst✝ : DecidableRel r
β : α → Type v
f : (a : α) → β a → β a → Option (β a)
a : α
b : β a
ys : KVChain r β
⊢ ∀ (a_1 : α) (b_1 : β a_1) (xs : KVChain r fun a => β a) (haxs : boundLeft a_1 xs),
    (fun ys =>
          ∀ (xs : KVChain r fun a => β a) (haxs : boundLeft a xs) (hays : boundLeft a ys),
            mergeWith f (KVChain.cons a b xs haxs) ys =
              KVChain.cons a b (mergeWith f xs ys) (_ : boundLeft a (mergeWith f xs ys)))
        xs →
      (fun ys =>
          ∀ (xs : KVChain r fun a => β a) (haxs : boundLeft a xs) (hays : boundLeft a ys),
            mergeWith f (KVChain.cons a b xs haxs) ys =
              KVChain.cons a b (mergeWith f xs ys) (_ : boundLeft a (mergeWith f xs ys)))
        (KVChain.cons a_1 b_1 xs haxs)
no goals