Numerical Existence Property and Categories with an Internal Copy

We define here a notion of internal copy and of weak internal copy of a category. We will then determine some families of categories having an internal copy or a weak internal copy. We will consider categories of definable classes of first-order theories and we will see that the notion of internal copy is related to the notion of numerical existence property.


Introduction
A category C can host internal algebraic structures such as monoids, groups, rings, etc. Among these internal algebraic structures there are categories, too. An internal category is defined as an internal graph having a composition arrow and an identity arrow making some diagrams (representing associativity of composition and properties of identities) commute (see e.g. [3]).
An internal category cannot directly be compared with the category in which it lives. However, it can be "externalized" by means of global elements. It is hence natural to compare this externalization with C.
In this paper we deal with the question whether there exist categories C having an internal copy, that is an internal category in C of which the externalization is isomorphic to C itself. We will show that one can produce examples of a weakening of this notion by considering some categories of definable classes of first-order theories. A metaproperty called numerical existence property will play a crucial role in this case. Finally, we will produce an example of a category with an internal copy in the strong sense.
We can weaken the notion of internal copy by relativazing it to a doctrine over C. If p : C op → InfSL is a (primary) doctrine, that is a contravariant functor from C to the category of inf-semilattices, we can consider the internal categories in the base category Q p of its elementary quotient completion (see [5]). The objects of this category are pairs (I, ρ) where I is an object of C and ρ ∈ p(I × I) is a p-equivalence relation on it, that is with respect to the equivalence relation for which f and g are equivalent if and only if ρ ≤ p(f × g)(η).
If C is finitely complete, then Q p has all finite products. In particular, a terminal object in Q p is given by the pair (1, ).
Thus for every (I, ρ) in Q p , Among the doctrines over C there is in particular the subobject doctrine. We can hence give the following definition: Definition 2.4. Let C be a finitely complete category with a primary doctrine p over it such that Q p is finitely complete. A p-internal copy of C is a pair (Γ, I) consisting of an internal category Γ of Q p and an isomorphism I : Ext Qp (Γ) → C. A weak internal copy of a finitely complete category C is a Sub C -internal copy of C. 1 If the doctrine p is elementary (see [5]), then one can define a functor ∇ from C to Q p sending each object I to (I, ∃ ΔI ( )) (where ∃ ΔI is left adjoint to p(Δ I )) and sending an arrow f to [f ]. If p has comprehensive weak equalizers, then ∇ is full and faithful. In this case, as a consequence, if C has an internal copy, then it has also a p-internal copy. If C is regular, the subobject functor is an elementary doctrine having comprehensive weak equalizers (see [5]); hence every internal copy of C is also a weak internal copy.
From the very definition of p-internal copies, it follows that no nontrivial finite category or preorder has a p-internal copy; moreover, obviously, no locally small non-small category has a p-internal copy.

Categories of Definable Classes
Let T be a first-order (intuitionistic or classical) theory with equality 2 . Let x, y, z be fixed distinct variables of the language of T. The category of its definable classes DC[T] is defined as follows: The following proposition shows some sufficient conditions which guarantee the category of definable classes of a first-order theory with equality to be finitely complete. The proof is omitted since it consists simply of a verification. Proposition 3.1. Let T be a first-order theory with equality.

If τ is a formula with at most x as free variable such that
In particular, if the language of T has a constant k, then DC[T] has a terminal object. 2. If π is a formula with at most x, y and z as free variables such that T ∃x π then, for every pair of definable classes {x| ϕ} and {x| ψ}, the following is a product diagram in DC[T]: As a consequence of the proposition above, the categories of definable classes of Peano arithmetics PA and of Heyting arithmetics HA are finitely complete. The same holds for the categories of definable classes of set theories like ZFC, ZF, IZF and CZF.
In DC[PA] and in DC[HA] a terminal object is given by {x| x = 0}, while in set theories the definable class {x| ¬∃y(y ∈ x)} is terminal.

Numerical Existence Property and Categories 387
For binary products, in HA and in PA one can take π to be (a formula representing) x = 2 y (2z + 1); in set theories, one can take π to be Definition 3.2. We will call a first-order theory with equality T having formulas τ and π satisfying the properties in items 1. and 2. of proposition 3.1 a cartesian first-order theory with equality. Whenever T is a cartesian first-order theory with equality, we assume that the structure of finitely complete category of DC[T ] is the one determined by the constructions in proposition 3.1. 4

