#21108 closed enhancement (fixed)

Use flattening in quo_rem

Reported by: vdelecroix Owned by:
Priority: major Milestone: sage-7.3
Component: algebra Keywords:
Cc: bhutz Merged in:
Authors: Vincent Delecroix Reviewers: Ben Hutz
Report Upstream: N/A Work issues:
Branch: a593121 (Commits) Commit: a5931218dac6be179f0338df0e3ce8e4793896c1
Dependencies: #21106 Stopgaps:

Description (last modified by vdelecroix)

Using the flattening morphism from #21106 we can divide more polynomials! With the branch applied the following works

sage: R = QQ['a','b']['c','d']
sage: R('(a*b+1)*c + c^2').quo_rem(R('c'))
(c + a*b + 1, 0)

However, will persist a discrepency between QQ['a']['b']['c'] and QQ['a','b','c'] when the division is not exact.

sage: R1 = QQ['a']['b']['c']
sage: R2 = QQ['a','b','c']
sage: R1('a').quo_rem(R1('b'))
Traceback (most recent call last):
...
ArithmeticError: Division non exact (consider coercing
to polynomials over the fraction field)
sage: R2('a').quo_rem(R2('b'))
(0, a)

See this sage-devel thread.

Change History (8)

comment:1 Changed 14 months ago by vdelecroix

  • Branch set to u/vdelecroix/21108
  • Cc bhutz added
  • Commit set to d9afab6ae091a5018cd938831d22f117a61284e9
  • Description modified (diff)
  • Status changed from new to needs_review

New commits:

cf97fed21106: create polynomial ring flattening class
957589f21106: minor fixes
8c22f7521106: new version of _call_
570d9ee21106: added doc tests
f05f7db21106:cleaning
6e5094221106: change file mode
19cb17121106: Python3 compatibility + more cleaning
d7b066d21108: method flattening_morphism
d9afab621108: use flattening in quo_rem

comment:2 Changed 14 months ago by vdelecroix

  • Authors set to Vincent Delecroix

comment:3 Changed 14 months ago by bhutz

  • Branch changed from u/vdelecroix/21108 to u/bhutz/21108

comment:4 Changed 14 months ago by bhutz

  • Branch changed from u/bhutz/21108 to u/vdelecroix/21108
  • Reviewers set to Ben Hutz

Looks fine to me. All test pan out.

Note that fixing the quo_rem resolves the issue in #21100. So I've included a commit with that example to test that issue. We can then close that ticket as resolved or whatever is appropriate.

If you're fine with the example, this can be marked positive-review.

comment:5 Changed 14 months ago by bhutz

  • Branch changed from u/vdelecroix/21108 to u/bhutz/21108
  • Commit changed from d9afab6ae091a5018cd938831d22f117a61284e9 to a5931218dac6be179f0338df0e3ce8e4793896c1

New commits:

a59312121108: add normalaize_coordinates example

comment:6 Changed 14 months ago by vdelecroix

  • Description modified (diff)

comment:7 Changed 14 months ago by bhutz

  • Status changed from needs_review to positive_review

comment:8 Changed 14 months ago by vbraun

  • Branch changed from u/bhutz/21108 to a5931218dac6be179f0338df0e3ce8e4793896c1
  • Resolution set to fixed
  • Status changed from positive_review to closed
Note: See TracTickets for help on using tickets.