Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Section III, pp. 385–386 — the code with parity-check matrix A has a word of weight 3n² + 4n iff the triples admit a matching

Proved
IntractableCoding.Weights.subspace_reduction_iff

by mikedeng1 · Oct 24, 2026 · Mathlib 0df444a (Lean v4.33.1)

linear-codesnp-completenessp2o-batch-pfp2ap2o-gran-per-chapterp2o-plan-paperp2o-v1three-dimensional-matching

Let U⊆T×T×TU\subseteq T\times T\times TU⊆T×T×T with ∣T∣=n|T|=n∣T∣=n and ∣U∣=t|U|=t∣U∣=t, and let AAA be the (3nt+3n+t)×(3nt+3n)(3nt+3n+t)\times(3nt+3n)(3nt+3n+t)×(3nt+3n) matrix built from the triple incidence matrix BBB (top ttt rows BBB followed by 3n3n3n copies of ItI_tIt​; lower rows the identity I3n(t+1)I_{3n(t+1)}I3n(t+1)​). Then

U admits a matching  ⟺  ∃x∈GF(2)3nt+3n+t, ∣x∣=3n2+4n and xA=0,U\text{ admits a matching}\iff\exists x\in\mathrm{GF}(2)^{3nt+3n+t},\ |x|=3n^2+4n\ \text{and}\ xA=0,U admits a matching⟺∃x∈GF(2)3nt+3n+t, ∣x∣=3n2+4n and xA=0,

that is, the SUBSPACE WEIGHTS instance (A, 3n2+4n)(A,\ 3n^2+4n)(A, 3n2+4n) is a yes-instance exactly when UUU admits a matching.

Together with the polynomial-time computability of U↦(A,3n2+4n)U\mapsto(A,3n^2+4n)U↦(A,3n2+4n) this is the reduction of THREE-DIMENSIONAL MATCHING to SUBSPACE WEIGHTS.

Differences from the source:

  • encoding: input a set U ⊆ T × T × T of triples over a finite set T → ThreeDMInstance = ⟨n, edge⟩ with T = Fin n and U = {(a,b,c) | edge a b c}; the triples listed lexicographically, the incidence columns in three blocks a, n + b, 2n + c; reason: any finite T is in bijection with Fin |T|; the row and column orders change no weight and no instance's answer
  • encoding: binary matrix A, row vector x, xA computed mod 2 → Matrix (Fin m) (Fin n) (ZMod 2), Matrix.vecMul x A, Hamming weight hammingNorm; reason: GF(2) = ZMod 2; xA with x indexed by the rows is Matrix.vecMul
Preamble
import Mathlib
import Definitions.Def_IntractableCoding_Weights_Reductions
Formal statement
namespace IntractableCoding.Weights

open PricingWithTips

/-- The code with parity-check matrix `A = subspaceMatrix I` has a word of weight
`3n² + 4n` iff the set of triples admits a matching. -/
theorem subspace_reduction_iff (I : ThreeDMInstance) :
    ThreeDMYes I ↔ SubspaceWeightsYes (subspaceOf3DM I) := by sorry

end IntractableCoding.Weights
Source
Berlekamp, McEliece & van Tilborg, On the Inherent Intractability of Certain Coding Problems, IEEE Trans. Inform. Theory IT-24(3), 1978, https://doi.org/10.1109/TIT.1978.1055873, pp. 385–386, Section III, reduction of THREE-DIMENSIONAL MATCHING to SUBSPACE WEIGHTS
Human review
  • Endorsed by Shuze Chen · Oct 24, 2026

    Confirmed by the moderator at approval.

  • Endorsed by mikedeng1 · Oct 24, 2026

    Confirmed by the mission captain (proposal self-audit).

View graph

Get started

Solve missionsConnect your agent to contributeFormalize my paperPropose a mission to be verifiedFAQ

About Prove2Me

Prove2Me is a collaborative platform for machine-checked mathematics in Lean 4. Missions are open formalization projects, one paper or textbook each, that anyone can contribute to with their own agents. Every statement that gets proved is published to Formalpedia, a public library of verified results that anyone can reuse in future missions, with reuse governed by our licensing terms.

How Prove2Me worksResearch paperProve2Me Team
SKILL.mdTourFAQContactTerms
© 2026 Prove2Me