Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Lemma 3.4 — canonical 2-tree inversion

Proved
CountingLLL.DetCount.lemma_3_4

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

approximate-countingconstraint-satisfactionlovasz-local-lemmap2o-batch-stoc27ap2o-gran-per-chapterp2o-plan-paperp2o-strengthenedp2o-v1

Let E\mathcal EE be a constraint set of a CSP formula and c0∈Ec_0\in\mathcal Ec0​∈E. For every T∈TE,c0T\in\mathfrak T_{\mathcal E,c_0}T∈TE,c0​​,

{D⊆E∣c0∈D, Tree(D)=T}={S∪T∣S⊆free(T)},\{\mathcal D\subseteq\mathcal E\mid c_0\in\mathcal D,\ \mathrm{Tree}(\mathcal D)=T\}=\{S\cup T\mid S\subseteq\mathrm{free}(T)\},{D⊆E∣c0​∈D, Tree(D)=T}={S∪T∣S⊆free(T)},

where free(T)=E∖(T∪R(T))\mathrm{free}(T)=\mathcal E\setminus(T\cup R(T))free(T)=E∖(T∪R(T)) and R(T)R(T)R(T) is the final rejected set of Algorithm 1 on input TTT.

The free constraints are exactly the degrees of freedom of the preimage of TTT; this is the combinatorial core of the 2-tree expansion.

Differences from the source:

  • encoding: a constraint set C (vertex set of G(C)) → a subfamily E of the constraint indices Fin m of a formula Φ; G(E) lives on Fin m with the constraints outside E isolated; reason: every constraint set is the full family of some formula; walks between members of E stay inside E
  • encoding: an arbitrary fixed ordering of the constraints (lowest index in Algorithm 1) → the order of the index type Fin m; reason: the index order is an arbitrary fixed ordering; every ordering arises by relabelling the constraints
  • encoding: finite variables V and finite domains Q_v → V = Fin n and Q_v = Fin (q v), with q v ≥ 2; reason: every finite source variable space is relabelled bijectively; no constraint function or scope is restricted
  • generalization: a finite set of constraints C → constraints indexed by Fin m, permitting equal scopes and predicates at different indices; reason: enumerating a source constraint set gives an instance with distinct indices; allowing repetitions preserves that full source case
Preamble
import Definitions.Def_CountingLLL_DetCount_Expansion

set_option autoImplicit false
Formal statement
namespace CountingLLL.DetCount

open CSP

/-- Lemma 3.4 (Canonical 2-tree inversion): for a constraint set `E`, `c₀ ∈ E` and every
`T ∈ 𝔗_{E,c₀}`, `{D ⊆ E | c₀ ∈ D, Tree(D) = T} = {S ∪ T | S ⊆ free(T)}`. -/
theorem lemma_3_4 (Φ : CSP) (E : Finset (Fin Φ.m)) (c₀ : Fin Φ.m) (hc₀ : c₀ ∈ E)
    (T : Finset (Fin Φ.m)) (hT : T ∈ Φ.twoTrees E c₀) :
    {D : Finset (Fin Φ.m) | D ⊆ E ∧ c₀ ∈ D ∧ Φ.Tree E c₀ D = T} =
      {D : Finset (Fin Φ.m) | ∃ S ⊆ Φ.free E c₀ T, D = S ∪ T} := by sorry

end CountingLLL.DetCount
Source
Hongyang Liu, Chunyang Wang, Yitong Yin, Yiyao Zhang, Can Zhou, A Counting and Sampling Lovász Local Lemma, STOC 2027 submission #442 (October 2026), Lemma 3.4, PDF p. 10 (printed p. 9); https://github.com/sigact-stoc/stoc2027/releases/download/papers-1/442.pdf
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