src/ZF/Arith.thy
author wenzelm
Mon, 18 May 1998 18:10:43 +0200
changeset 4941 ac5da3e767b0
parent 3840 e0baea4d485a
child 6070 032babd0120b
permissions -rw-r--r--
added Syntax/source.ML;
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
1478
2b8c2a7547ab expanded tabs
clasohm
parents: 1401
diff changeset
     1
(*  Title:      ZF/arith.thy
0
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
     2
    ID:         $Id$
1478
2b8c2a7547ab expanded tabs
clasohm
parents: 1401
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
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
     6
Arithmetic operators and their definitions
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
     7
*)
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
     8
2469
b50b8c0eec01 Implicit simpsets and clasets for FOL and ZF
paulson
parents: 1478
diff changeset
     9
Arith = Epsilon + 
0
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    10
consts
1401
0c439768f45c removed quotes from consts and syntax sections
clasohm
parents: 753
diff changeset
    11
    rec  :: [i, i, [i,i]=>i]=>i
1478
2b8c2a7547ab expanded tabs
clasohm
parents: 1401
diff changeset
    12
    "#*" :: [i,i]=>i                    (infixl 70)
2b8c2a7547ab expanded tabs
clasohm
parents: 1401
diff changeset
    13
    div  :: [i,i]=>i                    (infixl 70) 
2b8c2a7547ab expanded tabs
clasohm
parents: 1401
diff changeset
    14
    mod  :: [i,i]=>i                    (infixl 70)
2b8c2a7547ab expanded tabs
clasohm
parents: 1401
diff changeset
    15
    "#+" :: [i,i]=>i                    (infixl 65)
2b8c2a7547ab expanded tabs
clasohm
parents: 1401
diff changeset
    16
    "#-" :: [i,i]=>i                    (infixl 65)
0
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    17
753
ec86863e87c8 replaced "rules" by "defs"
lcp
parents: 124
diff changeset
    18
defs
6
8ce8c4d13d4d Installation of new simplifier for ZF. Deleted all congruence rules not
lcp
parents: 0
diff changeset
    19
    rec_def  "rec(k,a,b) ==  transrec(k, %n f. nat_case(a, %m. b(m, f`m), n))"
0
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    20
3840
e0baea4d485a fixed dots;
wenzelm
parents: 2469
diff changeset
    21
    add_def  "m#+n == rec(m, n, %u v. succ(v))"
e0baea4d485a fixed dots;
wenzelm
parents: 2469
diff changeset
    22
    diff_def "m#-n == rec(n, m, %u v. rec(v, 0, %x y. x))"
0
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    23
    mult_def "m#*n == rec(m, 0, %u v. n #+ v)"
25
3ac1c0c0016e ordinal: DEFINITION of < and le to replace : and <= on ordinals! Many
lcp
parents: 6
diff changeset
    24
    mod_def  "m mod n == transrec(m, %j f. if(j<n, j, f`(j#-n)))"
3ac1c0c0016e ordinal: DEFINITION of < and le to replace : and <= on ordinals! Many
lcp
parents: 6
diff changeset
    25
    div_def  "m div n == transrec(m, %j f. if(j<n, 0, succ(f`(j#-n))))"
0
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    26
end