def dup_sqf_list_include(f, K, all=False):
 (coeff, factors) = dup_sqf_list(f, K, all=all)
 if (factors and (factors[0][1] == 1)):
  g = dup_mul_ground(factors[0][0], coeff, K)
  return ([(g, 1)] + factors[1:])
 else:
  g = dup_strip([coeff])
  return ([(g, 1)] + factors)

def dup_sqf_list_include ( f , K , all = False ) : ( coeff , factors ) = dup_sqf_list ( f , K , all = all ) if ( factors and ( factors [ 0 ] [ 1 ] == 1 ) ) : g = dup_mul_ground ( factors [ 0 ] [ 0 ] , coeff , K ) return ( [ ( g , 1 ) ] + factors [ 1 : ] ) else : g = dup_strip ( [ coeff ] ) return ( [ ( g , 1 ) ] + factors )
return square-free decomposition of a polynomial in k[x] .