Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Guard the complete native metric-rounding execution

Proved
Lax455465Proofs.RamRoundingBudget.command_spec_native

by Shuze Chen · Nov 18, 2026 · Mathlib 0df444a (Lean v4.33.1)

algorithmscomputational-complexitygraph-theory

Let III be a valid rational flow instance with at least two supported endpoints and ddd a stored metric satisfying the source's separation and shortest-distance conditions. Suppose the rational data and metric meet the specified height bounds, the host width meets the uniform rounding bound, and all source, metric, region and cut buffers satisfy their full input predicate. The fixed rounding command returns its complete cut output within the explicit uniform instruction bound:

Spec⁡2W(Input⁡I,d,round⁡,Output⁡I,d,T).\operatorname{Spec}_{2^W}(\operatorname{Input}_{I,d},\operatorname{round},\operatorname{Output}_{I,d},T).Spec2W​(InputI,d​,round,OutputI,d​,T).

The source output predicate includes admissibility, the flow-or-cut ratio guarantee and exact stored membership flags; all intermediate radius and potential guards are derived from the input bounds.

Preamble
import Definitions.Def_EdgeSublinearMWIS_Main_NativeBlockInterfaces
namespace Lax455465Proofs.RamRoundingBudget
end Lax455465Proofs.RamRoundingBudget
Formal statement
theorem Lax455465Proofs.RamRoundingBudget.command_spec_native : ∀ (W w : Nat) {n : Nat} (I : Lax455465.RationalEncoding.RationalInstance n) (d : Lax455465Proofs.MetricMatrix.Matrix n),
  @LE.le Nat instLENat
      (@HAdd.hAdd Nat Nat Nat (@instHAdd Nat instAddNat)
        (@HMul.hMul Nat Nat Nat (@instHMul Nat instMulNat) (@OfNat.ofNat Nat (nat_lit 2) (instOfNatNat (nat_lit 2))) n)
        (@OfNat.ofNat Nat (nat_lit 4) (instOfNatNat (nat_lit 4))))
      w →
    @LE.le Nat instLENat (Lax455465Proofs.RamRoundingBudget.width n w) W →
      (∀ (v : Fin n),
          Lax455465Proofs.LpInputSize.Height
            (@HPow.hPow Nat Nat Nat (@instHPow Nat Nat (@NPow.toPow Nat (@Monoid.toNPow Nat Nat.instMonoid)))
              (@OfNat.ofNat Nat (nat_lit 2) (instOfNatNat (nat_lit 2))) w)
            (@NNRat.cast Rat Rat.instNNRatCast (@Lax455465.RationalEncoding.RationalInstance.weight n I v))) →
        (∀ (u v : Fin n),
            Lax455465Proofs.LpInputSize.Height
              (@HPow.hPow Nat Nat Nat (@instHPow Nat Nat (@NPow.toPow Nat (@Monoid.toNPow Nat Nat.instMonoid)))
                (@OfNat.ofNat Nat (nat_lit 2) (instOfNatNat (nat_lit 2))) w)
              (@NNRat.cast Rat Rat.instNNRatCast (@Lax455465.RationalEncoding.RationalInstance.capacity n I u v))) →
          (∀ (u v : Fin n),
              Lax455465Proofs.LpInputSize.Height
                (@HPow.hPow Nat Nat Nat (@instHPow Nat Nat (@NPow.toPow Nat (@Monoid.toNPow Nat Nat.instMonoid)))
                  (@OfNat.ofNat Nat (nat_lit 2) (instOfNatNat (nat_lit 2))) w)
                (@NNRat.cast Rat Rat.instNNRatCast (d u v))) →
            Lax455465Proofs.LpInputSize.Height
                (@HPow.hPow Nat Nat Nat (@instHPow Nat Nat (@NPow.toPow Nat (@Monoid.toNPow Nat Nat.instMonoid)))
                  (@OfNat.ofNat Nat (nat_lit 2) (instOfNatNat (nat_lit 2))) w)
                (@NNRat.cast Rat Rat.instNNRatCast (@Lax455465Proofs.MetricCostData.cost n I d)) →
              (∀ (i : Nat),
                  Lax455465Proofs.LpInputSize.Height
                    (@HPow.hPow Nat Nat Nat (@instHPow Nat Nat (@NPow.toPow Nat (@Monoid.toNPow Nat Nat.instMonoid)))
                      (@OfNat.ofNat Nat (nat_lit 2) (instOfNatNat (nat_lit 2))) w)
                    (@NNRat.cast Rat Rat.instNNRatCast
                      (@List.sum NNRat
                        (@Distrib.toAdd NNRat
                          (@instDistribOfSemiring NNRat
                            (@DivisionSemiring.toSemiring NNRat
                              (@Semifield.toDivisionSemiring NNRat NNRat.instSemifield))))
                        (@MulZeroClass.toZero NNRat
                          (@instMulZeroClassOfSemiring NNRat
                            (@DivisionSemiring.toSemiring NNRat
                              (@Semifield.toDivisionSemiring NNRat NNRat.instSemifield))))
                        (@List.take NNRat i
                          (@List.ofFn NNRat n (@Lax455465.RationalEncoding.RationalInstance.weight n I)))))) →
                @LT.lt Nat instLTNat (@OfNat.ofNat Nat (nat_lit 0) (instOfNatNat (nat_lit 0)))
                    (@Lax455465Proofs.RamRoundingInit.support n
                      (@Lax455465.RationalEncoding.RationalInstance.weight n I)) →
                  @LT.lt Rat Rat.instLT (@OfNat.ofNat Rat (nat_lit 0) (@Rat.instOfNat (nat_lit 0)))
                      (@Lax455465Proofs.LargeBallRounding.total n I) →
                    (∀ (v : Fin n),
                        @Eq NNRat (d v v)
                          (@OfNat.ofNat NNRat (nat_lit 0)
                            (@Zero.toOfNat0 NNRat
                              (@MulZeroClass.toZero NNRat
                                (@instMulZeroClassOfSemiring NNRat
                                  (@DivisionSemiring.toSemiring NNRat
                                    (@Semifield.toDivisionSemiring NNRat NNRat.instSemifield))))))) →
                      (∀ (u v t : Fin n),
                          @LE.le Rat Rat.instLE (@NNRat.cast Rat Rat.instNNRatCast (d u t))
                            (@HAdd.hAdd Rat Rat Rat (@instHAdd Rat Rat.instAdd)
                              (@NNRat.cast Rat Rat.instNNRatCast (d u v))
                              (@NNRat.cast Rat Rat.instNNRatCast (d v t)))) →
                        @LE.le Rat Rat.instLE (@OfNat.ofNat Rat (nat_lit 1) (@Rat.instOfNat (nat_lit 1)))
                            (@Lax455465Proofs.LargeBallRounding.distanceSeparation n I
                              (@Lax455465Proofs.MetricMatrix.rational n d)) →
                          Lax808846Proofs.Reasoning.Spec
                            (@HPow.hPow Nat Nat Nat
                              (@instHPow Nat Nat (@NPow.toPow Nat (@Monoid.toNPow Nat Nat.instMonoid)))
                              (@OfNat.ofNat Nat (nat_lit 2) (instOfNatNat (nat_lit 2))) W)
                            (fun (σ : Lax808846Proofs.Imp.Env) =>
                              And (@Lax455465Proofs.RamMetricRounding.Input n I d σ)
                                (And
                                  (Lax455465Proofs.RamRegionInvariant.Room n
                                    (@Lax455465Proofs.RamRoundingInit.support n
                                      (@Lax455465.RationalEncoding.RationalInstance.weight n I))
                                    σ)
                                  (Lax455465Proofs.RamRegionCut.Room n σ)))
                            Lax455465Proofs.RamMetricRounding.command
                            (fun (x τ : Lax808846Proofs.Imp.Env) =>
                              @Lax455465Proofs.RamRegionCut.Output n I d
                                (@Lax455465Proofs.RamRoundingInit.support n
                                  (@Lax455465.RationalEncoding.RationalInstance.weight n I))
                                τ)
                            (Lax455465Proofs.RamRoundingBudget.cost n
                              (@Lax455465Proofs.RamRoundingInit.support n
                                (@Lax455465.RationalEncoding.RationalInstance.weight n I))
                              w
                              (@Lax455465Proofs.RamRoundingInit.total n
                                (@Lax455465.RationalEncoding.RationalInstance.weight n I))) := by sorry
Source
https://github.com/EdouardBonnet/lax-455465/blob/9988b9c5399185cfb3ca2129ca7c807fd80c2885/proofs/Lax455465Proofs/RamRoundingBudget.lean, theorem Lax455465Proofs.RamRoundingBudget.command_spec, line 47

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