src/HOL/Relation_Power.thy
author nipkow
Fri May 18 07:56:19 2001 +0200 (2001-05-18)
changeset 11305 2ce86fccc95b
parent 10213 01c2744a3786
child 11306 6f4ed75b2dca
permissions -rw-r--r--
added ^ on functions.
nipkow@10213
     1
(*  Title:      HOL/Relation_Power.thy
nipkow@10213
     2
    ID:         $Id$
nipkow@10213
     3
    Author:     Tobias Nipkow
nipkow@10213
     4
    Copyright   1996  TU Muenchen
nipkow@10213
     5
nipkow@10213
     6
R^n = R O ... O R, the n-fold composition of R
nipkow@11305
     7
Both for functions and relations.
nipkow@10213
     8
*)
nipkow@10213
     9
nipkow@10213
    10
Relation_Power = Nat +
nipkow@10213
    11
nipkow@10213
    12
instance
nipkow@10213
    13
  set :: (term) {power}   (* only ('a * 'a) set should be in power! *)
nipkow@10213
    14
nipkow@10213
    15
primrec (relpow)
nipkow@10213
    16
  "R^0 = Id"
nipkow@10213
    17
  "R^(Suc n) = R O (R^n)"
nipkow@10213
    18
nipkow@11305
    19
nipkow@11305
    20
instance fun :: (term,term)power   (* only 'a \<Rightarrow> 'a should be in power! *)
nipkow@11305
    21
nipkow@11305
    22
primrec (funpow)
nipkow@11305
    23
  "f^0 = id"
nipkow@11305
    24
  "f^(Suc n) = f o (f^n)"
nipkow@11305
    25
nipkow@10213
    26
end