Opened 10 months ago

Closed 9 months ago

#31367 closed defect (fixed)

bug in kernel of ring homomorphism of quotient rings

Reported by: gh-mwageringel Owned by:
Priority: major Milestone: sage-9.3
Component: commutative algebra Keywords:
Cc: slelievre, tscrim Merged in:
Authors: Markus Wageringel Reviewers: Travis Scrimshaw
Report Upstream: N/A Work issues:
Branch: 0aba8a0 (Commits, GitHub, GitLab) Commit: 0aba8a061aa148ca448be2d8661744f27c485065
Dependencies: Stopgaps:

Status badges

Description

As reported on sage-devel:

sage: A.<t> = QQ[]
sage: B.<x,y> = QQ[]
sage: H = B.quotient(B.ideal([B.1]))
sage: f = A.hom([H.0], H)
sage: f.kernel()
Principal ideal (t) of Univariate Polynomial Ring in t over Rational Field

whereas the kernel should be the zero ideal.

Change History (6)

comment:1 follow-up: Changed 10 months ago by gh-mwageringel

  • Branch set to u/gh-mwageringel/31367
  • Cc slelievre added
  • Commit set to 0aba8a061aa148ca448be2d8661744f27c485065
  • Status changed from new to needs_review

The problem indeed only occurs with quotient rings, as the implementation switches from the quotient to the cover ring in order to compute an elimination ideal. For this, the elimination variables need to be lifted from the quotient to the cover ring. However, one of the generator variables of the quotient ring is 0 in the example, so 0.lift() gives 0 again, rather than a variable of the cover ring. I have fixed this by taking the correct variables from the cover ring directly.

In more detail, the problematic call to elimination_ideal is of this kind:

sage: R.<x,y,z> = QQ[]
sage: R.ideal(x-y, z).elimination_ideal([y, R(0)])
Ideal (x - y, z) of Multivariate Polynomial Ring in x, y, z over Rational Field

This is a usage error because it calls elimination_ideal with a 0 instead of a variable. The implementation then calls libsingular with the product of the passed variables, which is 0 again, so nothing gets eliminated.

A question that remains is whether elimination_ideal should validate its arguments in order to make sure they are all variables of the ring. This can be a different ticket though.


New commits:

0aba8a031367: fix elimination in case of quotient rings

comment:2 Changed 10 months ago by gh-mwageringel

  • Cc tscrim added

The bot is green. Please review.

comment:3 Changed 10 months ago by tscrim

  • Reviewers set to Travis Scrimshaw
  • Status changed from needs_review to positive_review

LGTM.

comment:4 Changed 10 months ago by gh-mwageringel

Thank you.

comment:5 in reply to: ↑ 1 Changed 10 months ago by gh-mwageringel

Replying to gh-mwageringel:

A question that remains is whether elimination_ideal should validate its arguments in order to make sure they are all variables of the ring. This can be a different ticket though.

I have created #31414 for validating the input of elimination_ideal.

comment:6 Changed 9 months ago by vbraun

  • Branch changed from u/gh-mwageringel/31367 to 0aba8a061aa148ca448be2d8661744f27c485065
  • Resolution set to fixed
  • Status changed from positive_review to closed
Note: See TracTickets for help on using tickets.