Hacker News new | ask | show | jobs
by jgrahamc 3888 days ago
I hope this kid goes to school and tells the teacher that they were just using the Peano axioms of arithmetic.

    x * 0 = 0
    x * S(y) = x + (x * y)
So the original 5 * 3 would be

    5 * S(2) = 5 + 5 * 2
             = 5 + 5 + 5 * 1
             = 5 + 5 + 5 + 5 * 0
             = 5 + 5 + 5 + 0
             = 5 + 5 + 5
2 comments

The smart alek teacher then tells the child that they are using second order arithmetic :-)

  1 * n = n
  m * n = (m-1) * n + n