src/FOL/ex/Nat.thy
author kleing
Sat, 30 Apr 2005 14:18:36 +0200
changeset 15900 d6156cb8dc2e
parent 3115 24ed05500380
child 17245 1c519a3cca59
permissions -rw-r--r--
fixed typo
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
3115
24ed05500380 tuned comments;
wenzelm
parents: 1473
diff changeset
     1
(*  Title:      FOL/ex/Nat.thy
0
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
     2
    ID:         $Id$
1473
e8d4606e6502 expanded tabs
clasohm
parents: 1322
diff changeset
     3
    Author:     Lawrence C Paulson, Cambridge University Computer Laboratory
0
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
     4
    Copyright   1992  University of Cambridge
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
     5
3115
24ed05500380 tuned comments;
wenzelm
parents: 1473
diff changeset
     6
Examples for the manuals.
0
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
     7
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
     8
Theory of the natural numbers: Peano's axioms, primitive recursion
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
     9
*)
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    10
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    11
Nat = FOL +
352
fd3ab8bcb69d removal of obsolete type-declaration syntax
lcp
parents: 0
diff changeset
    12
types   nat
fd3ab8bcb69d removal of obsolete type-declaration syntax
lcp
parents: 0
diff changeset
    13
arities nat :: term
1322
9b3d3362a048 removed quotes from types in consts section
clasohm
parents: 352
diff changeset
    14
consts  "0" :: nat      ("0")
9b3d3362a048 removed quotes from types in consts section
clasohm
parents: 352
diff changeset
    15
        Suc :: nat=>nat  
9b3d3362a048 removed quotes from types in consts section
clasohm
parents: 352
diff changeset
    16
        rec :: [nat, 'a, [nat,'a]=>'a] => 'a  
9b3d3362a048 removed quotes from types in consts section
clasohm
parents: 352
diff changeset
    17
        "+" :: [nat, nat] => nat                (infixl 60)
0
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    18
rules   induct      "[| P(0);  !!x. P(x) ==> P(Suc(x)) |]  ==> P(n)"
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    19
        Suc_inject  "Suc(m)=Suc(n) ==> m=n"
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    20
        Suc_neq_0   "Suc(m)=0      ==> R"
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    21
        rec_0       "rec(0,a,f) = a"
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    22
        rec_Suc     "rec(Suc(m), a, f) = f(m, rec(m,a,f))"
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    23
        add_def     "m+n == rec(m, n, %x y. Suc(y))"
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    24
end