Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Complete assemblies of partial tree-label witnesses

Definition
StableMSR_Recovery_Supplement_MenuAssembly

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

algorithmsclustering

An active node contributes one legal local state and a word from that state’s message. Active states must be mutually compatible. The multiset sum of their words, including the empty-root accumulator, records the full witness independently of the contraction order.

Definition code
import Definitions.Def_StableMSR_Recovery_Supplement_TreeMenuMessages
set_option autoImplicit false
namespace StableMSR.Recovery.Supplement.BinaryRecovery.Regional.MenuTree
def active (I : Instance) (xs : Block) := xs++[I.1.length]
def summands (xs : Block) (w : ℕ→Word) : Multiset Key :=
  (xs.map (fun i => (w i : Multiset Key))).sum
def mass (I : Instance) (m : Multiset Key) : ℕ×ℚ :=
  (m.map (fun k => ((evaluate I k).1.length,(evaluate I k).2))).sum
def canonical (I : Instance) (x : Block) : Word :=
  (List.range I.1.length).map (fun i => (i,num x i))
def Assembly (I : Instance) (xs : Block) (R : Key→List Word) (m : Multiset Key) : Prop :=
  ∃ (s : ℕ→ℕ) (w : ℕ→Word),
    (∀i∈active I xs,s i∈choicesAt I i ∧ w i∈R (i,s i)) ∧
    (∀i∈active I xs, ∀j∈active I xs,joinable I (i,s i) (j,s j)=true) ∧
    m=summands (active I xs) w
def RepresentsOptima (I : Instance) (P : Multiset Key→Prop) : Prop :=
  (∀m,P m → ∃x,Legal I x ∧ m=(canonical I x : Multiset Key)) ∧
  ∀x,Legal I x → ∃m,P m ∧ (mass I m).1=(total I x).1 ∧ (mass I m).2≤(total I x).2
end StableMSR.Recovery.Supplement.BinaryRecovery.Regional.MenuTree
Source
Invariant for exact-count leaf-message fusion, Appendix A.6 of arXiv:2611.03547.

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