Module Expr Str ImportFrom alias alias ImportFrom alias alias alias ImportFrom alias ImportFrom alias alias alias alias ImportFrom alias ImportFrom alias alias alias ImportFrom alias alias ImportFrom alias alias ImportFrom alias alias alias alias alias alias alias alias alias ImportFrom alias Import alias FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call NameLoad Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore AttributeLoad NameLoad attr Assign NameStore AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr For NameStore Call NameLoad Call NameLoad NameLoad body Assign SubscriptStore NameLoad Index TupleLoad BinOpSub NameLoad SubscriptLoad SubscriptLoad NameLoad Index NameLoad Index Num SubscriptLoad NameLoad Index NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call NameLoad Num NameLoad If CompareNotEq SubscriptLoad NameLoad Index Num Num body Assign NameStore BinOpAdd ListLoad Num NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str Assign NameStore AttributeLoad NameLoad attr Assign NameStore AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad For NameStore NameLoad body If CompareGtE SubscriptLoad NameLoad Index NameLoad NameLoad body Continue Assign SubscriptStore NameLoad Index NameLoad SubscriptLoad NameLoad Index NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr NameLoad For NameStore NameLoad body If CompareNotEq SubscriptLoad NameLoad Index NameLoad Call NameLoad SubscriptLoad NameLoad Index NameLoad body Return NameLoad If CompareLt SubscriptLoad NameLoad Index NameLoad Num body Raise Call NameLoad BinOpMod Str NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults body Expr Str Assign NameStore Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr NameLoad Assign NameStore Num For NameStore NameLoad body Assign NameStore SubscriptLoad NameLoad Index NameLoad If Call NameLoad NameLoad NameLoad body Assign TupleStore NameStore NameStore Call AttributeLoad NameLoad attr Assign NameStore Call NameLoad BinOpFloorDiv BinOpMult NameLoad NameLoad Call NameLoad NameLoad NameLoad orelse If CompareNotEq NameLoad Call NameLoad NameLoad body Assign TupleStore NameStore NameStore TupleLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign NameStore Call NameLoad BinOpFloorDiv BinOpMult NameLoad NameLoad Call NameLoad NameLoad NameLoad If CompareNotEq NameLoad Num body Assign NameStore Call NameLoad NameLoad NameLoad NameLoad Assign NameStore Call NameLoad NameLoad NameLoad BinOpMult NameLoad NameLoad Assign NameStore Call NameLoad Num NameLoad If Call NameLoad NameLoad NameLoad body Assign NameStore Call NameLoad ListComp Call NameLoad NameLoad NameLoad NameLoad comprehension NameStore NameLoad orelse Assign NameStore Call NameLoad NameLoad NameLoad NameLoad orelse Assign NameStore Call NameLoad NameLoad NameLoad NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam defaults body Expr Str Assign NameStore Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr NameLoad Assign NameStore Num For NameStore NameLoad body Assign NameStore SubscriptLoad NameLoad Index NameLoad If Call NameLoad NameLoad NameLoad body Assign TupleStore NameStore NameStore Call AttributeLoad NameLoad attr Assign NameStore BinOpFloorDiv BinOpMult NameLoad NameLoad Call NameLoad NameLoad NameLoad orelse If CompareNotEq NameLoad Call NameLoad NameLoad body Assign TupleStore NameStore NameStore TupleLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign NameStore BinOpFloorDiv BinOpMult NameLoad NameLoad Call NameLoad NameLoad NameLoad If CompareNotEq NameLoad Num body Assign NameStore Call NameLoad NameLoad NameLoad NameLoad Assign NameStore Call NameLoad NameLoad NameLoad NameLoad BinOpMult NameLoad NameLoad Assign NameStore Call NameLoad Num NameLoad Assign NameStore Call NameLoad NameLoad NameLoad NameLoad orelse Assign NameStore Call NameLoad NameLoad NameLoad NameLoad NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults body Expr Str Assign NameStore AttributeLoad NameLoad attr Assign NameStore AttributeLoad NameLoad attr If BoolOpOr CompareNotEq AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr CompareNotEq NameLoad AttributeLoad NameLoad attr body Raise Call NameLoad Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad If UnaryOpNot Call NameLoad NameLoad NameLoad body Raise Call NameLoad Str If CompareEq NameLoad AttributeLoad NameLoad attr body Assign NameStore AttributeLoad NameLoad attr Assign NameStore Call NameLoad Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr keyword Lambda arguments args NameParam defaults SubscriptLoad SubscriptLoad NameLoad Index Num Index NameLoad If CompareEq AttributeLoad NameLoad attr Num body For TupleStore NameStore NameStore Call AttributeLoad NameLoad attr body For TupleStore NameStore NameStore NameLoad body Assign NameStore BinOpAdd SubscriptLoad NameLoad Index Num SubscriptLoad NameLoad Index Num If CompareLt NameLoad NameLoad body Assign NameStore TupleLoad NameLoad Assign SubscriptStore NameLoad Index NameLoad BinOpAdd Call NameLoad NameLoad Num BinOpMult NameLoad NameLoad orelse Break orelse Assign NameStore AttributeLoad NameLoad attr For TupleStore NameStore NameStore Call AttributeLoad NameLoad attr body For TupleStore NameStore NameStore NameLoad body If CompareLt BinOpAdd SubscriptLoad NameLoad Index NameLoad SubscriptLoad NameLoad Index NameLoad NameLoad body Assign NameStore Call NameLoad NameLoad NameLoad Assign SubscriptStore NameLoad Index NameLoad BinOpAdd Call NameLoad NameLoad Num BinOpMult NameLoad NameLoad orelse Break Expr Call AttributeLoad NameLoad attr Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str Assign NameStore AttributeLoad NameLoad attr Assign NameStore AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Assign NameStore AttributeLoad NameLoad attr Assign NameStore Call NameLoad Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr keyword Lambda arguments args NameParam defaults SubscriptLoad SubscriptLoad NameLoad Index Num Index NameLoad Assign NameStore AttributeLoad NameLoad attr For NameStore Call NameLoad Call NameLoad NameLoad body Assign TupleStore NameStore NameStore SubscriptLoad NameLoad Index NameLoad For NameStore Call NameLoad NameLoad body Assign TupleStore NameStore NameStore SubscriptLoad NameLoad Index NameLoad If CompareLt BinOpAdd SubscriptLoad NameLoad Index NameLoad SubscriptLoad NameLoad Index NameLoad NameLoad body Assign NameStore Call NameLoad NameLoad NameLoad Assign SubscriptStore NameLoad Index NameLoad BinOpAdd Call NameLoad NameLoad Num BinOpMult NameLoad NameLoad orelse Break Assign NameStore Call AttributeLoad NameLoad attr Num Assign NameStore AttributeLoad NameLoad attr For TupleStore NameStore NameStore Call AttributeLoad NameLoad attr body If CompareLt BinOpMult Num SubscriptLoad NameLoad Index NameLoad NameLoad body Assign NameStore Call NameLoad NameLoad NameLoad Assign SubscriptStore NameLoad Index NameLoad BinOpAdd Call NameLoad NameLoad Num BinOpPow NameLoad Num Expr Call AttributeLoad NameLoad attr Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults body Expr Str Assign NameStore AttributeLoad NameLoad attr Assign NameStore AttributeLoad NameLoad attr If Call NameLoad NameLoad NameLoad body Assign NameStore Call NameLoad AttributeLoad NameLoad attr Assign NameStore Call NameLoad AttributeLoad NameLoad attr If CompareNotEq NameLoad Num body Assign NameStore Call NameLoad NameLoad NameLoad NameLoad NameLoad If CompareNotEq NameLoad Num body Assign NameStore Call NameLoad NameLoad NameLoad NameLoad NameLoad orelse Assign NameStore Call NameLoad NameLoad NameLoad NameLoad NameLoad Return NameLoad Assign NameStore Call NameLoad NameLoad If CompareEq NameLoad Num body If NameLoad body Return Call NameLoad Num orelse Raise Call NameLoad Str If CompareLt NameLoad Num body Assign NameStore Call NameLoad NameLoad UnaryOpUSub NameLoad NameLoad NameLoad Return Call NameLoad NameLoad NameLoad NameLoad If CompareEq NameLoad Num body Return Call NameLoad NameLoad NameLoad NameLoad If CompareEq NameLoad Num body Return Call NameLoad NameLoad NameLoad NameLoad If CompareEq NameLoad Num body Assign NameStore Call NameLoad NameLoad NameLoad NameLoad Return Call NameLoad NameLoad NameLoad NameLoad NameLoad Assign NameStore Call NameLoad Num While Num body If BinOpBitAnd NameLoad Num body Assign NameStore Call NameLoad NameLoad NameLoad NameLoad NameLoad AugAssignSub NameStore Num If UnaryOpNot NameLoad body Break Assign NameStore Call NameLoad NameLoad NameLoad NameLoad Assign NameStore BinOpFloorDiv NameLoad Num Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults body Expr Str Assign NameStore AttributeLoad NameLoad attr Assign NameStore AttributeLoad NameLoad attr Assign NameStore Call NameLoad Num For NameStore Call NameLoad NameLoad body Assign SubscriptStore NameLoad Index TupleLoad NameLoad Num SubscriptLoad AttributeLoad NameLoad attr Index NameLoad For NameStore NameLoad body Assign SubscriptStore NameLoad Index TupleLoad Call AttributeLoad NameLoad attr NameLoad Num SubscriptLoad NameLoad Index NameLoad Assign NameStore Call NameLoad Num Assign NameStore Call NameLoad Call AttributeLoad NameLoad attr For NameStore NameLoad body Assign NameStore Call NameLoad Num For NameStore Call NameLoad NameLoad body Assign NameStore SubscriptLoad NameLoad Index NameLoad If CompareEq NameLoad Num body Continue If CompareNotIn TupleLoad NameLoad NameLoad NameLoad body Assign TupleStore NameStore NameStore Call NameLoad NameLoad Num If BoolOpAnd CompareEq NameLoad Num CompareIn TupleLoad NameLoad NameLoad NameLoad body Assign SubscriptStore NameLoad Index TupleLoad NameLoad NameLoad Call NameLoad SubscriptLoad NameLoad Index TupleLoad NameLoad NameLoad NameLoad NameLoad orelse If CompareIn TupleLoad NameLoad BinOpSub NameLoad Num NameLoad body Assign SubscriptStore NameLoad Index TupleLoad NameLoad NameLoad Call NameLoad SubscriptLoad NameLoad Index TupleLoad NameLoad BinOpSub NameLoad Num SubscriptLoad NameLoad Index TupleLoad NameLoad Num NameLoad NameLoad orelse Assign SubscriptStore NameLoad Index TupleLoad NameLoad NameLoad Call NameLoad SubscriptLoad NameLoad Index TupleLoad NameLoad Num NameLoad NameLoad NameLoad Assign NameStore Call NameLoad NameLoad SubscriptLoad NameLoad Index TupleLoad NameLoad NameLoad NameLoad NameLoad AugAssignAdd NameStore BinOpMult NameLoad SubscriptLoad NameLoad Index NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Assign NameStore AttributeLoad NameLoad attr Assign NameStore BinOpMult ListLoad Num AttributeLoad NameLoad attr Assign SubscriptStore NameLoad Index NameLoad Num Assign NameStore Call NameLoad NameLoad For NameStore NameLoad body If CompareEq Call NameLoad NameLoad NameLoad NameLoad body Return NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore AttributeLoad NameLoad attr Assign NameStore AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Assign NameStore AttributeLoad NameLoad attr Assign NameStore BinOpMult ListLoad Num AttributeLoad NameLoad attr Assign SubscriptStore NameLoad Index NameLoad Num Assign NameStore Call NameLoad NameLoad Assign NameStore Num For NameStore NameLoad body If CompareEq Call NameLoad NameLoad NameLoad NameLoad body AugAssignAdd NameStore Call NameLoad Dict NameLoad SubscriptLoad NameLoad Index NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Assign NameStore Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr NameLoad Assign NameStore SubscriptLoad Call NameLoad NameLoad keyword Lambda arguments args NameParam defaults SubscriptLoad NameLoad Index NameLoad Index NameLoad If CompareLt NameLoad Num body Raise Call NameLoad BinOpMod Str NameLoad Return TupleLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str If Call NameLoad NameLoad NameLoad body Return Call NameLoad NameLoad NameLoad NameLoad NameLoad Assign NameStore AttributeLoad NameLoad attr Assign NameStore AttributeLoad NameLoad attr Assign NameStore SubscriptLoad NameLoad Index NameLoad If CompareEq NameLoad Call NameLoad NameLoad body Assign NameStore Call NameLoad NameLoad If CompareNotIn NameLoad NameLoad body Raise Call NameLoad Str If Call NameLoad BinOpSub NameLoad NameLoad NameLoad body Raise Call NameLoad Str Assign NameStore Call NameLoad Num If CompareIs AttributeLoad NameLoad attr NameLoad body Assign NameStore Num If CompareNotEq NameLoad NameLoad body Assign NameStore BinOpDiv Call NameLoad Num NameLoad orelse Assign NameStore Call NameLoad Num For NameStore Call NameLoad NameLoad body Assign NameStore BinOpSub Num Call NameLoad NameLoad NameLoad NameLoad NameLoad Assign NameStore BinOpAdd NameLoad Call NameLoad NameLoad NameLoad NameLoad NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str Assign NameStore AttributeLoad NameLoad attr If CompareEq NameLoad AttributeLoad NameLoad attr body Raise NameLoad Assign NameStore AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Assign NameStore SubscriptLoad Call NameLoad NameLoad keyword Lambda arguments args NameParam defaults SubscriptLoad NameLoad Index NameLoad Index NameLoad If NameLoad body Assign NameStore Call NameLoad NameLoad NameLoad UnaryOpUSub NameLoad Assign NameStore BinOpAdd NameLoad NameLoad If CompareNotIn NameLoad NameLoad body Raise Call NameLoad Str If Call NameLoad BinOpSub NameLoad SubscriptLoad NameLoad Index NameLoad NameLoad body Raise Call NameLoad Str Assign NameStore Call NameLoad NameLoad NameLoad NameLoad If CompareNotEq NameLoad Num body Assign NameStore Call NameLoad NameLoad NameLoad UnaryOpUSub NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign TupleStore NameStore NameStore NameLoad Assign NameStore AttributeLoad NameLoad attr Assign NameStore BinOpMult ListLoad Num AttributeLoad NameLoad attr Assign SubscriptStore NameLoad Index NameLoad NameLoad Assign NameStore Call NameLoad NameLoad Assign NameStore Call NameLoad Num For NameStore NameLoad body If CompareEq SubscriptLoad NameLoad Index NameLoad NameLoad body Assign SubscriptStore NameLoad Index Call NameLoad NameLoad NameLoad SubscriptLoad NameLoad Index NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults body Expr Str If Call NameLoad NameLoad NameLoad body Raise NameLoad Assign NameStore AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Assign NameStore Call NameLoad NameLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad If Call NameLoad NameLoad NameLoad body Raise Call NameLoad Str Assign NameStore Call NameLoad NameLoad TupleLoad NameLoad Num Assign NameStore AttributeLoad NameLoad attr Assert BoolOpAnd CompareIn NameLoad NameLoad CompareEq Call NameLoad NameLoad Num Assign NameStore SubscriptLoad NameLoad Index NameLoad Assign NameStore BinOpDiv NameLoad NameLoad For NameStore Call NameLoad Num NameLoad body Assign NameStore Call NameLoad NameLoad Dict NameLoad NameLoad NameLoad BinOpAdd NameLoad Num Assign NameStore BinOpMult Call NameLoad NameLoad TupleLoad NameLoad NameLoad BinOpPow NameLoad NameLoad AugAssignSub NameStore BinOpDiv NameLoad NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam defaults Num body Expr Str Assign NameStore AttributeLoad NameLoad attr Assign NameStore Call NameLoad NameLoad If UnaryOpNot NameLoad body Assign NameStore Call NameLoad Num Assign NameStore BinOpMult SubscriptLoad NameLoad Index Num NameLoad For NameStore Call NameLoad Num NameLoad body Assign NameStore Call NameLoad NameLoad NameLoad NameLoad NameLoad AugAssignAdd NameStore BinOpMult SubscriptLoad NameLoad Index NameLoad NameLoad Return NameLoad Assign NameStore Call NameLoad BinOpAdd Call AttributeLoad NameLoad attr NameLoad Num Assign TupleStore NameStore NameStore Call NameLoad NameLoad NameLoad If NameLoad body AugAssignAdd NameStore Num Assign NameStore ListLoad Call NameLoad Num Assign NameStore Num Assign NameStore Call NameLoad Num If CompareLt Call NameLoad NameLoad Num body For NameStore Call NameLoad Num NameLoad body Assign NameStore Call NameLoad NameLoad NameLoad NameLoad NameLoad Expr Call AttributeLoad NameLoad attr NameLoad orelse For NameStore Call NameLoad Num NameLoad body If CompareEq BinOpMod NameLoad Num Num body Assign NameStore Call NameLoad SubscriptLoad NameLoad Index BinOpFloorDiv NameLoad Num NameLoad NameLoad orelse Assign NameStore Call NameLoad NameLoad NameLoad NameLoad NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call NameLoad SubscriptLoad NameLoad Index Num NameLoad NameLoad NameLoad Assign NameStore Call NameLoad Num Assign NameStore Call NameLoad Num For NameStore Call NameLoad BinOpSub NameLoad Num body Assign NameStore BinOpMult NameLoad NameLoad Assign NameStore SubscriptLoad NameLoad Index NameLoad For NameStore Call NameLoad Num NameLoad body AugAssignAdd NameStore BinOpMult SubscriptLoad NameLoad Index BinOpAdd NameLoad NameLoad SubscriptLoad NameLoad Index NameLoad Assign NameStore Call NameLoad NameLoad NameLoad NameLoad NameLoad AugAssignAdd NameStore NameLoad Assign NameStore Call NameLoad NameLoad NameLoad NameLoad NameLoad If UnaryOpNot NameLoad body Break Assign NameStore BinOpSub NameLoad Num Assign NameStore BinOpMult NameLoad NameLoad If CompareLt NameLoad NameLoad body Assign NameStore BinOpMult SubscriptLoad NameLoad Index NameLoad Call NameLoad Num For NameStore Call NameLoad Num NameLoad body If CompareGtE BinOpAdd NameLoad NameLoad NameLoad body Break AugAssignAdd NameStore BinOpMult SubscriptLoad NameLoad Index BinOpAdd NameLoad NameLoad SubscriptLoad NameLoad Index NameLoad Assign NameStore Call NameLoad NameLoad NameLoad NameLoad NameLoad AugAssignAdd NameStore NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Assign NameStore AttributeLoad NameLoad attr Assign NameStore BinOpMult ListLoad Num AttributeLoad NameLoad attr Assign SubscriptStore NameLoad Index NameLoad Num Assign NameStore Call NameLoad NameLoad For NameStore NameLoad body If SubscriptLoad NameLoad Index NameLoad body Assign NameStore Call NameLoad NameLoad NameLoad Assign SubscriptStore NameLoad Index NameLoad BinOpMult SubscriptLoad NameLoad Index NameLoad SubscriptLoad NameLoad Index NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore AttributeLoad NameLoad attr Assign NameStore AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Assign NameStore BinOpMult ListLoad Num AttributeLoad NameLoad attr Assign SubscriptStore NameLoad Index NameLoad Num Assign NameStore Call NameLoad NameLoad For NameStore NameLoad body Assign NameStore Call NameLoad NameLoad NameLoad Assign SubscriptStore NameLoad Index NameLoad BinOpDiv SubscriptLoad NameLoad Index NameLoad BinOpAdd SubscriptLoad NameLoad Index NameLoad Num Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults vararg body Expr Str Assign NameStore AttributeLoad NameLoad attr Assign TupleStore NameStore NameStore Call NameLoad Str AttributeLoad NameLoad attr Assign NameStore Call NameLoad SubscriptLoad NameLoad Index Num Assign NameStore BinOpAdd SubscriptLoad NameLoad Slice Num TupleLoad NameLoad NameLoad Assign NameStore AttributeLoad NameLoad attr If CompareIn NameLoad NameLoad body Assign NameStore BinOpAdd NameLoad SubscriptLoad NameLoad Index NameLoad Assign NameStore BinOpSub NameLoad SubscriptLoad NameLoad Index NameLoad orelse Assign NameStore NameLoad Assign NameStore NameLoad If Call NameLoad NameLoad NameLoad body Assign NameStore Call Call NameLoad NameLoad NameLoad NameLoad orelse Assign NameStore Call NameLoad NameLoad NameLoad Assign NameStore Call NameLoad Call AttributeLoad NameLoad attr Assign NameStore BinOpMult ListLoad Num NameLoad For NameStore NameLoad body Assign SubscriptStore NameLoad Index SubscriptLoad SubscriptLoad NameLoad Index Num Index Num SubscriptLoad NameLoad Index Num Assign NameStore Call NameLoad NameLoad NameLoad SubscriptLoad NameLoad Index Num SubscriptLoad NameLoad Index Num Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str Assign NameStore AttributeLoad NameLoad attr Assign NameStore Call NameLoad Num For TupleStore NameStore NameStore Call AttributeLoad NameLoad attr body Assign NameStore Call NameLoad NameLoad AugAssignAdd SubscriptStore NameLoad Index NameLoad NameLoad Assign SubscriptStore NameLoad Index Call NameLoad NameLoad NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str Assign NameStore AttributeLoad NameLoad attr Assign NameStore Call NameLoad Num For TupleStore NameStore NameStore Call AttributeLoad NameLoad attr body Assign NameStore Call NameLoad NameLoad AugAssignMult SubscriptStore NameLoad Index NameLoad NameLoad Assign SubscriptStore NameLoad Index Call NameLoad NameLoad NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults body Expr Str If Call NameLoad NameLoad NameLoad body Return Call NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad Assign NameStore AttributeLoad NameLoad attr Assign NameStore AttributeLoad NameLoad attr If CompareNotIn NameLoad NameLoad body Raise Call NameLoad Str Assign NameStore Call NameLoad NameLoad Assert CompareEq SubscriptLoad NameLoad Index NameLoad Num Assign NameStore Call NameLoad Num If CompareEq NameLoad Num body Return NameLoad If CompareEq NameLoad Num body Return Call NameLoad Num If CompareEq NameLoad Num body Return NameLoad If CompareLt NameLoad Num body Assign NameStore UnaryOpUSub NameLoad Assign NameStore Num orelse Assign NameStore Num For NameStore Call NameLoad NameLoad body Assign NameStore Call NameLoad NameLoad BinOpAdd NameLoad Num NameLoad NameLoad Assign NameStore Call NameLoad NameLoad NameLoad NameLoad NameLoad AugAssignAdd NameStore BinOpSub BinOpDiv NameLoad NameLoad BinOpDiv NameLoad NameLoad If NameLoad body Return NameLoad orelse Return Call NameLoad NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults body Expr Str Assign NameStore NameLoad Assign NameStore NameLoad If CompareEq NameLoad Num body If CompareEq NameLoad Num body Raise Call NameLoad Str orelse Return Call AttributeLoad NameLoad attr Num If CompareEq NameLoad Num body Return Call NameLoad NameLoad NameLoad NameLoad Assign NameStore AttributeLoad NameLoad attr Assign NameStore AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Assign NameStore SubscriptLoad Call NameLoad NameLoad keyword Lambda arguments args NameParam defaults SubscriptLoad NameLoad Index NameLoad Index NameLoad Assign NameStore Call NameLoad NameLoad NameLoad UnaryOpUSub NameLoad AugAssignSub NameStore NameLoad If Call NameLoad BinOpSub NameLoad Num NameLoad body Assign NameStore AttributeLoad NameLoad attr Assign NameStore SubscriptLoad NameLoad Index NameLoad If CompareIs AttributeLoad NameLoad attr NameLoad body Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore BinOpPow NameLoad Call NameLoad Num NameLoad orelse If Call NameLoad NameLoad NameLoad body TryExcept body Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore Call NameLoad BinOpPow NameLoad Call NameLoad Num NameLoad handlers ExceptHandler type NameLoad body Raise Call NameLoad Str orelse TryExcept body Assign NameStore Call NameLoad BinOpPow NameLoad Call NameLoad Num NameLoad handlers ExceptHandler type NameLoad body Raise Call NameLoad Str Assign NameStore BinOpMult Call NameLoad BinOpDiv NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad orelse Assign NameStore Call NameLoad NameLoad NameLoad NameLoad NameLoad If NameLoad body Assign NameStore Call NameLoad NameLoad NameLoad Assign NameStore Call NameLoad NameLoad NameLoad NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str If Call NameLoad NameLoad NameLoad body Return Call NameLoad NameLoad NameLoad NameLoad NameLoad Assign NameStore AttributeLoad NameLoad attr If CompareEq NameLoad Num body Return AttributeLoad NameLoad attr If Call NameLoad NameLoad NameLoad body Assign NameStore Num Assign NameStore AttributeLoad NameLoad attr Assign NameStore SubscriptLoad NameLoad Index NameLoad If CompareEq NameLoad Num body Pass orelse Assign NameStore Call AttributeLoad NameLoad attr If CompareIs AttributeLoad NameLoad attr NameLoad body Assign NameStore Call NameLoad NameLoad orelse If Call NameLoad NameLoad NameLoad body TryExcept body Assign NameStore Call NameLoad Call NameLoad NameLoad handlers ExceptHandler type NameLoad body Raise Call NameLoad Str orelse TryExcept body Assign NameStore Call NameLoad Call NameLoad NameLoad handlers ExceptHandler type NameLoad body Raise Call NameLoad Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call NameLoad NameLoad Call NameLoad NameLoad NameLoad NameLoad NameLoad BinOpSub NameLoad Num Return BinOpAdd Call NameLoad NameLoad NameLoad NameLoad orelse Raise NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str If Call NameLoad NameLoad NameLoad body Return Call NameLoad NameLoad NameLoad NameLoad NameLoad Assign NameStore AttributeLoad NameLoad attr Assign NameStore Call NameLoad Num If Call NameLoad NameLoad NameLoad body Raise Call NameLoad Str If CompareIn NameLoad AttributeLoad NameLoad attr body For NameStore Call NameLoad NameLoad body Assign NameStore Call NameLoad NameLoad NameLoad NameLoad Assign NameStore BinOpSub Call NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad Assign NameStore Call NameLoad NameLoad BinOpAdd NameLoad Num NameLoad NameLoad Assign NameStore Call NameLoad NameLoad NameLoad NameLoad Assign NameStore Call NameLoad NameLoad NameLoad NameLoad NameLoad AugAssignSub NameStore NameLoad Return NameLoad orelse Raise NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str Assign NameStore AttributeLoad NameLoad attr Assign NameStore Call NameLoad Num For NameStore Call NameLoad NameLoad body Assign NameStore BinOpSub NameLoad Call NameLoad NameLoad NameLoad NameLoad Assign NameStore Call NameLoad NameLoad NameLoad NameLoad NameLoad AugAssignAdd NameStore NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str If Call NameLoad NameLoad NameLoad body Return Call NameLoad NameLoad NameLoad NameLoad NameLoad Assign NameStore AttributeLoad NameLoad attr Assign NameStore Call NameLoad NameLoad NameLoad If NameLoad body If CompareIs AttributeLoad NameLoad attr NameLoad body Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore Call NameLoad NameLoad orelse If Call NameLoad NameLoad NameLoad body TryExcept body Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore Call NameLoad Call NameLoad NameLoad handlers ExceptHandler type NameLoad body Assign NameStore Call AttributeLoad NameLoad attr ListLoad Call NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call NameLoad Call NameLoad NameLoad orelse TryExcept body Assign NameStore Call NameLoad Call NameLoad NameLoad handlers ExceptHandler type NameLoad body Raise Call NameLoad Str Assign NameStore BinOpSub NameLoad NameLoad Return BinOpMult NameLoad Call NameLoad NameLoad NameLoad NameLoad If CompareGt Call NameLoad NameLoad Num body Return Call NameLoad NameLoad NameLoad NameLoad Assign NameStore Call NameLoad Num Assign NameStore Num Assign NameStore Num Assign NameStore ListLoad For NameStore Call NameLoad NameLoad body Expr Call AttributeLoad NameLoad attr BinOpDiv NameLoad NameLoad AugAssignAdd NameStore Num AugAssignMult NameStore NameLoad Assign NameStore Call NameLoad NameLoad NameLoad NameLoad NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str Assign NameStore AttributeLoad NameLoad attr Assign NameStore Call NameLoad Num Assign NameStore ListLoad UnaryOpUSub NameLoad Assign NameStore Call NameLoad NameLoad NameLoad NameLoad For NameStore Call NameLoad Num NameLoad body Expr Call AttributeLoad NameLoad attr BinOpDiv BinOpPow NameLoad NameLoad BinOpAdd BinOpMult Num NameLoad Num Assign NameStore Call NameLoad NameLoad NameLoad NameLoad NameLoad Assign NameStore Call NameLoad NameLoad NameLoad NameLoad NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str If Call NameLoad NameLoad NameLoad body Return Call NameLoad NameLoad NameLoad NameLoad NameLoad Assign NameStore AttributeLoad NameLoad attr Assign NameStore Num If Call NameLoad NameLoad NameLoad body Assign NameStore AttributeLoad NameLoad attr Assign NameStore SubscriptLoad NameLoad Index NameLoad If CompareIs AttributeLoad NameLoad attr NameLoad body Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore Call NameLoad NameLoad orelse If Call NameLoad NameLoad NameLoad body TryExcept body Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore Call NameLoad Call NameLoad NameLoad handlers ExceptHandler type NameLoad body Raise Call NameLoad Str orelse TryExcept body Assign NameStore Call NameLoad Call NameLoad NameLoad handlers ExceptHandler type NameLoad body Raise Call NameLoad Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore BinOpAdd Call NameLoad NameLoad NameLoad NameLoad Call NameLoad Num Assign NameStore Call NameLoad NameLoad NameLoad BinOpSub NameLoad Num Assign NameStore Call NameLoad NameLoad NameLoad NameLoad BinOpSub NameLoad Num Return BinOpAdd Call NameLoad NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str If Call NameLoad NameLoad NameLoad body Return Call NameLoad NameLoad NameLoad NameLoad NameLoad If Call NameLoad NameLoad NameLoad body Raise Call NameLoad Str Assign NameStore AttributeLoad NameLoad attr If CompareIn NameLoad AttributeLoad NameLoad attr body If CompareGt Call NameLoad NameLoad Num body Assign NameStore Call NameLoad NameLoad NameLoad Assign NameStore BinOpSub Num Call NameLoad NameLoad NameLoad BinOpSub NameLoad Num Assign NameStore Call NameLoad NameLoad Num NameLoad BinOpSub NameLoad Num Assign NameStore Call NameLoad NameLoad NameLoad NameLoad BinOpSub NameLoad Num Return Call NameLoad NameLoad NameLoad Assign NameStore Call NameLoad Num Assign NameStore ListLoad Num NameLoad Num For NameStore Call NameLoad Num NameLoad Num body Expr Call AttributeLoad NameLoad attr BinOpDiv BinOpMult BinOpPow BinOpSub NameLoad Num Num SubscriptLoad NameLoad Index Num BinOpMult NameLoad BinOpSub NameLoad Num Expr Call AttributeLoad NameLoad attr Num Return Call NameLoad NameLoad NameLoad NameLoad NameLoad orelse Raise NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str Assign NameStore AttributeLoad NameLoad attr Assign NameStore Call NameLoad Num For NameStore Call NameLoad NameLoad body Assign NameStore BinOpSub NameLoad Call NameLoad NameLoad NameLoad NameLoad Assign NameStore Call NameLoad NameLoad BinOpAdd Num Call NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad AugAssignAdd NameStore NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str If Call NameLoad NameLoad NameLoad body Assign NameStore Call NameLoad NameLoad NameLoad NameLoad NameLoad Return NameLoad Assign NameStore AttributeLoad NameLoad attr Assign NameStore Num Assign NameStore Call NameLoad NameLoad NameLoad If NameLoad body If CompareIs AttributeLoad NameLoad attr NameLoad body Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore Call NameLoad NameLoad orelse If Call NameLoad NameLoad NameLoad body TryExcept body Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore Call NameLoad Call NameLoad NameLoad handlers ExceptHandler type NameLoad body Assign NameStore Call AttributeLoad NameLoad attr ListLoad Call NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call NameLoad Call NameLoad NameLoad orelse TryExcept body Assign NameStore Call NameLoad Call NameLoad NameLoad handlers ExceptHandler type NameLoad body Raise Call NameLoad Str Assign NameStore BinOpSub NameLoad NameLoad Assign NameStore Call NameLoad NameLoad NameLoad NameLoad Assign NameStore Call NameLoad BinOpSub Num BinOpMult NameLoad NameLoad NameLoad NameLoad Return Call NameLoad BinOpAdd NameLoad NameLoad NameLoad NameLoad NameLoad If CompareEq AttributeLoad NameLoad attr Num body Return Call NameLoad NameLoad NameLoad NameLoad orelse Return Call NameLoad NameLoad NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str If Call NameLoad NameLoad NameLoad body Assign NameStore Call NameLoad NameLoad NameLoad NameLoad NameLoad Return NameLoad Assign TupleStore NameStore NameStore Call NameLoad NameLoad NameLoad Str Assign NameStore BinOpAdd NameLoad BinOpMult Num NameLoad Assign TupleStore NameStore NameStore Call NameLoad NameLoad NameLoad NameLoad Assign NameStore Call NameLoad NameLoad NameLoad UnaryOpUSub NameLoad Assign NameStore Call NameLoad NameLoad NameLoad NameLoad Assign NameStore Call NameLoad NameLoad NameLoad NameLoad NameLoad Assign NameStore Call NameLoad NameLoad NameLoad UnaryOpUSub NameLoad Assign NameStore Call NameLoad NameLoad NameLoad NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str If Call NameLoad NameLoad NameLoad body Return Call NameLoad NameLoad NameLoad NameLoad NameLoad Assign NameStore AttributeLoad NameLoad attr If UnaryOpNot NameLoad body Return Call NameLoad Num Assign NameStore Call NameLoad NameLoad NameLoad If NameLoad body If CompareIs AttributeLoad NameLoad attr NameLoad body Assign NameStore Call AttributeLoad NameLoad attr Assign TupleStore NameStore NameStore TupleLoad Call NameLoad NameLoad Call NameLoad NameLoad orelse If Call NameLoad NameLoad NameLoad body TryExcept body Assign NameStore Call AttributeLoad NameLoad attr Assign TupleStore NameStore NameStore TupleLoad Call NameLoad Call NameLoad NameLoad Call NameLoad Call NameLoad NameLoad handlers ExceptHandler type NameLoad body Assign NameStore Call AttributeLoad NameLoad attr ListLoad Call NameLoad NameLoad Call NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign TupleStore NameStore NameStore TupleLoad Call NameLoad Call NameLoad NameLoad Call NameLoad Call NameLoad NameLoad orelse TryExcept body Assign TupleStore NameStore NameStore TupleLoad Call NameLoad Call NameLoad NameLoad Call NameLoad Call NameLoad NameLoad handlers ExceptHandler type NameLoad body Raise Call NameLoad Str Assign NameStore BinOpSub NameLoad NameLoad Return BinOpAdd BinOpMult Call NameLoad NameLoad NameLoad NameLoad NameLoad BinOpMult Call NameLoad NameLoad NameLoad NameLoad NameLoad If BoolOpAnd CompareGt Call NameLoad NameLoad Num CompareEq AttributeLoad NameLoad attr Num body Assign NameStore Call NameLoad BinOpDiv NameLoad Num NameLoad NameLoad Assign NameStore Call NameLoad NameLoad NameLoad NameLoad Assign NameStore Call NameLoad BinOpAdd Num NameLoad NameLoad NameLoad Return Call NameLoad NameLoad BinOpMult Num NameLoad NameLoad NameLoad Assign NameStore Call NameLoad Num Assign NameStore Num Assign NameStore ListLoad Num For NameStore Call NameLoad Num BinOpAdd NameLoad Num Num body Expr Call AttributeLoad NameLoad attr BinOpDiv NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Num AugAssignMult NameStore BinOpMult UnaryOpUSub NameLoad BinOpAdd NameLoad Num Return Call NameLoad NameLoad NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str If Call NameLoad NameLoad NameLoad body Return Call NameLoad NameLoad NameLoad NameLoad NameLoad Assign NameStore AttributeLoad NameLoad attr Assign NameStore Call NameLoad NameLoad NameLoad If NameLoad body If CompareIs AttributeLoad NameLoad attr NameLoad body Assign NameStore Call AttributeLoad NameLoad attr Assign TupleStore NameStore NameStore TupleLoad Call NameLoad NameLoad Call NameLoad NameLoad orelse If Call NameLoad NameLoad NameLoad body TryExcept body Assign NameStore Call AttributeLoad NameLoad attr Assign TupleStore NameStore NameStore TupleLoad Call NameLoad Call NameLoad NameLoad Call NameLoad Call NameLoad NameLoad handlers ExceptHandler type NameLoad body Assign NameStore Call AttributeLoad NameLoad attr ListLoad Call NameLoad NameLoad Call NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad orelse TryExcept body Assign TupleStore NameStore NameStore TupleLoad Call NameLoad Call NameLoad NameLoad Call NameLoad Call NameLoad NameLoad handlers ExceptHandler type NameLoad body Raise Call NameLoad Str Assign NameStore BinOpSub NameLoad NameLoad Assign NameStore Call NameLoad NameLoad NameLoad NameLoad Assign NameStore Call NameLoad NameLoad NameLoad NameLoad Assign NameStore Call AttributeLoad Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Assign TupleStore NameStore NameStore TupleLoad Call NameLoad Call NameLoad NameLoad Call NameLoad Call NameLoad NameLoad Return BinOpSub BinOpMult NameLoad NameLoad BinOpMult NameLoad NameLoad If BoolOpAnd CompareGt Call NameLoad NameLoad Num CompareEq AttributeLoad NameLoad attr Num body Assign NameStore Call NameLoad BinOpDiv NameLoad Num NameLoad NameLoad Assign NameStore Call NameLoad NameLoad NameLoad NameLoad Assign NameStore Call NameLoad BinOpAdd Num NameLoad NameLoad NameLoad Return Call NameLoad NameLoad BinOpSub Num NameLoad NameLoad NameLoad Assign NameStore Call NameLoad Num Assign NameStore Num Assign NameStore ListLoad For NameStore Call NameLoad Num BinOpAdd NameLoad Num Num body Expr Call AttributeLoad NameLoad attr BinOpDiv NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Num AugAssignMult NameStore BinOpMult UnaryOpUSub NameLoad BinOpSub NameLoad Num Return Call NameLoad NameLoad NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str If Call NameLoad NameLoad NameLoad body Return Call NameLoad NameLoad NameLoad NameLoad NameLoad Assign NameStore Call NameLoad BinOpDiv NameLoad Num NameLoad NameLoad Assign NameStore Call NameLoad NameLoad NameLoad NameLoad Assign NameStore Call NameLoad BinOpAdd Num NameLoad NameLoad NameLoad Return TupleLoad Call NameLoad NameLoad BinOpSub Num NameLoad NameLoad NameLoad Call NameLoad NameLoad BinOpMult Num NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str Assign NameStore AttributeLoad NameLoad attr Assign NameStore Call NameLoad Num Assign NameStore ListLoad NameLoad Assign NameStore Call NameLoad NameLoad NameLoad NameLoad For NameStore Call NameLoad Num NameLoad body Expr Call AttributeLoad NameLoad attr BinOpDiv NameLoad BinOpAdd BinOpMult Num NameLoad Num Assign NameStore Call NameLoad NameLoad NameLoad NameLoad NameLoad Assign NameStore Call NameLoad NameLoad NameLoad NameLoad NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str If Call NameLoad NameLoad NameLoad body Return Call NameLoad NameLoad NameLoad NameLoad NameLoad Assign NameStore AttributeLoad NameLoad attr Assign NameStore Num If Call NameLoad NameLoad NameLoad body Assign NameStore AttributeLoad NameLoad attr Assign NameStore SubscriptLoad NameLoad Index NameLoad If CompareIs AttributeLoad NameLoad attr NameLoad body Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore Call NameLoad NameLoad orelse If Call NameLoad NameLoad NameLoad body TryExcept body Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore Call NameLoad Call NameLoad NameLoad handlers ExceptHandler type NameLoad body Raise Call NameLoad Str orelse TryExcept body Assign NameStore Call NameLoad Call NameLoad NameLoad handlers ExceptHandler type NameLoad body Raise Call NameLoad Str Assign NameStore Call NameLoad NameLoad NameLoad Assign NameStore BinOpAdd UnaryOpUSub Call NameLoad NameLoad NameLoad NameLoad Num Assign NameStore Call NameLoad NameLoad NameLoad BinOpSub NameLoad Num Assign NameStore Call NameLoad NameLoad NameLoad NameLoad BinOpSub NameLoad Num Return BinOpAdd Call NameLoad NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str If Call NameLoad NameLoad NameLoad body Return Call NameLoad NameLoad NameLoad NameLoad NameLoad Assign NameStore Call NameLoad NameLoad NameLoad NameLoad Assign NameStore Call NameLoad NameLoad NameLoad NameLoad Return BinOpDiv BinOpSub NameLoad NameLoad Num decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str If Call NameLoad NameLoad NameLoad body Return Call NameLoad NameLoad NameLoad NameLoad NameLoad Assign NameStore Call NameLoad NameLoad NameLoad NameLoad Assign NameStore Call NameLoad NameLoad NameLoad NameLoad Return BinOpDiv BinOpAdd NameLoad NameLoad Num decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str Assign NameStore AttributeLoad NameLoad attr Assign NameStore Call NameLoad Num For NameStore Call NameLoad NameLoad body Assign NameStore BinOpSub NameLoad Call NameLoad NameLoad NameLoad NameLoad Assign NameStore Call NameLoad NameLoad BinOpSub Num Call NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad AugAssignAdd NameStore NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str If Call NameLoad NameLoad NameLoad body Return Call NameLoad NameLoad NameLoad NameLoad NameLoad Assign NameStore AttributeLoad NameLoad attr Assign NameStore Num If Call NameLoad NameLoad NameLoad body Assign NameStore AttributeLoad NameLoad attr Assign NameStore SubscriptLoad NameLoad Index NameLoad If CompareIs AttributeLoad NameLoad attr NameLoad body Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore Call NameLoad NameLoad orelse If Call NameLoad NameLoad NameLoad body TryExcept body Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore Call NameLoad Call NameLoad NameLoad handlers ExceptHandler type NameLoad body Raise Call NameLoad Str orelse TryExcept body Assign NameStore Call NameLoad Call NameLoad NameLoad handlers ExceptHandler type NameLoad body Raise Call NameLoad Str Assign NameStore BinOpSub NameLoad NameLoad Assign NameStore Call NameLoad NameLoad NameLoad NameLoad Assign NameStore Call NameLoad BinOpAdd Num BinOpMult NameLoad NameLoad NameLoad NameLoad Return Call NameLoad BinOpAdd NameLoad NameLoad NameLoad NameLoad NameLoad If CompareEq AttributeLoad NameLoad attr Num body Return Call NameLoad NameLoad NameLoad NameLoad orelse Return Call NameLoad NameLoad NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore Call NameLoad NameLoad Assign NameStore Call NameLoad NameLoad NameLoad NameLoad Assign NameStore Call NameLoad Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad NameLoad Assign NameStore BinOpSub NameLoad BinOpMult NameLoad NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults NameLoad body Expr Str Assign NameStore AttributeLoad NameLoad attr If CompareNotEq AttributeLoad NameLoad attr NameLoad body Raise NameLoad Assign NameStore AttributeLoad NameLoad attr If UnaryOpNot NameLoad body For TupleStore NameStore NameStore Call AttributeLoad NameLoad attr body Assign SubscriptStore NameLoad Index NameLoad BinOpDiv NameLoad Call NameLoad Call NameLoad SubscriptLoad NameLoad Index Num orelse For TupleStore NameStore NameStore Call AttributeLoad NameLoad attr body Assign SubscriptStore NameLoad Index NameLoad BinOpMult NameLoad Call NameLoad Call NameLoad SubscriptLoad NameLoad Index Num Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore AttributeLoad NameLoad attr Assign NameStore SubscriptLoad AttributeLoad NameLoad attr Index Num Assign NameStore BinOpAdd BinOpMult Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Num Assign NameStore Call NameLoad NameLoad NameLoad NameLoad Assign NameStore Call NameLoad NameLoad Assign NameStore Call NameLoad NameLoad NameLoad NameLoad Assign NameStore Call NameLoad NameLoad Assign NameStore Call NameLoad NameLoad NameLoad NameLoad NameLoad Assign NameStore Call NameLoad NameLoad NameLoad Assign NameStore BinOpDiv BinOpSub SubscriptLoad NameLoad Index TupleLoad Num NameLoad NameLoad Assign NameStore Call NameLoad NameLoad NameLoad Assign NameStore Call NameLoad NameLoad NameLoad NameLoad Assign NameStore Call NameLoad NameLoad Assign NameStore SubscriptLoad Call AttributeLoad NameLoad attr Index Num Assign NameStore BinOpSub BinOpMult Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr If NameLoad body Assign NameStore BinOpMult NameLoad BinOpPow NameLoad NameLoad Return NameLoad decorator_list Assign NameStore Dict Str Str Str Str Str Str Str Str FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str Assign NameStore Num Assign NameStore Num While CompareEq NameLoad Num body Assign NameStore Call NameLoad NameLoad NameLoad NameLoad NameLoad AugAssignMult NameStore Num Assign NameStore AttributeLoad NameLoad attr Assign NameStore Call NameLoad NameLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Return SubscriptLoad Call NameLoad NameLoad keyword Lambda arguments args NameParam defaults SubscriptLoad NameLoad Index NameLoad Index NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults body Assign NameStore AttributeLoad NameLoad attr Assign NameStore AttributeLoad NameLoad attr If BoolOpAnd UnaryOpNot Call NameLoad GeneratorExp Call AttributeLoad NameLoad attr NameLoad comprehension NameStore NameLoad UnaryOpNot AttributeLoad NameLoad attr body Return NameLoad If UnaryOpNot Call AttributeLoad NameLoad attr NameLoad body Return NameLoad orelse If AttributeLoad NameLoad attr body Assign NameStore SubscriptLoad NameLoad Index Num If CompareGt Call NameLoad NameLoad Num body Raise NameLoad Assign TupleStore NameStore NameStore Call NameLoad NameLoad keyword NameLoad keyword NameLoad keyword NameLoad Assign NameStore Call NameLoad NameLoad NameLoad NameLoad NameLoad Assign NameStore Call AttributeLoad Call AttributeLoad NameLoad attr NameLoad attr AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call Call NameLoad SubscriptLoad NameLoad Index Call NameLoad AttributeLoad NameLoad attr NameLoad Call NameLoad NameLoad NameLoad Return NameLoad orelse If AttributeLoad NameLoad attr body Assign NameStore Call NameLoad NameLoad For NameStore NameLoad body If UnaryOpNot AttributeLoad NameLoad attr body Assign TupleStore NameStore NameStore Call NameLoad NameLoad keyword NameLoad keyword NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call NameLoad Call NameLoad NameLoad NameLoad ListComp Call NameLoad NameLoad comprehension NameStore NameLoad BinOpMult ListLoad NameLoad Call NameLoad NameLoad Assign NameStore Call NameLoad NameLoad Assign NameStore Call NameLoad Num For NameStore Call NameLoad NameLoad body Assign NameStore Call NameLoad SubscriptLoad NameLoad Index NameLoad Call NameLoad SubscriptLoad NameLoad Index NameLoad NameLoad BinOpAdd BinOpSub NameLoad NameLoad SubscriptLoad NameLoad Index NameLoad Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad AugAssignMult NameStore NameLoad Assign NameStore Call NameLoad NameLoad Call NameLoad NameLoad NameLoad Return NameLoad orelse If AttributeLoad NameLoad attr body Assign NameStore Call NameLoad NameLoad Assign NameStore Call NameLoad Num For NameStore Call NameLoad NameLoad body Assign NameStore Call NameLoad SubscriptLoad NameLoad Index NameLoad Call NameLoad SubscriptLoad NameLoad Index NameLoad NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad AugAssignAdd NameStore NameLoad Return NameLoad orelse If AttributeLoad NameLoad attr body Assign TupleStore NameStore NameStore Call NameLoad AttributeLoad NameLoad attr keyword NameLoad keyword NameLoad keyword NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call NameLoad AttributeLoad NameLoad attr Call NameLoad AttributeLoad NameLoad attr NameLoad NameLoad Return Call NameLoad NameLoad AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad NameLoad orelse If BoolOpAnd Call NameLoad NameLoad NameLoad Call AttributeLoad NameLoad attr body Return SubscriptLoad Call NameLoad NameLoad keyword NameLoad keyword NameLoad keyword NameLoad Index Num orelse Raise NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str Assign TupleStore NameStore NameStore Call NameLoad NameLoad keyword NameLoad keyword NameLoad keyword NameLoad If CompareNotIn NameLoad AttributeLoad NameLoad attr body Assign NameStore Call AttributeLoad NameLoad attr ListLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call NameLoad NameLoad NameLoad NameLoad NameLoad Assign NameStore AttributeLoad NameLoad attr Assign NameStore Call NameLoad NameLoad Assign NameStore BinOpAdd Call AttributeLoad NameLoad attr NameLoad Num If CompareGtE NameLoad NameLoad body Return Call NameLoad NameLoad NameLoad NameLoad orelse For NameStore Call NameLoad Num Num body Assign NameStore Call NameLoad NameLoad NameLoad NameLoad keyword BinOpAdd NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign NameStore BinOpAdd Call AttributeLoad NameLoad attr NameLoad Num If CompareNotEq NameLoad NameLoad body Assign NameStore Call NameLoad BinOpAdd NameLoad BinOpDiv BinOpMult BinOpSub NameLoad NameLoad NameLoad BinOpSub NameLoad NameLoad Assign NameStore Call NameLoad NameLoad NameLoad NameLoad keyword NameLoad While CompareLt BinOpAdd Call AttributeLoad NameLoad attr NameLoad Num NameLoad body Assign NameStore Call NameLoad NameLoad NameLoad NameLoad keyword NameLoad Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr AugAssignMult NameStore Num Break orelse Break orelse Raise Call NameLoad BinOpMod Str TupleLoad Call NameLoad NameLoad NameLoad Return Call NameLoad NameLoad NameLoad NameLoad decorator_list
N/A N/A Power series evaluation and manipulation using sparse Polynomials

