1 (* simplification of terms
2 author: Walther Neuper 050912
3 (c) due to copyright terms
6 theory Simplify imports Base_Tools begin
10 (*descriptions in the related problem*)
11 Term :: "real => una" (*"term" is a keyword in *.thy*)
12 normalform :: "real => una"
15 Simplify :: "real => real" (*"Simplify (1+2a+3+4a)*)
16 Vereinfache :: "real => real" (*"Vereinfache (1+2a+3+4a)*)
20 problem pbl_simp : "simplification" =
21 \<open>Rule_Set.append_rules "empty" Rule_Set.empty [(*for preds in where_*)]\<close>
24 Find: "normalform n_n"
26 problem pbl_vereinfache : "vereinfachen" =
27 \<open>Rule_Set.append_rules "empty" Rule_Set.empty [(*for preds in where_*)]\<close>
28 CAS: "Vereinfache t_t"
30 Find: "normalform n_n"
34 method met_tsimp : "simplification" =
35 \<open>{rew_ord'="tless_true", rls'= Rule_Set.empty, calc = [], srls = Rule_Set.empty, prls=Rule_Set.empty, crls = Rule_Set.empty,
36 errpats = [], nrls = Rule_Set.empty}\<close>
38 Find: "normalform n_n"
44 (*.function for handling the cas-input "Simplify (2*a + 3*a)":
45 make a model which is already in ctree-internal format.*)
46 (* val (h,argl) = strip_comb (TermC.parse_test @{context} "Simplify (2*a + 3*a)");
47 val (h,argl) = strip_comb ((Thm.term_of o the o (parse (Thy_Info_get_theory "Simplify")))
48 "Simplify (2*a + 3*a)");
51 [((TermC.parseNEW''\<^theory>) "Term", t),
52 ((TermC.parseNEW''\<^theory>) "normalform",
53 [(TermC.parseNEW''\<^theory>) "N"])
55 (*| argl2dtss _ = raise ERROR "Simplify.ML: wrong argument for argl2dtss"*);
57 cas Simplify = \<open>argl2dtss\<close>
58 Problem_Ref: "simplification"
59 cas Vereinfache = \<open>argl2dtss\<close>
60 Problem_Ref: "vereinfachen"