Changeset 054075 in git


Ignore:
Timestamp:
Jul 1, 2005, 12:32:24 PM (19 years ago)
Author:
Nadine Cremer <cremer@…>
Branches:
(u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
Children:
8de0cee385a202e9f07ff4632113ccb3c0bff430
Parents:
8d5c5fe2a46548f5bfe950d7cdc98a3b7546996c
Message:
*cremer: removed bug from g_set :)


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

Legend:

Unmodified
Added
Removed
  • Singular/LIB/lejeune.lib

    r8d5c5fe r054075  
    11
    22//-*- mode:C++;-*-
    3 // $Id: lejeune.lib,v 1.14 2005-07-01 09:36:55 cremer Exp $
     3// $Id: lejeune.lib,v 1.15 2005-07-01 10:32:24 cremer Exp $
    44
    55
     
    9090  setring R;
    9191  def resultf_set=resultdiff;
    92   //resultf_set;~;
    9392  export(resultf_set);
    9493  return(R);   
     
    132131  resultdiff=simplify(resultdiff,2);
    133132  export(resultdiff);                // exports the result
    134   resultdiff;~;
    135133  return(R);                         // return the ring
    136134}
     
    210208proc a_z (int n)                        // returns nth letter of the alphabet
    211209{
    212   if(1>n>26)                     // input admissible?
     210  if(1>n>26)                           // input admissible?
    213211   {
    214212     "n must range between 1 and 26!";
     
    225223
    226224
     225
    227226proc g_set (poly f,intvec H)         // puts together the single steps from
    228 {                                    // f_setstep
     227{                                    // g_setstep
    229228  def r=basering;
    230229  int startvar=nvars(basering);
     
    235234  setring R;
    236235  ideal J,I;
    237   for(i=2;i<=b;i++)
     236  for(i=2;i<b;i++)                    // the steps equal to F
    238237   {
    239238     setring r;
    240      def tmp=g_setstep(f,intvec(H[1..i]));
     239     def tmp=f_setstep(f,intvec(H[1..i]));
    241240     setring R;
    242      I=imap(tmp, resultg_set);
     241     I=imap(tmp,resultf_set);
    243242     kill tmp;
    244243     J=J,I;
    245244   }
     245  setring r;                          // last step, special for G
     246  def tmp=g_setstep(f,H);;
     247  setring R;
     248  I=imap(tmp,resultg_set);
     249  kill tmp;
     250  J=J,I;
     251 
    246252  J=simplify(J,4);
    247253  J=simplify(J,2);
     
    257263
    258264
    259 proc g_setstep (poly f,intvec H)      // returns the conditions for one step
     265proc g_setstep (poly f,intvec H)      // returns the conditions for the last step
    260266{
    261267  int p;                              // loop variable
     
    276282      }
    277283    }
    278   def R=g_formaldiff(f,b-1,c,H[b]);      // actual step
     284  def R=g_formaldiff(f,b-1,c,H[b]);  // actual computations
    279285  setring R;
    280286  def resultg_set=g_resultdiff;
    281287  export(resultg_set);
    282288  return(R);   
    283 }
    284 
    285 
     289}
    286290
    287291
     
    298302
    299303proc g_formaldiff (poly f,int i,int a,int k)
    300 { "k=";k;~;
     304{
    301305  int s,t,v;                          // loop variables
    302306  int u;                   
     
    310314  ideal m2,J,g_resultdiff;
    311315  for(v=1;v<=k;v++)                   // consider the different t-coeff.
    312     { "v=";v;~;
     316    {
    313317     fkv=coe[a+v,1];
    314      m=fkv; "m=";m;~;
    315      if(v<k)
    316      {                           
    317        J=fkv;
    318      }                         
    319      for(s=1;s<=k-v;s++)
    320        { "s=";s;~;
    321          m1=m1^s;"m1=";m1;~;
     318     m=fkv;                         
     319     J=fkv;                           
     320     for(s=1;s<=k-v+1;s++)           // remark: "s<=k-v+1" special!for G!!!
     321       {
     322         m1=m1^s;
    322323         u=size(m1);
    323324         for(t=1;t<=u;t++)
    324325          {
    325326            m2=contract(m1[t],m);     // actual differentiation
    326             J=J,m2;m2;~;
     327            J=J,m2;
    327328          }
    328329       }
     
    330331   }
    331332  g_resultdiff=simplify(g_resultdiff,2);
    332   //g_resultdiff;~;
    333333  export(g_resultdiff);                // exports the result
    334   return(R);                         // return the ring
     334  return(R);                           // return the ring
    335335}                       
    336336
     
    361361
    362362
    363 proc order (poly f)
     363proc order (poly f)                  // gives first elem. of Nash series
    364364{
    365365  poly g=homog(f,var(1));
Note: See TracChangeset for help on using the changeset viewer.