7
$\begingroup$

Canonicity is a useful property satisfied by some type theories, saying that every element of natural number type is propositional equal to an element of the form $s^n(0)$, where $s$ is the successor operation. For certain type theories, this can be proven by gluing techniques, as done by Lambek and Scott. The categorical translation of canonicity then becomes that every arrow $1\to \mathbb{N}$, where $\mathbb{N}$ is the natural numbers object, is of the form $S^n(0)$. These gluing arguments use certain syntactic topoi of the relevant type theory.

I was wondering if there are categorical results on canonicity in categories. That is, if there are necessary or sufficient properties a category $\mathcal{C}$ with a natural numbers object $\mathbb{N}$ should have in order to enjoy canonicity. Or, does anyone have an insightful counterexample why not every natural numbers object satisfies canonicity?

Thanks!

Edit: I am not necessarily looking out for a 'canonicity' in the type theoretic, constructivistic sense. I'll also be very happy with natural number objects satisfying that every map $1\to \mathbb{N}$ is of the forn $s^n(0)$, not necessarily in the canonicity sense. I don't really know the terminology for this.

$\endgroup$
4
  • 2
    $\begingroup$ If a topos has countable coproducts then the coproduct of countably infinitely many copies of $1$ is an NNO, which is as canonical as one can hope for. This is a sufficient condition but not necessary, I think. Some of the usual methods of model theory can be used to cook up a topos with a non-standard NNO. $\endgroup$
    – Zhen Lin
    Commented Mar 15, 2021 at 11:22
  • 1
    $\begingroup$ @ZhenLin : A countable coproduct of copies of $1$ can still fail canonicity in the sense of the OP if $Hom(1, \_)$ do not preserve coproducts. Example, in a topos of sheaves, "Canonicity" in this sense is about connectetedness. $\endgroup$ Commented Mar 15, 2021 at 12:58
  • $\begingroup$ Oh yes, of course. I conflated canonicity and standardness there... $\endgroup$
    – Zhen Lin
    Commented Mar 15, 2021 at 12:59
  • $\begingroup$ In particular, perhaps the simplest topos with a noncanonical NNO is $\rm Set\times Set$. I don't know if this is "insightful" however. $\endgroup$ Commented Mar 17, 2021 at 20:18

2 Answers 2

8
$\begingroup$

I suspect there is no good answer to the question:

The type theoretic results you are mentioning definitely have a category theoretic interpretation in fact their proof using gluing is already very category theoretic.

But these results say that for example the "free topos with NNO", or the "free (locally) cartesian closed category with NNO" satisfies canonicity as you defined it (Here "free" means "initial").

To me the intuitive understanding of these results is that if the initial category with some structure was failing canonicity, there would be a map $1 \to N$ witnessing it, and by initiality this map would appear in all other category with the same structure, for example you'll get some "non-canonical integer" existing in all elementary toposes. Playing around with some model where we know there is no such terms (and using gluing) on can arrive with some work at a contradiction.

But in any case the essential assumption is this "Free" or "initial". These results of course do not say that "all topos satisfies canonicity" or "all locally cartesian closed category satisfies canonicity".

So you can get a purely category theoretic approaches to these, and never even mention type theory. But at the end of the day, type theory is really just a description of the initial category with "such and such" structure, so because these results are about these initial categories, even if you don't mention type theory explicitely at all, it will be there.

I do not know any general results about canonicity that is not of this kind. But of course, I cannot prove that these do not exists, and maybe someone will know some other kind of examples.

To some extent, Zhen Lin comment is an example: if your category has countable coproduct and $Hom(1,\_)$ preserve them, then you have canonicity. But this is far more elementary than the sort of result you were mentioning.

$\endgroup$
3
  • 1
    $\begingroup$ (1) The gluing construction itself is a simple piece of pure category theory that works for pretty general categories, not necessarily initial ones. It has an amazing list of structural properties that are easy to prove. Then there are the applications to logical issues such as the "canonicity" in this Question. I confess that, despite writing some of these up in my book, I really don't understand how they work: they seem to be magic. $\endgroup$ Commented Mar 17, 2021 at 16:55
  • $\begingroup$ @PaulTaylor : I absolutely agree with (1) (and that was pretty much what I meant to say in the first two lines) but I don't understand (2). These proof of canonicity do not prove consitency: they assume consistency. Indeed they glue the initial model to some other concrete model that we understand well (usually "set"), but, having this concrete model already imply consistency. $\endgroup$ Commented Mar 17, 2021 at 17:26
  • $\begingroup$ See my Answer for my comment (2). $\endgroup$ Commented Mar 17, 2021 at 19:38
2
$\begingroup$

My comment (2) was:

That the logical results apply to initial or term models is clearly important, and somewhere in that we're using recursion over that model. This must be a stronger form of recursion than whatever the object theory includes, because it's proving consistency of that theory. This means that we must be invoking some form of the Axiom-scheme of Replacement. That is, in the case where the object logic is set-like higher order logic, although I propose that the term Replacement be generalised to mean recursion over the term model of whatever object logic.

Simon Henry replied:

These proofs of canonicity do not prove consistency: they assume consistency. Indeed they glue the initial model to some other concrete model that we understand well (usually $\mathbf{Set}$), but, having this concrete model already implies consistency.

Quick answer:

I'm a categorist, not a logician, so I'm not sure about the "official" names for these things. I would say that the "canonicity" in this Question is a version of consistency, in particular it says $0\neq 1$. The other corollaries of the gluing contruction (or "logical relations", as it's known in theoretical computer science) are similar.

For this to work, the "concrete model that we know well (usually $\mathbf{Set}$)" must be more than a model of the theory under discussion. This is because the gluing results in an internal model inside the concrete one. Also, we may do type-valued recursion within this concrete model over the term model.

This is what I mean by a version of the Axiom-Scheme of Replacement.

I said this is a "quick answer" because I would like to come back to it (and invite Simon and others to contribute comments in the mean time). I am in the final stages of selling a house, so I cannot think clearly about mathematics at the moment.

$\endgroup$
3
  • 1
    $\begingroup$ I think I understand your point, and I absolutely agree that there is something a bit mysterious about these 'gluing proof' and I definitely do not know what are the properties we need of the concrete model "Set" to make it work (and you seem to have a much better idea than I do) My previous comment was more that if we only care about consistency (i.e. $0 \neq 1$) then we do not need any of this mysterious gluing "magic" : having any model of the theory (like Set) in which $0 \neq 1$ already shows that $0 \neq 1$ in the inital model. $\endgroup$ Commented Mar 17, 2021 at 19:48
  • $\begingroup$ In short, there really is something going on with canonicity that is seems to me much weirder than a mere consistency proof. $\endgroup$ Commented Mar 17, 2021 at 19:49
  • $\begingroup$ @SimonHenry Your comments here are supported by the fact that canonicity is usually a property of intuitionistic theories, destroyed by adding the law of the excluded middle. In contrast, consistency of an intuitionistic theory is often preserved when one adds the law of the excluded middle, thanks to a double-negation translation. $\endgroup$ Commented Mar 18, 2021 at 1:02

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .