Peano arithmetic is enough, because Peano arithmetic encodes computation

math.stackexchange.com

228 points by btilly 2 days ago


btilly - 2 days ago

This is a stack overflow question that I turned into a blog post.

It covers both the limits of what can be proven in the Peano Axioms, and how one would begin bootstrapping Lisp in the Peano Axioms. All of the bad jokes are in the second section.

Corrections and follow-up questions are welcome.

dooglius - 2 days ago

The interesting part to me (I have a background in both math+programming) isn't so much the encoding of computation but that one can work around the independence of goodstein's theorem in this self-referential way. I think this implies that PA+"PA is omega-consistent" can prove goodstein's theorem, and perhaps can more generally do transfinite induction up to epsilon_0? EDIT: I think just PA+"PA is consistent" is enough?

Animats - 17 hours ago

This is very like Boyer-Moore theory[1], which builds up mathematics from the Peano axiom level.

Boyer and Moore wrote an automated theorem prover that goes with this theory. I have a working copy for GNU Common LISP at [2].

"It is perhaps easiest to think of our program much as one would think of a reasonably good mathematics student: given the axioms of Peano, he could hardly be expected to prove (much less discover) the prime factorization theorem. However, he could cope quite well if given the axioms of Peano and a list of theorems to prove (e.g., “prove that addition is commutative,” . . . “prove that multiplication distributes over addition,” . . . “prove that the result returned by the GCD function divides both of its arguments,” . . . “prove that if the products over two sequences of primes are identical, then the two sequences are permutations of one another”)." - Boyer and Moore

[1] https://www.cs.utexas.edu/~boyer/acl.pdf

[2] https://github.com/John-Nagle/nqthm/tree/master

dwohnitmok - 19 hours ago

Your comment to JoJoModding in Math Stackexchange is incorrect.

"That's because there are nonstandard models of PA which contain infinite natural numbers. So PA may be able to prove that it produces a proof, but can't prove that the proof is of finite length. And therefore it might not be a valid proof."

If PA proves "PA proves X" then PA can prove X. This is because the key observation is not that there are nonstandard models, but rather that the standard natural numbers model PA.

Therefore if PA proves "PA proves X", then there is in fact a standard, finite natural number that corresponds to the encoded proof of "PA proves X". That finite natural number can be used then to construct a proof of X in PA.

gsf_emergency_2 - a day ago

https://math.stackexchange.com/questions/4408124/what-does-t...

gugagore - a day ago

I was talking to someone about inductive data types, and showed them the zero/succ definition of `Nat`, e.g. in Lean or Rocq.

It was interesting because they were asking "is this all you need? What about the Peano axioms? Is there anything more primitive than the inductive data type?"

I bring it up because it's good not to take for granted that the Peano axioms are inherent, instead of just one design among many.

cryptonector - 19 hours ago

Pure lambda calculus is enough because lambda calculus encodes computation.

atsmyles - a day ago

Related to PA consistency, it can be proven in PA. https://youtu.be/6pjLmmkZnIA

petters - a day ago

This topic has 123 points, but the linked post on SO only has 11 upvotes.

RossBencina - a day ago

But is computation enough? The computable reals are a subset of the reals.

unit149 - 20 hours ago

[dead]

zozbot234 - a day ago

Given my former experiences with encoding type-level computation in Haskell and Rust, I'd kinda rephrase that statement in the title, and say "peano arithmetic is enough, if you only ever need to go up to 88." https://upload.wikimedia.org/wikipedia/commons/b/bd/D274.jpg