Documentation

CslibFrontier.Logics.Propositional.CSP.Permanent

The 0/1 permanent as an exactly-one instance #

The permanent of an n × n matrix with entries in {0, 1} counts the permutations supported by its nonzero entries. The permanent instance CSP.permanentInstance n r of the matrix with entries r i j has one Boolean variable i * n + j for each nonzero entry, and an exactly-one constraint for each row and for each column on the variables of its nonzero entries. Its exactly-one partition function is the permanent (CSP.partitionFunction_permanentInstance): the sets of variables meeting every row and every column exactly once are the supports of the permutations.

Every variable occurs once in its row and once in its column (CSP.count_vars_permanentInstance), and a row or column with d nonzero entries gives a constraint on d variables.

Main definitions #

Main results #

The permanent instance of the n × n matrix with entries r i j in {0, 1}: a variable i * n + j for every nonzero entry, and an exactly-one constraint for every row and every column on the variables of its nonzero entries.

theorem Cslib.Logic.PL.CSP.mem_vars_permanentInstance {n : ℕ} {r : ℕ → ℕ → Bool} {x : ℕ} :
x ∈ (permanentInstance n r).vars ↔ ∃ i < n, ∃ j < n, r i j = true ∧ i * n + j = x

The variables of the permanent instance are the positions i * n + j of the nonzero entries.

Every variable occurs at most twice: once in its row and once in its column.

The exactly-one partition function of the permanent instance is the permanent of the n × n matrix with entries r i j in {0, 1}.