Extended Euclid with polynomials
Suppose given polynomials e,q,h,r in R[x], p∈R (R a ring), how can I use Sage to find f in R[x] so fe=qh+r(mod p)?
Similarly, given f,g in R[x] with gcd(f,g)=1, what function can I use to compute s,t in R[x] so sf+gh=1(mod p) ?