Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Field-operation execution and truncated-ring input/output interfaces

Definition
OddPermSum_Evaluation_Supplement_ringAlgorithmInterfaces

by mikedeng1 · Nov 15, 2026 · Mathlib 0df444a (Lean v4.33.1)

algebracomplexity-theorylinear-algebrap2o-batch-stoc27sp2o-gran-per-chapterp2o-plan-paperp2o-v1

Truncated-ring computation is expressed using the published finite algebraic programs over the coefficient field FFF. Integer control cannot read a field value except through a charged zero test; field operations and tests contribute to the actual interpreter cost. The dimension sss and index registers initially containing LLL and iii provide integer parameters. Input/output lists contain only the specified coefficient encodings.

The four-output interface encodes A−1A^{-1}A−1, det⁡A\det AdetA, Φ(A)\Phi(A)Φ(A) and the full transposed gradient. The row-update interface receives A,B,Δ,Φ(A),ρA,B,\Delta,\Phi(A),\rhoA,B,Δ,Φ(A),ρ and returns the queried gradient column, updated value and determinant, and the updated inverse when η\etaη is a unit. This treats the stored quantities as input rather than recomputing them for free.

Execution, its charged cost and the mathematical output specification are independent definitions.

Definition code
import Definitions.Def_OddPermSum_Evaluation_Supplement_truncatedRing
import Definitions.Def_OddPermSum_Evaluation_Supplement_rowUpdate
import Definitions.Def_OddPermSum_Evaluation_gradient
import Definitions.Def_OddPermSum_Evaluation_machineExecution

set_option autoImplicit false

namespace OddPermSum.Evaluation.Supplement

noncomputable def allRingOutputs {F : Type*} [Field F] {s L : ℕ}
    (A : Matrix (Fin s) (Fin s) (Trunc F L)) : List F :=
  truncMatrixEncoding A⁻¹ ++ truncEncoding A.det ++ truncEncoding (phi A) ++
    truncMatrixEncoding (gradient A)

noncomputable def updateInputs {F : Type*} [Field F] {s L : ℕ}
    (A B : Matrix (Fin s) (Fin s) (Trunc F L)) (δ φA : Trunc F L)
    (ρ : Fin s → Trunc F L) : List F :=
  truncMatrixEncoding A ++ truncMatrixEncoding B ++
    truncEncoding δ ++ truncEncoding φA ++ (List.ofFn ρ).flatMap truncEncoding

/-- i, L and s are integer parameters placed in index memory; never converted out of field data. -/
noncomputable def runParameters {F : Type*} [Field F] (p : AlgebraicProgram F)
    (s L i : ℕ) (inputs : List F) (fuel : ℕ) : Option (MachineState F) := by
  classical
  exact execute s inputs fuel p {
    indices := fun a => if a = 0 then L else if a = 1 then i else 0
    registers := fun _ => 0
    outputs := []
    arithmetic := 0
    tests := 0 }

noncomputable def updateOutputs {F : Type*} [Field F] {s L : ℕ}
    (A : Matrix (Fin s) (Fin s) (Trunc F L)) (i : Fin s) (ρ : Fin s → Trunc F L) : List F := by
  classical
  let A' := rowUpdate A i ρ
  exact (List.ofFn (fun j => gradient A j i)).flatMap truncEncoding ++
    truncEncoding (phi A') ++ truncEncoding A'.det ++
    if IsUnit (updateEta A⁻¹ i ρ) then truncMatrixEncoding A'⁻¹ else []

end OddPermSum.Evaluation.Supplement
Source
Boxuan Chen, Bin Cui, Hanqing Li, Xupeng Miao, Haoze Wang, STOC 2027 submission #716 (October 2026), p. 14–15, Lemma 5.3; 20–21, Lemma 6.3

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