Calculate initial documents

An initial algorithm for calculating initial documents is to take the intersection of the inputs.
This is kind of hairy if there are ever more ops.