Fixed-arity Boolean constraint languages #
The existing CSP syntax is retained. A language supplies arity : Rel → ℕ and the existing
list semantics sem : Rel → List Bool → Bool; only lists of the declared arity are used.
CSP.WellFormed checks this condition on every constraint. The language, including its arities
and truth tables, is fixed independently of the input instance [Che06], Definitions
3.1–3.3. Relation symbols need not be finite for these semantic definitions.
CSP.HasSchaeferPolymorphism is the six-case Boolean criterion of [Che06], Theorem 3.20.
The constants are unary operations: they preserve an empty relation vacuously. Empty and
nullary relations are allowed. This module defines the criterion, not its complexity dichotomy.
Main definitions #
Cslib.Logic.PL.CSP.WellFormed,Cslib.Logic.PL.CSP.validArity: exact-arity condition and guard.Cslib.Logic.PL.CSP.booleanRelation: a relation on its declared finite set of coordinates.Cslib.Logic.PL.CSP.HasPolymorphism: a common polymorphism of all relations in a language.Cslib.Logic.PL.CSP.HasSchaeferPolymorphism: constants, AND, OR, majority or minority.
The exact-arity guard agrees with the semantic well-formedness condition.
Well-formedness is decidable by the executable exact-arity guard.
A unary constant preserves precisely those nonempty relations containing its constant tuple. Empty relations impose no condition, unlike preservation by a nullary constant.