[sage-support] Change default power operator output to '**' rather than '^' .

2020-05-01 Thread John Atom
If I define a function: f(x) = x**2 and then print it, sage always prints it as `x^2`. Is it possible to change the default output of the power operator to '**' ? I'd like to use Sage to create and manipulate functions, but then copy the output to other python applications that do not recog

[sage-support] Re: defining (partial) inverse image of a ring homomorphism

2020-05-01 Thread Markus Wageringel
Am Mittwoch, 11. März 2020 03:43:18 UTC+1 schrieb Nils Bruin: > > I think the general way (which should be pretty performant for such a nice > example) is to do it via reduction wrt. the graph ideal: > > sage: R.=PolynomialRing(QQ,order="degrevlex(2),degrevlex(3)") > sage: I=R.ideal([x-u^2,y-u*v,

[sage-support] Re: Change default power operator output to '**' rather than '^' .

2020-05-01 Thread Nils Bruin
On Friday, May 1, 2020 at 12:30:10 PM UTC-7, John Atom wrote: > > If I define a function: > > f(x) = x**2 > > and then print it, sage always prints it as `x^2`. > > Is it possible to change the default output of the power operator to '**' > ? > I suspect it will be hard, because these "^" are

[sage-support] Re: Change default power operator output to '**' rather than '^' .

2020-05-01 Thread John Atom
That works. Thank you. On Friday, May 1, 2020 at 4:26:47 PM UTC-6, Nils Bruin wrote: > > On Friday, May 1, 2020 at 12:30:10 PM UTC-7, John Atom wrote: >> >> If I define a function: >> >> f(x) = x**2 >> >> and then print it, sage always prints it as `x^2`. >> >> Is it possible to change the defa