@public
def symmetric_poly(n, *gens, **args):
 gens = _analyze_gens(gens)
 if ((n < 0) or (n > len(gens)) or (not gens)):
  raise ValueError(("can't generate symmetric polynomial of order %s for %s" % (n, gens)))
 elif (not n):
  poly = S.One
 else:
  poly = Add(*[Mul(*s) for s in subsets(gens, int(n))])
 if (not args.get('polys', False)):
  return poly
 else:
  return Poly(poly, *gens)

@ public def symmetric_poly ( n , * gens , ** args ) : gens = _analyze_gens ( gens ) if ( ( n < 0 ) or ( n > len ( gens ) ) or ( not gens ) ) : raise ValueError ( ( "can't generate symmetric polynomial of order %s for %s" % ( n , gens ) ) ) elif ( not n ) : poly = S . One else : poly = Add ( * [ Mul ( * s ) for s in subsets ( gens , int ( n ) ) ] ) if ( not args . get ( 'polys' , False ) ) : return poly else : return Poly ( poly , * gens )
generates symmetric polynomial of order n .