How do I specify that I want a polynomial to be thought of as having coefficients in a given ring $R$ in SAGE?
Separately, if I give SAGE a polynomial, how do I have it solve that equation over a certain ring $R$?
Is there a way to compute $n$th roots in the $p$-adic numbers of some given fixed $p$-adic number without using the answers to 1) and 2) above (i.e. without explicitly having SAGE solve an equation)? The ^(1/n) command does not seem to be working, for example, here (trying various primes in place of 7):
R = Qp(2, prec = 10, type = 'capped-rel', print_mode = 'series')
a = R(7)
a^(1/3)
2026-03-27 15:07:39.1774624059
Solving equations over rings and $p$-adic $n$th roots in SAGE
456 Views Asked by Bumbble Comm https://math.techqa.club/user/bumbble-comm/detail At
1
For #1:
For #2: it depends on the ring. If working in a polynomial ring with one variable, then
f.roots()could work. Otherwise, tryf.factor(). (I don't think either will work over $\mathbb{Z}/10\mathbb{Z}$, but they will work over $\mathbb{Z}/p\mathbb{Z}$ if $p$ is prime.)For #3: try
a.nth_root(3).