Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Evaluation commutes with a finite weighted coefficient sum

Proved
CollatzWork.YAH.evalCoefficients_weightedCoefficient

by Sodelin · Sep 8, 2026 · Mathlib 0df444a (Lean v4.33.1)

collatz-work-import

Let MMM be an integer module, FFF a finite list of features of any type φ\varphiφ, w:φ→Mw:\varphi\to Mw:φ→M, CCC a finite list of pairs (a,r)∈N×ρ(a,r)\in\mathbb N\times\rho(a,r)∈N×ρ, and δ:ρ×φ→Z\delta:\rho\times\varphi\to\mathbb Zδ:ρ×φ→Z. Integer scalar multiplication in MMM is denoted by juxtaposition. Then

∑e∈F(∑(a,r)∈Ca δ(r,e))w(e)=∑(a,r)∈Ca(∑e∈Fδ(r,e)w(e)).\sum_{e\in F}\left(\sum_{(a,r)\in C}a\,\delta(r,e)\right)w(e)=\sum_{(a,r)\in C}a\left(\sum_{e\in F}\delta(r,e)w(e)\right).e∈F∑​​(a,r)∈C∑​aδ(r,e)​w(e)=(a,r)∈C∑​a(e∈F∑​δ(r,e)w(e)).

Both sums retain duplicate list entries. This algebraic identity transfers a coefficient-level certificate to a weighted sum of evaluated row gaps; it requires no order assumptions.

Preamble
import Std
import Init.Grind.Ordered.Module
import Definitions.Def_CollatzWork_YAHFiniteObstructionStatement

universe u

open Lean.Grind
open Lean.Grind.AddCommMonoid
open Lean.Grind.IntModule
variable {M : Type u} [IntModule M]

Formal statement
theorem CollatzWork.YAH.evalCoefficients_weightedCoefficient {φ : Type _} {ρ : Type _}
    (features : List φ) (weight : φ → M)
    (certificate : List (Nat × ρ)) (delta : ρ → φ → Int) :
    evalCoefficients features weight
        (weightedCoefficient certificate delta) =
      weightedGapSum certificate
        (fun row => evalCoefficients features weight (delta row)) := by sorry

Source
https://github.com/Sodelin/Collatz-Conjecture-Work/blob/026aa4ad4be6453a005ab950b160a9f2204c5271/lean/CollatzWork/YAHFiniteObstruction.lean#L171-L190

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