Substitution Maps

This object wraps Pynac exmap objects. These encode substitutions of symbolic expressions. The main use of this module is to hook into Pynac’s subs() methods and pass a wrapper for the substitution map back to Python.

class sage.symbolic.substitution_map.SubstitutionMap

Bases: sage.structure.sage_object.SageObject

apply_to(expr, options)

Apply the substitution to a symbolic expression

EXAMPLES:

sage: from sage.symbolic.substitution_map import make_map
sage: subs = make_map({x:x+1})
sage: subs.apply_to(x^2, 0)
(x + 1)^2
sage.symbolic.substitution_map.make_map(subs_dict)

Construct a new substitution map

OUTPUT:

A new SubstitutionMap for doctesting

EXAMPLES:

sage: from sage.symbolic.substitution_map import make_map
sage: make_map({x:x+1})
SubsMap