module staterel sig States {EdgeTo: set States} part sig S1, S2 extends States {} fact StateCounts { -- there are at least 2 states in S2 some s, t : S2 | s != t -- there are at least 3 states in S1 some s, t, u : S1 | s != t && t != u && u != s } fun Edges () { all s : States | some s.EdgeTo all s : S1 | some t : S2 | t in s.EdgeTo some s : S2 | all t : S1 | t in s.EdgeTo no s, t : States | s in t.EdgeTo && t in s.EdgeTo } run Edges for 5