Replace some of the ddots with the user provided inner product