Field f1 = s.getFields().get(0), f2 = s.getFields().get(1);
if (sub.isEnum==null || !list.args.get(0).isSame(sub) || !list.args.get(1).isSame(s.join(f1)) || !list.args.get(2).isSame(s.join(f2))) break;
// Now, we've confirmed it is a total ordering on an enum. Let's pre-bind the relations
TupleSet me = sol.query(true, sol.a2k(s), false), firstTS = factory.noneOf(2), lastTS = null, nextTS = factory.noneOf(3);
if (me.size()!=1 || me.arity()!=1) break;
int n = sub.children().size();
for(PrimSig c: sub.children()) {
TupleSet TS = sol.query(true, sol.a2k(c), false);
if (TS.size()!=1 || TS.arity()!=1) { firstTS=factory.noneOf(2); nextTS=factory.noneOf(3); break; }
if (lastTS==null) { firstTS=me.product(TS); lastTS=TS; continue; }
nextTS.addAll(me.product(lastTS).product(TS));