Opened 3 years ago

Closed 3 years ago

# Bugfix concerning ticket #26421

Reported by: Owned by: soehms critical sage-9.1 commutative algebra factorization, integral domain tscrim Sebastian Oehms Travis Scrimshaw N/A a21db27 a21db2793711b9bd10127911bc9a2c432dca9947

### Description

In #26421 factorization of polynomials has been extended to previously untreated cases in which the polynomial's base ring is an integral domain. The factorization is done over the field of fraction and excepted if it can be coerced into the base ring itself. Since the method `base_change` of the class `Factorzation` doesn't check if the unit of the factorization is coerced to a unit again, this implementation is too vastly:

```sage: R.<t> = LaurentPolynomialRing(ZZ)
sage: P.<x> = R[]
sage: f = 2*x + 4
sage: f.is_irreducible()
True
sage: F = f.factor(); F
(2) * (x + 2)
sage: F.unit()
2
```

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

Branch: → u/soehms/factorization_integral_domain_29266

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

Authors: → Sebastian Oehms → 004c1c4211af86c177b8fd537f6aad01cc593623 new → needs_review

Maybe a better place for the fix would be the method `base_change` of the class `Factorization`. But since this leads to the failure of previous doctests (in cases `is_unit` is not implemented), I preferred the implementation in method `factor`.

New commits:

 ​004c1c4 `29266 initial version`

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

Reviewers: → Travis Scrimshaw

One little change: "coerce" to "convert". If it was a coercion map, then the fact it was a unit must be preserved (as coercions must be morphisms). Once you change that, you can set a positive review.

### comment:4 Changed 3 years ago by git

Branch pushed to git repo; I updated commit sha1. New commits:

 ​a21db27 `29266: correction according to review`

### comment:5 Changed 3 years ago by soehms

Status: needs_review → positive_review

Thanks!

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

Branch: u/soehms/factorization_integral_domain_29266 → a21db2793711b9bd10127911bc9a2c432dca9947 → fixed positive_review → closed
Note: See TracTickets for help on using tickets.