| 1 | initial version |
Well, in Python, when you write
g[0] = x^2
this means that the element 0 in the list g, which was initialized to g_0, is replaced x^2. The symbolic variable g_0 remains unchanged; simply it is no longer the element 0 of g:
sage: g = list(var('g_%d' % i) for i in range(4))
sage: g
[g_0, g_1, g_2, g_3]
sage: g[0] = x^2
sage: g
[x^2, g_1, g_2, g_3]
sage: g_0
g_0
In particular, g_0 is still there in d_00. If you want to replace it by x^2, you have to run d[0][0] [eU, 2, 0] = g[0] again:
sage: d[0][0] [eU, 2, 0] = g[0]
sage: d[0][0].display(eU)
d_00 = -x^2 dx/\dX
| 2 | No.2 Revision |
Well, in Python, when you write
g[0] = x^2
this means that the element 0 in the list g, which was initialized to g_0, is replaced by x^2. The symbolic variable g_0 remains unchanged; simply it is no longer the element 0 of g:
sage: g = list(var('g_%d' % i) for i in range(4))
sage: g
[g_0, g_1, g_2, g_3]
sage: g[0] = x^2
sage: g
[x^2, g_1, g_2, g_3]
sage: g_0
g_0
In particular, g_0 is still there in d_00. If you want to replace it by x^2, you have to run d[0][0] [eU, 2, 0] = g[0] again:
sage: d[0][0] [eU, 2, 0] = g[0]
sage: d[0][0].display(eU)
d_00 = -x^2 dx/\dX
Copyright Sage, 2010. Some rights reserved under creative commons license. Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.