ó
    ‰*£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    ÚU/home/mande/repo/quber/.venv/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Ñ7¸5Ò@ØˆØ�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   € ä�1�i Ó&Ð&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   