src/HOLCF/ex/Loop.thy
author berghofe
Mon, 05 Aug 2002 14:32:56 +0200
changeset 13454 01e2496dee05
parent 12036 49f6c49454c2
child 14981 e73f8140af78
permissions -rw-r--r--
Replaced nat_ind_tac by induct_tac.

(*  Title:      HOLCF/ex/Loop.thy
    ID:         $Id$
    Author:     Franz Regensburger
    License:    GPL (GNU GENERAL PUBLIC LICENSE)

Theory for a loop primitive like while
*)

Loop = Tr +

consts
        step  :: "('a -> tr)->('a -> 'a)->'a->'a"
        while :: "('a -> tr)->('a -> 'a)->'a->'a"

defs

  step_def      "step == (LAM b g x. If b$x then g$x else x fi)"
  while_def     "while == (LAM b g. fix$(LAM f x.
                   If b$x then f$(g$x) else x fi))"

end