if (currentDecl==decls.size()) {
matrix.set(partialIndex, factory.and(declConstraints, formula.accept(this)));
return;
}
final Decl decl = decls.get(currentDecl);
final BooleanMatrix declTransl = visit(decl);
final int position = (int)StrictMath.pow(interpreter.universe().size(), decls.size()-currentDecl-1);
final BooleanMatrix groundValue = factory.matrix(declTransl.dimensions());
env = env.extend(decl.variable(), groundValue);
for(IndexedEntry<BooleanValue> entry : declTransl) {
groundValue.set(entry.index(), BooleanConstant.TRUE);
comprehension(decls, formula, currentDecl+1, factory.and(entry.value(), declConstraints),
partialIndex + entry.index()*position, matrix);
groundValue.set(entry.index(), BooleanConstant.FALSE);