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