src/HOLCF/ex/Loop.thy
author huffman
Sat Jun 04 02:24:47 2005 +0200 (2005-06-04)
changeset 16232 8a12e11d222b
parent 14981 e73f8140af78
child 17291 94f6113fe9ed
permissions -rw-r--r--
added explicit dependency on Fix theory
     1 (*  Title:      HOLCF/ex/Loop.thy
     2     ID:         $Id$
     3     Author:     Franz Regensburger
     4 
     5 Theory for a loop primitive like while
     6 *)
     7 
     8 Loop = Tr + Fix +
     9 
    10 consts
    11         step  :: "('a -> tr)->('a -> 'a)->'a->'a"
    12         while :: "('a -> tr)->('a -> 'a)->'a->'a"
    13 
    14 defs
    15 
    16   step_def      "step == (LAM b g x. If b$x then g$x else x fi)"
    17   while_def     "while == (LAM b g. fix$(LAM f x.
    18                    If b$x then f$(g$x) else x fi))"
    19 
    20 end
    21