@public
def sring(exprs, *symbols, **options):
 single = False
 if (not is_sequence(exprs)):
  (exprs, single) = ([exprs], True)
 exprs = list(map(sympify, exprs))
 opt = build_options(symbols, options)
 (reps, opt) = _parallel_dict_from_expr(exprs, opt)
 if (opt.domain is None):
  coeffs = sum([list(rep.values()) for rep in reps], [])
  (opt.domain, _) = construct_domain(coeffs, opt=opt)
 _ring = PolyRing(opt.gens, opt.domain, opt.order)
 polys = list(map(_ring.from_dict, reps))
 if single:
  return (_ring, polys[0])
 else:
  return (_ring, polys)

@ public def sring ( exprs , * symbols , ** options ) : single = False if ( not is_sequence ( exprs ) ) : ( exprs , single ) = ( [ exprs ] , True ) exprs = list ( map ( sympify , exprs ) ) opt = build_options ( symbols , options ) ( reps , opt ) = _parallel_dict_from_expr ( exprs , opt ) if ( opt . domain is None ) : coeffs = sum ( [ list ( rep . values ( ) ) for rep in reps ] , [ ] ) ( opt . domain , _ ) = construct_domain ( coeffs , opt = opt ) _ring = PolyRing ( opt . gens , opt . domain , opt . order ) polys = list ( map ( _ring . from_dict , reps ) ) if single : return ( _ring , polys [ 0 ] ) else : return ( _ring , polys )
construct a ring deriving generators and domain from options and input expressions .