Hacker News new | ask | show | jobs
by lurchedsawyer 2742 days ago
See? Squirming. Somehow multiplying 0 factors is supposed to result in 1.

I'm not saying it's incorrect, but you have to explain that edge case away. At the same time allowing 1 to be prime would remove that problem given that e.g. 6 = 2^1 * 3 ^1 and 6 = 1^81 * 2^1 * 3^1 are the same unique factorisation because, well, monoids.

Edit: `s/fields/monoids`

1 comments

How many prime factors does the product of two numbers have? Not the sum of the number of prime factors of the individual numbers.

Now you are the one squirming.

Cleanly accounting for edge cases isn't squirming, it's logical thinking.