A majority tolerance boundary checks how many bit flips a repetition code can absorb before the majority vote changes, with the boundary at exactly half the code length. The three rows give flip counts 0, 2, and 3 against tolerances 1, 2, and 2, yielding margins 1, 0, and -1 (pass, pass, fail) exactly for the stated toy code ledger; real stabilizer codes have readout errors, repeated rounds, calibration drift, and finite-shot statistics.
Repetition-code majority has a counted flip boundary. Exact arithmetic here means exact results for the stated model inputs; measured inputs still carry uncertainty and significant-figure limits.
highlighted = computed this step
Majority tolerance is counted before correction
A three-carrier code has one unit of flip tolerance before majority changes.
m=fmax−f
Flip counts bracket the majority boundary
The five-carrier row with two flips is the boundary. Three flips would cross it.
n355f023fmax122m10−1
The three-flip row is outside this helper contract
The checked majority helper is not called on the failing row because it intentionally accepts only preserved-majority rows.