Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Small-term index enumeration: exact output and charged work

Proved
BipHamCount.Deterministic.smallTerms_index_enumeration

by Soh Kumabe · Nov 26, 2026 · Mathlib 0df444a (Lean v4.33.1)

enumerationgraph-algorithmstime-complexity

For the subset and three-way label routines used in Proposition 4.2, choosing qqq indices returns exactly the length-qqq sublists up to permutation. On a list of distinct indices, three-way labelling enumerates each ordered pair with the prescribed union exactly once. The charged work to enumerate a layer is polynomial per output, with an additive polynomial for empty layers. At the registered cutoff k=⌊αm⌋k=\lfloor\alpha m\rfloork=⌊αm⌋, the weighted sum of layer sizes is at most exp⁡(mH(α))3αm\exp(mH(\alpha))3^{\alpha m}exp(mH(α))3αm, where HHH is binary entropy in nats.

Preamble
import Mathlib
import Definitions.Def_BipHamCount_Deterministic_Programs
open scoped BigOperators
Formal statement
namespace BipHamCount.Deterministic

theorem smallTerms_index_enumeration :
    (∀ (m : ℕ) (xs : List (Fin m)) (q s : ℕ),
      ((chooseSets xs q).run s).1.Perm ((xs.sublistsLen q).map List.toFinset) ∧
      ((chooseSets xs q).run s).2 ≤ s + (m+4)*(3*(xs.length+1)*(xs.length.choose q)+1)) ∧
    (∀ (m : ℕ) (xs : List (Fin m)) (s : ℕ), xs.Nodup →
      ((labelPairs xs).run s).1.Nodup ∧
      (∀ t : Finset (Fin m) × Finset (Fin m),
        t ∈ ((labelPairs xs).run s).1 ↔ t.1 ∪ t.2 = xs.toFinset) ∧
      ((labelPairs xs).run s).1.length = 3^xs.length ∧
      ((labelPairs xs).run s).2 ≤ s+(4*m+12)*3^xs.length) ∧
    (∀ m : ℕ, (∑ q ∈ Finset.range (kOf m+1), (m.choose q : ℝ)*(3:ℝ)^q) ≤
      Real.exp ((m:ℝ)*Real.binEntropy alpha)*(3:ℝ)^(alpha*m)) := by sorry

end BipHamCount.Deterministic
Source
T. Koana and S. Kumabe, Counting Hamiltonian Cycles in Bipartite Digraphs Deterministically in O(1.9526^n) Time, §4.2, pp. 7–8, auxiliary enumeration and cost estimates for Proposition 4.2. https://github.com/sigact-stoc/stoc2027/releases/download/papers-1/814.pdf

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