Opened 3 years ago

Closed 3 years ago

# Use flattening in quo_rem

Reported by: Owned by: vdelecroix major sage-7.3 algebra bhutz Vincent Delecroix Ben Hutz N/A a593121 (Commits) a5931218dac6be179f0338df0e3ce8e4793896c1 #21106

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)
```

### comment:1 Changed 3 years ago by vdelecroix

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

New commits:

 ​cf97fed `21106: create polynomial ring flattening class` ​957589f `21106: minor fixes` ​8c22f75 `21106: new version of _call_` ​570d9ee `21106: added doc tests` ​f05f7db `21106:cleaning` ​6e50942 `21106: change file mode` ​19cb171 `21106: Python3 compatibility + more cleaning` ​d7b066d `21108: method flattening_morphism` ​d9afab6 `21108: use flattening in quo_rem`

### comment:2 Changed 3 years ago by vdelecroix

• Authors set to Vincent Delecroix

### comment:3 Changed 3 years ago by bhutz

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

### comment:4 Changed 3 years 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 3 years ago by bhutz

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

New commits:

 ​a593121 `21108: add normalaize_coordinates example`

### comment:6 Changed 3 years ago by vdelecroix

• Description modified (diff)

### comment:7 Changed 3 years ago by bhutz

• Status changed from needs_review to positive_review

### comment:8 Changed 3 years 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.