Open a46d73b2-c70f-469a-b7c4-f2ca845e72d5 opened 9 years ago
Possibly related to #17503 (pickled symbolic function breaks maxima interface)
Replying to @sagetrac-wonder:
Possibly related to #17503 (pickled symbolic function breaks maxima interface)
Indeed, I suspect it's related in the sense that pickling of symbolic expressions seems to rely entirely one Pynac serialization and doesn't take into account the properties of the python objects involved. In particular, the difference between a callable and a normal symbolic expression seems to lie entirely in the parent:
sage: var('u_0 u_1 x y')
(u_0, u_1, x, y)
sage: f2u = (1 - u_0).function(u_0, u_1)
sage: parent(f2u)
Callable function ring with arguments (u_0, u_1)
sage: parent(f2u(u_0,u_1))
Symbolic Ring
sage: f2u(u_0,u_1).__reduce_ex__(2) == f2u.__reduce_ex__(2) #this confirms that they pickle to the same.
True
The pickle process appears to forget whether an expression is a function.
Since I'm using a modular program design with intermediate results in .sobj files, this (along with some other bugs I've reported) is making it inconvenient for me to work with functions...
Component: pickling
Issue created by migration from https://trac.sagemath.org/ticket/17558