Hacker News new | ask | show | jobs
by feoren 424 days ago
>It seems a little inconvenient to require acceptance that empty products equal 1

Only the contrary: it is extremely inconvenient to not allow the product of an empty sequence of numbers to equal 1. The sum of an empty sequence is 0. The Baz of an empty sequence of numbers, for any monoid Baz, is the identity element of that monoid. Any other convention is going to be very painful and full of its own exceptions.

There are no exceptions to any rules here. 1 is not prime. Every positive integer can be expressed as the unique product of powers of primes. 1's expression is [], or 0000..., or ∅.

1 comments

That’s not what I meant. I agree that the empty product being equal to 1 is reasonable.

I meant that it’s inconvenient to require engaging with that concept directly in the everyday definition of prime numbers.