(n, *gens, **args)
Generates symmetric polynomial of order `n`.
Generates symmetric polynomial of order `n`.
Generates symmetric polynomial of order n .
def symmetric_poly(n, *gens, **args):
    """Generates symmetric polynomial of order `n`. """
    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)
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 )