Ticket #13229 (closed enhancement: fixed)
Adding `DegNegLex` to TermOrder
| Reported by: | AlexanderDreyer | Owned by: | AlexanderDreyer |
|---|---|---|---|
| Priority: | major | Milestone: | sage-5.3 |
| Component: | commutative algebra | Keywords: | |
| Cc: | burcin, malb, PolyBoRi | Work issues: | |
| Report Upstream: | None of the above - read trac for reasoning. | Reviewers: | Martin Albrecht |
| Authors: | Alexander Dreyer | Merged in: | sage-5.3.beta0 |
| Dependencies: | Stopgaps: |
Description (last modified by AlexanderDreyer) (diff)
The attached patch adds the Degree Negative Lexicographical term order (DegNegLex) to Sage 5.1.
It is defined as follows: xa < xb if and only if deg(xa) < deg(xb) or deg(xa) = deg(xb) and there exists 1 <= i <= n such that a1 = b 1 , ... , a i-1 = b i-1, ..., ai > bi.
It is a native term ordering of PolyBoRi ("dp_asc") which Sage does not support yet. But Sage uses it internally to implement DegRevLex-ordered BooleanPolynomialRings by reverting .gens(). It is useful for Sage to distinguish between the original dp_asc and DegRevLex. It will help to fix some design issues discovered when fixing #13202.
Singular supports this as (a(1:n),ls(n)). The patch also includes the patches for the interfaces libSingular and Singular-pexpect.
- Apply: degneglex.patch
Attachments
Change History
comment:2 Changed 10 months ago by AlexanderDreyer
Replaced the patch, there was a wrong Singular ordering in the back.
comment:3 Changed 10 months ago by malb
The patch looks good, i.e., reading it revealed no issues. So if doctests pass I say it's good to go.
comment:4 Changed 10 months ago by malb
Patchbot reports:
sage -t -force_lib devel/sage-13229/sage/rings/polynomial/multi_polynomial_libsingular.pyx
**********************************************************************
File "/mnt/storage2TB/patchbot/Sage/sage-5.1.rc1/devel/sage-13229/sage/rings/polynomial/multi_polynomial_libsingular.pyx", line 1261:
sage: singular(R)
Expected:
// characteristic : 0
// number of vars : 2
// block 1 : ordering a
// : names x0 x1
// : weights 1 1
// block 2 : ordering rp
// : names x0 x1
// block 3 : ordering C
Got:
// characteristic : 0
// number of vars : 2
// block 1 : ordering a
// : names x0 x1
// : weights 1 1
// block 2 : ordering ls
// : names x0 x1
// block 3 : ordering C
**********************************************************************
comment:5 Changed 10 months ago by AlexanderDreyer
Please reload the patch. (There was an intermediate patch, was this was wrong.)
comment:6 Changed 10 months ago by malb
Alright, let's see what the patchbot has to say about the current one then :)
Changed 10 months ago by AlexanderDreyer
-
attachment
degneglex.patch
added
Patch for the sage library (devel/sage)
comment:7 Changed 10 months ago by AlexanderDreyer
Fixing that trailing whitespace issue (understanding how patch-bot works).
comment:9 Changed 10 months ago by AlexanderDreyer
The patchbot green-lighted, so we have positive review here?
comment:10 Changed 10 months ago by malb
- Status changed from needs_review to positive_review
- Reviewers set to Martin Albrecht
comment:11 Changed 10 months ago by jdemeyer
- Status changed from positive_review to closed
- Resolution set to fixed
- Merged in set to sage-5.3.beta0
