Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Trac #31040: roots() method of polynomials over QQ misses roots in p-…
…adic extension fields In !SageMath 9.3.beta3: {{{ sage: R.<x> = QQ[] sage: K.<a> = Qq(3).extension(x^2 + 1) sage: (x^2 + 1).base_extend(K).roots() [(a + O(3^20), 1), (2*a + 2*a*3 + 2*a*3^2 + 2*a*3^3 + 2*a*3^4 + 2*a*3^5 + 2*a*3^6 + 2*a*3^7 + 2*a*3^8 + 2*a*3^9 + 2*a*3^10 + 2*a*3^11 + 2*a*3^12 + 2*a*3^13 + 2*a*3^14 + 2*a*3^15 + 2*a*3^16 + 2*a*3^17 + 2*a*3^18 + 2*a*3^19 + O(3^20), 1)] sage: (x^2 + 1).roots(K) # should return the same as above [] }}} This can be fixed by only using the `factor_padic()` method when we are looking for roots in '''Z''',,''p'',, or '''Q''',,''p'',,. URL: https://trac.sagemath.org/31040 Reported by: pbruin Ticket author(s): Peter Bruin Reviewer(s): Marc Mezzarobba
- Loading branch information