Module ImportFrom alias alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ClassDef bases NameLoad NameLoad body Expr Str Assign NameStore ListLoad Str FunctionDef arguments args NameParam NameParam defaults vararg kwarg body Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad NameLoad If UnaryOpNot Call NameLoad NameLoad Str body Return NameLoad If Call NameLoad GeneratorExp BoolOpOr CompareNotEq Call NameLoad NameLoad Num CompareIn NameLoad NameLoad comprehension NameStore AttributeLoad NameLoad attr body Raise Call NameLoad Str Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body If AttributeLoad AttributeLoad NameLoad attr attr body Return NameLoad decorator_list FunctionDef arguments args NameParam defaults kwarg body If Call AttributeLoad NameLoad attr Str NameLoad body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad orelse Assign NameStore AttributeLoad NameLoad attr If AttributeLoad AttributeLoad NameLoad attr attr body Return Call AttributeLoad Call AttributeLoad NameLoad attr attr For TupleStore NameStore NameStore Call NameLoad AttributeLoad NameLoad attr body Assign TupleStore NameStore NameStore NameStore NameLoad Assign NameStore BinOpSub NameLoad NameLoad If BoolOpAnd AttributeLoad NameLoad attr CompareEq CompareLt NameLoad Num NameLoad body Assign TupleStore NameStore NameStore TupleLoad BinOpAdd NameLoad Num BinOpSub NameLoad Num Assign NameStore UnaryOpUSub NameLoad If Call NameLoad NameLoad NameLoad body Assign NameStore AttributeLoad NameLoad attr Assign NameStore Call NameLoad NameLoad TupleLoad NameLoad NameLoad NameLoad If CompareIs NameLoad NameLoad body If CompareEq NameLoad AttributeLoad NameLoad attr body Assign NameStore Call AttributeLoad NameLoad attr NameLoad TupleLoad NameLoad NameLoad NameLoad If CompareIsNot NameLoad NameLoad body Return NameLoad Return NameLoad orelse Return Call AttributeLoad NameLoad attr NameLoad SubscriptLoad AttributeLoad NameLoad attr Slice NameLoad Assign NameStore NameLoad If Call AttributeLoad NameLoad attr Str NameLoad body If UnaryOpNot Call NameLoad NameLoad NameLoad body Return Call AttributeLoad NameLoad attr NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str Assign TupleStore NameStore NameStore NameStore NameLoad Assign TupleStore NameStore NameStore NameStore TupleLoad Call NameLoad Str keyword ListLoad NameLoad Call NameLoad Str keyword ListLoad NameLoad Call NameLoad Str keyword ListLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr BinOpPow BinOpAdd BinOpMult NameLoad NameLoad NameLoad UnaryOpUSub NameLoad If BoolOpAnd CompareIsNot NameLoad NameLoad CompareEq NameLoad AttributeLoad NameLoad attr body Assign NameStore BinOpDiv Num BinOpPow SubscriptLoad NameLoad Index NameLoad SubscriptLoad NameLoad Index NameLoad Assign NameStore SubscriptLoad NameLoad Index NameLoad Assign NameStore BinOpAdd BinOpDiv SubscriptLoad NameLoad Index NameLoad SubscriptLoad NameLoad Index NameLoad NameLoad Return Call NameLoad TupleLoad BinOpMult NameLoad Call NameLoad NameLoad NameLoad Call NameLoad CompareGt NameLoad Num CompareGt NameLoad Num TupleLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str If CompareNotIn NameLoad AttributeLoad NameLoad attr body Return AttributeLoad NameLoad attr Assign TupleStore NameStore NameStore TupleLoad AttributeLoad NameLoad attr Call NameLoad AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr Num If NameLoad body Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad If CompareEq Call NameLoad NameLoad Num body Assign TupleStore NameStore NameStore NameStore NameLoad If BoolOpOr CompareIn NameLoad AttributeLoad NameLoad attr CompareIn NameLoad AttributeLoad NameLoad attr body Return NameLoad Assign NameStore Call NameLoad NameLoad NameLoad keyword NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad If CompareNotIn SubscriptLoad NameLoad Index Num AttributeLoad NameLoad attr body Assign NameStore Call AttributeLoad NameLoad attr Return NameLoad orelse Return Call NameLoad Str decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Assign TupleStore NameStore NameStore NameStore SubscriptLoad AttributeLoad NameLoad attr Index Num Assign NameStore Call AttributeLoad NameLoad attr NameLoad BinOpAdd NameLoad NameLoad If CompareEq Call NameLoad AttributeLoad NameLoad attr Num body Assign NameStore SubscriptLoad AttributeLoad NameLoad attr Index Num orelse Assign NameStore Call AttributeLoad NameLoad attr SubscriptLoad AttributeLoad NameLoad attr Slice Num Return Call AttributeLoad Call NameLoad NameLoad TupleLoad NameLoad BinOpAdd NameLoad Num NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body ImportFrom alias Return Call NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str ImportFrom alias alias alias alias alias alias alias alias Assign TupleStore NameStore NameStore Call NameLoad Str keyword NameLoad Assign NameStore SubscriptLoad SubscriptLoad AttributeLoad NameLoad attr Index Num Index Num Assign NameStore SubscriptLoad SubscriptLoad AttributeLoad NameLoad attr Index Num Index Num Assign NameStore SubscriptLoad SubscriptLoad AttributeLoad NameLoad attr Index Num Index Num Assign NameStore AttributeLoad NameLoad attr If CompareGt Call NameLoad AttributeLoad NameLoad attr Num body Raise Call NameLoad Str If BoolOpAnd AttributeLoad NameLoad attr AttributeLoad NameLoad attr body Return AttributeLoad NameLoad attr If CompareIs NameLoad AttributeLoad NameLoad attr body If CompareIs NameLoad AttributeLoad NameLoad attr body Return BoolOpAnd Call AttributeLoad Call NameLoad NameLoad TupleLoad NameLoad Num AttributeLoad NameLoad attr attr Call AttributeLoad Call NameLoad NameLoad TupleLoad NameLoad AttributeLoad NameLoad attr Num attr Assign NameStore Call NameLoad Call AttributeLoad NameLoad attr Dict NameLoad UnaryOpUSub NameLoad Assign NameStore UnaryOpUSub NameLoad Assign NameStore AttributeLoad NameLoad attr Assign NameStore Call NameLoad NameLoad NameLoad If AttributeLoad NameLoad attr body For NameStore AttributeLoad NameLoad attr body If BoolOpOr CompareIs AttributeLoad SubscriptLoad NameLoad Index Num attr NameLoad CompareIs AttributeLoad SubscriptLoad NameLoad Index Num attr NameLoad CompareEq SubscriptLoad NameLoad Index Num NameLoad body Return Call AttributeLoad Call NameLoad SubscriptLoad NameLoad Index Num TupleLoad NameLoad NameLoad NameLoad attr Return AttributeLoad NameLoad attr TryExcept body Assign NameStore Call NameLoad NameLoad NameLoad NameLoad If BoolOpAnd AttributeLoad NameLoad attr CompareIsNot NameLoad AttributeLoad NameLoad attr body Return AttributeLoad NameLoad attr handlers ExceptHandler type NameLoad body Pass TryExcept body Assign NameStore Call NameLoad Call NameLoad NameLoad NameLoad NameLoad If BoolOpAnd AttributeLoad NameLoad attr CompareIsNot NameLoad AttributeLoad NameLoad attr body Return AttributeLoad NameLoad attr handlers ExceptHandler type NameLoad body Pass Assign NameStore Call NameLoad NameLoad TupleLoad NameLoad AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr BinOpPow NameLoad NameLoad If CompareIsNot NameLoad NameLoad body If CompareLt SubscriptLoad NameLoad Index NameLoad Num body Return AttributeLoad NameLoad attr If CompareGt SubscriptLoad NameLoad Index NameLoad Num body Return AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr BinOpPow BinOpDiv Num NameLoad NameLoad If CompareIsNot NameLoad NameLoad body If CompareGt SubscriptLoad NameLoad Index NameLoad Num body Return AttributeLoad NameLoad attr If CompareLt SubscriptLoad NameLoad Index NameLoad Num body Return AttributeLoad NameLoad attr Assign NameStore Call NameLoad BinOpPow Call NameLoad NameLoad BinOpDiv Num NameLoad NameLoad AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr If AttributeLoad NameLoad attr body If CompareLt NameLoad Num body Return AttributeLoad NameLoad attr If CompareGt NameLoad Num body Return AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr BinOpMult BinOpPow Num BinOpAdd NameLoad NameLoad NameLoad If BoolOpAnd UnaryOpNot Call AttributeLoad SubscriptLoad NameLoad Index NameLoad attr NameLoad Call NameLoad SubscriptLoad NameLoad Index NameLoad NameLoad body Return AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr BinOpDiv Num BinOpPow Call NameLoad NameLoad NameLoad If CompareIsNot NameLoad NameLoad body Return AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr BinOpDiv Num BinOpMult NameLoad BinOpPow Call NameLoad NameLoad NameLoad If CompareIsNot NameLoad NameLoad body If CompareGt SubscriptLoad NameLoad Index NameLoad Num body Return AttributeLoad NameLoad attr Return AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr BinOpDiv Num BinOpMult NameLoad BinOpMult Call NameLoad NameLoad BinOpPow Call NameLoad Call NameLoad NameLoad NameLoad If CompareIsNot NameLoad NameLoad body If CompareGt SubscriptLoad NameLoad Index NameLoad Num body Return AttributeLoad NameLoad attr Return AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr BinOpDiv Num BinOpMult BinOpPow NameLoad NameLoad Call NameLoad NameLoad If CompareIsNot NameLoad NameLoad body If CompareGt SubscriptLoad NameLoad Index NameLoad Num body Return AttributeLoad NameLoad attr Return AttributeLoad NameLoad attr If Call NameLoad NameLoad NameLoad body Assign NameStore Call NameLoad NameLoad TupleLoad NameLoad NameLoad NameLoad TryExcept body Assign NameStore Call AttributeLoad NameLoad attr If AttributeLoad NameLoad attr body Return Call NameLoad AttributeLoad NameLoad attr handlers ExceptHandler type NameLoad body Pass If AttributeLoad AttributeLoad NameLoad attr attr body Assign TupleStore NameStore NameStore TupleLoad SubscriptLoad AttributeLoad AttributeLoad NameLoad attr attr Index Num SubscriptLoad AttributeLoad AttributeLoad NameLoad attr attr Index Num Assign NameStore Call NameLoad Str keyword NameLoad FunctionDef arguments args NameParam defaults body TryExcept body Assign NameStore Call NameLoad Call AttributeLoad Call NameLoad NameLoad TupleLoad NameLoad AttributeLoad NameLoad attr NameLoad attr NameLoad AttributeLoad NameLoad attr If AttributeLoad NameLoad attr body Return AttributeLoad NameLoad attr handlers ExceptHandler type NameLoad body Pass decorator_list If Call NameLoad NameLoad NameLoad body Assign NameStore Call NameLoad NameLoad If CompareIsNot NameLoad NameLoad body Return NameLoad If Call NameLoad NameLoad NameLoad body Assign NameStore Call NameLoad NameLoad If CompareIsNot NameLoad NameLoad body Return NameLoad Raise Call NameLoad BinOpMod Str NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Return Call AttributeLoad Call NameLoad Call NameLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr attr decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam defaults Num Num Num NameLoad body Expr Str ImportFrom alias alias ImportFrom alias Assign NameStore Call NameLoad NameLoad Assign NameStore Call NameLoad NameLoad Assign NameStore AttributeLoad NameLoad attr If CompareNotEq Call NameLoad AttributeLoad NameLoad attr Num body Raise Call NameLoad Str Assign TupleStore NameStore NameStore NameStore SubscriptLoad AttributeLoad NameLoad attr Index Num If CompareEq CompareGt NameLoad NameLoad NameLoad body If CompareEq BinOpSub NameLoad NameLoad Num body Return TupleLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign TupleStore NameStore NameStore TupleLoad BinOpAdd NameLoad Num BinOpSub NameLoad Num Assign NameStore UnaryOpUSub NameLoad Assign NameStore AttributeLoad NameLoad attr If NameLoad body If BoolOpAnd AttributeLoad NameLoad attr AttributeLoad NameLoad attr body Assign NameStore Call NameLoad NameLoad BinOpAdd BinOpSub NameLoad NameLoad Num If BoolOpOr UnaryOpNot NameLoad Call AttributeLoad NameLoad attr NameLoad body For NameStore Call NameLoad NameLoad body AugAssignAdd NameStore Call AttributeLoad NameLoad attr NameLoad BinOpAdd NameLoad NameLoad orelse Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad If NameLoad body Assign NameStore CompareLt Call NameLoad Call AttributeLoad NameLoad attr Num NameLoad If CompareEq NameLoad NameLoad body Return TupleLoad NameLoad Call NameLoad NameLoad orelse If UnaryOpNot CompareEq NameLoad NameLoad body Return TupleLoad NameLoad AttributeLoad NameLoad attr AugAssignAdd NameStore NameLoad For NameStore Call NameLoad Num NameLoad body Assign NameStore Call AttributeLoad NameLoad attr NameLoad BinOpAdd NameLoad NameLoad If BoolOpAnd CompareLt Call NameLoad Call AttributeLoad NameLoad attr Num NameLoad CompareNotEq NameLoad Num body Return TupleLoad NameLoad Call NameLoad NameLoad AugAssignAdd NameStore NameLoad If CompareEq BinOpAdd BinOpSub NameLoad NameLoad Num NameLoad body Return TupleLoad NameLoad AttributeLoad NameLoad attr AugAssignAdd NameStore NameLoad Assign NameStore Call NameLoad Str Assign NameStore Call NameLoad Call AttributeLoad NameLoad attr NameLoad NameLoad TupleLoad NameLoad NameLoad NameLoad If NameLoad body Assign NameStore Call AttributeLoad NameLoad attr AugAssignAdd NameStore NameLoad FunctionDef arguments args NameParam defaults body If CompareIs NameLoad AttributeLoad NameLoad attr body Return TupleLoad Call AttributeLoad NameLoad attr NameLoad NameLoad Num Return TupleLoad Call AttributeLoad NameLoad attr NameLoad NameLoad Call AttributeLoad NameLoad attr NameLoad NameLoad decorator_list Assign TupleStore NameStore NameStore Call NameLoad NameLoad Assign NameStore BinOpDiv BinOpAdd NameLoad NameLoad Num Assign NameStore Call AttributeLoad NameLoad attr NameLoad For NameStore Call NameLoad Num BinOpAdd NameLoad Num body Assign TupleStore NameStore NameStore Call NameLoad NameLoad Assign NameStore BinOpMult BinOpDiv Call NameLoad BinOpMult Num NameLoad Call NameLoad BinOpMult Num NameLoad BinOpSub NameLoad NameLoad If BoolOpOr BoolOpAnd NameLoad NameLoad CompareLt Call NameLoad Call AttributeLoad NameLoad attr Num NameLoad CompareGt NameLoad NameLoad body Break AugAssignAdd NameStore NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad Num keyword NameLoad Return TupleLoad BinOpAdd NameLoad NameLoad Call NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults vararg body Expr Str Assign NameStore Call NameLoad NameLoad For TupleStore NameStore NameStore Call NameLoad NameLoad body If UnaryOpNot Call NameLoad NameLoad NameLoad body Assign SubscriptStore NameLoad Index NameLoad Call AttributeLoad NameLoad attr NameLoad Assign NameStore Num Assign NameStore ListLoad For TupleStore NameStore NameStore Call NameLoad AttributeLoad NameLoad attr body Assign NameStore NameLoad If CompareIn NameLoad NameLoad body Assign NameStore UnaryOpUSub NameLoad Assign NameStore TupleLoad SubscriptLoad NameLoad Index Num BinOpAdd SubscriptLoad NameLoad Index Num Num BinOpSub SubscriptLoad NameLoad Index Num Num Expr Call AttributeLoad NameLoad attr NameLoad Return Call NameLoad BinOpMult NameLoad AttributeLoad NameLoad attr NameLoad decorator_list decorator_list FunctionDef arguments args NameParam defaults vararg kwarg body Expr Str Return Call AttributeLoad Call NameLoad NameLoad NameLoad NameLoad attr keyword NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults body Expr Str Assign TupleStore NameStore NameStore NameStore NameLoad Assign NameStore Num For NameStore Call NameLoad NameLoad body AugAssignAdd NameStore BinOpAdd Call AttributeLoad NameLoad attr NameLoad BinOpAdd NameLoad NameLoad Call AttributeLoad NameLoad attr NameLoad BinOpSub NameLoad NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str Assign TupleStore NameStore NameStore NameStore NameLoad If BoolOpOr AttributeLoad NameLoad attr AttributeLoad NameLoad attr body Return NameLoad Assign NameStore Call NameLoad Str Assign NameStore Call AttributeLoad UnaryOpUSub NameLoad attr Call AttributeLoad NameLoad attr NameLoad BinOpAdd NameLoad NameLoad Assign NameStore NameLoad If BoolOpAnd NameLoad CompareIn NameLoad NameLoad body Assign NameStore SubscriptLoad NameLoad Index NameLoad If UnaryOpNot BoolOpAnd AttributeLoad NameLoad attr CompareEq Call AttributeLoad NameLoad attr NameLoad BinOpAdd NameLoad NameLoad UnaryOpUSub NameLoad body Assign NameStore NameLoad If CompareIs NameLoad NameLoad body Assign NameStore Call NameLoad Str TryExcept body Assign NameStore BoolOpOr Call NameLoad BinOpAdd Call AttributeLoad NameLoad attr NameLoad BinOpAdd NameLoad NameLoad NameLoad NameLoad ListLoad handlers ExceptHandler type NameLoad body Return NameLoad Assign NameStore ListComp NameLoad comprehension NameStore NameLoad BoolOpAnd AttributeLoad NameLoad attr AttributeLoad Call AttributeLoad BinOpAdd Call AttributeLoad NameLoad attr NameLoad BinOpAdd NameLoad NameLoad NameLoad attr attr If CompareNotEq Call NameLoad NameLoad Num body Return NameLoad Assign NameStore SubscriptLoad NameLoad Index Num If CompareLt NameLoad Num body Return Call NameLoad NameLoad NameLoad Call NameLoad NameLoad TupleLoad NameLoad NameLoad NameLoad orelse If CompareGt NameLoad Num body Return Call NameLoad NameLoad NameLoad NameLoad TupleLoad NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body ImportFrom alias alias ImportFrom alias Assign TupleStore NameStore NameStore NameStore NameLoad If CompareIs NameLoad AttributeLoad NameLoad attr body Return AttributeLoad NameLoad attr If CompareNotIn NameLoad AttributeLoad NameLoad attr body Return BinOpMult NameLoad BinOpAdd BinOpSub NameLoad NameLoad Num If CompareEq NameLoad NameLoad body Return Call AttributeLoad NameLoad attr NameLoad NameLoad If Call NameLoad NameLoad NameLoad body If UnaryOpNot Call NameLoad GeneratorExp CompareIn NameLoad AttributeLoad SubscriptLoad AttributeLoad NameLoad attr Index Num attr comprehension NameStore AttributeLoad NameLoad attr body Assign NameStore ListLoad For NameStore AttributeLoad NameLoad attr body Assign NameStore Call NameLoad AttributeLoad NameLoad attr NameLoad If CompareIs NameLoad NameLoad body Return NameLoad Expr Call AttributeLoad NameLoad attr TupleLoad NameLoad AttributeLoad NameLoad attr Return Call AttributeLoad NameLoad attr NameLoad If BoolOpAnd Call AttributeLoad NameLoad attr NameLoad Call NameLoad NameLoad SubscriptLoad NameLoad Index Num body Return Call NameLoad NameLoad NameLoad Assign NameStore BinOpSub NameLoad NameLoad Assign NameStore AttributeLoad NameLoad attr If BoolOpAnd NameLoad CompareLt NameLoad Num body Return Call NameLoad NameLoad TupleLoad NameLoad NameLoad NameLoad If Call NameLoad NameLoad NameLoad body Return NameLoad Assign NameStore Call NameLoad Call AttributeLoad NameLoad attr TupleLoad NameLoad NameLoad NameLoad If CompareIsNot NameLoad NameLoad body Return NameLoad If NameLoad body Return Call NameLoad NameLoad TupleLoad NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body ImportFrom alias Assign TupleStore NameStore NameStore NameStore NameLoad Assign NameStore BinOpSub NameLoad NameLoad Return Call NameLoad ListComp Call AttributeLoad NameLoad attr NameLoad BinOpAdd NameLoad NameLoad comprehension NameStore Call NameLoad BinOpAdd NameLoad Num decorator_list FunctionDef arguments args NameParam NameParam defaults body ImportFrom alias alias Assign NameStore NameLoad Assign TupleStore NameStore NameStore NameStore NameLoad If UnaryOpNot Call AttributeLoad NameLoad attr NameLoad body Return BinOpMult NameLoad BinOpAdd BinOpSub NameLoad NameLoad Num If AttributeLoad NameLoad attr body Assign TupleStore NameStore NameStore Call AttributeLoad NameLoad attr If UnaryOpNot Call AttributeLoad NameLoad attr NameLoad body Assign NameStore Call NameLoad NameLoad TupleLoad NameLoad NameLoad NameLoad If NameLoad body Return BinOpMult NameLoad NameLoad If UnaryOpNot Call AttributeLoad NameLoad attr NameLoad body Assign NameStore Call NameLoad NameLoad TupleLoad NameLoad NameLoad NameLoad If NameLoad body Return BinOpMult NameLoad NameLoad TryExcept body Assign NameStore Call NameLoad NameLoad NameLoad handlers ExceptHandler type NameLoad body Pass If AttributeLoad NameLoad attr body Assign TupleStore NameStore NameStore Call AttributeLoad NameLoad attr Assign NameStore Call NameLoad NameLoad NameLoad TupleLoad NameLoad NameLoad NameLoad If NameLoad body Return NameLoad Assign NameStore Call NameLoad NameLoad TupleLoad NameLoad NameLoad NameLoad Assign NameStore Call NameLoad NameLoad TupleLoad NameLoad NameLoad NameLoad If CompareNotIn NameLoad TupleLoad NameLoad NameLoad body Assign NameStore BinOpAdd NameLoad NameLoad If UnaryOpNot CompareIs NameLoad AttributeLoad NameLoad attr body Return NameLoad Assign NameStore Call NameLoad Str Assign NameStore Call AttributeLoad NameLoad attr BinOpPow NameLoad NameLoad If CompareIsNot NameLoad NameLoad body Assign NameStore SubscriptLoad NameLoad Index NameLoad If AttributeLoad NameLoad attr body If CompareGtE NameLoad Num body If BoolOpOr BoolOpAnd CompareIs NameLoad AttributeLoad NameLoad attr UnaryOpNot CompareIs NameLoad AttributeLoad NameLoad attr BoolOpAnd CompareIs NameLoad AttributeLoad NameLoad attr UnaryOpNot CompareIs NameLoad AttributeLoad NameLoad attr body Return AttributeLoad NameLoad attr Return Call AttributeLoad BinOpDiv BinOpSub Call NameLoad BinOpAdd NameLoad Num BinOpAdd NameLoad Num Call NameLoad BinOpAdd NameLoad Num NameLoad BinOpAdd NameLoad Num attr orelse If BoolOpAnd AttributeLoad NameLoad attr CompareGtE NameLoad Num body If CompareEq NameLoad Num body Return BinOpSub Call NameLoad NameLoad Call NameLoad BinOpSub NameLoad Num orelse Return BinOpSub Call NameLoad NameLoad Call NameLoad NameLoad Call NameLoad BinOpSub NameLoad Num Call NameLoad NameLoad If UnaryOpNot BoolOpOr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr body Assign NameStore Call NameLoad Str keyword ListLoad NameLoad Assign NameStore Call NameLoad Str keyword ListLoad NameLoad Assign NameStore Call NameLoad Str keyword ListLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr BinOpPow NameLoad BinOpAdd BinOpMult NameLoad NameLoad NameLoad If CompareIsNot NameLoad NameLoad body Assign NameStore Call AttributeLoad BinOpPow NameLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad BinOpPow NameLoad NameLoad attr NameLoad Assign NameStore BinOpDiv BinOpMult NameLoad BinOpSub BinOpPow NameLoad NameLoad BinOpPow NameLoad BinOpAdd NameLoad Num BinOpSub Num NameLoad Assign NameStore BinOpMult NameLoad BinOpAdd BinOpSub NameLoad NameLoad Num Return Call NameLoad TupleLoad NameLoad Call NameLoad NameLoad AttributeLoad NameLoad attr TupleLoad NameLoad NameLoad Assign NameStore Call NameLoad NameLoad TupleLoad NameLoad NameLoad NameLoad If UnaryOpNot CompareIn NameLoad TupleLoad NameLoad AttributeLoad NameLoad attr body Return NameLoad Return Call NameLoad NameLoad TupleLoad NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str ImportFrom alias ImportFrom alias alias alias alias ImportFrom alias alias If CompareNotEq NameLoad Num body Return Call NameLoad Call AttributeLoad NameLoad attr NameLoad BinOpAdd NameLoad NameLoad NameLoad Num If CompareEq Call AttributeLoad NameLoad attr NameLoad Num Num body If CompareEq Call NameLoad Call AttributeLoad NameLoad attr NameLoad Call NameLoad Str keyword NameLoad keyword NameLoad Num body Return TupleLoad Call NameLoad Num NameLoad Return Call NameLoad Call AttributeLoad NameLoad attr NameLoad BinOpAdd NameLoad Num NameLoad Num Assign NameStore Call NameLoad NameLoad NameLoad If CompareIs NameLoad NameLoad body Return NameLoad Assign TupleStore NameStore NameStore Call NameLoad Call NameLoad NameLoad Assign TupleStore NameStore NameStore Call AttributeLoad NameLoad attr NameLoad Assign TupleStore NameStore NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore ListLoad NameLoad NameLoad Assign NameStore ListLoad NameLoad NameLoad Assign NameStore ListLoad ListLoad ListLoad For NameStore Call NameLoad Num body For NameStore SubscriptLoad NameLoad Index NameLoad body Assign NameStore Num If AttributeLoad NameLoad attr body Assign NameStore AttributeLoad NameLoad attr Assign NameStore AttributeLoad NameLoad attr If UnaryOpNot AttributeLoad NameLoad attr body Return NameLoad Assign NameStore Call NameLoad NameLoad NameLoad If CompareNotEq Call AttributeLoad NameLoad attr Num body Return NameLoad Assign TupleStore NameStore NameStore Call AttributeLoad NameLoad attr AugAssignMult SubscriptStore NameLoad Index NameLoad BinOpPow NameLoad NameLoad AugAssignAdd SubscriptStore NameLoad Index NameLoad BinOpMult ListLoad BinOpDiv NameLoad NameLoad NameLoad Assign NameStore BinOpAdd SubscriptLoad NameLoad Index Num ListLoad Num Assign NameStore SubscriptLoad NameLoad Index Num Assign NameStore BinOpDiv SubscriptLoad NameLoad Index Num SubscriptLoad NameLoad Index Num Assign NameStore Call NameLoad NameLoad NameLoad NameLoad Return TupleLoad BinOpMult Call AttributeLoad NameLoad attr NameLoad Num Call NameLoad NameLoad AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam defaults body ImportFrom alias Assign TupleStore NameStore NameStore NameStore NameLoad If AttributeLoad BinOpSub NameLoad NameLoad attr body Return NameLoad Assign NameStore Call NameLoad NameLoad TupleLoad NameLoad NameLoad NameLoad If CompareNotEq NameLoad AttributeLoad NameLoad attr body If CompareEq NameLoad AttributeLoad NameLoad attr body Assign NameStore Call NameLoad Call AttributeLoad NameLoad attr NameLoad UnaryOpUSub NameLoad NameLoad UnaryOpUSub NameLoad If CompareIsNot NameLoad NameLoad body Return Call NameLoad NameLoad TupleLoad NameLoad NameLoad orelse Assign NameStore Call NameLoad NameLoad NameLoad NameLoad Assign NameStore Call NameLoad NameLoad NameLoad BinOpAdd NameLoad Num If BoolOpOr CompareIs NameLoad NameLoad CompareIs NameLoad NameLoad body Return NameLoad Assign TupleStore TupleStore NameStore NameStore TupleStore NameStore NameStore TupleLoad NameLoad NameLoad Assign NameStore Call NameLoad NameLoad NameLoad If CompareEq NameLoad NameLoad body Return NameLoad Return Call NameLoad TupleLoad BinOpSub NameLoad NameLoad NameLoad TupleLoad NameLoad NameLoad If CompareEq NameLoad AttributeLoad NameLoad attr body Assign NameStore Call NameLoad Call AttributeLoad NameLoad attr NameLoad UnaryOpUSub NameLoad NameLoad Num Assign NameStore Call NameLoad NameLoad NameLoad Num If BoolOpOr CompareIs NameLoad NameLoad CompareIs NameLoad NameLoad body Return NameLoad Assign TupleStore NameStore NameStore NameLoad Assign TupleStore NameStore NameStore NameLoad Assign NameStore Call NameLoad NameLoad NameLoad If CompareEq NameLoad NameLoad body Return NameLoad Return Call NameLoad TupleLoad BinOpAdd NameLoad NameLoad NameLoad TupleLoad NameLoad NameLoad Assign NameStore Call NameLoad NameLoad NameLoad NameLoad If CompareIsNot NameLoad NameLoad body Assign TupleStore NameStore NameStore NameLoad If CompareEq NameLoad NameLoad body If AttributeLoad NameLoad attr body Assign NameStore Call AttributeLoad NameLoad attr NameLoad BinOpAdd Call NameLoad Str keyword NameLoad keyword NameLoad NameLoad If BoolOpOr AttributeLoad NameLoad attr AttributeLoad NameLoad attr body Return AttributeLoad NameLoad attr orelse If AttributeLoad NameLoad attr body Return AttributeLoad NameLoad attr Return NameLoad Return Call NameLoad NameLoad TupleLoad NameLoad NameLoad decorator_list
N/A __future__ print_function division sympy.concrete.expr_with_limits AddWithLimits sympy.concrete.expr_with_intlimits ExprWithIntLimits sympy.core.function Derivative sympy.core.relational Eq sympy.core.singleton S sympy.core.symbol Dummy Wild sympy.core.add Add sympy.calculus.singularities is_decreasing sympy.concrete.gosper gosper_sum sympy.functions.special.zeta_functions zeta sympy.functions.elementary.piecewise Piecewise sympy.logic.boolalg And sympy.polys apart PolynomialError sympy.solvers solve sympy.series.limits limit sympy.series.order O sympy.core.compatibility range sympy.tensor.indexed Idx Sum N/A AddWithLimits ExprWithIntLimits N/A N/A Represents unevaluated summation.

    ``Sum`` represents a finite or infinite series, with the first argument
    being the general form of terms in the series, and the second argument
    being ``(dummy_variable, start, end)``, with ``dummy_variable`` taking
    all integer values from ``start`` through ``end``. In accordance with
    long-standing mathematical convention, the end term is included in the
    summation.

    Finite sums
    ===========

    For finite sums (and sums with symbolic limits assumed to be finite) we
    follow the summation convention described by Karr [1], especially
    definition 3 of section 1.4. The sum:

    .. math::

        \sum_{m \leq i < n} f(i)

    has *the obvious meaning* for `m < n`, namely:

    .. math::

        \sum_{m \leq i < n} f(i) = f(m) + f(m+1) + \ldots + f(n-2) + f(n-1)

    with the upper limit value `f(n)` excluded. The sum over an empty set is
    zero if and only if `m = n`:

    .. math::

        \sum_{m \leq i < n} f(i) = 0  \quad \mathrm{for} \quad  m = n

    Finally, for all other sums over empty sets we assume the following
    definition:

    .. math::

        \sum_{m \leq i < n} f(i) = - \sum_{n \leq i < m} f(i)  \quad \mathrm{for} \quad  m > n

    It is important to note that Karr defines all sums with the upper
    limit being exclusive. This is in contrast to the usual mathematical notation,
    but does not affect the summation convention. Indeed we have:

    .. math::

        \sum_{m \leq i < n} f(i) = \sum_{i = m}^{n - 1} f(i)

    where the difference in notation is intentional to emphasize the meaning,
    with limits typeset on the top being inclusive.

    Examples
    ========

    >>> from sympy.abc import i, k, m, n, x
    >>> from sympy import Sum, factorial, oo, IndexedBase, Function
    >>> Sum(k, (k, 1, m))
    Sum(k, (k, 1, m))
    >>> Sum(k, (k, 1, m)).doit()
    m**2/2 + m/2
    >>> Sum(k**2, (k, 1, m))
    Sum(k**2, (k, 1, m))
    >>> Sum(k**2, (k, 1, m)).doit()
    m**3/3 + m**2/2 + m/6
    >>> Sum(x**k, (k, 0, oo))
    Sum(x**k, (k, 0, oo))
    >>> Sum(x**k, (k, 0, oo)).doit()
    Piecewise((1/(-x + 1), Abs(x) < 1), (Sum(x**k, (k, 0, oo)), True))
    >>> Sum(x**k/factorial(k), (k, 0, oo)).doit()
    exp(x)

    Here are examples to do summation with symbolic indices.  You
    can use either Function of IndexedBase classes:

    >>> f = Function('f')
    >>> Sum(f(n), (n, 0, 3)).doit()
    f(0) + f(1) + f(2) + f(3)
    >>> Sum(f(n), (n, 0, oo)).doit()
    Sum(f(n), (n, 0, oo))
    >>> f = IndexedBase('f')
    >>> Sum(f[n]**2, (n, 0, 3)).doit()
    f[0]**2 + f[1]**2 + f[2]**2 + f[3]**2

    An example showing that the symbolic result of a summation is still
    valid for seemingly nonsensical values of the limits. Then the Karr
    convention allows us to give a perfectly valid interpretation to
    those sums by interchanging the limits according to the above rules:

    >>> S = Sum(i, (i, 1, n)).doit()
    >>> S
    n**2/2 + n/2
    >>> S.subs(n, -4)
    6
    >>> Sum(i, (i, 1, -4)).doit()
    6
    >>> Sum(-i, (i, -3, 0)).doit()
    6

    An explicit example of the Karr summation convention:

    >>> S1 = Sum(i**2, (i, m, m+n-1)).doit()
    >>> S1
    m**2*n + m*n**2 - m*n + n**3/3 - n**2/2 + n/6
    >>> S2 = Sum(i**2, (i, m+n, m-1)).doit()
    >>> S2
    -m**2*n - m*n**2 + m*n - n**3/3 + n**2/2 - n/6
    >>> S1 + S2
    0
    >>> S3 = Sum(i, (i, m, m-1)).doit()
    >>> S3
    0

    See Also
    ========

    summation
    Product, product

    References
    ==========

    .. [1] Michael Karr, "Summation in Finite Terms", Journal of the ACM,
           Volume 28 Issue 2, April 1981, Pages 305-350
           http://dl.acm.org/citation.cfm?doid=322248.322255
    .. [2] http://en.wikipedia.org/wiki/Summation#Capital-sigma_notation
    .. [3] http://en.wikipedia.org/wiki/Empty_sum
     N/A __slots__ N/A is_commutative __new__ N/A N/A cls function N/A symbols assumptions N/A N/A obj N/A N/A AddWithLimits __new__ cls function symbols assumptions N/A N/A N/A hasattr obj limits N/A N/A obj N/A N/A any N/A N/A N/A N/A len l 3 N/A None l N/A l N/A obj limits N/A N/A N/A ValueError Sum requires values for lower and upper bounds. N/A obj N/A _eval_is_zero N/A N/A self N/A N/A N/A N/A N/A self function is_zero N/A N/A True N/A doit N/A N/A self N/A hints N/A N/A N/A N/A hints get deep True N/A N/A f N/A N/A N/A self function doit hints N/A N/A f N/A self function N/A N/A N/A self function is_Matrix N/A N/A N/A N/A N/A N/A self expand doit N/A N/A n limit N/A enumerate N/A self limits N/A N/A N/A i a b limit N/A dif N/A b a N/A N/A N/A dif is_integer N/A N/A dif 0 True N/A N/A N/A a b N/A N/A b 1 N/A a 1 N/A f N/A f N/A N/A isinstance i Idx N/A N/A i N/A i label N/A newf N/A eval_sum f N/A i a b N/A N/A newf None N/A N/A N/A f N/A self function N/A N/A zeta_function N/A N/A self eval_zeta_function f N/A i a b N/A N/A zeta_function None N/A N/A zeta_function N/A self N/A N/A N/A N/A self func f N/A N/A self limits N/A n N/A f newf N/A N/A N/A hints get deep True N/A N/A N/A N/A isinstance f Piecewise N/A N/A N/A N/A f doit hints N/A f N/A eval_zeta_function N/A N/A self f limits N/A N/A N/A 
        Check whether the function matches with the zeta function.
        If it matches, then return a `Piecewise` expression because
        zeta function does not converge unless `s > 1` and `q > 0`
         N/A N/A i a b limits N/A N/A w y z N/A N/A Wild w exclude N/A i N/A Wild y exclude N/A i N/A Wild z exclude N/A i N/A result N/A N/A f match N/A N/A N/A w i y N/A z N/A N/A N/A result None N/A b N/A S Infinity N/A N/A coeff N/A 1 N/A N/A result N/A w N/A result N/A z N/A s N/A result N/A z N/A q N/A N/A N/A result N/A y N/A result N/A w a N/A N/A Piecewise N/A N/A coeff N/A zeta s q N/A And N/A q 0 N/A s 1 N/A self True N/A _eval_derivative N/A N/A self x N/A N/A N/A 
        Differentiate wrt x as long as x is not in the free symbols of any of
        the upper or lower limits.

        Sum(a*b*x, (x, 1, a)) can be differentiated wrt x or b but not `a`
        since the value of the sum is discontinuous in `a`. In a case
        involving a limit variable, the unevaluated derivative is returned.
         N/A N/A x N/A self free_symbols N/A N/A N/A S Zero N/A N/A f limits N/A N/A self function N/A list N/A self limits N/A limit N/A N/A limits pop -1 N/A limits N/A N/A f N/A N/A self func f limits N/A N/A N/A len limit 3 N/A N/A N/A _ a b limit N/A N/A N/A x N/A a free_symbols N/A x N/A b free_symbols N/A N/A None N/A df N/A Derivative f x evaluate True N/A rv N/A N/A self func df limit N/A N/A N/A limit N/A 0 N/A df free_symbols N/A N/A rv N/A N/A rv doit N/A rv N/A N/A N/A NotImplementedError Lower and upper bound expected. N/A _eval_difference_delta N/A N/A self n step N/A N/A N/A N/A k _ upper N/A N/A self args N/A -1 N/A new_upper N/A N/A upper subs n N/A n step N/A N/A N/A len N/A self args 2 N/A N/A f N/A N/A self args N/A 0 N/A N/A f N/A N/A self func N/A N/A self args N/A -1 N/A N/A N/A N/A Sum f N/A k N/A upper 1 new_upper doit N/A _eval_simplify N/A N/A self ratio measure N/A N/A sympy.simplify.simplify sum_simplify N/A N/A sum_simplify self N/A _eval_summation N/A N/A self f x N/A N/A N/A None N/A is_convergent N/A N/A self N/A N/A N/A Checks for the convergence of a Sum.

        We divide the study of convergence of infinite sums and products in
        two parts.

        First Part:
        One part is the question whether all the terms are well defined, i.e.,
        they are finite in a sum and also non-zero in a product. Zero
        is the analogy of (minus) infinity in products as :math:`e^{-\infty} = 0`.

        Second Part:
        The second part is the question of convergence after infinities,
        and zeros in products, have been omitted assuming that their number
        is finite. This means that we only consider the tail of the sum or
        product, starting from some point after which all terms are well
        defined.

        For example, in a sum of the form:

        .. math::

            \sum_{1 \leq i < \infty} \frac{1}{n^2 + an + b}

        where a and b are numbers. The routine will return true, even if there
        are infinities in the term sequence (at most two). An analogous
        product would be:

        .. math::

            \prod_{1 \leq i < \infty} e^{\frac{1}{n^2 + an + b}}

        This is how convergence is interpreted. It is concerned with what
        happens at the limit. Finding the bad terms is another independent
        matter.

        Note: It is responsibility of user to see that the sum or product
        is well defined.

        There are various tests employed to check the convergence like
        divergence test, root test, integral test, alternating series test,
        comparison tests, Dirichlet tests. It returns true if Sum is convergent
        and false if divergent and NotImplementedError if it can not be checked.

        References
        ==========

        .. [1] https://en.wikipedia.org/wiki/Convergence_tests

        Examples
        ========

        >>> from sympy import factorial, S, Sum, Symbol, oo
        >>> n = Symbol('n', integer=True)
        >>> Sum(n/(n - 1), (n, 4, 7)).is_convergent()
        True
        >>> Sum(n/(2*n + 1), (n, 1, oo)).is_convergent()
        False
        >>> Sum(factorial(n)/5**n, (n, 1, oo)).is_convergent()
        False
        >>> Sum(1/n**(S(6)/5), (n, 1, oo)).is_convergent()
        True

        See Also
        ========

        Sum.is_absolutely_convergent()

        Product.is_convergent()
         sympy Interval Integral Limit log symbols Ge Gt simplify N/A N/A p q N/A symbols p q cls Wild N/A sym N/A N/A N/A self limits N/A 0 N/A 0 N/A lower_limit N/A N/A N/A self limits N/A 0 N/A 1 N/A upper_limit N/A N/A N/A self limits N/A 0 N/A 2 N/A sequence_term N/A self function N/A N/A N/A len N/A sequence_term free_symbols 1 N/A N/A N/A NotImplementedError convergence checking for more that one symbol containing series is not handled N/A N/A N/A lower_limit is_finite N/A upper_limit is_finite N/A N/A N/A S true N/A N/A lower_limit N/A S NegativeInfinity N/A N/A N/A upper_limit N/A S Infinity N/A N/A N/A N/A N/A N/A Sum sequence_term N/A sym 0 N/A S Infinity is_convergent N/A N/A N/A Sum sequence_term N/A sym N/A S NegativeInfinity 0 is_convergent N/A sequence_term N/A simplify N/A N/A sequence_term xreplace N/A sym N/A sym N/A lower_limit N/A upper_limit N/A upper_limit N/A S Infinity N/A interval N/A Interval lower_limit upper_limit N/A N/A sequence_term is_Piecewise N/A N/A func_cond N/A sequence_term args N/A N/A N/A N/A N/A N/A func_cond N/A 1 func Ge N/A N/A N/A func_cond N/A 1 func Gt N/A N/A func_cond N/A 1 True N/A N/A N/A N/A N/A Sum N/A func_cond N/A 0 N/A sym lower_limit upper_limit is_convergent N/A N/A S true N/A N/A N/A lim_val N/A limit sequence_term sym upper_limit N/A N/A N/A lim_val is_number N/A lim_val N/A S Zero N/A N/A N/A S false N/A N/A N/A NotImplementedError N/A N/A N/A N/A N/A lim_val_abs N/A limit N/A abs sequence_term sym upper_limit N/A N/A N/A lim_val_abs is_number N/A lim_val_abs N/A S Zero N/A N/A N/A S false N/A N/A N/A NotImplementedError N/A N/A N/A order N/A O sequence_term N/A sym N/A S Infinity N/A p1_series_test N/A N/A N/A order expr match N/A sym p N/A N/A p1_series_test None N/A N/A N/A N/A p1_series_test N/A p -1 N/A N/A N/A S true N/A N/A N/A p1_series_test N/A p -1 N/A N/A N/A S false N/A p2_series_test N/A N/A N/A order expr match N/A N/A 1 sym p N/A N/A p2_series_test None N/A N/A N/A N/A p2_series_test N/A p 1 N/A N/A N/A S true N/A N/A N/A p2_series_test N/A p 1 N/A N/A N/A S false N/A lim N/A Limit N/A N/A abs sequence_term N/A 1 sym sym N/A S Infinity N/A lim_evaluated N/A N/A lim doit N/A N/A lim_evaluated is_number N/A N/A N/A lim_evaluated 1 N/A N/A N/A S true N/A N/A lim_evaluated 1 N/A N/A N/A S false N/A dict_val N/A N/A sequence_term match N/A N/A -1 N/A sym p q N/A N/A N/A N/A N/A N/A dict_val N/A p has sym N/A is_decreasing N/A dict_val N/A q interval N/A N/A N/A S true N/A log_test N/A N/A N/A order expr match N/A 1 N/A N/A log sym p N/A N/A log_test None N/A N/A N/A S false N/A log_n_test N/A N/A N/A order expr match N/A 1 N/A sym N/A N/A log sym p N/A N/A log_n_test None N/A N/A N/A N/A log_n_test N/A p 1 N/A N/A N/A S true N/A N/A S false N/A log_log_n_test N/A N/A N/A order expr match N/A 1 N/A sym N/A N/A log sym N/A N/A log N/A log sym p N/A N/A log_log_n_test None N/A N/A N/A N/A log_log_n_test N/A p 1 N/A N/A N/A S true N/A N/A S false N/A n_log_test N/A N/A N/A order expr match N/A 1 N/A N/A sym p N/A log sym N/A N/A n_log_test None N/A N/A N/A N/A n_log_test N/A p 1 N/A N/A N/A S true N/A N/A S false N/A N/A is_decreasing sequence_term interval N/A N/A integral_val N/A Integral sequence_term N/A sym lower_limit upper_limit N/A N/A N/A integral_val_evaluated N/A N/A integral_val doit N/A N/A integral_val_evaluated is_number N/A N/A N/A S N/A integral_val_evaluated is_finite N/A N/A N/A NotImplementedError N/A N/A N/A N/A N/A order expr is_Mul N/A N/A N/A a_n b_n N/A N/A N/A N/A order expr args N/A 0 N/A N/A N/A order expr args N/A 1 N/A m N/A Dummy m integer True _dirichlet_test N/A N/A g_n N/A N/A N/A N/A N/A ing_val N/A limit N/A N/A N/A Sum g_n N/A sym N/A interval inf m doit m N/A S Infinity N/A N/A ing_val is_finite N/A N/A N/A S true N/A N/A N/A NotImplementedError N/A N/A N/A N/A N/A is_decreasing a_n interval N/A N/A dirich1 N/A _dirichlet_test b_n N/A N/A dirich1 None N/A N/A dirich1 N/A N/A is_decreasing b_n interval N/A N/A dirich2 N/A _dirichlet_test a_n N/A N/A dirich2 None N/A N/A dirich2 N/A N/A NotImplementedError N/A The algorithm to find the Sum convergence of %s is not yet implemented sequence_term N/A is_absolutely_convergent N/A N/A self N/A N/A N/A 
        Checks for the absolute convergence of an infinite series.

        Same as checking convergence of absolute value of sequence_term of
        an infinite series.

        References
        ==========

        .. [1] https://en.wikipedia.org/wiki/Absolute_convergence

        Examples
        ========

        >>> from sympy import Sum, Symbol, sin, oo
        >>> n = Symbol('n', integer=True)
        >>> Sum((-1)**n, (n, 1, oo)).is_absolutely_convergent()
        False
        >>> Sum((-1)**n/n**2, (n, 1, oo)).is_absolutely_convergent()
        True

        See Also
        ========

        Sum.is_convergent()
         N/A N/A N/A N/A Sum N/A abs N/A self function N/A self limits is_convergent N/A euler_maclaurin N/A N/A self m n eps eval_integral N/A 0 0 0 True N/A N/A 
        Return an Euler-Maclaurin approximation of self, where m is the
        number of leading terms to sum directly and n is the number of
        terms in the tail.

        With m = n = 0, this is simply the corresponding integral
        plus a first-order endpoint correction.

        Returns (s, e) where s is the Euler-Maclaurin approximation
        and e is the estimated error (taken to be the magnitude of
        the first omitted term in the tail):

            >>> from sympy.abc import k, a, b
            >>> from sympy import Sum
            >>> Sum(1/k, (k, 2, 5)).doit().evalf()
            1.28333333333333
            >>> s, e = Sum(1/k, (k, 2, 5)).euler_maclaurin()
            >>> s
            -log(2) + 7/20 + log(5)
            >>> from sympy import sstr
            >>> print(sstr((s.evalf(), e.evalf()), full_prec=True))
            (1.26629073187415, 0.0175000000000000)

        The endpoints may be symbolic:

            >>> s, e = Sum(1/k, (k, a, b)).euler_maclaurin()
            >>> s
            -log(a) + log(b) + 1/(2*b) + 1/(2*a)
            >>> e
            Abs(1/(12*b**2) - 1/(12*a**2))

        If the function is a polynomial of degree at most 2n+1, the
        Euler-Maclaurin formula becomes exact (and e = 0 is returned):

            >>> Sum(k, (k, 2, b)).euler_maclaurin()
            (b**2/2 + b/2 - 1, 0)
            >>> Sum(k, (k, 2, b)).doit()
            b**2/2 + b/2 - 1

        With a nonzero eps specified, the summation is ended
        as soon as the remainder term is less than the epsilon.
         sympy.functions bernoulli factorial sympy.integrals Integral N/A m N/A int m N/A n N/A int n N/A f N/A self function N/A N/A N/A len N/A self limits 1 N/A N/A N/A ValueError More than 1 limit N/A N/A i a b N/A N/A self limits N/A 0 N/A N/A N/A a b True N/A N/A N/A N/A a b 1 N/A N/A N/A N/A S Zero N/A S Zero N/A N/A a b N/A N/A b 1 N/A a 1 N/A f N/A f N/A s N/A S Zero N/A m N/A N/A N/A N/A b is_Integer N/A a is_Integer N/A N/A m N/A min m N/A N/A b a 1 N/A N/A N/A eps N/A N/A f is_polynomial i N/A N/A k N/A range m N/A N/A s N/A N/A f subs i N/A a k N/A N/A term N/A N/A f subs i a N/A term N/A N/A test N/A N/A abs N/A N/A term evalf 3 eps N/A N/A test True N/A N/A N/A s N/A abs term N/A N/A N/A N/A test False N/A N/A N/A term N/A S Zero N/A s term N/A k N/A range 1 m N/A N/A term N/A N/A f subs i N/A a k N/A N/A N/A N/A abs N/A N/A term evalf 3 eps N/A term 0 N/A N/A N/A s N/A abs term N/A s term N/A N/A N/A N/A b a 1 m N/A N/A N/A s N/A S Zero N/A a m N/A x N/A Dummy x N/A I N/A Integral N/A N/A f subs i x N/A x a b N/A eval_integral N/A N/A I N/A N/A I doit N/A s I fpoint N/A N/A expr N/A N/A N/A N/A b N/A S Infinity N/A N/A N/A N/A N/A expr subs i a 0 N/A N/A N/A N/A expr subs i a N/A N/A expr subs i b N/A N/A N/A fa fb N/A fpoint f N/A iterm N/A N/A fa fb 2 N/A g N/A N/A f diff i N/A k N/A range 1 N/A n 2 N/A N/A N/A ga gb N/A fpoint g N/A term N/A N/A N/A bernoulli N/A 2 k N/A factorial N/A 2 k N/A gb ga N/A N/A N/A eps term N/A N/A abs N/A N/A term evalf 3 eps N/A k n N/A N/A N/A s term N/A g N/A N/A g diff i 2 simplify False N/A N/A N/A s iterm N/A abs term N/A reverse_order N/A N/A self N/A indices N/A N/A 
        Reverse the order of a limit in a Sum.

        Usage
        =====

        ``reverse_order(self, *indices)`` reverses some limits in the expression
        ``self`` which can be either a ``Sum`` or a ``Product``. The selectors in
        the argument ``indices`` specify some indices whose limits get reversed.
        These selectors are either variable names or numerical indices counted
        starting from the inner-most limit tuple.

        Examples
        ========

        >>> from sympy import Sum
        >>> from sympy.abc import x, y, a, b, c, d

        >>> Sum(x, (x, 0, 3)).reverse_order(x)
        Sum(-x, (x, 4, -1))
        >>> Sum(x*y, (x, 1, 5), (y, 0, 6)).reverse_order(x, y)
        Sum(x*y, (x, 6, 0), (y, 7, -1))
        >>> Sum(x, (x, a, b)).reverse_order(x)
        Sum(-x, (x, b + 1, a - 1))
        >>> Sum(x, (x, a, b)).reverse_order(0)
        Sum(-x, (x, b + 1, a - 1))

        While one should prefer variable names when specifying which limits
        to reverse, the index counting notation comes in handy in case there
        are several symbols with the same name.

        >>> S = Sum(x**2, (x, a, b), (x, c, d))
        >>> S
        Sum(x**2, (x, a, b), (x, c, d))
        >>> S0 = S.reverse_order(0)
        >>> S0
        Sum(-x**2, (x, b + 1, a - 1), (x, c, d))
        >>> S1 = S0.reverse_order(1)
        >>> S1
        Sum(x**2, (x, b + 1, a - 1), (x, d + 1, c - 1))

        Of course we can mix both notations:

        >>> Sum(x*y, (x, a, b), (y, 2, 5)).reverse_order(x, 1)
        Sum(x*y, (x, b + 1, a - 1), (y, 6, 1))
        >>> Sum(x*y, (x, a, b), (y, 2, 5)).reverse_order(y, x)
        Sum(x*y, (x, b + 1, a - 1), (y, 6, 1))

        See Also
        ========

        index, reorder_limit, reorder

        References
        ==========

        .. [1] Michael Karr, "Summation in Finite Terms", Journal of the ACM,
               Volume 28 Issue 2, April 1981, Pages 305-350
               http://dl.acm.org/citation.cfm?doid=322248.322255
         N/A l_indices N/A list indices N/A N/A i indx N/A enumerate l_indices N/A N/A N/A N/A isinstance indx int N/A N/A N/A l_indices N/A i N/A N/A self index indx N/A e 1 N/A limits N/A N/A N/A i limit N/A enumerate N/A self limits N/A N/A l limit N/A N/A i l_indices N/A N/A e N/A e N/A l N/A N/A limit N/A 0 N/A N/A limit N/A 2 1 N/A N/A limit N/A 1 1 N/A N/A N/A limits append l N/A N/A Sum N/A e N/A self function limits N/A N/A summation N/A N/A f N/A symbols kwargs N/A N/A 
    Compute the summation of f with respect to symbols.

    The notation for symbols is similar to the notation used in Integral.
    summation(f, (i, a, b)) computes the sum of f with respect to i from a to b,
    i.e.,

    ::

                                    b
                                  ____
                                  \   `
        summation(f, (i, a, b)) =  )    f
                                  /___,
                                  i = a

    If it cannot compute the sum, it returns an unevaluated Sum object.
    Repeated sums can be computed by introducing additional symbols tuples::

    >>> from sympy import summation, oo, symbols, log
    >>> i, n, m = symbols('i n m', integer=True)

    >>> summation(2*i - 1, (i, 1, n))
    n**2
    >>> summation(1/2**i, (i, 0, oo))
    2
    >>> summation(1/log(n)**n, (n, 2, oo))
    Sum(log(n)**(-n), (n, 2, oo))
    >>> summation(i, (i, 0, n), (n, 0, m))
    m**3/6 + m**2/2 + m/3

    >>> from sympy.abc import x
    >>> from sympy import factorial
    >>> summation(x**n/factorial(n), (n, 0, oo))
    exp(x)

    See Also
    ========

    Sum
    Product, product

     N/A N/A N/A N/A Sum f symbols kwargs doit deep False N/A telescopic_direct N/A N/A L R n limits N/A N/A N/A Returns the direct summation of the terms of a telescopic sum

    L is the term with lower index
    R is the term with higher index
    n difference between the indexes of L and R

    For example:

    >>> from sympy.concrete.summations import telescopic_direct
    >>> from sympy.abc import k, a, b
    >>> telescopic_direct(1/k, -1/(k+2), 2, (k, a, b))
    -1/(b + 2) - 1/(b + 1) + 1/(a + 1) + 1/a

     N/A N/A i a b limits N/A s 0 N/A m N/A range n N/A N/A s N/A N/A N/A L subs i N/A a m N/A N/A R subs i N/A b m N/A s N/A telescopic N/A N/A L R limits N/A N/A N/A Tries to perform the summation using the telescopic property

    return None if not possible
     N/A N/A i a b limits N/A N/A N/A L is_Add N/A R is_Add N/A N/A None N/A k N/A Wild k N/A sol N/A N/A N/A R match N/A N/A L subs i N/A i k N/A s None N/A N/A sol N/A k sol N/A N/A s N/A sol N/A k N/A N/A N/A N/A s is_Integer N/A N/A N/A L subs i N/A i s N/A R N/A N/A s None N/A N/A s None N/A N/A m N/A Dummy m N/A N/A N/A sol N/A N/A solve N/A N/A N/A L subs i N/A i m R m N/A N/A N/A N/A NotImplementedError N/A N/A None N/A sol N/A si N/A si sol N/A N/A si is_Integer N/A N/A N/A N/A N/A N/A L subs i N/A i si R expand is_zero N/A N/A N/A len sol 1 N/A N/A None N/A s N/A sol N/A 0 N/A N/A s 0 N/A N/A N/A telescopic_direct R L N/A abs s N/A i a b N/A N/A N/A s 0 N/A N/A N/A telescopic_direct L R s N/A i a b N/A eval_sum N/A N/A f limits N/A N/A sympy.concrete.delta deltasummation _has_simple_delta sympy.functions KroneckerDelta N/A N/A i a b limits N/A N/A f N/A S Zero N/A N/A N/A S Zero N/A N/A i N/A f free_symbols N/A N/A N/A f N/A N/A b a 1 N/A N/A a b N/A N/A N/A N/A f subs i a N/A N/A isinstance f Piecewise N/A N/A N/A N/A any N/A N/A i N/A N/A N/A arg args N/A 1 free_symbols N/A arg N/A f args N/A N/A newargs N/A N/A arg N/A f args N/A N/A newexpr N/A eval_sum N/A arg expr limits N/A N/A newexpr None N/A N/A None N/A N/A N/A newargs append N/A newexpr N/A arg cond N/A N/A N/A f func newargs N/A N/A N/A N/A f has KroneckerDelta N/A _has_simple_delta f N/A limits N/A 0 N/A N/A N/A deltasummation f limits N/A dif N/A b a N/A definite N/A dif is_Integer N/A N/A definite N/A dif 100 N/A N/A N/A eval_sum_direct f N/A i a b N/A N/A isinstance f Piecewise N/A N/A None N/A value N/A eval_sum_symbolic N/A N/A f expand N/A i a b N/A N/A value None N/A N/A value N/A definite N/A N/A N/A eval_sum_direct f N/A i a b N/A eval_sum_direct N/A N/A expr limits N/A N/A sympy.core Add N/A N/A i a b limits N/A dif N/A b a N/A N/A Add N/A N/A N/A expr subs i N/A a j N/A j N/A range N/A dif 1 N/A eval_sum_symbolic N/A N/A f limits N/A N/A sympy.functions harmonic bernoulli N/A f_orig f N/A N/A i a b limits N/A N/A N/A N/A f has i N/A N/A N/A f N/A N/A b a 1 N/A N/A f is_Mul N/A N/A N/A L R N/A N/A f as_two_terms N/A N/A N/A N/A L has i N/A N/A sR N/A eval_sum_symbolic R N/A i a b N/A sR N/A N/A N/A L sR N/A N/A N/A N/A R has i N/A N/A sL N/A eval_sum_symbolic L N/A i a b N/A sL N/A N/A N/A R sL N/A N/A N/A f N/A apart f i N/A N/A N/A PolynomialError N/A N/A N/A N/A f is_Add N/A N/A N/A L R N/A N/A f as_two_terms N/A lrsum N/A telescopic L R N/A i a b N/A lrsum N/A N/A lrsum N/A lsum N/A eval_sum_symbolic L N/A i a b N/A rsum N/A eval_sum_symbolic R N/A i a b N/A N/A None N/A lsum rsum N/A N/A r N/A lsum rsum N/A N/A N/A r N/A S NaN N/A N/A r N/A n N/A Wild n N/A result N/A N/A f match N/A i n N/A N/A result None N/A N/A n N/A result N/A n N/A N/A n is_Integer N/A N/A N/A n 0 N/A N/A N/A N/A N/A b N/A S Infinity N/A N/A a N/A S NegativeInfinity N/A N/A a N/A S NegativeInfinity N/A N/A b N/A S Infinity N/A N/A N/A S Infinity N/A N/A N/A N/A N/A N/A bernoulli N/A n 1 N/A b 1 N/A bernoulli N/A n 1 a N/A n 1 expand N/A N/A N/A N/A a is_Integer N/A a 1 N/A N/A N/A n -1 N/A N/A N/A N/A harmonic b N/A harmonic N/A a 1 N/A N/A N/A N/A harmonic b N/A abs n N/A harmonic N/A a 1 N/A abs n N/A N/A N/A N/A N/A a has N/A S Infinity N/A S NegativeInfinity N/A N/A b has N/A S Infinity N/A S NegativeInfinity N/A N/A c1 N/A Wild c1 exclude N/A i N/A c2 N/A Wild c2 exclude N/A i N/A c3 N/A Wild c3 exclude N/A i N/A e N/A N/A f match N/A c1 N/A N/A c2 i c3 N/A N/A e None N/A N/A p N/A N/A N/A c1 c3 subs e N/A q N/A N/A N/A c1 c2 subs e N/A r N/A N/A p N/A N/A q a N/A q N/A b 1 N/A 1 q N/A l N/A p N/A N/A b a 1 N/A N/A Piecewise N/A l N/A Eq q N/A S One N/A r True N/A r N/A gosper_sum f N/A i a b N/A N/A N/A r N/A None N/A S NaN N/A N/A r N/A N/A eval_sum_hyper f_orig N/A i a b N/A _eval_sum_hyper N/A N/A f i a N/A N/A N/A  Returns (res, cond). Sums from a to oo.  sympy.functions hyper sympy.simplify hyperexpand hypersimp fraction simplify sympy.polys.polytools Poly factor N/A N/A a 0 N/A N/A N/A _eval_sum_hyper N/A N/A f subs i N/A i a i 0 N/A N/A N/A N/A f subs i 0 0 N/A N/A N/A N/A simplify N/A N/A f subs i N/A Dummy i integer True positive True 0 N/A N/A N/A N/A S 0 True N/A N/A _eval_sum_hyper N/A N/A f subs i N/A i 1 i 0 N/A hs N/A hypersimp f i N/A N/A hs None N/A N/A None N/A N/A numer denom N/A fraction N/A factor hs N/A N/A top topl N/A N/A numer as_coeff_mul i N/A N/A bot botl N/A N/A denom as_coeff_mul i N/A ab N/A top bot N/A factors N/A topl botl N/A params N/A N/A N/A N/A k N/A range 2 N/A N/A fac N/A factors N/A k N/A N/A mul 1 N/A N/A fac is_Pow N/A N/A mul N/A fac exp N/A fac N/A fac base N/A N/A N/A mul is_Integer N/A N/A None N/A p N/A Poly fac i N/A N/A N/A N/A p degree 1 N/A N/A None N/A N/A m n N/A N/A p all_coeffs N/A N/A ab N/A k N/A m mul N/A N/A params N/A k N/A N/A N/A n m mul N/A ap N/A N/A params N/A 0 N/A 1 N/A bq N/A params N/A 1 N/A x N/A N/A ab N/A 0 N/A ab N/A 1 N/A h N/A hyper ap bq x N/A N/A N/A N/A N/A f subs i 0 N/A hyperexpand h N/A h convergence_statement N/A eval_sum_hyper N/A N/A f i_a_b N/A N/A sympy.logic.boolalg And N/A N/A i a b i_a_b N/A N/A N/A b a is_Integer N/A N/A None N/A old_sum N/A Sum f N/A i a b N/A N/A b N/A S Infinity N/A N/A N/A a N/A S NegativeInfinity N/A N/A res N/A _eval_sum_hyper N/A N/A f subs i N/A i i N/A b N/A N/A res None N/A N/A N/A Piecewise res N/A old_sum True N/A N/A res1 N/A _eval_sum_hyper f i a N/A res2 N/A _eval_sum_hyper f i N/A b 1 N/A N/A N/A res1 None N/A res2 None N/A N/A None N/A N/A N/A res1 cond1 N/A res2 cond2 N/A res1 res2 N/A cond N/A And cond1 cond2 N/A N/A cond False N/A N/A None N/A N/A Piecewise N/A N/A res1 res2 cond N/A old_sum True N/A N/A a N/A S NegativeInfinity N/A N/A res1 N/A _eval_sum_hyper N/A N/A f subs i N/A i i 1 N/A res2 N/A _eval_sum_hyper f i 0 N/A N/A N/A res1 None N/A res2 None N/A N/A None N/A N/A res1 cond1 res1 N/A N/A res2 cond2 res2 N/A cond N/A And cond1 cond2 N/A N/A cond False N/A N/A None N/A N/A Piecewise N/A N/A res1 res2 cond N/A old_sum True N/A res N/A _eval_sum_hyper f i a N/A N/A res None N/A N/A N/A r c res N/A N/A c False N/A N/A N/A r is_number N/A N/A f N/A N/A f subs i N/A N/A Dummy i integer True positive True a N/A N/A N/A f is_positive N/A f is_zero N/A N/A N/A S Infinity N/A N/A N/A f is_negative N/A N/A N/A S NegativeInfinity N/A None N/A N/A Piecewise res N/A old_sum True N/A