Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Round trips for rational MSR instances, partitions, thresholds, and instability witnesses

Proved
StableMSR.Recovery.Supplement.rational_codec_roundtrips

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

Encoding a rational MSR input and decoding it recovers the exact input. The same holds for inputs with supplied labels, inputs with a stability factor and labels, threshold instances, and rational instability witnesses. Each rational table has the declared square length and each label vector has one entry per point. The result applies to every signed rational entry, independently of whether the entries define a metric.

Preamble
import Definitions.Def_StableMSR_Recovery_Supplement_Languages

set_option autoImplicit false
Formal statement
namespace StableMSR.Recovery.Supplement

theorem rational_codec_roundtrips :
    (∀ I : RationalInput, I.table.length = I.n * I.n →
      decodeInput (encodeInput I) = some I) ∧
    (∀ S : SpecifiedInput, S.input.table.length = S.input.n * S.input.n →
      S.labels.length = S.input.n → decodeSpecified (encodeSpecified S) = some S ∧
      ∀ γ, decodeInstabilityInput (encodeInstabilityInput γ S) = some (γ,S)) ∧
    (∀ T : ThresholdInput, T.input.table.length = T.input.n * T.input.n →
      decodeThreshold (encodeThreshold T) = some T) ∧
    (∀ (n : ℕ) (W : RationalWitness), W.table.length = n*n → W.labels.length = n →
      decodeWitness n (packNats (W.table.flatMap ratNumbers ++ W.labels)) = some W) := by sorry

end StableMSR.Recovery.Supplement
Source
Encoding lemma for the mission's StableMSR_Recovery_Supplement_BinaryEncoding and StableMSR_Recovery_Supplement_Languages modules, supporting the rational inputs and certificates of Ravichandran and Reyzin, arXiv:2611.03547, Theorem 5.1 and Appendix C.

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