rw [insertWithAux_cons_rfl]
case a
α : Type u
r : α → α → Prop
inst✝¹ : StrictLinearOrder r
inst✝ : DecidableRel r
β : α → Type v
f : (a : α) → β a → β a → Option (β a)
a : α
b₁ b₂ : β a
xs ys : KVChain r β
haxs : boundLeft a xs
hays : boundLeft a ys
⊢ List.reverseAux (insertWithAux f KVChain.nil (KVChain.cons a b₁ xs haxs) True.intro a b₂ True.intro).val.fst.toList
      (mergeWith f (insertWithAux f KVChain.nil (KVChain.cons a b₁ xs haxs) True.intro a b₂ True.intro).val.snd
          ys).toList =
    (Option.casesOn (f a b₁ b₂) (mergeWith f xs ys) fun bf =>
        KVChain.cons a bf (mergeWith f xs ys) (_ : boundLeft a (mergeWith f xs ys))).toList
case a
α : Type u
r : α → α → Prop
inst✝¹ : StrictLinearOrder r
inst✝ : DecidableRel r
β : α → Type v
f : (a : α) → β a → β a → Option (β a)
a : α
b₁ b₂ : β a
xs ys : KVChain r β
haxs : boundLeft a xs
hays : boundLeft a ys
⊢ List.reverseAux
      (Option.casesOn (f a b₁ b₂)
              { val := (KVChain.nil, xs), property := (_ : hingeable (KVChain.nil, xs).fst (KVChain.nil, xs).snd) }
              fun bf =>
              { val := (KVChain.cons a bf KVChain.nil True.intro, xs),
                property :=
                  (_ :
                    hingeable (KVChain.cons a bf KVChain.nil True.intro)
                      (KVChain.cons a bf KVChain.nil True.intro, xs).snd) }).val.fst.toList
      (mergeWith f
          (Option.casesOn (f a b₁ b₂)
                { val := (KVChain.nil, xs), property := (_ : hingeable (KVChain.nil, xs).fst (KVChain.nil, xs).snd) }
                fun bf =>
                { val := (KVChain.cons a bf KVChain.nil True.intro, xs),
                  property :=
                    (_ :
                      hingeable (KVChain.cons a bf KVChain.nil True.intro)
                        (KVChain.cons a bf KVChain.nil True.intro, xs).snd) }).val.snd
          ys).toList =
    (Option.casesOn (f a b₁ b₂) (mergeWith f xs ys) fun bf =>
        KVChain.cons a bf (mergeWith f xs ys) (_ : boundLeft a (mergeWith f xs ys))).toList