Hacker News new | past | comments | ask | show | jobs | submit login

For that matter, even with 1, how do you generate 0?



There are actually many circumstances in which we do want to treat 0 as a prime. For example it generates a prime ideal in the integers.

One way to state unique prime factorisation including 0 is to treat the set of primes as a pointed set with 0 as the point. The smash product makes the category of pointed sets into a symmetric monoidal category. Then unique prime factorisation can be stated by saying that the multiplicative monoid of natural numbers (with 0) is isomorphic to the free commutative monoid object on the set of primes.


Prime numbers are defined as elements of rings, so we need two operations, the other being addition (understood as a group operation). So you generate 0 by 1-1.


Zero being a member of the natural numbers or not depends on convention.


I would argue that Zero is generally considered to be a natural. The naturals are often constructed via an initial object, and you can call that initial object whatever you want (some people write Z or Zed), but it's metaphorically a zero.


You could just use 1 as the initial element though. Peano's axioms would become

    1 != Sn
    Sn = Sm implies n=m
    n + 1 = Sn
    n + Sm = S(n + m)
    n × 1 = n
    n × Sm = (n × m) + n
    Induction
That's not any more complex than the usual set of axioms.


The pushback I have gotten om my tongue-in-cheek rants defending 0 as a natural number would suggest not everyone agrees.

Some people really care about 1/n being possible for every natural number N.


And other people care about natural numbers being the set of cardinal numbers for finite sets. Others want the set of natural numbers with addition to be a monoid. And actually most-known series in analysis are usually indexed starting from zero, because that's when the formulas are usually simpler.


But if you asked the same people to build the naturals, they'd likely include an initial object that behaves like 0.


I fully agree. However, there is also pushback on ordinals vs cardinals, and monoids vs semigroups.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: