+
    ‹°³j­  ã                   ón   € ^ RI HtHtHtHt ^ RIHt ^ RIHt ^ RI	H
t
Ht ^ RIHt ^ RIHtHt R tR tR	# )
é    )ÚFunctionÚPowÚsympifyÚExpr)Ú
Relational)ÚS)ÚPolyÚ	decompose)Ú	func_name)ÚMinÚMaxc                ó   a€ \        V 4      p \        V \        4      '       d   \        V \        4      '       d   \	        R\        V 4      ,          4      hSV P                  9  d   V .# \        V \        \        34      '       d€   V P                  '       d-   V P                  \        P                  8X  d   V P                  pMV P                  ^ ,          pVS8X  d   V .# V P                  VS4      .\!        VS4      ,           # \        V \"        \$        34      '       dÀ   \'        V P                  4      pRp\)        V4       Fp  w  rVVP+                  S4      '       g   K  \!        VS4      p\-        V4      ^8X  d   S.V,           pVf   VR,          pMVR,          V8w  d   S.p MV^ ,          W5&   Kr  	  X^ ,          S8X  d   V .# V P.                  ! V!  .V,           # \1        V 4      p\'        \3        V3R lVP4                  4      4      p	\-        V	4      ^8X  dE   V	^ ,          S8w  d7   V P                  V	^ ,          S4      p
V	^ ,          pV
.\!        VS4      ,           #  \7        V 4      #   \8         d    T .u # i ; i)aå  
Computes General functional decomposition of ``f``.
Given an expression ``f``, returns a list ``[f_1, f_2, ..., f_n]``,
where::
          f = f_1 o f_2 o ... f_n = f_1(f_2(... f_n))

Note: This is a General decomposition function. It also decomposes
Polynomials. For only Polynomial decomposition see ``decompose`` in polys.

Examples
========

>>> from sympy.abc import x
>>> from sympy import decompogen, sqrt, sin, cos
>>> decompogen(sin(cos(x)), x)
[sin(x), cos(x)]
>>> decompogen(sin(x)**2 + sin(x) + 1, x)
[x**2 + x + 1, sin(x)]
>>> decompogen(sqrt(6*x**2 - 5), x)
[sqrt(x), 6*x**2 - 5]
>>> decompogen(sin(sqrt(cos(x**2 + 1))), x)
[sin(x), sqrt(x), cos(x), x**2 + 1]
>>> decompogen(x**4 + 2*x**3 - x - 1, x)
[x**2 - x - 1, x**2 + x]

zexpecting Expr but got: `%s`N:é   NNc                 ó"   <€ SV P                   9   # )N)Úfree_symbols)ÚxÚsymbols   &€ÚY/home/luca/screen-checking/.venv/lib/python3.14/site-packages/sympy/solvers/decompogen.pyÚ<lambda>Údecompogen.<locals>.<lambda>M   s   ø€  ¨1¯>©>Ò!9ó    )r   Ú
isinstancer   r   Ú	TypeErrorr   r   r   r   Úis_PowÚbaser   ÚExp1ÚexpÚargsÚsubsÚ
decompogenr   r   ÚlistÚ	enumerateÚhas_freeÚlenÚfuncr	   ÚfilterÚgensr
   Ú
ValueError)Úfr   Úargr   Úd0ÚiÚaÚdÚfpr'   Úf1Úf2s   &f          r   r    r    	   s  ø€ ô6 	�‹
€AÜ�aœ×Ò¤*¨Q´
×";Ò";ÜÐ6¼À1»ÕEÓFÐFØ�Q—^‘^Ô#Øˆsˆ
ô �!”h¤�_×%Ò%Ø�8�8ˆ8˜Ÿ™¤!§&¡&Ô(Ø—%‘%‰Cà—&‘&˜•)ˆCØ�&Œ=Ø�3ˆJØ—‘�s˜FÓ#Ð$¤z°#°vÓ'>Õ>Ð>ô �!”cœ3�Z× Ò Ü�A—F‘F‹|ˆØˆÜ˜d–O‰DˆAØ—:‘:˜f×%Ò%ÙÜ˜1˜fÓ%ˆAÜ�1‹v˜Œ{Ø�H˜q•L�ØŠzØ�r•U‘Ø�2•˜"”ð �H�ÙØ˜•dˆD‹Gñ $ð ˆQ�4�6Œ>Ø�3ˆJØ—’˜‘ˆ Õ#Ð#ô 
ˆa‹€BÜ”Ô9¸2¿7¹7ÓCÓD€Dä
ˆ4ƒy�A„~˜$˜q�' VÔ+Ø�V‰V�D˜•G˜VÓ$ˆØ�!�WˆØˆt”j  VÓ,Õ,Ð,ðÜ˜‹|ÐøÜô ØˆsŠ
ðús   É!
I, É,I=É<I=c                óÌ   € \        V 4      ^8X  d
   V ^ ,          # V ^ ,          P                  W^,          4      p\        V 4      ^8X  d   V# \        V.V R,          ,           V4      # )aØ  
Returns the composition of functions.
Given a list of functions ``g_s``, returns their composition ``f``,
where:
    f = g_1 o g_2 o .. o g_n

Note: This is a General composition function. It also composes Polynomials.
For only Polynomial composition see ``compose`` in polys.

Examples
========

>>> from sympy.solvers.decompogen import compogen
>>> from sympy.abc import x
>>> from sympy import sqrt, sin, cos
>>> compogen([sin(x), cos(x)], x)
sin(cos(x))
>>> compogen([x**2 + x + 1, sin(x)], x)
sin(x)**2 + sin(x) + 1
>>> compogen([sqrt(x), 6*x**2 - 5], x)
sqrt(6*x**2 - 5)
>>> compogen([sin(x), sqrt(x), cos(x), x**2 + 1], x)
sin(sqrt(cos(x**2 + 1)))
>>> compogen([x**2 - x - 1, x**2 + x], x)
-x**2 - x + (x**2 + x)**2 - 1
:é   NN)r$   r   Úcompogen)Úg_sr   Úfoos   && r   r4   r4   [   sU   € ô6 ˆ3ƒx�1„}Ø�1�vˆà
ˆa�&�+‰+�f !�fÓ
%€Cä
ˆ3ƒx�1„}Øˆ
ä�S�E˜C �G•O VÓ,Ð,r   N)Ú
sympy.corer   r   r   r   Úsympy.core.relationalr   Úsympy.core.singletonr   Úsympy.polysr	   r
   Úsympy.utilities.miscr   Ú(sympy.functions.elementary.miscellaneousr   r   r    r4   © r   r   Ú<module>r>      s&   ðß 5Ó 5Ý ,Ý "ß 'Ý *ß =òOôd#-r   