Implementing a new function
---------------------------

There are a few things to be kept in mind when adding a new function here::

    - The implementation should work on all possible input domains/rings.
      Special cases include the ``EX`` ring and a constant term in the series
      to be expanded. There can be two types of constant terms in the series:

        + A constant value or symbol.
        + A term of a multivariate series not involving the generator, with
          respect to which the series is to expanded.

      Strictly speaking, a generator of a ring should not be considered a
      constant. However, for series expansion both the cases need similar
      treatment (as the user doesn't care about inner details), i.e, use an
      addition formula to separate the constant part and the variable part (see
      rs_sin for reference).

    - All the algorithms used here are primarily designed to work for Taylor
      series (number of iterations in the algo equals the required order).
      Hence, it becomes tricky to get the series of the right order if a
      Puiseux series is input. Use rs_puiseux? in your function if your
      algorithm is not designed to handle fractional powers.

Extending rs_series
-------------------

To make a function work with rs_series you need to do two things::

    - Many sure it works with a constant term (as explained above).
    - If the series contains constant terms, you might need to extend its ring.
      You do so by adding the new terms to the rings as generators.
      ``PolyRing.compose`` and ``PolyRing.add_gens`` are two functions that do
      so and need to be called every time you expand a series containing a
      constant term.

Look at rs_sin and rs_series for further reference.

 sympy.polys.domains QQ EX sympy.polys.rings PolyElement ring sring sympy.polys.polyerrors DomainError sympy.polys.monomials monomial_min monomial_mul monomial_div monomial_ldiv mpmath.libmp.libintmath ifac sympy.core PoleError Function Expr sympy.core.numbers Rational igcd sympy.core.compatibility as_int range sympy.functions sin cos tan atan exp atanh tanh log ceiling mpmath.libmp.libintmath giant_steps N/A math _invert_monoms N/A N/A p1 N/A N/A N/A 
    Compute ``x**n * p1(1/x)`` for a univariate polynomial ``p1`` in ``x``.

    Examples
    ========

    >>> from sympy.polys.domains import ZZ
    >>> from sympy.polys.rings import ring
    >>> from sympy.polys.ring_series import _invert_monoms
    >>> R, x = ring('x', ZZ)
    >>> p = x**2 + 2*x + 3
    >>> _invert_monoms(p)
    3*x**2 + 2*x + 1

    See Also
    ========

    sympy.polys.densebasic.dup_reverse
     N/A terms N/A list N/A N/A p1 items N/A N/A N/A terms sort N/A deg N/A N/A p1 degree N/A R N/A p1 ring N/A p N/A R zero N/A cv N/A N/A p1 listcoeffs N/A mv N/A N/A p1 listmonoms N/A i N/A range N/A len mv N/A N/A N/A p N/A N/A N/A deg N/A N/A mv N/A i N/A 0 N/A cv N/A i N/A p N/A _giant_steps N/A N/A target N/A N/A N/A Return a list of precision steps for the Newton's method N/A res N/A giant_steps 2 target N/A N/A N/A res N/A 0 2 N/A N/A res N/A N/A 2 res N/A res N/A rs_trunc N/A N/A p1 x prec N/A N/A N/A 
    Truncate the series in the ``x`` variable with precision ``prec``,
    that is, modulo ``O(x**prec)``

    Examples
    ========

    >>> from sympy.polys.domains import QQ
    >>> from sympy.polys.rings import ring
    >>> from sympy.polys.ring_series import rs_trunc
    >>> R, x = ring('x', QQ)
    >>> p = x**10 + x**5 + x + 1
    >>> rs_trunc(p, x, 12)
    x**10 + x**5 + x + 1
    >>> rs_trunc(p, x, 10)
    x**5 + x + 1
     N/A R N/A p1 ring N/A p N/A R zero N/A i N/A N/A N/A R gens index x N/A exp1 p1 N/A N/A N/A N/A exp1 N/A i prec N/A N/A N/A N/A p N/A exp1 N/A p1 N/A exp1 N/A p N/A rs_is_puiseux N/A N/A p x N/A N/A N/A 
    Test if ``p`` is Puiseux series in ``x``.

    Raise an exception if it has a negative power in ``x``.

    Examples
    ========

    >>> from sympy.polys.domains import QQ
    >>> from sympy.polys.rings import ring
    >>> from sympy.polys.ring_series import rs_is_puiseux
    >>> R, x = ring('x', QQ)
    >>> p = x**QQ(2,5) + x**QQ(2,3) + x
    >>> rs_is_puiseux(p, x)
    True
     N/A index N/A N/A N/A N/A p ring gens index x N/A k p N/A N/A N/A N/A k N/A index N/A int N/A k N/A index N/A N/A True N/A N/A N/A k N/A index 0 N/A N/A N/A ValueError N/A The series is not regular in %s x N/A False N/A rs_puiseux N/A N/A f p x prec N/A N/A N/A 
    Return the puiseux series for `f(p, x, prec)`.

    To be used when function ``f`` is implemented only for regular series.

    Examples
    ========

    >>> from sympy.polys.domains import QQ
    >>> from sympy.polys.rings import ring
    >>> from sympy.polys.ring_series import rs_puiseux, rs_exp
    >>> R, x = ring('x', QQ)
    >>> p = x**QQ(2,5) + x**QQ(2,3) + x
    >>> rs_puiseux(rs_exp,p, x, 1)
    1/2*x**(4/5) + x**(2/3) + x**(2/5) + 1
     N/A index N/A N/A N/A N/A p ring gens index x N/A n 1 N/A k p N/A N/A power N/A k N/A index N/A N/A isinstance power Rational N/A N/A N/A num den N/A N/A power as_numer_denom N/A n N/A int N/A N/A n den N/A igcd n den N/A N/A N/A power N/A int power N/A N/A N/A num den N/A N/A power numerator N/A power denominator N/A n N/A int N/A N/A n den N/A igcd n den N/A N/A n 1 N/A N/A p1 N/A pow_xin p index n N/A r N/A f p1 x N/A prec n N/A n1 N/A QQ 1 n N/A N/A isinstance r tuple N/A N/A r N/A tuple N/A N/A pow_xin rx index n1 N/A rx r N/A N/A r N/A pow_xin r index n1 N/A N/A r N/A f p x prec N/A r N/A rs_puiseux2 N/A N/A f p q x prec N/A N/A N/A 
    Return the puiseux series for `f(p, q, x, prec)`.

    To be used when function ``f`` is implemented only for regular series.
     N/A index N/A N/A N/A N/A p ring gens index x N/A n 1 N/A k p N/A N/A power N/A k N/A index N/A N/A isinstance power Rational N/A N/A N/A num den N/A N/A power as_numer_denom N/A n N/A N/A n den N/A igcd n den N/A N/A N/A power N/A int power N/A N/A N/A num den N/A N/A power numerator N/A power denominator N/A n N/A N/A n den N/A igcd n den N/A N/A n 1 N/A N/A p1 N/A pow_xin p index n N/A r N/A f p1 q x N/A prec n N/A n1 N/A QQ 1 n N/A r N/A pow_xin r index n1 N/A N/A r N/A f p q x prec N/A r N/A rs_mul N/A N/A p1 p2 x prec N/A N/A N/A 
    Return the product of the given two series, modulo ``O(x**prec)``.

    ``x`` is the series variable or its position in the generators.

    Examples
    ========

    >>> from sympy.polys.domains import QQ
    >>> from sympy.polys.rings import ring
    >>> from sympy.polys.ring_series import rs_mul
    >>> R, x = ring('x', QQ)
    >>> p1 = x**2 + 2*x + 1
    >>> p2 = x + 1
    >>> rs_mul(p1, p2, x, 3)
    3*x**2 + 3*x + 1
     N/A R N/A p1 ring N/A p N/A R zero N/A N/A N/A N/A R __class__ N/A N/A p2 ring __class__ N/A R N/A p2 ring N/A N/A N/A ValueError p1 and p2 must have the same ring N/A iv N/A N/A N/A R gens index x N/A N/A N/A isinstance p2 PolyElement N/A N/A N/A ValueError p1 and p2 must have the same ring N/A N/A R N/A p2 ring N/A N/A get N/A p get N/A items2 N/A list N/A N/A p2 items N/A N/A N/A items2 sort key N/A N/A N/A e N/A N/A N/A e N/A 0 N/A iv N/A N/A N/A R ngens 1 N/A N/A N/A exp1 v1 N/A N/A p1 items N/A N/A N/A exp2 v2 items2 N/A N/A exp N/A N/A exp1 N/A 0 N/A exp2 N/A 0 N/A N/A exp prec N/A N/A exp N/A exp N/A N/A p N/A exp N/A N/A get exp 0 N/A v1 v2 N/A N/A N/A N/A monomial_mul N/A R monomial_mul N/A N/A exp1 v1 N/A N/A p1 items N/A N/A N/A exp2 v2 items2 N/A N/A N/A N/A N/A exp1 N/A iv N/A exp2 N/A iv prec N/A N/A exp N/A monomial_mul exp1 exp2 N/A N/A p N/A exp N/A N/A get exp 0 N/A v1 v2 N/A N/A N/A N/A N/A p strip_zero N/A p N/A rs_square N/A N/A p1 x prec N/A N/A N/A 
    Square the series modulo ``O(x**prec)``

    Examples
    ========

    >>> from sympy.polys.domains import QQ
    >>> from sympy.polys.rings import ring
    >>> from sympy.polys.ring_series import rs_square
    >>> R, x = ring('x', QQ)
    >>> p = x**2 + 2*x + 1
    >>> rs_square(p, x, 3)
    6*x**2 + 4*x + 1
     N/A R N/A p1 ring N/A p N/A R zero N/A iv N/A N/A N/A R gens index x N/A get N/A p get N/A items N/A list N/A N/A p1 items N/A N/A N/A items sort key N/A N/A N/A e N/A N/A N/A e N/A 0 N/A iv N/A monomial_mul N/A R monomial_mul N/A i N/A range N/A len items N/A N/A N/A exp1 v1 N/A items N/A i N/A j N/A range i N/A N/A N/A exp2 v2 N/A items N/A j N/A N/A N/A N/A exp1 N/A iv N/A exp2 N/A iv prec N/A N/A exp N/A monomial_mul exp1 exp2 N/A N/A p N/A exp N/A N/A get exp 0 N/A v1 v2 N/A N/A N/A p N/A N/A p imul_num 2 N/A get N/A p get N/A N/A expv v N/A N/A p1 items N/A N/A N/A N/A 2 N/A expv N/A iv prec N/A N/A e2 N/A monomial_mul expv expv N/A N/A p N/A e2 N/A N/A get e2 0 N/A v 2 N/A N/A N/A p strip_zero N/A p N/A rs_pow N/A N/A p1 n x prec N/A N/A N/A 
    Return ``p1**n`` modulo ``O(x**prec)``

    Examples
    ========

    >>> from sympy.polys.domains import QQ
    >>> from sympy.polys.rings import ring
    >>> from sympy.polys.ring_series import rs_pow
    >>> R, x = ring('x', QQ)
    >>> p = x + 1
    >>> rs_pow(p, 4, x, 3)
    6*x**2 + 4*x + 1
     N/A R N/A p1 ring N/A p N/A R zero N/A N/A isinstance n Rational N/A N/A np N/A int N/A n p N/A nq N/A int N/A n q N/A N/A nq 1 N/A N/A res N/A rs_nth_root p1 nq x prec N/A N/A np 1 N/A N/A res N/A rs_pow res np x prec N/A N/A res N/A rs_pow p1 np x prec N/A res N/A n N/A as_int n N/A N/A n 0 N/A N/A p1 N/A N/A N/A R 1 N/A N/A N/A ValueError 0**0 is undefined N/A N/A n 0 N/A N/A p1 N/A rs_pow p1 N/A n x prec N/A N/A rs_series_inversion p1 x prec N/A N/A n 1 N/A N/A N/A rs_trunc p1 x prec N/A N/A n 2 N/A N/A N/A rs_square p1 x prec N/A N/A n 3 N/A N/A p2 N/A rs_square p1 x prec N/A N/A rs_mul p1 p2 x prec N/A p N/A R 1 N/A 1 N/A N/A N/A n 1 N/A N/A p N/A rs_mul p1 p x prec N/A n 1 N/A N/A n N/A N/A N/A p1 N/A rs_square p1 x prec N/A n N/A n 2 N/A p N/A rs_subs N/A N/A p rules x prec N/A N/A N/A 
    Substitution with truncation according to the mapping in ``rules``.

    Return a series with precision ``prec`` in the generator ``x``

    Note that substitutions are not done one after the other

    >>> from sympy.polys.domains import QQ
    >>> from sympy.polys.rings import ring
    >>> from sympy.polys.ring_series import rs_subs
    >>> R, x, y = ring('x, y', QQ)
    >>> p = x**2 + y**2
    >>> rs_subs(p, {x: x+ y, y: x+ 2*y}, x, 3)
    2*x**2 + 6*x*y + 5*y**2
    >>> (x + y)**2 + (x + 2*y)**2
    2*x**2 + 6*x*y + 5*y**2

    which differs from

    >>> rs_subs(rs_subs(p, {x: x+ y}, x, 3), {y: x+ 2*y}, x, 3)
    5*x**2 + 12*x*y + 8*y**2

    Parameters
    ----------
    p : :class:`PolyElement` Input series.
    rules : :class:`dict` with substitution mappings.
    x : :class:`PolyElement` in which the series truncation is to be done.
    prec : :class:`Integer` order of the series after truncation.

    Examples
    ========

    >>> from sympy.polys.domains import QQ
    >>> from sympy.polys.rings import ring
    >>> from sympy.polys.ring_series import rs_subs
    >>> R, x, y = ring('x, y', QQ)
    >>> rs_subs(x**2+y**2, {y: (x+y)**2}, x, 3)
     6*x**2*y**2 + x**2 + 4*x*y**3 + y**4
     N/A R N/A p ring N/A ngens N/A R ngens N/A d N/A R 0 N/A i N/A range ngens N/A N/A N/A d N/A N/A i 1 N/A N/A R gens N/A i N/A var rules N/A N/A N/A d N/A N/A N/A N/A R index var 1 N/A rules N/A var N/A p1 N/A R 0 N/A p_keys N/A sorted N/A N/A p keys N/A expv p_keys N/A N/A p2 N/A R 1 N/A i N/A range ngens N/A N/A power N/A expv N/A i N/A N/A power 0 N/A N/A N/A N/A N/A i power d N/A N/A N/A q r N/A divmod power 2 N/A N/A N/A r 0 N/A N/A i q d N/A N/A N/A d N/A N/A i power N/A rs_square N/A d N/A N/A i q x prec N/A N/A N/A N/A i N/A power 1 d N/A N/A N/A d N/A N/A i power N/A rs_mul N/A d N/A N/A i N/A power 1 N/A d N/A N/A i 1 x prec N/A N/A N/A d N/A N/A i power N/A rs_pow N/A d N/A N/A i 1 power x prec N/A p2 N/A rs_mul p2 N/A d N/A N/A i power x prec N/A p1 N/A p2 N/A p N/A expv N/A p1 N/A _has_constant_term N/A N/A p x N/A N/A N/A 
    Check if ``p`` has a constant term in ``x``

    Examples
    ========

    >>> from sympy.polys.domains import QQ
    >>> from sympy.polys.rings import ring
    >>> from sympy.polys.ring_series import _has_constant_term
    >>> R, x = ring('x', QQ)
    >>> p = x**2 + x + 1
    >>> _has_constant_term(p, x)
    True
     N/A R N/A p ring N/A iv N/A N/A N/A R gens index x N/A zm N/A R zero_monom N/A a N/A N/A 0 N/A R ngens N/A N/A a N/A iv 1 N/A miv N/A tuple a N/A expv p N/A N/A N/A N/A monomial_min expv miv zm N/A N/A True N/A False N/A _get_constant_term N/A N/A p x N/A N/A N/A Return constant term in p with respect to x

    Note that it is not simply `p[R.zero_monom]` as there might be multiple
    generators in the ring R. We want the `x`-free term which can contain other
    generators.
     N/A R N/A p ring N/A zm N/A R zero_monom N/A i N/A N/A N/A R gens index x N/A zm N/A R zero_monom N/A a N/A N/A 0 N/A R ngens N/A N/A a N/A i 1 N/A miv N/A tuple a N/A c 0 N/A expv p N/A N/A N/A N/A monomial_min expv miv zm N/A N/A c N/A R N/A expv N/A p N/A expv N/A c N/A _check_series_var N/A N/A p x name N/A N/A N/A index N/A N/A N/A N/A p ring gens index x N/A m N/A N/A min p key N/A N/A N/A k N/A N/A k N/A index N/A index N/A N/A m 0 N/A N/A N/A PoleError N/A Asymptotic expansion of %s around [oo] not implemented. name N/A N/A index m N/A _series_inversion1 N/A N/A p x prec N/A N/A N/A 
    Univariate series inversion ``1/p`` modulo ``O(x**prec)``.

    The Newton method is used.

    Examples
    ========

    >>> from sympy.polys.domains import QQ
    >>> from sympy.polys.rings import ring
    >>> from sympy.polys.ring_series import _series_inversion1
    >>> R, x = ring('x', QQ)
    >>> p = x + 1
    >>> _series_inversion1(p, x, 4)
    -x**3 + x**2 - x + 1
     N/A N/A rs_is_puiseux p x N/A N/A N/A rs_puiseux _series_inversion1 p x prec N/A R N/A p ring N/A zm N/A R zero_monom N/A c N/A p N/A zm N/A N/A prec N/A int prec N/A N/A prec N/A int prec N/A N/A zm p N/A N/A N/A ValueError No constant term in series N/A N/A _has_constant_term N/A p c x N/A N/A N/A ValueError p cannot contain a constant term depending on parameters N/A one N/A R 1 N/A N/A N/A R domain EX N/A N/A one 1 N/A N/A c one N/A N/A p1 N/A N/A R 1 c N/A N/A p1 N/A R 1 N/A precx N/A _giant_steps prec N/A N/A t N/A 1 N/A rs_mul p1 p x precx N/A p1 N/A p1 N/A rs_mul p1 t x precx N/A p1 N/A rs_series_inversion N/A N/A p x prec N/A N/A N/A 
    Multivariate series inversion ``1/p`` modulo ``O(x**prec)``.

    Examples
    ========

    >>> from sympy.polys.domains import QQ
    >>> from sympy.polys.rings import ring
    >>> from sympy.polys.ring_series import rs_series_inversion
    >>> R, x, y = ring('x, y', QQ)
    >>> rs_series_inversion(1 + x*y**2, x, 4)
    -x**3*y**6 + x**2*y**4 - x*y**2 + 1
    >>> rs_series_inversion(1 + x*y**2, y, 4)
    -x*y**2 + 1
    >>> rs_series_inversion(x + x**2, x, 4)
    x**3 - x**2 + x - 1 + x**(-1)
     N/A R N/A p ring N/A N/A p N/A R zero N/A N/A ZeroDivisionError N/A zm N/A R zero_monom N/A index N/A N/A N/A R gens index x N/A m N/A N/A min p key N/A N/A N/A k N/A N/A k N/A index N/A index N/A m N/A N/A p N/A mul_xin p index N/A m N/A prec N/A prec m N/A N/A zm p N/A N/A N/A NotImplementedError No constant term in series N/A N/A _has_constant_term N/A p N/A p N/A zm x N/A N/A N/A NotImplementedError p - p[0] must not have a constant term in the series variables N/A r N/A _series_inversion1 p x prec N/A N/A m 0 N/A N/A r N/A mul_xin r index N/A m N/A r N/A _coefficient_t N/A N/A p t N/A N/A N/A Coefficient of `x\_i**j` in p, where ``t`` = (i, j) N/A N/A i j t N/A R N/A p ring N/A expv1 N/A N/A 0 N/A R ngens N/A N/A expv1 N/A i j N/A expv1 N/A tuple expv1 N/A p1 N/A R 0 N/A expv p N/A N/A N/A N/A expv N/A i j N/A N/A N/A p1 N/A N/A monomial_div expv expv1 N/A p N/A expv N/A p1 N/A rs_series_reversion N/A N/A p x n y N/A N/A N/A 
    Reversion of a series.

    ``p`` is a series with ``O(x**n)`` of the form `p = a*x + f(x)`
    where `a` is a number different from 0.

    `f(x) = sum( a\_k*x\_k, k in range(2, n))`

      a_k : Can depend polynomially on other variables, not indicated.
      x : Variable with name x.
      y : Variable with name y.

    Solve `p = y`, that is, given `a*x + f(x) - y = 0`,
    find the solution x = r(y) up to O(y**n)

    Algorithm:

    If `r\_i` is the solution at order i, then:
    `a*r\_i + f(r\_i) - y = O(y**(i + 1))`

    and if r_(i + 1) is the solution at order i + 1, then:
    `a*r\_(i + 1) + f(r\_(i + 1)) - y = O(y**(i + 2))`

    We have, r_(i + 1) = r_i + e, such that,
    `a*e + f(r\_i) = O(y**(i + 2))`
    or `e = -f(r\_i)/a`

    So we use the recursion relation:
    `r\_(i + 1) = r\_i - f(r\_i)/a`
    with the boundary condition: `r\_1 = y`

    Examples
    ========

    >>> from sympy.polys.domains import QQ
    >>> from sympy.polys.rings import ring
    >>> from sympy.polys.ring_series import rs_series_reversion, rs_trunc
    >>> R, x, y, a, b = ring('x, y, a, b', QQ)
    >>> p = x - x**2 - 2*b*x**2 + 2*a*b*x**2
    >>> p1 = rs_series_reversion(p, x, 3, y); p1
    -2*y**2*a*b + 2*y**2*b + y**2 + y
    >>> rs_trunc(p.compose(x, p1), y, 3)
    y
     N/A N/A rs_is_puiseux p x N/A N/A NotImplementedError N/A R N/A p ring N/A nx N/A N/A N/A R gens index x N/A y N/A R y N/A ny N/A N/A N/A R gens index y N/A N/A _has_constant_term p x N/A N/A N/A ValueError p must not contain a constant term in the series variable N/A a N/A _coefficient_t p N/A nx 1 N/A zm N/A R zero_monom N/A N/A N/A zm a N/A N/A len a 1 N/A a N/A a N/A zm N/A r N/A y a N/A i N/A range 2 n N/A N/A sp N/A rs_subs p N/A x r y N/A i 1 N/A sp N/A N/A _coefficient_t sp N/A ny i N/A y i N/A r N/A sp a N/A r N/A rs_series_from_list N/A N/A p c x prec concur N/A 1 N/A N/A 
    Return a series `sum c[n]*p**n` modulo `O(x**prec)`.

    It reduces the number of multiplications by summing concurrently.

    `ax = [1, p, p**2, .., p**(J - 1)]`
    `s = sum(c[i]*ax[i]` for i in `range(r, (r + 1)*J))*p**((K - 1)*J)`
    with `K >= (n + 1)/J`

    Examples
    ========

    >>> from sympy.polys.domains import QQ
    >>> from sympy.polys.rings import ring
    >>> from sympy.polys.ring_series import rs_series_from_list, rs_trunc
    >>> R, x = ring('x', QQ)
    >>> p = x**2 + x + 1
    >>> c = [1, 2, 3]
    >>> rs_series_from_list(p, c, x, 4)
    6*x**3 + 11*x**2 + 8*x + 6
    >>> rs_trunc(1 + 2*p + 3*p**2, x, 4)
    6*x**3 + 11*x**2 + 8*x + 6
    >>> pc = R.from_list(list(reversed(c)))
    >>> rs_trunc(pc.compose(x, p), x, 4)
    6*x**3 + 11*x**2 + 8*x + 6

    See Also
    ========

    sympy.polys.ring.compose

     N/A R N/A p ring N/A n N/A len c N/A N/A concur N/A N/A q N/A R 1 N/A s N/A N/A c N/A 0 q N/A i N/A range 1 n N/A N/A q N/A rs_mul q p x prec N/A s N/A N/A c N/A i q N/A s N/A J N/A int N/A N/A N/A math sqrt n 1 N/A N/A K r N/A divmod n J N/A r N/A N/A K 1 N/A ax N/A N/A R 1 N/A b 1 N/A q N/A R 1 N/A N/A N/A len p 20 N/A N/A i N/A range 1 J N/A N/A q N/A rs_mul q p x prec N/A N/A N/A ax append q N/A N/A i N/A range 1 J N/A N/A N/A N/A i 2 0 N/A N/A q N/A rs_square N/A ax N/A N/A i 2 x prec N/A N/A q N/A rs_mul q p x prec N/A N/A N/A ax append q N/A pj N/A rs_mul N/A ax N/A -1 p x prec N/A b N/A R 1 N/A s N/A R 0 N/A k N/A range N/A K 1 N/A N/A r N/A J k N/A s1 N/A c N/A r N/A j N/A range 1 J N/A N/A s1 N/A N/A c N/A N/A r j N/A ax N/A j N/A s1 N/A rs_mul s1 b x prec N/A s s1 N/A b N/A rs_mul b pj x prec N/A N/A b N/A N/A N/A k N/A K 1 N/A r N/A J k N/A N/A r n N/A N/A s1 N/A N/A c N/A r N/A R 1 N/A j N/A range 1 J N/A N/A N/A N/A r j n N/A N/A N/A s1 N/A N/A c N/A N/A r j N/A ax N/A j N/A s1 N/A rs_mul s1 b x prec N/A s s1 N/A s N/A rs_diff N/A N/A p x N/A N/A N/A 
    Return partial derivative of ``p`` with respect to ``x``.

    Parameters
    ----------
    x : :class:`PolyElement` with respect to which ``p`` is differentiated.

    Examples
    ========

    >>> from sympy.polys.domains import QQ
    >>> from sympy.polys.rings import ring
    >>> from sympy.polys.ring_series import rs_diff
    >>> R, x, y = ring('x, y', QQ)
    >>> p = x + x**2*y**3
    >>> rs_diff(p, x)
    2*x*y**3 + 1
     N/A R N/A p ring N/A n N/A N/A N/A R gens index x N/A p1 N/A R zero N/A mn N/A N/A 0 N/A R ngens N/A N/A mn N/A n 1 N/A mn N/A tuple mn N/A expv p N/A N/A N/A expv N/A n N/A N/A e N/A monomial_ldiv expv mn N/A N/A p1 N/A e N/A N/A p N/A expv N/A expv N/A n N/A p1 N/A rs_integrate N/A N/A p x N/A N/A N/A 
    Integrate ``p`` with respect to ``x``.

    Parameters
    ----------
    x : :class:`PolyElement` with respect to which ``p`` is integrated.

    Examples
    ========

    >>> from sympy.polys.domains import QQ
    >>> from sympy.polys.rings import ring
    >>> from sympy.polys.ring_series import rs_integrate
    >>> R, x, y = ring('x, y', QQ)
    >>> p = x + x**2*y**3
    >>> rs_integrate(p, x)
    1/3*x**3*y**3 + 1/2*x**2
     N/A R N/A p ring N/A p1 N/A R zero N/A n N/A N/A N/A R gens index x N/A mn N/A N/A 0 N/A R ngens N/A N/A mn N/A n 1 N/A mn N/A tuple mn N/A expv p N/A N/A e N/A monomial_mul expv mn N/A N/A p1 N/A e N/A N/A p N/A expv N/A N/A expv N/A n 1 N/A p1 N/A rs_fun N/A N/A p f N/A args N/A N/A 
    Function of a multivariate series computed by substitution.

    The case with f method name is used to compute `rs\_tan` and `rs\_nth\_root`
    of a multivariate series:

        `rs\_fun(p, tan, iv, prec)`

        tan series is first computed for a dummy variable _x,
        i.e, `rs\_tan(\_x, iv, prec)`. Then we substitute _x with p to get the
        desired series

    Parameters
    ----------
    p : :class:`PolyElement` The multivariate series to be expanded.
    f : `ring\_series` function to be applied on `p`.
    args[-2] : :class:`PolyElement` with respect to which, the series is to be expanded.
    args[-1] : Required order of the expanded series.

    Examples
    ========

    >>> from sympy.polys.domains import QQ
    >>> from sympy.polys.rings import ring
    >>> from sympy.polys.ring_series import rs_fun, _tan1
    >>> R, x, y = ring('x, y', QQ)
    >>> p = x + x*y + x**2*y + x**3*y**2
    >>> rs_fun(p, _tan1, x, 4)
    1/3*x**3*y**3 + 2*x**3*y**2 + x**3*y + 1/3*x**3 + x**2*y + x*y + x
     N/A _R N/A p ring N/A N/A R1 _x N/A ring _x N/A _R domain N/A h N/A int N/A args N/A -1 N/A args1 N/A N/A args N/A -2 N/A _x h N/A zm N/A _R zero_monom N/A N/A zm p N/A N/A x1 N/A _x N/A p N/A zm N/A p1 N/A p N/A p N/A zm N/A N/A x1 _x N/A p1 p N/A N/A isinstance f str N/A N/A q N/A N/A getattr x1 f args1 N/A N/A q N/A f x1 args1 N/A a N/A sorted N/A N/A q items N/A c N/A N/A 0 h N/A x a N/A N/A N/A c N/A N/A N/A x N/A 0 N/A 0 N/A x N/A 1 N/A p1 N/A rs_series_from_list p1 c N/A args N/A -2 N/A args N/A -1 N/A p1 N/A mul_xin N/A N/A p i n N/A N/A N/A 
    Return `p*x_i**n`.

    `x\_i` is the ith variable in ``p``.
     N/A R N/A p ring N/A q N/A R 0 N/A N/A k v N/A N/A p items N/A N/A k1 N/A list k N/A N/A k1 N/A i n N/A N/A q N/A N/A tuple k1 v N/A q N/A pow_xin N/A N/A p i n N/A N/A N/A 
    >>> from sympy.polys.domains import QQ
    >>> from sympy.polys.rings import ring
    >>> from sympy.polys.ring_series import pow_xin
    >>> R, x, y = ring('x, y', QQ)
    >>> p = x**QQ(2,5) + x + x**QQ(2,3)
    >>> index = p.ring.gens.index(x)
    >>> pow_xin(p, index, 15)
    x**15 + x**10 + x**6
     N/A R N/A p ring N/A q N/A R 0 N/A N/A k v N/A N/A p items N/A N/A k1 N/A list k N/A N/A k1 N/A i n N/A N/A q N/A N/A tuple k1 v N/A q N/A _nth_root1 N/A N/A p n x prec N/A N/A N/A 
    Univariate series expansion of the nth root of ``p``.

    The Newton method is used.
     N/A N/A rs_is_puiseux p x N/A N/A N/A rs_puiseux2 _nth_root1 p n x prec N/A R N/A p ring N/A zm N/A R zero_monom N/A N/A zm p N/A N/A N/A NotImplementedError No constant term in series N/A n N/A as_int n N/A N/A N/A p N/A zm 1 N/A p1 N/A R 1 N/A N/A p 1 N/A N/A p N/A N/A n 0 N/A N/A N/A R 1 N/A N/A n 1 N/A N/A p N/A N/A n 0 N/A N/A n N/A n N/A sign 1 N/A N/A sign 0 N/A precx N/A _giant_steps prec N/A N/A tmp N/A rs_pow p1 N/A n 1 x precx N/A tmp N/A rs_mul tmp p x precx N/A p1 N/A N/A p1 n N/A tmp n N/A sign N/A N/A p1 N/A N/A N/A _series_inversion1 p1 x prec N/A rs_nth_root N/A N/A p n x prec N/A N/A N/A 
    Multivariate series expansion of the nth root of ``p``.

    Parameters
    ----------
    n : `p**(1/n)` is returned.
    x : :class:`PolyElement`
    prec : Order of the expanded series.

    Notes
    =====

    The result of this function is dependent on the ring over which the
    polynomial has been defined. If the answer involves a root of a constant,
    make sure that the polynomial is over a real field. It can not yet handle
    roots of symbols.

    Examples
    ========

    >>> from sympy.polys.domains import QQ, RR
    >>> from sympy.polys.rings import ring
    >>> from sympy.polys.ring_series import rs_nth_root
    >>> R, x, y = ring('x, y', QQ)
    >>> rs_nth_root(1 + x + x*y, -3, x, 3)
    2/9*x**2*y**2 + 4/9*x**2*y + 2/9*x**2 - 1/3*x*y - 1/3*x + 1
    >>> R, x, y = ring('x, y', RR)
    >>> rs_nth_root(3 + x + x*y, 3, x, 2)
    0.160249952256379*x*y + 0.160249952256379*x + 1.44224957030741
     N/A p0 p N/A n0 n N/A N/A n 0 N/A N/A N/A p 0 N/A N/A N/A ValueError 0**0 expression N/A N/A N/A N/A p ring 1 N/A N/A n 1 N/A N/A N/A rs_trunc p x prec N/A R N/A p ring N/A zm N/A R zero_monom N/A index N/A N/A N/A R gens index x N/A m N/A N/A min p key N/A N/A N/A k N/A N/A k N/A index N/A index N/A p N/A mul_xin p index N/A m N/A prec m N/A N/A _has_constant_term N/A p 1 x N/A N/A zm N/A R zero_monom N/A c N/A p N/A zm N/A N/A N/A R domain EX N/A N/A c_expr N/A N/A c as_expr N/A const N/A c_expr N/A QQ 1 n N/A N/A N/A isinstance c PolyElement N/A N/A N/A N/A c_expr N/A N/A c as_expr N/A const N/A R N/A c_expr N/A QQ 1 n N/A N/A N/A ValueError N/A N/A N/A DomainError The given series can't be expanded in this domain. N/A N/A N/A N/A const N/A R N/A c N/A Rational 1 n N/A N/A N/A ValueError N/A N/A N/A DomainError The given series can't be expanded in this domain. N/A res N/A N/A rs_nth_root N/A p c n x prec const N/A N/A res N/A _nth_root1 p n x prec N/A m N/A N/A m N/A QQ m n N/A res N/A mul_xin res index m N/A res N/A rs_log N/A N/A p x prec N/A N/A N/A 
    The Logarithm of ``p`` modulo ``O(x**prec)``.

    Notes
    =====

    Truncation of ``integral dx p**-1*d p/dx`` is used.

    Examples
    ========

    >>> from sympy.polys.domains import QQ
    >>> from sympy.polys.rings import ring
    >>> from sympy.polys.ring_series import rs_log
    >>> R, x = ring('x', QQ)
    >>> rs_log(1 + x, x, 8)
    1/7*x**7 - 1/6*x**6 + 1/5*x**5 - 1/4*x**4 + 1/3*x**3 - 1/2*x**2 + x
    >>> rs_log(x**QQ(3, 2) + 1, x, 5)
    1/3*x**(9/2) - 1/2*x**3 + x**(3/2)
     N/A N/A rs_is_puiseux p x N/A N/A N/A rs_puiseux rs_log p x prec N/A R N/A p ring N/A N/A p 1 N/A N/A N/A R zero N/A N/A _has_constant_term p x N/A N/A const 0 N/A zm N/A R zero_monom N/A c N/A p N/A zm N/A N/A c 1 N/A N/A N/A N/A c_expr N/A N/A c as_expr N/A N/A N/A R domain EX N/A N/A const N/A log c_expr N/A N/A N/A isinstance c PolyElement N/A N/A N/A N/A const N/A R N/A log c_expr N/A N/A N/A ValueError N/A N/A N/A DomainError The given series can't be expanded in this domain. N/A N/A N/A N/A const N/A R N/A log c N/A N/A N/A ValueError N/A N/A N/A DomainError The given series can't be expanded in this domain. N/A dlog N/A N/A p diff x N/A dlog N/A rs_mul dlog N/A _series_inversion1 p x prec x N/A prec 1 N/A N/A N/A rs_integrate dlog x const N/A N/A NotImplementedError N/A rs_LambertW N/A N/A p x prec N/A N/A N/A 
    Calculate the series expansion of the principal branch of the Lambert W
    function.

    Examples
    ========

    >>> from sympy.polys.domains import QQ
    >>> from sympy.polys.rings import ring
    >>> from sympy.polys.ring_series import rs_LambertW
    >>> R, x, y = ring('x, y', QQ)
    >>> rs_LambertW(x + x*y, x, 3)
    -x**2*y**2 - 2*x**2*y - x**2 + x*y + x

    See Also
    ========

    LambertW
     N/A N/A rs_is_puiseux p x N/A N/A N/A rs_puiseux rs_LambertW p x prec N/A R N/A p ring N/A p1 N/A R 0 N/A N/A _has_constant_term p x N/A N/A N/A NotImplementedError Polynomial must not have constant term in the series variables N/A N/A x N/A R gens N/A N/A precx N/A _giant_steps prec N/A N/A e N/A rs_exp p1 x precx N/A p2 N/A N/A rs_mul e p1 x precx p N/A p3 N/A rs_mul e N/A p1 1 x precx N/A p3 N/A rs_series_inversion p3 x precx N/A tmp N/A rs_mul p2 p3 x precx N/A p1 tmp N/A p1 N/A N/A NotImplementedError N/A _exp1 N/A N/A p x prec N/A N/A N/A Helper function for `rs\_exp`.  N/A R N/A p ring N/A p1 N/A R 1 N/A precx N/A _giant_steps prec N/A N/A pt N/A p N/A rs_log p1 x precx N/A tmp N/A rs_mul pt p1 x precx N/A p1 tmp N/A p1 N/A rs_exp N/A N/A p x prec N/A N/A N/A 
    Exponentiation of a series modulo ``O(x**prec)``

    Examples
    ========

    >>> from sympy.polys.domains import QQ
    >>> from sympy.polys.rings import ring
    >>> from sympy.polys.ring_series import rs_exp
    >>> R, x = ring('x', QQ)
    >>> rs_exp(x**2, x, 7)
    1/6*x**6 + 1/2*x**4 + x**2 + 1
     N/A N/A rs_is_puiseux p x N/A N/A N/A rs_puiseux rs_exp p x prec N/A R N/A p ring N/A c N/A _get_constant_term p x N/A c N/A N/A N/A N/A R domain EX N/A N/A c_expr N/A N/A c as_expr N/A const N/A exp c_expr N/A N/A N/A isinstance c PolyElement N/A N/A N/A N/A c_expr N/A N/A c as_expr N/A const N/A R N/A exp c_expr N/A N/A N/A ValueError N/A N/A R N/A N/A R add_gens N/A N/A exp c_expr N/A p N/A N/A p set_ring R N/A x N/A N/A x set_ring R N/A c N/A N/A c set_ring R N/A const N/A R N/A exp c_expr N/A N/A N/A N/A const N/A R N/A exp c N/A N/A N/A ValueError N/A N/A N/A DomainError The given series can't be expanded in this domain. N/A p1 N/A p c N/A N/A const N/A rs_exp p1 x prec N/A N/A N/A len p 20 N/A N/A N/A _exp1 p x prec N/A one N/A R 1 N/A n 1 N/A k 1 N/A c N/A N/A k N/A range prec N/A N/A N/A N/A c append N/A one n N/A k 1 N/A n k N/A r N/A rs_series_from_list p c x prec N/A r N/A _atan N/A N/A p iv prec N/A N/A N/A 
    Expansion using formula.

    Faster on very small and univariate series.
     N/A R N/A p ring N/A mo N/A R -1 N/A c N/A N/A mo N/A p2 N/A rs_square p iv prec N/A k N/A range 1 prec N/A N/A N/A N/A c append N/A N/A mo k N/A N/A 2 k 1 N/A s N/A rs_series_from_list p2 c iv prec N/A s N/A rs_mul s p iv prec N/A s N/A rs_atan N/A N/A p x prec N/A N/A N/A 
    The arctangent of a series

    Return the series expansion of the atan of ``p``, about 0.

    Examples
    ========

    >>> from sympy.polys.domains import QQ
    >>> from sympy.polys.rings import ring
    >>> from sympy.polys.ring_series import rs_atan
    >>> R, x, y = ring('x, y', QQ)
    >>> rs_atan(x + x*y, x, 4)
    -1/3*x**3*y**3 - x**3*y**2 - x**3*y - 1/3*x**3 + x*y + x

    See Also
    ========

    atan
     N/A N/A rs_is_puiseux p x N/A N/A N/A rs_puiseux rs_atan p x prec N/A R N/A p ring N/A const 0 N/A N/A _has_constant_term p x N/A N/A zm N/A R zero_monom N/A c N/A p N/A zm N/A N/A N/A R domain EX N/A N/A c_expr N/A N/A c as_expr N/A const N/A atan c_expr N/A N/A N/A isinstance c PolyElement N/A N/A N/A N/A c_expr N/A N/A c as_expr N/A const N/A R N/A atan c_expr N/A N/A N/A ValueError N/A N/A N/A DomainError The given series can't be expanded in this domain. N/A N/A N/A N/A const N/A R N/A atan c N/A N/A N/A ValueError N/A N/A N/A DomainError The given series can't be expanded in this domain. N/A dp N/A N/A p diff x N/A p1 N/A N/A rs_square p x prec N/A R 1 N/A p1 N/A rs_series_inversion p1 x N/A prec 1 N/A p1 N/A rs_mul dp p1 x N/A prec 1 N/A N/A N/A rs_integrate p1 x const N/A rs_asin N/A N/A p x prec N/A N/A N/A 
    Arcsine of a series

    Return the series expansion of the asin of ``p``, about 0.

    Examples
    ========

    >>> from sympy.polys.domains import QQ
    >>> from sympy.polys.rings import ring
    >>> from sympy.polys.ring_series import rs_asin
    >>> R, x, y = ring('x, y', QQ)
    >>> rs_asin(x, x, 8)
    5/112*x**7 + 3/40*x**5 + 1/6*x**3 + x

    See Also
    ========

    asin
     N/A N/A rs_is_puiseux p x N/A N/A N/A rs_puiseux rs_asin p x prec N/A N/A _has_constant_term p x N/A N/A N/A NotImplementedError Polynomial must not have constant term in series variables N/A R N/A p ring N/A N/A x N/A R gens N/A N/A N/A N/A len p 20 N/A N/A dp N/A rs_diff p x N/A p1 N/A 1 N/A rs_square p x N/A prec 1 N/A p1 N/A rs_nth_root p1 -2 x N/A prec 1 N/A p1 N/A rs_mul dp p1 x N/A prec 1 N/A N/A rs_integrate p1 x N/A one N/A R 1 N/A c N/A 0 one 0 N/A k N/A range 3 prec 2 N/A N/A N/A N/A c append N/A N/A N/A N/A k 2 2 N/A c N/A -2 N/A k N/A k 1 N/A N/A N/A c append 0 N/A N/A rs_series_from_list p c x prec N/A N/A NotImplementedError N/A _tan1 N/A N/A p x prec N/A N/A N/A 
    Helper function of `rs\_tan`.

    Return the series expansion of tan of a univariate series using Newton's
    method. It takes advantage of the fact that series expansion of atan is
    easier than that of tan.

    Consider `f(x) = y - atan(x)`
    Let r be a root of f(x) found using Newton's method.
    Then `f(r) = 0`
    Or `y  = atan(x)` where `x = tan(y)` as required.
     N/A R N/A p ring N/A p1 N/A R 0 N/A precx N/A _giant_steps prec N/A N/A tmp N/A p N/A rs_atan p1 x precx N/A tmp N/A rs_mul tmp N/A 1 N/A rs_square p1 x precx x precx N/A p1 tmp N/A p1 N/A rs_tan N/A N/A p x prec N/A N/A N/A 
    Tangent of a series.

    Return the series expansion of the tan of ``p``, about 0.

    Examples
    ========

    >>> from sympy.polys.domains import QQ
    >>> from sympy.polys.rings import ring
    >>> from sympy.polys.ring_series import rs_tan
    >>> R, x, y = ring('x, y', QQ)
    >>> rs_tan(x + x*y, x, 4)
    1/3*x**3*y**3 + x**3*y**2 + x**3*y + 1/3*x**3 + x*y + x

   See Also
   ========

   _tan1, tan
    N/A N/A rs_is_puiseux p x N/A N/A r N/A rs_puiseux rs_tan p x prec N/A r N/A R N/A p ring N/A const 0 N/A c N/A _get_constant_term p x N/A c N/A N/A N/A N/A R domain EX N/A N/A c_expr N/A N/A c as_expr N/A const N/A tan c_expr N/A N/A N/A isinstance c PolyElement N/A N/A N/A N/A c_expr N/A N/A c as_expr N/A const N/A R N/A tan c_expr N/A N/A N/A ValueError N/A N/A R N/A N/A R add_gens N/A N/A tan c_expr N/A p N/A N/A p set_ring R N/A x N/A N/A x set_ring R N/A c N/A N/A c set_ring R N/A const N/A R N/A tan c_expr N/A N/A N/A N/A const N/A R N/A tan c N/A N/A N/A ValueError N/A N/A N/A DomainError The given series can't be expanded in this domain. N/A p1 N/A p c N/A t2 N/A rs_tan p1 x prec N/A t N/A rs_series_inversion N/A 1 N/A const t2 x prec N/A N/A rs_mul N/A const t2 t x prec N/A N/A N/A R ngens 1 N/A N/A N/A _tan1 p x prec N/A N/A N/A rs_fun p rs_tan x prec N/A rs_cot N/A N/A p x prec N/A N/A N/A 
    Cotangent of a series

    Return the series expansion of the cot of ``p``, about 0.

    Examples
    ========

    >>> from sympy.polys.domains import QQ
    >>> from sympy.polys.rings import ring
    >>> from sympy.polys.ring_series import rs_cot
    >>> R, x, y = ring('x, y', QQ)
    >>> rs_cot(x, x, 6)
    -2/945*x**5 - 1/45*x**3 - 1/3*x + x**(-1)

    See Also
    ========

    cot
     N/A N/A rs_is_puiseux p x N/A N/A r N/A rs_puiseux rs_cot p x prec N/A r N/A N/A i m N/A _check_series_var p x cot N/A prec1 N/A prec N/A 2 m N/A N/A c s N/A rs_cos_sin p x prec1 N/A s N/A mul_xin s i N/A m N/A s N/A rs_series_inversion s x prec1 N/A res N/A rs_mul c s x prec1 N/A res N/A mul_xin res i N/A m N/A res N/A rs_trunc res x prec N/A res N/A rs_sin N/A N/A p x prec N/A N/A N/A 
    Sine of a series

    Return the series expansion of the sin of ``p``, about 0.

    Examples
    ========

    >>> from sympy.polys.domains import QQ
    >>> from sympy.polys.rings import ring
    >>> from sympy.polys.ring_series import rs_sin
    >>> R, x, y = ring('x, y', QQ)
    >>> rs_sin(x + x*y, x, 4)
    -1/6*x**3*y**3 - 1/2*x**3*y**2 - 1/2*x**3*y - 1/6*x**3 + x*y + x
    >>> rs_sin(x**QQ(3, 2) + x*y**QQ(7, 5), x, 4)
    -1/2*x**(7/2)*y**(14/5) - 1/6*x**3*y**(21/5) + x**(3/2) + x*y**(7/5)

    See Also
    ========

    sin
     N/A N/A rs_is_puiseux p x N/A N/A N/A rs_puiseux rs_sin p x prec N/A R N/A x ring N/A N/A p N/A N/A N/A R 0 N/A c N/A _get_constant_term p x N/A c N/A N/A N/A N/A R domain EX N/A N/A c_expr N/A N/A c as_expr N/A N/A t1 t2 N/A N/A sin c_expr N/A cos c_expr N/A N/A N/A isinstance c PolyElement N/A N/A N/A N/A c_expr N/A N/A c as_expr N/A N/A t1 t2 N/A N/A R N/A sin c_expr N/A R N/A cos c_expr N/A N/A N/A ValueError N/A N/A R N/A N/A R add_gens N/A N/A sin c_expr N/A cos c_expr N/A p N/A N/A p set_ring R N/A x N/A N/A x set_ring R N/A c N/A N/A c set_ring R N/A N/A t1 t2 N/A N/A R N/A sin c_expr N/A R N/A cos c_expr N/A N/A N/A N/A N/A t1 t2 N/A N/A R N/A sin c N/A R N/A cos c N/A N/A N/A ValueError N/A N/A N/A DomainError The given series can't be expanded in this domain. N/A p1 N/A p c N/A N/A N/A N/A rs_sin p1 x prec t2 N/A N/A rs_cos p1 x prec t1 N/A N/A N/A N/A len p 20 N/A N/A R ngens 1 N/A N/A t N/A rs_tan N/A p 2 x prec N/A t2 N/A rs_square t x prec N/A p1 N/A rs_series_inversion N/A 1 t2 x prec N/A N/A rs_mul p1 N/A 2 t x prec N/A one N/A R 1 N/A n 1 N/A c N/A 0 N/A k N/A range 2 N/A prec 2 2 N/A N/A N/A N/A c append N/A one n N/A N/A N/A c append 0 N/A n N/A N/A k N/A k 1 N/A N/A rs_series_from_list p c x prec N/A rs_cos N/A N/A p x prec N/A N/A N/A 
    Cosine of a series

    Return the series expansion of the cos of ``p``, about 0.

    Examples
    ========

    >>> from sympy.polys.domains import QQ
    >>> from sympy.polys.rings import ring
    >>> from sympy.polys.ring_series import rs_cos
    >>> R, x, y = ring('x, y', QQ)
    >>> rs_cos(x + x*y, x, 4)
    -1/2*x**2*y**2 - x**2*y - 1/2*x**2 + 1
    >>> rs_cos(x + x*y, x, 4)/x**QQ(7, 5)
    -1/2*x**(3/5)*y**2 - x**(3/5)*y - 1/2*x**(3/5) + x**(-7/5)

    See Also
    ========

    cos
     N/A N/A rs_is_puiseux p x N/A N/A N/A rs_puiseux rs_cos p x prec N/A R N/A p ring N/A c N/A _get_constant_term p x N/A c N/A N/A N/A N/A R domain EX N/A N/A c_expr N/A N/A c as_expr N/A N/A t1 t2 N/A N/A sin c_expr N/A cos c_expr N/A N/A N/A isinstance c PolyElement N/A N/A N/A N/A c_expr N/A N/A c as_expr N/A N/A t1 t2 N/A N/A R N/A sin c_expr N/A R N/A cos c_expr N/A N/A N/A ValueError N/A N/A R N/A N/A R add_gens N/A N/A sin c_expr N/A cos c_expr N/A p N/A N/A p set_ring R N/A x N/A N/A x set_ring R N/A c N/A N/A c set_ring R N/A N/A N/A N/A N/A t1 t2 N/A N/A R N/A sin c N/A R N/A cos c N/A N/A N/A ValueError N/A N/A N/A DomainError The given series can't be expanded in this domain. N/A p1 N/A p c N/A p_cos N/A rs_cos p1 x prec N/A p_sin N/A rs_sin p1 x prec N/A R N/A N/A N/A N/A R compose N/A p_cos ring compose N/A p_sin ring N/A N/A N/A p_cos set_ring R N/A N/A N/A p_sin set_ring R N/A N/A t1 t2 N/A N/A R N/A sin c_expr N/A R N/A cos c_expr N/A N/A N/A p_cos t2 N/A p_sin t1 N/A N/A N/A N/A len p 20 N/A N/A R ngens 1 N/A N/A t N/A rs_tan N/A p 2 x prec N/A t2 N/A rs_square t x prec N/A p1 N/A rs_series_inversion N/A 1 t2 x prec N/A N/A rs_mul p1 N/A 1 t2 x prec N/A one N/A R 1 N/A n 1 N/A c N/A N/A k N/A range 2 N/A prec 2 2 N/A N/A N/A N/A c append N/A one n N/A N/A N/A c append 0 N/A n N/A N/A k N/A k 1 N/A N/A rs_series_from_list p c x prec N/A rs_cos_sin N/A N/A p x prec N/A N/A N/A 
    Return the tuple `(rs\_cos(p, x, prec)`, `rs\_sin(p, x, prec))`.

    Is faster than calling rs_cos and rs_sin separately
     N/A N/A rs_is_puiseux p x N/A N/A N/A rs_puiseux rs_cos_sin p x prec N/A t N/A rs_tan N/A p 2 x prec N/A t2 N/A rs_square t x prec N/A p1 N/A rs_series_inversion N/A 1 t2 x prec N/A N/A N/A rs_mul p1 N/A 1 t2 x prec N/A rs_mul p1 N/A 2 t x prec N/A _atanh N/A N/A p x prec N/A N/A N/A 
    Expansion using formula

    Faster for very small and univariate series
     N/A R N/A p ring N/A one N/A R 1 N/A c N/A one N/A p2 N/A rs_square p x prec N/A k N/A range 1 prec N/A N/A N/A N/A c append N/A one N/A N/A 2 k 1 N/A s N/A rs_series_from_list p2 c x prec N/A s N/A rs_mul s p x prec N/A s N/A rs_atanh N/A N/A p x prec N/A N/A N/A 
    Hyperbolic arctangent of a series

    Return the series expansion of the atanh of ``p``, about 0.

    Examples
    ========

    >>> from sympy.polys.domains import QQ
    >>> from sympy.polys.rings import ring
    >>> from sympy.polys.ring_series import rs_atanh
    >>> R, x, y = ring('x, y', QQ)
    >>> rs_atanh(x + x*y, x, 4)
    1/3*x**3*y**3 + x**3*y**2 + x**3*y + 1/3*x**3 + x*y + x

    See Also
    ========

    atanh
     N/A N/A rs_is_puiseux p x N/A N/A N/A rs_puiseux rs_atanh p x prec N/A R N/A p ring N/A const 0 N/A N/A _has_constant_term p x N/A N/A zm N/A R zero_monom N/A c N/A p N/A zm N/A N/A N/A R domain EX N/A N/A c_expr N/A N/A c as_expr N/A const N/A atanh c_expr N/A N/A N/A isinstance c PolyElement N/A N/A N/A N/A c_expr N/A N/A c as_expr N/A const N/A R N/A atanh c_expr N/A N/A N/A ValueError N/A N/A N/A DomainError The given series can't be expanded in this domain. N/A N/A N/A N/A const N/A R N/A atanh c N/A N/A N/A ValueError N/A N/A N/A DomainError The given series can't be expanded in this domain. N/A dp N/A rs_diff p x N/A p1 N/A N/A N/A rs_square p x prec 1 N/A p1 N/A rs_series_inversion p1 x N/A prec 1 N/A p1 N/A rs_mul dp p1 x N/A prec 1 N/A N/A N/A rs_integrate p1 x const N/A rs_sinh N/A N/A p x prec N/A N/A N/A 
    Hyperbolic sine of a series

    Return the series expansion of the sinh of ``p``, about 0.

    Examples
    ========

    >>> from sympy.polys.domains import QQ
    >>> from sympy.polys.rings import ring
    >>> from sympy.polys.ring_series import rs_sinh
    >>> R, x, y = ring('x, y', QQ)
    >>> rs_sinh(x + x*y, x, 4)
    1/6*x**3*y**3 + 1/2*x**3*y**2 + 1/2*x**3*y + 1/6*x**3 + x*y + x

    See Also
    ========

    sinh
     N/A N/A rs_is_puiseux p x N/A N/A N/A rs_puiseux rs_sinh p x prec N/A t N/A rs_exp p x prec N/A t1 N/A rs_series_inversion t x prec N/A N/A N/A t t1 2 N/A rs_cosh N/A N/A p x prec N/A N/A N/A 
    Hyperbolic cosine of a series

    Return the series expansion of the cosh of ``p``, about 0.

    Examples
    ========

    >>> from sympy.polys.domains import QQ
    >>> from sympy.polys.rings import ring
    >>> from sympy.polys.ring_series import rs_cosh
    >>> R, x, y = ring('x, y', QQ)
    >>> rs_cosh(x + x*y, x, 4)
    1/2*x**2*y**2 + x**2*y + 1/2*x**2 + 1

    See Also
    ========

    cosh
     N/A N/A rs_is_puiseux p x N/A N/A N/A rs_puiseux rs_cosh p x prec N/A t N/A rs_exp p x prec N/A t1 N/A rs_series_inversion t x prec N/A N/A N/A t t1 2 N/A _tanh N/A N/A p x prec N/A N/A N/A 
    Helper function of `rs\_tanh`

    Return the series expansion of tanh of a univariate series using Newton's
    method. It takes advantage of the fact that series expansion of atanh is
    easier than that of tanh.

    See Also
    ========

    _tanh
     N/A R N/A p ring N/A p1 N/A R 0 N/A precx N/A _giant_steps prec N/A N/A tmp N/A p N/A rs_atanh p1 x precx N/A tmp N/A rs_mul tmp N/A 1 N/A rs_square p1 x prec x precx N/A p1 tmp N/A p1 N/A rs_tanh N/A N/A p x prec N/A N/A N/A 
    Hyperbolic tangent of a series

    Return the series expansion of the tanh of ``p``, about 0.

    Examples
    ========

    >>> from sympy.polys.domains import QQ
    >>> from sympy.polys.rings import ring
    >>> from sympy.polys.ring_series import rs_tanh
    >>> R, x, y = ring('x, y', QQ)
    >>> rs_tanh(x + x*y, x, 4)
    -1/3*x**3*y**3 - x**3*y**2 - x**3*y - 1/3*x**3 + x*y + x

    See Also
    ========

    tanh
     N/A N/A rs_is_puiseux p x N/A N/A N/A rs_puiseux rs_tanh p x prec N/A R N/A p ring N/A const 0 N/A N/A _has_constant_term p x N/A N/A zm N/A R zero_monom N/A c N/A p N/A zm N/A N/A N/A R domain EX N/A N/A c_expr N/A N/A c as_expr N/A const N/A tanh c_expr N/A N/A N/A isinstance c PolyElement N/A N/A N/A N/A c_expr N/A N/A c as_expr N/A const N/A R N/A tanh c_expr N/A N/A N/A ValueError N/A N/A N/A DomainError The given series can't be expanded in this domain. N/A N/A N/A N/A const N/A R N/A tanh c N/A N/A N/A ValueError N/A N/A N/A DomainError The given series can't be expanded in this domain. N/A p1 N/A p c N/A t1 N/A rs_tanh p1 x prec N/A t N/A rs_series_inversion N/A 1 N/A const t1 x prec N/A N/A rs_mul N/A const t1 t x prec N/A N/A N/A R ngens 1 N/A N/A N/A _tanh p x prec N/A N/A N/A rs_fun p _tanh x prec N/A rs_newton N/A N/A p x prec N/A N/A N/A 
    Compute the truncated Newton sum of the polynomial ``p``

    Examples
    ========

    >>> from sympy.polys.domains import QQ
    >>> from sympy.polys.rings import ring
    >>> from sympy.polys.ring_series import rs_newton
    >>> R, x = ring('x', QQ)
    >>> p = x**2 - 2
    >>> rs_newton(p, x, 5)
    8*x**4 + 4*x**2 + 2
     N/A deg N/A N/A p degree N/A p1 N/A _invert_monoms p N/A p2 N/A rs_series_inversion p1 x prec N/A p3 N/A rs_mul N/A N/A p1 diff x p2 x prec N/A res N/A deg N/A p3 x N/A res N/A rs_hadamard_exp N/A N/A p1 inverse N/A False N/A N/A 
    Return ``sum f_i/i!*x**i`` from ``sum f_i*x**i``,
    where ``x`` is the first variable.

    If ``invers=True`` return ``sum f_i*i!*x**i``

    Examples
    ========

    >>> from sympy.polys.domains import QQ
    >>> from sympy.polys.rings import ring
    >>> from sympy.polys.ring_series import rs_hadamard_exp
    >>> R, x = ring('x', QQ)
    >>> p = 1 + x + x**2 + x**3
    >>> rs_hadamard_exp(p)
    1/6*x**3 + 1/2*x**2 + x + 1
     N/A R N/A p1 ring N/A N/A N/A R domain QQ N/A N/A NotImplementedError N/A p N/A R zero N/A N/A inverse N/A N/A N/A exp1 v1 N/A N/A p1 items N/A N/A N/A p N/A exp1 N/A v1 N/A int N/A ifac N/A exp1 N/A 0 N/A N/A N/A exp1 v1 N/A N/A p1 items N/A N/A N/A p N/A exp1 N/A v1 N/A int N/A ifac N/A exp1 N/A 0 N/A p N/A rs_compose_add N/A N/A p1 p2 N/A N/A N/A 
    compute the composed sum ``prod(p2(x - beta) for beta root of p1)``

    Examples
    ========

    >>> from sympy.polys.domains import QQ
    >>> from sympy.polys.rings import ring
    >>> from sympy.polys.ring_series import rs_compose_add
    >>> R, x = ring('x', QQ)
    >>> f = x**2 - 2
    >>> g = x**2 - 3
    >>> rs_compose_add(f, g)
    x**4 - 10*x**2 + 1

    References
    ==========

    A. Bostan, P. Flajolet, B. Salvy and E. Schost
    "Fast Computation with Two Algebraic Numbers",
    (2002) Research Report 4579, Institut
    National de Recherche en Informatique et en Automatique
     N/A R N/A p1 ring N/A x N/A N/A R gens N/A 0 N/A prec N/A N/A N/A N/A p1 degree N/A N/A p2 degree 1 N/A np1 N/A rs_newton p1 x prec N/A np1e N/A rs_hadamard_exp np1 N/A np2 N/A rs_newton p2 x prec N/A np2e N/A rs_hadamard_exp np2 N/A np3e N/A rs_mul np1e np2e x prec N/A np3 N/A rs_hadamard_exp np3e True N/A np3a N/A N/A N/A np3 N/A N/A 0 np3 x N/A q N/A rs_integrate np3a x N/A q N/A rs_exp q x prec N/A q N/A _invert_monoms q N/A q N/A N/A N/A q primitive N/A 1 N/A dp N/A N/A N/A N/A p1 degree N/A N/A p2 degree N/A N/A q degree N/A dp N/A N/A q N/A q N/A x dp N/A q N/A N/A _convert_func N/A sin cos exp tan rs_sin rs_cos rs_exp rs_tan rs_min_pow N/A N/A expr series_rs a N/A N/A N/A Find the minimum power of `a` in the series expansion of expr N/A series 0 N/A n 2 N/A N/A series 0 N/A N/A series N/A _rs_series expr series_rs a n N/A n 2 N/A R N/A series ring N/A a N/A R a N/A i N/A N/A N/A R gens index a N/A N/A N/A min series key N/A N/A N/A t N/A N/A t N/A i N/A i N/A _rs_series N/A N/A expr series_rs a prec N/A N/A N/A args N/A expr args N/A R N/A series_rs ring N/A N/A N/A N/A any N/A N/A N/A arg has Function N/A arg args N/A N/A expr is_Function N/A N/A series_rs N/A N/A N/A N/A expr has a N/A N/A series_rs N/A N/A N/A expr is_Function N/A N/A arg N/A args N/A 0 N/A N/A N/A len args 1 N/A N/A NotImplementedError N/A N/A R1 series N/A sring arg domain QQ expand False series True N/A series_inner N/A _rs_series arg series a prec N/A R N/A N/A N/A N/A R compose R1 compose N/A series_inner ring N/A series_inner N/A N/A series_inner set_ring R N/A series N/A N/A eval N/A _convert_func N/A N/A str N/A expr func series_inner N/A R a prec N/A series N/A N/A N/A expr is_Mul N/A N/A n N/A len args N/A arg args N/A N/A N/A N/A arg is_Number N/A N/A N/A R1 _ N/A sring arg expand False series True N/A R N/A N/A R compose R1 N/A min_pows N/A list N/A map rs_min_pow args N/A N/A R arg N/A arg args N/A N/A a N/A len args N/A sum_pows N/A sum min_pows N/A series N/A R 1 N/A i N/A range n N/A N/A _series N/A _rs_series N/A args N/A i N/A R N/A args N/A i a N/A N/A prec sum_pows N/A min_pows N/A i N/A R N/A N/A R compose N/A _series ring N/A _series N/A N/A _series set_ring R N/A series N/A N/A series set_ring R N/A series _series N/A series N/A rs_trunc series N/A R a prec N/A series N/A N/A N/A expr is_Add N/A N/A n N/A len args N/A series N/A R 0 N/A i N/A range n N/A N/A _series N/A _rs_series N/A args N/A i N/A R N/A args N/A i a prec N/A R N/A N/A R compose N/A _series ring N/A _series N/A N/A _series set_ring R N/A series N/A N/A series set_ring R N/A series _series N/A series N/A N/A N/A expr is_Pow N/A N/A N/A R1 _ N/A sring N/A expr base domain QQ expand False series True N/A R N/A N/A R compose R1 N/A series_inner N/A _rs_series N/A expr base N/A R N/A expr base a prec N/A N/A rs_pow series_inner N/A expr exp N/A N/A series_inner ring a prec N/A N/A N/A N/A isinstance expr Expr N/A N/A expr is_constant N/A N/A N/A N/A sring expr domain QQ expand False series True N/A 1 N/A N/A NotImplementedError N/A rs_series N/A N/A expr a prec N/A N/A N/A Return the series expansion of an expression about 0.

    Parameters
    ----------
    expr : :class:`Expr`
    a : :class:`Symbol` with respect to which expr is to be expanded
    prec : order of the series expansion

    Currently supports multivariate Taylor series expansion. This is much
    faster that Sympy's series method as it uses sparse polynomial operations.

    It automatically creates the simplest ring required to represent the series
    expansion through repeated calls to sring.

    Examples
    ========

    >>> from sympy.polys.ring_series import rs_series
    >>> from sympy.functions import sin, cos, exp, tan
    >>> from sympy.core import symbols
    >>> from sympy.polys.domains import QQ
    >>> a, b, c = symbols('a, b, c')
    >>> rs_series(sin(a) + exp(a), a, 5)
    1/24*a**4 + 1/2*a**2 + 2*a + 1
    >>> series = rs_series(tan(a + b)*cos(a + c), a, 2)
    >>> series.as_expr()
    -a*sin(c)*tan(b) + a*cos(c)*tan(b)**2 + a*cos(c) + cos(c)*tan(b)
    >>> series = rs_series(exp(a**QQ(1,3) + a**QQ(2, 5)), a, 1)
    >>> series.as_expr()
    a**(11/15) + a**(4/5)/2 + a**(2/5) + a**(2/3)/2 + a**(1/3) + 1

     N/A N/A R series N/A sring expr domain QQ expand False series True N/A N/A a N/A R symbols N/A N/A R N/A N/A R add_gens N/A a N/A series N/A N/A series set_ring R N/A series N/A _rs_series expr series a prec N/A R N/A series ring N/A gen N/A R a N/A prec_got N/A N/A N/A series degree gen 1 N/A N/A prec_got prec N/A N/A N/A rs_trunc series gen prec N/A N/A more N/A range 1 9 N/A N/A p1 N/A _rs_series expr series a prec N/A prec more N/A gen N/A N/A gen set_ring N/A p1 ring N/A new_prec N/A N/A N/A p1 degree gen 1 N/A N/A new_prec prec_got N/A N/A prec_do N/A ceiling N/A prec N/A N/A N/A prec prec_got more N/A new_prec prec_got N/A p1 N/A _rs_series expr series a prec prec_do N/A N/A N/A N/A N/A p1 degree gen 1 prec N/A N/A p1 N/A _rs_series expr series a prec prec_do N/A gen N/A N/A gen set_ring N/A p1 ring N/A prec_do 2 N/A N/A N/A N/A N/A N/A ValueError N/A Could not calculate %s terms for %s N/A N/A str prec expr N/A N/A rs_trunc p1 gen prec N/A