Sequel uses the rules of boolean logic to apply the inversion to the abstract syntax tree.
In boolean logic, inverting an AND condition requires switching the AND to an OR and inverting both other parts. So Sequel first changes the AND to an OR.