A.2.9 The natural number type
We give the rules for natural numbers, following Β§1.9 (http://planetmath.org/19thenaturalnumbers).
*[right=β-form]
Ξ πΌππ
Ξ β’β : π° _i
\inferrule*[right=β-intro1]
Ξ πΌππ
Ξ β’0 : β
\inferrule*[right=β-intro2]
Ξ β’n : β
Ξ β’succ(n) : β
\inferrule*[right=β-elim]
Ξ,x : β β’C : π° _i
Ξ β’c_0 : C[0/x]
Ξ,x : β,y : C β’c_s : C[succ(x)/x]
Ξ β’n : β
Ξ β’ind_β(x.C,c_0,x.y.c_s,n) : C[n/x]
\inferrule*[right=β-comp1]
Ξ,x : β β’C : π° _i
Ξ β’c_0 : C[0/x]
Ξ,x : β,y : C β’c_s : C[succ(x)/x]
Ξ β’ind_β(x.C,c_0,x.y.c_s,0) β‘c_0 : C[0/x]
\inferrule*[right=β-comp2]
Ξ,x : β β’C : π° _i
Ξ β’c_0 : C[0/x]
Ξ,x : β,y : C β’c_s : C[succ(x)/x]
Ξ β’n : β
Ξβ’
ind
β
(x.C,c
0
,x.y.c
s
,succ(n))
ββ‘c
s
[n,ind
β
(x.C,c
0
,x.y.c
s
,n)/x,y] : C[succ(n)/x]
In πππ½β, x is bound in C, and x and y are bound in cs.
Other inductively defined types follow the same general scheme.
Title | A.2.9 The natural number type |
---|---|
\metatable |