src/Sequents/LK/Nat.thy
author nipkow
Wed, 04 Aug 2004 11:25:08 +0200
changeset 15106 e8cef6993701
parent 7123 4ab38de3fd20
child 17481 75166ebb619b
permissions -rw-r--r--
aded comment
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
7095
cfc11af6174a fixed the comments...
paulson
parents: 7091
diff changeset
     1
(*  Title:      Sequents/LK/Nat
7091
b76a26835a5c Sequents/LK/Nat: new example of simplification in LK
paulson
parents:
diff changeset
     2
    ID:         $Id$
b76a26835a5c Sequents/LK/Nat: new example of simplification in LK
paulson
parents:
diff changeset
     3
    Author:     Lawrence C Paulson, Cambridge University Computer Laboratory
7095
cfc11af6174a fixed the comments...
paulson
parents: 7091
diff changeset
     4
    Copyright   1999  University of Cambridge
7091
b76a26835a5c Sequents/LK/Nat: new example of simplification in LK
paulson
parents:
diff changeset
     5
b76a26835a5c Sequents/LK/Nat: new example of simplification in LK
paulson
parents:
diff changeset
     6
Theory of the natural numbers: Peano's axioms, primitive recursion
b76a26835a5c Sequents/LK/Nat: new example of simplification in LK
paulson
parents:
diff changeset
     7
*)
b76a26835a5c Sequents/LK/Nat: new example of simplification in LK
paulson
parents:
diff changeset
     8
b76a26835a5c Sequents/LK/Nat: new example of simplification in LK
paulson
parents:
diff changeset
     9
Nat = LK +
b76a26835a5c Sequents/LK/Nat: new example of simplification in LK
paulson
parents:
diff changeset
    10
types   nat
b76a26835a5c Sequents/LK/Nat: new example of simplification in LK
paulson
parents:
diff changeset
    11
arities nat :: term
b76a26835a5c Sequents/LK/Nat: new example of simplification in LK
paulson
parents:
diff changeset
    12
consts  "0" :: nat      ("0")
b76a26835a5c Sequents/LK/Nat: new example of simplification in LK
paulson
parents:
diff changeset
    13
        Suc :: nat=>nat  
b76a26835a5c Sequents/LK/Nat: new example of simplification in LK
paulson
parents:
diff changeset
    14
        rec :: [nat, 'a, [nat,'a]=>'a] => 'a  
b76a26835a5c Sequents/LK/Nat: new example of simplification in LK
paulson
parents:
diff changeset
    15
        "+" :: [nat, nat] => nat                (infixl 60)
b76a26835a5c Sequents/LK/Nat: new example of simplification in LK
paulson
parents:
diff changeset
    16
b76a26835a5c Sequents/LK/Nat: new example of simplification in LK
paulson
parents:
diff changeset
    17
rules   
7095
cfc11af6174a fixed the comments...
paulson
parents: 7091
diff changeset
    18
  induct  "[| $H |- $E, P(0), $F;
7123
4ab38de3fd20 congruence rule for |-, etc.
paulson
parents: 7095
diff changeset
    19
              !!x. $H, P(x) |- $E, P(Suc(x)), $F |] ==> $H |- $E, P(n), $F"
7095
cfc11af6174a fixed the comments...
paulson
parents: 7091
diff changeset
    20
7091
b76a26835a5c Sequents/LK/Nat: new example of simplification in LK
paulson
parents:
diff changeset
    21
  Suc_inject  "|- Suc(m)=Suc(n) --> m=n"
b76a26835a5c Sequents/LK/Nat: new example of simplification in LK
paulson
parents:
diff changeset
    22
  Suc_neq_0   "|- Suc(m) ~= 0"
b76a26835a5c Sequents/LK/Nat: new example of simplification in LK
paulson
parents:
diff changeset
    23
  rec_0       "|- rec(0,a,f) = a"
b76a26835a5c Sequents/LK/Nat: new example of simplification in LK
paulson
parents:
diff changeset
    24
  rec_Suc     "|- rec(Suc(m), a, f) = f(m, rec(m,a,f))"
b76a26835a5c Sequents/LK/Nat: new example of simplification in LK
paulson
parents:
diff changeset
    25
  add_def     "m+n == rec(m, n, %x y. Suc(y))"
b76a26835a5c Sequents/LK/Nat: new example of simplification in LK
paulson
parents:
diff changeset
    26
end