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 CompleteCalc;
31 val ((pt,p),_) = get_calc 1;
32 val Form res = (#1 o pt_extract) (pt, ([],Res));
34 if p = ([], Res) andalso term2str res = "5 * a" then ()
35 else raise error "simplify.sml: diff.behav. CAScmd: Simplify (2*a + 3*a)";
38 "----------- append inform with final result ---------------------";
39 "----------- append inform with final result ---------------------";
40 "----------- append inform with final result ---------------------";
42 CalcTree [(["term ((14 * x * y) / ( x * y ))", "normalform N"],
43 ("Rational.thy",["rational","simplification"],
44 ["simplification","of_rationals"]))];
47 autoCalculate 1 CompleteCalcHead;
48 autoCalculate 1 (Step 1);
50 val ((pt,p),_) = get_calc 1; show_pt pt;
52 autoCalculate 1 (Step 1);
53 val ((pt,p),_) = get_calc 1; show_pt pt;
54 val Form res = (#1 o pt_extract) (pt, ([],Res));
55 if p = ([], Res) andalso term2str res = "14" then ()
56 else raise error "simplify.sml: append inform with final result ?!?";