#NEWLINE# def dup_gf_sqf_list( f , K , all = False ) : #NEWLINE# #INDENT# 'Compute square-free decomposition of ``f`` in ``GF(p)[x]``. ' #NEWLINE# f = dup_convert ( all , K , K . dom ) #NEWLINE# ( coeff , factors ) = gf_sqf_list ( f , K . mod , K . dom , all = all ) #NEWLINE# for ( i , ( f , k ) ) in enumerate ( factors ) : #NEWLINE# #INDENT# factors [ i ] = ( dup_convert ( f , K . dom , K ) , k ) #NEWLINE# #UNINDENT# return ( K . convert ( coeff , K . dom ) , factors )