16 ms·
Peano arithmetic is enough, because Peano arithmetic encodes computation
- btilly 1y agoThis 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.
- ikrima 1y agoHey! This is fantastic and actually ties in some very high disparate parts of math. Basically, reorient & reformulate all of math/epistomology around discrete sampling the continuum. Invert our notions of Aleph/Beth/Betti numbers as some sort of triadic Grothendieck topoi that encode our human brain's sensory instruments that nucleate discrete samples of continuum of reality (ontology) Then every modal logic becomes some mapping of 2^(N) to some set of statements. The only thing that matters is how predictive they are with some sort of objective function/metric/measure but you can always induce an "ultra metric" around notions of cognitive complexity classes i.e. your brain is finite and can compute finite thoughts/second. Thus for all cognition models that compute some meta-logic around some objective F, we can motivate that less complex models are "better". There comes the ultra measure to tie disparate logic systems. So I can take your Peano Axioms and induce a ternary logic (True, False, Maybe) or an indefinite-definite logic (True or something else entirely). I can even induce bayesian logics by doing power sets of T/F. So a 2x2 bayesian inference logic: (True Positive, True Negative, False Positive, False Negative) Fun stuff! Edit: The technical tldr that I left out is unification all math imho: algebraic topology + differential geometry + tropical geometry + algebraic analysis. D-modules and Microlocal Calculus from Kashiwara and the Yoneda lemma encode all of epistemology as relational: either between objects or the interaction between objects defined as collision less Planck hyper volumes. basically encodes the particle-wave duality as discrete-continuum and all of epistemology is Grothendieck topoi + derived categories + functorial spaces between isometry of those dual spaces whether algebras/coalgebra (discrete modality) or homologies/cohomologies (continuous actions) Edit 2: The thing that ties everything together is Noether's symmetry/conserved quantities which (my own wild ass hunch) are best encoded as "modular forms", arithmetic's final mystery. The continuous symmetry I think makes it easy to think about diffeomorphisms from different topoi by extracting homeomorphisms from gauge invariant symmetries (in the discrete case it's a lattice, but in the continuous we'd have to formalize some notion of liquid or fluid bases? I think Kashiwara's crystal bases has some utility there but this is so beyond my understanding )
- ricardobeat 1y ago> Invert our notions of Aleph/Beth/Betti numbers as some sort of triadic Grothendieck topoi that encode our human brain's sensory instruments that nucleate discrete samples of continuum of reality (ontology) There’s probably ten+ years of math education encoded in this single sentence?
- ikrima 1y agowell, you're in luck because I'm about to make a fool of myself in trying to tease Terence Tao over at https://mathstodon.xyz/@mathemagical https://mathstodon.xyz/@mathemagical Wish me luck!
- ikrima 1y agoyou know what, I nerd sniped myself, here's a more fleshed out sketch of the [Discrete Continuum Bridge https://github.com/ikrima/topos.noether/blob/master/discrete-continuum-homoiconic-bridge.md#discrete-continuum-bridge https://github.com/ikrima/topos.noether/blob/master/discrete...
- bobsh 1y agoThere are others out here thinking along similar lines (in my case, with massive help from LLMs). Proof: https://claude.ai/share/a8128fde-ea47-4dd8-a284-16a1fd76240c https://claude.ai/share/a8128fde-ea47-4dd8-a284-16a1fd76240c . Also, I have a GitHub too: https://github.com/bobshafer/PITkit/blob/main/Links.md https://github.com/bobshafer/PITkit/blob/main/Links.md
- gjm11 1y agoIt seems to be entirely written by an LLM. [EDITED to add:] This is worth noting because today's LLMs really don't seem to understand mathematics very well. (This may be becoming less so with e.g. o3-pro and o4, but I'm pretty sure that document was not written by either of those.) They're not bad at pushing mathematical words around in plausible-looking ways; they can often solve fairly routine mathematical problems, even ones that aren't easy for humans who unlike the LLMs haven't read every bit of mathematical writing produced to date by the human race; but they don't really understand what they're doing, and the nature of the mistakes they make shows that. (For the avoidance of doubt, I am not making the tired argument that of course LLMs don't understand anything, they're just pattern-matching, something something stochastic parrots something. So far as I can tell it's perfectly possible that better LLMs, or other near-future AI systems that have a lot in common with LLMs or are mostly built out of LLMs, will be as good at mathematics as the best humans are. I'm just pretty sure that they're still some way off.) (In particular, if you want to say "humans also don't really understand mathematics, they just push words and symbols around, and some have got very good at it", I don't think that's 100% wrong. Cf. the quotation attributed to John von Neumann: "Young man, in mathematics you don't understand things, you just get used to them." I don't think it's 100% right either, and some of the ways in which some humans are good at mathematics -- e.g., geometric intuition, visualization -- match up with things LLMs aren't currently good at. Anyway, I know of no reason why AI systems couldn't be much better at mathematics than the likes of Terry Tao, never mind e.g. me, but they aren't close enough to that yet for "hey, ChatGPT, please evaluate my speculation that we should be unifying continuous and discrete mathematics via topoi in a way that links aleph, beth and Betti numbers and shows how our brains nucleate discrete samples of continuum reality" to produce output that has value for anything other than inspiration.)
- Cheyana 1y agoThanks for this. In another strange internet coincidence, I was asking ChatGPT to break down the fundamentals of the Peano axioms just yesterday and now I see this. Thumbs up!
- burnt-resistor 1y agoI suspect in the near future (if not already) ChatGPT data will be sold to data brokers and bough by Amazon such that writing a prompt will end up polluting Alexa product recommendations within a few minutes to hours.
- lmpdev 1y agoOh for fuck sake Can we not ruin every technology we develop with ads?
- ccppurcell 1y agoWatch Adam Curtis Century of the Self. I don't think he set out to explain ads in tech, but to my mind it answers a lot about how ads specifically came to power.
- blipvert 1y agoMight be of interest - new AC series: https://www.theguardian.com/tv-and-radio/2025/jun/14/shifty-review-adam-curtis-new-show-bbc-iplayer https://www.theguardian.com/tv-and-radio/2025/jun/14/shifty-...
- brookst 1y agoLet’s also not ruin every discussion with speculation about how someone will eventually ruin everything with ads.
- smoyer 1y agoWe need to make ads cost more than they are worth - here's one small way (what are others?): https://adnauseam.io/ https://adnauseam.io/
- deleted 1y ago[deleted]
- deleted 1y ago[deleted]
- anthk 1y agoBoot sector Lisp bootstraps itself. https://justine.lol/sectorlisp2/ https://justine.lol/sectorlisp2/ Also, lots of Lisp from https://t3x.org https://t3x.org implement numerals (and the rest of stuff) from cons cells and apply/eval: 'John McCarthy discovered an elegant self-defining way to compute the above steps, more commonly known as the metacircular evaluator. Alan Kay once described this code as the "Maxwell's equations of software". Here are those equations as implemented by SectorLISP: ASSOC EVAL EVCON APPLY EVLIS PAIRLIS ' Ditto with some Forths. Back to T3X, he author has Zenlisp where the meta-circular evaluation it's basically how to define eval/apply and how to they ared called between themselves in a recursive way. http://t3x.org/zsp/index.html http://t3x.org/zsp/index.html
- btilly 1y agoI knew that this sort of stuff was possible, but it is fun to see it. When it comes to bootstrapping a programming language from nothing, the two best options are Lisp and Forth. Of the two, I find Lisp easier to understand.
- doodlebugging 1y agoAfter putting on my boots and wading through all of that I think that you have one edit to make. In the "Why Lisp?" section there is a bit of basic logic defined. The first of those functions appears to have unbalanced parentheses. >(defun not (x) > (if x > false > true) I have a compulsion that I can't control when someone starts using parentheses. I have to scan to see who does what with who. You later say in the same section >But it is really easy to program a computer to look for balanced parentheses Okay. This is pretty funny. Thanks for the laugh. I realize that you weren't doing that but it still is funny that you pointed out being able to do it. This later comment in the "Basic Number Theory" section was also funny. >; After a while, you stop noticing that stack of closing parens. I really enjoyed reading this post. Great job. Though it has been a long time since I did anything with Lisp I was able to walk through and get the gist again.
- kazinator 1y ago> I have to scan to see who does what with who. Are you saying that parentheses introduce the problem of having to scan to see what goes with what? As in, if we don't have parentheses, but still have recursive/nested structure, we don't have to scan?
- Retr0id 1y agoPython block indentation is an example of nested structure that's at least easier to visually scan. You don't need to count opening/closing parens, just look down a column of text - assuming nobody mixed tabs and spaces. (but I wouldn't go as far as saying you don't need to scan it)
- User23 1y agoCanonically indented Lisp reads an awful lot like Python. You don’t read the braces, you read the indentation.
- doodlebugging 1y agoFor myself the issue goes back to my college mathematics courses, especially differential equations. I worked those homework problems by hand on a large format tablet, roughly 24" x 36", carefully laying them out step by step so that I could walk through them in the future and make sense of the solution process. Counting and matching parentheses was pretty critical since a missed parenthesis may not pop out at you like it would in a compiler error or by walking through code. I automatically count and match even today, 40 years later.
- Timwi 1y ago> Corrections and follow-up questions are welcome. There are two places where you accidentally wrote “omega” instead of “\omega”.
- edanm 1y agoThis is fascinating! I haven't read much past the intro yet, but I find the whole premise that you can prove all specific instances of Goodstein sequences terminate at 0 within PA, but not that all sequences terminate (it's a trivial result but still interesting). I also find it super weird that Peano axioms are enough to encode computation. Again, this might be trivial if you think about it, but that's one self-referential layer more than I've thought about before. One question for you btilly - oddly enough, I just recently decided to learn more Set Theory, and actually worked on an Intro to Set Theory textbook up to Goodstein sequences just last week. I'm a bit past that. Do you have a good recommendation for a second, advanced Set Theory textbook? Also, any recommendation for a textbook that digs into Peano arithmetic? (My mini goal since learning the proof for Goodstein sequences is to work up to understanding the proof that Peano isn't strong enough to prove Goodstein's theorem, though I'll happily take other paths instead if they're strongly recommended.)
- btilly 1y agoMy apologies for having missed this request. I don't have good suggestions for a good set theory textbook. Grad school was 30 years ago, and I didn't specialize in logic. The best set theory book that I read was https://www.amazon.com/Naive-Theory-Undergraduate-Texts-Mathematics/dp/0387900926 https://www.amazon.com/Naive-Theory-Undergraduate-Texts-Math.... But that one is aimed at people who want to go into math but do not wish to specialize in set theory, and not at people who want to actually learn set theory.
- edanm 1y agoThanks! I read through a bunch of that textbook when I first decided to learn more maths a few years ago, but I relatively quickly started dual-reading a different textbook ("Introduction to Set Theory" by Hrbacek and Jeck), which is a more in-depth, non-naive introduction. That's the book I'm continuing to work through now.
- btilly 1y agoThen you likely know more set theory than I do!
- dooglius 1y agoThe 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?
- btilly 1y agoNow we're getting a little beyond the detail that I feel comfortable making statements about. ChatGPT tells me that PA+"PA is consistent" is not quite enough. I believe that it has digested enough logic textbooks that I'll believe that claim.
- codeflo 1y agoI also like the recursion. In essence, you're making a meta-proof about what PA proves, and given that you trust PA, you also trust this meta-proof. > I think just PA+"PA is consistent" is enough? It's not clear to me how. I believe PA+"PA is consistent" would allow a model where Goodstein's theorem is true for the standard natural numbers, but that also contains some nonstandard integer N for which Goodstein's theorem is false. I think that's exactly the case that's ruled out by the stronger statement of ω-consistency.
- NoahZuniga 1y agoI think so, the math exchange post mentions that the PA + transfinite induction works on epsilon_0 proves PA. It seems likely to me that PA + PA is consistent would be able to prove transfinite induction on epsilon_0.
- bubblyworld 1y agoUnfortunately not, and apparently no other purely universally quantified formulas will do either (so this is a more general thing, not specific to Con(PA)): https://math.stackexchange.com/questions/5003237/can-goodsteins-theorem-be-proven-in-mathrmpa-conpa https://math.stackexchange.com/questions/5003237/can-goodste... On the first question, how do you encode omega-consistency as a formula of PA? Just curious, it's not at all obvious to me.
- gsf_emergency_2 1y agohttps://math.stackexchange.com/questions/4408124/what-does-the-kirby-paris-theorem-mean https://math.stackexchange.com/questions/4408124/what-does-t...
- atsmyles 1y agoRelated to PA consistency, it can be proven in PA. https://youtu.be/6pjLmmkZnIA https://youtu.be/6pjLmmkZnIA
- robinhouston 1y agoThis definitely needs some context for the non-logicians in the house! Gödel's second incompleteness theorem shows that, if PA can prove its own consistency, then PA is inconsistent (and can therefore prove anything, including false things). The work linked here doesn't show that PA is inconsistent, however: what it does is to define a new, weaker notion of what it means for PA to “prove its own consistency” and to show that PA can do that weaker thing. Interesting work for sure, but it won't mean anything to you unless you already know a lot of logic.
- RossBencina 1y agoBut is computation enough? The computable reals are a subset of the reals.
- psychoslave 1y agoThis is an under specified question, until some observable goal is attached to "enough". Enough for what?
- A_D_E_P_T 1y ago"Reals" (tragically poorly named) can be interpreted as physical ratios. That is: Real numbers describe real, concrete relations. For e.g., saying that Jones weighs 180.255 pounds means there's a real, physical relationship -- a ratio -- between Jones' weight and the standard pound. Because both weights exist physically, their ratio also exists physically. Thus, from this viewpoint, real numbers can be viewed as ratios. In contrast, the common philosophical stance on numbers is that they are abstract concepts, detached from the actual physical process of measurement. Numbers are seen as external representations tied to real-world features through human conventions. This "representational" approach, influenced by the idea that numbers are abstract entities, became dominant in the 20th century. But the 20th century viewpoint is really just one interpretation (you could call it "Platonic"), and, just as it's impossible to measure ratios to infinite precision in the real world, absolutely nothing requires an incomputable continuum of reals. Physics least of all. In 20th and 21st century physics, things are discrete (quantized) and are very rarely measured to over 50 significant digits. Infinite precision is never allowed, and precision to 2000 significant digits is likewise impossible. The latter not only because quantum mechanics makes it impossible to attain great precision on very small scales. For e.g., imagine measuring the orbits of the planets and moons in the solar system: By the time you get to 50 significant digits, you will need to take into account the gravitational effects of the stars nearest to the sun; before you get to 100 significant digits, you'll need to model the entire Milky Way galaxy; the further you go in search of precision, the exponentially larger your mathematical canvas will need to grow, and at arbitrarily high sub-infinite precision you’d be required to model the whole of the observable universe -- which might itself be futile, as objects and phenomena outside observable space could affect your measurements, etc. So though everything is in principle simulatable, and precision has a set limit in a granular universe that can be described mathematically, measuring anything to arbitrarily high precision is beyond finite human efforts.
- zozbot234 1y agoGiven 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 https://upload.wikimedia.org/wikipedia/commons/b/bd/D274.jpg
- petters 1y agoThis topic has 123 points, but the linked post on SO only has 11 upvotes.
- netruk44 1y agoStack Overflow requires you to get 15 points before you can upvote things. I imagine their reputation problem (nobody wants to post things there because it just gets deleted) plus the 15 point requirement precludes many people from upvoting over there.
- gugagore 1y agoI 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.
- SabrinaJewson 1y ago> Is there anything more primitive than the inductive data type? I believe that the natural numbers are more primitive than inductive data types, since all inductive data types may be constructed from the natural numbers alongside a small number of primitive type formers (e.g. Π, Σ, = and Ω).
- gugagore 1y agoYou don't need all the natural numbers for that, though. I think you need 0 and 1 only? I think there are two primitive sets for dependent type theory. The one with omega, and then the one with inductive types. None of them need axioms like the Peano axioms.
- SabrinaJewson 1y agoYou need some source of infinite-ness, otherwise the entire theory can be modelled by finite sets. It can be provided by the natural numbers or W types or inductive types, but the naturals are arguably the most fundamental of the three.
- unit149 1y ago[dead]
- dwohnitmok 1y agoYour 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.
- dwohnitmok 1y agoI haven't had the time to go through your argument in more detail, but it's important to note (because the natural language version of what you've presented is ambiguous) that you haven't shown "PA proves 'Provable(forall n, G(n))'" in which case it would be the case that in fact "PA proves 'forall n, G(n)'", but rather "PA proves 'forall n, Provable(G(n))'". My logic is very rusty at this point, but if someone could give me an argument that you cannot move the 'Provable' outside the 'forall', I would really appreciate that, without making reference to Goodstein sequences. In other words, that in general for propositions 'P' it is not true that proving "forall n, Provable(P(n))" implies you can prove "Provable(forall n, P(n))".
- btilly 1y ago> If PA proves "PA proves X" then PA can prove X. Not true. From PA we can construct a function that can search all possible proofs that can be constructed in PA. In fact I outlined one way to do this at the end of my answer. With this function, we can construct a function will-return that analyzes whether a given function, with a given input, will return. This is kind of like an attempted solution to the Halting Problem. We know that it doesn't always work. But we also know that it works a lot of the time. From will-return we can create a function opposite-return that tries to return if a given function with a given input would not, and doesn't return if that function would. This construction is identical to the one in the standard proof of the Halting Problem. Now we consider (opposite-return opposite-return opposite-return). (Actually you need a step to expand the argument into this recursive form. I've left that out, but that is identical to the one in the standard proof of the Halting problem.) PA can prove the following: - PA proves that if PA can prove that opposite-return returns, then it doesn't. - PA proves that if PA can prove that opposite-return doesn't return, then it does. - PA proves that if it can prove everything that it proves that it can prove, then PA must have a proof of one of the two previous statements. - Therefore PA proves that if it can prove everything that it proves that it can prove, then PA is inconsistent. This is a form of Gödel's second incompleteness theorem. And, therefore, there must be a distinction to be made between "PA proves" and "PA proves that it proves".
- cryptonector 1y agoPure lambda calculus is enough because lambda calculus encodes computation.
- Animats 1y agoThis 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 https://www.cs.utexas.edu/~boyer/acl.pdf [2] https://github.com/John-Nagle/nqthm/tree/master https://github.com/John-Nagle/nqthm/tree/master
- Huxley1 1y agoI was pretty amazed by how expressive Peano Arithmetic is when I first started using it. At first it just seems like a basic system, but once you realize that computation itself can be encoded inside PA, and that it can simulate many kinds of computation, things that felt complicated start to click. Does anyone have recommendations for beginner-friendly resources that explain these encoding techniques?
- btilly 1y agoAnything by https://en.wikipedia.org/wiki/Gregory_Chaitin https://en.wikipedia.org/wiki/Gregory_Chaitin, for example https://www.amazon.com/Exploring-Randomness-Discrete-Mathematics-Theoretical/dp/1852334177 https://www.amazon.com/Exploring-Randomness-Discrete-Mathema....