Simplify complex boolean expressions
Simplify boolean conditions using De Morgan's laws, named predicates, and short-circuit ordering. Shows every simplification step.
Preview
Copy prompt
Simplify the following complex boolean expressions in [Language]: [Paste code]. Apply De Morgan's laws where they reduce negated compound conditions, extract frequently repeated sub-expressions into clearly named boolean predicates, and reorder conditions so the cheapest or most discriminating checks come first to maximise short-circuit evaluation efficiency. Walk through each simplification step with an explanation.
More
Refactoring
Prompts
