Intro

In mathematical logic, the Peano axioms, also known as the Dedekind–Peano axioms or the Peano postulates, are a set of axioms for the natural numbers presented by the 19th century Italian mathematician Giuseppe Peano. These axioms have been used nearly unchanged in a number of meta-mathematical investigations, including research into fundamental questions of whether number theory is consistent and complete.

Source: Wikipedia1

Exercise

Write the predicate nat/1 that indicates if it’s argument is a natural number as defined by Peano’s axiom of induction.

If \(N\) is a set such that:

  • \(0\in N\)
  • \(x\in N\) implies \(s(x)\in N\)

then \(N\) contains every natural number.

Here, \(s\) denotes the successor function. You can use it in your code as s/1. For \(0\) you may simply use 0.