Hi! On May 21, 2:56 am, Alasdair <amc...@gmail.com> wrote: > sage: diff(gamma(x)) > gamma(x)*psi(x) > sage: psi(1) > > NameError: name 'psi' is not defined > > Now is that cheeky or what - Sage giving an answer with a function > which is "not defined"!
Probably I am painting a bike shed here, and some people may consider it a flame bait, but "standard" notation is something I really care about, motivated by my personal history... When I was PhD student in Strasbourg, I hated to see that all the graduate students were in the belief that the standard notations they learnt in their courses are "the" standard notations in mathematics: They reacted quite arrogantly if one didn't stick to their standard notations, and they thought that people who don't know these notations are mathematical illiterates. Only the brighter students found out that their "standard" notations weren't the general standard, as soon as they gave their first talk. I wouldn't tolerate someone saying that one branch of mathematics is important enough to dictate certain notations to all other branches. Epsilon is not always greater than zero. The following is an example that relates to your problem and may illustrate that different branches of mathematics use the same standard notation to mean something completely different: Your function has a gamma(x) in it. The Gamma function is pretty important, so, it makes some sense that it is in the global name space of Sage. However, in mathematics, I only met it in *upper* case, so far! So, naively, my first guess was that the Gamma function is known as Gamma to Sage. But in fact, Gamma is different from gamma: sage: gamma(5) 24 sage: Gamma(5) Congruence Subgroup Gamma(5) And now for psi. From my perspective, "psi" is just used as an everyday name of any odd group homomorphism. Why should "psi" be in the global name space of Sage? And the fact that you constructed some object does of course not mean that it is known under a specific name -- and in general it is not known under the same name that is used for printing. So, if you want to work with "psi", whatever this is, then define it! For example: sage: dg = diff(gamma(x)) sage: psi(x) = dg.operands()[1] sage: psi(x) psi(x) sage: psi(5) -euler_gamma + 25/12 Cheers, Simon -- To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to sage-support+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-support URL: http://www.sagemath.org