Opened 2 years ago

## #23938 new defect

# No is_irreducible() method for multi-variate polynomials

Reported by: | klee | Owned by: | |
---|---|---|---|

Priority: | minor | Milestone: | sage-8.1 |

Component: | basic arithmetic | Keywords: | |

Cc: | Merged in: | ||

Authors: | Reviewers: | ||

Report Upstream: | N/A | Work issues: | |

Branch: | Commit: | ||

Dependencies: | Stopgaps: |

### Description

There is no is_irreducible() method for multi-variate polynomials in Sage. There is an alternative is_prime() method for this purpose. But this is very slow:

sage: f.parent() Multivariate Polynomial Ring in x, y over Finite Field of size 2 sage: f=(x^10+y^10)^2 sage: time f.is_prime() CPU times: user 33.6 ms, sys: 497 µs, total: 34.1 ms Wall time: 33.9 ms False sage: time sum([e for _,e in f.factor()]) == 1 CPU times: user 307 µs, sys: 34 µs, total: 341 µs Wall time: 324 µs False sage: f=x^9+y^9+1 sage: time sum([e for _,e in f.factor()]) == 1 CPU times: user 832 µs, sys: 118 µs, total: 950 µs Wall time: 1.64 ms True sage: time f.is_prime() CPU times: user 19.4 ms, sys: 521 µs, total: 19.9 ms Wall time: 19.8 ms True

Bruno:

We can add the method, based on the factorization method. Another point is that it seems that Singular has a irreducibility test, that is probably faster than the factorization.

**Note:**See TracTickets for help on using tickets.