1 (* simplification of terms
2 author: Walther Neuper 050912
3 (c) due to copyright terms
6 theory Simplify imports Atools begin
10 (*descriptions in the related problem*)
12 normalform :: "real => una"
15 Simplify :: "real => real" (*"Simplify (1+2a+3+4a)*)
16 Vereinfache :: "real => real" (*"Vereinfache (1+2a+3+4a)*)
19 SimplifyScript :: "[real, real] => real"
20 ("((Script SimplifyScript (_ =))// (_))" 9)
26 (prep_pbt (theory "Simplify") "pbl_simp" [] e_pblID
28 [("#Given" ,["TERM t_"]),
29 ("#Find" ,["normalform n_"])
31 append_rls "e_rls" e_rls [(*for preds in where_*)],
36 (prep_pbt (theory "Simplify") "pbl_vereinfache" [] e_pblID
38 [("#Given" ,["TERM t_"]),
39 ("#Find" ,["normalform n_"])
41 append_rls "e_rls" e_rls [(*for preds in where_*)],
42 SOME "Vereinfache t_",
48 (prep_met (theory "Simplify") "met_simp" [] e_metID
50 [("#Given" ,["TERM t_"]),
51 ("#Find" ,["normalform n_"])
53 {rew_ord'="tless_true",
58 crls = e_rls, nrls = e_rls},
64 (*.function for handling the cas-input "Simplify (2*a + 3*a)":
65 make a model which is already in ptree-internal format.*)
66 (* val (h,argl) = strip_comb (str2term "Simplify (2*a + 3*a)");
67 val (h,argl) = strip_comb ((term_of o the o (parse thy))
68 "Simplify (2*a + 3*a)");
71 [((term_of o the o (parse thy)) "TERM", t),
72 ((term_of o the o (parse thy)) "normalform",
73 [(term_of o the o (parse thy)) "N"])
75 | argl2dtss _ = raise error "Simplify.ML: wrong argument for argl2dtss";
79 [((term_of o the o (parse thy)) "Simplify",
80 (("Isac.thy", ["simplification"], ["no_met"]),
82 ((term_of o the o (parse thy)) "Vereinfache",
83 (("Isac.thy", ["vereinfachen"], ["no_met"]),