On Friday, May 1, 2015 at 2:00:11 AM UTC-7, Eric Gourgoulhon wrote: > Thanks for your answer. There is no predefined 'H' function in Sage, so do > you mean a nameclash with a predefined function 'H' in Pynac ? Which > function is it ? It seems to be (x,y) |--> - x ln(1-xy), but I don't see > why this function is special and would deserve a predefined name. >
Most probably these (from http://www.ginac.de/tutorial/#Built_002din-functions ): G(a, y)multiple polylogarithm G(a, s, y)multiple polylogarithm with explicit signs for the imaginary parts S(n, p, x)Nielsen’s generalized polylogarithm H(m, x)harmonic polylogarithm This is clearly a problem in sage: we're not exposing these polylogs under those names at all, and even for "sin" we do seem to support having new, symbolic, user functions with that name (which will collide as soon as you step into libmaxima or anything else that has to communicate function identifiers by names in a flat namespace). The fact that we don't in pickling is clearly a problem. In order to change it we'd need to either change ginac's serialization (remove the assumption that functions can be identified by their name) or change to a serialization process that stays closer to python's pickling protocol. This would be more future-proof: symbolic pickling at the moment is very opaque: sage: explain_pickle(dumps(sin(x))) pg_Expression = unpickle_global('sage.symbolic.expression', 'Expression') si = unpickle_newobj(pg_Expression, ()) unpickle_build(si, (0r, ['x'], 'GARC\x03\tfunction\x00class\x00symbol\x00x\x00name\x00seq\x00python\x00sin\x00sage_ex\x00\x01\x08\x01\x02\x02\n\x02"\x03\x04\n\x00+\x001\x00"\x07')) si We're entirely at the mercy of the care that Pynac takes to preserve compatibility to ensure our pickles won't break on future versions (and I don't know if such compatibility is a design goal for them). With python pickling, we have plenty examples where compatibility across major changes was preserved. -- You received this message because you are subscribed to the Google Groups "sage-devel" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+unsubscr...@googlegroups.com. To post to this group, send email to sage-devel@googlegroups.com. Visit this group at http://groups.google.com/group/sage-devel. For more options, visit https://groups.google.com/d/optout.