Binary regular syndrome decoding #
The regular syndrome decoding relation used by SD-in-the-Head partitions a binary word into
equally sized chunks and requires each chunk to be an elementary vector: it has exactly one
nonzero coordinate. A witness additionally satisfies the ordinary parity-check relation
y = H *ᵥ x [SDitH2026, Sections 2.2 and 3.1.1].
The chunked index type Fin chunks × Fin chunkSize makes the source requirement that the word
length is chunks * chunkSize explicit. This module reuses Cslib.Code.syndrome; it
does not introduce a second parity-check or code API.
Main definitions #
Cslib.Code.regularWord: concatenate one elementary word per chunk.Cslib.Code.IsRegularWord: every chunk is a Boolean unit vector.Cslib.Code.IsRegularSyndromeSolution: a regular word with a prescribed syndrome.
Main results #
Cslib.Code.hammingNorm_eq_sum_chunks: decompose total Hamming weight by chunks.Cslib.Code.isRegularWord_iff_exists_positions: the weight-one predicate is exactly the source's concatenation of elementary words.Cslib.Code.IsRegularWord.hammingNorm_eq: every regular word has total Hamming weight equal to the number of chunks.Cslib.Code.isRegular_regularWord: choosing one position per chunk constructs a regular word.
References #
Every binary regular word has exactly one nonzero coordinate per chunk.
The canonical word constructed from positions solves the syndrome instance obtained by
applying H to that word.
A regular syndrome solution has the source-required total Hamming weight.