frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

Open in hackernews

How multiplication is defined in Peano arithmetic

http://devlinsangle.blogspot.com/2011/11/how-multiplication-is-really-defined-in.html
31•nill0•1d ago

Comments

nrds•1d ago
The claims in this article, such as those suggesting recursion has something to do with the infinite, are all relative to the set-theoretic foundation. This is not essential.

In contrast, in the type theories behind proof assistants like Coq, Lean, and Agda, recursion is intimately tied to _finite_ structures. Instead of the vague "intersection of all sets such that" which we see in the article here, recursion is a well-defined computational process, and defined in a rather obvious way once you're familiar with the background.

pengstrom•8h ago
I think the fact that the initial _size_ of the recursion can be arbitrarily large is where infinity comes in. No matter your resources, there might be (must be?) a recision problem that's too large, that requires too many steps.
ysofunny•4h ago
I think "recursion" simpy said, allows for algorithms which end as much as "not ending algorithms".

but in practice, an algorithm has gotta end, otherwise it's not very useful. I think some academics would go as far as insisting a function or process which never ends is not even a proper "algorithm"; but I digress.

recursion does allow us to "reach the infinite"; however, philosophically, we can only ever grasp the finite.

GregarianChild•4h ago
The "intersection of all sets such that" is not vague at all. It's perfectly formally defined in ZF* set theories. But it's impredicative. One of the guiding ideas behind type theories is to minimise impredicative constructions as much as possible. After all, impredicative definitions are circular ... Of course there is no free lunch and the power of impredicative constructions needs to be supplied in other ways in type theories ...
im3w1l•5h ago
It's interesting to consider the possibilities that you have if the recursion axiom is removed. Call those numbers the super-natural numbers. Let's state the recursion axiom A, and remove it.

A: If K is a set such that: 0 is in K, and for every supernatural number n, n being in K implies that S(n) is in K, then K contains every super-natural number.

