Ignore:
Timestamp:
Mar 15, 2012, 7:43:06 PM (12 years ago)
Author:
Oleksandr Motsak <motsak@…>
Branches:
(u'spielwiese', 'e7cc1ebecb61be8b9ca6c18016352af89940b21a')
Children:
da0565bb9765186b7c8bde819d2ea3522f22e26f
Parents:
90934a9f682716f4e6fe4afb6c7eb7b8f281b8bf
git-author:
Oleksandr Motsak <motsak@mathematik.uni-kl.de>2012-03-15 19:43:06+01:00
git-committer:
Oleksandr Motsak <motsak@mathematik.uni-kl.de>2012-03-16 19:36:36+01:00
Message:
improved n[at]CoeffIsEqual

chg: they should test the *equality* of underlying rings,
e.g. in order to assure the coeffs of the following rings are the same:Q(P)[X],Q(P)[Y]
File:
1 edited

Legend:

Unmodified
Added
Removed
  • libpolys/polys/ext_fields/algext.cc

    r90934a r4d94c97  
    521521     registered cf and perform reference counting rather than creating
    522522     multiple copies of the same coefficient field/domain/ring */
    523   return (naRing == e->r);
     523  if (naRing == e->r)
     524    return TRUE;
    524525  /* (Note that then also the minimal ideals will necessarily be
    525526     the same, as they are attached to the ring.) */
     527
     528  // NOTE: Q(a)[x] && Q(a)[y] should better share the _same_ Q(a)...
     529  if( rEqual(naRing, e->r, TRUE) )
     530  {
     531    const ideal mi = naRing->minideal;
     532    assume( IDELEMS(mi) == 1 );
     533    ideal ii = e->i;
     534    assume( IDELEMS(ii) == 1 );
     535
     536    // TODO: the following should be extended for 2 *equal* rings...
     537    if( p_EqualPolys(mi->m[0], ii->m[0], naRing, e->r) )
     538    {
     539      id_Delete(&ii, e->r);
     540      rDelete(e->r);
     541      return TRUE;
     542    }
     543  }
     544
     545  return FALSE; 
     546 
    526547}
    527548
Note: See TracChangeset for help on using the changeset viewer.