Overlap of two binary records with a shared erasure mask
ProvedEmulationTaskReadout.mixed_error_overlapcoding-theoryhamming-distancewhole-brain-emulation
Two binary words of length are compatible with one common erasure mask of size at most and one received word having at most discrepancies from each word outside the mask if and only if the original words have Hamming distance at most . Discrepancies on masked coordinates do not enter either count.
Preamble
import Mathlib.InformationTheory.Hamming
Formal statement
namespace EmulationTaskReadout
theorem mixed_error_overlap (n e s : Nat) (u v : Fin n → Bool) :
(∃ (mask : Finset (Fin n)) (y : Fin n → Bool), mask.card ≤ s ∧
((Finset.univ \ mask).filter (fun i => u i ≠ y i)).card ≤ e ∧
((Finset.univ \ mask).filter (fun i => v i ≠ y i)).card ≤ e) ↔
hammingDist u v ≤ 2 * e + s := by sorry
end EmulationTaskReadoutSource
Mixed-mask exercise based on R. W. Hamming, Error Detecting and Error Correcting Codes (1950), Part II, pp. 154–156, https://doi.org/10.1002/j.1538-7305.1950.tb00463.x .