pub fn apply_laws(expr: &Expr) -> ExprExpand description
Applies De Morgan’s laws and then distributive laws repeatedly to an expression until it no longer changes (reaches a fixed point).
This is a common step in converting an arbitrary boolean expression into a
standard form, often as a preliminary step before full CNF or DNF conversion.
The goal is to achieve Negation Normal Form (NNF) via demorgans_laws,
and then apply distributive_laws to move towards a
product-of-sums (CNF like) structure.
§Arguments
expr: The initial expression.
§Returns
The transformed Expr after applying laws to a fixed point.