Uninstall can be done in different ways - the most accurate would be to try find a minimum subset of packages that gives conflicts and try to reduce them gradually.
E.g. this could be done with other SAT algorithms. For now we keep things simple and we compute the uninstalls as an indirect of an installation from an empty profile.
Also take care of corner cases where world has no clauses, and fixes a typo in building the world formula