| author | paulson |
| Tue, 18 Aug 1998 10:24:54 +0200 | |
| changeset 5330 | 8c9fadda81f4 |
| parent 5183 | 89f162de39cf |
| child 5445 | 3905974ad555 |
| permissions | -rw-r--r-- |
(* Title: Option.thy ID: $Id$ Author: Tobias Nipkow Copyright 1994 TU Muenchen Datatype 'a option *) Option = Datatype + datatype 'a option = None | Some 'a constdefs the :: "'a option => 'a" "the == %y. case y of None => arbitrary | Some x => x" option_map :: "('a => 'b) => ('a option => 'b option)" "option_map == %f y. case y of None => None | Some x => Some (f x)" consts o2s :: "'a option => 'a set" primrec "o2s None = {}" "o2s (Some x) = {x}" end