� ��gX��D�ddlmZddlmZmZmZddlmZd�Zd�Z d�Z dS)�)�rl)�do_one�exhaust�switch)�top_downc ��|rBttttjgt |�����R��fi|��Sd�S)az Full simultaneous exact substitution. Examples ======== >>> from sympy.strategies.tools import subs >>> from sympy import Basic, S >>> mapping = {S(1): S(4), S(4): S(1), Basic(S(5)): Basic(S(6), S(7))} >>> expr = Basic(S(1), Basic(S(2), S(3)), Basic(S(4), Basic(S(5)))) >>> subs(mapping)(expr) Basic(4, Basic(2, 3), Basic(1, Basic(6, 7))) c��|S)N�)�xs �f/home/asafur/pinokio/api/open-webui.git/app/env/lib/python3.11/site-packages/sympy/strategies/tools.py�<lambda>zsubs.<locals>.<lambda>s����)rr�mapr�subs�zip�items)�d�kwargss r rrsM�� �����B�G� >�c�1�7�7�9�9�o� >� >� >�?�J�J�6�J�J�J��{�rc �^�tttt|���fi|����S)z� Strategy for canonicalization. Explanation =========== Apply each rule in a bottom_up fashion through the tree. Do each one in turn. Keep doing this until there is no change. )rrr)�rulesrs r �canonrs.�� �8�G�F�E�N�3�3�>�>�v�>�>� ?� ?�?rc�,�tt|��S)al Apply rules based on the expression type inputs: ruletypes -- a dict mapping {Type: rule} Examples ======== >>> from sympy.strategies import rm_id, typed >>> from sympy import Add, Mul >>> rm_zeros = rm_id(lambda x: x==0) >>> rm_ones = rm_id(lambda x: x==1) >>> remove_idents = typed({Add: rm_zeros, Mul: rm_ones}) )r�type)� ruletypess r �typedr&s�� �$� � "� "�"rN) �r�corerrr�traverserrrrr rr �<module>rs���������)�)�)�)�)�)�)�)�)�)����������& @� @� @�#�#�#�#�#r
Memory