# HG changeset patch # User haftmann # Date 1244877384 -7200 # Node ID b30570327b760c98a9477f8ef9d9c0747cb02fd0 # Parent a577f77af93f62e9787478e50f48973ab790ceeb more convenient signature for random_fun_lift diff -r a577f77af93f -r b30570327b76 src/HOL/Quickcheck.thy --- a/src/HOL/Quickcheck.thy Thu Jun 11 08:02:27 2009 +0200 +++ b/src/HOL/Quickcheck.thy Sat Jun 13 09:16:24 2009 +0200 @@ -93,15 +93,15 @@ \ (Random.seed \ ('b \ (unit \ term)) \ Random.seed) \ (Random.seed \ Random.seed \ Random.seed) \ Random.seed \ (('a \ 'b) \ (unit \ term)) \ Random.seed" -definition random_fun_lift :: "(code_numeral \ Random.seed \ ('b \ (unit \ term)) \ Random.seed) - \ code_numeral \ Random.seed \ (('a\term_of \ 'b\typerep) \ (unit \ term)) \ Random.seed" where - "random_fun_lift f i = random_fun_aux TYPEREP('a) TYPEREP('b) (op =) Code_Eval.term_of (f i) Random.split_seed" +definition random_fun_lift :: "(Random.seed \ ('b \ (unit \ term)) \ Random.seed) + \ Random.seed \ (('a\term_of \ 'b\typerep) \ (unit \ term)) \ Random.seed" where + "random_fun_lift f = random_fun_aux TYPEREP('a) TYPEREP('b) (op =) Code_Eval.term_of f Random.split_seed" instantiation "fun" :: ("{eq, term_of}", "{type, random}") random begin definition random_fun :: "code_numeral \ Random.seed \ (('a \ 'b) \ (unit \ term)) \ Random.seed" where - "random = random_fun_lift random" + "random i = random_fun_lift (random i)" instance ..