Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

One-coordinate update of the partial zeta transform

Proved
ThreeSum.Subset.partialZeta_insert

by wurtle · Oct 14, 2026 · Mathlib 0df444a (Lean v4.33.1)

3sumalgorithmsfine-grained-complexitythree-sum-1962word-ram

Let α\alphaα be a type with decidable equality, let fff assign an integer to each finite subset of α\alphaα, and let u,Pu,Pu,P be finite subsets. Write ZPf(u)=∑X⊆u∩Pf((u∖P)∪X)Z_Pf(u)=\sum_{X\subseteq u\cap P}f((u\setminus P)\cup X)ZP​f(u)=∑X⊆u∩P​f((u∖P)∪X). For a coordinate a∉Pa\notin Pa∈/P,

ZP∪{a}f(u)={ZPf(u)+ZPf(u∖{a})a∈u,ZPf(u)a∉u.Z_{P\cup\{a\}}f(u)=\begin{cases}Z_Pf(u)+Z_Pf(u\setminus\{a\})&a\in u,\\Z_Pf(u)&a\notin u.\end{cases}ZP∪{a}​f(u)={ZP​f(u)+ZP​f(u∖{a})ZP​f(u)​a∈u,a∈/u.​

This is the exact invariant for one ordinary coordinatewise zeta-transform step, with both summands read from the previous stage.

Preamble
import Aesop
import Definitions.Def_ThreeSum1962Source_Bundle01
import Lean.Elab.Tactic.Omega
import Mathlib.Algebra.BigOperators.Group.Finset.Powerset
import Mathlib.Algebra.BigOperators.Group.Finset.Sigma
import Mathlib.Algebra.BigOperators.Ring.Finset
import Mathlib.Algebra.Order.BigOperators.Group.Finset
import Mathlib.Data.Finset.Card
import Mathlib.Tactic.ByContra
import Mathlib.Tactic.Ring
import Mathlib.Tactic.SplitIfs


set_option autoImplicit false
set_option relaxedAutoImplicit false
set_option Elab.async false

universe u_1
Formal statement
theorem ThreeSum.Subset.partialZeta_insert : ∀ {α : Type u_1} [inst : DecidableEq.{u_1 + 1} α] (f : Finset.{u_1} α → Int) (u processed : Finset.{u_1} α) (a : α)
  (ha : a ∉ processed),
  @Eq.{1} Int
    (@ThreeSum.Subset.partialZeta.{u_1} α inst
      (@Insert.insert.{u_1, u_1} α (Finset.{u_1} α) (@Finset.instInsert.{u_1} α inst) a processed) f u)
    (@ThreeSum.Subset.zetaStep.{u_1} α inst a (@ThreeSum.Subset.partialZeta.{u_1} α inst processed f) u) := by
  sorry
Source
https://github.com/c0ldzy17/three-sum-lean/blob/2b639655e07421b9ac743de9090459bab473a7c0/Submission/ThreeSum/Subset.lean#L300-L346

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