Formalisation of primitive recursion, in Coq