My question could be simple but I haven't found an answer for it: could we define a type theory where the types are the natural numbers themselves (not the set of the natural numbers)?
Thanks.
|
My question could be simple but I haven't found an answer for it: could we define a type theory where the types are the natural numbers themselves (not the set of the natural numbers)? Thanks. |
|||||||||
|
|
Most type system will have 1 or And they will have disjunction types so you can define Bool or 2 = 1 + 1. which has two inhabitants.. In general you can have any sum 1 + 1 + 1 + 1 as a type and use 4 as a shorthand for it. Therefore the natural numbers are already types in most systems. |
|||
|