Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Lemma 5 — the path polynomial is nonzero with probability at least (1−δ)n−1(1-\delta)^{n-1}(1−δ)n−1

Proved
DirectedHamiltonicity.Main.lemma5

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

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

Let G=(V,A)G=(V,A)G=(V,A) be a simple loopless directed graph on nnn vertices with distinct vertices s,ts,ts,t, no arcs entering sss and no arcs leaving ttt, and let d≥2d\ge2d≥2, δ=1/(1+(2d−1)2)\delta=1/(1+(2^d-1)^2)δ=1/(1+(2d−1)2). Draw independent sets Suv⊆[d]S_{uv}\subseteq[d]Suv​⊆[d], uv∈Auv\in Auv∈A, with Pr⁡[Suv=∅]=δ\Pr[S_{uv}=\varnothing]=\deltaPr[Suv​=∅]=δ and Pr⁡[Suv=S]=(1−δ)/(2d−1)\Pr[S_{uv}=S]=(1-\delta)/(2^d-1)Pr[Suv​=S]=(1−δ)/(2d−1) for nonempty SSS, and let

f(z)=∑P∈Ps,t(G)∏uv∈P(∑ℓ∈Suvzvℓ)∈F2[zvℓ:v≠s, ℓ∈[d]].f(z)=\sum_{P\in\mathcal P_{s,t}(G)}\prod_{uv\in P}\Bigl(\sum_{\ell\in S_{uv}}z_{v\ell}\Bigr)\in\mathbb F_2[z_{v\ell}:v\ne s,\ \ell\in[d]].f(z)=P∈Ps,t​(G)∑​uv∈P∏​(ℓ∈Suv​∑​zvℓ​)∈F2​[zvℓ​:v=s, ℓ∈[d]].

If GGG has a Hamiltonian path from sss to ttt, then

Pr⁡[f(z)≠0] ≥ (1−δ)n−1,\Pr[f(z)\ne0]\ \ge\ (1-\delta)^{n-1},Pr[f(z)=0] ≥ (1−δ)n−1,

where f(z)≠0f(z)\ne0f(z)=0 means that fff is a nonzero polynomial.

By the coefficient identity of §3, f≠0f\ne0f=0 exactly when some group selection has an odd number of Hamiltonian paths, so this lemma is equivalent to Proposition 3.

Differences from the source:

  • encoding: G = (V, A) a simple loopless directed graph on n vertices with distinct s, t, no arcs entering s and none leaving t, and d ≥ 2 (standing assumptions of §2, PDF p.4) → an adjacency relation adj on a finite type V with n = |V|, and the hypotheses s ≠ t, ∀ v, ¬adj v v, ∀ u, ¬adj u s, ∀ v, ¬adj t v, 2 ≤ d; reason: a simple digraph is exactly a relation; the standing assumptions are written as binders; [d] is Fin d
  • encoding: probability over the independent random sets S_uv ⊆ [d] with Pr[S_uv = ∅] = δ and Pr[S_uv = S] = (1−δ)/(2^d−1) for S ≠ ∅ → copyProb d E = Σ over joint outcomes S satisfying E of ∏_{uv} copySetProb d (S uv); reason: the product law of finitely many independent finite random variables, written as an explicit finite sum
  • encoding: a directed (multi)graph with arc set E(H); a Hamiltonian path from s to t as a path visiting every vertex once → Multidigraph V E (tail, head : E → V, arcs labelled by E); a Hamiltonian path is a sequence of n−1 arcs e_0,…,e_{n−2} with tail e_i = v_i, head e_i = v_{i+1}, v_0 = s, v_{n−1} = t, and v injective; reason: a bijection with the source paths; parallel copies of an arc give distinct paths, as in the source
  • encoding: indeterminates z_{vℓ} for v ≠ s and ℓ ∈ [d] → MvPolynomial ({v // v ≠ s} × Fin d) (ZMod 2); reason: the same polynomial ring; a factor for an arc entering s would be 0, and no such arc exists by hypothesis
Preamble
import Mathlib
import Definitions.Def_DirectedHamiltonicity_Main_ArcCopies
Formal statement
namespace DirectedHamiltonicity.Main

open Multidigraph

/-- Lemma 5, PDF p.6 / printed p.5. Let `G` (adjacency `adj`) be a simple loopless digraph on `n`
vertices with distinct `s, t`, no arc entering `s` and no arc leaving `t`, and let `d ≥ 2`. If `G` has
a Hamiltonian path from `s` to `t`, then, for independent random sets `S_uv ⊆ [d]` with
`Pr[S_uv = ∅] = δ` and `Pr[S_uv = S] = (1 − δ)/(2^d − 1)` (`S ≠ ∅`), the path polynomial `f(z)` over
`𝔽₂` is a nonzero polynomial with probability at least `(1 − δ)^{n−1}`. -/
theorem lemma5 {V : Type} [Fintype V] [DecidableEq V] (adj : V → V → Prop) [DecidableRel adj]
    (s t : V) (hst : s ≠ t) (hloop : ∀ v, ¬ adj v v) (hs : ∀ u, ¬ adj u s) (ht : ∀ v, ¬ adj t v)
    (d : ℕ) (hd : 2 ≤ d) (hham : ((ofAdj adj).hamPaths s t).Nonempty) :
    (1 - delta d) ^ (Fintype.card V - 1) ≤
      copyProb (adj := adj) d (fun S => pathPoly adj s t S ≠ 0) := 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.6 / printed p.5, Lemma 5 (setting PDF p.4 / printed p.3; proof PDF pp.6–7 / printed pp.5–6)
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