Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Lemma 8 — h(y)=∑X⊆Idet⁡Ls(HXA,p)h(y)=\sum_{X\subseteq I}\det L_s(H_X^A,p)h(y)=∑X⊆I​detLs​(HXA​,p) (corrected: added arcs are loopless)

Proved
DirectedHamiltonicity.Main.lemma8

by mikedeng1 · Nov 8, 2026 · Mathlib 0df444a (Lean v4.33.1)

directed-hamiltonicityexact-exponential-algorithmsp2o-batch-stoc27ap2o-correctedp2o-gran-per-chapterp2o-plan-paperp2o-strengthenedp2o-v1parity-counting

Let HHH be a loopless directed multigraph on a finite vertex set VVV with distinct vertices s,ts,ts,t, no arc entering sss and no arc leaving ttt, and let p:E(H)→F2[y]p:E(H)\to\mathbb F_2[y]p:E(H)→F2​[y]. Put

h(y)=∑P∈Ps,t(H)∏e∈Pp(e),I=V∖{s,t}.h(y)=\sum_{P\in\mathcal P_{s,t}(H)}\prod_{e\in P}p(e),\qquad I=V\setminus\{s,t\}.h(y)=P∈Ps,t​(H)∑​e∈P∏​p(e),I=V∖{s,t}.

Let AAA be any finite set of additional arcs leaving ttt, each with head different from ttt, and extend ppp arbitrarily to AAA. For X⊆IX\subseteq IX⊆I let HXAH_X^AHXA​ be obtained from HHH by deleting the arcs leaving vertices of I∖XI\setminus XI∖X and adding AAA. Then

h(y)=∑X⊆Idet⁡Ls(HXA,p).h(y)=\sum_{X\subseteq I}\det L_s(H_X^A,p).h(y)=X⊆I∑​detLs​(HXA​,p).

The correction excludes added loops t→tt\to tt→t: with them the printed statement is false. Take V={s,t}V=\{s,t\}V={s,t}, H={s→t}H=\{s\to t\}H={s→t} with label 111 and A={t→t}A=\{t\to t\}A={t→t} with label 111; every assumption holds, I=∅I=\varnothingI=∅ and h(y)=1h(y)=1h(y)=1, but the only term is det⁡[1+1]=0\det[1+1]=0det[1+1]=0 over F2[y]\mathbb F_2[y]F2​[y]. The algorithm adds only arcs t→it\to it→i with i∈Ii\in Ii∈I, so Proposition 4 and Theorem 1 are unaffected. The lemma lets random added arcs make most of the 2n−22^{n-2}2n−2 determinants vanish.

Differences from the source:

  • correction: A is any set of additional arcs leaving t → every added arc has tail t and head different from t; reason: with an added loop t→t the statement is false: V = {s,t}, H = {s→t} labelled 1, A = {t→t} labelled 1 gives h = 1 but the only term X = ∅ is det[1+1] = 0 over F₂[y] (checked sorry-free in Solutions/verification/DirectedHamiltonicity_Main_Checks.lean)
  • generalization: p(e) = y^{w(e)} on the arcs of H, with parallel arcs of H carrying distinct weights (§4.1 normalization) → arbitrary labels p : E(H) → F₂[y] and no assumption on parallel arcs; reason: the source case is p = y^w on a normalized H; the inclusion–exclusion identity holds for any labels
  • encoding: H after the normalization of §4.1 (no loops, no arcs entering s, no arcs leaving t), s ≠ t → hypotheses hloop, hs, ht, hst; reason: the standing assumptions of the section written as binders
Preamble
import Mathlib
import Definitions.Def_DirectedHamiltonicity_Main_DetSum
Formal statement
namespace DirectedHamiltonicity.Main

open Multidigraph

open Polynomial

open Classical in
/-- Lemma 8, PDF p.9 / printed p.8 (corrected: the added arcs are not loops). Let `H` be a loopless
directed multigraph with distinct vertices `s, t`, no arc entering `s` and no arc leaving `t`, with
labels `p : E(H) → 𝔽₂[y]`, and let `h(y) = ∑_{P ∈ 𝒫_{s,t}(H)} ∏_{e ∈ P} p(e)`. Let `A` be any finite
set of additional arcs leaving `t`, each with head different from `t`, with arbitrary labels
`p_A : A → 𝔽₂[y]`. For `X ⊆ I = V ∖ {s,t}` let `H_X^A` be `H_X` (delete the arcs leaving `I ∖ X`)
together with `A`. Then `h(y) = ∑_{X ⊆ I} det L_s(H_X^A, p)`. -/
theorem lemma8 {V E EA : Type} [Fintype V] [DecidableEq V] [Fintype E] [DecidableEq E]
    [Fintype EA] [DecidableEq EA]
    (H : Multidigraph V E) (s t : V) (hst : s ≠ t) (hloop : H.Loopless)
    (hs : ∀ e, H.head e ≠ s) (ht : ∀ e, H.tail e ≠ t) (p : E → (ZMod 2)[X])
    (A : Multidigraph V EA) (hAt : ∀ a, A.tail a = t) (hAloop : ∀ a, A.head a ≠ t)
    (pA : EA → (ZMod 2)[X]) :
    H.hamPathPoly p s t =
      ∑ X : Finset (Internal s t),
        (((H.subX s t X).addArcs A).reducedLaplacian (Sum.elim (fun e => p e.1) pA) s).det := by sorry

end DirectedHamiltonicity.Main
Source
Tomohiro Koana, Soh Kumabe, Breaking the 2n2^n2n barrier for directed hamiltonicity, STOC 2027 submission #811 (October 2026), source.pdf SHA-256 103ec74bdf635a66ec16e2c21d6fbc0896c1aa986065e20007ae217a701fffb3, https://github.com/sigact-stoc/stoc2027/releases/download/papers-1/811.pdf, PDF p.9 / printed p.8, Lemma 8 (setting PDF p.8 / printed p.7)
Human review
  • Endorsed by Shuze Chen · Nov 8, 2026

    Confirmed by the moderator at approval.

  • Endorsed by mikedeng1 · Nov 8, 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