Changeset 8b6880 in git


Ignore:
Timestamp:
Nov 26, 2022, 2:22:39 PM (17 months ago)
Author:
Oleksandr Iena <o.g.yena@…>
Branches:
(u'spielwiese', '17f1d200f27c5bd38f5dfc6e8a0879242279d1d8')
Children:
07fefd7e1818a24a256b720bb0c7021058b855b9
Parents:
b3594cbd522dbba3563a80c89f0e99a9eb523ec2
git-author:
Oleksandr Iena <o.g.yena@gmail.com>2022-11-26 14:22:39+01:00
git-committer:
Oleksandr Iena <o.g.yena@gmail.com>2022-11-28 22:47:47+01:00
Message:
Bug fix symNsym: fix and some comments corrected

* The procedure symNsym is not really used in the library, it was however added as a comfort feature.
* The main motivation for having the procedure is to have a possibility to represent a symmetric polynomial in terms of the elementary symmetric polynomials.
* It can be discussed whether the remainder feature is reasonable at all, the current code should give a formally correct answer.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • Singular/LIB/chern.lib

    rb3594cb r8b6880  
    177177          as well a non-symmetric remainder
    178178EXAMPLE:  example symNsym; shows an example
    179 NOTE:     constants are not considered symmetric
     179NOTE:     constants are considered symmetric
    180180"
    181181{
     
    215215  list l=symm(list(A@(1..nV) )); // symmetric functions in A@(i)
    216216  intvec v=leadexp(f), 0; // the exponent of the leading monomial
     217  int exponent;
     218  // We proceed as if the initial polynomial were symmetric.
     219  // Under this assumption the leading monomial will always be of the form
     220  // A@(1)^n1 * A@(2)^n2 * ... * A@(nV)^nnV, n1 >= n2 >= ... >= nnV.
     221  // Everything which contradicts this assumption is considered as a part of the remainder.
    217222  while(v[N1]!=0)
    218223  {
    219224    mon=leadcoef(f); // leading coefficient of f
    220225    monc=mon;
    221     for(i=1; v[N1+i-1]!=0 ;i++ )
    222     {
    223       mon = mon*c@(i)^( v[N1+i-1]-v[N1+i] );
    224       monc = monc*l[i]^( v[N1+i-1]-v[N1+i] ); // has the same leading coefficient as f
    225     }
    226     rez1=rez1+mon; // add a monomial
    227     f=f-monc; // subtract the monomial
     226    for(i=1; i<=nV && mon !=0 ;i++ )
     227    {
     228      exponent = v[N1+i-1]-v[N1+i];
     229      if( exponent >=0 ) // symmetric case
     230      {
     231        mon = mon*c@(i)^exponent;
     232        monc = monc*l[i]^exponent; // has the same leading coefficient as f
     233      }
     234      else // not the symmetric case
     235      {
     236        mon=0;
     237        monc=0;
     238      }
     239    }
     240    if(mon==0) // not the symmetric case
     241    {
     242      rez2=rez2+lead(f);
     243      f=f-lead(f);
     244    }
     245    else // symmetric case
     246    {
     247      rez1=rez1+mon; // add a monomial
     248      f=f-monc; // subtract the monomial
     249    }
    228250    v=leadexp(f), 0;
    229251  }
     
    245267  list l=c(1..3);
    246268  // The symmetric part of f = 3x2 + 3y2 + 3z2 + 7xyz + y
    247   // in terms of the elemenatary symmetric functions c(1), c(2), c(3)
     269  // in terms of the elementary symmetric functions c(1), c(2), c(3)
    248270  // and the remainder
    249271  poly f = 3x2 + 3y2 + 3z2 + 7xyz + y;
    250272  print( symNsym(f, l) );
    251   // Take a symmetrix polynomial in variables x and z
     273  // Take a symmetric polynomial in variables x and z
    252274  f=x2+xz+z2;
    253275  // Express it in terms of the elementary the symmetric functions
     
    24792501  print( cProj(1) );
    24802502
    2481   // the coefficients of the total Chern class of the complex projective line
     2503  // the coefficients of the total Chern class of the complex projective plane
    24822504  print( cProj(2) );
    24832505
    2484   // the coefficients of the total Chern class of the complex projective line
     2506  // the coefficients of the total Chern class of the complex projective space
     2507  // of dimension three
    24852508  print( cProj(3) );
    24862509}
Note: See TracChangeset for help on using the changeset viewer.