src/FOL/ex/nat2.thy
author wenzelm
Mon, 16 Nov 1998 11:33:42 +0100
changeset 5896 4a75d89e2818
parent 0 a5a9c433f639
permissions -rw-r--r--
thm, thms;
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
0
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
     1
(*  Title: 	FOL/ex/nat2.thy
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
     2
    ID:         $Id$
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
     3
    Author: 	Tobias Nipkow
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
     4
    Copyright   1991  University of Cambridge
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
     5
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
     6
Theory for examples of simplification and induction on the natural numbers
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
     7
*)
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
     8
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
     9
Nat2 = FOL +
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    10
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    11
types nat 0
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    12
arities nat :: term
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    13
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    14
consts succ,pred :: "nat => nat"
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    15
       "0" :: "nat"	("0")
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    16
       "+" :: "[nat,nat] => nat" (infixr 90)
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    17
  "<","<=" :: "[nat,nat] => o"   (infixr 70)
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    18
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    19
rules
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    20
 pred_0		"pred(0) = 0"
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    21
 pred_succ	"pred(succ(m)) = m"
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    22
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    23
 plus_0		"0+n = n"
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    24
 plus_succ	"succ(m)+n = succ(m+n)"
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    25
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    26
 nat_distinct1	"~ 0=succ(n)"
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    27
 nat_distinct2	"~ succ(m)=0"
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    28
 succ_inject	"succ(m)=succ(n) <-> m=n"
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    29
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    30
 leq_0		"0 <= n"
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    31
 leq_succ_succ	"succ(m)<=succ(n) <-> m<=n"
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    32
 leq_succ_0	"~ succ(m) <= 0"
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    33
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    34
 lt_0_succ	"0 < succ(n)"
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    35
 lt_succ_succ	"succ(m)<succ(n) <-> m<n"
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    36
 lt_0 "~ m < 0"
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    37
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    38
 nat_ind	"[| P(0); ALL n. P(n)-->P(succ(n)) |] ==> All(P)"
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    39
end