freeze, thaw
replace an expression by a name
Calling Sequence
Parameters
Description
Examples
freeze(expr)
thaw(var)
expr
-
the expression to be ``frozen''
var
the ``frozen'' variable
freeze replaces its argument, expr (not a complex or real numeric constant, a name, or a string), with a name of the form freeze/R0, freeze/R1, ...
To return the original expression the thaw function must be used.
This can be used to prevent parts of an expression from being subjected to the effects of symbolic manipulation.
z≔freeze⁡x+y
z≔freeze/R0
thaw⁡z
x+y
e≔cos⁡2⁢x+sin⁡a+b
expand⁡e
2⁢cos⁡x2−1+sin⁡a⁢cos⁡b+cos⁡a⁢sin⁡b
subs⁡2⁢x=freeze⁡2⁢x,e
cos⁡freeze/R1+sin⁡a+b
expand⁡
cos⁡freeze/R1+sin⁡a⁢cos⁡b+cos⁡a⁢sin⁡b
thaw⁡
cos⁡2⁢x+sin⁡a⁢cos⁡b+cos⁡a⁢sin⁡b
See Also
frontend
Download Help Document