Changeset 17b0ccf in git


Ignore:
Timestamp:
Mar 3, 2021, 4:48:25 PM (3 years ago)
Author:
Hans Schoenemann <hannes@…>
Branches:
(u'fieker-DuVal', '117eb8c30fc9e991c4decca4832b1d19036c4c65')(u'spielwiese', 'd25190065115c859833252500a64cfb7b11e3a50')
Children:
471da6a284cf3893ba07cde8e9d3036f088a0138
Parents:
ebb5c16a3eb6cc033d434f67c152ac901ad521ea
Message:
interpreter: liftstd with 4 args
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • Singular/iparith.cc

    rebb5c16 r17b0ccf  
    68106810     }
    68116811  }
    6812   idhdl h=(idhdl)w->data;
    6813   res->data = (char *)idModulo(u_id,v_id ,hom,&w_u, &(h->data.umatrix),alg);
     6812  res->data = (char *)idModulo(u_id,v_id ,hom,&w_u, NULL,alg);
    68146813  if (w_u!=NULL)
    68156814  {
     
    69046903  if ((v->rtyp!=IDHDL)||(v->e!=NULL)) return TRUE;
    69056904  idhdl hv=(idhdl)v->data;
    6906   int limit=(int)((long)(w->Data()));
    69076905#ifdef HAVE_SHIFTBBA
    69086906  if (rIsLPRing(currRing))
     
    69186916  res->data = (char *)idLiftStd((ideal)u->Data(),
    69196917                                &(hv->data.umatrix),testHomog,
    6920                                 NULL,GbDefault,limit);
     6918                                NULL,GbDefault,(ideal)w->Data());
    69216919  setFlag(res,FLAG_STD); v->flag=0;
    69226920  return FALSE;
     
    78377835  ideal *syz=NULL;
    78387836  GbVariant alg=GbDefault;
    7839   int limit=INT_MAX;
     7837  ideal h11=NULL;
    78407838
    78417839  if(u5==NULL)
     
    78447842    const short t1[]={4,IDEAL_CMD,MATRIX_CMD,MODUL_CMD,STRING_CMD};
    78457843    const short t2[]={4,MODUL_CMD,MATRIX_CMD,MODUL_CMD,STRING_CMD};
    7846     const short t3[]={4,IDEAL_CMD,MATRIX_CMD,MODUL_CMD,INT_CMD};
    7847     const short t4[]={4,MODUL_CMD,MATRIX_CMD,MODUL_CMD,INT_CMD};
    7848     const short t5[]={4,IDEAL_CMD,MATRIX_CMD,STRING_CMD,INT_CMD};
    7849     const short t6[]={4,MODUL_CMD,MATRIX_CMD,STRING_CMD,INT_CMD};
     7844    const short t3[]={4,IDEAL_CMD,MATRIX_CMD,MODUL_CMD,IDEAL_CMD};
     7845    const short t4[]={4,MODUL_CMD,MATRIX_CMD,MODUL_CMD,MODUL_CMD};
     7846    const short t5[]={4,IDEAL_CMD,MATRIX_CMD,STRING_CMD,IDEAL_CMD};
     7847    const short t6[]={4,MODUL_CMD,MATRIX_CMD,STRING_CMD,MODUL_CMD};
    78507848
    78517849    if(iiCheckTypes(U,t1)||iiCheckTypes(U,t2))
     
    78617859      idhdl hw=(idhdl)u3->data;
    78627860      syz=&(hw->data.uideal);
    7863       limit=(int)((long)(u4->Data()));
     7861      h11=(ideal)u4->Data();
    78647862    }
    78657863    else if(iiCheckTypes(U,t5)||iiCheckTypes(U,t6))
    78667864    {
    78677865      alg=syGetAlgorithm((char*)u3->Data(),currRing,(ideal)u->Data());
    7868       limit=(int)((long)(u4->Data()));
     7866      h11=(ideal)u4->Data();
    78697867    }
    78707868    else
    78717869    {
    7872       Werror("%s(`ideal`/`module`,`matrix`[,`module`][,`string`][,`int`]) expected",Tok2Cmdname(iiOp));
     7870      Werror("%s(`ideal/module`,`matrix`[,`module`][,`string`][,`ideal/module`]) expected",Tok2Cmdname(iiOp));
    78737871      return TRUE;
    78747872    }
     
    78777875  {
    78787876    // we have 5 arguments
    7879     const short t1[]={5,IDEAL_CMD,MATRIX_CMD,MODUL_CMD,STRING_CMD,INT_CMD};
    7880     const short t2[]={5,MODUL_CMD,MATRIX_CMD,MODUL_CMD,STRING_CMD,INT_CMD};
     7877    const short t1[]={5,IDEAL_CMD,MATRIX_CMD,MODUL_CMD,STRING_CMD,IDEAL_CMD};
     7878    const short t2[]={5,MODUL_CMD,MATRIX_CMD,MODUL_CMD,STRING_CMD,MODUL_CMD};
    78817879    if(iiCheckTypes(U,t1)||iiCheckTypes(U,t2))
    78827880    {
     
    78847882      syz=&(hw->data.uideal);
    78857883      alg=syGetAlgorithm((char*)u4->Data(),currRing,(ideal)u->Data());
    7886       limit=(int)((long)(u5->Data()));
    78877884    }
    78887885    else
    78897886    {
    7890       Werror("%s(`ideal`/`module`,`matrix`[,`module`][,`string`][,`int`]) expected",Tok2Cmdname(iiOp));
     7887      Werror("%s(`ideal/module`,`matrix`[,`module`][,`string`][,`ideal/module`]) expected",Tok2Cmdname(iiOp));
    78917888      return TRUE;
    78927889    }
     
    79107907  res->data = (char *)idLiftStd((ideal)u->Data(),
    79117908                              &(hv->data.umatrix),testHomog,
    7912                               syz,alg,limit);
     7909                              syz,alg,h11);
    79137910  setFlag(res,FLAG_STD); v->flag=0;
    79147911  if(syz!=NULL)
     
    79657962  }
    79667963  res->data=(char *)L;
     7964  return FALSE;
     7965}
     7966static BOOLEAN jjMODULO4(leftv res, leftv u)
     7967{
     7968  leftv v=u->next;
     7969  leftv w=v->next;
     7970  leftv u4=w->next;
     7971  GbVariant alg;
     7972  ideal u_id,v_id;
     7973  // we have 4 arguments
     7974  const short t1[]={4,IDEAL_CMD,IDEAL_CMD,MATRIX_CMD,STRING_CMD};
     7975  const short t2[]={4,MODUL_CMD,MODUL_CMD,MATRIX_CMD,STRING_CMD};
     7976  if(iiCheckTypes(u,t1)||iiCheckTypes(u,t2)||(w->rtyp!=IDHDL))
     7977  {
     7978    u_id=(ideal)u->Data();
     7979    v_id=(ideal)v->Data();
     7980    alg=syGetAlgorithm((char*)u4->Data(),currRing,u_id);
     7981  }
     7982  else
     7983  {
     7984    Werror("%s(`ideal/module`,`ideal/module`[,`matrix`][,`string`]) expected",Tok2Cmdname(iiOp));
     7985    return TRUE;
     7986  }
     7987  intvec *w_u=(intvec *)atGet(u,"isHomog",INTVEC_CMD);
     7988  tHomog hom=testHomog;
     7989  if (w_u!=NULL)
     7990  {
     7991    w_u=ivCopy(w_u);
     7992    hom=isHomog;
     7993  }
     7994  intvec *w_v=(intvec *)atGet(v,"isHomog",INTVEC_CMD);
     7995  if (w_v!=NULL)
     7996  {
     7997    w_v=ivCopy(w_v);
     7998    hom=isHomog;
     7999  }
     8000  if ((w_u!=NULL) && (w_v==NULL))
     8001    w_v=ivCopy(w_u);
     8002  if ((w_v!=NULL) && (w_u==NULL))
     8003    w_u=ivCopy(w_v);
     8004  if (w_u!=NULL)
     8005  {
     8006     if ((*w_u).compare((w_v))!=0)
     8007     {
     8008       WarnS("incompatible weights");
     8009       delete w_u; w_u=NULL;
     8010       hom=testHomog;
     8011     }
     8012     else
     8013     {
     8014       if ((!idTestHomModule(u_id,currRing->qideal,w_v))
     8015       || (!idTestHomModule(v_id,currRing->qideal,w_v)))
     8016       {
     8017         WarnS("wrong weights");
     8018         delete w_u; w_u=NULL;
     8019         hom=testHomog;
     8020       }
     8021     }
     8022  }
     8023  idhdl h=(idhdl)w->data;
     8024  res->data = (char *)idModulo(u_id,v_id ,hom,&w_u, &(h->data.umatrix),alg);
     8025  if (w_u!=NULL)
     8026  {
     8027    atSet(res,omStrDup("isHomog"),w_u,INTVEC_CMD);
     8028  }
     8029  delete w_v;
     8030  //if (TEST_OPT_RETURN_SB) setFlag(res,FLAG_STD);
    79678031  return FALSE;
    79688032}
  • Singular/iparith.inc

    rebb5c16 r17b0ccf  
    684684// operation: liftstd (ideal, matrix, module)  ->  ideal
    685685// operation: liftstd (module, matrix, module)  ->  module
     686// operation: liftstd (ideal, matrix, string)  ->  ideal
     687// operation: liftstd (module, matrix, string)  ->  module
     688// operation: liftstd (ideal, matrix, ideal)  ->  ideal
     689// operation: liftstd (module, matrix, module)  ->  module
    686690// operation: matrix (ideal, int, int)  ->  matrix
    687691// operation: matrix (module, int, int)  ->  matrix
     
    755759// operation: liftstd (...)  ->  ideal ( 3 arguments )
    756760// operation: liftstd (...)  ->  ideal ( 4 arguments )
     761// operation: liftstd (...)  ->  ideal ( 5 arguments )
    757762// operation: list (...)  ->  list ( any number of arguments )
    758763// operation: luinverse (...)  ->  list ( number of arguments >0 )
  • Singular/table.h

    rebb5c16 r17b0ccf  
    849849,{D(jjLIFTSTD_ALG),    LIFTSTD_CMD,IDEAL_CMD,  IDEAL_CMD,  MATRIX_CMD, STRING_CMD, ALLOW_NC |ALLOW_RING}
    850850,{D(jjLIFTSTD_ALG),    LIFTSTD_CMD,MODUL_CMD,  MODUL_CMD,  MATRIX_CMD, STRING_CMD, ALLOW_NC |ALLOW_RING}
    851 ,{D(jjLIFTSTD_LIMIT),  LIFTSTD_CMD,IDEAL_CMD,  IDEAL_CMD,  MATRIX_CMD, INT_CMD, ALLOW_NC |ALLOW_RING}
    852 ,{D(jjLIFTSTD_LIMIT),  LIFTSTD_CMD,MODUL_CMD,  MODUL_CMD,  MATRIX_CMD, INT_CMD, ALLOW_NC |ALLOW_RING}
     851,{D(jjLIFTSTD_LIMIT),  LIFTSTD_CMD,IDEAL_CMD,  IDEAL_CMD,  MATRIX_CMD, IDEAL_CMD, ALLOW_NC |ALLOW_RING}
     852,{D(jjLIFTSTD_LIMIT),  LIFTSTD_CMD,MODUL_CMD,  MODUL_CMD,  MATRIX_CMD, MODUL_CMD, ALLOW_NC |ALLOW_RING}
    853853,{D(jjMATRIX_Id),      MATRIX_CMD, MATRIX_CMD, IDEAL_CMD,  INT_CMD,    INT_CMD, ALLOW_NC |ALLOW_RING}
    854854,{D(jjMATRIX_Mo),      MATRIX_CMD, MATRIX_CMD, MODUL_CMD,  INT_CMD,    INT_CMD, ALLOW_NC |ALLOW_RING}
     
    959959,{D(jjCALL2ARG),  MODULO_CMD,      MODUL_CMD,           2      , ALLOW_NC |ALLOW_RING}
    960960,{D(jjCALL3ARG),  MODULO_CMD,      MODUL_CMD,           3      , ALLOW_NC |ALLOW_RING}
     961,{D(jjMODULO4),   MODULO_CMD,      MODUL_CMD,           4      , ALLOW_NC |ALLOW_RING}
    961962,{D(jjCALL1ARG),  NAMES_CMD,       LIST_CMD,            1      , ALLOW_NC |ALLOW_RING}
    962963,{D(jjNAMES0),    NAMES_CMD,       LIST_CMD,            0      , ALLOW_NC |ALLOW_RING}
  • Tst/Short/liftstd_m.res.gz.uu

    rebb5c16 r17b0ccf  
    11begin 644 liftstd_m.res.gz
    2 M'XL("+FA*F`"`VQI9G1S=&1?;2YR97,`G91-:X-`$(;O_HI!>E`Z&G?-)Z%"
    3 M2B^!TD/U%D(PS4<7_`AQ0]1?WUG2J"=C]*#CZSNSS\[(^L''\@L`F`>?RW?0
    4 M92;M2&SUN>;_?^$>D+@1B9"&.=?4$SP/(G$@>;>)[61_M3,9RBK#]:"*AS8,
    5 M!G<S7(7\A3"*X">-MR()I4B3#-(#I"<5AA&$Y^,EWB<RJRJ,[+K:V(:S2([P
    6 M#6_@H)%C@:6)T:FFG7@0A_(L<EBL^'KEKLF9HS*2%<O:.*V,02W.2$QWEV@/
    7 M?B4RI]X.8S:<B$`:_SLR;G9C86*`ODG]*=!!H"75';02"XN6Q;RTBK*J0BV]
    8 M50DHP4&&M!GR4V@Q>K,*U)@2',RA7MN]9_F49>7E:U&BI@IS2LT+4AKF80-Z
    9 MU`:MDZ!W!1_W`I\T6*9M++PKQ^PQAW/C<&H.WA@D;Q_D4UWAO<;)GQDG;XR3
    10 MC]K1NS:1CWLU<=*&349U5>9I`WOV\"_LC.XZ?=!=5M.XO,/\N_.XO7B&3[32
    11 :'37@Z1A41[(Z="^9P<SYB_8'"L0HX,@%````
     2M'XL("!*C/V`"`VQI9G1S=&1?;2YR97,`G51-3X-`$+WS*R:-!XC#EEWL5YJ2
     3M8+R8&`_2FS&&VJJ;4&C*-@5^O;/8LANCK7J!X<V;>6]F$I+YS>T]`/`([FZO
     4MH:=*Q3*YZ$V=Y)`1$1#X+'.I7&_JZ#=$$63RE>#E\YKEJSTK5:JZBC""+KYB
     5MT.\?R;"7ZAW2+(.78KV0>:IDD9=0O$*QT6&:0;I]VZU7N2J[#@-FN@T9;&7^
     6M!@\P@P#="FML/,PVQNTH@G6JMK*"^%$\/89/Q*Q0$XF*C2&.B5@L=]D*8C[[
     7MC-S8,_F)R8M9S*E3E^-!I(L(Y(P)"^>=^-R`HFN4&-!:$:<5;6@JY1ZVY'9N
     8M<(Z)1YYJ#!!H#/T$I\':IU&P:ORZZ;H,HD.7.14$R)$61'P*?4Y??HT.UT"`
     9M%1CMX;$JH2J_:B[K!AW=6%!I51-BD4>6Z?$ITST">K\U/OF/<1$8+X)_]1)S
     10M,A$+KVVH]9U6V%0(6[-5=+28(5CW$:?O\Z=AQ;^N)/YR)6%=28R_W4QR<C>3
     11M,[L)`]L-90.3XD8[%-]JM]LZI1^&Y_2O+)'!#P.>EQF>DQG]/.;8<C!A[>]1
     122_P!WI<N]Z87S`7`4#]%4!0``
    1213`
    1314end
  • Tst/Short/liftstd_m.stat

    rebb5c16 r17b0ccf  
    1 1 >> tst_memory_0 :: 1613406650:4201, 64 bit:4.2.0:x86_64-Linux::85192
    2 1 >> tst_memory_1 :: 1613406650:4201, 64 bit:4.2.0:x86_64-Linux::2150192
    3 1 >> tst_memory_2 :: 1613406650:4201, 64 bit:4.2.0:x86_64-Linux::2191296
    4 1 >> tst_timer_1 :: 1613406650:4201, 64 bit:4.2.0:x86_64-Linux::4
     11 >> tst_memory_0 :: 1614783250:4201, 64 bit:4.2.0:x86_64-Linux:terra:85272
     21 >> tst_memory_1 :: 1614783250:4201, 64 bit:4.2.0:x86_64-Linux:terra:2150192
     31 >> tst_memory_2 :: 1614783250:4201, 64 bit:4.2.0:x86_64-Linux:terra:2191296
     41 >> tst_timer_1 :: 1614783250:4201, 64 bit:4.2.0:x86_64-Linux:terra:3
  • Tst/Short/liftstd_m.tst

    rebb5c16 r17b0ccf  
    66ring R = 0,(x,y,z),lp;
    77matrix A[2][3] = x,x,y,y,z,z;
     8module A1=module(A);
     9module A2=A1[3];
     10A1=A1[1..2];
    811matrix T;
    912module S;
     
    1619print(T);
    1720
    18 print(liftstd(module(A),T,2));
     21print(liftstd(A1,T,A2));
    1922print(T);
    2023
     
    2326print(S);
    2427
    25 print(liftstd(module(A),T,S,2));
     28print(liftstd(A1,T,S,A2));
    2629print(T);
    2730print(S);
    2831
    29 print(liftstd(module(A),T,"std",2));
     32print(liftstd(A1,T,"std",A2));
    3033print(T);
    3134
    32 print(liftstd(module(A),T,S,"std",2));
     35print(liftstd(A1,T,S,"std",A2));
     36print(T);
     37print(S);
     38S=modulo(A1,A2,T,"std");
    3339print(T);
    3440print(S);
    3541
     42// with liftstd: G=liftStd(M1,T,S, M2): S=modulo(M1,M2,T)
    3643tst_status(1);$
Note: See TracChangeset for help on using the changeset viewer.