src/ZF/arith.thy
changeset 6 8ce8c4d13d4d
parent 0 a5a9c433f639
child 25 3ac1c0c0016e
equal deleted inserted replaced
5:75e163863e16 6:8ce8c4d13d4d
    14     mod  :: "[i,i]=>i"      		(infixl 70)
    14     mod  :: "[i,i]=>i"      		(infixl 70)
    15     "#+" :: "[i,i]=>i"      		(infixl 65)
    15     "#+" :: "[i,i]=>i"      		(infixl 65)
    16     "#-" :: "[i,i]=>i"      		(infixl 65)
    16     "#-" :: "[i,i]=>i"      		(infixl 65)
    17 
    17 
    18 rules
    18 rules
    19     rec_def  "rec(k,a,b) ==  transrec(k, %n f. nat_case(n, a, %m. b(m, f`m)))"
    19     rec_def  "rec(k,a,b) ==  transrec(k, %n f. nat_case(a, %m. b(m, f`m), n))"
    20 
    20 
    21     add_def  "m#+n == rec(m, n, %u v.succ(v))"
    21     add_def  "m#+n == rec(m, n, %u v.succ(v))"
    22     diff_def "m#-n == rec(n, m, %u v. rec(v, 0, %x y.x))"
    22     diff_def "m#-n == rec(n, m, %u v. rec(v, 0, %x y.x))"
    23     mult_def "m#*n == rec(m, 0, %u v. n #+ v)"
    23     mult_def "m#*n == rec(m, 0, %u v. n #+ v)"
    24     mod_def  "m mod n == transrec(m, %j f. if(j:n, j, f`(j#-n)))"
    24     mod_def  "m mod n == transrec(m, %j f. if(j:n, j, f`(j#-n)))"