Per.DNF
(per v5.3.21)
Copy Markdown
DNF (Disjunctive Normal Form) solver for cubical formulas. Used for solving face constraints and checking equivalence of formulas.
Summary
Functions
Surface-level AND formula constructor with basic simplifications.
Converts a conjunction back to an AST formula.
Converts a conjunction element back to an AST formula.
Converts a disjunction back to an AST formula.
Evaluates AND of two formulas via DNF.
Evaluates OR of two formulas via DNF.
Extracts conjunction (map) from an AND-formula.
Extracts conjunction (bitset) from an AND-formula.
Extracts disjunction (Set of conjunctions) from a formula.
Converts a bitset representation back to a face map.
Converts a face map to an AST formula value.
Converts a system map to an AST formula value.
Checks if two formulas are logically equivalent.
Computes intersection of two conjunctions.
Intersection of two lists of faces.
Computes the negation of a conjunction.
Computes the negation of a disjunction.
Computes the negation of a formula.
Surface-level OR formula constructor with basic simplifications. Disjunction of conjunctions. Conjunction is a pair of integers {mask, values}. Disjunction is a MapSet of conjunction pairs.
Solves a formula for a given value (1 or 0), returning a disjunction.
Converts a face map to a bitset representation.
Computes intersection of two disjunctions (distributes AND over OR).
Removes redundant conjunctions from a disjunction.
Functions
Surface-level AND formula constructor with basic simplifications.
Converts a conjunction back to an AST formula.
Converts a conjunction element back to an AST formula.
Converts a disjunction back to an AST formula.
Evaluates AND of two formulas via DNF.
Evaluates OR of two formulas via DNF.
Extracts conjunction (map) from an AND-formula.
Extracts conjunction (bitset) from an AND-formula.
Extracts disjunction (Set of conjunctions) from a formula.
Converts a bitset representation back to a face map.
Converts a face map to an AST formula value.
Converts a system map to an AST formula value.
Checks if two formulas are logically equivalent.
Computes intersection of two conjunctions.
Intersection of two lists of faces.
Computes the negation of a conjunction.
Computes the negation of a disjunction.
Computes the negation of a formula.
Surface-level OR formula constructor with basic simplifications. Disjunction of conjunctions. Conjunction is a pair of integers {mask, values}. Disjunction is a MapSet of conjunction pairs.
Solves a formula for a given value (1 or 0), returning a disjunction.
Converts a face map to a bitset representation.
Computes intersection of two disjunctions (distributes AND over OR).
Removes redundant conjunctions from a disjunction.