author | paulson |
Thu, 15 Nov 2001 16:12:49 +0100 | |
changeset 12196 | a3be6b3a9c0b |
child 14430 | 5cb24165a2e1 |
permissions | -rw-r--r-- |
12196 | 1 |
(* Title : EvenOdd.thy |
2 |
Author : Jacques D. Fleuriot |
|
3 |
Copyright : 1999 University of Edinburgh |
|
4 |
Description : Even and odd numbers defined |
|
5 |
*) |
|
6 |
||
7 |
EvenOdd = NthRoot + |
|
8 |
||
9 |
consts even :: "nat => bool" |
|
10 |
primrec |
|
11 |
even_0 "even 0 = True" |
|
12 |
even_Suc "even (Suc n) = (~ (even n))" |
|
13 |
||
14 |
consts odd :: "nat => bool" |
|
15 |
primrec |
|
16 |
odd_0 "odd 0 = False" |
|
17 |
odd_Suc "odd (Suc n) = (~ (odd n))" |
|
18 |
||
19 |
end |
|
20 |