1 (* tests on simplification
4 (c) due to copyright terms
6 use"../smltest/IsacKnowledge/simplify.sml";
9 val thy = Simplify.thy;
11 "-----------------------------------------------------------------";
12 "table of contents -----------------------------------------------";
13 "-----------------------------------------------------------------";
14 "----------- CAS-command Simplify --------------------------------";
15 "----------- append inform with final result ---------------------";
16 "-----------------------------------------------------------------";
17 "-----------------------------------------------------------------";
18 "-----------------------------------------------------------------";
22 "----------- CAS-command Simplify --------------------------------";
23 "----------- CAS-command Simplify --------------------------------";
24 "----------- CAS-command Simplify --------------------------------";
26 CalcTree [([], ("e_domID", ["e_pblID"], ["e_metID"]))];
29 replaceFormula 1 "Simplify (2*a + 3*a)";
30 autoCalculate 1 (Step 1);
31 autoCalculate 1 CompleteCalc;
32 val ((pt,p),_) = get_calc 1;
33 val Form res = (#1 o pt_extract) (pt, ([],Res));
35 if p = ([], Res) andalso term2str res = "5 * a" then ()
36 else error "simplify.sml: diff.behav. CAScmd: Simplify (2*a + 3*a)";
39 "----------- append inform with final result ---------------------";
40 "----------- append inform with final result ---------------------";
41 "----------- append inform with final result ---------------------";
43 CalcTree [(["TERM ((14 * x * y) / ( x * y ))", "normalform N"],
44 ("Rational",["rational","simplification"],
45 ["simplification","of_rationals"]))];
48 autoCalculate 1 CompleteCalcHead;
49 autoCalculate 1 (Step 1);
51 val ((pt,p),_) = get_calc 1; show_pt pt;
53 autoCalculate 1 (Step 1);
54 val ((pt,p),_) = get_calc 1; show_pt pt;
55 val Form res = (#1 o pt_extract) (pt, ([],Res));
56 if p = ([], Res) andalso term2str res = "14" then ()
57 else error "simplify.sml: append inform with final result ?!?";