test/Tools/isac/Knowledge/diophanteq.sml
changeset 60500 59a3af532717
parent 60337 cbad4e18e91b
child 60509 2e0b7ca391dc
equal deleted inserted replaced
60499:d2407e9cb491 60500:59a3af532717
    31     | _ => error "diophanteq.sml: syntax error in rewriting for usecase1"
    31     | _ => error "diophanteq.sml: syntax error in rewriting for usecase1"
    32 val t = case parseNEW ctxt "xxx + 111 = abc + (123::int)" of
    32 val t = case parseNEW ctxt "xxx + 111 = abc + (123::int)" of
    33       SOME t' => t'
    33       SOME t' => t'
    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 Rule_Set.empty true subst 
    36 val SOME (t,_) = rewrite_inst_ ctxt e_rew_ord Rule_Set.empty true subst 
    37   @{thm "int_isolate_add"} t; UnparseC.term t;
    37   @{thm "int_isolate_add"} t; UnparseC.term t;
    38 
    38 
    39 val SOME (thmID,thm) = adhoc_thm thy (the(LibraryC.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; UnparseC.term t;
    40 val SOME (t,_) = rewrite_ ctxt tless_true tval_rls true thm t; UnparseC.term t;
    41 
    41 
    42 val SOME (thmID,thm) = adhoc_thm thy (the(LibraryC.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; UnparseC.term t;
    43 val SOME (t,_) = rewrite_ ctxt tless_true tval_rls true thm t; UnparseC.term 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 -------------------";
    48 val p = e_pos'; val c = [];
    48 val p = e_pos'; val c = [];
    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(LibraryC.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; UnparseC.term t;
    75 val SOME (t,_) = rewrite_ ctxt tless_true tval_rls true thm t; UnparseC.term t;
    76 
    76 
    77 val SOME (thmID,thm) = adhoc_thm thy (the(LibraryC.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; UnparseC.term t;
    78 val SOME (t,_) = rewrite_ ctxt tless_true tval_rls true thm t; UnparseC.term t;
    79 
    79 
    80 
    80 
    81 "----------- mathengine with usecase2 -------------------";
    81 "----------- mathengine with usecase2 -------------------";
    82 "----------- mathengine with usecase2 -------------------";
    82 "----------- mathengine with usecase2 -------------------";
    83 "----------- mathengine with usecase2 -------------------";
    83 "----------- mathengine with usecase2 -------------------";