Documentation

CslibFrontier.Foundations.Data.Matrix.HamiltonianCycle.Grid

Sums over two families of bits as Hamiltonian cycle sums #

A grid sum ∑ x, ∑ r, ∏ n, W n (x (v n)) (r (w n)) over two families of bits, for surjections v : N → V and w : N → K of finite types (see Matrix.exists_permanent_eq_gridSum), is the Hamiltonian cycle sum of a matrix of size 40 * |N| with entries 0, 1 and single weights, in every commutative semiring (Matrix.exists_hamiltonianCycleSum_eq_gridSum).

The matrix is the weighted adjacency matrix of a graph built from a row of segments: the segments are closed to a cycle, and every segment offers some options, each a path from the head of the segment to the head of the next one. An exclusive-or gadget has two tips and a middle vertex, with edges both ways between each tip and the middle; it joins two options, which run through it in opposite directions. The Hamiltonian cycles are the selections of one option in every segment that use every gadget exactly once. For a grid, there is a segment for every bit of the two families and seven for every incidence, joined by ten gadgets per incidence, so that the valid selections are exactly the pairs of families of bits. Padding segments fill up any larger size.

Main results #

References #

From a selection to a cycle #

From a cycle to a selection #

The sum #

theorem Matrix.exists_hamiltonianCycleSum_eq_gridSum {R : Type u_1} [CommSemiring R] {N V K : Type} [Fintype N] [Fintype V] [DecidableEq V] [Fintype K] [DecidableEq K] (v : N → V) (w : N → K) (hv : Function.Surjective v) (hw : Function.Surjective w) (W : N → Bool → Bool → R) {S : ℕ} (hS : 40 * Fintype.card N ≤ S) :
∃ (M : Matrix (Fin S) (Fin S) R), (∀ (i j : Fin S), M i j = 0 ∨ M i j = 1 ∨ ∃ (n : N) (x : Bool) (r : Bool), M i j = W n x r) ∧ M.hamiltonianCycleSum = ∑ x : V → Bool, ∑ r : K → Bool, ∏ n : N, W n (x (v n)) (r (w n))

Grid sums are Hamiltonian cycle sums Claude, VP ≠ VNP over every field, Proposition prop:hc-grid. In every commutative semiring, for surjections v : N → V and w : N → K of finite types and weights W n x r, the grid sum ∑ x, ∑ r, ∏ n, W n (x (v n)) (r (w n)) is the Hamiltonian cycle sum of an S × S matrix, for every S ≥ 40 * |N|, whose entries are 0, 1 and single values W n x r.