Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improvements and corrections to QuotientRingElement #13697

Open
sagetrac-Bouillaguet mannequin opened this issue Nov 10, 2012 · 16 comments
Open

Improvements and corrections to QuotientRingElement #13697

sagetrac-Bouillaguet mannequin opened this issue Nov 10, 2012 · 16 comments

Comments

@sagetrac-Bouillaguet
Copy link
Mannequin

sagetrac-Bouillaguet mannequin commented Nov 10, 2012

The class QuotientRingElement, which implements the operations an element of the quotient R/I of a ring R by an ideal I, suffers from several problems and limitations. Most of these were uncovered while working on #13670 and #13675.

  • While QuotientRingElement aims to be generic, it contains code dedicated to the case where R is a multivariate polynomial ring. In particular, the implementation of division first checks if R supports the computation of Groebner bases. This is not the proper way to go ; a special class should be created, following the approach taken for univariate polynomial quotient rings (PolynomialQuotientRing, PolynomialQuotientRingElement). We should create MPolynomialQuotientRing and MPolynomialQuotientRingElement, and host multivariate-polynomial-specific code here.

  • The is_unit() function does almost nothing (it checks if its argument is a unit in R). In the case of (multivariate) polynomial rings, an actual test can be implemented.

  • The class lacks an is_regular() methods (that detects zero divisors).

  • In the case of (multivariate) polynomial rings, is_regular() can be implemented.

  • The interest of is_regular() is that division by x should only be allowed if x is regular.

  • The present implementation of division has problems. It contains multivariate-polynomial-specific code, which is bad. Furthermore, it allows division by zero-divisors, even tough the result is not defined :

    sage: R.<x,y> = QQ[]
    sage: S = R.quotient_ring(R.ideal(x^2, y))
    sage: S(2*x)/S(x)
    S(2)
    sage: S(2) * S(x) == S(2*x)  # indeed, division works correctly....
    True
    sage: S(2+x) * S(x) == S(2*x) # but several "quotients" are possible, because ``S(x)`` is a zero-divisor
    

    In contrast, univariate polynomial rings behave more rigorously:

    sage: P.<x> = QQ[]
    sage: S = P.quotient_ring(x^2)
    sage: S(2*x)/S(x)
    ZeroDivisionError: element xbar of quotient polynomial ring not invertible
    
  • This raises the question of how we want division to proceed:

    • ignore the problem? (current status, no overhead)
    • test for regularity before dividing (mathematically better, may be much slower)
  • Clarifying all this would then open the possibility to have, for example, special code to deal with ideals given by a regular chain instead of a Groebner basis


Apply

  1. attachment: trac_13697.patch

Depends on #13670
Depends on #13671
Depends on #13675
Depends on #13714

Component: commutative algebra

Keywords: sd86.5

Author: Charles Bouillaguet

Branch/Commit: u/saraedum/ticket/13697 @ 6276d0b

Issue created by migration from https://trac.sagemath.org/ticket/13697

@sagetrac-Bouillaguet
Copy link
Mannequin Author

sagetrac-Bouillaguet mannequin commented Jan 21, 2013

Changed dependencies from #13670,#13671,#13675 to #13670,#13671,#13675,#13714

@sagetrac-Bouillaguet
Copy link
Mannequin Author

sagetrac-Bouillaguet mannequin commented Feb 11, 2013

comment:2

Attachment: improve_quotient_ring.patch.gz

@saraedum
Copy link
Member

saraedum commented Mar 4, 2013

Author: Charles Bouillaguet

@saraedum
Copy link
Member

saraedum commented Mar 4, 2013

comment:4

I'll rebase this patch and try to review it.

@saraedum
Copy link
Member

rebase of Bouillaguet's patch

@saraedum
Copy link
Member

comment:5

Attachment: trac_13697.patch.gz

apply trac_13697.patch

@saraedum

This comment has been minimized.

@jdemeyer jdemeyer modified the milestones: sage-5.11, sage-5.12 Aug 13, 2013
@saraedum
Copy link
Member

Branch: u/saraedum/ticket/13697

@saraedum

This comment has been minimized.

@saraedum saraedum modified the milestones: sage-5.12, sage-6.0 Sep 12, 2013
@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Sep 12, 2013

Branch pushed to git repo; I updated commit sha1. New commits:

[changeset:756831a]added a doctest for QuotientRingElement.is_unit()
[changeset:1967e3b]removed trailing whitespace and semicolons from docstrings

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Sep 12, 2013

Commit: 756831a

@saraedum
Copy link
Member

comment:10

Your patch does not address all the questions in the Ticket summary. How do you want to proceed with this? Should we split this and move the issues to new tickets?

@sagetrac-vbraun-spam sagetrac-vbraun-spam mannequin modified the milestones: sage-6.0, sage-6.1 Dec 17, 2013
@sagetrac-vbraun-spam sagetrac-vbraun-spam mannequin modified the milestones: sage-6.1, sage-6.2 Jan 30, 2014
@pjbruin
Copy link
Contributor

pjbruin commented Apr 12, 2014

comment:13

I ran into the following:

sage: R.<x,y>=QQ[]
sage: Q.<xx,yy>=R.quotient(x^2-y^3)
sage: xx/yy
...
ArithmeticError: Division failed. The numerator is not a multiple of the denominator.

It would be nice if in this situation, the quotient ring could check if it is a domain, and if so, return xx/yy as an element of the fraction field.

@sagetrac-vbraun-spam sagetrac-vbraun-spam mannequin removed this from the sage-6.2 milestone May 6, 2014
@sagetrac-vbraun-spam sagetrac-vbraun-spam mannequin added this to the sage-6.3 milestone May 6, 2014
@sagetrac-vbraun-spam sagetrac-vbraun-spam mannequin modified the milestones: sage-6.3, sage-6.4 Aug 10, 2014
@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Jun 5, 2017

Changed commit from 756831a to 6276d0b

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Jun 5, 2017

Branch pushed to git repo; I updated commit sha1. New commits:

6276d0bMerge branch 'develop' into t/13697/ticket/13697

@saraedum
Copy link
Member

saraedum commented Jun 6, 2017

Changed keywords from none to sd86.5

@mkoeppe mkoeppe removed this from the sage-6.4 milestone Dec 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants