Opened 13 years ago

Closed 12 years ago

#8993 closed enhancement (fixed)

Representation of polynomial quotient rings in Singular

Reported by: Simon King Owned by: William Stein
Priority: major Milestone: sage-4.5.2
Component: interfaces Keywords: polynomial quotient ring, singular
Cc: Merged in: sage-4.5.2.alpha1
Authors: Simon King Reviewers: Martin Albrecht
Report Upstream: N/A Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Status badges

Description

Currently there is no representation of univariate polynomial quotient rings in the Singular interface; it was only implemented for the multivariate case.

The attached patch implements it:

sage: P.<x> = QQ[]
sage: Q.<xi> = P.quo([(x^2+1)])
sage: singular(xi)
xi
sage: singular(Q)
//   characteristic : 0
//   number of vars : 1
//        block   1 : ordering lp
//                  : names    xi
//        block   2 : ordering C
// quotient ring from ideal
_[1]=xi^2+1
sage: (singular(xi)*singular(xi)).NF('std(0)')
-1

Attachments (2)

8993_poly_quotient_in_singular.patch (2.8 KB) - added by Simon King 12 years ago.
Implement polynomial quotient rings in singular interface
8993_poly_quotient_in_singular.p1.patch (1.2 KB) - added by Simon King 12 years ago.
Avoid "import sage" according to the reviewer's request - apply after first patch

Download all attachments as: .zip

Change History (12)

comment:1 Changed 13 years ago by Simon King

Status: newneeds_review

comment:2 Changed 13 years ago by Robert Bradshaw

Status: needs_reviewneeds_work

Mostly looks good, the only issue is that you should never "import sage" (or sage.all) from within the sage library.

comment:3 in reply to:  2 ; Changed 13 years ago by Simon King

Replying to robertwb:

Mostly looks good, the only issue is that you should never "import sage" (or sage.all) from within the sage library.

Do I understand correctly:

It is OK that I do from sage.all import singular inside one method, but I should not do import sage on top of the file?

I'll submit a correction soon.

Cheers,

Simon

comment:4 Changed 13 years ago by Robert Bradshaw

Yes.

comment:5 in reply to:  3 Changed 13 years ago by Simon King

Status: needs_workneeds_review

Replying to SimonKing:

... It is OK that I do from sage.all import singular inside one method, but I should not do import sage on top of the file?

I'll submit a correction soon.

Done!

comment:6 Changed 12 years ago by Martin Albrecht

Status: needs_reviewpositive_review

Patch looks okay, doctests pass.

comment:7 Changed 12 years ago by Dan Drake

Reviewers: Martin Albrecht
Status: positive_reviewneeds_work

Please include the ticket number in the commit messages for your patches!

Changed 12 years ago by Simon King

Implement polynomial quotient rings in singular interface

Changed 12 years ago by Simon King

Avoid "import sage" according to the reviewer's request - apply after first patch

comment:8 in reply to:  7 ; Changed 12 years ago by Simon King

Status: needs_workpositive_review

Replying to ddrake:

Please include the ticket number in the commit messages for your patches!

I changed the commit message accordingly and updated the attachments. I hope this entitles me to switch back to "positive review".

comment:9 in reply to:  8 Changed 12 years ago by Dan Drake

Replying to SimonKing:

I changed the commit message accordingly and updated the attachments. I hope this entitles me to switch back to "positive review".

It certainly does. Thanks for fixing this! It should get merged in 4.5.2.alpha1.

comment:10 Changed 12 years ago by Dan Drake

Merged in: sage-4.5.2.alpha1
Resolution: fixed
Status: positive_reviewclosed

Merged both patches in 4.5.2.alpha1.

Note: See TracTickets for help on using tickets.