src/HOLCF/ex/Loop.thy
author paulson
Mon, 14 Aug 1995 13:42:27 +0200
changeset 1228 7d6b0241afab
parent 1168 74be52691d62
child 1274 ea0668a1c0ba
permissions -rw-r--r--
updated version number to revision 4

(*  Title:	HOLCF/ex/loop.thy
    ID:         $Id$
    Author: 	Franz Regensburger
    Copyright	1993 Technische Universitaet Muenchen

Theory for a loop primitive like while
*)

Loop = Tr2 +

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