(d, **kwargs)
Full simultaneous exact substitution

    Example
    =======

    >>> from sympy.strategies.tools import subs
    >>> from sympy import Basic
    >>> mapping = {1: 4, 4: 1, Basic(5): Basic(6, 7)}
    >>> expr = Basic(1, Basic(2, 3), Basic(4, Basic(5)))
    >>> subs(mapping)(expr)
    Basic(4, Basic(2, 3), Basic(1, Basic(6, 7)))
Full simultaneous exact substitution
Full simultaneous exact substitution
def subs(d, **kwargs):
    """ Full simultaneous exact substitution

    Example
    =======

    >>> from sympy.strategies.tools import subs
    >>> from sympy import Basic
    >>> mapping = {1: 4, 4: 1, Basic(5): Basic(6, 7)}
    >>> expr = Basic(1, Basic(2, 3), Basic(4, Basic(5)))
    >>> subs(mapping)(expr)
    Basic(4, Basic(2, 3), Basic(1, Basic(6, 7)))
    """
    if d:
        return top_down(do_one(*map(rl.subs, *zip(*d.items()))), **kwargs)
    else:
        return lambda x: x
def subs ( d , * * kwargs ) : if d : return top_down ( do_one ( * map ( rl . subs , * zip ( * d . items ( ) ) ) ) , * * kwargs ) else : return lambda x : x