Opened 8 years ago

Closed 8 years ago

#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 Merged in: sage-5.3.beta0
Authors: Alexander Dreyer Reviewers: Martin Albrecht
Report Upstream: None of the above - read trac for reasoning. Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Description (last modified by AlexanderDreyer)

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.

Attachments (1)

degneglex.patch (16.3 KB) - added by AlexanderDreyer 8 years ago.
Patch for the sage library (devel/sage)

Download all attachments as: .zip

Change History (12)

comment:1 Changed 8 years ago by AlexanderDreyer

  • Status changed from new to needs_review

comment:2 Changed 8 years ago by AlexanderDreyer

Replaced the patch, there was a wrong Singular ordering in the back.

comment:3 Changed 8 years 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 8 years 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 8 years ago by AlexanderDreyer

Please reload the patch. (There was an intermediate patch, was this was wrong.)

comment:6 Changed 8 years ago by malb

Alright, let's see what the patchbot has to say about the current one then :)

Changed 8 years ago by AlexanderDreyer

Patch for the sage library (devel/sage)

comment:7 Changed 8 years ago by AlexanderDreyer

Fixing that trailing whitespace issue (understanding how patch-bot works).

comment:8 Changed 8 years ago by AlexanderDreyer

  • Description modified (diff)

comment:9 Changed 8 years ago by AlexanderDreyer

The patchbot green-lighted, so we have positive review here?

comment:10 Changed 8 years ago by malb

  • Reviewers set to Martin Albrecht
  • Status changed from needs_review to positive_review

comment:11 Changed 8 years ago by jdemeyer

  • Merged in set to sage-5.3.beta0
  • Resolution set to fixed
  • Status changed from positive_review to closed
Note: See TracTickets for help on using tickets.