def solve_poly_system(seq, *gens, **args):
 try:
  (polys, opt) = parallel_poly_from_expr(seq, *gens, **args)
 except PolificationFailed as exc:
  raise ComputationFailed('solve_poly_system', len(seq), exc)
 if (len(polys) == len(opt.gens) == 2):
  (f, g) = polys
  (a, b) = f.degree_list()
  (c, d) = g.degree_list()
  if ((a <= 2) and (b <= 2) and (c <= 2) and (d <= 2)):
   try:
    return solve_biquadratic(f, g, opt)
   except SolveFailed:
    pass
 return solve_generic(polys, opt)

def solve_poly_system ( seq , * gens , ** args ) : try : ( polys , opt ) = parallel_poly_from_expr ( seq , * gens , ** args ) except PolificationFailed as exc : raise ComputationFailed ( 'solve_poly_system' , len ( seq ) , exc ) if ( len ( polys ) == len ( opt . gens ) == 2 ) : ( f , g ) = polys ( a , b ) = f . degree_list ( ) ( c , d ) = g . degree_list ( ) if ( ( a <= 2 ) and ( b <= 2 ) and ( c <= 2 ) and ( d <= 2 ) ) : try : return solve_biquadratic ( f , g , opt ) except SolveFailed : pass return solve_generic ( polys , opt )
solve a system of polynomial equations .