def gf_sqf_p(f, p, K):
 (_, f) = gf_monic(f, p, K)
 if (not f):
  return True
 else:
  return (gf_gcd(f, gf_diff(f, p, K), p, K) == [K.one])

def gf_sqf_p ( f , p , K ) : ( _ , f ) = gf_monic ( f , p , K ) if ( not f ) : return True else : return ( gf_gcd ( f , gf_diff ( f , p , K ) , p , K ) == [ K . one ] )
return true if f is square-free in gf(p)[x] .