Ticket #13968 (closed defect: fixed)

Opened 4 months ago

Last modified 4 months ago

BooleanPolynomialSequence.eliminate_linear_variables leaves some linear equations in corner cases

Reported by: Bouillaguet Owned by: malb
Priority: major Milestone: sage-5.7
Component: commutative algebra Keywords:
Cc: malb Work issues:
Report Upstream: N/A Reviewers: Martin Albrecht
Authors: Charles Bouillaguet Merged in: sage-5.7.beta1
Dependencies: #13847 Stopgaps:

Description

sage: R.<x,y,z> = BooleanPolynomialRing()
sage: S = Sequence([x*y*z+x*y+z*y+x*z, x+y+z+1, x+y])
sage: S.eliminate_linear_variables(return_reductors=True)
[z + 1], [x + y + z + 1])

Obviously, the first part is linear, and it shouldn't. The result should have been:

( [], [z + 1, x + y] )

Attachments

13968_eliminate_linear_vars.patch Download (7.6 KB) - added by Bouillaguet 4 months ago.

Change History

comment:1 Changed 4 months ago by Bouillaguet

  • Authors set to Charles Bouillaguet

The patch repairs the function, along with the following changes:

  • by default, the threshold for the size of the tail changes from 3 to +infinity (3 was completely arbitrary anyway)
  • the linear reductors form a reduced groebner basis (i.e. they are in RREF).

comment:2 Changed 4 months ago by Bouillaguet

  • Status changed from new to needs_review

comment:3 Changed 4 months ago by malb

a bit nitpicky but I think it should read skip is None instead of skip==None. But I think other than that the patch looks good.

comment:4 Changed 4 months ago by Bouillaguet

replaced == None by is None

comment:5 Changed 4 months ago by malb

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

comment:6 Changed 4 months ago by jdemeyer

  • Status changed from positive_review to needs_work
  • Dependencies set to #13847

This should be rebased to #13847.

Changed 4 months ago by Bouillaguet

comment:7 Changed 4 months ago by Bouillaguet

  • Status changed from needs_work to needs_review

Done

comment:8 Changed 4 months ago by jdemeyer

  • Status changed from needs_review to positive_review

comment:9 Changed 4 months ago by jdemeyer

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