
    \hE                         S SK Jr  S SKJr  S SKJr   " S S\5      r\" 5       r\S 5       rSS jr	S S	 \	S
4S jr
SS jrS rS rS rg
)    )contextmanager)local
expand_mulc                       \ rS rSrS rSrg)DotProdSimpState   c                     S U l         g Nstate)selfs    P/var/www/auris/envauris/lib/python3.13/site-packages/sympy/matrices/utilities.py__init__DotProdSimpState.__init__   s	    
    r   N)__name__
__module____qualname____firstlineno__r   __static_attributes__ r   r   r   r      s    r   r   c              #      #    [         R                  n U [         l        S v   U[         l        g ! U[         l        f = f7fr   _dotprodsimp_stater   )xolds     r   dotprodsimpr      s3     

"
"C'#$ #& 3 s   ?/ ?<?c                     SSK Jn  U" XS9$ )z;Wrapper for simplify.dotprodsimp to avoid circular imports.r   )r   )withsimp)sympy.simplify.simplifyr   )exprr    dpss      r   _dotprodsimpr$      s    :t''r   c                     U $ r   r   r   s    r   <lambda>r'      s    Qr   c                     U $ r   r   r&   s    r   r'   r'      s    !r   Nc                 n    USL d  [         R                  SL a  U$ USL d  [         R                  SL a  U$ U $ )a  Support function for controlling intermediate simplification. Returns a
simplification function according to the global setting of dotprodsimp
operation.

``deffunc``     - Function to be used by default.
``offfunc``     - Function to be used if dotprodsimp has been turned off.
``onfunc``      - Function to be used if dotprodsimp has been turned on.
``dotprodsimp`` - True, False or None. Will be overridden by global
                  _dotprodsimp_state.state if that is not None.
FTr   )deffuncofffunconfuncr   s       r   _get_intermediate_simpr-      s?     e1775@d066$>Nr   c                     [        U SSU5      $ )zUSame as ``_get_intermediate_simp`` but returns bools instead of functions
by default.FT)r-   )defaultr   s     r   _get_intermediate_simp_boolr0   3   s     "'5$DDr   c                     [        U SS5      $ )zReturns True if x is zero.is_zeroN)getattrr&   s    r   _iszeror4   :   s    1i&&r   c                     [        U 5      S:H  $ )zJTests by expand_mul only, suitable for polynomials and rational
functions.r   r   r&   s    r   _is_zero_after_expand_mulr6   ?   s     a=Ar   c                     SSK Jn  U" U 5      $ )z#Wrapper to avoid circular imports. r   )simplify)r!   r8   )r"   r8   s     r   	_simplifyr9   E   s    0D>r   )F)FN)
contextlibr   	threadingr   sympy.core.functionr   r   r   r   r$   r-   r0   r4   r6   r9   r   r   r   <module>r=      sb    %  *u  &' ' '( $/*E'
r   