
    Ed                     J    d Z ddlmZ ddlmZ ddlmZmZmZ efdZ	efdZ
dS )	z) Branching Strategies to Traverse a Tree     )product)	basic_fns   )chainidentitydo_onec                 T     t          t           t                     fd          S )z< Apply a rule down a tree running it on the top nodes first c                 R     t          t                              |           S N)salltop_down)exprbrulefnss    @lib/python3.11/site-packages/sympy/strategies/branch/traverse.py<lambda>ztop_down.<locals>.<lambda>   s&    =d8E3#7#7==dCC     )r   r   r   )r   r   s   ``r   r   r      s4    x((CCCCCE E Er   c                 V     t          |j        d          \   fd}|S )z$ Strategic all - apply rule to args )opnewchildrenleafc              3      K    |           r| V  d S  |           }t          t           |                      }|D ]} |g|R  V  d S r   )r   map)	r   myopargssargsr   r   r   r   r   s	       r   all_rlzsall.<locals>.all_rl   s      4:: 	'JJJJJ2d88DS778E ' 'c$&&&&&&&&' 'r   )r   get)r   r   r   r   r   r   r   s   `  @@@@r   r   r      sV    !#'+LMMBXt' ' ' ' ' ' ' ' ' Mr   N)__doc__	itertoolsr   sympy.strategies.utilr   corer   r   r   r   r    r   r   <module>r%      s    / /       + + + + + + ) ) ) ) ) ) ) ) ) )! E E E E
       r   