Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Finite-domain clique factors, exact-count witnesses, and treewidth promises

Definition
StableMSR_Recovery_Supplement_CliqueFactors

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

algorithmsclustering

A selection supplies one domain value per variable. Locality is invariance under agreement on the named scope. Each factor emits a list, and witnesses retain their exact total count and additive cost.

Definition code
import Definitions.Def_StableMSR_Recovery_Supplement_RegionalTables
import Definitions.Def_RobertsonSeymour1986_GM5_TreewidthLE
set_option autoImplicit false
namespace StableMSR.Recovery.Supplement.BinaryRecovery.Regional
abbrev Value := List BallCode
abbrev Plan := List Value
def pickValue (vs : Block) (s : Plan) (v : ℕ) : Value := s[vs.idxOf v]?.getD []
def AllowedPlan (vs : Block) (ds : List Value) (s : Plan) : Prop :=
  ∀ v∈vs, pickValue vs s v∈ds
def DependsOn (vs scope : Block) (emit : Plan→Pack) : Prop :=
  ∀ s u, (∀ v∈scope,pickValue vs s v=pickValue vs u v) → emit s=emit u
def ScopeWidth (vs : Block) (scopes : List Block) (t : ℕ) : Prop :=
  ∃ (X : Type) (_ : Fintype X) (_ : DecidableEq X) (g : SimpleGraph X) (name : X→ℕ),
    Function.Injective name ∧ (∀v, v∈vs ↔ ∃x, name x=v) ∧
    RobertsonSeymour1986.GM5.TreewidthLE g t ∧ ∀ s∈scopes,
      (∀v∈s,v∈vs) ∧ ∀x y, name x∈s → name y∈s → x≠y → g.Adj x y
def renderFactors (ids : Block) (emit : ℕ→Plan→Pack) (s : Plan) : Pack :=
  ids.flatMap (fun j => emit j s)
def packCost (cost : Block→ℚ) (p : Pack) := (p.map cost).sum
def FactorRow (vs : Block) (ds : List Value) (build : Plan→Pack) (cost : Block→ℚ) (row : Table) : Prop :=
  (∀ p∈row, ∃ s, AllowedPlan vs ds s ∧ build s=p) ∧
  ∀ s, AllowedPlan vs ds s → ∃ p∈row, p.length=(build s).length ∧ packCost cost p≤packCost cost (build s)
end StableMSR.Recovery.Supplement.BinaryRecovery.Regional
Source
Finite-domain bounded-treewidth optimization with exact cardinalities and witnesses. See Ravichandran and Reyzin, Appendix A.6 (https://arxiv.org/abs/2611.03547) and Freuder, Complexity of k-tree structured constraint satisfaction problems, AAAI 1990.

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