DSU is great for checking consistency in logic. If someone tells you: " equals " and " equals " and " does not equal ," there is a contradiction.
Model "equals" as union. Process all equality constraints first, unioning elements. Then check inequality constraints: if two elements that must be unequal are in the same group, it is unsatisfiable.
This pattern solves satisfiability problems with equality and inequality constraints.