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

Copy Markdown View Source

Rewrite rule that applies distributivity-based simplifications to expressions.

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

Applies the transformations:

  • A AND (NOT A OR B) = A AND B
  • A OR (NOT A AND B) = A OR B
  • NOT A AND (A OR B) = NOT A AND B
  • NOT A OR (A AND B) = NOT A OR B

These patterns use distributivity properties to eliminate redundant terms involving complements, simplifying expressions by removing parts that don't affect the overall result.