ToInert - Maple Help

Online Help

All Products    Maple    MapleSim

Home : Support : Online Help : Programming : Resource Management : ToInert


conversion to an inert representation


conversion from an inert representation


Calling Sequence



Thread Safety


Calling Sequence

ToInert( expr, exclude = { ... }, include = { ... } )

FromInert( inert_expr )







valid Inert representation



specifies a list or set of tags not to convert to inert form



specifies the complete list or set of tags to convert to inert form



It can be difficult to manipulate some Maple expressions because they may change form during evaluation.  Therefore, it is useful to convert an active form of an expression into an inert form that can be freely modified without worry of evaluation.  Once the changes are made, the expression can be converted back to an active form.


The ToInert routine converts any Maple expression into an inert form.  The FromInert routine converts any valid inert representation back to an active Maple object.


Inert forms closely mirror the Maple internal DAG data structure representation. For example, the expression xy is stored internally as a power of the name x and the name y.  The inert representation is a series of embedded function calls with "_Inert_XXX" names describing the structure of the given expression.  There are some differences between the internal representation and the inert representation, mostly in the cases of sums and products, as the internal representation is designed for fast polynomial arithmetic as opposed to convenient programmatic manipulation. For the exact internal representation, see dismantle.


For a list of the various Maple DAGs, refer to the Appendix in the Maple Programming Guide.


The exclude and include options to ToInert allow you to prevent inertization of certain expressions.  If an identifier is part of the exclude list then whenever that kind of expression is encountered, an _Inert_VERBATIM tag is created containing the raw expression. Similarly, an include list restricts the tags to only those mentioned in the list.  You are allowed either an exclude list, or an include list, not both.


Some expressions cannot be explicitly excluded.  Usually this happens for objects that do not make sense on their own (for example, a _Inert_HASHPAIR outside a _Inert_TABLE), or because they cannot be represented outside their context (for example, _INERT_NARGS).  Additionally, the _Inert_PROD tag may appear during expansion of a series or a SDMPolynom. Expressions that contain references to parameters and locals also cannot be excluded.

Thread Safety


The ToInert and FromInert commands are thread-safe as of Maple 15.


For more information on thread safety, see index/threadsafe.


Inspect structure of 5x.




In a procedure, find all the global names that have no attributes.

f := proc(x) ASSERT(type(x,integer)); ifactor(x) end proc;

f:=procxASSERTtypex,integer;ifactorxend proc





Rename the local variable i to j.

g := proc() local i; end proc;

g:=proclocali;end proc






new_g:=proclocalj;end proc


Convert to the inert form the expansion of (x+y)^10 without applying ToInert on products.




See Also






Download Help Document

Was this information helpful?

Please add your Comment (Optional)
E-mail Address (Optional)
What is ? This question helps us to combat spam