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_ ctxt Rewrite_Ord.function_empty Rule_Set.empty true subst |
36 val SOME (t,_) = rewrite_inst_ ctxt Rewrite_Ord.function_empty 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 ctxt (the(LibraryC.assoc(KEStore_Elems.get_calcs @{theory},"TIMES"))) t; |
40 val SOME (t,_) = rewrite_ ctxt 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 ctxt (the(LibraryC.assoc(KEStore_Elems.get_calcs @{theory},"PLUS"))) t; |
43 val SOME (t,_) = rewrite_ ctxt 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 -------------------"; |
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(LibraryC.assoc(KEStore_Elems.get_calcs @{theory},"TIMES"))) t; |
74 val SOME (thmID,thm) = adhoc_thm ctxt (the(LibraryC.assoc(KEStore_Elems.get_calcs @{theory},"TIMES"))) t; |
75 val SOME (t,_) = rewrite_ ctxt 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 ctxt (the(LibraryC.assoc(KEStore_Elems.get_calcs @{theory},"PLUS"))) t; |
78 val SOME (t,_) = rewrite_ ctxt 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 -------------------"; |