src/smltest/IsacKnowledge/simplify.sml
branchstart_Take
changeset 682 634a6268de81
parent 672 8e8e94006f2c
equal deleted inserted replaced
681:6361fdad1d94 682:634a6268de81
    10 
    10 
    11 "-----------------------------------------------------------------";
    11 "-----------------------------------------------------------------";
    12 "table of contents -----------------------------------------------";
    12 "table of contents -----------------------------------------------";
    13 "-----------------------------------------------------------------";
    13 "-----------------------------------------------------------------";
    14 "----------- CAS-command Simplify --------------------------------";
    14 "----------- CAS-command Simplify --------------------------------";
       
    15 "----------- append inform with final result ---------------------";
    15 "-----------------------------------------------------------------";
    16 "-----------------------------------------------------------------";
    16 "-----------------------------------------------------------------";
    17 "-----------------------------------------------------------------";
    17 "-----------------------------------------------------------------";
    18 "-----------------------------------------------------------------";
    18 
    19 
    19 
    20 
    32 show_pt pt;
    33 show_pt pt;
    33 if p = ([], Res) andalso term2str res = "5 * a" then ()
    34 if p = ([], Res) andalso term2str res = "5 * a" then ()
    34 else raise error "simplify.sml: diff.behav. CAScmd: Simplify (2*a + 3*a)";
    35 else raise error "simplify.sml: diff.behav. CAScmd: Simplify (2*a + 3*a)";
    35 
    36 
    36 
    37 
       
    38 "----------- append inform with final result ---------------------";
       
    39 "----------- append inform with final result ---------------------";
       
    40 "----------- append inform with final result ---------------------";
       
    41 states:=[];
       
    42 CalcTree [(["term ((14 * x * y) / ( x * y ))", "normalform N"],
       
    43 	   ("Rational.thy",["rational","simplification"],
       
    44 	    ["simplification","of_rationals"]))];
       
    45 Iterator 1;
       
    46 moveActiveRoot 1;
       
    47 autoCalculate 1 CompleteCalcHead;
       
    48 autoCalculate 1 (Step 1);
       
    49 appendFormula 1 "14";
       
    50 val ((pt,p),_) = get_calc 1; show_pt pt;
    37 
    51 
    38 
    52 autoCalculate 1 (Step 1);
    39 
    53 val ((pt,p),_) = get_calc 1; show_pt pt;
    40 
    54 val Form res = (#1 o pt_extract) (pt, ([],Res));
    41 
    55 if p = ([], Res) andalso term2str res = "14" then ()
    42 
    56 else raise error "simplify.sml: append inform with final result ?!?";
    43 
       
    44 
       
    45 
       
    46 
       
    47 
       
    48 
       
    49 
       
    50 
       
    51 
       
    52 
       
    53