test/Tools/isac/Knowledge/diophanteq.sml
changeset 59686 3ce3d089bd64
parent 59592 99c8d2ff63eb
child 59852 ea7e6679080e
equal deleted inserted replaced
59685:08512202c2c6 59686:3ce3d089bd64
    34     | NONE => error "diophanteq.sml: syntax error in rewriting for usecase1";
    34     | NONE => error "diophanteq.sml: syntax error in rewriting for usecase1";
    35 
    35 
    36 val SOME (t,_) = rewrite_inst_ thy e_rew_ord e_rls true subst 
    36 val SOME (t,_) = rewrite_inst_ thy e_rew_ord e_rls true subst 
    37   (num_str @{thm "int_isolate_add"}) t; term2str t;
    37   (num_str @{thm "int_isolate_add"}) t; term2str t;
    38 
    38 
    39 val SOME (thmID,thm) = adhoc_thm thy (the(assoc(KEStore_Elems.get_calcs @{theory},"TIMES"))) t; 
    39 val SOME (thmID,thm) = adhoc_thm thy (the(LibraryC.assoc(KEStore_Elems.get_calcs @{theory},"TIMES"))) t; 
    40 val SOME (t,_) = rewrite_ thy tless_true tval_rls true thm t; term2str t;
    40 val SOME (t,_) = rewrite_ thy tless_true tval_rls true thm t; term2str t;
    41 
    41 
    42 val SOME (thmID,thm) = adhoc_thm thy (the(assoc(KEStore_Elems.get_calcs @{theory},"PLUS"))) t; 
    42 val SOME (thmID,thm) = adhoc_thm thy (the(LibraryC.assoc(KEStore_Elems.get_calcs @{theory},"PLUS"))) t; 
    43 val SOME (t,_) = rewrite_ thy tless_true tval_rls true thm t; term2str t;
    43 val SOME (t,_) = rewrite_ thy tless_true tval_rls true thm t; term2str t;
    44 
    44 
    45 "----------- mathengine with usecase1 -------------------";
    45 "----------- mathengine with usecase1 -------------------";
    46 "----------- mathengine with usecase1 -------------------";
    46 "----------- mathengine with usecase1 -------------------";
    47 "----------- mathengine with usecase1 -------------------";
    47 "----------- mathengine with usecase1 -------------------";
    69 
    69 
    70 val t = case parseNEW ctxt "xxx + abc + -1 * 111 + (123::int)" of
    70 val t = case parseNEW ctxt "xxx + abc + -1 * 111 + (123::int)" of
    71       SOME t' => t'
    71       SOME t' => t'
    72     | NONE => error "diophanteq.sml: syntax error in rewriting for usecase2";
    72     | NONE => error "diophanteq.sml: syntax error in rewriting for usecase2";
    73 
    73 
    74 val SOME (thmID,thm) = adhoc_thm thy (the(assoc(KEStore_Elems.get_calcs @{theory},"TIMES"))) t; 
    74 val SOME (thmID,thm) = adhoc_thm thy (the(LibraryC.assoc(KEStore_Elems.get_calcs @{theory},"TIMES"))) t; 
    75 val SOME (t,_) = rewrite_ thy tless_true tval_rls true thm t; term2str t;
    75 val SOME (t,_) = rewrite_ thy tless_true tval_rls true thm t; term2str t;
    76 
    76 
    77 val SOME (thmID,thm) = adhoc_thm thy (the(assoc(KEStore_Elems.get_calcs @{theory},"PLUS"))) t; 
    77 val SOME (thmID,thm) = adhoc_thm thy (the(LibraryC.assoc(KEStore_Elems.get_calcs @{theory},"PLUS"))) t; 
    78 val SOME (t,_) = rewrite_ thy tless_true tval_rls true thm t; term2str t;
    78 val SOME (t,_) = rewrite_ thy tless_true tval_rls true thm t; term2str t;
    79 
    79 
    80 
    80 
    81 "----------- mathengine with usecase2 -------------------";
    81 "----------- mathengine with usecase2 -------------------";
    82 "----------- mathengine with usecase2 -------------------";
    82 "----------- mathengine with usecase2 -------------------";