def dup_gf_sqf_list(f, K, all=False):
 f = dup_convert(f, K, K.dom)
 (coeff, factors) = gf_sqf_list(f, K.mod, K.dom, all=all)
 for (i, (f, k)) in enumerate(factors):
  factors[i] = (dup_convert(f, K.dom, K), k)
 return (K.convert(coeff, K.dom), factors)

def dup_gf_sqf_list ( f , K , all = False ) : f = dup_convert ( f , K , K . dom ) ( coeff , factors ) = gf_sqf_list ( f , K . mod , K . dom , all = all ) for ( i , ( f , k ) ) in enumerate ( factors ) : factors [ i ] = ( dup_convert ( f , K . dom , K ) , k ) return ( K . convert ( coeff , K . dom ) , factors )
compute square-free decomposition of f in gf(p)[x] .