| 1 | initial version |
The substitution needs to happen in each coefficient.
The following works.
sage: E.<x,y> = ExteriorAlgebra(SR)
sage: _ = var('t')
sage: theta = 3*x+t*y
sage: print "theta =", theta
theta = 3*x + t*y
sage: theta.map_coefficients(lambda x: x.substitute({t:0}))
3*x
| 2 | No.2 Revision |
The substitution needs to happen in each coefficient.
The following works.
sage: E.<x,y> = ExteriorAlgebra(SR)
sage: _ = var('t')
sage: theta = 3*x+t*y
sage: print "theta =", theta
theta = 3*x + t*y
sage: theta.map_coefficients(lambda x: x.substitute({t:0}))
c: c.substitute({t:0}))
3*x
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.