Typing generics for transitions
Right now transitions are just based on Hashable types. This leads to typing issues when performing cartesian product and in particular the intersection is not typed so far.
We could use generics here to enforce more information about the transitions structures.