# Revision history [back]

You can do, for example :

sage: from sage.symbolic.operators import add_vararg as plus
sage: (x+y).operator() == plus
True

sage: from sage.symbolic.operators import mul_vararg as multiply
sage: (x*y).operator() == multiply
True


You can do, for example define the plus and multiply operators as follows :

sage: from sage.symbolic.operators import add_vararg as plus
sage: (x+y).operator() == plus
True

plus
sage: from sage.symbolic.operators import mul_vararg as multiply                                                                                                                                             multiply


Then,

sage: (x+y).operator() == plus
True

sage: (x*y).operator() == multiply
multiply
True


You can define the plus and multiply operators as follows :

sage: from sage.symbolic.operators import add_vararg as plus
sage: from sage.symbolic.operators import mul_vararg as multiply


Then,

sage: (x+y).operator() == plus
True

sage: (x*y).operator() == multiply
True


Note that the operators are not duplicated, but are the same in memory:

sage: (x+y).operator()
sage: plus
sage: (x+y).operator() is plus
True


You can define the plus and multiply operators as follows :

sage: from sage.symbolic.operators import add_vararg as plus
sage: from sage.symbolic.operators import mul_vararg as multiply


Then,

sage: (x+y).operator() == plus
True

sage: (x*y).operator() == multiply
True


Note that the operators are not duplicated, but are the same in memory:

sage: (x+y).operator()