Linear checks on answer bits, and their constraint vectors #
A tailored game's constraint is a bit vector c of length N + 1, satisfied by the answer bits
z of length N when ⟨c, (z, 1)⟩ = 0 (MIPRE.Tailored.Satisfies). This file produces such
vectors from linear checks: an F₂-linear functional φ on F₂^N and a target c, read as
the equation φ(z) = c. The constraint of a check (LinCheck.toCon) lists the values of φ
on the unit vectors, then c; satisfies_toCon_iff is the statement that it is satisfied
exactly when φ(z) = c. So a decision procedure that is a conjunction of affine equations in
the answer bits becomes a constraint list by writing down the functionals, with no coefficient
bookkeeping: the coefficients are whatever the functional gives on the unit vectors, which a
program computes by evaluating the check at those vectors.
The functionals are built from two readers: getv l, the bit at position l, and, for the
effective binary field shoupBinField k hk, fldAt o, the field element whose canonical k
bits start at position o (MIPRE.SAT.shoupCoordinateEquiv, under which toBits is
F₂-linear). An equation E(z) = κ between field elements, E an F₂-linear map to the
field, is the k checks of its coordinates (fieldChecks, forall_fieldChecks_iff).
reject is the check 0 = 1, whose constraint is rejectConstraint N.
The answer bits as a vector of F₂^N (bits beyond the string read 0).
Equations
- MIPRE.Tailored.Intro.bitVec N z l = MIPRE.LowDegree.ofBool (List.getD z (↑l) false)
Instances For
The constraint vector of a check: the functional on the unit vectors, then the target.
Equations
Instances For
The check 0 = 1, which no vector satisfies.
Equations
- MIPRE.Tailored.Intro.LinCheck.reject N = { φ := 0, c := 1 }
Instances For
Readers #
The bit at position l, 0 beyond N.
Equations
- MIPRE.Tailored.Intro.getv N l = if h : l < N then LinearMap.proj ⟨l, h⟩ else 0
Instances For
The field element whose canonical bits start at position o.
Equations
- MIPRE.Tailored.Intro.fldAt k hk N o = ↑(MIPRE.SAT.shoupCoordinateEquiv k hk).symm ∘ₗ LinearMap.pi fun (i : Fin k) => MIPRE.Tailored.Intro.getv N (o + ↑i)
Instances For
fldAt o reads the field element x when the bits from o on are those of x.
The k coordinate checks of the field equation E(z) = κ.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The coordinate checks hold exactly when the field equation does.