Combinatorics for the homalg project