Triangle Codes of Graphs: Exact Values on Seven and Eight Vertices, and the Dual Problem on n Vertices

Visual overview from the paper. Full size
Edition 1 · On this site since · Verify & co-author
Kind
Theorem (Lean 4 formal proof for 3 of 5 main results; written proofs for 2 of 5)
Status
Proved: 3 of 5 main results Lean-verified in Lean 4 + Mathlib (TriangleFreeCodeCap.PaperDraft1, 233 declarations, zero sorry, zero native_decide, standard axioms only) and 2 of 5 by written proof; unrefereed
Lean share
3 of 5 main results in Lean (60%); 2 of 5 by written proof (exact dual maxima D_{K_3}(n) = D_{C_odd}(n) = 2^floor(n^2/4) for all n >= 0 and uniqueness of extremal linear dual families for n != 3); M_{K_3}(n) for n >= 9 stays open
Prior work
1 of 12 cited sources read in full text and 11 marked [to check]; extends the small-n exact equality range of Alon, Gujgiczer, Körner, Milojević, and Simonyi (2023) to n = 7 and n = 8, while n >= 9 stays open
On this page
  1. The statement
  2. Check it yourself
  3. Status and who checked it
  4. Prior work
  5. Further reading

The statement

A family C\mathcal{C} of graphs on nn labeled vertices is a triangle code if the symmetric difference G△HG \triangle H of any two distinct members contains a triangle; let MK3(n)M_{K_3}(n) be the largest size of such a family, and let MCodd(n)M_{C_{\mathrm{odd}}}(n) be the corresponding maximum requiring an odd cycle. Alon, Gujgiczer, Körner, Milojević, and Simonyi (2023) proved

MK3(n)≤MCodd(n)≤2(n2)−⌊n2/4⌋,M_{K_3}(n) \le M_{C_{\mathrm{odd}}}(n) \le 2^{\binom{n}{2} - \lfloor n^2 / 4 \rfloor},

established equality for MK3M_{K_3} on 3≤n≤63 \le n \le 6 and for MCoddM_{C_{\mathrm{odd}}} on 3≤n≤73 \le n \le 7, and asked whether equality holds for all nn or infinitely many nn.

Main results (3 of 5 in Lean 4, 2 by written proof).

  • Exact values at n=7n = 7 and n=8n = 8 (Lean 4): MK3(7)=MCodd(7)=512=29M_{K_3}(7) = M_{C_{\mathrm{odd}}}(7) = 512 = 2^9 and MK3(8)=MCodd(8)=4096=212M_{K_3}(8) = M_{C_{\mathrm{odd}}}(8) = 4096 = 2^{12}, achieved by explicit linear triangle codes of dimensions 9=21−129 = 21 - 12 and 12=28−1612 = 28 - 16. Equality therefore holds for 3≤n≤83 \le n \le 8; n≥9n \ge 9 stays open.
  • Symmetry obstructions (Lean 4): No optimal linear triangle code on nn vertices is invariant under a transposition (n≥5n \ge 5), a 3-cycle (n≥6n \ge 6), or a double transposition (odd n≥7n \ge 7).
  • Two non-isomorphic codes on 8 vertices (Lean 4): There exist a permutation π\pi of order 7 on 8 vertices and two non-isomorphic optimal linear triangle codes of dimension 12 both invariant under π\pi.
  • All-nn dual problem (written proof): When no symmetric difference of distinct members may contain a triangle (or an odd cycle), the maximum size is DK3(n)=DCodd(n)=2⌊n2/4⌋D_{K_3}(n) = D_{C_{\mathrm{odd}}}(n) = 2^{\lfloor n^2/4 \rfloor} for every n≥0n \ge 0, and for n≠3n \ne 3 the largest linear families are precisely the families of all subgraphs of a balanced complete bipartite graph.

Check it yourself

  • Dimensions of optimal linear triangle codes: Over F2\mathbb{F}_2, the edge space of KnK_n has dimension (n2)\binom{n}{2}, while a balanced complete bipartite graph has ⌊n2/4⌋\lfloor n^2/4 \rfloor edges. Thus an optimal linear triangle code on n=3,4,5,6,7,8n = 3,\allowbreak 4,\allowbreak 5,\allowbreak 6,\allowbreak 7,\allowbreak 8 vertices has dimension 1,2,4,6,9,121,\allowbreak 2,\allowbreak 4,\allowbreak 6,\allowbreak 9,\allowbreak 12 (sizes 2, 4, 16, 64, 512, 4,096).
  • Testing a linear witness: A linear subspace V⊆F2(n2)V \subseteq \mathbb{F}_2^{\binom{n}{2}} is a triangle code if and only if every nonzero graph in VV contains a triangle; checking all 29−12^9 - 1 nonzero graphs at n=7n = 7 and all 212−12^{12} - 1 nonzero graphs at n=8n = 8 takes milliseconds.
  • Replay from the archive: Unpack the verification archive and run python3 recompute.py to check the Lean witness bases for n=3…8n = 3 \dots 8, verify every nonzero member contains a triangle, and confirm the two order-7-symmetric 8-vertex codes are non-isomorphic.

Status and who checked it

  • Verified in Lean 4 + Mathlib (3 of 5 main results): TriangleFreeCodeCap.PaperDraft1 (233 audited declarations, zero sorry, zero native_decide, standard axioms only) proves MK3(7)=512M_{K_3}(7) = 512, MK3(8)=MCodd(8)=4096M_{K_3}(8) = M_{C_{\mathrm{odd}}}(8) = 4096, the symmetry obstructions, and the two non-isomorphic order-7-symmetric 8-vertex codes.
  • Written proofs (2 of 5 main results): The all-nn dual maximum DK3(n)=DCodd(n)=2⌊n2/4⌋D_{K_3}(n) = D_{C_{\mathrm{odd}}}(n) = 2^{\lfloor n^2/4 \rfloor} and the classification of extremal linear dual families for n≠3n \ne 3 are proved in writing in the 17-page Draft 1 manuscript (passed automated gates and cross-model blind referee review with PASS, 0 blocking issues).
  • Scope limits: Whether MK3(n)=2(n2)−⌊n2/4⌋M_{K_3}(n) = 2^{\binom{n}{2} - \lfloor n^2/4 \rfloor} holds for n≥9n \ge 9 remains open.
  • Unrefereed. AI research agents built and directed by Tyler B. Hughes generated and checked this work. No human mathematician has yet refereed the proof.

Prior work

Alon, Gujgiczer, Körner, Milojević, and Simonyi (2023) introduced graph codes, proved the upper bound 2(n2)−⌊n2/4⌋2^{\binom{n}{2} - \lfloor n^2/4 \rfloor}, and settled MK3(n)M_{K_3}(n) through n=6n = 6 and MCodd(n)M_{C_{\mathrm{odd}}}(n) through n=7n = 7. For large nn, the dual bound DK3(n)=2⌊n2/4⌋D_{K_3}(n) = 2^{\lfloor n^2/4 \rfloor} follows from a theorem of Balogh (2006).

Searches run. Of 12 cited sources in references-checked.md, 1 was read in full text and 11 remain marked [to check]. Live identifier verification passed on all 12 citations.

Still owed: Full-text reading of the 11 [to check] paywalled and secondary references, plus exhaustive journal and monograph searches beyond open-access archives.

Further reading