7095
|
1 |
(* Title: Sequents/LK/Nat
|
7091
|
2 |
ID: $Id$
|
|
3 |
Author: Lawrence C Paulson, Cambridge University Computer Laboratory
|
7095
|
4 |
Copyright 1999 University of Cambridge
|
7091
|
5 |
|
|
6 |
Theory of the natural numbers: Peano's axioms, primitive recursion
|
|
7 |
*)
|
|
8 |
|
|
9 |
Nat = LK +
|
|
10 |
types nat
|
|
11 |
arities nat :: term
|
|
12 |
consts "0" :: nat ("0")
|
|
13 |
Suc :: nat=>nat
|
|
14 |
rec :: [nat, 'a, [nat,'a]=>'a] => 'a
|
|
15 |
"+" :: [nat, nat] => nat (infixl 60)
|
|
16 |
|
|
17 |
rules
|
7095
|
18 |
induct "[| $H |- $E, P(0), $F;
|
7123
|
19 |
!!x. $H, P(x) |- $E, P(Suc(x)), $F |] ==> $H |- $E, P(n), $F"
|
7095
|
20 |
|
7091
|
21 |
Suc_inject "|- Suc(m)=Suc(n) --> m=n"
|
|
22 |
Suc_neq_0 "|- Suc(m) ~= 0"
|
|
23 |
rec_0 "|- rec(0,a,f) = a"
|
|
24 |
rec_Suc "|- rec(Suc(m), a, f) = f(m, rec(m,a,f))"
|
|
25 |
add_def "m+n == rec(m, n, %x y. Suc(y))"
|
|
26 |
end
|