Changeset 70d85d9 in git


Ignore:
Timestamp:
Jun 24, 2016, 2:21:15 PM (8 years ago)
Author:
Hans Schoenemann <hannes@…>
Branches:
(u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
Children:
49b1d561b337477d7c4460a18a597959bfa826b4
Parents:
c8c67bfd5037e9cdc3f9c852fe5185ed2085fae2
Message:
chg: error checking
File:
1 edited

Legend:

Unmodified
Added
Removed
  • Singular/LIB/finvar.lib

    rc8c67b r70d85d9  
    11//////////////////////////////////////////////////////////////////////////////
    2 version="version finvar.lib 4.0.1.1 Dec_2104 "; // $Id$
     2version="version finvar.lib 4.0.3.2 June_2016 "; // $Id$
    33category="Invariant theory";
    44info="
     
    101101"
    102102{ if (i<=0)
    103   { "ERROR:   the input should be > 0.";
    104     return();
    105   }
     103  { ERROR("the input should be > 0"); }
    106104  poly v1=var(1);
    107105  if (i==1)
    108   { return(v1-1);                      // 1-st cyclotomic polynomial
    109   }
     106  { return(v1-1); }                    // 1-st cyclotomic polynomial
    110107  poly min=v1^i-1;
    111108  matrix s[1][2];
     
    172169  if (typeof(#[size(#)])=="int")
    173170  { if (size(#)==1)
    174     { "ERROR:   there are no matrices given among the parameters";
    175       return();
    176     }
     171    { ERROR("there are no matrices given among the parameters"); }
    177172    int v=#[size(#)];
    178173    gen_num=size(#)-1;
     
    183178  }
    184179  if (typeof(#[1])<>"matrix")
    185   { "ERROR:   The parameters must be a list of matrices and maybe an <int>";
    186     return();
    187   }
     180  { ERROR("The parameters must be a list of matrices and maybe an <int>"); }
    188181  int n=nrows(#[1]);
    189182  if (n<>nvars(basering))
    190   { "ERROR:   the number of variables of the basering needs to be the same";
    191     "         as the dimension of the matrices";
    192     return();
    193   }
     183  { ERROR("the number of variables of the basering needs to be the same as the dimension of the matrices"); }
    194184  if (n<>ncols(#[1]))
    195   { "ERROR:   matrices need to be square and of the same dimensions";
    196     return();
    197   }
     185  { ERROR("matrices need to be square and of the same dimensions"); }
    198186  matrix vars=matrix(maxideal(1));     // creating an nx1-matrix containing the
    199187  vars=transpose(vars);                // variables of the ring -
     
    220208                                       // procedure
    221209    if (not(typeof(#[j])=="matrix"))
    222     { "ERROR:   The parameters must be a list of matrices and maybe an <int>";
    223       return();
    224     }
     210    { ERROR("The parameters must be a list of matrices and maybe an <int>"); }
    225211    if ((n!=nrows(#[j])) or (n!=ncols(#[j])))
    226     { "ERROR:   matrices need to be square and of the same dimensions";
    227        return();
    228     }
     212    { ERROR("matrices need to be square and of the same dimensions"); }
    229213    if (unique(G(1..i),#[j]))
    230214    { i++;
     
    390374    { int mol_flag=#[size(#)][1];
    391375      if (#[size(#)][2]<0 && (ch==0 or (ch<>0 && mol_flag<>0)))
    392       { "ERROR:   the second component of <intvec> should be >=0"
    393         return();
    394       }
     376      { ERROR("the second component of <intvec> should be >=0"); }
    395377      int interval=#[size(#)][2];
    396378      int v=#[size(#)][3];
    397379    }
    398380    else
    399     { "ERROR:   <intvec> should have three components";
    400       return();
    401     }
     381    { ERROR("<intvec> should have three components"); }
    402382    if (ch<>0)
    403383    { if (typeof(#[size(#)-1])=="int")
    404384      { int r=#[size(#)-1];
    405385        if (typeof(#[size(#)-2])<>"string")
    406         { "ERROR:   In characteristic p>0 a <string> must be given for the name of a new";
    407           "         ring where the Molien series can be stored";
    408           return();
    409         }
     386        { ERROR("In characteristic p>0 a <string> must be given for the name of a new ring where the Molien series can be stored"); }
    410387        else
    411388        { if (#[size(#)-2]=="")
    412           { "ERROR:   <string> may not be empty";
    413             return();
    414           }
     389          { ERROR("<string> may not be empty"); }
    415390          string newring=#[size(#)-2];
    416391          g=size(#)-3;
     
    419394      else
    420395      { if (typeof(#[size(#)-1])<>"string")
    421         { "ERROR:   In characteristic p>0 a <string> must be given for the name of a new";
    422           "         ring where the Molien series can be stored";
    423           return();
    424         }
     396        { ERROR("In characteristic p>0 a <string> must be given for the name of a new ring where the Molien series can be stored"); }
    425397        else
    426398        { if (#[size(#)-1]=="")
    427           { "ERROR:   <string> may not be empty";
    428             return();
    429           }
     399          { ERROR("<string> may not be empty"); }
    430400          string newring=#[size(#)-1];
    431401          g=size(#)-2;
     
    446416      { int r=#[size(#)];
    447417        if (typeof(#[size(#)-1])<>"string")
    448         { "ERROR:   in characteristic p>0 a <string> must be given for the name of a new";
    449           "         ring where the Molien series can be stored";
     418        { ERROR("in characteristic p>0 a <string> must be given for the name of a new ring where the Molien series can be stored");
    450419            return();
    451420        }
    452421        else
    453422        { if (#[size(#)-1]=="")
    454           { "ERROR:   <string> may not be empty";
    455             return();
    456           }
     423          { ERROR("<string> may not be empty"); }
    457424          string newring=#[size(#)-1];
    458425          g=size(#)-2;
     
    461428      else
    462429      { if (typeof(#[size(#)])<>"string")
    463         { "ERROR:   in characteristic p>0 a <string> must be given for the name of a new";
    464           "         ring where the Molien series can be stored";
    465           return();
    466         }
     430        { ERROR("in characteristic p>0 a <string> must be given for the name of a new ring where the Molien series can be stored"); }
    467431        else
    468432        { if (#[size(#)]=="")
    469           { "ERROR:   <string> may not be empty";
    470             return();
    471           }
     433          { ERROR("<string> may not be empty"); }
    472434          string newring=#[size(#)];
    473435          g=size(#)-1;
     
    482444  if (ch<>0)
    483445  { if ((g div r)*r<>g)
    484    { "ERROR:   <int> should divide the group order."
    485       return();
    486     }
     446   { ERROR("<int> should divide the group order."); }
    487447  }
    488448  if (ch<>0)
     
    518478 //----------------------------------------------------------------------------
    519479  if (not(typeof(#[1])=="matrix"))
    520   { "ERROR:   the parameters must be a list of matrices and maybe an <intvec>";
    521     return();
    522   }
     480  { ERROR("the parameters must be a list of matrices and maybe an <intvec>"); }
    523481  int n=nrows(#[1]);
    524482  if (n<>nvars(br))
    525   { "ERROR:   the number of variables of the basering needs to be the same";
    526     "         as the dimension of the square matrices";
    527     return();
    528   }
     483  { ERROR("the number of variables of the basering needs to be the same as the dimension of the square matrices"); }
    529484  if (v && voice<>2)
    530485  { "";
     
    551506    for (int j=1;j<=g;j++)
    552507    { if (not(typeof(#[j])=="matrix"))
    553       { "ERROR:   the parameters must be a list of matrices and maybe an <intvec>";
    554         return();
    555       }
     508      { ERROR("the parameters must be a list of matrices and maybe an <intvec>"); }
    556509      if ((n<>nrows(#[j])) or (n<>ncols(#[j])))
    557       { "ERROR:   matrices need to be square and of the same dimensions";
    558          return();
    559       }
     510      { ERROR("matrices need to be square and of the same dimensions"); }
    560511      p=det(I-v1*#[j]);                // denominator of new term -
    561512      M[1,1]=M[1,1]*p+M[1,2];          // expanding M[1,1]/M[1,2] + 1/p
     
    648599      { setring br;
    649600        if (not(typeof(#[i])=="matrix"))
    650         { "ERROR:   the parameters must be a list of matrices and maybe an <intvec>";
    651           return();
    652         }
     601        { ERROR("the parameters must be a list of matrices and maybe an <intvec>"); }
    653602        if ((n<>nrows(#[i])) or (n<>ncols(#[i])))
    654         { "ERROR:   matrices need to be square and of the same dimensions";
    655            return();
    656         }
     603        { ERROR("matrices need to be square and of the same dimensions"); }
    657604        setring bre;
    658605        p=det(xI-f2(G(i)));           // characteristic polynomial of G(i)
     
    809756    { setring br;
    810757      if (not(typeof(#[i])=="matrix"))
    811       { "ERROR:   the parameters must be a list of matrices and maybe an <intvec>";
    812         return();
    813       }
     758      { ERROR("the parameters must be a list of matrices and maybe an <intvec>"); }
    814759      if ((n<>nrows(#[i])) or (n<>ncols(#[i])))
    815       { "ERROR:   matrices need to be square and of the same dimensions";
    816          return();
    817       }
     760      { ERROR("matrices need to be square and of the same dimensions"); }
    818761      string stM(i)=string(#[i]);
    819762      for (j=1;j<=size(stM(i));j++)
     
    936879    { int mol_flag=#[size(#)][1];
    937880      if (#[size(#)][2]<0 && (ch==0 or (ch<>0 && mol_flag<>0)))
    938       { "ERROR:   the second component of the <intvec> should be >=0";
    939         return();
    940       }
     881      { ERROR("the second component of the <intvec> should be >=0"); }
    941882      int interval=#[size(#)][2];
    942883      int v=#[size(#)][3];
    943884    }
    944885    else
    945     { "ERROR:   <intvec> should have three components";
    946       return();
    947     }
     886    { ERROR("<intvec> should have three components"); }
    948887    if (ch<>0)
    949888    { if (typeof(#[size(#)-1])<>"string")
    950       { "ERROR:   in characteristic p a <string> must be given for the name";
    951         "         of a new ring where the Molien series can be stored";
    952         return();
    953       }
     889      { ERROR("in characteristic p a <string> must be given for the name of a new ring where the Molien series can be stored"); }
    954890      else
    955891      { if (#[size(#)-1]=="")
    956         { "ERROR:   <string> may not be empty";
    957           return();
    958         }
     892        { ERROR("<string> may not be empty"); }
    959893        string newring=#[size(#)-1];
    960894        gen_num=size(#)-2;
     
    971905    if (ch<>0)
    972906    { if (typeof(#[size(#)])<>"string")
    973       { "ERROR:   in characteristic p a <string> must be given for the name";
    974         "         of a new ring where the Molien series can be stored";
    975         return();
    976       }
     907      { ERROR("in characteristic p a <string> must be given for the name of a new ring where the Molien series can be stored"); }
    977908      else
    978909      { if (#[size(#)]=="")
    979         { "ERROR:   <string> may not be empty";
    980           return();
    981         }
     910        { ERROR("<string> may not be empty"); }
    982911        string newring=#[size(#)];
    983912        gen_num=size(#)-1;
     
    1029958  if (ch==0)
    1030959  { if (typeof(#[1])<>"matrix")
    1031     { "ERROR:   the parameters must be a list of matrices and maybe an <intvec>";
    1032       return();
    1033     }
     960    { ERROR("the parameters must be a list of matrices and maybe an <intvec>"); }
    1034961    int n=nrows(#[1]);
    1035962    if (n<>nvars(br))
    1036     { "ERROR:   the number of variables of the basering needs to be the same";
    1037       "         as the dimension of the matrices";
    1038       return();
    1039     }
     963    { ERROR("the number of variables of the basering needs to be the same as the dimension of the matrices"); }
    1040964    if (n<>ncols(#[1]))
    1041     { "ERROR:   matrices need to be square and of the same dimensions";
    1042       return();
    1043     }
     965    { ERROR("matrices need to be square and of the same dimensions"); }
    1044966    matrix vars=matrix(maxideal(1));   // creating an nx1-matrix containing the
    1045967    vars=transpose(vars);              // variables of the ring -
     
    1066988                                       // procedure
    1067989      if (not(typeof(#[j])=="matrix"))
    1068       { "ERROR:   the parameters must be a list of matrices and maybe an <intvec>";
    1069         return();
    1070       }
     990      { ERROR("the parameters must be a list of matrices and maybe an <intvec>"); }
    1071991      if ((n!=nrows(#[j])) or (n!=ncols(#[j])))
    1072       { "ERROR:   matrices need to be square and of the same dimensions";
    1073          return();
    1074       }
     992      { ERROR("matrices need to be square and of the same dimensions"); }
    1075993      if (unique(G(1..i),#[j]))
    1076994      { i++;
     
    11891107  else                                 // if ch<>0 and mol_flag<>0
    11901108  { if (typeof(#[1])<>"matrix")
    1191     { "ERROR:   the parameters must be a list of matrices and maybe an <intvec>";
    1192       return();
    1193     }
     1109    { ERROR("the parameters must be a list of matrices and maybe an <intvec>"); }
    11941110    int n=nrows(#[1]);
    11951111    if (n<>nvars(br))
    1196     { "ERROR:   the number of variables of the basering needs to be the same";
    1197       "         as the dimension of the matrices";
    1198       return();
    1199     }
     1112    { ERROR("the number of variables of the basering needs to be the same as the dimension of the matrices"); }
    12001113    if (n<>ncols(#[1]))
    1201     { "ERROR:   matrices need to be square and of the same dimensions";
    1202       return();
    1203     }
     1114    { ERROR("matrices need to be square and of the same dimensions"); }
    12041115    matrix vars=matrix(maxideal(1));   // creating an nx1-matrix containing the
    12051116    vars=transpose(vars);              // variables of the ring -
     
    12641175      setring br;
    12651176      if (not(typeof(#[j])=="matrix"))
    1266       { "ERROR:   the parameters must be a list of matrices and maybe an <intvec>";
    1267         return();
    1268       }
     1177      { ERROR("the parameters must be a list of matrices and maybe an <intvec>"); }
    12691178      if ((n!=nrows(#[j])) or (n!=ncols(#[j])))
    1270       { "ERROR:   matrices need to be square and of the same dimensions";
    1271          return();
    1272       }
     1179      { ERROR("matrices need to be square and of the same dimensions"); }
    12731180      if (unique(G(1..i),#[j]))
    12741181      { i++;
     
    14611368                                       // the intermediate result
    14621369  if (char(basering)<>0)
    1463   { "ERROR:   you have to change to a basering of characteristic 0, one in";
    1464     "         which the Molien series is defined";
    1465   }
     1370  { ERROR("you have to change to a basering of characteristic 0, one in which the Molien series is defined"); }
    14661371  if (ncols(M)==2 && nrows(M)==1 && n>0 && size(#)<2)
    14671372  { def br=basering;                   // keeping track of the old ring
     
    14691374    matrix s=slead(M);
    14701375    if (s[1,1]<>1 || s[1,2]<>1)
    1471     { "ERROR:   the constant terms of enumerator and denominator are not 1";
    1472       return();
    1473     }
     1376    { ERROR("the constant terms of enumerator and denominator are not 1"); }
    14741377
    14751378    if (size(#)==0)
     
    14831386      }                               // with its smallest term
    14841387      else
    1485       { "ERROR:   <poly> as third parameter expected";
    1486         return();
    1487       }
     1388      { ERROR("<poly> as third parameter expected"); }
    14881389    }
    14891390    poly A(1)=M[1,2];                 // denominator of Molien series (for now)
     
    15091410  }
    15101411  else
    1511   { "ERROR:   the first parameter has to be a 1x2-matrix, i.e. the matrix";
    1512     "         returned by the procedure 'reynolds_molien', the second one";
    1513     "         should be > 0 and there should be no more than 3 parameters;"
    1514     return();
     1412  { ERROR("the first parameter has to be a 1x2-matrix, i.e. the matrix
     1413         returned by the procedure 'reynolds_molien', the second one
     1414         should be > 0 and there should be no more than 3 parameters;)";
    15151415  }
    15161416}
     
    15611461  }
    15621462  else
    1563   { "ERROR:   the number of columns in the <matrix> should be the same as the";
    1564     "         number of variables in the basering; in fact it should be first";
    1565     "         return value of group_reynolds() or reynolds_molien().";
     1463  { ERROR("the number of columns in the <matrix> should be the same as the
     1464         number of variables in the basering; in fact it should be first
     1465         return value of group_reynolds() or reynolds_molien().");
    15661466    return();
    15671467  }
     
    15891489"
    15901490{ if (g<=0)
    1591   { "ERROR:   the first parameter should be > 0";
     1491  { ERROR("the first parameter should be > 0");
    15921492    return();
    15931493  }
     
    16081508      }
    16091509      else
    1610       { "ERROR:   the number of variables of the base ring needs to be the same";
    1611         "         as the dimension of the square matrices";
    1612         return();
    1613       }
     1510      { ERROR("the number of variables of the base ring needs to be the same as the dimension of the square matrices"); }
    16141511    }
    16151512    else
    1616     { "ERROR:   the last parameters should be a list of matrices";
    1617       return();
    1618     }
     1513    { ERROR("the last parameters should be a list of matrices"); }
    16191514  }
    16201515 //----------------------------------------------------------------------------
     
    17301625  }
    17311626  if (ncols(REY)<>nvars(basering))
    1732   { "ERROR:   the number of columns in the <matrix> should be the same as the";
    1733     "         number of variables in the basering; in fact it should be first";
    1734     "         return value of group_reynolds() or reynolds_molien().";
    1735     return();
     1627  { ERROR("the number of columns in the <matrix> should be the same as the
     1628         number of variables in the basering; in fact it should be first
     1629         return value of group_reynolds() or reynolds_molien().");
    17361630  }
    17371631 //----------------------------------------------------------------------------
     
    20981992{ degBound=0;
    20991993  if (char(basering)<>0)
    2100   { "ERROR:   primary_char0 should only be used with rings of characteristic 0.";
    2101     return();
    2102   }
     1994  { ERROR("primary_char0 should only be used with rings of characteristic 0."); }
    21031995 //----------------- checking input and setting verbose mode ------------------
    21041996  if (size(#)>1)
    2105   { "ERROR:   primary_char0 can only have three parameters.";
    2106     return();
    2107   }
     1997  { ERROR("primary_char0 can only have three parameters."); }
    21081998  if (size(#)==1)
    21091999  { if (typeof(#[1])<>"int")
    2110     { "ERROR:   The third parameter should be of type <int>.";
    2111       return();
    2112     }
     2000    { ERROR("The third parameter should be of type <int>."); }
    21132001    else
    2114     { int v=#[1];
    2115     }
     2002    { int v=#[1]; }
    21162003  }
    21172004  else
    2118   { int v=0;
    2119   }
     2005  { int v=0; }
    21202006  int n=nvars(basering);               // n is the number of variables, as well
    21212007                                       // as the size of the matrices, as well
     
    21232009                                       // we should get
    21242010  if (ncols(REY)<>n)
    2125   { "ERROR:   First parameter ought to be the Reynolds operator."
    2126     return();
    2127   }
     2011  { ERROR("First parameter ought to be the Reynolds operator."); }
    21282012  if (ncols(M)<>2 or nrows(M)<>1)
    2129   { "ERROR:   Second parameter ought to be the Molien series."
    2130     return();
    2131   }
     2013  { ERROR("Second parameter ought to be the Molien series."); }
    21322014 //----------------------------------------------------------------------------
    21332015  if (v && voice<>2)
     
    22422124// ---------------- checking input and setting verbose mode -------------------
    22432125  if (char(basering)==0)
    2244   { "ERROR:   primary_charp should only be used with rings of characteristic p>0.";
    2245     return();
    2246   }
     2126  { ERROR("primary_charp should only be used with rings of characteristic p>0"); }
    22472127  if (size(#)>1)
    2248   { "ERROR:   primary_charp can only have three parameters.";
    2249     return();
    2250   }
     2128  { ERROR("primary_charp can only have three parameters"); }
    22512129  if (size(#)==1)
    22522130  { if (typeof(#[1])<>"int")
    2253     { "ERROR:   The third parameter should be of type <int>.";
    2254       return();
    2255     }
     2131    { ERROR("The third parameter should be of type <int>"); }
    22562132    else
    2257     { int v=#[1];
    2258     }
     2133    { int v=#[1]; }
    22592134  }
    22602135  else
    2261   { int v=0;
    2262   }
     2136  { int v=0; }
    22632137  def br=basering;
    22642138  int n=nvars(br);                     // n is the number of variables, as well
     
    22672141                                       // we should get
    22682142  if (ncols(REY)<>n)
    2269   { "ERROR:   First parameter ought to be the Reynolds operator."
    2270     return();
    2271   }
     2143  { ERROR("First parameter ought to be the Reynolds operator"): }
    22722144  if (typeof(`ring_name`)<>"ring")
    2273   { "ERROR:   Second parameter ought to be ring where ";
    2274     "         the Molien series is stored.";
    2275     return();
    2276   }
     2145  { ERROR("Second parameter ought to be ring where the Molien series is stored"); }
    22772146 //----------------------------------------------------------------------------
    22782147  if (v && voice<>2)
     
    23972266 //-------------- checking input and setting verbose mode ---------------------
    23982267  if (char(basering)<>0)
    2399   { "ERROR:   primary_char0_no_molien should only be used with rings of";
    2400     "         characteristic 0.";
    2401     return();
    2402   }
     2268  { ERROR("primary_char0_no_molien should only be used with rings of characteristic 0"); }
    24032269  if (size(#)>1)
    2404   { "ERROR:   primary_char0_no_molien can only have two parameters.";
    2405     return();
    2406   }
     2270  { ERROR("primary_char0_no_molien can only have two parameters"); }
    24072271  if (size(#)==1)
    24082272  { if (typeof(#[1])<>"int")
    2409     { "ERROR:   The second parameter should be of type <int>.";
    2410       return();
    2411     }
     2273    { ERROR("The second parameter should be of type <int>"); }
    24122274    else
    2413     { int v=#[1];
    2414     }
     2275    { int v=#[1]; }
    24152276  }
    24162277  else
     
    24222283                                       // we should get
    24232284  if (ncols(REY)<>n)
    2424   { "ERROR:   First parameter ought to be the Reynolds operator."
    2425     return();
    2426   }
     2285  { ERROR("First parameter ought to be the Reynolds operator"); }
    24272286 //----------------------------------------------------------------------------
    24282287  if (v && voice<>2)
     
    25402399 //----------------- checking input and setting verbose mode ------------------
    25412400  if (char(basering)==0)
    2542   { "ERROR:   primary_charp_no_molien should only be used with rings of";
    2543     "         characteristic p>0.";
    2544     return();
    2545   }
     2401  { ERROR("primary_charp_no_molien should only be used with rings of characteristic p>0"); }
    25462402  if (size(#)>1)
    2547   { "ERROR:   primary_charp_no_molien can only have two parameters.";
    2548     return();
    2549   }
     2403  { ERROR("primary_charp_no_molien can only have two parameters"); }
    25502404  if (size(#)==1)
    25512405  { if (typeof(#[1])<>"int")
    2552     { "ERROR:   The second parameter should be of type <int>.";
    2553       return();
    2554     }
     2406    { ERROR("The second parameter should be of type <int>"); }
    25552407    else
    25562408    { int v=#[1]; }
     
    25642416                                       // we should get
    25652417  if (ncols(REY)<>n)
    2566   { "ERROR:   First parameter ought to be the Reynolds operator."
    2567     return();
    2568   }
     2418  { ERROR("First parameter ought to be the Reynolds operator"): }
    25692419 //----------------------------------------------------------------------------
    25702420  if (v && voice<>2)
     
    26802530 //--------------------- checking input and setting verbose mode --------------
    26812531  if (char(basering)==0)
    2682   { "ERROR:   primary_charp_without should not be used with rings of";
    2683     "         characteristic 0.";
    2684     return();
    2685   }
     2532  { ERROR("primary_charp_without should not be used with rings of characteristic 0"); }
    26862533  if (size(#)==0)
    2687   { "ERROR:   There are no parameters.";
    2688     return();
    2689   }
     2534  { ERROR("There are no parameters"); }
    26902535  if (typeof(#[size(#)])=="int")
    26912536  { int v=#[size(#)];
    26922537    int gen_num=size(#)-1;
    26932538    if (gen_num==0)
    2694     { "ERROR:   There are no generators of a finite matrix group given.";
    2695       return();
    2696     }
     2539    { ERROR("There are no generators of a finite matrix group given"); }
    26972540  }
    26982541  else
     
    27072550  { if (typeof(#[i])=="matrix")
    27082551    { if (nrows(#[i])<>n or ncols(#[i])<>n)
    2709       { "ERROR:   The number of variables of the base ring needs to be the same";
    2710         "         as the dimension of the square matrices";
    2711         return();
    2712       }
     2552      { ERROR("The number of variables of the base ring needs to be the same as the dimension of the square matrices"); }
    27132553    }
    27142554    else
    2715     { "ERROR:   The first parameters should be a list of matrices";
    2716       return();
    2717     }
     2555    { ERROR("The first parameters should be a list of matrices"); }
    27182556  }
    27192557 //----------------------------------------------------------------------------
     
    28372675 // ----------------- checking input and setting flags ------------------------
    28382676  if (size(#)==0)
    2839   { "ERROR:   There are no parameters.";
    2840     return();
    2841   }
     2677  { ERROR("There are no parameters"); }
    28422678  int ch=char(basering);               // the algorithms depend very much on the
    28432679                                       // characteristic of the ground field
     
    28502686  if (typeof(#[size(#)])=="intvec")
    28512687  { if (size(#[size(#)])<>3)
    2852     { "ERROR:   <intvec> should have three entries.";
    2853       return();
    2854     }
     2688    { ERROR("<intvec> should have three entries"); }
    28552689    gen_num=size(#)-1;
    28562690    mol_flag=#[size(#)][1];
    28572691    if (#[size(#)][2]<0 && (ch==0 or (ch<>0 && mol_flag==-1)))
    2858     { "ERROR:   the second component of <intvec> should be >=0";
    2859       return();
    2860     }
     2692    { ERROR("the second component of <intvec> should be >=0"); }
    28612693    int interval=#[size(#)][2];
    28622694    v=#[size(#)][3];
    28632695    if (gen_num==0)
    2864     { "ERROR:   There are no generators of a finite matrix group given.";
    2865       return();
    2866     }
     2696    { ERROR("There are no generators of a finite matrix group given"); }
    28672697  }
    28682698  else
     
    28752705  { if (typeof(#[i])=="matrix")
    28762706    { if (nrows(#[i])<>n or ncols(#[i])<>n)
    2877       { "ERROR:   The number of variables of the base ring needs to be the same";
    2878         "         as the dimension of the square matrices";
    2879         return();
     2707      { ERROR("The number of variables of the base ring needs to be the same
     2708         as the dimension of the square matrices");
    28802709      }
    28812710    }
    28822711    else
    2883     { "ERROR:   The first parameters should be a list of matrices";
    2884       return();
    2885     }
     2712    { ERROR("The first parameters should be a list of matrices"); }
    28862713  }
    28872714 //----------------------------------------------------------------------------
     
    29012728        if (minpoly==0)
    29022729        { if (v)
    2903           { "  We are dealing with the non-modular case.";
    2904           }
     2730          { "  We are dealing with the non-modular case."; }
    29052731          if (typeof(L[2])=="int")
    29062732          { molien(L[3..size(L)],newring,L[2],intvec(mol_flag,interval,v));
     
    29222748          list l=primary_charp_no_molien(L[1],v);
    29232749          if (size(l)==2)
    2924           { return(l[1],L[1],l[2]);
    2925           }
     2750          { return(l[1],L[1],l[2]); }
    29262751          else
    2927           { return(l[1],L[1]);
    2928           }
     2752          { return(l[1],L[1]); }
    29292753        }
    29302754      }
     
    29722796  if (mol_flag==-1)
    29732797  { if (ch==0)
    2974     { "ERROR:   Characteristic 0 can only be simulated in characteristic p>>0.";
    2975       return();
    2976     }
     2798    { ERROR("Characteristic 0 can only be simulated in characteristic p>>0"); }
    29772799    list L=group_reynolds(#[1..gen_num],v);
    29782800    string newring="aksldfalkdsflkj";
     
    29832805  else                                 // the user specified that the
    29842806  { if (ch==0)                         // characteristic divides the group order
    2985     { "ERROR:   The characteristic cannot divide the group order when it is 0.";
    2986       return();
    2987     }
     2807    { ERROR("The characteristic cannot divide the group order when it is 0"); }
    29882808    if (v)
    29892809    { "";
     
    32333053{ degBound=0;
    32343054  if (char(basering)<>0)
    3235   { "ERROR:   primary_char0_random should only be used with rings of";
    3236     "         characteristic 0.";
    3237     return();
    3238   }
     3055  { ERROR("primary_char0_random should only be used with rings of characteristic 0"); }
    32393056 //----------------- checking input and setting verbose mode ------------------
    32403057  if (size(#)>1)
    3241   { "ERROR:   primary_char0_random can only have four parameters.";
    3242     return();
    3243   }
     3058  { ERROR("primary_char0_random can only have four parameters"); }
    32443059  if (size(#)==1)
    32453060  { if (typeof(#[1])<>"int")
    3246     { "ERROR:   The fourth parameter should be of type <int>.";
    3247       return();
    3248     }
     3061    { ERROR("The fourth parameter should be of type <int>"); }
    32493062    else
    3250     { int v=#[1];
    3251     }
     3063    { int v=#[1]; }
    32523064  }
    32533065  else
    3254   { int v=0;
    3255   }
     3066  { int v=0; }
    32563067  int n=nvars(basering);               // n is the number of variables, as well
    32573068                                       // as the size of the matrices, as well
     
    32593070                                       // we should get
    32603071  if (ncols(REY)<>n)
    3261   { "ERROR:   First parameter ought to be the Reynolds operator."
    3262     return();
    3263   }
     3072  { ERROR("First parameter ought to be the Reynolds operator"); }
    32643073  if (ncols(M)<>2 or nrows(M)<>1)
    3265   { "ERROR:   Second parameter ought to be the Molien series."
    3266     return();
    3267   }
     3074  { ERROR("Second parameter ought to be the Molien series"); }
    32683075 //----------------------------------------------------------------------------
    32693076  if (v && voice<>2)
     
    33813188 // ---------------- checking input and setting verbose mode ------------------
    33823189  if (char(basering)==0)
    3383   { "ERROR:   primary_charp_random should only be used with rings of";
    3384     "         characteristic p>0.";
    3385     return();
    3386   }
     3190  { ERROR("primary_charp_random should only be used with rings of characteristic p>0"); }
    33873191  if (size(#)>1)
    3388   { "ERROR:   primary_charp_random can only have four parameters.";
    3389     return();
    3390   }
     3192  { ERROR("primary_charp_random can only have four parameters"); }
    33913193  if (size(#)==1)
    33923194  { if (typeof(#[1])<>"int")
    3393     { "ERROR:   The fourth parameter should be of type <int>.";
    3394       return();
    3395     }
     3195    { ERROR("The fourth parameter should be of type <int>"); }
    33963196    else
    3397     { int v=#[1];
    3398     }
     3197    { int v=#[1]; }
    33993198  }
    34003199  else
     
    34073206                                       // we should get
    34083207  if (ncols(REY)<>n)
    3409   { "ERROR:   First parameter ought to be the Reynolds operator."
    3410     return();
    3411   }
     3208  { ERROR("First parameter ought to be the Reynolds operator"); }
    34123209  if (typeof(`ring_name`)<>"ring")
    3413   { "ERROR:   Second parameter ought to the name of a ring where the Molien";
    3414     "         is stored.";
    3415     return();
    3416   }
     3210  { EROOR("Second parameter ought to the name of a ring where the Molien is stored"); }
    34173211 //----------------------------------------------------------------------------
    34183212  if (v && voice<>2)
     
    35363330 //-------------- checking input and setting verbose mode ---------------------
    35373331  if (char(basering)<>0)
    3538   { "ERROR:   primary_char0_no_molien_random should only be used with rings of";
    3539     "         characteristic 0.";
    3540     return();
    3541   }
     3332  { ERROR("primary_char0_no_molien_random should only be used with rings of characteristic 0"); }
    35423333  if (size(#)>1)
    3543   { "ERROR:   primary_char0_no_molien_random can only have three parameters.";
    3544     return();
    3545   }
     3334  { ERROR("primary_char0_no_molien_random can only have three parameters"); }
    35463335  if (size(#)==1)
    35473336  { if (typeof(#[1])<>"int")
    3548     { "ERROR:   The third parameter should be of type <int>.";
    3549       return();
    3550     }
     3337    { ERROR("The third parameter should be of type <int>"); }
    35513338    else
    3552     { int v=#[1];
    3553     }
     3339    { int v=#[1]; }
    35543340  }
    35553341  else
     
    35613347                                       // we should get
    35623348  if (ncols(REY)<>n)
    3563   { "ERROR:   First parameter ought to be the Reynolds operator."
    3564     return();
    3565   }
     3349  { ERROR("First parameter ought to be the Reynolds operator"); }
    35663350 //----------------------------------------------------------------------------
    35673351  if (v && voice<>2)
     
    36833467 //----------------- checking input and setting verbose mode ------------------
    36843468  if (char(basering)==0)
    3685   { "ERROR:   primary_charp_no_molien_random should only be used with rings of";
    3686     "         characteristic p>0.";
    3687     return();
    3688   }
     3469  { ERROR("primary_charp_no_molien_random should only be used with rings of characteristic p>0"); }
    36893470  if (size(#)>1)
    3690   { "ERROR:   primary_charp_no_molien_random can only have three parameters.";
    3691     return();
    3692   }
     3471  { ERROR("primary_charp_no_molien_random can only have three parameters"); }
    36933472  if (size(#)==1)
    36943473  { if (typeof(#[1])<>"int")
    3695     { "ERROR:   The third parameter should be of type <int>.";
    3696       return();
    3697     }
     3474    { ERROR("The third parameter should be of type <int>"); }
    36983475    else
    3699     { int v=#[1];
    3700     }
     3476    { int v=#[1]; }
    37013477  }
    37023478  else
     
    37083484                                       // we should get
    37093485  if (ncols(REY)<>n)
    3710   { "ERROR:   First parameter ought to be the Reynolds operator."
    3711     return();
    3712   }
     3486  { ERROR("First parameter ought to be the Reynolds operator"); }
    37133487 //----------------------------------------------------------------------------
    37143488  if (v && voice<>2)
     
    38283602 //--------------------- checking input and setting verbose mode --------------
    38293603  if (char(basering)==0)
    3830   { "ERROR:   primary_charp_without_random should only be used with rings of";
    3831     "         characteristic 0.";
    3832     return();
    3833   }
     3604  { ERROR("primary_charp_without_random should only be used with rings of characteristic 0"); }
    38343605  if (size(#)<2)
    3835   { "ERROR:   There are too few parameters.";
    3836     return();
    3837   }
     3606  { ERROR("There are too few parameters"); }
    38383607  if (typeof(#[size(#)])=="int" && typeof(#[size(#)-1])=="int")
    38393608  { int v=#[size(#)];
     
    38413610    int gen_num=size(#)-2;
    38423611    if (gen_num==0)
    3843     { "ERROR:   There are no generators of a finite matrix group given.";
    3844       return();
    3845     }
     3612    { ERROR("There are no generators of a finite matrix group given"); }
    38463613  }
    38473614  else
     
    38523619    }
    38533620    else
    3854     { "ERROR:   The last parameter should be an <int>.";
    3855       return();
    3856     }
     3621    { ERROR("The last parameter should be an <int>"); }
    38573622  }
    38583623  int n=nvars(basering);               // n is the number of variables, as well
     
    38633628  { if (typeof(#[i])=="matrix")
    38643629    { if (nrows(#[i])<>n or ncols(#[i])<>n)
    3865       { "ERROR:   The number of variables of the base ring needs to be the same";
    3866         "         as the dimension of the square matrices";
    3867         return();
     3630      { ERROR("The number of variables of the base ring needs to be the same
     3631         as the dimension of the square matrices");
    38683632      }
    38693633    }
    38703634    else
    3871     { "ERROR:   The first parameters should be a list of matrices";
    3872       return();
    3873     }
     3635    { ERROR("The first parameters should be a list of matrices"); }
    38743636  }
    38753637 //----------------------------------------------------------------------------
     
    39963758 // ----------------- checking input and setting flags ------------------------
    39973759  if (size(#)<2)
    3998   { "ERROR:   There are too few parameters.";
    3999     return();
    4000   }
     3760  { ERROR("There are too few parameters"); }
    40013761  int ch=char(basering);               // the algorithms depend very much on the
    40023762                                       // characteristic of the ground field
     
    40093769  if (typeof(#[size(#)])=="intvec" && typeof(#[size(#)-1])=="int")
    40103770  { if (size(#[size(#)])<>3)
    4011     { "ERROR:   <intvec> should have three entries.";
    4012       return();
    4013     }
     3771    { ERROR("<intvec> should have three entries"); }
    40143772    gen_num=size(#)-2;
    40153773    mol_flag=#[size(#)][1];
    40163774    if (#[size(#)][2]<0 && (ch==0 or (ch<>0 && mol_flag<>0)))
    4017     { "ERROR:   the second component of <intvec> should be >=0";
    4018       return();
    4019     }
     3775    { ERROR("the second component of <intvec> should be >=0"); }
    40203776    int interval=#[size(#)][2];
    40213777    v=#[size(#)][3];
    40223778    int max=#[size(#)-1];
    40233779    if (gen_num==0)
    4024     { "ERROR:   There are no generators of a finite matrix group given.";
    4025       return();
    4026     }
     3780    { ERROR("There are no generators of a finite matrix group given"); }
    40273781  }
    40283782  else
     
    40353789    }
    40363790    else
    4037     { "ERROR:   If the two last parameters are not <int> and <intvec>, the last";
    4038       "         parameter should be an <int>.";
    4039       return();
     3791    { ERROR("If the two last parameters are not <int> and <intvec>, the last
     3792         parameter should be an <int>");
    40403793    }
    40413794  }
     
    40433796  { if (typeof(#[i])=="matrix")
    40443797    { if (nrows(#[i])<>n or ncols(#[i])<>n)
    4045       { "ERROR:   The number of variables of the base ring needs to be the same";
    4046         "         as the dimension of the square matrices";
    4047         return();
     3798      { ERROR("The number of variables of the base ring needs to be the same
     3799         as the dimension of the square matrices");
    40483800      }
    40493801    }
    40503802    else
    4051     { "ERROR:   The first parameters should be a list of matrices";
    4052       return();
    4053     }
     3803    { ERROR("The first parameters should be a list of matrices"); }
    40543804  }
    40553805 //----------------------------------------------------------------------------
     
    41403890  if (mol_flag==-1)
    41413891  { if (ch==0)
    4142     { "ERROR:   Characteristic 0 can only be simulated in characteristic p>>0.";
    4143       return();
    4144     }
     3892    { ERROR("Characteristic 0 can only be simulated in characteristic p>>0"); }
    41453893    list L=group_reynolds(#[1..gen_num],v);
    41463894    string newring="aksldfalkdsflkj";
     
    41563904  else                                 // the user specified that the
    41573905  { if (ch==0)                         // characteristic divides the group order
    4158     { "ERROR:   The characteristic cannot divide the group order when it is 0.";
    4159       return();
    4160     }
     3906    { ERROR("The characteristic cannot divide the group order when it is 0"); }
    41613907    if (v)
    41623908    { "";
     
    41963942{ ring R=0,x,dp;
    41973943  if (d<=0)
    4198   { "ERROR:   The <int> may not be <= 0";
    4199     return();
    4200   }
     3944  { ERROR("The <int> may not be <= 0"); }
    42013945  int d_neu,j,nc;
    42023946  int s=size(deg_vec);
     
    42053949  for (int i=1;i<=s;i++)
    42063950  { if (i<0)
    4207     { "ERROR:   The entries of <intvec> may not be <= 0";
    4208       return();
    4209     }
     3951    { ERROR("The entries of <intvec> may not be <= 0"); }
    42103952    d_neu=d-deg_vec[i];
    42113953    if (d_neu>0)
     
    42684010 //----------------- checking input and setting verbose mode ------------------
    42694011  if (char(br)<>0)
    4270   { "ERROR:   secondary_char0 should only be used with rings of characteristic 0.";
    4271     return();
    4272   }
     4012  { ERROR("secondary_char0 should only be used with rings of characteristic 0"); }
    42734013  int i;
    42744014  if (size(#)>0)
     
    42884028                                       // we should get
    42894029  if (ncols(P)<>n)
    4290   { "ERROR:   The first parameter ought to be the matrix of the primary";
    4291     "         invariants."
    4292     return();
    4293   }
     4030  { ERROR("The first parameter ought to be the matrix of the primary invariants"); }
    42944031  if (ncols(REY)<>n)
    4295   { "ERROR:   The second parameter ought to be the Reynolds operator."
    4296     return();
    4297   }
     4032  { ERROR("The second parameter ought to be the Reynolds operator"); }
    42984033  if (ncols(M)<>2 or nrows(M)<>1)
    4299   { "ERROR:   The third parameter ought to be the Molien series."
    4300     return();
    4301   }
     4034  { ERROR("The third parameter ought to be the Molien series"); }
    43024035  if (v && voice==2)
    43034036  { "";
     
    45024235 //----------------- checking input and setting verbose mode ------------------
    45034236  if (char(br)<>0)
    4504   { "ERROR:   secondary_char0 can only be used with rings of characteristic 0.";
    4505     "         Try secondary_charp";
    4506       return();
    4507   }
     4237  { ERROR("secondary_char0 can only be used with rings of characteristic 0.
     4238         Try secondary_charp"); }
    45084239  int i;
    45094240  if (size(#)>0)
    45104241  { if (typeof(#[1])=="int")
    4511     { int v=#[1];
    4512     }
     4242    { int v=#[1]; }
    45134243    else
    4514     { int v=0;
    4515     }
     4244    { int v=0; }
    45164245  }
    45174246  else
    4518   { int v=0;
    4519   }
     4247  { int v=0; }
    45204248  if (size(#)>0)
    45214249  { if (typeof(#[size(#)])=="string")
     
    45314259      }
    45324260      else
    4533       { "ERROR:   If the last optional parameter is a string, it should be \"old\".";
    4534         return(matrix(ideal()),matrix(ideal()));
    4535       }
     4261      { ERROR("If the last optional parameter is a string, it should be \"old\""); }
    45364262    }
    45374263  }
     
    45414267                                  // we should get
    45424268  if (ncols(P)<>n)
    4543   { "ERROR:   The first parameter ought to be the matrix of the primary";
    4544     "         invariants.";
    4545     return();
    4546   }
     4269  { ERROR("The first parameter ought to be the matrix of the primary invariants"); }
    45474270  if (ncols(REY)<>n)
    4548   { "ERROR:   The second parameter ought to be the Reynolds operator.";
    4549     return();
    4550   }
     4271  { ERROR("The second parameter ought to be the Reynolds operator"); }
    45514272  if (ncols(M)<>2 or nrows(M)<>1)
    4552   { "ERROR:   The third parameter ought to be the Molien series.";
    4553     return();
    4554   }
     4273  { ERROR("The third parameter ought to be the Molien series"); }
    45554274  if (v && voice==2)
    45564275  { "";
     
    49544673 //----------------- checking input and setting verbose mode ------------------
    49554674  if (char(br)<>0)
    4956   { "ERROR:   irred_secondary_char0 can only be used with rings of characteristic 0.";
    4957     "         Try irred_secondary_charp";
    4958       return();
    4959   }
     4675  { ERROR("irred_secondary_char0 can only be used with rings of characteristic 0.
     4676         Try irred_secondary_charp"); }
    49604677  int i;
    49614678  if (size(#)>0)
     
    49784695      }
    49794696      else
    4980       { "ERROR:   If the last optional parameter is a string, it should be \"PP\".";
    4981         return(matrix(ideal()),matrix(ideal()));
    4982       }
     4697      { ERROR("If the last optional parameter is a string, it should be \"PP\""); }
    49834698    }
    49844699  }
     
    49884703                                  // we should get
    49894704  if (ncols(P)<>n)
    4990   { "ERROR:   The first parameter ought to be the matrix of the primary";
    4991     "         invariants."
    4992     return();
    4993   }
     4705  { ERROR("The first parameter ought to be the matrix of the primary invariants"); }
    49944706  if (ncols(REY)<>n)
    4995   { "ERROR:   The second parameter ought to be the Reynolds operator."
    4996     return();
    4997   }
     4707  { ERROR("The second parameter ought to be the Reynolds operator"); }
    49984708  if (ncols(M)<>2 or nrows(M)<>1)
    4999   { "ERROR:   The third parameter ought to be the Molien series."
    5000     return();
    5001   }
     4709  { ERROR("The third parameter ought to be the Molien series"); }
    50024710  if (v && voice==2)
    50034711  { "";
     
    54325140 //---------------- checking input and setting verbose mode -------------------
    54335141  if (char(br)==0)
    5434   { "ERROR:   secondary_charp should only be used with rings of characteristic p>0.";
    5435     return();
    5436   }
     5142  { ERROR("secondary_charp should only be used with rings of characteristic p>0"); }
    54375143  int i;
    54385144  if (size(#)>0)
     
    54525158                                       // we should get
    54535159  if (ncols(P)<>n)
    5454   { "ERROR:   The first parameter ought to be the matrix of the primary";
    5455     "         invariants."
    5456     return();
    5457   }
     5160  { ERROR("The first parameter ought to be the matrix of the primary invariants"); }
    54585161  if (ncols(REY)<>n)
    5459   { "ERROR:   The second parameter ought to be the Reynolds operator."
    5460     return();
    5461   }
     5162  { ERROR("The second parameter ought to be the Reynolds operator"); }
    54625163  if (typeof(`ring_name`)<>"ring")
    5463   { "ERROR:   The <string> should give the name of the ring where the Molien."
    5464     "         series is stored.";
    5465     return();
    5466   }
     5164  { ERROR("The <string> should give the name of the ring where the Molien series is stored"); }
    54675165  if (v && voice==2)
    54685166  { "";
     
    56765374 //---------------- checking input and setting verbose mode -------------------
    56775375  if (char(br)==0)
    5678   { "ERROR:   secondary_charp should only be used with rings of characteristic p>0.";
    5679     return();
    5680   }
     5376  { ERROR("secondary_charp should only be used with rings of characteristic p>0"); }
    56815377  int i;
    56825378  if (size(#)>0)
    56835379  { if (typeof(#[size(#)])=="int")
    5684     { int v=#[size(#)];
    5685     }
     5380    { int v=#[size(#)]; }
    56865381    else
    5687     { int v=0;
    5688     }
     5382    { int v=0; }
    56895383  }
    56905384  else
    5691   { int v=0;
    5692   }
     5385  { int v=0; }
    56935386  if (size(#)>0)
    56945387  { if (typeof(#[size(#)])=="string")
     
    57045397      }
    57055398      else
    5706       { "ERROR:   If the last optional parameter is a string, it should be \"old\".";
    5707         return(matrix(ideal()),matrix(ideal()));
    5708       }
     5399      { ERROR("If the last optional parameter is a string, it should be \"old\""); }
    57095400    }
    57105401  }
     
    57145405                                       // we should get
    57155406  if (ncols(P)<>n)
    5716   { "ERROR:   The first parameter ought to be the matrix of the primary";
    5717     "         invariants."
    5718     return();
    5719   }
     5407  { ERROR("The first parameter ought to be the matrix of the primary invariants"); }
    57205408  if (ncols(REY)<>n)
    5721   { "ERROR:   The second parameter ought to be the Reynolds operator."
    5722     return();
    5723   }
     5409  { ERROR("The second parameter ought to be the Reynolds operator"); }
    57245410  if (typeof(`ring_name`)<>"ring")
    5725   { "ERROR:   The <string> should give the name of the ring where the Molien."
    5726     "         series is stored.";
    5727     return();
    5728   }
     5411  { ERROR("The <string> should give the name of the ring where the Molien series is stored"); }
    57295412  if (v && voice==2)
    57305413  { "";
     
    61385821        }
    61395822        else
    6140         { "ERROR:   the third parameter should be an <intvec>";
    6141           return();
    6142         }
     5823        { ERROR("the third parameter should be an <intvec>"); }
    61435824      }
    61445825      int v=#[size(#)];
     
    61515832        }
    61525833        else
    6153         { "ERROR:   the third parameter should be an <intvec>";
    6154           return();
    6155         }
     5834        { ERROR("the third parameter should be an <intvec>"); }
    61565835      }
    61575836      else
    6158       { "ERROR:   wrong list of parameters";
    6159         return();
    6160       }
     5837      { ERROR("wrong list of parameters"); }
    61615838    }
    61625839  }
    61635840  else
    61645841  { if (size(#)>2)
    6165     { "ERROR:   there are too many parameters";
    6166       return();
    6167     }
     5842    { ERROR("there are too many parameters"); }
    61685843    int v=0;
    61695844  }
     
    61735848                                       // we should get
    61745849  if (ncols(P)<>n)
    6175   { "ERROR:   The first parameter ought to be the matrix of the primary";
    6176     "         invariants."
    6177     return();
    6178   }
     5850  { ERROR("The first parameter ought to be the matrix of the primary invariants"); }
    61795851  if (ncols(REY)<>n)
    6180   { "ERROR:   The second parameter ought to be the Reynolds operator.";
    6181     return();
    6182   }
     5852  { ERROR("The second parameter ought to be the Reynolds operator"); }
    61835853  if (char(br)<>0)
    61845854  { if (nrows(REY) mod char(br) == 0)
    6185     { "ERROR:   We need to be in the non-modular case.";
    6186       return();
    6187     }
     5855    { ERROR("We need to be in the non-modular case"); }
    61885856  }
    61895857  else
    6190   { "WARNING: In char 0, secondary_char0 should be faster.";
     5858  { "WARNING: In char 0, secondary_char0 should be faster";
    61915859  }
    61925860  if (v && voice==2)
     
    63886056    { if (size(#)==2)
    63896057      { if (typeof(#[size(#)-1])=="intvec")
    6390         { intvec deg_vec=#[size(#)-1];
    6391         }
     6058        { intvec deg_vec=#[size(#)-1]; }
    63926059        else
    6393         { "ERROR:   the third parameter should be an <intvec>";
    6394           return();
    6395         }
     6060        { ERROR("the third parameter should be an <intvec>"); }
    63966061      }
    63976062      int v=#[size(#)];
     
    64046069        }
    64056070        else
    6406         { "ERROR:   the third parameter should be an <intvec>";
    6407           return();
    6408         }
     6071        { ERROR("the third parameter should be an <intvec>"); }
    64096072      }
    64106073      else
    6411       { "ERROR:   wrong list of parameters";
    6412         return();
    6413       }
     6074      { ERROR("wrong list of parameters"); }
    64146075    }
    64156076  }
    64166077  else
    64176078  { if (size(#)>2)
    6418     { "ERROR:   there are too many parameters";
    6419       return();
    6420     }
     6079    { ERROR("there are too many parameters"); }
    64216080    int v=0;
    64226081  }
     
    64266085                                       // we should get
    64276086  if (ncols(P)<>n)
    6428   { "ERROR:   The first parameter ought to be the matrix of the primary";
    6429     "         invariants."
    6430     return();
    6431   }
     6087  { ERROR("The first parameter ought to be the matrix of the primary invariants"); }
    64326088  if (ncols(REY)<>n)
    6433   { "ERROR:   The second parameter ought to be the Reynolds operator.";
    6434     return();
    6435   }
     6089  { ERROR("The second parameter ought to be the Reynolds operator"); }
    64366090  if (char(br)<>0)
    64376091  { if (nrows(REY) mod char(br) == 0)
    6438     { "ERROR:   We need to be in the non-modular case.";
    6439       return();
    6440     }
     6092    { ERROR("We need to be in the non-modular case"); }
    64416093  }
    64426094  else
    6443   { "WARNING: In char 0, secondary_char0 should be faster.";
     6095  { "WARNING: In char 0, secondary_char0 should be faster";
    64446096  }
    64456097  if (v && voice==2)
     
    67916443    { if (size(#)==2)
    67926444      { if (typeof(#[size(#)-1])=="intvec")
    6793         { intvec deg_vec=#[size(#)-1];
    6794         }
     6445        { intvec deg_vec=#[size(#)-1]; }
    67956446        else
    6796         { "ERROR:   the third parameter should be an <intvec>";
    6797           return();
    6798         }
     6447        { ERROR("the third parameter should be an <intvec>"); }
    67996448      }
    68006449      int v=#[size(#)];
     
    68076456        }
    68086457        else
    6809         { "ERROR:   the third parameter should be an <intvec>";
    6810           return();
    6811         }
     6458        { ERROR("the third parameter should be an <intvec>"); }
    68126459      }
    68136460      else
    6814       { "ERROR:   wrong list of parameters";
    6815         return();
    6816       }
     6461      { ERROR("wrong list of parameters"); }
    68176462    }
    68186463  }
    68196464  else
    68206465  { if (size(#)>2)
    6821     { "ERROR:   there are too many parameters";
    6822       return();
    6823     }
     6466    { ERROR("there are too many parameters"); }
    68246467    int v=0;
    68256468  }
     
    68296472                                       // we should get
    68306473  if (ncols(P)<>n)
    6831   { "ERROR:   The first parameter ought to be the matrix of the primary";
    6832     "         invariants."
    6833     return();
    6834   }
     6474  { ERROR("The first parameter ought to be the matrix of the primary invariants"); }
    68356475  if (ncols(REY)<>n)
    6836   { "ERROR:   The second parameter ought to be the Reynolds operator.";
    6837     return();
    6838   }
     6476  { ERROR("The second parameter ought to be the Reynolds operator"); }
    68396477  if (char(br)<>0)
    68406478  { if (nrows(REY) mod char(br) == 0)
    6841     { "ERROR:   We need to be in the non-modular case.";
    6842       return();
    6843     }
     6479    { ERROR("We need to be in the non-modular case"); }
    68446480  }
    68456481  if (v && voice==2)
    6846   { "";
    6847   }
     6482  { ""; }
    68486483  if (defined(deg_vec)<>voice)
    6849   { intvec deg_vec;
    6850   }
     6484  { intvec deg_vec; }
    68516485  int l=1;
    68526486
     
    68636497  int Max = vdim(sP);
    68646498  if (Max<0)
    6865   { ERROR("The first parameter ought to be a matrix of primary invariants.");
     6499  { ERROR("The first parameter ought to be a matrix of primary invariants");
    68666500  }
    68676501  ideal sIS = sP;   // sIS will be a Groebner basis up to degree d of P+irred. sec. inv.
     
    69826616      v=#[size(#)];
    69836617      if (gen_num==0)
    6984       { "ERROR:   There are no generators of the finite matrix group given.";
    6985         return();
    6986       }
     6618      { ERROR("There are no generators of the finite matrix group given"); }
    69876619      for (i=1;i<=gen_num;i++)
    69886620      { if (typeof(#[i])<>"matrix")
    6989         { "ERROR:   These parameters should be generators of the finite matrix group.";
    6990           return();
    6991         }
     6621        { ERROR("These parameters should be generators of the finite matrix group"); }
    69926622        if ((n<>nrows(#[i])) or (n<>ncols(#[i])))
    6993         { "ERROR:   matrices need to be square and of the same dimensions";
    6994           return();
    6995         }
     6623        { ERROR("matrices need to be square and of the same dimensions"); }
    69966624      }
    69976625    }
     
    70006628      for (i=1;i<=gen_num;i++)
    70016629      { if (typeof(#[i])<>"matrix")
    7002         { "ERROR:   These parameters should be generators of the finite matrix group.";
    7003           return();
    7004         }
     6630        { ERROR("These parameters should be generators of the finite matrix group"); }
    70056631        if ((n<>nrows(#[i])) or (n<>ncols(#[i])))
    7006         { "ERROR:   matrices need to be square and of the same dimensions";
    7007           return();
    7008         }
     6632        { ERROR("matrices need to be square and of the same dimensions"); }
    70096633      }
    70106634    }
    70116635  }
    70126636  else
    7013   { "ERROR:   There are no generators of the finite matrix group given.";
    7014     return();
    7015   }
     6637  { ERROR("There are no generators of the finite matrix group given"); }
    70166638  if (ncols(P)<>n)
    7017   { "ERROR:   The first parameter ought to be the matrix of the primary";
    7018     "         invariants."
    7019     return();
    7020   }
     6639  { ERROR("The first parameter ought to be the matrix of the primary invariants"); }
    70216640  if (v && voice==2)
    70226641  { "";
     
    70456664  ideal GP = groebner(ideal(P));
    70466665  if (dim(GP)<>0)
    7047   { "ERROR:   The ideal spanned by primary invariants of a finite group";
    7048     "         always is of dimension zero.";
    7049     return();
    7050   }
     6666  { ERROR("The ideal spanned by primary invariants of a finite group always is of dimension zero"); }
    70516667  matrix trivialS = matrix(kbase(GP));// , trivialIS=secondary_charp(P,REY,"alskdfalkdsj",v);
    70526668  // kill trivialIS;
     
    72006816"
    72016817{ if (size(#)==0)
    7202   { "ERROR:   There are no generators given.";
    7203     return();
    7204   }
     6818  { ERROR("There are no generators given"); }
    72056819  int ch=char(basering);               // the algorithms depend very much on the
    72066820                                       // characteristic of the ground field -
     
    72146828  if (typeof(#[size(#)])=="intvec")
    72156829  { if (size(#[size(#)])<>3)
    7216     { "ERROR:   The <intvec> should have three entries.";
    7217       return();
    7218     }
     6830    { ERROR("The <intvec> should have three entries"); }
    72196831    gen_num=size(#)-1;
    72206832    mol_flag=#[size(#)][1];
    72216833    if (#[size(#)][2]<0 && (ch==0 or (ch<>0 && mol_flag<>0)))
    7222     { "ERROR:   the second component of <intvec> should be >=0";
    7223       return();
    7224     }
     6834    { ERROR("the second component of <intvec> should be >=0"); }
    72256835    int interval=#[size(#)][2];
    72266836    v=#[size(#)][3];
     
    73336943  if (mol_flag==-1)
    73346944  { if (ch==0)
    7335     { "ERROR:   Characteristic 0 can only be simulated in characteristic p>>0.
    7336 ";
    7337       return();
    7338     }
     6945    { ERROR("Characteristic 0 can only be simulated in characteristic p>>0"); }
    73396946    list L=group_reynolds(#[1..gen_num],v);
    73406947    string newring="aksldfalkdsflkj";
     
    73526959  else                                 // the user specified that the
    73536960  { if (ch==0)                         // characteristic divides the group order
    7354     { "ERROR:   The characteristic cannot divide the group order when it is 0.
    7355 ";
    7356       return();
    7357     }
     6961    { ERROR("The characteristic cannot divide the group order when it is 0"); }
    73586962    if (v)
    7359     { "";
    7360     }
     6963    { ""; }
    73616964    matrix P=primary_charp_without(#[1..gen_num],v);
    73626965    matrix S=secondary_not_cohen_macaulay(P,#[1..gen_num],v);
     
    74077010"
    74087011{ if (size(#)<2)
    7409   { "ERROR:   There are too few parameters.";
    7410     return();
    7411   }
     7012  { ERROR("There are too few parameters"); }
    74127013  int ch=char(basering);               // the algorithms depend very much on the
    74137014                                       // characteristic of the ground field
     
    74217022  if (typeof(#[size(#)])=="intvec" && typeof(#[size(#)-1])=="int")
    74227023  { if (size(#[size(#)])<>3)
    7423     { "ERROR:   <intvec> should have three entries.";
    7424       return();
    7425     }
     7024    { ERROR("<intvec> should have three entries"); }
    74267025    gen_num=size(#)-2;
    74277026    mol_flag=#[size(#)][1];
    74287027    if (#[size(#)][2]<0 && (ch==0 or (ch<>0 && mol_flag<>0)))
    7429     { "ERROR:   the second component of <intvec> should be >=0";
    7430       return();
    7431     }
     7028    { ERROR("the second component of <intvec> should be >=0"); }
    74327029    int interval=#[size(#)][2];
    74337030    v=#[size(#)][3];
    74347031    int max=#[size(#)-1];
    74357032    if (gen_num==0)
    7436     { "ERROR:   There are no generators of a finite matrix group given.";
    7437       return();
    7438     }
     7033    { ERROR("There are no generators of a finite matrix group given"); }
    74397034  }
    74407035  else
     
    74477042    }
    74487043   else
    7449     { "ERROR:   If the two last parameters are not <int> and <intvec>, the last";
    7450       "         parameter should be an <int>.";
    7451       return();
    7452     }
     7044    { ERROR("If the two last parameters are not <int> and <intvec>, the last parameter should be an <int>"); }
    74537045  }
    74547046  for (int i=1;i<=gen_num;i++)
    74557047  { if (typeof(#[i])=="matrix")
    74567048    { if (nrows(#[i])<>n or ncols(#[i])<>n)
    7457       { "ERROR:   The number of variables of the base ring needs to be the same";
    7458         "         as the dimension of the square matrices";
    7459         return();
    7460       }
     7049      { ERROR("The number of variables of the base ring needs to be the same as the dimension of the square matrices"); }
    74617050    }
    74627051    else
    7463     { "ERROR:   The first parameters should be a list of matrices";
    7464       return();
    7465     }
     7052    { ERROR("The first parameters should be a list of matrices"); }
    74667053  }
    74677054 //----------------------------------------------------------------------------
     
    75667153  if (mol_flag==-1)
    75677154  { if (ch==0)
    7568     { "ERROR:   Characteristic 0 can only be simulated in characteristic p>>0.
    7569 ";
    7570       return();
    7571     }
     7155    { ERROR("Characteristic 0 can only be simulated in characteristic p>>0"); }
    75727156    list L=group_reynolds(#[1..gen_num],v);
    75737157    string newring="aksldfalkdsflkj";
    75747158    if (typeof(L[2])=="int")
    7575     { molien(L[3..size(L)],newring,L[2],intvec(mol_flag,interval,v));
    7576     }
     7159    { molien(L[3..size(L)],newring,L[2],intvec(mol_flag,interval,v)); }
    75777160    else
    7578     { molien(L[2..size(L)],newring,intvec(mol_flag,interval,v));
    7579     }
     7161    { molien(L[2..size(L)],newring,intvec(mol_flag,interval,v)); }
    75807162    matrix P=primary_charp_random(L[1],newring,max,v);
    75817163    matrix S,IS=secondary_charp(P,L[1],newring,v);
     
    75857167  else                                 // the user specified that the
    75867168  { if (ch==0)                         // characteristic divides the group order
    7587     { "ERROR:   The characteristic cannot divide the group order when it is 0.
    7588 ";
    7589       return();
    7590     }
     7169    { ERROR("The characteristic cannot divide the group order when it is 0"); }
    75917170    if (v)
    7592     { "";
    7593     }
     7171    { ""; }
    75947172    matrix P=primary_charp_without_random(#[1..gen_num],max,v);
    75957173    matrix S=secondary_not_cohen_macaulay(P,#[1..gen_num],v);
     
    76207198"
    76217199{ if (newring=="")
    7622   { "ERROR:   the second parameter may not be an empty <string>";
    7623     return();
    7624   }
     7200  { ERROR("the second parameter may not be an empty <string>"); }
    76257201  if (nrows(F)==1)
    76267202  { def br=basering;
     
    76507226  }
    76517227  else
    7652   { "ERROR:   the <matrix> may only have one row";
    7653     return();
    7654   }
     7228  { ERROR("the <matrix> may only have one row"); }
    76557229}
    76567230example
     
    77267300    }
    77277301    else
    7728     { "ERROR:    the third parameter may either be empty or a <string>.";
    7729       return();
    7730     }
     7302    { ERROR("the third parameter may either be empty or a <string>."); }
    77317303  }
    77327304  degBound=0;
     
    78107382  }
    78117383  else
    7812   { "ERROR:   the <matrix> may only have one row";
    7813     return();
    7814   }
     7384  { ERROR("the <matrix> may only have one row"); }
    78157385}
    78167386example
     
    78497419"
    78507420{ if (newring=="")
    7851   { "ERROR:   the third parameter may not be empty a <string>";
    7852     return();
    7853   }
     7421  { ERROR("the third parameter may not be empty a <string>"); }
    78547422  degBound=0;
    78557423  if (nrows(F)==1)
     
    79007468  }
    79017469  else
    7902   { "ERROR:   the <matrix> may only have one row";
    7903     return();
    7904   }
     7470  { ERROR("the <matrix> may only have one row"); }
    79057471}
    79067472
     
    79467512  }
    79477513  else
    7948   { "ERROR:   the <matrix> may only have one row";
    7949     return();
    7950   }
     7514  { ERROR("the <matrix> may only have one row"); }
    79517515}
    79527516example
     
    80217585  mon=simplify(mon,2); // remove 0
    80227586  if (not homog(sum(mon)))
    8023   { "ERROR: Monomials in the first parameter must be of the same degree.";
    8024     return();
    8025   }
     7587  { ERROR("Monomials in the first parameter must be of the same degree."); }
    80267588  int k,k2;
    80277589  for (k=1;k<=ncols(mon);k++)
    80287590  { if (leadmonom(mon[k])!=mon[k])
    8029     { "ERROR: The first parameter must be formed by monomials.";
    8030       return();
    8031     }
     7591    { ERROR("The first parameter must be formed by monomials."); }
    80327592  }
    80337593  for (k2=1;k2<=size(M);k2++)
    80347594  { if (typeof(M[k2])!="ideal")
    8035     { "ERROR: The second parameter must be a list of ideals providing a ";
    8036       "       permutation of the ring variables.";
    8037       return();
    8038     }
     7595    { ERROR("The second parameter must be a list of ideals providing a permutation of the ring variables"); }
    80397596    if ((ncols(M[k2])!=nvars(basering))
    80407597     or (ncols(M[k2])!=ncols(simplify(M[k2],6)))
    80417598     or (M[k2][1]==0))
    8042     { "ERROR: The second parameter must be a list of ideals providing a ";
    8043       "       permutation of the ring variables.";
    8044       return();
    8045     }
     7599    { ERROR("The second parameter must be a list of ideals providing a permutation of the ring variables"); }
    80467600    for (k=1;k<=ncols(M[k2]);k++)
    80477601    { if ((leadmonom(M[k2][k])!=M[k2][k]) or (deg(M[k2][k])!=1))
    8048       { "ERROR: The second parameter must be a list of ideals providing a ";
    8049         "       permutation of the ring variables.";
    8050         return();
    8051       }
     7602      { ERROR("The second parameter must be a list of ideals providing a permutation of the ring variables"); }
    80527603    }
    80537604  }
     
    81877738//----------------- checking input and setting verbose mode ------------------
    81887739  if (size(#)==0)
    8189   { "ERROR: There are no parameters given.";
    8190     return();
    8191   }
     7740  { ERROR("There are no parameters given"); }
    81927741  if (typeof(#[size(#)])=="int")
    81937742  { int v=#[size(#)];
     
    82027751  for (i=1;i<=size(GEN);i++)
    82037752  { if (typeof(GEN[i])!="list")
    8204     { "ERROR: The permutation group must be given by generators in";
    8205       "       disjoint cycle presentation";
    8206       return();
    8207     }
     7753    { ERROR("The permutation group must be given by generators in disjoint cycle presentation"); }
    82087754    for (j=1;j<=size(GEN[i]);j++)
    82097755    { if (typeof(GEN[i][j])!="list")
    8210       { "ERROR: The permutation group must be given by generators in";
    8211         "       disjoint cycle presentation";
    8212       return();
    8213       }
     7756      { ERROR("The permutation group must be given by generators in disjoint cycle presentation"); }
    82147757      for (k=1;k<=size(GEN[i][j]);k++)
    82157758      { if (typeof(GEN[i][j][k])!="int")
    8216         { "ERROR: The permutation group must be given by generators in";
    8217           "       disjoint cycle presentation";
    8218           return();
    8219         }
     7759        { ERROR("The permutation group must be given by generators in disjoint cycle presentation"); }
    82207760      }
    82217761    }
    82227762    TST=sort(sum(sum(GEN[i])))[1];
    82237763    if (TST[1]<=0)
    8224     { "ERROR: The permutation group must be given by generators in";
    8225       "       disjoint cycle presentation";
    8226       return();
    8227     }
     7764    { ERROR("The permutation group must be given by generators in disjoint cycle presentation"); }
    82287765    for (k2=1;k2<size(TST);k2++)
    82297766    { if ((TST[k2]==TST[k2+1]) or (TST[k2+1]>nvars(basering)))
    8230       { "ERROR: The permutation group must be given by generators in";
    8231         "       disjoint cycle presentation";
    8232         return();
    8233       }
     7767      { ERROR("The permutation group must be given by generators in disjoint cycle presentation"); }
    82347768    }
    82357769  }
Note: See TracChangeset for help on using the changeset viewer.