Re: [sage-support] Is this a bug?
> Users mistake FAR too often symbolics with polynomials Well, of course, and I'm sure rjf would say that Sage developers far too often mistake expressions for functions. But what percentage of users actually know the difference in any case? (Rhetorical.) -- You received this message because you are subscribed to the Google Groups "sage-support" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-support+unsubscr...@googlegroups.com. To post to this group, send email to sage-support@googlegroups.com. Visit this group at https://groups.google.com/group/sage-support. For more options, visit https://groups.google.com/d/optout.
Re: [sage-support] Is this a bug?
> I am mildly in favor of dropping this predefinition (FWIW). > > > Far be it for me to acquire the usual "hobgoblin of little minds" trope, but in this case consistency is probably good. This argument was had ~10 years ago in great detail, with several hilarious variants implemented one after another. This has been pretty stable as a reasonable compromise between usability for bored students and the technical needs of the development crew, and I think one of the very nice things about Sage is that for all the learning curve, at least you can "just do math" with it. Sage cell would not be nearly as useful as Wolfram Alpha without predefined x, for instance. (Now let the attacks begin ...) -- You received this message because you are subscribed to the Google Groups "sage-support" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-support+unsubscr...@googlegroups.com. To post to this group, send email to sage-support@googlegroups.com. Visit this group at https://groups.google.com/group/sage-support. For more options, visit https://groups.google.com/d/optout.
[sage-support] Fwd: Typo in Sage documentation
-- Forwarded message -- From: Philip TurecekDate: Wed, Feb 28, 2018 at 1:47 PM Subject: Typo in Sage documentation To: wst...@sagemath.com Dear Mr Stein, I found a typo in the Sage documentation, at the function period(): http://doc.sagemath.org/html/en/reference/rings_standard/sage/rings/rational.html#sage.rings.rational.Rational.period It should be "In general if d=2^a5^bm where m is coprime to 10" instead of "In general if d=2^a3^bm where m is coprime to 10". Best regards, Philip Turecek -- Best Regards, William Stein CEO, SageMath, Inc. -- You received this message because you are subscribed to the Google Groups "sage-support" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-support+unsubscr...@googlegroups.com. To post to this group, send email to sage-support@googlegroups.com. Visit this group at https://groups.google.com/group/sage-support. For more options, visit https://groups.google.com/d/optout.
Re: [sage-support] Is this a bug?
> On Feb 28, 2018, at 00:09, Dima Pasechnikwrote: > > I would be for dropping 'x' as the only "default" variable (defined at start > time). > Sage is unique in this sense AFAIK; there are CASes which don't require > declaration of any variable, > there are ones that don't have any special variables like Sage's 'x’. I am mildly in favor of dropping this predefinition (FWIW). Also, for this discussion, one can always access the variable by something like this: sage: x=P.variables()[0] Justin -- Justin C. Walker, Curmudgeon-At-Large, Director Institute for the Enhancement of the Director's Income The path of least resistance: it's not just for electricity any more. -- You received this message because you are subscribed to the Google Groups "sage-support" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-support+unsubscr...@googlegroups.com. To post to this group, send email to sage-support@googlegroups.com. Visit this group at https://groups.google.com/group/sage-support. For more options, visit https://groups.google.com/d/optout.
Re: [sage-support] Re: Is this a bug?
Sorry for the noise, it already works fine, just not with characteristic polynomials of symbolic matrices. They messed up my Sage session, so the minpoly example seemed to fail too. -- You received this message because you are subscribed to the Google Groups "sage-support" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-support+unsubscr...@googlegroups.com. To post to this group, send email to sage-support@googlegroups.com. Visit this group at https://groups.google.com/group/sage-support. For more options, visit https://groups.google.com/d/optout.
Re: [sage-support] Re: Is this a bug?
It might not be necessary to (re)assign the global variable. Only if the user wants to do operations with the polynomial he wants an x to be that poly variable, and certainly not another x. So, the parser can do the part of figuring out what x is meant, maybe by checking all generator names. Example: sage: charpoly() x + 1 sage: _ - x (parser sees underscore and operation, and an unassigned global, so it checks the object referred by the underscore for variable names) -- You received this message because you are subscribed to the Google Groups "sage-support" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-support+unsubscr...@googlegroups.com. To post to this group, send email to sage-support@googlegroups.com. Visit this group at https://groups.google.com/group/sage-support. For more options, visit https://groups.google.com/d/optout.
Re: [sage-support] Re: Is this a bug?
On 28 February 2018 at 13:49, Ralf Stephanwrote: > Why should I define x when Sage gives me a polynomial with x, doesn't it > already know it? > > That's what a user would ask and, frankly, s/he would be right. > Here is one reason. In this example: sage: M=Matrix([[1,2,3],[4,5,6],[7,8,9]]) sage: p = M.charpoly() sage: p.parent() Univariate Polynomial Ring in x over Integer Ring sage: p x^3 - 15*x^2 - 18*x sage: x.parent() Symbolic Ring when we see the polynomial displayed we see the variable displayed as x, but there has been no assignment to the python variable 'x' behind the scenes. You are suggesting (it seems) that after computing p here the python variable 'x' should be bound to p.parent().gen(). But it is surely a very Bad Idea for a function to (re)-assign global variables? This would be a source of many bugs. It would probably be less confusing if there was no globally defined 'x' at all as has been suggested earlier in this thread. Then the last line of my example would raise an error, and the documentation could tell users to enter something like 'x = p.parent().gen()' or 'x = p.variables()[0]' (the latter would be better if a method variable() existed for univariate polynomials!). John > -- > You received this message because you are subscribed to the Google Groups > "sage-support" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to sage-support+unsubscr...@googlegroups.com. > To post to this group, send email to sage-support@googlegroups.com. > Visit this group at https://groups.google.com/group/sage-support. > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "sage-support" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-support+unsubscr...@googlegroups.com. To post to this group, send email to sage-support@googlegroups.com. Visit this group at https://groups.google.com/group/sage-support. For more options, visit https://groups.google.com/d/optout.
[sage-support] Re: Is this a bug?
Why should I define x when Sage gives me a polynomial with x, doesn't it already know it? That's what a user would ask and, frankly, s/he would be right. -- You received this message because you are subscribed to the Google Groups "sage-support" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-support+unsubscr...@googlegroups.com. To post to this group, send email to sage-support@googlegroups.com. Visit this group at https://groups.google.com/group/sage-support. For more options, visit https://groups.google.com/d/optout.
[sage-support] Re: Is this a bug?
On 2018-02-28, Ralf Stephanwrote: > On Wednesday, February 28, 2018 at 9:09:04 AM UTC+1, Dima Pasechnik wrote: >> >> I would be for dropping 'x' as the only "default" variable (defined at >> start time). >> > > I agree but does it solve the problem I demonstrated. Can you then add x to > the minpoly? If you define x as the variable of the minpoly, then certainly you can. -- You received this message because you are subscribed to the Google Groups "sage-support" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-support+unsubscr...@googlegroups.com. To post to this group, send email to sage-support@googlegroups.com. Visit this group at https://groups.google.com/group/sage-support. For more options, visit https://groups.google.com/d/optout.
[sage-support] Re: Is this a bug?
On Wednesday, February 28, 2018 at 9:09:04 AM UTC+1, Dima Pasechnik wrote: > > I would be for dropping 'x' as the only "default" variable (defined at > start time). > I agree but does it solve the problem I demonstrated. Can you then add x to the minpoly? -- You received this message because you are subscribed to the Google Groups "sage-support" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-support+unsubscr...@googlegroups.com. To post to this group, send email to sage-support@googlegroups.com. Visit this group at https://groups.google.com/group/sage-support. For more options, visit https://groups.google.com/d/optout.
[sage-support] Re: Is this a bug?
I would be for dropping 'x' as the only "default" variable (defined at start time). Sage is unique in this sense AFAIK; there are CASes which don't require declaration of any variable, there are ones that don't have any special variables like Sage's 'x'. On Wednesday, February 28, 2018 at 8:00:34 AM UTC, Simon King wrote: > > Hi Ralf, > > On 2018-02-28, Ralf Stephanwrote: > > The reason is apparently that the polynomial ring was not created by the > > user on the command line but by the charpoly() code. > > The parent of the pre-defined variable x wasn't created by the user > either, so, please don't blame polynomial rings or the > minpoly()/charpoly() code for it. > > sage: QQbar(sqrt(2)).minpoly().parent() > Univariate Polynomial Ring in x over Rational Field > sage: x.parent() > Symbolic Ring > > > > i would consider this a high priority bug. Is there a ticket? > > Not in the way you think, IMHO. > > One problem that I see is the fact that it is possible to create rings > in which one variable name occurs twice, such as here: > sage: RR['x']['x'] > Univariate Polynomial Ring in x over Univariate Polynomial Ring in x > over Real Field with 53 bits of precision > sage: RR['x'].gen()-RR['x']['x'].gen() > -x + x > sage: _==0 > False > > So, we have two x with different roles. It would make sense to disallow > the creation of such rings. > > Also, I belive it is a bug that x is pre-defined as a symbolic variable; > we should finally drop that pseudo-courtesy. Users mistake FAR too often > symbolics with polynomials; by pre-defining x, we let the users believe > that x is good for *all* computations. So, I believe it would be better > to let the user create x him/herself, for the specific application that > he/she has in mind. However, I am aware that I belong to a minority with > that opinion. > > Best regards, > Simon > > -- You received this message because you are subscribed to the Google Groups "sage-support" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-support+unsubscr...@googlegroups.com. To post to this group, send email to sage-support@googlegroups.com. Visit this group at https://groups.google.com/group/sage-support. For more options, visit https://groups.google.com/d/optout.
[sage-support] Re: Is this a bug?
Hi Ralf, On 2018-02-28, Ralf Stephanwrote: > The reason is apparently that the polynomial ring was not created by the > user on the command line but by the charpoly() code. The parent of the pre-defined variable x wasn't created by the user either, so, please don't blame polynomial rings or the minpoly()/charpoly() code for it. sage: QQbar(sqrt(2)).minpoly().parent() Univariate Polynomial Ring in x over Rational Field sage: x.parent() Symbolic Ring > i would consider this a high priority bug. Is there a ticket? Not in the way you think, IMHO. One problem that I see is the fact that it is possible to create rings in which one variable name occurs twice, such as here: sage: RR['x']['x'] Univariate Polynomial Ring in x over Univariate Polynomial Ring in x over Real Field with 53 bits of precision sage: RR['x'].gen()-RR['x']['x'].gen() -x + x sage: _==0 False So, we have two x with different roles. It would make sense to disallow the creation of such rings. Also, I belive it is a bug that x is pre-defined as a symbolic variable; we should finally drop that pseudo-courtesy. Users mistake FAR too often symbolics with polynomials; by pre-defining x, we let the users believe that x is good for *all* computations. So, I believe it would be better to let the user create x him/herself, for the specific application that he/she has in mind. However, I am aware that I belong to a minority with that opinion. Best regards, Simon -- You received this message because you are subscribed to the Google Groups "sage-support" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-support+unsubscr...@googlegroups.com. To post to this group, send email to sage-support@googlegroups.com. Visit this group at https://groups.google.com/group/sage-support. For more options, visit https://groups.google.com/d/optout.