Note that the number of partitions (entities) in a document is a priori unknown, but it is at most the number of vertices (mentions) because, in an extreme case, each mention in a document could refer to a different entity.
a vertex with index i can be in the first i partitions (i.e., L i = i).