Changeset 2f6f3ee in git


Ignore:
Timestamp:
Jul 4, 2005, 11:02:47 AM (18 years ago)
Author:
Nadine Cremer <cremer@…>
Branches:
(u'jengelh-datetime', 'ceac47cbc86fe4a15902392bdbb9bd2ae0ea02c6')(u'spielwiese', 'a800fe4b3e9d37a38c5a10cc0ae9dfa0c15a4ee6')
Children:
cb12e46b8b11ffabebe9caea01c5ddc872568759
Parents:
8de0cee385a202e9f07ff4632113ccb3c0bff430
Message:
*cremer: simplifiedseveral procedures, removed obsolete steps :)


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

Legend:

Unmodified
Added
Removed
  • Singular/LIB/lejeune.lib

    r8de0ce r2f6f3ee  
    11
    22//-*- mode:C++;-*-
    3 // $Id: lejeune.lib,v 1.16 2005-07-04 07:58:23 cremer Exp $
     3// $Id: lejeune.lib,v 1.17 2005-07-04 09:02:47 cremer Exp $
    44
    55
     
    1818    ringchange(i);       changes the ring to the one needed in ith step     
    1919    plugin_coeffs(i,f)   plugs tpolys into f, up to power i
    20     maxidealstep(i,N);   returns ideal needed for contraction in ith step
     20    diffidealstep(i,N);  returns ideal needed for contraction in ith step
    2121                         N is number of variables of input f
    22     formaldiff(f,k);     computes the formal derivatives D_I with |I|<k
    23     f_setstep(f,H);      iterates the steps given by H, saved in f_set           
     22    formaldiff(f,H);     computes the formal derivatives corresponding to H
     23                         and the desciption of F         
    2424    f_set(f,H);          returns the set F corresponding to H as described by
    2525                         M. Lejeune
    26   ";
     26    g_formaldiff(f,H);   computes the formal derivatives corresponding to H
     27                         and the description of G
     28    g_set(f,H);          returns the set G corresponding to H as described by
     29                         M. Lejeune
     30    ";
    2731
    2832
     
    3640////////////////////////////////////////////////////////////////////////////
    3741
    38 proc f_set (poly f,intvec H)         // puts together the single steps from
    39 {                                    // f_setstep
     42proc f_set (poly f,intvec H)
     43{
     44  int p;                              // loop variable
     45  int m_0=order(f);
     46  int b=size(H);
     47  if(H[1]!=m_0)                       // input admissible?!
     48    {
     49     "H[1]=ord(f) notwendig!!";
     50      return(0);
     51    }
     52  for(p=1;p<b;p++)
     53    {
     54      if(H[p]<H[p+1])
     55      {
     56        "Unzulaessige Eingabe, H[1]<=...<=H[b] notwendig!";
     57         return(0);
     58      }
     59    }
     60
    4061  def r=basering;
    4162  int startvar=nvars(basering);
    4263  export(startvar);
    43   int b=size(H);
    44   int i;
    4564  def R=ringchange(b-1);
    4665  setring R;
    4766  ideal J,I;
    48   for(i=2;i<=b;i++)
    49    {
    50      setring r;
    51      def tmp=f_setstep(f,intvec(H[1..i]));
    52      setring R;
    53      I=imap(tmp, resultf_set);
    54      kill tmp;
    55      J=J,I;
    56    }
     67  for(p=2;p<=b;p++)
     68  {
     69    setring r;
     70    def tmp=formaldiff(f,intvec(H[1..p]));
     71    setring R;
     72    I=imap(tmp,resultdiff);
     73    kill tmp;
     74    J=J,I;
     75  }
    5776  J=simplify(J,4);
    5877  J=simplify(J,2);
     
    6887
    6988
    70 proc f_setstep (poly f,intvec H)      // returns the conditions for one step
    71 {
    72   int p;                              // loop variable
    73   int m_0=order(f);
    74   int b=size(H);
    75   int c=sum(H,1..b-1);
    76   if(H[1]!=m_0)                       // input admissible?!
    77     {
    78      "H[1]=ord(f) notwendig!!";
    79       return(0);
    80     }
    81   for(p=1;p<b;p++)
    82     {
    83       if(H[p]<H[p+1])
    84       {
    85         "Unzulaessige Eingabe, H[1]<=...<=H[b] notwendig!";
    86          return(0);
    87       }
    88     }
    89   def R=formaldiff(f,b-1,c,H[b]);      // actual step
    90   setring R;
    91   def resultf_set=resultdiff;
    92   export(resultf_set);
    93   return(R);   
    94 }
    95 
    96 
    9789////////////////////////////////////////////////////////////////////////////
    9890//              PREPARATORY WORK: plugging in and differentiating
     
    10092
    10193
    102 proc formaldiff (poly f,int i,int a,int k)
     94proc formaldiff (poly f,intvec H)
    10395{
    10496  int s,t,v;                          // loop variables
    105   int u;                   
     97  int u;   
     98  int i=size(H)-1;                    // need those parameters for computation
     99  int c=sum(H,1..i);
     100  int k=H[i+1];
    106101  def R=plugin_coeffs(f,i);           // plugs the power series in...
    107102  setring R;                          // changes the ring
    108103  def Coe=resultplug;   
    109104  matrix coe=Coe;                     // gives the t-coeff. after plugging in
    110   poly fkv;                           // need this stuff for the following
    111   ideal m;
    112   ideal m1=maxidealstep(i,startvar); // computes the corresponding ideal
    113   ideal m3,m2,J,resultdiff;
     105  poly fkv;                       
     106  ideal step=diffidealstep(i,startvar);  // computes the corresponding ideal
     107  ideal m,power,diffstep,J,resultdiff;
    114108  for(v=1;v<=k;v++)                   // consider the different t-coeff.
    115109   {
    116      fkv=coe[a+v,1];
     110     fkv=coe[c+v,1];
    117111     m=fkv;                           
    118112     J=fkv;                           // will save the result in this step
    119113     for(s=1;s<=k-v;s++)
    120114       {
    121          m3=m1^s;
    122          u=size(m3);
     115         power=step^s;
     116         u=size(power);
    123117         for(t=1;t<=u;t++)
    124118          {
    125             m2=contract(m3[t],m);     // actual differentiation
    126             J=J,m2;
     119            diffstep=contract(power[t],m);     // actual differentiation
     120            J=J,diffstep;
    127121          }
    128122       }
     
    223217
    224218
    225 
    226 proc g_set (poly f,intvec H)         // puts together the single steps from
    227 {                                    // g_setstep
     219proc g_set (poly f,intvec H)
     220{
     221  int p;                             
     222  int m_0=order(f);
     223  int b=size(H);
     224  if(H[1]!=m_0)                       // input admissible?!
     225    {
     226     "H[1]=ord(f) notwendig!!";
     227      return(0);
     228    }
     229  for(p=1;p<b;p++)
     230    {
     231      if(H[p]<H[p+1])
     232      {
     233        "Unzulaessige Eingabe, H[1]<=...<=H[b] notwendig!";
     234         return(0);
     235      }
     236    }
     237
    228238  def r=basering;
    229239  int startvar=nvars(basering);
    230240  export(startvar);
    231   int b=size(H);
    232   int i;
    233   def R=ringchange(b-1);
     241  def R=ringchange(b-1);              // work in new ring
    234242  setring R;
    235   ideal J,I;
    236   for(i=2;i<b;i++)                    // the steps equal to F
    237    {
    238      setring r;
    239      def tmp=f_setstep(f,intvec(H[1..i]));
    240      setring R;
    241      I=imap(tmp,resultf_set);
    242      kill tmp;
    243      J=J,I;
    244    }
     243  ideal I,J;
     244  for(p=2;p<=b-1;p++)                 // steps equal to f_set...
     245  {
     246    setring r;
     247    def tmp=formaldiff(f,intvec(H[1..p]));
     248    setring R;
     249    I=imap(tmp,resultdiff);
     250    kill tmp;
     251    J=J,I;
     252  }
     253
    245254  setring r;                          // last step, special for G
    246   def tmp=g_setstep(f,H);;
     255  def tmp=g_formaldiff(f,H);;
    247256  setring R;
    248   I=imap(tmp,resultg_set);
     257  I=imap(tmp,g_resultdiff);
    249258  kill tmp;
    250259  J=J,I;
    251260 
    252   J=simplify(J,4);
     261  J=simplify(J,4);                    // simplify, keep radical small
    253262  J=simplify(J,2);
    254263  J=idealsimplify(J);
     
    263272
    264273
    265 proc g_setstep (poly f,intvec H)      // returns the conditions for the last step
    266 {
    267   int p;                              // loop variable
    268   int m_0=order(f);
    269   int b=size(H);
    270   int c=sum(H,1..b-1);
    271   if(H[1]!=m_0)                       // input admissible?!
    272     {
    273      "H[1]=ord(f) notwendig!!";
    274       return(0);
    275     }
    276   for(p=1;p<b;p++)
    277     {
    278       if(H[p]<H[p+1])
    279       {
    280         "Unzulaessige Eingabe, H[1]<=...<=H[b] notwendig!";
    281          return(0);
    282       }
    283     }
    284   def R=g_formaldiff(f,b-1,c,H[b]);  // actual computations
    285   setring R;
    286   def resultg_set=g_resultdiff;
    287   export(resultg_set);
    288   return(R);   
    289 }
    290 
    291 
    292 
    293 
    294 
    295274
    296275////////////////////////////////////////////////////////////////////////////
     
    301280
    302281
    303 proc g_formaldiff (poly f,int i,int a,int k)
     282proc g_formaldiff (poly f,intvec H)
    304283{
    305284  int s,t,v;                          // loop variables
    306   int u;                   
     285  int u;
     286  int i=size(H)-1;
     287  int c=sum(H,1..i);
     288  int k=H[i+1];
    307289  def R=plugin_coeffs(f,i);           // plugs the power series in...
    308290  setring R;                          // changes the ring
     
    310292  matrix coe=Coe;                     // gives the t-coeff. after plugging in
    311293  poly fkv;                           // need this stuff for the following
    312   ideal m;
    313   ideal m1=maxidealstep(i,startvar);
    314   ideal m3,m2,J,g_resultdiff;
     294  ideal step=diffidealstep(i,startvar);
     295  ideal m,power,diffstep,J,g_resultdiff;
    315296  for(v=1;v<=k;v++)                   // consider the different t-coeff.
    316297    {
    317      fkv=coe[a+v,1];
     298     fkv=coe[c+v,1];
    318299     m=fkv;                         
    319300     J=fkv;                           
    320301     for(s=1;s<=k-v+1;s++)           // remark: "s<=k-v+1" special!for G!!!
    321302       {
    322          m3=m1^s;
    323          u=size(m3);
     303         power=step^s;
     304         u=size(power);
    324305         for(t=1;t<=u;t++)
    325306          {
    326             m2=contract(m3[t],m);     // actual differentiation
    327             J=J,m2;
     307            diffstep=contract(power[t],m);     // actual differentiation
     308            J=J,diffstep;
    328309          }
    329310       }
     
    348329
    349330
    350 proc maxidealstep (int i,int N)       // returns ideal needed for
     331proc diffidealstep (int i,int N)       // returns ideal needed for
    351332{                                     // differentiation in ith step
    352333  ideal I=var(N+1+i);
     
    412393  return(result);
    413394}
     395
     396
     397
     398
Note: See TracChangeset for help on using the changeset viewer.