Changeset 836e389 in git


Ignore:
Timestamp:
Jan 9, 2009, 4:19:26 PM (15 years ago)
Author:
Motsak Oleksandr <motsak@…>
Branches:
(u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
Children:
360507e4cf4ba3531cb19770b86e6a337f9d439a
Parents:
35eef23de304e5ae3c4f51aadb5be842bb3f3c8a
Message:
*motsak:
 !: spoly works now also for Non-commutative case.
 +: product criterion check can be disabled by defining global int variable @@@NOPC=1.


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

Legend:

Unmodified
Added
Removed
  • Singular/LIB/teachstd.lib

    r35eef23 r836e389  
    22//GMG, last modified 28.9.01
    33///////////////////////////////////////////////////////////////////////////////
    4 version="$Id: teachstd.lib,v 1.6 2006-07-25 12:02:44 Singular Exp $";
     4version="$Id: teachstd.lib,v 1.7 2009-01-09 15:19:26 motsak Exp $";
    55category="Teaching";
    66info="
     
    191191  int e;
    192192  poly o = monomialLcm(f,g);
     193
    193194  if( o == 0)                    //can only happen, if vectors f and g involve
    194195  {                              //different module components
     
    197198  }
    198199
    199   poly m=leadmonomial(f);         //compute the leading monomial as poly
    200   poly n=leadmonomial(g);
     200  poly m=(o/leadmonomial(f));         //compute the leading monomial as poly
     201  poly n=(o/leadmonomial(g));
     202 
     203  f = m * f;
     204  g = n * g; // now they have the same LM! 
    201205
    202206  if (#[1]==0)                    //the asymmetric s-poly
    203207  {
    204     def sp = (o/m)*f - (leadcoef(f)/leadcoef(g))*(o/n)*g;
     208    def sp = f - (leadcoef(f)/leadcoef(g))*g;
    205209  }
    206210  else                            //the symmetric s-poly, avoiding division
    207211  {
    208     def sp = leadcoef(g)*(o/m)*f - leadcoef(f)*(o/n)*g;
     212    def sp = leadcoef(g)*f - leadcoef(f)*g;
    209213  }
    210214  return(sp);
     
    413417"
    414418{
     419  if( defined(@@@NOPC) && (@@@NOPC == 1) )
     420  {
     421    return(0);
     422  };
     423 
    415424  if(typeof(f)=="poly")    //product criterion for polynomials
    416425  {
Note: See TracChangeset for help on using the changeset viewer.