Crux.Expression.RewriteRule.NegationLaw (crux v0.1.3)

Copy Markdown View Source

Rewrite rule that applies negation laws to simplify expressions.

See: https://en.wikipedia.org/wiki/Negation

Applies the transformations:

  • NOT true = false
  • NOT false = true
  • NOT (NOT A) = A (double negation elimination)

The negation laws handle boolean constant negation and double negation elimination, providing a complete set of negation simplifications.