Instantiating fixed CNF templates for constraint relations #
A local CNF template uses natural-number positions, with correctness stated against the tuple of the declared arity. Instantiation replaces each position by the variable at that position of the constraint scope. Repeated variables are allowed. On well-formed inputs this preserves evaluation under every assignment, hence satisfiability, with no auxiliary variables.
Main definitions #
Cslib.Logic.PL.CSP.CNFTemplates: correctness of fixed local CNF formulas.Cslib.Logic.PL.Constraint.instantiateCNF: instantiate one relation template.Cslib.Logic.PL.CSP.instantiateCNF: concatenate the instantiated constraint templates.
Main results #
Cslib.Logic.PL.CSP.eval_instantiateCNF: exact evaluation equivalence on well-formed inputs.
Correct local CNF templates, with natural numbers denoting positions in a relation tuple. Correctness at every assignment also rules out semantic dependence on out-of-range positions.
Instances For
Definitions on the declared finite coordinates become natural-position CNF templates by relabeling each finite index by its value.
Instantiate one relation template at its scope, using fallback outside the scope. The
fallback is semantically irrelevant when the scope has the correct arity and the template is
correct.
Instances For
Exact evaluation equivalence for a well-formed instantiated constraint.
Instantiation preserves any common clause-width bound of the templates.
Instantiation preserves evaluation under every assignment to well-formed instances.
Instantiation preserves satisfiability of well-formed instances.