code: def dmp_inner_subresultants(f, g, u, K):
      """
      Subresultant PRS algorithm in `K[X]`.
  
      Examples
      ========
  
      >>> from sympy.polys import ring, ZZ
      >>> R, x,y = ring("x,y", ZZ)
  
      >>> f = 3*x**2*y - y**3 - 4
      >>> g = x**2 + x*y**3 - 9
  
      >>> a = 3*x*y**4 + y**3 - 27*y + 4
      >>> b = -3*y**10 - 12*y**7 + y**6 - 54*y**4 + 8*y**3 + 729*y**2 - 216*y + 16
  
      >>> prs = [f, g, a, b]
      >>> sres = [[1], [1], [3, 0, 0, 0, 0], [-3, 0, 0, -12, 1, 0, -54, 8, 729, -216, 16]]
  
      >>> R.dmp_inner_subresultants(f, g) == (prs, sres)
      True
  
      """
      if not u:
          return dup_inner_subresultants(f, g, K)
  
      n = dmp_degree(f, u)
      m = dmp_degree(g, u)
  
      if n < m:
          f, g = g, f
          n, m = m, n
  
      if dmp_zero_p(f, u):
          return [], []
  
      v = u - 1
      if dmp_zero_p(g, u):
          return [f], [dmp_ground(K.one, v)]
  
      R = [f, g]
      d = n - m
  
      b = dmp_pow(dmp_ground(-K.one, v), d + 1, v, K)
  
      h = dmp_prem(f, g, u, K)
      h = dmp_mul_term(h, b, 0, u, K)
  
      lc = dmp_LC(g, K)
      c = dmp_pow(lc, d, v, K)
  
      S = [dmp_ground(K.one, v), c]
      c = dmp_neg(c, v, K)
  
      while not dmp_zero_p(h, u):
          k = dmp_degree(h, u)
          R.append(h)
  
          f, g, m, d = g, h, k, m - k
  
          b = dmp_mul(dmp_neg(lc, v, K), dmp_pow(c, d, v, K), v, K)
  
          h = dmp_prem(f, g, u, K)
          h = [dmp_quo(ch, b, v, K) for ch in h]
  
          lc = dmp_LC(g, K)
  
          if d > 1:
              p = dmp_pow(dmp_neg(lc, v, K), d, v, K)
              q = dmp_pow(c, d - 1, v, K)
              c = dmp_quo(p, q, v, K)
          else:
              c = dmp_neg(lc, v, K)
  
          S.append(dmp_neg(c, v, K))
  
      return R, S
  
imports: from sympy.polys.densearith import dup_sub_mul, dup_neg, dmp_neg, dmp_add, dmp_sub, dup_mul, dmp_mul, dmp_pow, dup_div, dmp_div, dup_rem, dup_quo, dmp_quo, dup_prem, dmp_prem, dup_mul_ground, dmp_mul_ground, dmp_mul_term, dup_quo_ground, dmp_quo_ground, dup_max_norm, dmp_max_norm
  from sympy.polys.densebasic import dup_strip, dmp_raise, dmp_zero, dmp_one, dmp_ground, dmp_one_p, dmp_zero_p, dmp_zeros, dup_degree, dmp_degree, dmp_degree_in, dup_LC, dmp_LC, dmp_ground_LC, dmp_multi_deflate, dmp_inflate, dup_convert, dmp_convert, dmp_apply_pairs
  from sympy.polys.densetools import dup_clear_denoms, dmp_clear_denoms, dup_diff, dmp_diff, dup_eval, dmp_eval, dmp_eval_in, dup_trunc, dmp_ground_trunc, dup_monic, dmp_ground_monic, dup_primitive, dmp_ground_primitive, dup_extract, dmp_ground_extract
  from sympy.polys.galoistools import gf_int, gf_crt
  from sympy.polys.polyconfig import query
  from sympy.polys.polyerrors import MultivariatePolynomialError, HeuristicGCDFailed, HomomorphismFailed, NotInvertible, DomainError
label_desc: Use image node_id 15 for calling a global function with example usage: dmp_inner_subresultants(f, g, u, K) and returns: R,  S, dup_inner_subresultants, list,  list, list,  list