Changeset 2ceb9f in git


Ignore:
Timestamp:
Jan 3, 2018, 4:53:24 PM (6 years ago)
Author:
Hans Schoenemann <hannes@…>
Branches:
(u'fieker-DuVal', '117eb8c30fc9e991c4decca4832b1d19036c4c65')(u'spielwiese', '38dfc5131670d387a89455159ed1e071997eec94')
Children:
cd41db8bc95c947e9ebfa6c7ca4b3c40724b3dae
Parents:
fe531eadd6a60326faa28de0110effd5ec71438c
Message:
fix: Olga::locStatus
File:
1 edited

Legend:

Unmodified
Added
Removed
  • Singular/LIB/olga.lib

    rfe531e r2ceb9f  
    153153          + " locData has to be defined"));
    154154    }
    155     if (locType == 0) { // monoidal localizations
    156         if (t != "list") {
     155    if (locType == 0)
     156    { // monoidal localizations
     157        if (t != "list")
     158        {
    157159            return(list(0, "for a monoidal localization, locData has to be of"
    158160              + " type list, but is of type " + t));
    159         } else { // locData is of type list
    160             if (size(locData) == 0) {
     161        }
     162        else
     163        { // locData is of type list
     164            if (size(locData) == 0)
     165            {
    161166                return(list(0, "for a monoidal localization, locData has to be"
    162167                  + " a non-empty list"));
    163             } else { // locData is of type list and has at least one entry
    164                 ideal listEntries;
    165                 for (i = 1; i <= size(locData); i++) {
     168            }
     169            else
     170            { // locData is of type list and has at least one entry
     171                if (defined(basering)) {ideal listEntries;}
     172                for (i = 1; i <= size(locData); i++)
     173                {
    166174                    t = typeof(locData[i]);
    167                     if (t != "poly" && t != "int" && t != "number") {
     175                    if (t != "poly" && t != "int" && t != "number")
     176                    {
    168177                        return(list(0, "for a monoidal localization, locData"
    169178                          + " has to be a list of polys, ints or numbers, but"
    170179                          + " entry " + string(i) + " is " + string(locData[i])
    171180                          + ", which is of type " + t));
    172                     } else {
    173                         if (listEntries == 0) {
     181                    }
     182                    else
     183                    {
     184                      if (defined(basering))
     185                      {
     186                        if (size(listEntries) == 0)
     187                        {
    174188                            listEntries = locData[i];
    175                         } else {
     189                        }
     190                        else
     191                        {
    176192                            listEntries = listEntries, locData[i];
    177193                        }
     194                      }
    178195                    }
    179196                }
    180197                // locData is of type list, has at least one entry and all
    181198                //   entries are polys
    182                 if (!inducesCommutativeSubring(listEntries)) {
     199                if (!defined(basering))
     200                {
    183201                    return(list(0, "for a monoidal localization, the variables"
    184202                      + " occurring in the polys in locData have to induce a"
    185203                      + " commutative polynomial subring of basering"));
    186204                }
    187             }
    188         }
    189     }
    190     if (locType == 1) { // geometric localizations
     205                if (!inducesCommutativeSubring(listEntries))
     206                {
     207                    return(list(0, "for a monoidal localization, the variables"
     208                      + " occurring in the polys in locData have to induce a"
     209                      + " commutative polynomial subring of basering"));
     210                }
     211            }
     212        }
     213    }
     214    if (locType == 1)
     215    { // geometric localizations
    191216        int n = nvars(basering) div 2;
    192         if (2*n != nvars(basering)) {
     217        if (2*n != nvars(basering))
     218        {
    193219            return(list(0, "for a geometric localization, basering has to have"
    194220              + " an even number of variables"));
    195         } else {
     221        }
     222        else
     223        {
    196224            int j;
    197             for (i = 1; i <= n; i++) {
    198                 for (j = i + 1; j <= n; j++) {
    199                     if (var(i)*var(j) != var(j)*var(i)) {
     225            for (i = 1; i <= n; i++)
     226            {
     227                for (j = i + 1; j <= n; j++)
     228                {
     229                    if (var(i)*var(j) != var(j)*var(i))
     230                    {
    200231                        return(list(0, "for a geometric localization, the"
    201232                          + " first half of the variables of basering has to"
     
    206237            }
    207238        }
    208         if (t != "ideal") {
     239        if (t != "ideal")
     240        {
    209241            return(list(0, "for a geometric localization, locData has to be of"
    210242              + " type ideal, but is of type " + t));
    211243        }
    212         for (i = 1; i <= size(locData); i++) {
    213             if (!polyVars(locData[i],1..n)) {
     244        for (i = 1; i <= size(locData); i++)
     245        {
     246            if (!polyVars(locData[i],1..n))
     247            {
    214248                return(list(0, "for a geometric localization, locData has to"
    215249                + " be an ideal generated by polynomials containing only"
     
    218252        }
    219253    }
    220     if (locType == 2) { // rational localizations
    221         if (t != "intvec") {
     254    if (locType == 2)
     255    { // rational localizations
     256        if (t != "intvec")
     257        {
    222258            return(list(0, "for a rational localization, locData has to be of"
    223259              + " type intvec, but is of type " + t));
    224         } else { // locData is of type intvec
    225             if(locData == 0) {
     260        }
     261        else
     262        { // locData is of type intvec
     263            if(locData == 0)
     264            {
    226265                return(list(0, "for a rational localization, locData has to be"
    227266                  + " a non-zero intvec"));
    228             } else { // locData is of type intvec and not zero
    229                 if (!admissibleSub(locData)) {
     267            }
     268            else
     269            { // locData is of type intvec and not zero
     270                if (!admissibleSub(locData))
     271                {
    230272                    return(list(0, "for a rational localization, the variables"
    231273                      + " indexed by locData have to generate a sub-G-algebra"
Note: See TracChangeset for help on using the changeset viewer.