∀ {α : Type u} {β : α → Type v} [inst : BEq α] [inst_1 : LawfulBEq α] {k k' : α} [inst_2 : Inhabited (β k')]
  {f : Option (β k) → Option (β k)} (l : List ((a : α) × β a)),
  Std.Internal.List.DistinctKeys l →
    Std.Internal.List.getValueCast! k' (Std.Internal.List.alterKey k f l) =
      if heq : (k == k') = true then (Option.map (cast ⋯) (f (Std.Internal.List.getValueCast? k l))).get!
      else Std.Internal.List.getValueCast! k' l