Calculate initial documents

An initial algorithm for calculating initial documents is to take the intersection of the inputs.