TITLE: Categories of recursive functions
QUESTION [20 upvotes]: I have a couple of conjectures on recursive functions, that I feel must have been proved or refuted by someone else, but I don't know where to look. In short:
1. The primitive recursive functions form a pseudoinitial small finite product category with natural number object.
2. The partial recursive functions form a pseudoinitial small regular category with natural number object.
The longer version is as follows.
In non closed Cartesian categories, the natural number objects should be defined in a more stable way: $N$ together with $0:1\to N$ and $s:N\to N$ is a natural number object if for each $f:X\to Y$ and $g:Y\to Y$ there is an $h:N\times X \to Y$ such that $h(0,x) = f(x)$ and $h(n+1,x) = g(h(n,x))$. This roughly means that the projection $N\times X\to X$ is a natural number object in the slice over $X$ for every object $X$.
A 0-cell in a 2-category is pseudoinitial if there is an up to isomorphism unique 1-cell to every other two cell.
The first conjecture in full is as follows: The 2-category of small finite product category with a chosen natural number object and finite product preserving functors which preserve the choice of natural number object and all natural transformations, has a pseudoinitial 0-cell. One of these pseudoinitial 0-cells is the category whose objects are powers of $\mathbb N$ and whose morphisms are primitive recursive functions.
The second conjecture says that there is a pseudoinitial object in the category of small regular categories with NNO. This time the category of recursively enumerable sets and recursive functions is such a pseudoinitial 0-cell.
The conjectures fail if non standard models of arithmetic can exclude primitive / partial recursive functions that exists in the standard model: categories of non standard recursive functions could be counterexamples.
Have you seen anything like this before? If so, am I right?

REPLY [6 votes]: Regarding question 1.: it's hard to find the statement spelled out in black and white in the literature. Apparently Gavin Wraith proved it in unpublished notes titled "Notes on arithmetic universes and Gödel incompleteness theorems" (1985). (And, one might imagine Joyal proved this as well in his unpublished work.) Happily, a crisp statement is provided in Alan Morrison's very fine Master's Thesis, Lemma 5.11: the functions representable in the initial Skolem theory (the initial object among Lawvere theories in which the generating object is a parametrized natural numbers object) are precisely the primitive recursive functions. He works through the details using a simple programming language of register machines, called PRIM. My understanding is that this is very closely modeled after Wraith's notes; see Maietti's article Joyal's arithmetic universes via type theory, especially her remark just after Definition 4.2. 
Hot off the press is Gödel’s Incompleteness after Joyal by Joost van Dijk and Alexander Gietelink Oldenziel. From the introduction: 

This article concerns an alternative proof of the first Gödel Incompleteness theorem in the language of category theory due to André Joyal, relying crucially on his newly introduced notion of 'Arithmetic Universe’. In 1973 Joyal lectured on his new proof, and a set of notes were circulated among a small group of workers in topos theory. Unfortunately, the proof has never been made publicly available. This document means to remedy this gap in the literature.