Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

List encoding of tree decompositions for factor graphs

Definition
StableMSR_Recovery_Supplement_FactorLayouts

by lreyzin · Nov 20, 2026 · Mathlib 0df444a (Lean v4.33.1)

algorithmsclustering

A layout gives the variable names and neighboring node indices of each bag. Its correctness predicate certifies a native tree decomposition and bounds every bag size.

Definition code
import Definitions.Def_StableMSR_Recovery_Supplement_ScopeGraph
set_option autoImplicit false
namespace StableMSR.Recovery.Supplement.BinaryRecovery.Regional
abbrev FactorLayout := List (Block × Block)
def layoutTree (L : FactorLayout) : SimpleGraph (Fin L.length) where
  Adj i j := i≠j ∧ (j.val∈L[i].2 ∨ i.val∈L[j].2)
  symm := ⟨fun _ _ h => ⟨h.1.symm,h.2.symm⟩⟩
  loopless := ⟨fun _ h=>h.1 rfl⟩
def layoutBag (vs : Block) (L : FactorLayout) (i : Fin L.length) : Finset (↥vs.toFinset) :=
  Finset.univ.filter (fun v=>v.val∈L[i].1)
def GoodLayout (vs : Block) (scopes : List Block) (t : ℕ) (L : FactorLayout) : Prop :=
  RobertsonSeymour1986.GM5.IsTreeDecomposition (scopeGraph vs scopes) (layoutTree L) (layoutBag vs L) ∧
    ∀ i, (layoutBag vs L i).card≤t+1
end StableMSR.Recovery.Supplement.BinaryRecovery.Regional
Source
Binary encoding for the bounded-width factor dynamic program.

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