test/Tools/isac/Knowledge/rational-old.sml
branchisac-update-Isa09-2
changeset 38031 460c24a6a6ba
parent 37991 028442673981
child 38043 6a36acec95d9
     1.1 --- a/test/Tools/isac/Knowledge/rational-old.sml	Tue Sep 28 08:58:06 2010 +0200
     1.2 +++ b/test/Tools/isac/Knowledge/rational-old.sml	Tue Sep 28 09:06:56 2010 +0200
     1.3 @@ -12,50 +12,50 @@
     1.4  print("\n\n***** divide tests *****\n");
     1.5  val mv_pquot1 = (#1(mv_division([(1,[1,1,1]),(1,[1,1,0]),(1,[1,0,1]),(1,[0,0,0])],[(1,[1,1,0]),(1,[0,0,0])],LEX_)));
     1.6  (* result: [(1,[0,0,1]),(1,[0,0,0])] *)
     1.7 -if mv_pquot1=[(1,[0,0,1]),(1,[0,0,0])] then () else raise error ("Test failed");
     1.8 +if mv_pquot1=[(1,[0,0,1]),(1,[0,0,0])] then () else error ("Test failed");
     1.9  
    1.10  val mv_prest1 = (#2(mv_division([(1,[1,1,1]),(1,[1,1,0]),(1,[1,0,1]),(1,[0,0,0])],[(1,[1,1,0]),(1,[0,0,0])],LEX_)));
    1.11  (* result: [(1,[1,0,1]),(~1,[0,0,1])] *)
    1.12 -if mv_prest1=[(1,[1,0,1]),(~1,[0,0,1])] then () else raise error ("Test failed");
    1.13 +if mv_prest1=[(1,[1,0,1]),(~1,[0,0,1])] then () else error ("Test failed");
    1.14  
    1.15  val mv_pquot2 = (#1(mv_division([(4,[2]),(8,[1]),(16,[0])],[(1,[1]),(1,[0])],LEX_)));
    1.16  (* result: [(4,[1]),(4,[0])] *)
    1.17 -if mv_pquot2=[(4,[1]),(4,[0])] then () else raise error ("Test failed");
    1.18 +if mv_pquot2=[(4,[1]),(4,[0])] then () else error ("Test failed");
    1.19  
    1.20  val mv_prest2 = (#2(mv_division([(4,[2]),(8,[1]),(16,[0])],[(1,[1]),(1,[0])],LEX_))); 
    1.21  (* result: [(12,[0]] *)
    1.22 -if mv_prest2=[(12,[0])] then () else raise error ("Test failed");
    1.23 +if mv_prest2=[(12,[0])] then () else error ("Test failed");
    1.24  
    1.25  val mv_pquot3 = (#1(mv_division([(4,[2]),(~4,[0])],[(2,[1]),(2,[0])],LEX_)));
    1.26  (* [(2,[1]),(~2,[0])] *)
    1.27 -if mv_pquot3=[(2,[1]),(~2,[0])] then () else raise error ("Test failed");
    1.28 +if mv_pquot3=[(2,[1]),(~2,[0])] then () else error ("Test failed");
    1.29  
    1.30  val mv_prest3 = (#2(mv_division([(1,[2]),(~1,[0])],[(2,[1]),(2,[0])],LEX_)));
    1.31  (* [(1,[2]),(~1,[0])] *)
    1.32 -if mv_prest3=[(1,[2]),(~1,[0])] then () else raise error ("Test failed");
    1.33 +if mv_prest3=[(1,[2]),(~1,[0])] then () else error ("Test failed");
    1.34  
    1.35  val mv_pquot4 = (#1(mv_division([(3,[1,1,1]),(4,[1,0,1]),(3,[0,0,1])],[(2,[1,0,0]),(4,[0,0,1])],LEX_)));
    1.36  (* [(1,[0,1,1])] *)
    1.37 -if mv_pquot4=[(1,[0,1,1])] then () else raise error ("Test failed");
    1.38 +if mv_pquot4=[(1,[0,1,1])] then () else error ("Test failed");
    1.39  
    1.40  val mv_prest4 = (#2(mv_division([(3,[1,1,1]),(4,[1,0,1]),(3,[0,0,1])],[(2,[1,0,0]),(4,[0,0,1])],GGO_)));
    1.41  (* [(1,[1,1,1]),(~4,[0,1,2]),(4,[1,0,1]),(3,[0,0,1])] *)
    1.42 -if mv_prest4 =[(1,[1,1,1]),(~4,[0,1,2]),(4,[1,0,1]),(3,[0,0,1])] then () else raise error ("Test failed");
    1.43 +if mv_prest4 =[(1,[1,1,1]),(~4,[0,1,2]),(4,[1,0,1]),(3,[0,0,1])] then () else error ("Test failed");
    1.44  
    1.45  val mv_pquot5 = (#1(mv_division([(3,[1,1,1]),(4,[1,0,1]),(3,[0,0,1]),(6,[2,1,3]),(4,[0,4,1]),(1,[2,2,1])],[(1,[0,0,1])],LEX_))); 
    1.46  (* [(1,[2,2,0]),(6,[2,1,2]),(3,[1,1,0]),(4,[1,0,0]),(4,[0,4,0]),(3,[0,0,0])]*)
    1.47 -if mv_pquot5=[(1,[2,2,0]),(6,[2,1,2]),(3,[1,1,0]),(4,[1,0,0]),(4,[0,4,0]),(3,[0,0,0])] then () else raise error ("Test failed");
    1.48 +if mv_pquot5=[(1,[2,2,0]),(6,[2,1,2]),(3,[1,1,0]),(4,[1,0,0]),(4,[0,4,0]),(3,[0,0,0])] then () else error ("Test failed");
    1.49  
    1.50  val mv_prest5 = (#2(mv_division([(3,[1,1,1]),(4,[1,0,1]),(3,[0,0,1]),(6,[2,1,3]),(4,[0,4,1]),(1,[2,2,1])],[(1,[0,0,1])],LEX_)));
    1.51  (* [] *)
    1.52 -if mv_prest5=[] then () else raise error ("Test failed");
    1.53 +if mv_prest5=[] then () else error ("Test failed");
    1.54  
    1.55  (* (x^2 + 2(a+1)x + (a^2+2a+1)) / (x+a+1) = x+a+1 *)
    1.56  val mv_pquot6 = (#1(mv_division([(1,[2,0,0]),(2,[1,1,0]),(2,[1,0,0]),(1,[0,2,0]),(2,[0,1,0]),(1,[0,0,0])],[(1,[1,0,0]),(1,[0,1,0]),(1,[0,0,0])],LEX_)));
    1.57 -if mv_pquot6=[(1,[1,0,0]),(1,[0,1,0]),(1,[0,0,0])] then () else raise error ("Test failed");
    1.58 +if mv_pquot6=[(1,[1,0,0]),(1,[0,1,0]),(1,[0,0,0])] then () else error ("Test failed");
    1.59  
    1.60  val mv_prest6 = (#2(mv_division([(1,[2,0,0]),(2,[1,1,0]),(2,[1,0,0]),(1,[0,2,0]),(2,[0,1,0]),(1,[0,0,0])],[(1,[1,0,0]),(1,[0,1,0]),(1,[0,0,0])],LEX_)));
    1.61 -if mv_prest6=[] then () else raise error ("Test failed");
    1.62 +if mv_prest6=[] then () else error ("Test failed");
    1.63  
    1.64  (* Exception tests *)
    1.65  (* mv_division ([(1,[0,0,0])],[(0,[1,2,3])],LEX_); *)
    1.66 @@ -63,115 +63,115 @@
    1.67  print("\n\n***** MV_CONTENT-TESTS *****\n");
    1.68  val mv_cont1=mv_content([(1,[2,1]),(1,[2,0]),(1,[1,1]),(1,[1,0]),(1,[0,1]),(1,[0,0])]); 
    1.69  (* [(1,[0,1]),(1,[0,0])] *)
    1.70 -if  mv_cont1=[(1,[0,1]),(1,[0,0])] then () else raise error ("Test failed");
    1.71 +if  mv_cont1=[(1,[0,1]),(1,[0,0])] then () else error ("Test failed");
    1.72  
    1.73  val mv_pp1=mv_pp([(1,[1,1]),(1,[1,0]),(1,[0,1]),(1,[0,0])]); 
    1.74  (*[(1,[1,0]),(1,[0,0])]*)
    1.75 -if mv_pp1=[(1,[1,0]),(1,[0,0])] then () else raise error ("Test failed");
    1.76 +if mv_pp1=[(1,[1,0]),(1,[0,0])] then () else error ("Test failed");
    1.77  
    1.78  val mv_cont2=mv_content([(2,[1]),(4,[0])]);
    1.79  (* [(2,[0])] *)
    1.80 -if mv_cont2=[(2,[0])] then () else raise error ("Test failed");
    1.81 +if mv_cont2=[(2,[0])] then () else error ("Test failed");
    1.82  
    1.83  val mv_pp2=mv_pp([(2,[1]),(4,[0])]);
    1.84  (* [(1,[1]),(2,[0])] *)
    1.85 -if mv_pp2=[(1,[1]),(2,[0])] then () else raise error ("Test failed");
    1.86 +if mv_pp2=[(1,[1]),(2,[0])] then () else error ("Test failed");
    1.87  
    1.88  val mv_cont3=mv_content[(8,[2,1,1]),(12,[1,0,2]),(10,[2,2,0]),(16,[1,1,1])];
    1.89  (* [(2,[0,0,0])] *)
    1.90 -if mv_cont3=[(2,[0,0,0])] then () else raise error ("Test failed");
    1.91 +if mv_cont3=[(2,[0,0,0])] then () else error ("Test failed");
    1.92  
    1.93  val mv_pp3=mv_pp[(8,[2,1,1]),(12,[1,0,2]),(10,[2,2,0]),(16,[1,1,1])];
    1.94  (* [(5,[2,2,0]),(4,[2,1,1]),(8,[1,1,1]),(6,[1,0,2])] *)
    1.95 -if mv_pp3=[(5,[2,2,0]),(4,[2,1,1]),(8,[1,1,1]),(6,[1,0,2])] then () else raise error ("Test failed");
    1.96 +if mv_pp3=[(5,[2,2,0]),(4,[2,1,1]),(8,[1,1,1]),(6,[1,0,2])] then () else error ("Test failed");
    1.97  
    1.98  val mv_cont4=mv_content[(2,[2,1,0]),(3,[1,0,1]),(2,[1,1,0]),(3,[0,0,1])];
    1.99  (* [(1,[0,0,0])] *)
   1.100 -if mv_cont4=[(1,[0,0,0])] then () else raise error ("Test failed");
   1.101 +if mv_cont4=[(1,[0,0,0])] then () else error ("Test failed");
   1.102  
   1.103  val mv_pp4=mv_pp [(2,[2,1,0]),(3,[1,0,1]),(2,[1,1,0]),(3,[0,0,1])]; 
   1.104  (* [(2,[2,1,0]),(2,[1,1,0]),(3,[1,0,1]),(3,[0,0,1])] *)
   1.105 -if mv_pp4=[(2,[2,1,0]),(2,[1,1,0]),(3,[1,0,1]),(3,[0,0,1])] then () else raise error ("Test failed");
   1.106 +if mv_pp4=[(2,[2,1,0]),(2,[1,1,0]),(3,[1,0,1]),(3,[0,0,1])] then () else error ("Test failed");
   1.107  
   1.108  val con1=mv_content([(9,[2,0]),(15,[1,1]),(12,[1,0]),(6,[0,2]),(12,[0,1])]);
   1.109  (* [(3,[0,0])] *) 
   1.110 -if con1=[(3,[0,0])] then () else raise error ("Test failed");
   1.111 +if con1=[(3,[0,0])] then () else error ("Test failed");
   1.112  
   1.113  val pp1=mv_pp([(9,[2,0]),(15,[1,1]),(12,[1,0]),(6,[0,2]),(12,[0,1])]);
   1.114  (* [(3,[2,0]),(5,[1,1]),(4,[1,0]),(2,[0,2]),(4,[0,1])] *) 
   1.115 -if pp1=[(3,[2,0]),(5,[1,1]),(4,[1,0]),(2,[0,2]),(4,[0,1])] then () else raise error ("Test failed");
   1.116 +if pp1=[(3,[2,0]),(5,[1,1]),(4,[1,0]),(2,[0,2]),(4,[0,1])] then () else error ("Test failed");
   1.117  
   1.118  val con2=mv_content([(1,[2,0]),(1,[1,1]),(1,[1,0]),(1,[0,2]),(1,[0,1])]); 
   1.119  (* [(1,[0,0])] *)
   1.120 -if con2=[(1,[0,0])] then () else raise error ("Test failed");
   1.121 +if con2=[(1,[0,0])] then () else error ("Test failed");
   1.122  
   1.123  val pp2 =mv_pp([(1,[2,0]),(1,[1,1]),(1,[1,0]),(1,[0,2]),(1,[0,1])]); 
   1.124  (* [(1,[2,0]),(1,[1,1]),(1,[1,0]),(1,[0,2]),(1,[0,1])] *)
   1.125 -if pp2=[(1,[2,0]),(1,[1,1]),(1,[1,0]),(1,[0,2]),(1,[0,1])] then () else raise error ("Test failed");
   1.126 +if pp2=[(1,[2,0]),(1,[1,1]),(1,[1,0]),(1,[0,2]),(1,[0,1])] then () else error ("Test failed");
   1.127  
   1.128  val cont1 = mv_content [(1,[2,1,0]),(2,[2,1,0])]; 
   1.129  (* [(3,[0,1,0])] *)
   1.130 -if cont1=[(3,[0,1,0])] then () else raise error ("Test failed");
   1.131 +if cont1=[(3,[0,1,0])] then () else error ("Test failed");
   1.132  
   1.133  val pp1 = mv_pp [(1,[2,1,0]),(2,[2,1,0])]; 
   1.134  (* [(1,[2,0,0])] *)
   1.135 -if pp1=[(1,[2,0,0])] then () else raise error ("Test failed");
   1.136 +if pp1=[(1,[2,0,0])] then () else error ("Test failed");
   1.137  
   1.138  val cont2 = mv_content [(4,[1,2,0]),(2,[2,1,0])]; 
   1.139  (* [(2,[0,1,0])] *)
   1.140 -if cont2=[(2,[0,1,0])] then () else raise error ("Test failed");
   1.141 +if cont2=[(2,[0,1,0])] then () else error ("Test failed");
   1.142  
   1.143  val pp2 = mv_pp [(4,[1,2,0]),(2,[2,1,0])];
   1.144  (* [(1,[2,0,0]),(2,[1,1,0])] *)
   1.145 -if pp2=[(1,[2,0,0]),(2,[1,1,0])] then () else raise error ("Test failed");
   1.146 +if pp2=[(1,[2,0,0]),(2,[1,1,0])] then () else error ("Test failed");
   1.147  
   1.148  print("\n\n\n\n********************************************************\n\n");
   1.149  val cont3=mv_content [(65,[3,2,2]),(52,[3,2,1]),(26,[3,1,2]),(~95,[2,2,3]),(~76,[2,2,2]),(35,[2,2,1]),(28,[2,2,0]),(~38,[2,1,3]),(14,[2,1,1])];
   1.150 -(*if cont3=[(1,[0,1,0])] then () else raise error ("Test failed"); *)
   1.151 +(*if cont3=[(1,[0,1,0])] then () else error ("Test failed"); *)
   1.152  val pp3=mv_pp [(65,[3,2,2]),(52,[3,2,1]),(26,[3,1,2]),(~95,[2,2,3]),(~76,[2,2,2]),(35,[2,2,1]),(28,[2,2,0]),(~38,[2,1,3]),(14,[2,1,1])];
   1.153  
   1.154  
   1.155  print("\n\n***** gcd-tests *****\n"); 
   1.156  val ggt1 = gcd_poly [(4,[2,2]),(8,[1,1]),(4,[0,0])] [(2,[1,1]),(2,[0,0])]; 
   1.157  (* [(2,[1,1]),(2,[0,0])] *)
   1.158 -if ggt1=[(2,[1,1]),(2,[0,0])] then () else raise error ("Test failed");
   1.159 +if ggt1=[(2,[1,1]),(2,[0,0])] then () else error ("Test failed");
   1.160  
   1.161  val ggt2 = gcd_poly [(8,[2,1,1]),(12,[1,0,2]),(10,[2,2,0]),(15,[1,1,1])] [(2,[2,1,0]),(3,[1,0,1]),(2,[1,1,0]),(3,[0,0,1])];
   1.162  (* [(2,[1,1,0]),(3,[0,0,1])] *)
   1.163 -if ggt2=[(2,[1,1,0]),(3,[0,0,1])] then () else raise error ("Test failed");
   1.164 +if ggt2=[(2,[1,1,0]),(3,[0,0,1])] then () else error ("Test failed");
   1.165  
   1.166  val ggt3 = gcd_poly [(1,[2,0,0]),(~2,[1,0,1]),(1,[0,0,2])] [(1,[1,0,0]),(~1,[0,0,1])]; 
   1.167  (* [(1,[1,0,0]),(~1,[0,0,1])] *)
   1.168 -if ggt3=[(1,[1,0,0]),(~1,[0,0,1])] then () else raise error ("Test failed");
   1.169 +if ggt3=[(1,[1,0,0]),(~1,[0,0,1])] then () else error ("Test failed");
   1.170  
   1.171  val ggt4 = gcd_poly [(1,[2,1,0]),(2,[2,1,0])] [(5,[1,0,0])]; 
   1.172  (* [(1,[1,0,0])] *)
   1.173 -if ggt4=[(1,[1,0,0])] then () else raise error ("Test failed");
   1.174 +if ggt4=[(1,[1,0,0])] then () else error ("Test failed");
   1.175  
   1.176  val ggt5 = gcd_poly [(4,[2,0,0]),(~8,[1,0,1]),(4,[0,0,2])] [(1,[2,0,0]),(~1,[0,0,2])]; 
   1.177  (* [(1,[1,0,0]),(~1,[0,0,1])] *)
   1.178 -if ggt5=[(1,[1,0,0]),(~1,[0,0,1])] then () else raise error ("Test failed");
   1.179 +if ggt5=[(1,[1,0,0]),(~1,[0,0,1])] then () else error ("Test failed");
   1.180  
   1.181  val ggt6 = gcd_poly [(10,[2,1,1]),(14,[1,1,0]),(3,[1,0,1]),(20,[1,2,1])] [(5,[1,1,1]),(7,[2,1,1])];
   1.182  (* [(1,[0,0,0])] *)
   1.183 -if ggt6=[(1,[1,0,0])] then () else raise error ("Test failed");
   1.184 +if ggt6=[(1,[1,0,0])] then () else error ("Test failed");
   1.185  
   1.186  val ggt7 = gcd_poly [(~169,[4,3,3]),(273,[4,2,2]),(247,[3,3,4]),(~91,[3,3,2]),(78,[3,3,1]),(~399,[3,2,3]),(147,[3,2,1]),(~114,[2,3,2]),(42,[2,3,0])]  [(65,[3,2,2]),(52,[3,2,1]),(26,[3,1,2]),(~95,[2,2,3]),(~76,[2,2,2]),(35,[2,2,1]),(28,[2,2,0]),(~38,[2,1,3]),(14,[2,1,1])];
   1.187  (* [(13,[3,1,1]),(~19,[2,1,2]),(7,[2,1,0])] *)
   1.188 -if ggt7=[(13,[3,1,1]),(~19,[2,1,2]),(7,[2,1,0])] then () else raise error ("Test failed");
   1.189 +if ggt7=[(13,[3,1,1]),(~19,[2,1,2]),(7,[2,1,0])] then () else error ("Test failed");
   1.190  
   1.191  print("\n\n***** kgv-tests *****\n"); 
   1.192  val kgv1=lcm_poly [(10,[])] [(15,[])];
   1.193  (* [(30,[])] *)
   1.194 -if kgv1=[(30,[])] then () else raise error ("Test failed");
   1.195 +if kgv1=[(30,[])] then () else error ("Test failed");
   1.196  
   1.197  val kgv2=lcm_poly [(1,[2,0,0]),(~2,[1,0,1]),(1,[0,0,2])] [(1,[1,0,0]),(~1,[0,0,1])]; 
   1.198  (* [(1,[2,0,0]),(~2,[1,0,1]),(1,[0,0,2])] *)
   1.199 -if kgv2=[(1,[2,0,0]),(~2,[1,0,1]),(1,[0,0,2])] then () else raise error ("Test failed");
   1.200 +if kgv2=[(1,[2,0,0]),(~2,[1,0,1]),(1,[0,0,2])] then () else error ("Test failed");
   1.201  
   1.202  val kgv3=lcm_poly [(4,[2,0,0]),(~8,[1,0,1]),(4,[0,0,2])] [(1,[2,0,0]),(~1,[0,0,2])]; 
   1.203  (* [(4,[3,0,0]),(~4,[2,0,1]),(~4,[1,0,2]),(4,[0,0,3])] *)
   1.204 -if kgv3=[(4,[3,0,0]),(~4,[2,0,1]),(~4,[1,0,2]),(4,[0,0,3])] then () else raise error ("Test failed");
   1.205 +if kgv3=[(4,[3,0,0]),(~4,[2,0,1]),(~4,[1,0,2]),(4,[0,0,3])] then () else error ("Test failed");
   1.206  
   1.207  (*
   1.208  print("***** TERM2POLY-TESTS *****\n"); 
   1.209 @@ -211,11 +211,11 @@
   1.210  
   1.211  val term1 = (term_of o the o (parse thy)) "(10 * a^^^2 * b * c + 14 * a * b + 3 * a * c + 20 * a * b^^^2 * c) /// a";
   1.212  val div1  = step_cancel term1;
   1.213 -(*if div1 =  (term_of o the o (parse thy)) "((10 * a * b * c + 14 * b + 3 * c + 20 * b^^^2 * c) * a) /// (1 * a)" then () else raise raise error ("Test failed");*)
   1.214 +(*if div1 =  (term_of o the o (parse thy)) "((10 * a * b * c + 14 * b + 3 * c + 20 * b^^^2 * c) * a) /// (1 * a)" then () else raise error ("Test failed");*)
   1.215  
   1.216  val term2 = (term_of o the o (parse thy)) "(10 * a^^^2 * b * c + 14 * a * b + 3 * a * c + 20 * a * b^^^2 * c) /// (5 * a * b * c  +  7 * a^^^2 * b * c) ";
   1.217  val div2  = step_cancel term2;
   1.218 -(*if div2 = ([(10,[1,1,1]),(20,[0,2,1]),(14,[0,1,0]),(3,[0,0,1])],[(1,[1,0,0])],[(7,[1,1,1]),(5,[0,1,1])]) then () else raise raise error ("Test failed");*)
   1.219 +(*if div2 = ([(10,[1,1,1]),(20,[0,2,1]),(14,[0,1,0]),(3,[0,0,1])],[(1,[1,0,0])],[(7,[1,1,1]),(5,[0,1,1])]) then () else raise error ("Test failed");*)
   1.220  
   1.221  
   1.222  val term3 = (term_of o the o (parse thy)) "(10 * a^^^2 * b * c) /// (1 * x * y * z) ";
   1.223 @@ -229,7 +229,7 @@
   1.224  val t1=mv_mul(mul1,mul2,LEX_);
   1.225  val t2=mv_mul(mul3,mul2,LEX_);
   1.226  val div3=step_cancel t1 t2;
   1.227 -if div3=([(5,[0,1,1]),(4,[0,1,0]),(2,[0,0,1])],[(13,[3,1,1]),(~19,[2,1,2]),(7,[2,1,0])],[(~13,[1,2,2]),(21,[1,1,1]),(6,[0,2,0])]) then () else raise error ("Test failed");*)
   1.228 +if div3=([(5,[0,1,1]),(4,[0,1,0]),(2,[0,0,1])],[(13,[3,1,1]),(~19,[2,1,2]),(7,[2,1,0])],[(~13,[1,2,2]),(21,[1,1,1]),(6,[0,2,0])]) then () else error ("Test failed");*)
   1.229  
   1.230  print("\n\n***** all tests successfull ;-) ******\n\n");
   1.231  
   1.232 @@ -247,7 +247,7 @@
   1.233  val t' = "(1 + 1 * a ^^^ 1)///(-2 + 2 * a ^^^ 2)";
   1.234  val (t',asm') = the (rewrite_set thy' "eval_rls" false rls' t');
   1.235  (*if t' = "1 /// (-2 + 2 * a)" then ()
   1.236 -else raise error "tests/rationals.sml(1): new behaviour";*)
   1.237 +else error "tests/rationals.sml(1): new behaviour";*)
   1.238  
   1.239  
   1.240  val thy' = "Rational";
   1.241 @@ -311,7 +311,7 @@
   1.242  val e188a = the (rewrite_set thy' "rational_erls" false rls' e188a');
   1.243  val SOME (t,_) = rewrite_set thy' "rational_erls" false mp "(8*((-1) + x))/(9*((-1) + x))";
   1.244  if t="((-8) + 8 * x) / ((-9) + 9 * x)"then()
   1.245 -else raise error "rationals.sml: e188a new behaviour";
   1.246 +else error "rationals.sml: e188a new behaviour";
   1.247  print("b)\n");
   1.248  val e188b'="(5 * x + -15) / (6 * x + -18 )";
   1.249  val e188b = the (rewrite_set thy' "rational_erls" false rls' e188b');
   1.250 @@ -320,7 +320,7 @@
   1.251  val e188c = the (rewrite_set thy' "rational_erls" false rls' e188c');
   1.252  val SOME (t,_) = rewrite_set thy' "rational_erls" false mp "((-1)*(b + (-1) * a))/(1*(b + (-1) * a))";
   1.253  if t="(a + -1 * b) / (b + -1 * a)"then()
   1.254 -else raise error "rationals.sml: e188c new behaviour";
   1.255 +else error "rationals.sml: e188c new behaviour";
   1.256  
   1.257  print("\n\nexample 190:\n");
   1.258  print("c)\n");
   1.259 @@ -329,7 +329,7 @@
   1.260  val SOME (t,_) = rewrite_set thy' "rational_erls" false mp "((1 + 9 * a ^^^ 2)*(1 + 3 * a))/((3 * a + 9 * a ^^^ 2)*(1 + 3 * a))";
   1.261  if t="(1 + (3 * a + (27 * a ^^^ 3 + 9 * a ^^^ 2))) /\n(3 * a + (18 * a ^^^ 2 + 27 * a ^^^ 3))"then()
   1.262  (*TERMORDER               ~~~~~~~       ~~~~~~~*)
   1.263 -else raise error "rationals.sml: e190c new behaviour";
   1.264 +else error "rationals.sml: e190c new behaviour";
   1.265  
   1.266  print("\n\nexample 191:\n");
   1.267  print("a)\n");
   1.268 @@ -337,13 +337,13 @@
   1.269  val e191a = the (rewrite_set thy' "rational_erls" false rls' e191a'); 
   1.270  val SOME (t,_) = rewrite_set thy' "rational_erls" false mp "((x + (-1) * y)*(x + y))/((1)*(x + y))";
   1.271  if t="(x ^^^ 2 + -1 * y ^^^ 2) / (x + y)"then()
   1.272 -else raise error "rationals.sml: e191a new behaviour";
   1.273 +else error "rationals.sml: e191a new behaviour";
   1.274  print("c)\n");
   1.275  val e191c'="( 9 * x^^^2 + -30 * x + 25 ) / ( 9 * x^^^2 + -25 )";
   1.276  val e191c = the (rewrite_set thy' "rational_erls" false rls' e191c');
   1.277  val SOME (t,_) = rewrite_set thy' "rational_erls" false mp "(((-5) + 3 * x)*((-5) + 3 * x))/((5 + 3 * x)*((-5) + 3 * x))";
   1.278  if t="(25 + ((-30) * x + 9 * x ^^^ 2)) / ((-25) + 9 * x ^^^ 2)"then()
   1.279 -else raise error "rationals.sml: 'e191c' new behaviour";
   1.280 +else error "rationals.sml: 'e191c' new behaviour";
   1.281  
   1.282  print("\n\nexample 192:\n");
   1.283  print("b)\n");
   1.284 @@ -352,7 +352,7 @@
   1.285  val SOME (t,_) = rewrite_set thy' "rational_erls" false mp "((x ^^^ 2)*(7 * x + (-1) * y))/((y ^^^ 2)*(7 * x + (-1) * y))";
   1.286  if t="(7 * x ^^^ 3 + -1 * (y * x ^^^ 2)) / (-1 * y ^^^ 3 + 7 * (x * y ^^^ 2))"then()
   1.287  (*TERMORDER                ~~~~~*)
   1.288 -else raise error "rationals.sml: 'e192b' new behaviour";
   1.289 +else error "rationals.sml: 'e192b' new behaviour";
   1.290  
   1.291  print("\n\nexample 193:\n");
   1.292  print("a)\n");
   1.293 @@ -595,7 +595,7 @@
   1.294  val est1'="(7) / (-14) + (-2) / (4)";
   1.295  val est1 = the (rewrite_set thy' "rational_erls" false rls' est1');
   1.296  if est1 = ("(-1) / 1",[]) then ()
   1.297 -else raise error "new behaviour in rationals.sml: est1'";
   1.298 +else error "new behaviour in rationals.sml: est1'";
   1.299  -------------------------------------------------------------------------*)
   1.300  
   1.301  
   1.302 @@ -669,7 +669,7 @@
   1.303    val (r,(t,asm))::_ = loc revsets t r;
   1.304    val ss = term2str t;
   1.305    if ss = "(3 - x) / (3 + x)" then ()
   1.306 -  else raise error "rational.sml: new behav. in rev-set cancel";
   1.307 +  else error "rational.sml: new behav. in rev-set cancel";
   1.308    terms2str asm; 
   1.309  
   1.310