Changeset 648612 in git for Singular/LIB/sing.lib


Ignore:
Timestamp:
Sep 12, 1997, 12:29:48 PM (26 years ago)
Author:
Wilfred Pohl <pohl@…>
Branches:
(u'spielwiese', 'a719bcf0b8dbc648b128303a49777a094b57592c')
Children:
2a99baf62f13066b86adaabc31f813ac7023eacf
Parents:
ed35a2398a135151e52335cee13a845a80620667
Message:
procedure codim changed


git-svn-id: file:///usr/local/Singular/svn/trunk@721 2c84dea3-7e68-4137-9b89-c4e89433aadc
File:
1 edited

Legend:

Unmodified
Added
Removed
  • Singular/LIB/sing.lib

    red35a23 r648612  
    1 // $Id: sing.lib,v 1.4 1997-09-12 07:40:37 Singular Exp $
     1// $Id: sing.lib,v 1.5 1997-09-12 10:29:48 pohl Exp $
    22//system("random",787422842);
    33//(GMG/BM, last modified 26.06.96)
     
    4444EXAMPLE: example codim; shows an example
    4545{
     46   ideal le1, le2;
    4647   intvec iv1, iv2, iv;
    4748   int i, d1, d2, dd, i1, i2, ia, ie;
    4849  //--------------------------- check id2 < id1 -------------------------------
    49    ideal led = lead(id1);
    50    attrib(led, "isSB",1);
    51    i = size(NF(lead(id2),led));
     50   le1 = lead(id1);
     51   if (attrib(id1,"isSB") != 0)
     52   {
     53     attrib(le1,"isSB",1);
     54   }
     55   le2 = lead(id2);
     56   if (attrib(id2,"isSB") != 0)
     57   {
     58     attrib(le2,"isSB",1);
     59   }
     60   i = size(NF(le2,le1));
    5261   if ( i > 0 )
    5362   {
     
    5564   }
    5665  //--------------------------- 1. check finiteness ---------------------------
    57    i1 = dim(id1);
    58    i2 = dim(id2);
    59    if (i1 < 0)
    60    {
    61      if (i2 == 0)
     66   i1 = dim(le1);
     67   i2 = dim(le2);
     68   if (i1 <= 0)
     69   {
     70     if (i2 <= 0)
    6271     {
    63        return vdim(id2);
     72       return(vdim(le2)-vdim(le1));
    6473     }
    6574     else
     
    7281     return(-1);
    7382   }
    74    if (i2 <= 0)
    75    {
    76      return(vdim(id2)-vdim(id1));
     83   if (mult(le2) != mult(le1))
     84   {
     85     return(-1);
    7786   }
    7887  //--------------------------- module ---------------------------------------
    79    d1 = nrows(id1);
    80    d2 = nrows(id2);
     88   d1 = nrows(le1);
     89   d2 = nrows(le2);
    8190   dd = 0;
    8291   if (d1 > d2)
    8392   {
    84      id2=id2,maxideal(1)*gen(d1);
     93     le2=le2,maxideal(1)*gen(d1);
    8594     dd = -1;
    8695   }
    8796   if (d2 > d1)
    8897   {
    89      id1=id1,maxideal(1)*gen(d2);
     98     le1=le1,maxideal(1)*gen(d2);
    9099     dd = 1;
    91100   }
     
    95104   iv2 = hilb(id2,1);
    96105   i2 = size(iv2);
     106   kill le1,le2;
    97107  //--------------------------- difference of hilbertseries ------------------
    98108   if (i2 > i1)
Note: See TracChangeset for help on using the changeset viewer.