src/HOLCF/ex/Loop.thy
author obua
Sun, 09 May 2004 23:04:36 +0200
changeset 14722 8e739a6eaf11
parent 12036 49f6c49454c2
child 14981 e73f8140af78
permissions -rw-r--r--
replaced apply-style proof for instance Multiset :: plus_ac0 by recommended Isar proof style

(*  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