diff -r 4dc65845eab3 -r d8d7d1b785af src/HOL/UNITY/ProgressSets.thy --- a/src/HOL/UNITY/ProgressSets.thy Wed Feb 24 11:55:52 2010 +0100 +++ b/src/HOL/UNITY/ProgressSets.thy Mon Mar 01 13:40:23 2010 +0100 @@ -19,13 +19,12 @@ subsection {*Complete Lattices and the Operator @{term cl}*} -constdefs - lattice :: "'a set set => bool" +definition lattice :: "'a set set => bool" where --{*Meier calls them closure sets, but they are just complete lattices*} "lattice L == (\M. M \ L --> \M \ L) & (\M. M \ L --> \M \ L)" - cl :: "['a set set, 'a set] => 'a set" +definition cl :: "['a set set, 'a set] => 'a set" where --{*short for ``closure''*} "cl L r == \{x. x\L & r \ x}" @@ -143,12 +142,11 @@ text{*A progress set satisfies certain closure conditions and is a simple way of including the set @{term "wens_set F B"}.*} -constdefs - closed :: "['a program, 'a set, 'a set, 'a set set] => bool" +definition closed :: "['a program, 'a set, 'a set, 'a set set] => bool" where "closed F T B L == \M. \act \ Acts F. B\M & T\M \ L --> T \ (B \ wp act M) \ L" - progress_set :: "['a program, 'a set, 'a set] => 'a set set set" +definition progress_set :: "['a program, 'a set, 'a set] => 'a set set set" where "progress_set F T B == {L. lattice L & B \ L & T \ L & closed F T B L}" @@ -324,12 +322,11 @@ subsubsection {*Lattices and Relations*} text{*From Meier's thesis, section 4.5.3*} -constdefs - relcl :: "'a set set => ('a * 'a) set" +definition relcl :: "'a set set => ('a * 'a) set" where -- {*Derived relation from a lattice*} "relcl L == {(x,y). y \ cl L {x}}" - latticeof :: "('a * 'a) set => 'a set set" +definition latticeof :: "('a * 'a) set => 'a set set" where -- {*Derived lattice from a relation: the set of upwards-closed sets*} "latticeof r == {X. \s t. s \ X & (s,t) \ r --> t \ X}" @@ -405,8 +402,7 @@ subsubsection {*Decoupling Theorems*} -constdefs - decoupled :: "['a program, 'a program] => bool" +definition decoupled :: "['a program, 'a program] => bool" where "decoupled F G == \act \ Acts F. \B. G \ stable B --> G \ stable (wp act B)" @@ -469,8 +465,7 @@ subsection{*Composition Theorems Based on Monotonicity and Commutativity*} subsubsection{*Commutativity of @{term "cl L"} and assignment.*} -constdefs - commutes :: "['a program, 'a set, 'a set, 'a set set] => bool" +definition commutes :: "['a program, 'a set, 'a set, 'a set set] => bool" where "commutes F T B L == \M. \act \ Acts F. B \ M --> cl L (T \ wp act M) \ T \ (B \ wp act (cl L (T\M)))" @@ -511,8 +506,7 @@ text{*Possibly move to Relation.thy, after @{term single_valued}*} -constdefs - funof :: "[('a*'b)set, 'a] => 'b" +definition funof :: "[('a*'b)set, 'a] => 'b" where "funof r == (\x. THE y. (x,y) \ r)" lemma funof_eq: "[|single_valued r; (x,y) \ r|] ==> funof r x = y"