Skip to main content

Module negation

Module negation 

Source
Expand description

Negation optimization pass.

This module optimizes negation operations in logical expressions:

  • Eliminate double negations: NOT(NOT(x)) → x
  • Apply De Morgan’s laws: NOT(AND(x, y)) → OR(NOT(x), NOT(y))
  • Push negations through quantifiers: NOT(EXISTS x. P(x)) → FORALL x. NOT(P(x))

Structs§

NegationOptStats
Statistics from negation optimization

Functions§

optimize_negations
Optimize negations in an expression