First-Order Theories with Natural Numbers
Definition 4.1. Let C be a cartesian category. A parametric natural numbers object is a triple (N, z, s) where N is an object, and z : 1 → N and s : N → N are arrows, such that for every pair of objects P, Q and every pair of arrows f : P → Q and g : Q → Q there exists a unique arrow h : P × N → Q making the following diagram commute: In a cartesian category with a parametric natural numbers object, every primitive recursive function between natural numbers can be represented. Indeed, as a consequence of the definition, for every f : N k → N and g : N k+2 → N there exists a unique arrow rec[f, g] : N k+1 → N making the following diagram commute.  Succ(x, y). The theories of arithmetics PA and HA have natural numbers:

Numerical Existence Properties
Definition 5.1. A first-order theory with equality T having natural numbers has the numerical existence property (nEP) if, for every formula ϕ having at most x as free variable such that T ∃x (Nat(x) ∧ ϕ), there exists a natural (meta)number n such that T ϕ[n/x].
Numerical existence property nEP essentially means that if a natural number satisfying a property is proven to exist in T, then a natural (meta)number can be proven to satisfy that property in T.
Peano arithmetic PA, Zermelo-Fraenkel set theory ZF and, in general, classical first-order theories with equality of numbers or sets (if consistent) do not have the numerical existence property. Indeed one can consider an independent sentence I (which exists by Gödel's first incompleteness theorem): clearly T ∃x((x = 0∧¬I)∨(x = 1∧I)) as a consequence of the law of excluded middle; however there cannot be a numeral n such that T (n = 0∧¬I)∨(n = 1 ∧ I), since in that case n would be 0 or 1 and we could hence prove ¬I or I in T.
Heyting arithmetic HA has the numerical existence property: this was proven by means of realizability by Kleene (see [4]). CZF and IZF also have the numerical existence property, as it was proven by Rathjen in [6] and Beeson in [1], respectively.

Internalizing Definable Classes
Every cartesian first-order theory with equality T having natural numbers enjoys a primitive recursive Gödelian internal encoding of its syntax by means of natural numbers. We fix such an encoding. We also use, with abuse of notation, symbols for primitive recursive functions between natural numbers (including a primitive recursive bijective encoding of natural numbers p with primitive recursive projections p 1 and p 2 ), since they can be adequately represented in T. In particular, 1. Every variable ξ in the syntax of T is encoded by a numeral ξ; Vol. 14 (2020) Numerical Existence Property and Categories 389 2. We use the notation · for the encodings of connectives, quantifiers and equality as primitive recursive functions; 3. We use sub(x, y, z) to denote the code of the formula encoded by x in which the variable encoded by z is substituted by the variable encoded by y; 4. There is a predicate form(x) expressing the fact that x is the code of a formula of T; 5. There is a predicate free(y, x) expressing the fact that y is the code of a variable which is free in the formula encoded by x; 6. There is a predicate pf(u, x, y) expressing the fact that u is the code of a proof in T of the formula encoded by y from the assumption encoded by x; 7. There is a predicate notocc(x, y) expressing the fact that the variable encoded by x does not occur in the formula encoded by y. 8. We write der(x, y) as an abbreviation for ∃u (pf(u, x, y)). One can hence define some formulas which will be helpful in the following sections: 1. We define the formula dc(x) as which expresses the fact that x is the code of a formula of T having at most x as free variable.
Here and in what follows we will use the formula notoccur to avoid problems with substitutions.

An Example of Category with a Weak Internal Copy
Exploiting the fact that in a category of definable classes DC[T] of a first-order theory with equality, every mono I → {x| ϕ} is isomorphic to one of the form ψ ∧ x = y : {x|ψ} → {x| ϕ}, one can prove the following proposition. and each arrow F to itself.
The category DC q [T] is finitely complete and from the very definition of the abbreviations in the previous section, the following proposition holds. Proof. We can assume T to be consistent, since otherwise the thesis trivially holds.
As a consequence of the corollary above, it is sufficient to prove that Ext Thus, by nEP there exists a natural (meta)number n such that T ∃xF [n/y]. Decoding n one can construct a formula ϕ n such that ϕ n is n. The definable class {x| ϕ n } is the object to which [F ] is sent. This application is well-defined, since if F and G represent the same arrow from 1 to (ΔΓ 0 [T], ≡ 0 ) in DC q [T], and n and m are natural (meta)numbers such that T ∃xF [n/y] and T ∃xG[m/y], then T ∃u pf(u, n, m) and T ∃u pf(u, m, n); hence using nEP we can find natural (meta)numbers k and h such that T pf(k, n, m) and T pf(h, m, n). Decoding k and h we obtain actual proofs of ϕ n T ϕ m and of ϕ m T ϕ n . 2. We use an analogous procedure to define the functor on arrows, exploiting nEP.
These two functors determine an isomorphism of categories.

The Classical Case
In case of cartesian classical first-order theories with equality and natural numbers one can define some quotients in DC[T] using the minimum principle which holds for natural numbers: