Type-level representation of edge cardinality constraints

This new direction looks promising.