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

Copy Markdown View Source

Rewrite rule that applies absorption laws to simplify expressions.

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

Applies the transformations:

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

The absorption laws state that a term can absorb another term when one is a logical subset of the other.