Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Signed Integer Addition Is Primitive Recursive

Proved
Monodromy.IntegerPrimrec.add

by Xiaoyang Liu · Nov 5, 2026 · Mathlib 0df444a (Lean v4.33.1)

computabilitycovering-spacesmonodromy-computation

The binary function (x,y)↦x+y(x,y)\mapsto x+y(x,y)↦x+y on ℤ×ℤ is primitive recursive with respect to Mathlib’s canonical encodings of signed integers. There is no sign or magnitude restriction on either input.

Original proof dependencies: Monodromy.IntegerPrimrec.cases, Monodromy.IntegerPrimrec.difference, Monodromy.IntegerPrimrec.difference_eq, Monodromy.IntegerPrimrec.difference_primrec, Monodromy.IntegerPrimrec.negSucc, Monodromy.IntegerPrimrec.ofNat, Monodromy.IntegerPrimrec.split.

Proof elaboration dependencies: Monodromy.IntegerPrimrec.cases, Monodromy.IntegerPrimrec.difference, Monodromy.IntegerPrimrec.difference_eq, Monodromy.IntegerPrimrec.difference_primrec, Monodromy.IntegerPrimrec.negSucc, Monodromy.IntegerPrimrec.ofNat, Monodromy.IntegerPrimrec.split.

Preamble
module
public import Definitions.Def_Monodromy_IntegerPrimrec
public import Mathlib.Computability.Primrec.Basic
public import Mathlib.Data.Int.ModEq
public import Mathlib.Tactic.Ring

@[expose] public section

open Monodromy
open Monodromy.IntegerPrimrec

Formal statement
theorem Monodromy.IntegerPrimrec.add : Primrec₂ ((· + ·) : ℤ → ℤ → ℤ) := by sorry
Source
Authoritative local working-tree snapshot SHA-256 e03ce2d08e07ee663140bec213fb21e995f44153a3c556c908fcf1c8d6fefe6c; repository https://github.com/ERHUTUZI123/monodromy. The remote Git base is incomplete and is not asserted to contain these declarations. src/Monodromy/IntegerPrimrec.lean (file SHA-256 6dc5f3bfec05f346981b78d5c7c30dc668be696591a8e9fbc305500db06e6ae3): Monodromy.IntegerPrimrec.add at L53-L81 [UTF-8 2073:3706].
Read-back

What the Lean code literally says, in plain math · OpenAI Codex (independent agent)

The total binary function Z×Z→Z\mathbb Z\times\mathbb Z\to\mathbb ZZ×Z→Z sending (x,y)(x,y)(x,y) to x+yx+yx+y is primitive recursive in Mathlib's standard encodings of integers and pairs by natural numbers. This is a statement about the entire signed-integer addition function, with no hypotheses restricting either argument, so zero and negative inputs are included; the primitive-recursive claim concerns a total encoded computation and makes no assertion about geometric continuation or a particular compiled program.

Human review
  • Endorsed by marwahaha · Nov 6, 2026

  • Endorsed by Xiaoyang Liu · Nov 6, 2026

    Confirmed by the mission captain (proposal self-audit).

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