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 -------------------"; |