Changes between Initial Version and Version 4 of Ticket #11878


Ignore:
Timestamp:
10/03/11 23:45:29 (20 months ago)
Author:
SimonKing
Comment:

I broadened the purpose of the ticket: Implementing quotients of multivariate polynomial rings via Singular should be just as easy as implementing quotients of g-algebras via Plural.

There is a design problem for the elements, though. I see three approaches:

  1. Have a single class of elements for quotients and non-quotients. Do a reduction with respect to the modulus (if there is any) when comparing, hashing or printing elements.
  2. Have two separate classes, essentially copying the old MPolynomial_libsingular class for creating a NCPolynomial_plural class. The change would mainly amount to replacing the strings MP and _libsingular by NCP and _plural, respectively.
  3. Have two separate classes, but avoid code-duplication. For this to work, one needs to modify the arithmetic methods of MPolynomial_libsingular, such that for example left._add_(right) does not return a new instance of MPolynomial_libsingular, but a new instance of left.__class__.

All three approaches have disadvantages: The first approach may slow down the arithmetic of polynomials, since any call to hash, repr and cmp would involve a test whether the parent is a quotient ring. The second would imply a massive code duplication. The third may, again, slow down arithmetic, since (as in the first approach) arithmetic is spoiled by additional tests.

Modern editors are capable to copy-and-paste, and I prefer speed. Thus, I'll go for the second approach, unless one of you objects.

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #11878

    • Property Summary changed from Proper implementation of quotients of g-algebras to Proper implementation of quotients of g-algebras and polynomial rings
  • Ticket #11878 – Description

    initial v4  
    22 
    33The purpose here is to use rings constructed by Singular from a "ring list", which should provide a more efficient implementation. 
     4 
     5There should also be a proper implementation for the commutative case as well. Currently, generic code is used: 
     6{{{ 
     7sage: P.<x,y,z> = QQ[] 
     8sage: I = [x^2+x*y*z,y^2-z^3*y,z^3+y^5*x*z]*P 
     9sage: Q = P.quotient(I) 
     10sage: type(Q) 
     11<class 'sage.rings.quotient_ring.QuotientRing_generic_with_category'> 
     12}}}