1 (* 6.8.02 change to Isabelle2002 caused error -- thy excluded !
3 Proving equations for primrec function(s) "InsSort.foldr" ...
4 GC #1.17.30.54.345.21479: (10 ms)
5 *** Definition of InsSort.ins :: "['a::ord list, 'a::ord] => 'a::ord list"
6 *** imposes additional sort constraints on the declared type of the constant
7 *** The error(s) above occurred in definition "InsSort.ins.ins_list_def"
10 (* tools for insertion sort
11 use"Knowledge/InsSort.ML";
14 (** interface isabelle -- isac **)
16 theory' := (!theory') @ [("InsSort.thy",InsSort.thy)];
20 val ins_sort = prep_rls(
21 Rls{preconds = [], rew_ord = ("tless_true",tless_true),
22 rules = [Thm ("foldr_base",(*num_str*) foldr_base),
23 Thm ("foldr_rec",foldr_rec),
24 Thm ("ins_base",ins_base),
25 Thm ("ins_rec",ins_rec),
26 Thm ("sort_def",sort_def),
28 Calc ("op <",eval_equ "#less_"),
29 Thm ("if_True", if_True),
30 Thm ("if_False", if_False)
32 scr = Script ((term_of o the o (parse thy))
40 (["functional"]:pblID,
41 [("#Given" ,["unsorted u_"]),
42 ("#Find" ,["sorted s_"])
48 (["inssort","functional"]:pblID,
49 [("#Given" ,["unsorted u_"]),
50 ("#Find" ,["sorted s_"])
55 todo: implementation needs extra object-level lists **)
61 {rew_ord'="tless_true",rls'=Atools_erls,calc = [], srls = e_rls, prls=e_rls,
62 crls = Atools_rls, nrls=norm_Rational
63 (*, asm_rls=[],asm_thm=[]*)}, "empty_script"));
65 (prep_met InsSort.thy (*test-version for [#1,#3,#2] only: see *.sml*)
66 (["InsSort""sort"]:metID,
67 [("#Given" ,["unsorted u_"]),
68 ("#Find" ,["sorted s_"])
70 {rew_ord'="tless_true",rls'=eval_rls,calc = [], srls = e_rls, prls=e_rls,
71 crls = eval_rls, nrls=norm_Rational(*,asm_rls=[],asm_thm=[]*)},
72 "Script Sort (u_::'a list) = (Rewrite_Set ins_sort False) u_"
75 ruleset' := overwritelthy thy (!ruleset',
76 [(*("ins_sort",ins_sort) overwrites a Isa fun!!*)
77 ]:(string * rls) list);