src/HOLCF/ex/Loop.thy
author nipkow
Tue Jan 09 15:36:30 2001 +0100 (2001-01-09)
changeset 10835 f4745d77e620
parent 2642 3c3a84cc85a9
child 12036 49f6c49454c2
permissions -rw-r--r--
` -> $
     1 (*  Title:      HOLCF/ex/Loop.thy
     2     ID:         $Id$
     3     Author:     Franz Regensburger
     4     Copyright   1993 Technische Universitaet Muenchen
     5 
     6 Theory for a loop primitive like while
     7 *)
     8 
     9 Loop = Tr +
    10 
    11 consts
    12         step  :: "('a -> tr)->('a -> 'a)->'a->'a"
    13         while :: "('a -> tr)->('a -> 'a)->'a->'a"
    14 
    15 defs
    16 
    17   step_def      "step == (LAM b g x. If b$x then g$x else x fi)"
    18   while_def     "while == (LAM b g. fix$(LAM f x.
    19                    If b$x then f$(g$x) else x fi))"
    20 
    21 end
    22