Without A, there may be a set S that contains 0 every successor of 0 (that is it contains all the natural numbers), but still does not contain every super-natural number. There are three possibilities: There may some copies of N (e.g. a 0' successors 1', 2' etc). There may be some copies of Z (there is an axiom that no number has 0 as a successor, but 0' could be preceeded by -1'). And there may be some copies of Z_k (e.g. 0' followed by 1' followed by 2' followed by 0' again). We could call every copy of N, Z or Z_k a "branch" of the supernaturals.

I say may, because the axioms leave it open, it could exist or could not exist.

Now what happens if you define addition with the supernatural numbers? Let a and b be supernatural numbers. We will use the regular definition

a+0 = a

a+S(b) = S(a+b)

What happpens when we do this?

First let n be a natural number. Due to the recursive property of natural numbers a+n=S^n(a). So we can add a supernatural number on the left side to a natural number on the right side just fine. But what if we have a proper supernatural number on the right side? The definition is completely silent on the matter. But could we find a valid extension?

Thinking about it a little bit I found that defining a+b=b (for any b that is not a natural number) will be a consistent (but perhaps not very interesting or useful) extension.

Notice that this definition will pick the branch of the result based on b, except in the case where b is natural. This is the not a coincidence, for if b is from a Z_k branch then the result must also be from a Z_k branch, as can be found by applying the successor k-times (it could I suppose in theory be from a different Z_k branch though).

E.g.

If b is from a Z_3 branch then b=S(S(S(b))) meaning a+b=a+S(S(S(b)))=S(a+S(S(b)))=S(S(a+S(b)))=S(S(S(a+b))) so a+b is also from a Z_3 branch.

Viliam1234•3h ago
I think the traditional word for the "super-natural number" is "nonstandard integer".

You correctly notice that in case of nonstandard integer, the recursive definition alone is ambiguous, because while the standard integers are connected to zero by a finite chain of successor operations, the nonstandard integers are only chained to each other in infinite chains unconnected to zero. So you could have multiple implementations of a recursive function, each of them giving the same value for the standard integers, but different values for the nonstandard ones.

But there is one extra constraint that I think you didn't take into account. Peano axioms contain the "axiom of induction", which... if you look at it from a certain perspective, says: "whatever (first-order statement) is true for standard integers, it must also be true for nonstandard integers". Well, it doesn't say that directly; it's more like "whatever is true/false for some integers, there must be a smallest integer for which it is true/false".

This further constrains the possibilities for the "+" operation. If you can e.g. prove for the standard integers that "a+b = b+a", then according to this axiom, the same must also be true for nonstandard integers. So if "nonstandard + standard" is defined unambiguously, then so is also "standard + nonstandard".

But this still leaves some space for ambiguity in defining "nonstandard + nonstandard".

im3w1l•1h ago
I feel like we have some miscommunication. I'm referring to this list of axioms: https://mathworld.wolfram.com/PeanosAxioms.html

And I asked myself what happens if we do away with axiom number 5?

As for the nonstandard integers, I think that's a different thing.

There also is apparently already a concept in math named the supernatural numbers (aka Steinitz numbers) but those were not the ones I meant either.

BoiledCabbage•1h ago
Is there any notable difference between how it's presented in the post

> Thus, addition is a function P:NxN -> N such that for all numbers a, b,

> 1. P(a,0) = a

> 2. P(a,S(b)) = S(P(a,b))

And this alternate formulation?

1. P(a,0) = a

2. P(a,S(b)) = P(S(a),b)

Ie "decrease one from b and add it to a", instead of "decrease one from b and add it to the total".

Modifying an HDMI dummy plug's EDID using a Raspberry Pi

https://www.downtowndougbrown.com/2025/06/modifying-an-hdmi-dummy-plugs-edid-using-a-raspberry-pi/
97•zdw•2h ago•18 comments

Show HN: Tikt.com – Remove the "OK" from TikTok URL's to Download as MP3 or MP4

https://tikt.com/
24•nadermx•49m ago•10 comments

Red Hat Linux in 1998 (2009)

https://linuxgazette.net/165/laycock.html
58•marcodiego•2h ago•33 comments

How to modify Starlink Mini to run without the built-in WiFi router

https://olegkutkov.me/2025/06/15/how-to-modify-starlink-mini-to-run-without-the-built-in-wifi-router/
171•LorenDB•6h ago•50 comments

Datalog in miniKanren

https://deosjr.github.io/dynamicland/datalog.html
23•deosjr•2h ago•3 comments

Simplest C++ Callback, from SumatraPDF

https://blog.kowalczyk.info/a-stsj/simplest-c-callback-from-sumatrapdf.html
14•jandeboevrie•1h ago•3 comments

Datalog in Rust

https://github.com/frankmcsherry/blog/blob/master/posts/2025-06-03.md
180•brson•7h ago•17 comments

Canyon.mid

https://canyonmid.com/
161•LorenDB•5h ago•89 comments

Childhood leukemia: how a deadly cancer became treatable

https://ourworldindata.org/childhood-leukemia-treatment-history
64•surprisetalk•5h ago•16 comments

1k year old 3 sisters crop farm found in Northern Michigan

https://www.smithsonianmag.com/smart-news/massive-field-where-native-american-farmers-grew-corn-beans-and-squash-1000-years-ago-discovered-in-michigan-180986758/
108•CoopaTroopa•3d ago•43 comments

SQLite Date and Time Functions (2007)

https://www2.sqlite.org/cvstrac/wiki?p=DateAndTimeFunctions
18•1vuio0pswjnm7•1d ago•2 comments

Social anxiety disorder-associated gut microbiota increases social fear

https://www.pnas.org/doi/abs/10.1073/pnas.2308706120
100•thunderbong•2h ago•61 comments

Grandson of John Tyler, 10th President of the US, Died Today at Age 96

https://www.msn.com/en-us/news/world/the-last-grandson-of-john-tyler-the-u-s-president-who-took-office-in-1841-just-died-at-age-96/ar-AA1G0waB
16•fortran77•37m ago•2 comments

The Art of Lisp and Writing (2003)

https://www.dreamsongs.com/ArtOfLisp.html
136•Bogdanp•11h ago•50 comments

Foundations of Computer Vision

https://visionbook.mit.edu
71•tzury•8h ago•0 comments

Biofuels Policy, a Mainstay of American Agriculture, a Failure for the Climate

https://insideclimatenews.org/news/13062025/agriculture-ethanol-biofuel-policy-climate-failure/
38•rntn•2h ago•16 comments

The Skyscraper That Could Have Toppled over in the Wind (1995)

https://www.newyorker.com/magazine/1995/05/29/the-fifty-nine-story-crisis-citicorp-center
10•georgecmu•3h ago•4 comments

The experience continues until you stop experiencing it

https://strangemachine.tv/safespace/popov/
22•durakot•2h ago•4 comments

Show HN: I'm a student built an AI to chat with YouTube videos

https://www.wiyomi.com/explore
10•adrinant•1d ago•4 comments

I want to be a Journey Programmer Again

https://hexhowells.com/posts/journey.html
44•hexhowells•1h ago•46 comments

Show HN: Container-compose – A Docker-compose like tool for Apple containers

https://github.com/noghartt/container-compose
19•Noghartt•3h ago•7 comments

Text-to-LoRA: Hypernetwork that generates task-specific LLM adapters (LoRAs)

https://github.com/SakanaAI/text-to-lora
71•dvrp•3d ago•1 comments

How easy is it for a developer to "sandbox" a program?

https://kristaps.bsd.lv/devsecflops/
26•zdw•4d ago•20 comments

Studio Ghibli marks 40 years, but future looks uncertain

https://www.japantimes.co.jp/culture/2025/06/06/film/ghibli-anniversary-40/
18•gslin•1h ago•0 comments

The Keyset

https://dougengelbart.org/content/view/273/
11•tosh•5h ago•2 comments

Q-learning is not yet scalable

https://seohong.me/blog/q-learning-is-not-yet-scalable/
194•jxmorris12•17h ago•43 comments

Tiny-diffusion: A minimal implementation of probabilistic diffusion models

https://github.com/tanelp/tiny-diffusion
52•BraverHeart•10h ago•2 comments

I have reimplemented Stable Diffusion 3.5 from scratch in pure PyTorch

https://github.com/yousef-rafat/miniDiffusion
452•yousef_g•1d ago•73 comments

CI/CD Observability with OpenTelemetry Step by Step Guide

https://signoz.io/blog/cicd-observability-with-opentelemetry/
111•ankit01-oss•4d ago•42 comments

Infinite Grid of Resistors

https://www.mathpages.com/home/kmath668/kmath668.htm
202•niklasbuschmann•20h ago•100 comments