Want to take part in these discussions? Sign in if you have an account, or apply for one below
Vanilla 1.1.10 is a product of Lussumo. More Information: Documentation, Community Support.
1 to 4 of 4
I just realized (heh) something interesting. Let be a “weak natural numbers object” in , i.e. equipped with an element and a function such that for any set with an element and function there exists a not-necessarily-unique function such that and . It follows that for all , and is injective. Every “real” natural number is represented by an element , but not every element of need be of this form.
Now work in the realizability tripos of some PCA in Set (like untyped lambda calculus), so that the predicates over a set are functons . Define a predicate “” on the set as follows in the internal tripos logic:
That is, is the internal assertion that “ satisfies induction”.
Then for any “real” natural number , the Church numeral is a realizer of the statement . Indeed it is the “obvious” such realizer, corresponding to the obvious way to prove : start with the base case (i.e. the argument ), then apply the inductive step (i.e. the argument ) times.
Similarly, if we use the weak recursion principle of to define operations like and so on, then the Church encodings of the corresponding operations on Church numerals are the “obvious” realizers of the statements that these operations preserve elements satisfying induction. For instance, Church addition realizes the statement .
This seems like the sort of thing “everyone should know”, but I don’t think I knew it. Did I? Where is it written down? I like it because it connects the use of -calculus as a computational model (where the -terms are the data and the functions that compute with it) to its use in realizability as “witnesses to truth” (where the actual data and functions are in the underlying sets, and the realizers just “track” them), and makes the Church numerals seem unavoidable/canonical in this regard.
I think the first person to note this explicitly was Daniel Leivant in “Reasoning about functional programs and complexity classes associated with type disciplines” (1983) where he explicitly notes that church encoded data can act as proofs of, among other things, induction, connecting them to Kleene Realizability. This idea is used, in a much more generalized form, to generate the datatypes in the more recent Cedille project.
Very interesting; I did not know that before. I idly wonder which statements the Scott numerals realize (see, for instance, page 2 of this set of slides), will think about that.
Thanks! That’s very interesting.
1 to 4 of 4