+
    ‹°³jïf ã                   óî  € R t ^ RIHtHtHt ^ RIHtHtHtH	t	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Ht ^ RIHtHtHt ^ R	IH t H!t! ^ R
I"H#t# ^ RI$H%t%H&t&H't' ^ RI(H)t)H*t*H+t+H,t,H-t-H.t. ^ RI/H0t0 ^ RI1H2t2H3t3 ^ RI4H5t5 ^ RI6H7t7 ^ RI8H9t9 ^ RI:H;t; ^ RI<H=t=H>t> ^ RI?H@t@ ^ RIAHBtB ^ RICHDtD ^ RIEHFtF ^ RIGHHtH ^ RIIHJtJ ^ RIKHLtL ^ RIMHNtN ^ RIOHPtP ^ RIQHRtR ^RISHTtTHUtUHVtV ^RIWHXtXHYtYHZtZH[t[ R  t\R! t] ! R" R#4      t^ ! R$ R%4      t_ ! R& R'4      t`R;R) lta^ R(R*]=3R+ ltb]! R,4      tcR-sdR-se^ R.IfHgtg R<R/ lthR=R0 ltiR1 tjR2 tkR3 tlR4 tmR5 tnR>R6 lto^ R-R-]=R*3R7 ltpR*]=3R8 ltq]=3R9 ltrR?R: ltsR-# )@zL
This module implements Holonomic Functions and
various operations on them.
)ÚAddÚMulÚPow)ÚNaNÚInfinityÚNegativeInfinityÚFloatÚIÚpiÚequal_valuedÚ
int_valued)ÚS)Úordered)ÚDummyÚSymbol)Úsympify)ÚbinomialÚ	factorialÚrf)Ú	exp_polarÚexpÚlog)ÚcoshÚsinh)Úsqrt)ÚcosÚsinÚsinc)ÚCiÚShiÚSiÚerfÚerfcÚerfi)Úgamma)ÚhyperÚmeijerg)Ú	meijerint)ÚMatrix)ÚPolyElement)ÚFracElement)ÚQQÚRR)ÚDMF)Úroots)ÚPoly)ÚDomainMatrix)Ússtr)Úlimit)ÚOrder)Úhyperexpand)Ú	nsimplify)Úsolve)ÚHolonomicSequenceÚRecurrenceOperatorÚRecurrenceOperators)ÚNotPowerSeriesErrorÚNotHyperSeriesErrorÚSingularityErrorÚNotHolonomicErrorc                 ó®   a € V 3R  lpS P                  V4      w  r4VP                  ^ ,          pV! ^V34      V,          pW6,           P                  4       pV# )c                 óF   <€ \         P                  ! V SP                  4      # ©N)r0   ÚonesÚdomain)ÚshapeÚrs   &€ÚZ/home/luca/screen-checking/.venv/lib/python3.14/site-packages/sympy/holonomic/holonomic.pyÚ<lambda>Ú(_find_nonzero_solution.<locals>.<lambda>+   s   ø€ œ×*Ò*¨5°!·(±(Ô;ó    )Ú_solverC   Ú	transpose)rD   ÚhomosysrA   Ú
particularÚ	nullspaceÚnullityÚnullpartÚsols   f&      rE   Ú_find_nonzero_solutionrQ   *   sP   ø€ Ü;€DØŸH™H WÓ-Ñ€JØ�o‰o˜aÕ €GÙ�Q˜�LÓ! IÕ-€HØÕ ×
+Ñ
+Ó
-€CØ€JrH   c                ó2   € \        W4      pW"P                  3# )aQ  
This function is used to create annihilators using ``Dx``.

Explanation
===========

Returns an Algebra of Differential Operators also called Weyl Algebra
and the operator for differentiation i.e. the ``Dx`` operator.

Parameters
==========

base:
    Base polynomial ring for the algebra.
    The base polynomial ring is the ring of polynomials in :math:`x` that
    will appear as coefficients in the operators.
generator:
    Generator of the algebra which can
    be either a noncommutative ``Symbol`` or a string. e.g. "Dx" or "D".

Examples
========

>>> from sympy import ZZ
>>> from sympy.abc import x
>>> from sympy.holonomic.holonomic import DifferentialOperators
>>> R, Dx = DifferentialOperators(ZZ.old_poly_ring(x), 'Dx')
>>> R
Univariate Differential Operator Algebra in intermediate Dx over the base ring ZZ[x]
>>> Dx*x
(1) + (x)*Dx
)ÚDifferentialOperatorAlgebraÚderivative_operator)ÚbaseÚ	generatorÚrings   && rE   ÚDifferentialOperatorsrX   4   s   € ôD ' tÓ7€DØ×*Ñ*Ð+Ð+rH   c                   ó:   a € ] tR t^Zt o RtR tR t]tR tRt	V t
R# )rS   a:  
An Ore Algebra is a set of noncommutative polynomials in the
intermediate ``Dx`` and coefficients in a base polynomial ring :math:`A`.
It follows the commutation rule:

.. math ::
   Dxa = \sigma(a)Dx + \delta(a)

for :math:`a \subset A`.

Where :math:`\sigma: A \Rightarrow A` is an endomorphism and :math:`\delta: A \rightarrow A`
is a skew-derivation i.e. :math:`\delta(ab) = \delta(a) b + \sigma(a) \delta(b)`.

If one takes the sigma as identity map and delta as the standard derivation
then it becomes the algebra of Differential Operators also called
a Weyl Algebra i.e. an algebra whose elements are Differential Operators.

This class represents a Weyl Algebra and serves as the parent ring for
Differential Operators.

Examples
========

>>> from sympy import ZZ
>>> from sympy import symbols
>>> from sympy.holonomic.holonomic import DifferentialOperators
>>> x = symbols('x')
>>> R, Dx = DifferentialOperators(ZZ.old_poly_ring(x), 'Dx')
>>> R
Univariate Differential Operator Algebra in intermediate Dx over the base ring
ZZ[x]

See Also
========

DifferentialOperator
c                ó   € Wn         \        VP                  VP                  .V 4      V n        Vf   \        RRR7      V n        R # \        V\        4      '       d   \        VRR7      V n        R # \        V\
        4      '       d	   W n        R # R # )NÚDxF)Úcommutative)	rU   ÚDifferentialOperatorÚzeroÚonerT   r   Ú
gen_symbolÚ
isinstanceÚstr)ÚselfrU   rV   s   &&&rE   Ú__init__Ú$DifferentialOperatorAlgebra.__init__�   sn   € àŒ	ä#7Ø�Y‰Y˜Ÿ™Ð! 4ó$)ˆÔ ð ÒÜ$ T°uÔ=ˆDŽOä˜)¤S×)Ò)Ü"(¨ÀÔ"F�–Ü˜I¤v×.Ò.Ø"+–ñ /rH   c                óŠ   € R \        V P                  4      ,           R,           V P                  P                  4       ,           pV# )z9Univariate Differential Operator Algebra in intermediate z over the base ring )r1   r`   rU   Ú__str__)rc   Ústrings   & rE   rg   Ú#DifferentialOperatorAlgebra.__str__�   s<   € ØLÜ�4—?‘?Ó#õ$Ø&<õ=à�Y‰Y×ÑÓ!õ"ˆð ˆrH   c                óv   € V P                   VP                   8H  ;'       d    V P                  VP                  8H  # r@   )rU   r`   ©rc   Úothers   &&rE   Ú__eq__Ú"DifferentialOperatorAlgebra.__eq__™   s3   € Ø�y‰y˜EŸJ™JÑ&÷ 3ð 3Ø�‰ %×"2Ñ"2Ñ2ð	3rH   )rU   rT   r`   N)Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__rd   rg   Ú__repr__rm   Ú__static_attributes__Ú__classdictcell__©Ú__classdict__s   @rE   rS   rS   Z   s&   ø‡ € ñ$òL,òð €H÷3ð 3rH   rS   c                   óx   a € ] tR t^žt o Rt^tR tR tR tR t	]	t
R tR tR tR	 tR
 tR t]tR tR tRtV tR# )r]   až  
Differential Operators are elements of Weyl Algebra. The Operators
are defined by a list of polynomials in the base ring and the
parent ring of the Operator i.e. the algebra it belongs to.

Explanation
===========

Takes a list of polynomials for each power of ``Dx`` and the
parent ring which must be an instance of DifferentialOperatorAlgebra.

A Differential Operator can be created easily using
the operator ``Dx``. See examples below.

Examples
========

>>> from sympy.holonomic.holonomic import DifferentialOperator, DifferentialOperators
>>> from sympy import ZZ
>>> from sympy import symbols
>>> x = symbols('x')
>>> R, Dx = DifferentialOperators(ZZ.old_poly_ring(x),'Dx')

>>> DifferentialOperator([0, 1, x**2], R)
(1)*Dx + (x**2)*Dx**2

>>> (x*Dx*x + 1 - Dx**2)**2
(2*x**2 + 2*x + 1) + (4*x**3 + 2*x**2 - 4)*Dx + (x**4 - 6*x - 2)*Dx**2 + (-2*x**2)*Dx**3 + (1)*Dx**4

See Also
========

DifferentialOperatorAlgebra
c                ó  € W n         V P                   P                  p\        VP                  ^ ,          \        4      '       d   VP                  ^ ,          MVP                  ^ ,          ^ ,          V n        \        V4       F`  w  rE\        WSP                  4      '       g   VP                  \        V4      4      W&   K>  VP                  VP                  V4      4      W&   Kb  	  Wn        \        V P                  4      ^,
          V n        R# )z•
Parameters
==========

list_of_poly:
    List of polynomials belonging to the base ring of the algebra.
parent:
    Parent algebra of the operator.
N)ÚparentrU   ra   Úgensr   ÚxÚ	enumerateÚdtypeÚ
from_sympyr   Úto_sympyÚ
listofpolyÚlenÚorder)rc   Úlist_of_polyr{   rU   ÚiÚjs   &&&   rE   rd   ÚDifferentialOperator.__init__Ä   s¶   € ð ŒØ�{‰{×ÑˆÜ!+¨D¯I©I°a­L¼&×!AÒ!A�—‘˜1–ÀtÇyÁyÐQRÅ|ÐTUÅˆŒô
 ˜lÖ+‰DˆAÜ˜a§¡×,Ò,Ø"&§/¡/´'¸!³*Ó"=�“à"&§/¡/°$·-±-ÀÓ2BÓ"C�“ñ	 ,ð 'Œä˜Ÿ™Ó)¨AÕ-ˆŽ
rH   c                óþ  a € S P                   p\        V\        4      '       d   VP                   pMc\        VS P                  P                  P
                  4      '       d   V.pM/S P                  P                  P                  \        V4      4      .pR pV! V^ ,          V4      pV 3R lp\        ^\        V4      4       F#  pV! V4      p\        WT! W',          V4      4      pK%  	  \        VS P                  4      # )zƒ
Multiplies two DifferentialOperator and returns another
DifferentialOperator instance using the commutation rule
Dx*a = a*Dx + a'
c                 óz   € \        V\        4      '       d   V Uu. uF  q"V ,          NK  	  up# W,          .# u upi r@   )ra   Úlist)ÚbÚlistofotherr†   s   && rE   Ú_mul_dmp_diffopÚ5DifferentialOperator.__mul__.<locals>._mul_dmp_diffopò   s8   € Ü˜+¤t×,Ò,Ù'2Ó3¡{ !˜AŸ˜¡{Ñ3Ð3Ø•OÐ$Ð$ùò 4s   ›8c                 óì  <€ SP                   P                  P                  .p. p\        V \        4      '       d;   V  F3  pVP                  V4       VP                  VP                  4       4       K5  	  MvVP                  SP                   P                  P                  V 4      4       VP                  SP                   P                  P                  V 4      P                  4       4       \        W4      # r@   )	r{   rU   r^   ra   r‹   ÚappendÚdiffr€   Ú
_add_lists)rŒ   Úsol1Úsol2r†   rc   s   &   €rE   Ú
_mul_Dxi_bÚ0DifferentialOperator.__mul__.<locals>._mul_Dxi_bú   s¬   ø€ Ø—K‘K×$Ñ$×)Ñ)Ð*ˆDØˆDä˜!œT×"Ò"Û�AØ—K‘K ”NØ—K‘K §¡£Ö)ò ð —‘˜DŸK™K×,Ñ,×7Ñ7¸Ó:Ô;Ø—‘˜DŸK™K×,Ñ,×7Ñ7¸Ó:×?Ñ?ÓAÔBä˜dÓ)Ð)rH   )r‚   ra   r]   r{   rU   r   r€   r   Úrangerƒ   r“   )rc   rl   Ú
listofselfr�   rŽ   rP   r–   r†   s   f&      rE   Ú__mul__ÚDifferentialOperator.__mul__â   sÑ   ø€ ð —_‘_ˆ
Ü�eÔ1×2Ò2Ø×*Ñ*‰KÜ˜˜tŸ{™{×/Ñ/×5Ñ5×6Ò6Ø ˜'‰KàŸ;™;×+Ñ+×6Ñ6´w¸u³~ÓFÐGˆKò	%ñ
 ˜j¨�m¨[Ó9ˆõ	*ô �qœ#˜j›/Ö*ˆAá$ [Ó1ˆKä˜S /°*µ-ÀÓ"MÓNŠCñ	 +ô $ C¨¯©Ó5Ð5rH   c                ób  € \        V\        4      '       g”   \        WP                  P                  P                  4      '       g/   V P                  P                  P                  \        V4      4      pV P                   Uu. uF  q!V,          NK  	  pp\        W0P                  4      # R # u upi r@   )ra   r]   r{   rU   r   r€   r   r‚   )rc   rl   r‡   rP   s   &&  rE   Ú__rmul__ÚDifferentialOperator.__rmul__  s~   € Ü˜%Ô!5×6Ò6ä˜e§[¡[×%5Ñ%5×%;Ñ%;×<Ò<ØŸ™×)Ñ)×5Ñ5´g¸e³nÓE�à&*§o¢oÓ6¡o ˜1—9�9¡oˆCÐ6Ü'¨¯[©[Ó9Ð9ñ 7ùò
 7s   ÂB,c                óê  € \        V\        4      '       d6   \        V P                  VP                  4      p\        W P                  4      # V P                  p\        WP                  P
                  P                  4      '       g1   V P                  P
                  P                  \        V4      4      .pMV.pV^ ,          V^ ,          ,           .VR,          ,           p\        W P                  4      # )é    ºé   NN)	ra   r]   r“   r‚   r{   rU   r   r€   r   )rc   rl   rP   Ú	list_selfÚ
list_others   &&   rE   Ú__add__ÚDifferentialOperator.__add__  s®   € Ü�eÔ1×2Ò2ä˜TŸ_™_¨e×.>Ñ.>Ó?ˆCÜ'¨¯[©[Ó9Ð9à—O‘Oˆ	Ü˜%§¡×!1Ñ!1×!7Ñ!7×8Ò8Ø ŸK™K×-Ñ-×9Ñ9¼'À%».ÓIÐJ‰Jà˜ˆJØ˜�|˜j¨�mÕ+Ð,¨y¸­}Õ<ˆÜ# C¯©Ó5Ð5rH   c                ó"   € V RV,          ,           # ©r¢   éÿÿÿÿ© rk   s   &&rE   Ú__sub__ÚDifferentialOperator.__sub__)  s   € Ø�r˜U•lÕ"Ð"rH   c                ó"   € RV ,          V,           # r¨   rª   rk   s   &&rE   Ú__rsub__ÚDifferentialOperator.__rsub__,  s   € Ø�d�{˜UÕ"Ð"rH   c                ó   € RV ,          # r¨   rª   ©rc   s   &rE   Ú__neg__ÚDifferentialOperator.__neg__/  ó   € Ø�D�yÐrH   c                ó>   € V \         P                  V,          ,          # r@   ©r   ÚOnerk   s   &&rE   Ú__truediv__Ú DifferentialOperator.__truediv__2  ó   € Ø”q—u‘u˜u•}Õ%Ð%rH   c                ó$  € V^8X  d   V # \        V P                  P                  P                  .V P                  4      pV^ 8X  d   V# V P                  V P                  P
                  P                  8X  dd   V P                  P                  P                  .V,          V P                  P                  P                  .,           p\        W0P                  4      # T p V^,          '       d	   W$,          pV^,          pV'       g    V# WD,          pK6  ©r¢   )r]   r{   rU   r_   r‚   rT   r^   )rc   ÚnÚresultrP   r}   s   &&   rE   Ú__pow__ÚDifferentialOperator.__pow__5  sÒ   € Ø�Œ6ØˆKÜ% t§{¡{×'7Ñ'7×';Ñ';Ð&<¸d¿k¹kÓJˆØ�Œ6ØˆMà�?‰?˜dŸk™k×=Ñ=×HÑHÔHØ—;‘;×#Ñ#×(Ñ(Ð)¨!Õ+¨t¯{©{×/?Ñ/?×/CÑ/CÐ.DÕDˆCÜ'¨¯[©[Ó9Ð9ØˆØØ�1�uŒuØ•�Ø�!�GˆAßØàˆð �FŠArH   c                ó„  € V P                   pR p\        V4       EF!  w  r4W@P                  P                  P                  8X  d   K,  V P                  P                  P                  V4      pV^ 8X  d#   VR\        V4      ,           R,           ,          pKz  V'       d
   VR,          pV^8X  d>   VR\        V4      ,           RV P                  P                  ,          ,           ,          pKÏ  VR\        V4      ,           R,           RV P                  P                  ,          ,           \        V4      ,           ,          pEK$  	  V# )Ú Ú(Ú)z + z)*%sz*%s**)r‚   r~   r{   rU   r^   r�   r1   r`   )rc   r‚   Ú	print_strr†   r‡   s   &    rE   rg   ÚDifferentialOperator.__str__I  sñ   € Ø—_‘_ˆ
Øˆ	ä˜j×)‰DˆAØ—K‘K×$Ñ$×)Ñ)Ô)Ùà—‘× Ñ ×)Ñ)¨!Ó,ˆAà�AŒvØ˜S¤4¨£7�]¨SÕ0Õ0�	ÙçØ˜UÕ"�	à�AŒvØ˜S¤4¨£7�]¨V°d·k±k×6LÑ6LÕ-MÕMÕM�	Ùà˜œt A›w�¨Õ,¨w¸¿¹×9OÑ9OÕ/PÕPÔSWÐXYÓSZÕZÕZ‹Iñ# *ð& ÐrH   c                ó˜  a € \        V\        4      '       d;   S P                  VP                  8H  ;'       d    S P                  VP                  8H  # S P                  ^ ,          V8H  ;'       d]    \        ;QJ d0    V 3R lS P                  R,           4       F  '       d   K   R# 	  R# ! V 3R lS P                  R,           4       4      # )r    c              3   óf   <"  € T F&  qSP                   P                  P                  J x € K(  	  R # 5ir@   ©r{   rU   r^   )Ú.0r†   rc   s   & €rE   Ú	<genexpr>Ú.DifferentialOperator.__eq__.<locals>.<genexpr>i  s&   øé € ÐHÑ4G¨q�T—[‘[×%Ñ%×*Ñ*Õ*Ó4Gùs   ƒ.1r¡   FT)ra   r]   r‚   r{   Úallrk   s   f&rE   rm   ÚDifferentialOperator.__eq__d  s¥   ø€ Ü�eÔ1×2Ò2Ø—?‘? e×&6Ñ&6Ñ6÷ /ð /Ø—;‘; %§,¡,Ñ.ð/à�‰˜qÕ! UÑ*÷ Ið Iß‹CÔH°D·O±OÀBÖ4GÓH�CŒCð	IÚð	IØÔH°D·O±OÀBÖ4GÓHÓHð	IrH   c                ó    € V P                   P                  pV\        VP                  V P                  R,          4      V P
                  4      9   # )z8
Checks if the differential equation is singular at x0.
r©   )r{   rU   r.   r�   r‚   r}   )rc   Úx0rU   s   && rE   Úis_singularÚ DifferentialOperator.is_singulark  s;   € ð
 �{‰{×ÑˆØ”U˜4Ÿ=™=¨¯©¸Õ)<Ó=¸t¿v¹vÓFÑFÐFrH   )r‚   r„   r{   r}   N)ro   rp   rq   rr   rs   Ú_op_priorityrd   rš   r�   r¥   Ú__radd__r«   r®   r²   r¸   r¿   rg   rt   rm   rÑ   ru   rv   rw   s   @rE   r]   r]   ž   se   ø‡ € ñ!ðF €Lò.ò<,6ò\:ò6ð €Hò#ò#òò&òò(ð2 €HòI÷Gð GrH   r]   c                   óþ   a € ] tR tRt o Rt^tR"R ltR t]tR t	R t
R tR	 tR
 tR#R ltR tR tR t]tR tR tR tR tR tR tR tR$R ltR$R ltR%R ltR tR&R ltR tR t R'R lt!R t"R(R lt#R  t$R!t%V t&R# ))ÚHolonomicFunctionit  aÎ	  
A Holonomic Function is a solution to a linear homogeneous ordinary
differential equation with polynomial coefficients. This differential
equation can also be represented by an annihilator i.e. a Differential
Operator ``L`` such that :math:`L.f = 0`. For uniqueness of these functions,
initial conditions can also be provided along with the annihilator.

Explanation
===========

Holonomic functions have closure properties and thus forms a ring.
Given two Holonomic Functions f and g, their sum, product,
integral and derivative is also a Holonomic Function.

For ordinary points initial condition should be a vector of values of
the derivatives i.e. :math:`[y(x_0), y'(x_0), y''(x_0) ... ]`.

For regular singular points initial conditions can also be provided in this
format:
:math:`{s0: [C_0, C_1, ...], s1: [C^1_0, C^1_1, ...], ...}`
where s0, s1, ... are the roots of indicial equation and vectors
:math:`[C_0, C_1, ...], [C^0_0, C^0_1, ...], ...` are the corresponding initial
terms of the associated power series. See Examples below.

Examples
========

>>> from sympy.holonomic.holonomic import HolonomicFunction, DifferentialOperators
>>> from sympy import QQ
>>> from sympy import symbols, S
>>> x = symbols('x')
>>> R, Dx = DifferentialOperators(QQ.old_poly_ring(x),'Dx')

>>> p = HolonomicFunction(Dx - 1, x, 0, [1])  # e^x
>>> q = HolonomicFunction(Dx**2 + 1, x, 0, [0, 1])  # sin(x)

>>> p + q  # annihilator of e^x + sin(x)
HolonomicFunction((-1) + (1)*Dx + (-1)*Dx**2 + (1)*Dx**3, x, 0, [1, 2, 1])

>>> p * q  # annihilator of e^x * sin(x)
HolonomicFunction((2) + (-2)*Dx + (1)*Dx**2, x, 0, [0, 1])

An example of initial conditions for regular singular points,
the indicial equation has only one root `1/2`.

>>> HolonomicFunction(-S(1)/2 + x*Dx, x, 0, {S(1)/2: [1]})
HolonomicFunction((-1/2) + (x)*Dx, x, 0, {1/2: [1]})

>>> HolonomicFunction(-S(1)/2 + x*Dx, x, 0, {S(1)/2: [1]}).to_expr()
sqrt(x)

To plot a Holonomic Function, one can use `.evalf()` for numerical
computation. Here's an example on `sin(x)**2/x` using numpy and matplotlib.

>>> import sympy.holonomic # doctest: +SKIP
>>> from sympy import var, sin # doctest: +SKIP
>>> import matplotlib.pyplot as plt # doctest: +SKIP
>>> import numpy as np # doctest: +SKIP
>>> var("x") # doctest: +SKIP
>>> r = np.linspace(1, 5, 100) # doctest: +SKIP
>>> y = sympy.holonomic.expr_to_holonomic(sin(x)**2/x, x0=1).evalf(r) # doctest: +SKIP
>>> plt.plot(r, y, label="holonomic function") # doctest: +SKIP
>>> plt.show() # doctest: +SKIP

Nc                ó6   € W@n         W0n        Wn        W n        R# )að  

Parameters
==========

annihilator:
    Annihilator of the Holonomic Function, represented by a
    `DifferentialOperator` object.
x:
    Variable of the function.
x0:
    The point at which initial conditions are stored.
    Generally an integer.
y0:
    The initial condition. The proper format for the initial condition
    is described in class docstring. To make the function unique,
    length of the vector `y0` should be equal to or greater than the
    order of differential equation.
N)Úy0rÐ   Úannihilatorr}   )rc   rÙ   r}   rÐ   rØ   s   &&&&&rE   rd   ÚHolonomicFunction.__init__¹  s   € ð, ŒàŒà&ÔØŽrH   c           
     óV  € V P                  4       '       db   R \        V P                  4      : R\        V P                  4      : R\        V P
                  4      : R\        V P                  4      : R2	pV# R \        V P                  4      : R\        V P                  4      : R2pV# )zHolonomicFunction(z, rÄ   )Ú_have_init_condrb   rÙ   r1   r}   rÐ   rØ   )rc   Ústr_sols   & rE   rg   ÚHolonomicFunction.__str__Ö  sz   € Ø×Ñ×!Ó!Ü=@À×AQÑAQÖ=RÜ�T—V‘V–œd 4§7¡7žm¬T°$·'±'®]ð<ˆGð ˆð "ô 69¸×9IÑ9IÖ5JÜ�T—V‘V–ðˆGð ˆrH   c                ó@  € V P                   P                  P                  pVP                   P                  P                  pVP                  pVP                  pW#8X  d   W3# VP	                  V4      P                  V P                  4      p\        V\        V P                   P                  P                  4      4      w  rxV P                   P                   U	u. uF  q’P                  V	4      NK  	  p
p	VP                   P                   U	u. uF  q“P                  V	4      NK  	  pp	\        W§4      p
\        W·4      p\        W P                  V P                  V P                  4      p
\        W±P                  VP                  VP                  4      pW«3# u up	i u up	i )zF
Unifies the base polynomial ring of a given two Holonomic
Functions.
)rÙ   r{   rU   ÚdomÚunifyÚold_poly_ringr}   rX   rb   r`   r‚   r�   r]   rÖ   rÐ   rØ   )rc   rl   ÚR1ÚR2Údom1Údom2ÚRÚ	newparentÚ_r†   r”   r•   s   &&          rE   rá   ÚHolonomicFunction.unifyâ  s<  € ð ×Ñ×$Ñ$×)Ñ)ˆØ×Ñ×%Ñ%×*Ñ*ˆà�v‰vˆØ�v‰vˆàŒ8Ø�=Ð à�Z‰Z˜Ó×,Ñ,¨T¯V©VÓ4ˆä,¨Q´°D×4DÑ4D×4KÑ4K×4VÑ4VÓ0WÓX‰ˆ	à(,×(8Ñ(8×(CÒ(CÓDÑ(C 1—‘˜A–Ñ(CˆÐDØ(-×(9Ñ(9×(DÒ(DÓEÑ(D 1—‘˜A–Ñ(DˆÐEä# DÓ4ˆÜ# DÓ4ˆä  §v¡v¨t¯w©w¸¿¹Ó@ˆÜ  §w¡w°·±¸%¿(¹(ÓCˆàˆ|Ðùò EùÚEs   ÃFÄFc                óŽ   € \        V P                  \        4      '       d   R# \        V P                  \        4      '       d   R# R# )zÎ
Returns True if the function have singular initial condition
in the dictionary format.

Returns False if the function have ordinary initial condition
in the list format.

Returns None for all other cases.
TFN)ra   rØ   Údictr‹   r±   s   &rE   Úis_singularicsÚ HolonomicFunction.is_singularics   s1   € ô �d—g‘gœt×$Ò$ÙÜ˜Ÿ™¤×&Ò&Ùñ 'rH   c                ó,   € \        V P                  4      # )z0
Checks if the function have initial condition.
)ÚboolrØ   r±   s   &rE   rÜ   Ú!HolonomicFunction._have_init_cond  s   € ô �D—G‘G‹}ÐrH   c           
     óð  € \        V P                  4      ^ ,          pV P                  V,          p\        V P                  4      ^8X  d§   V\        V4      8X  d•   V^ 8”  dŒ   \        V4      p\        P
                  .V,          pT\        V4       UUu. uF  w  rEV\        W,           4      ,          NK  	  upp,          p\        V P                  V P                  V P                  V4      # R# R# R# u uppi )z@
Converts a singular initial condition to ordinary if possible.
N)r‹   rØ   rƒ   Úintr   ÚZeror~   r   rÖ   rÙ   r}   rÐ   )rc   ÚarŒ   rØ   r†   r‡   s   &     rE   Ú_singularics_to_ordÚ%HolonomicFunction._singularics_to_ord  s¸   € ô �—‘‹M˜!ÕˆØ�G‰G�A�Jˆäˆt�w‰w‹<˜1Ô ¤c¨!£f¤°°Q´Ü�A“ˆAÜ—&‘&�˜A•ˆBØ´I¸a´LÔA±L©D¨A�1”y ¥Ó'×'Ð'±LÒAÕAˆBä$ T×%5Ñ%5°t·v±v¸t¿w¹wÈÓKÐKñ 27¡Ñùó Bs   Â#C2c                óª  € V P                   P                  P                  VP                   P                  P                  8w  d   V P                  V4      w  r#W#,           # V P                   P                  pVP                   P                  p\        WE4      pV P                   P                  P                  pVP                  4       pV P                   .p	VP                   .p
V P                   P                  P                  p\        Wd,
          4       F#  pW¹R,          ,          pV	P                  V4       K%  	  \        We,
          4       F#  pWºR,          ,          pV
P                  V4       K%  	  Wš,           p. pV F¥  p. p\        V^,           4       Fy  pV\        VP                  4      8¼  d   VP                  VP                  4       K:  VP                  VP                  VP                  V,          P                  4       4      4       K{  	  VP                  V4       K§  	  \        V\        V4      V^,           3V4      P!                  4       p\        P"                  ! V^,           ^3V4      p\%        VV4      pVP&                  '       Ed[   V^,          pW¹R,          ,          pV	P                  V4       WºR,          ,          pV
P                  V4       Wš,           p. pV F¥  p. p\        V^,           4       Fy  pV\        VP                  4      8¼  d   VP                  VP                  4       K:  VP                  VP                  VP                  V,          P                  4       4      4       K{  	  VP                  V4       K§  	  \        V\        V4      V^,           3V4      P!                  4       p\        P"                  ! V^,           ^3V4      p\%        VV4      pEKm  VP)                  4       RV^,           V,
           p\+        VV P                   P                  4      pVV P                   ,          p\+        VP                  V P                   P                  RR7      pV P-                  4       '       d   VP-                  4       '       g   \/        VV P0                  4      # V P3                  4       R8X  Edé   VP3                  4       R8X  EdÓ   V P4                  VP4                  8X  dt   \7        V VP                  4      p\7        VVP                  4      p\9        VV4       UUu. uF  w  r#W#,           NK  	  ppp\/        VV P0                  V P4                  V4      # V P                   P;                  ^ 4      pVP                   P;                  ^ 4      pV P4                  ^ 8X  d(   V'       g    V'       g   WP=                  ^ 4      ,           # VP4                  ^ 8X  d)   V'       g!   V'       g   V P=                  ^ 4      V,           # V P                   P;                  V P4                  4      pVP                   P;                  V P4                  4      pV'       g*   V'       g"   WP=                  V P4                  4      ,           # V P=                  VP4                  4      V,           # V P4                  VP4                  8w  d   \/        VV P0                  4      # RpRpV P3                  4       R8X  dn   VP3                  4       R8X  dY   \?        V P@                  4       UUu. uF  w  ppV\C        V4      ,          NK  	  ppp\D        PF                  V/pVP@                  pMÄV P3                  4       R8X  dn   VP3                  4       R8X  dY   \?        VP@                  4       UUu. uF  w  ppV\C        V4      ,          NK  	  pppV P@                  p\D        PF                  V/pMBV P3                  4       R8X  d.   VP3                  4       R8X  d   V P@                  pVP@                  p/ pV FO  pVV9   d:   \9        VV,          VV,          4       UUu. uF  w  r#W#,           NK  	  uppVV&   KC  VV,          VV&   KQ  	  V F  pVV9  g   K  VV,          VV&   K  	  \/        VV P0                  V P4                  V4      # u uppi u uppi u uppi u uppi )r¢   NF©ÚnegativeTr©   )$rÙ   r{   rU   rá   r„   ÚmaxÚ	get_fieldrT   r˜   r‘   rƒ   r‚   r^   ÚnewÚto_listr0   rJ   ÚzerosrQ   Úis_zero_matrixÚflatÚ
_normalizerÜ   rÖ   r}   rí   rÐ   Ú
_extend_y0ÚziprÑ   Ú
change_icsr~   rØ   r   r   rô   )rc   rl   rõ   rŒ   Údeg1Údeg2Údimrç   ÚKÚrowsselfÚ	rowsotherÚgenr†   Údiff1Údiff2ÚrowrD   ÚexprÚprK   rP   r”   Úy1Úy2rØ   Úselfat0Úotherat0Úselfatx0Ú	otheratx0r‡   Ú_y0s   &&                             rE   r¥   ÚHolonomicFunction.__add__$  sÙ  € à×Ñ×"Ñ"×'Ñ'¨5×+<Ñ+<×+CÑ+C×+HÑ+HÔHØ—:‘:˜eÓ$‰DˆAØ•5ˆLà×Ñ×%Ñ%ˆØ× Ñ ×&Ñ&ˆÜ�$‹oˆØ×Ñ×#Ñ#×(Ñ(ˆØ�K‰K‹Mˆà×$Ñ$Ð%ˆØ×&Ñ&Ð'ˆ	Ø×Ñ×%Ñ%×9Ñ9ˆô �s•zÖ"ˆAØ B�<Õ'ˆEØ�O‰O˜EÖ"ñ #ô �s•zÖ"ˆAØ R�=Õ(ˆEØ×Ñ˜UÖ#ñ #ð Õ"ˆð ˆãˆDØˆAÜ˜3 �7–^�Øœ˜DŸO™OÓ,Ô,Ø—H‘H˜QŸV™VÖ$à—H‘H˜QŸU™U 4§?¡?°1Õ#5×#=Ñ#=Ó#?Ó@ÖAñ	 $ð
 �H‰H�QŽKñ ô ˜œS ›X s¨1¥uÐ-¨qÓ1×;Ñ;Ó=ˆÜ×$Ò$ c¨!¥e¨Q Z°Ó3ˆÜ$ Q¨Ó0ˆð × × Ñ Ø�1�HˆCà B�<Õ'ˆEØ�O‰O˜EÔ"à R�=Õ(ˆEØ×Ñ˜UÔ#àÕ&ˆCØˆAã�Ø�Ü˜s Q�wž�AØœC §¡Ó0Ô0ØŸ™ §¡Ö(àŸ™ §¡ t§¡°qÕ'9×'AÑ'AÓ'CÓ!DÖEñ	 (ð
 —‘˜–ñ ô ˜Q¤ S£¨3¨q­5Ð 1°1Ó5×?Ñ?ÓAˆAÜ"×(Ò(¨#¨a­%°¨°QÓ7ˆGÜ(¨¨GÓ4‹Cð
 �h‰h‹j˜˜# �' D�.Ð)ˆÜ˜#˜t×/Ñ/×6Ñ6Ó7ˆà�d×&Ñ&Õ'ˆÜ˜Ÿ™¨×)9Ñ)9×)@Ñ)@È5ÔQˆà×$Ñ$×&Ò&¨5×+@Ñ+@×+BÒ+BÜ$ S¨$¯&©&Ó1Ð1ð ×ÑÓ  EÕ)¨e×.BÑ.BÓ.DÈÕ.Mð �w‰w˜%Ÿ(™(Ô"ô    c§i¡iÓ0�Ü  s§y¡yÓ1�Ü(+¨B°¬Ô4©¡ �a—e�e©�Ñ4Ü(¨¨d¯f©f°d·g±g¸rÓBÐBð ×&Ñ&×2Ñ2°1Ó5ˆGØ×(Ñ(×4Ñ4°QÓ7ˆHØ�w‰w˜!Œ|§G·HØ×.Ñ.¨qÓ1Õ1Ð1Ø�x‰x˜1Œ}§W·XØ—‘ qÓ)¨EÕ1Ð1à×'Ñ'×3Ñ3°D·G±GÓ<ˆHØ×)Ñ)×5Ñ5°d·g±gÓ>ˆIß§IØ×.Ñ.¨t¯w©wÓ7Õ7Ð7Ø—?‘? 5§8¡8Ó,¨uÕ4Ð4à�7‰7�e—h‘hÔÜ$ S¨$¯&©&Ó1Ð1ð ˆØˆà×ÑÓ  EÔ)¨e×.BÑ.BÓ.DÈÔ.Lä09¸$¿'¹'Ô0BÔCÑ0B©¨¨1�1”y “|×#Ð#Ñ0BˆCÑCÜ—&‘&˜#�ˆBØ—‘‰BØ× Ñ Ó" dÔ*¨u×/CÑ/CÓ/EÈÔ/NÜ09¸%¿(¹(Ô0CÔDÑ0C©¨¨1�1”y “|×#Ð#Ñ0CˆCÑDØ—‘ˆBÜ—&‘&˜#�‰BØ× Ñ Ó" dÔ*¨u×/CÑ/CÓ/EÈÔ/MØ—‘ˆBØ—‘ˆBð ˆÛˆAð �BŒwÜ+.¨r°!­u°b¸µeÔ+<Ô=Ñ+<¡4 1˜Ÿ˜Ñ+<Ò=��1“à˜1���1“ñ ó ˆAØ˜Ž{Ø˜1���1“ñ ô !  d§f¡f¨d¯g©g°rÓ:Ð:ùóe 5ùó4 Dùó Eùó >s   Ô/b=Ü"cÞ$c	ácc           	     óþ
  € V P                   P                  P                  pV P                  4       R8X  Ed9   V P	                  4       pV'       d   VP                  WR7      # / pV P                   F¬  pV P                  V,          p. p\        V4       Fz  w  ršV
^ 8X  d"   VP                  \        P                  4       K-  Wi,           ^,           ^ 8X  d   \        R4      hVP                  V
\        Wi,           ^,           4      ,          4       K|  	  W…V^,           &   K®  	  \        VR4      '       d   \        R4      h\        V P                   V,          V P                  V P                  V4      # V P!                  4       '       gr   V'       dC   \        V P                   V,          V P                  V P                  \        P                  .4      # \        V P                   V,          V P                  4      # \        VR4      '       dJ   \#        V4      ^8X  d9   V^ ,          V P                  8X  d!   V P                  pV^,          pV^,          pRpMRp\        P                  .pWPP                  ,          p\        V P                   V,          V P                  V P                  V4      pX'       g   V# XX8w  EdZ    VP%                  4       pV'       dP   VP+                  V P                  V4      p\-        V\.        4      '       d   VP1                  V P                  V4      pMVP3                  V4      pXV P                  8X  d<   V^ ,          V,
          V^ &   \        V P                   V,          V P                  Wµ4      # \        V4      P4                  '       dz   V'       dX   VP+                  V P                  V4      p\-        V\.        4      '       d   VP1                  V P                  V4      pVV,
          # VP3                  V4      pVV,
          # XV P                  8X  d)   \        V P                   V,          V P                  WÅ4      # \        V4      P4                  '       d‰    \        V P                   V,          V P                  VV4      P%                  4       pVP+                  V P                  V4      p\-        V\.        4      '       g   V# VP1                  V P                  V4      # \        V P                   V,          V P                  4      #   \&        \(        3 d    Rp ELai ; i  \&        \(        3 d;    \        T P                   T,          T P                  YÅ4      P3                  T4      u # i ; i)a  
Integrates the given holonomic function.

Examples
========

>>> from sympy.holonomic.holonomic import HolonomicFunction, DifferentialOperators
>>> from sympy import QQ
>>> from sympy import symbols
>>> x = symbols('x')
>>> R, Dx = DifferentialOperators(QQ.old_poly_ring(x),'Dx')
>>> HolonomicFunction(Dx - 1, x, 0, [1]).integrate((x, 0, x))  # e^x - 1
HolonomicFunction((-1)*Dx + (1)*Dx**2, x, 0, [0, 1])
>>> HolonomicFunction(Dx**2 + 1, x, 0, [1, 0]).integrate((x, 0, x))
HolonomicFunction((1)*Dx + (1)*Dx**3, x, 0, [0, 1, 0])
T)Úinitcondz1logarithmic terms in the series are not supportedÚ__iter__z4Definite integration for singular initial conditionsFN)rÙ   r{   rT   rí   rö   Ú	integraterØ   r~   r‘   r   rô   ÚNotImplementedErrorÚhasattrrÖ   r}   rÐ   rÜ   rƒ   Úto_exprr;   r:   Úsubsra   r   r2   ÚevalfÚ	is_Number)rc   Úlimitsr  ÚDrD   rØ   r†   ÚcÚc2r‡   ÚcjrÐ   rõ   rŒ   ÚdefiniteÚindefinite_integralÚindefinite_exprÚlowerÚupperÚsÚ
indefinites   &&&                  rE   r  ÚHolonomicFunction.integrateµ  sP  € ð& ×Ñ×#Ñ#×7Ñ7ˆð ×ÑÓ  DÕ(à×(Ñ(Ó*ˆAßØ—{‘{ 6�{Ó=Ð=ð ˆBØ—W”W�Ø—G‘G˜A•J�Ø�Ü& qž\‘E�AØ˜Q”wØŸ	™	¤!§&¡&Ö)ð � � aœÜ1Ð2eÓfÐfàŸ	™	 "¤q¨­°­£|Õ"3Ö4ñ *ð �1�q•5“	ñ ô �v˜z×*Ò*Ü)Ð*`ÓaÐaä$ T×%5Ñ%5¸Õ%9¸4¿6¹6À4Ç7Á7ÈBÓOÐOð ×#Ñ#×%Ò%ßÜ(¨×)9Ñ)9¸AÕ)=¸t¿v¹vÀtÇwÁwÔQR×QWÑQWÐPXÓYÐYÜ$ T×%5Ñ%5¸Õ%9¸4¿6¹6ÓBÐBô
 �6˜:×&Ò&ä�6‹{˜aÔ F¨1¥I°·±Ô$7Ø—W‘W�Ø˜1•I�Ø˜1•I�Ø�øð ˆHä�f‰fˆXˆØ
�g‰g�ˆä/°×0@Ñ0@À1Õ0DÀdÇfÁfÈdÏgÉgÐWYÓZÐçØ&Ð&ð ��7ð'Ø"5×"=Ñ"=Ó"?�÷ Ø'×,Ñ,¨T¯V©V°QÓ7�Ü˜e¤S×)Ò)Ø+×1Ñ1°$·&±&¸!Ó<�Eøà+×1Ñ1°!Ó4�à�D—F‘FŒ{Ø˜1� ���1‘Ü(¨×)9Ñ)9¸AÕ)=¸t¿v¹vÀrÓNÐNä�1“——�ß"Ø+×0Ñ0°·±¸Ó;�EÜ! %¬×-Ò-Ø /× 5Ñ 5°d·f±f¸aÓ @˜ð ˜u•}Ð$ð 0×5Ñ5°aÓ8�Eà˜u•}Ð$ð �—‘Œ;Ü$ T×%5Ñ%5¸Õ%9¸4¿6¹6À1ÓIÐIô ˆq‹T�^�^ˆ^ð	WÜ% d×&6Ñ&6¸Õ&:¸D¿F¹FÀAØóß™›	ð àŸV™V D§F¡F¨AÓ.�
Ü! *¬c×2Ò2Ø%Ð%àŸ7™7 4§6¡6¨1Ó-Ð-ô ! ×!1Ñ!1°AÕ!5°t·v±vÓ>Ð>øôU (Ô)<Ð=ô 'Ø"&“ð'ûôN (Ô)<Ð=ô WÜ(¨×)9Ñ)9¸AÕ)=¸t¿v¹vÀqÓM×SÑSÐTUÓVÒVðWús,   Ê<T Ñ)A*T1 ÓT1 ÔT.Ô-T.Ô1AU<Õ;U<c                ó   € VP                  RR4       V'       dn   V^ ,          V P                  8w  d   \        P                  # \	        V4      ^8X  d6   T p\        V^,          4       F  pVP                  V^ ,          4      pK  	  V# V P                  pVP                  ^ ,          VP                  P                  P                  8X  d"   VP                  ^8X  d   \        P                  # VP                  ^ ,          VP                  P                  P                  8X  d¯   \        VP                  R,          VP                  4      pV P                  4       '       d]   V P                  4       R8X  d3   \!        W0P                  V P"                  V P$                  R,          4      # \!        W0P                  4      # \!        W0P                  4      # VP                  P                  pVP'                  4       pVP                   Uu. uF!  qGP)                  VP+                  4       4      NK#  	  ppVR,           Uu. uF  qDV^ ,          ,          NK  	  p	pV	P-                  ^ VP                  4       \/        W—4      p\1        W7P                  VP2                  .4      p\5        VR,          V P                  P                  RR7      pV P                  4       '       d   V P                  4       R8X  d   \!        W0P                  4      # \7        WP                  ^,           4      R,          p
\!        W0P                  V P"                  V
4      # u upi u upi )aË  
Differentiation of the given Holonomic function.

Examples
========

>>> from sympy.holonomic.holonomic import HolonomicFunction, DifferentialOperators
>>> from sympy import ZZ
>>> from sympy import symbols
>>> x = symbols('x')
>>> R, Dx = DifferentialOperators(ZZ.old_poly_ring(x),'Dx')
>>> HolonomicFunction(Dx**2 + 1, x, 0, [0, 1]).diff().to_expr()
cos(x)
>>> HolonomicFunction(Dx - 2, x, 0, [1]).diff().to_expr()
2*exp(2*x)

See Also
========

integrate
ÚevaluateTr¡   Frù   )Ú
setdefaultr}   r   rô   rƒ   r˜   r’   rÙ   r‚   r{   rU   r^   r„   r]   rÜ   rí   rÖ   rÐ   rØ   rü   rý   rþ   ÚinsertÚ_derivate_diff_eqr“   r_   r  r  )rc   ÚargsÚkwargsrP   r†   Úannrç   r	  Úseq_dmfÚrhsrØ   s   &*,        rE   r’   ÚHolonomicFunction.diff4  sZ  € ð, 	×Ñ˜* dÔ+ßØ�A�w˜$Ÿ&™&Ô Ü—v‘v�Ü�T“˜a”Ø�Ü˜t A�wž�AØŸ(™( 4¨¥7Ó+’Cñ (à�
à×Ñˆð �>‰>˜!Õ §
¡
§¡× 4Ñ 4Ô4¸¿¹Àa¼Ü—6‘6ˆMð �^‰^˜AÕ #§*¡*§/¡/×"6Ñ"6Ô6ä& s§~¡~°bÕ'9¸3¿:¹:ÓFˆCà×#Ñ#×%Ò%à×&Ñ&Ó(¨EÔ1Ü,¨S·&±&¸$¿'¹'À4Ç7Á7È2Å;ÓOÐOä(¨¯f©fÓ5Ð5ä(¨¯f©fÓ5Ð5ð �J‰J�O‰OˆØ�K‰K‹Mˆà/2¯~ª~Ó>©~¨!—5‘5˜Ÿ™›Ö%©~ˆÐ>ð (/¨r¦{Ó3¡{ !�7˜1•:�~ˆ~¡{ˆÐ3Ø�
‰
�1�a—f‘fÔô   Ó'ˆô ˜Ÿv™v q§u¡u˜oÓ.ˆä˜˜R� $×"2Ñ"2×"9Ñ"9ÀEÔJˆà×#Ñ#×%Ò%¨×)<Ñ)<Ó)>À$Ô)FÜ$ S¯&©&Ó1Ð1ä˜Ÿi™i¨!�mÓ,¨RÕ0ˆÜ  §f¡f¨d¯g©g°rÓ:Ð:ùò% ?ùò 4s   È'MÈ7Mc                óB  € V P                   VP                   8w  g   V P                  VP                  8w  d   R # V P                  4       '       dQ   VP                  4       '       d;   V P                  VP                  8H  ;'       d    V P                  VP                  8H  # R# ©FT)rÙ   r}   rÜ   rÐ   rØ   rk   s   &&rE   rm   ÚHolonomicFunction.__eq__�  sp   € Ø×Ñ˜u×0Ñ0Ô0°D·F±F¸e¿g¹gÔ4EÙØ×Ñ×!Ò! e×&;Ñ&;×&=Ò&=Ø—7‘7˜eŸh™hÑ&×>Ð>¨4¯7©7°e·h±hÑ+>Ð>ÙrH   c                óZ  aaaaa € V P                   p\        V\        4      '       gÇ   \        V4      pVP	                  V P
                  4      '       d   \        R 4      hV P                  4       '       g   V # \        WP                  4      pV Uu. uF4  p\        P                  ! W@P
                  4      V,          P                  NK6  	  upo\        W P
                  V P                  S4      # V P                   P                  P                  VP                   P                  P                  8w  d   V P!                  V4      w  opSV,          # VP                   pVP                  oVP                  pVP                  P                  pVP#                  4       pVP$                   Uu. uF!  qHP                  VP'                  4       4      NK#  	  p	pVP$                   Uu. uF!  qHP                  VP'                  4       4      NK#  	  p
p\)        S4       Uu. uF  q¹V,          ) V	S,          ,          NK  	  pp\)        V4       Uu. uF  qºV,          ) W¥,          ,          NK  	  pp\)        S^,           4       UUu. uF.  p\)        V^,           4       Uu. uF  q¸P*                  NK  	  upNK0  	  pppVP,                  V^ ,          ^ &   \)        S4       UUu. uF$  p\)        V4       F  qNV,          V,          NK  	  K&  	  upp.p\/        V^SV,          3V4      P1                  4       p\.        P2                  ! SV,          ^3V4      p\5        VV4      pVP6                  '       EdÉ   \)        S^,
          RR4       EF  o\)        V^,
          RR4       Fè  oVS,          S^,           ;;,          VS,          S,          ,          uu&   VS^,           ,          S;;,          VS,          S,          ,          uu&   \        VS,          S,          VP8                  4      '       d'   \;        VS,          S,          V4      VS,          S&   Kµ  VS,          S,          P=                  V P
                  4      VS,          S&   Kê  	  EK  	  \)        S^,           4       F…  oVS,          V,          P>                  '       d   K%  \)        V4       F;  oVS,          S;;,          VS,          VS,          V,          ,          ,          uu&   K=  	  VP*                  VS,          V&   K‡  	  \)        V4       Fz  oVS,          S,          ^ 8X  d   K  \)        S4       F;  oVS,          S;;,          VS,          VS,          S,          ,          ,          uu&   K=  	  VP*                  VS,          S&   K|  	  TPA                  \)        S4       UUu. uF$  p\)        V4       F  qNV,          V,          NK  	  K&  	  upp4       \/        V\C        V4      SV,          3V4      P1                  4       p\5        VV4      pEKÛ  \E        VPG                  4       V P                   P                  RR7      pV P                  4       '       d   VP                  4       '       g   \        VV P
                  4      # V PI                  4       R8X  Ed   VPI                  4       R8X  Ed	   V P                  VP                  8X  Ed©   \        V VP                  4      p\        VVP                  4      pV^ ,          V^ ,          ,          .p\)        ^\K        \C        V4      \C        V4      4      4       EF  o\)        S^,           4       Uu. uF%  p\)        S^,           4       Uu. uF  p^ NK  	  upNK'  	  pp\)        S^,           4       FB  o\)        S^,           4       F)  pSV,           S8X  g   K  \M        SS4      VS,          V&   K+  	  KD  	  ^ p\)        S^,           4       FO  o\)        S^,           4       F6  pVVS,          V,          VS,          ,          VV,          ,          ,          pK8  	  KQ  	  VPA                  V4       EK  	  \        VV P
                  V P                  V4      # V P                   PO                  ^ 4      pVP                   PO                  ^ 4      pV P                  ^ 8X  d(   V'       g    V'       g   WPQ                  ^ 4      ,          # VP                  ^ 8X  d)   V'       g!   V'       g   V PQ                  ^ 4      V,          # V P                   PO                  V P                  4      pVP                   PO                  V P                  4      pV'       g*   V'       g"   WPQ                  V P                  4      ,          # V PQ                  VP                  4      V,          # V P                  VP                  8w  d   \        VV P
                  4      # RoRo V PI                  4       R8X  dm   VPI                  4       R8X  dX   \S        V PT                  4       UUu. uF  w  r´V\W        V4      ,          NK  	  ppp\X        PZ                  V/oVPT                  o MÃV PI                  4       R8X  dm   VPI                  4       R8X  dX   \S        VPT                  4       UUu. uF  w  r´V\W        V4      ,          NK  	  pppV PT                  o\X        PZ                  V/o MBV PI                  4       R8X  d.   VPI                  4       R8X  d   V PT                  oVPT                  o / pS Fæ  oS  FÝ  o\K        \C        SS,          4      \C        S S,          4      4      p\)        V4       Uau. uF<  o\]        VVVVV 3R l\)        S^,           4       4       \X        PZ                  R7      NK>  	  ppSS,           V9   g   VVSS,           &   K�  \_        VVSS,           ,          4       UUu. uF  w  ppVV,           NK  	  uppVSS,           &   Kß  	  Kè  	  \        VV P
                  V P                  V4      # u upi u upi u upi u upi u upi u upi u uppi u uppi u uppi u upi u upi u uppi u uppi u upi u uppi )z> Can't multiply a HolonomicFunction and expressions/functions.Frù   NTc              3   ó|   <"  € T F1  pSS,          V,          SS,          SV,
          ,          ,          x € K3  	  R # 5ir@   rª   )rÊ   rŒ   rõ   r†   r‡   r  r  s   & €€€€€rE   rË   Ú,HolonomicFunction.__mul__.<locals>.<genexpr>!  s-   øé € ÐH¹<°a˜"˜Q�% �( R¨¥U¨1¨q­5¥\×1Ò1»<ùs   ƒ9<©Ústartr©   )0rÙ   ra   rÖ   r   Úhasr}   r  rÜ   r  r„   r/   rý   ÚreprÐ   r{   rU   rá   rü   r‚   rþ   r˜   r^   r_   r0   rJ   rÿ   rQ   r   r   ÚDMFdiffr’   Úis_zeror‘   rƒ   r  r  rí   Úminr   rÑ   r  r~   rØ   r   r   rô   Úsumr  )!rc   rl   Úann_selfrØ   r‡   rŒ   Ú	ann_otherrç   r	  r£   r¤   r†   Úself_redÚ	other_redÚ	coeff_mulÚlin_sys_elementsÚlin_sysÚhomo_sysrP   Úsol_annÚy0_selfÚy0_otherÚcoeffÚkr  r  r  r  r  rõ   r&  r  r  s!   &&  `      `                 ` @@rE   rš   ÚHolonomicFunction.__mul__ˆ  s 	  ü€ Ø×#Ñ#ˆä˜%Ô!2×3Ò3Ü˜E“NˆEà�y‰y˜Ÿ™× Ò Ü)Ð*jÓkÐkà×'Ñ'×)Ò)Ø�Ü˜D§.¡.Ó1ˆBÙ=?Ó@¹R¸”4—8’8˜AŸv™vÓ&¨Õ.×3Ô3¹RÑ@ˆBÜ$ X¯v©v°t·w±wÀÓCÐCà×Ñ×"Ñ"×'Ñ'¨5×+<Ñ+<×+CÑ+C×+HÑ+HÔHØ—:‘:˜eÓ$‰DˆAˆqØ�q•5ˆLà×%Ñ%ˆ	à�N‰NˆØ�O‰Oˆà�O‰O× Ñ ˆØ�K‰K‹Mˆà19×1DÒ1DÓEÑ1D¨A—U‘U˜1Ÿ9™9›;Ö'Ñ1Dˆ	ÐEØ2;×2FÒ2FÓGÑ2F¨Q—e‘e˜AŸI™I›KÖ(Ñ2Fˆ
ÐGô ;@À¼(ÓC¹(°Q˜q•\�M I¨a¥L×0Ð0¹(ˆÐCä=BÀ1¼XÓF¹X¸ •m�^ j¥m×3Ð3¹Xˆ	ÐFô >CÀ1ÀqÅ5¼\ÔJ¹\¸¤e¨A°­E¤lÓ3¡l —f”f¡lÔ3¹\ˆ	ÑJØŸ%™%ˆ	�!��Q‰ô 7<¸A´hÔQ±h°ÌÈaÎÀ1 q�\¨!Ÿ_˜_É™_±hÒQÐRÐÜÐ/°!°Q°qµS°¸1Ó=×GÑGÓIˆä×%Ò% q¨¥s¨A h°Ó2ˆä$ W¨hÓ7ˆð × × Ñ ô ˜1˜q�5 " b×)�Ü˜q 1�u b¨"Ö-�AØ˜a•L  Q¥×'¨9°Q­<¸­?Õ:Ó'Ø˜a !�eÕ$ Q×'¨9°Q­<¸­?Õ:Ó'Ü! )¨A¥,¨q¥/°1·7±7×;Ò;Ü*1°)¸Aµ,¸qµ/À1Ó*E˜	 !� Q›à*3°A­,°q­/×*>Ñ*>¸t¿v¹vÓ*F˜	 !� Q›ô .ñ *ô ˜1˜q�5–\�Ø˜Q•< •?×*×*Ð*ÙÜ˜qž�AØ˜a•L —O y°¥|°iÀµlÀ1µoÕ'EÕE•Oñ "à"#§&¡&�	˜!•˜Q“ñ "ô ˜1–X�Ø˜Q•< •? aÔ'ÙÜ˜qž�AØ˜a•L —O x°¥{°Y¸qµ\À!µ_Õ'DÕD•Oñ "à"#§&¡&�	˜!•˜Q“ñ ð ×#Ñ#¼eÀA¼hÔ$Y¹h¸ÔPUÐVWÖPXÈ1¨q¥\°!§_ _ÑPX¡_¹hÒ$YÔZÜ"Ð#3´cÐ:JÓ6KÈQÈqÍSÐ5QÐSTÓU×_Ñ_ÓaˆGä(¨°(Ó;‹Cä˜SŸX™X›Z¨×)9Ñ)9×)@Ñ)@È5ÔQˆà×$Ñ$×&Ò&¨5×+@Ñ+@×+BÒ+BÜ$ W¨d¯f©fÓ5Ð5à×ÑÓ  EÕ)¨e×.BÑ.BÓ.DÈÕ.Mð �w‰w˜%Ÿ(™(Õ"ô % T¨7¯=©=Ó9�Ü% e¨W¯]©]Ó;�à˜a•j 8¨A¥;Õ.Ð/�ô ˜q¤#¤c¨'£l´C¸³MÓ"B×C�AÜ@EÀaÈ!ÅeÄÓMÁ¸1¬¨q°1­u¬Ó6© A›a©Ô6Á�EÐMÜ" 1 q¥5ž\˜Ü!& q¨1¥u¦˜AØ  1�u¨žzÜ.6°q¸!«n  a¥¨£ó ".ñ *ð
 �CÜ" 1 q¥5ž\˜Ü!& q¨1¥u¦˜AØ 5¨¥8¨A¥;°¸µ
Õ#:¸XÀa½[Õ#HÕHšCó ".ñ *ð —I‘I˜c—Nñ Dô )¨°$·&±&¸$¿'¹'À2ÓFÐFð ×&Ñ&×2Ñ2°1Ó5ˆGØ×(Ñ(×4Ñ4°QÓ7ˆHà�w‰w˜!Œ|§G·HØ×.Ñ.¨qÓ1Õ1Ð1Ø�x‰x˜1Œ}§W·XØ—‘ qÓ)¨EÕ1Ð1à×'Ñ'×3Ñ3°D·G±GÓ<ˆHØ×)Ñ)×5Ñ5°d·g±gÓ>ˆIß§IØ×.Ñ.¨t¯w©wÓ7Õ7Ð7Ø—?‘? 5§8¡8Ó,¨uÕ4Ð4à�7‰7�e—h‘hÔÜ$ W¨d¯f©fÓ5Ð5ð ˆØˆà×ÑÓ  EÔ)¨e×.BÑ.BÓ.DÈÔ.LÜ09¸$¿'¹'Ô0BÔCÑ0B©¨�1”y “|×#Ð#Ñ0BˆCÑCÜ—&‘&˜#�ˆBØ—‘‰BØ× Ñ Ó" dÔ*¨u×/CÑ/CÓ/EÈÔ/NÜ09¸%¿(¹(Ô0CÔDÑ0C©¨�1”y “|×#Ð#Ñ0CˆCÑDØ—‘ˆBÜ—&‘&˜#�‰BØ× Ñ Ó" dÔ*¨u×/CÑ/CÓ/EÈÔ/MØ—‘ˆBØ—‘ˆBàˆãˆAÛ�Üœ˜B˜q�E›
¤C¨¨1­£JÓ/�ä05°a´ô:Ù08¨1ô ×HÐH¼5ÀÀQÅ¼<ÓHÜ Ÿv™v÷'Ù08ð ð :à˜1•u ”{Ø !�B�q˜1•u“Iä36°q¸"¸QÀ½U½)Ô3DÔ EÑ3D©4¨1¨a  Q§ Ñ3DÒ E�B�q˜1•u“Ió ñ ô ! ¨$¯&©&°$·'±'¸2Ó>Ð>ùòg Aùò FùÚGùò DùâFùò 4ùÓJùó RùóH %Zùò. 7ùÒMùóL Dùó Eùò:ùó
 !Fss   Â:qÆ&'q!Ç'q&È q+Éq0É8q:Êq5Ê%q:Ë*r Ö?*r
Ý+rÞrÞré
rërîAr"ðr'
ñ5q:òrc                ó    € WR,          ,           # r¨   rª   rk   s   &&rE   r«   ÚHolonomicFunction.__sub__+  s   € Ø˜b•jÕ Ð rH   c                ó"   € V R,          V,           # r¨   rª   rk   s   &&rE   r®   ÚHolonomicFunction.__rsub__.  s   € Ø�b�y˜5Õ Ð rH   c                ó   € RV ,          # r¨   rª   r±   s   &rE   r²   ÚHolonomicFunction.__neg__1  r´   rH   c                ó>   € V \         P                  V,          ,          # r@   r¶   rk   s   &&rE   r¸   ÚHolonomicFunction.__truediv__4  rº   rH   c                ó„  € V P                   P                  ^8:  dû   V P                   pVP                  pV P                  f   RpM$\	        V P                  4      ^ ,          V,          .pVP
                  ^ ,          pVP
                  ^,          p\        P                  ! WPP                  4      V,          P                  pWV3 Uu. uF  qsP                  P                  V4      NK  	  pp\        Wƒ4      p	\        W�P                  V P                  V4      # V^ 8  d   \        R4      hV P                   P                  P                   p
\        W P                  \"        P$                  \"        P&                  .4      pV^ 8X  d   V# T p V^,          '       d	   W¼,          pV^,          pV'       g    V# WÌ,          pK6  u upi )r¢   Nz&Negative Power on a Holonomic Function)rÙ   r„   r{   rØ   r‹   r‚   r/   rý   r}   rE  rU   r�   r]   rÖ   rÐ   r=   rT   r   rô   r·   )rc   r½   r8  r{   rØ   Úp0Úp1r†   rP   Úddr[   r¾   r}   s   &&           rE   r¿   ÚHolonomicFunction.__pow__7  s[  € Ø×Ñ×!Ñ! QÔ&Ø×"Ñ"ˆCØ—Z‘ZˆFà�w‰wŠØ‘ä˜4Ÿ7™7“m AÕ&¨!Õ+Ð,�à—‘ Õ"ˆBØ—‘ Õ"ˆBä—(’(˜2Ÿv™vÓ&¨Õ*×/Ñ/ˆBà57±HÓ=±H¨q—;‘;×'Ñ'¨Ö*±HˆCÐ=Ü% cÓ2ˆBÜ$ R¯©°·±¸"Ó=Ð=ØˆqŒ5Ü#Ð$LÓMÐMØ×Ñ×$Ñ$×8Ñ8ˆÜ" 2§v¡v¬q¯v©v¼¿¹°wÓ?ˆØ�Œ6ØˆMØˆØØ�1�uŒuØ•�Ø�!�GˆAßØàˆð �FŠAùò! >s   Ã#F=c                óN   € \        R V P                  P                   4       4      # )z6
Returns the highest power of `x` in the annihilator.
c              3   ó@   "  € T F  qP                  4       x € K  	  R # 5ir@   ©Údegree©rÊ   r†   s   & rE   rË   Ú+HolonomicFunction.degree.<locals>.<genexpr>]  s   é € ÐCÑ'B !—8‘8—:�:Ó'Bùó   ‚)rû   rÙ   r‚   r±   s   &rE   rh  ÚHolonomicFunction.degreeY  s!   € ô ÑC t×'7Ñ'7×'BÒ'BÓCÓCÐCrH   c                ó¦  € V P                   P                  pV P                   P                  pVP                  V P                  4      pV P                   P
                  p\        V4       Fq  w  r‰\        W�P                   P                  P                  P                  4      '       g   K@  V P                   P                  P                  P                  V	4      Wx&   Ks  	  Wu,          P                  V P                  V/4      p
\        V4       Uu. uF.  q‡V,          P                  V P                  V/4      ) V
,          NK0  	  pp\        V4       Uu. uF  p\        P                  NK  	  pp\        P                  V^ &   V.p\!        \        V4       Uu. uF  p\        P                  NK  	  up.4      P#                  4       p V Uu. uF  qÿP                  V P                  4      NK  	  pp\        V^,
          4       F,  pVV^,           ;;,          WÈ,          V,          ,          uu&   K.  	  \        V4       F3  pVV;;,          VR,          W¸,          ,          V,          ,          uu&   K5  	  TpVP%                  V4       \!        V4      P#                  4       P'                  V4      w  ppVP(                  RJg   Kþ   \+        T4      ^ ,          pTP                  T^4      p\-        TR,          TRR7      pT'       d'   \/        TT P                  T^ ,          T^,          4      # \/        TT P                  4      # u upi u upi u upi u upi )aÈ  
Returns function after composition of a holonomic
function with an algebraic function. The method cannot compute
initial conditions for the result by itself, so they can be also be
provided.

Examples
========

>>> from sympy.holonomic.holonomic import HolonomicFunction, DifferentialOperators
>>> from sympy import QQ
>>> from sympy import symbols
>>> x = symbols('x')
>>> R, Dx = DifferentialOperators(QQ.old_poly_ring(x),'Dx')
>>> HolonomicFunction(Dx - 1, x).composition(x**2, 0, [1])  # e^(x**2)
HolonomicFunction((-2*x) + (1)*Dx, x, 0, [1])
>>> HolonomicFunction(Dx**2 + 1, x).composition(x**2 - 1, 1, [1, 0])
HolonomicFunction((4*x**3) + (-1)*Dx + (x)*Dx**2, x, 1, [1, 0])

See Also
========

from_hyper
T:r    NNFrù   r©   )rÙ   r{   r„   r’   r}   r‚   r~   ra   rU   r   r�   r!  r˜   r   rô   r·   r(   rJ   r‘   Úgauss_jordan_solver   r‹   r  rÖ   )rc   r  r6  r7  rç   rõ   r’   r‚   r†   r‡   rD   r!  ÚcoeffsÚsystemÚhomogeneousr  Úcoeffs_nextrP   ÚtausÚtaus   &&*,                rE   ÚcompositionÚHolonomicFunction.composition_  s…  € ð4 ×Ñ×#Ñ#ˆØ×Ñ×"Ñ"ˆØ�y‰y˜Ÿ™Ó ˆØ×%Ñ%×0Ñ0ˆ
ä˜jÖ)‰DˆAÜ˜!×-Ñ-×4Ñ4×9Ñ9×?Ñ?×@Ô@Ø $× 0Ñ 0× 7Ñ 7× <Ñ <× EÑ EÀaÓ H�
“ñ *ð �M×Ñ §¡ t˜}Ó-ˆÜ@EÀqÄ	ÓJÁ	¸1˜A•×#Ñ# T§V¡V¨D MÓ2Ð2°Q×6Ð6Á	ˆÐJÜ"'¨¤(Ó+¡(˜Q”!—&”&¡(ˆÐ+Ü—E‘Eˆˆq‰	Ø�ˆÜ¬u°Q¬xÓ8©x¨!œqŸvœv©xÑ8Ð9Ó:×DÑDÓFˆØÙ39Ó:±6¨aŸ6™6 $§&¡&ž>±6ˆKÐ:Ü˜1˜q�5–\�Ø˜A �E×" v¥y°4Õ'7Õ8Õ"ñ "ä˜1–X�Ø˜A— 6¨"¥:°µÕ#7¸$Õ#>Õ?•ñ à ˆFà�M‰M˜&Ô!Ü ›×1Ñ1Ó3ß$Ñ$ [Ó1ñ ˆC�à×!Ñ!¨Õ-Øä�4‹j˜�mˆØ�h‰h�s˜AÓˆÜ˜˜R� !¨eÔ4ˆ÷ Ü$ S¨$¯&©&°$°qµ'¸4À½7ÓCÐCÜ   d§f¡fÓ-Ð-ùò5 KùÚ+ùò 9ùâ:s   Ä4L?ÅMÆM	Ç#Mc           
     ó  aaa€ V P                   ^ 8w  d*   V P                  V P                   4      P                  4       # V P                  P	                  V P                   4      '       d   V P                  VR7      # / p\        RRR7      oV P                  P                  P                  P                  p\        VP                  S4      R4      w  rE\        V P                  P                  4       Fð  w  poSP                  4       p\        V4      ^,
          p\!        V^,           4       F²  p	WxV	,
          ,          p
V
^ 8X  d   K  Wi,
          V	3V9   dN   W&V	,
          V	3;;,          VP#                  V
4      \%        SV	,
          ^,           V4      ,          ,          uu&   Kw  VP#                  V
4      \%        SV	,
          ^,           V4      ,          W&V	,
          V	3&   K´  	  Kò  	  . pV Uu. uF  qf^ ,          NK  	  pp\'        V4      o\)        V4      pV P+                  4       pSV,           p/ p. p. p\!        SV^,           4       Fq  oSV9   dI   \-        VVV3R lVP/                  4        4       \0        P2                  R7      pVP5                  V4       KR  VP5                  \0        P2                  4       Ks  	  \7        W´4      pVP8                  p\;        VP                  P#                  VP                  R,          4      SRR	7      pVP=                  4       pV'       d   \)        V4      ^,           p\)        VV4      pVV,          p\?        V V4      p\        V4       UUu. uF  w  ppV\A        V4      ,          NK  	  ppp\        V4      V8  EdÄ   \!        V4       EFa  p\0        P2                  pV EF5  oVS^ ,          ,           ^ 8  d"   \0        P2                  WöS^ ,          ,           &   M°VS^ ,          ,           \        V4      8  d)   VVS^ ,          ,           ,          WöS^ ,          ,           &   MjVS^ ,          ,           V9   gV   \        R
VS^ ,          ,           ,          4      WöS^ ,          ,           &   VP5                  WöS^ ,          ,           ,          4       S^,          V8:  g   Kú  VVS,          PC                  SV4      WöS^ ,          ,           ,          ,          ,          pEK8  	  VP5                  V4       EKd  	  \E        V.VO5!  p\G        V\H        4      '       dŸ   \!        \        V4      V4       Fa  pWo9  d   \        R
V,          4      Wö&   Wö,          V9   d!   VP5                  VWö,          ,          4       KJ  VP5                  Wö,          4       Kc  	  V'       d   \K        VV4      V3.# \K        VV4      .# \!        \        V4      V4       Fx  pWo9  d   \        R
V,          4      Wö&   RpV F2  oWö,          S9   g   K  VP5                  SWö,          ,          4       RpK4  	  V'       d   Ka  VP5                  Wö,          4       Kz  	  V'       d   \K        VV4      V3.# \K        VV4      .# u upi u uppi )a  
Finds recurrence relation for the coefficients in the series expansion
of the function about :math:`x_0`, where :math:`x_0` is the point at
which the initial condition is stored.

Explanation
===========

If the point :math:`x_0` is ordinary, solution of the form :math:`[(R, n_0)]`
is returned. Where :math:`R` is the recurrence relation and :math:`n_0` is the
smallest ``n`` for which the recurrence holds true.

If the point :math:`x_0` is regular singular, a list of solutions in
the format :math:`(R, p, n_0)` is returned, i.e. `[(R, p, n_0), ... ]`.
Each tuple in this vector represents a recurrence relation :math:`R`
associated with a root of the indicial equation ``p``. Conditions of
a different format can also be provided in this case, see the
docstring of HolonomicFunction class.

If it's not possible to numerically compute a initial condition,
it is returned as a symbol :math:`C_j`, denoting the coefficient of
:math:`(x - x_0)^j` in the power series about :math:`x_0`.

Examples
========

>>> from sympy.holonomic.holonomic import HolonomicFunction, DifferentialOperators
>>> from sympy import QQ
>>> from sympy import symbols, S
>>> x = symbols('x')
>>> R, Dx = DifferentialOperators(QQ.old_poly_ring(x),'Dx')
>>> HolonomicFunction(Dx - 1, x, 0, [1]).to_sequence()
[(HolonomicSequence((-1) + (n + 1)Sn, n), u(0) = 1, 0)]
>>> HolonomicFunction((1 + x)*Dx**2 + Dx, x, 0, [0, 1]).to_sequence()
[(HolonomicSequence((n**2) + (n**2 + n)Sn, n), u(0) = 0, u(1) = 1, u(2) = -1/2, 2)]
>>> HolonomicFunction(-S(1)/2 + x*Dx, x, 0, {S(1)/2: [1]}).to_sequence()
[(HolonomicSequence((n), n), u(0) = 1, 1/2, 1)]

See Also
========

HolonomicFunction.series

References
==========

.. [1] https://hal.inria.fr/inria-00070025/document
.. [2] https://www3.risc.jku.at/publications/download/risc_2244/DIPLFORM.pdf

)Úlbr½   T©ÚintegerÚSnc              3   óz   <"  € T F0  w  rV^ ,          S8X  g   K  VP                  SSS,
          4      x € K2  	  R# 5i©r    N©r!  ©rÊ   rV  Úvr‡   r,  r½   s   &  €€€rE   rË   Ú0HolonomicFunction.to_sequence.<locals>.<genexpr>  s9   øé € ð CÙ'4™t˜q¸¸!½À¹	ô 1˜AŸF™F 1 a¨%¥i×0Ð0Û'4ùó   ƒ;š!;rB  ÚZ©ÚfilterúC_%sFr©   )&rÐ   Úshift_xÚto_sequencerÙ   rÑ   Ú
_frobeniusr   r{   rU   rà   r9   râ   r~   r‚   Ú
all_coeffsrƒ   r˜   r�   r   rH  rû   rh  rI  Úitemsr   rô   r‘   r8   r„   r.   Úkeysr  r   r!  r6   ra   rì   r7   )rc   rx  Údict1rà   rç   ré   r†   Ú	listofdmprh  rV  rU  rP   Úkeylistr-  Ú
smallest_nÚdummysÚeqsÚunknownsÚtempr„   Ú	all_rootsÚmax_rootrØ   r‡   Úu0ÚeqÚsoleqsr.  r,  r½   s   &&                     `    @@rE   rˆ  ÚHolonomicFunction.to_sequenceŸ  s  ú€ ðh �7‰7�aŒ<Ø—<‘< §¡Ó(×4Ñ4Ó6Ð6ð ×Ñ×'Ñ'¨¯©×0Ò0Ø—?‘? b�?Ó)Ð)àˆÜ�3 Ô%ˆØ×Ñ×%Ñ%×*Ñ*×.Ñ.ˆÜ" 3×#4Ñ#4°QÓ#7¸Ó>‰ˆô ˜d×.Ñ.×9Ñ9Ö:‰DˆAˆqàŸ™›ˆIÜ˜“^ aÕ'ˆFä˜6 A�:Ö&�Ø!¨1¥*Õ-�à˜A”:Ùà•E˜1�: Ô&Ø˜q�5 !˜*×%¨#¯,©,°uÓ*=ÄÀ1ÀqÅ5È1Å9ÈaÓ@PÕ*PÕQÕ%à),¯©°eÓ)<¼rÀ!ÀaÅ%È!Å)ÈQÓ?OÕ)O�E˜q�5 !˜*Ó%ó 'ñ ;ð" ˆÙ!&Ó'¡˜A�Q—4�4¡ˆÐ'Ü�G“ˆÜ�G“ˆØ—‘“ˆð ˜V•^ˆ
ØˆØˆØˆô �u˜e a�iÖ(ˆAØ�GŒ|Üö CØ',§{¡{¤}óCä!"§¡ô)�ð —
‘
˜4Ö à—
‘
œ1Ÿ6™6Ö"ñ )ô ! Ó(ˆð —	‘	ˆÜ˜!Ÿ&™&Ÿ/™/¨#¯.©.¸Õ*<Ó=¸qÈÔMˆ	Ø—N‘NÓ$ˆ	çÜ˜9“~¨Õ)ˆHÜ˜X zÓ2ˆJØ�Õˆä˜˜eÓ$ˆä+4°R¬=Ô9©=¡4 1 aˆa”)˜A“,×Ð©=ˆÑ9ô ˆr‹7�U�?ä˜6—]�Ü—V‘V�ä�Aà˜1˜Q�4•x !”|Ü+,¯6©6˜ 1 Q¥4�xÒ(à˜Q˜q�T�¤C¨£GÔ+Ø+-¨a°!°Aµ$­h­<˜ 1 Q¥4�xÒ(à  1¥�X¨Ô/Ü+1°&¸1¸qÀ½t½8Õ2DÓ+E˜ 1 Q¥4�xÑ(Ø Ÿ™¨°1°Qµ4­xÕ(8Ô9à˜•t˜q–yØ˜e A�hŸm™m¨A¨qÓ1°F¸qÀ½t½8Õ4DÕDÕD›ñ ð —
‘
˜2—ñ% #ô* ˜3Ð* Ó*ˆFä˜&¤$×'Ò'äœs 2›w¨Ö.�Aà”Ü$*¨6°1­9Ó$5˜™	à•y FÔ*ØŸ	™	 &¨­Õ"3Ö4ð Ÿ	™	 &¥)Ö,ñ /÷ Ü.¨s°BÓ7¸ÐDÐEÐEÜ)¨#¨rÓ2Ð3Ð3äœ3˜r›7 EÖ*�à”?Ü & v¨q¥yÓ 1�F‘Ià�Û�AØ•y A–~ØŸ	™	 ! F¥I¥,Ô/Ø šñ  ÷ ‘qØ—I‘I˜f�iÖ(ñ +÷ Ü& s¨BÓ/°Ð<Ð=Ð=ä! # rÓ*Ð+Ð+ùòK (ùóJ :s   Ç*Y;Í"Z c                óP  aa,a-€ V P                  4       p. p. p\        VP                  4       4       Fi  pVP                  '       d"   VP	                  V.W%,          ,          4       K6  VP                  4       w  rgVP	                  WVV3.W%,          ,          4       Kk  	  VP                  R  R7       VP                  R R7       VP                  4        . pV Fu  p\        V4      ^ 8X  d   VP                  V.4       K'  V F6  o\        S^ ,          V,
          4      '       g   K$  SP                  V4        Ka  	  VP                  V.4       Kw  	  \        ;QJ d    R V 4       F  '       d   K   RM	  RM! R V 4       4      p	\        ;QJ d    R V 4       F  '       d   K   RM	  RM! R V 4       4      p
\        ;QJ d    R V 4       F  '       d   K   RM	  RM! R V 4       4      pV P                  4       R8X  dt   . p\        V P                  P                  4       4       FH  p\        VP                  4       4       F(  o\        SV4      '       g   K  VP                  V4       K*  	  KJ  	  EMV
'       d   V'       d   \        V4      .pMåV	'       d7   V Uu. uF  qU^ ,          NK  	  upV Uu. uF  qÝ^ ,          NK  	  up,           pM§V'       g%   V Uu. uF  p\        V4      V8X  d   K  VNK  	  ppM{V
'       gt   V P!                  4       '       d,   \#        V P                  ^ ,          4      P$                  R8X  d   \        V4      .pM%V Uu. uF  qU^ 8¼  g   K  VNK  	  pp\        V4      .p\'        RRR	7      o-V P(                  P*                  P,                  P.                  p\1        VP3                  S-4      R
4      w  pp. p\5        R4      pX EF(  p/ p\7        V P(                  P8                  4       EF  w  poSP;                  4       p\        V4      ^,
          p\=        V^,           4       FÙ  pVVV,
          ,          pV^ 8X  d   K  VV,
          VV,
          3V9   d]   VVV,
          VV,
          3;;,          VP?                  V4      \A        S-V,
          ^,           V,           V4      ,          ,          uu&   K�  VP?                  V4      \A        S-V,
          ^,           V,           V4      ,          VVV,
          VV,
          3&   KÛ  	  EK  	  . pV Uu. uF  qU^ ,          NK  	  pp\        V4      o,\C        V4      p\C        R V 4       4      p\        R V 4       4      pS,V,           p/ p. p . p!\=        S,V^,           4       Fq  oSV9   dI   \E        VV,V-3R lVPG                  4        4       \"        PH                  R7      p"VP                  V"4       KR  VP                  \"        PH                  4       Ks  	  \K        VV4      pVPL                  p#\O        VP,                  P?                  VP8                  R,          4      S-RR7      p$V$P                  4       p$V$'       d   \C        V$4      ^,           p%\C        V%V4      pV#V,          p#. p&V P                  4       R8X  d   V P                  V,          p&MµV P                  4       R8X  d¡   V^ 8¼  dš   \        V4      V8X  dŠ   \        V4      ^8X  dz   \Q        V V#\        V4      ,           4      p'\        V'4      \        V4      8”  dE   \=        \        V4      \        V'4      4       Uu. uF  pV'V,          \S        V4      ,          NK  	  p&p\        V&4      V#8  Ed0   \=        VV4       EFy  p\"        PH                  p(V EFM  oVS^ ,          ,           ^ 8  d#   \"        PH                  VVS^ ,          ,           &   MÅVS^ ,          ,           \        V&4      8  d*   V&VS^ ,          ,           ,          VVS^ ,          ,           &   M~VS^ ,          ,           V9   gj   \U        V4      RVS^ ,          ,           ,          ,           p)\'        V)4      VVS^ ,          ,           &   V!P                  VVS^ ,          ,           ,          4       S^,          V8:  g   EK  V(VS,          PW                  S-V4      VVS^ ,          ,           ,          ,          ,          p(EKP  	  V P                  V(4       EK|  	  \Y        V .V!O5!  p*\[        V*\\        4      '       dÛ   \=        \        V&4      V#4       Fx  pVV9  d(   \U        V4      RV,          ,           p)\'        V)4      VV&   VV,          V*9   d"   V&P                  V*VV,          ,          4       K`  V&P                  VV,          4       Kz  	  V'       d"   VP                  \_        VV&4      VV34       EK  VP                  \_        VV&4      V34       EK3  \=        \        V&4      V#4       F�  pVV9  d(   \U        V4      RV,          ,           p)\'        V)4      VV&   Rp+V* F4  oVV,          S9   g   K  V&P                  SVV,          ,          4       Rp+K6  	  V+'       d   Kw  V&P                  VV,          4       K‘  	  V'       d    VP                  \_        VV&4      VV34       MVP                  \_        VV&4      V34       V^,          pEK+  	  V# u upi u upi u upi u upi u upi u upi )c                 ó   € V ^,          # r¼   rª   ©r}   s   &rE   rF   Ú.HolonomicFunction._frobenius.<locals>.<lambda>j  ó   €  ! A¦$rH   )Úkeyc                 ó   € V ^,          # ©é   rª   r�  s   &rE   rF   rž  k  rŸ  rH   c              3   ó>   "  € T F  p\        V4      ^8H  x € K  	  R# 5i©r¢   N)rƒ   ri  s   & rE   rË   Ú/HolonomicFunction._frobenius.<locals>.<genexpr>~  s   é € Ð3©s¨!œ#˜a›& Až+«sùs   ‚FTc              3   ó*   "  € T F	  q^ 8¬  x € K  	  R# 5ir}  rª   ri  s   & rE   rË   r¦  €  s   é € Ð+¡U ˜!–V£Uùs   ‚c              3   ó8   "  € T F  p\        V4      x € K  	  R # 5ir@   )r   ri  s   & rE   rË   r¦  �  s   é € Ð2©E q”Z —]�]«Eùs   ‚r½   ry  r{  ÚCc              3   ó2   "  € T F  q^,          x € K  	  R# 5ir¥  rª   ri  s   & rE   rË   r¦  ¼  s   é € Ð-¡u !˜1Ÿš£uùó   ‚c              3   ó2   "  € T F  q^,          x € K  	  R# 5ir¥  rª   ri  s   & rE   rË   r¦  ½  s   é € Ð.© 1˜AŸ$š$«ùr«  c              3   óz   <"  € T F0  w  rV^ ,          S8X  g   K  VP                  SSS,
          4      x € K2  	  R# 5ir}  r~  r  s   &  €€€rE   rË   r¦  Æ  s9   øé € ð  GÙ+8¡4 1¸A¸a½DÀA¹Iô !5 §¡ q¨!¨e­)× 4Ð 4Û+8ùr‚  rB  rƒ  r„  z_%sr©   )0Ú	_indicialr   rŒ  Úis_realÚextendÚas_real_imagÚsortrƒ   r‘   r   rÍ   rí   rØ   r   rH  ró   rÜ   r   Ú	is_finiter   rÙ   r{   rU   rà   r9   râ   Úordr~   r‚   rŠ  r˜   r�   r   rû   rI  r‹  rô   r8   r„   r.   r  r   Úchrr!  r6   ra   rì   r7   ).rc   rx  ÚindicialrootsÚrealsÚcomplr†   rõ   rŒ   ÚgrpÚindependentÚallposÚallintÚrootstoconsiderr‡   Úposrootsrà   rç   ré   ÚfinalsolÚcharr  r�  rŽ  rh  rV  rU  rP   r�  r-  Údegree2r�  r‘  r’  r“  r”  r„   r•  r–  r—  rØ   r˜  Úletterr™  r.  r,  r½   s.   &&           `                              @@rE   r‰  ÚHolonomicFunction._frobenius\  s¨  ú€ àŸ™Ó(ˆàˆØˆÜ˜×+Ñ+Ó-Ö.ˆAØ�y�yˆyØ—‘˜a˜S =Õ#3Õ3Ö4à—~‘~Ó'‘�Ø—‘˜q Q˜i˜[¨=Õ+;Õ;Ö<ñ /ð 	�
‰
‘ˆ
Ô'Ø�
‰
‘ˆ
Ô'Ø�
‰
Œð ˆãˆAÜ�3‹x˜1Œ}Ø—
‘
˜A˜3”ÙÛ�Ü˜a �d Q�h×'Ô'Ø—H‘H˜Q”KÚñ ð
 —
‘
˜A˜3–ñ ÷ “cÑ3©sÓ3—c—c’cÑ3©sÓ3Ó3ˆç“Ñ+¡UÓ+——’Ñ+¡UÓ+Ó+ˆß“Ñ2©EÓ2——’Ñ2©EÓ2Ó2ˆð ×ÑÓ  DÔ(Ø ˆOÜ˜TŸW™WŸ\™\›^Ö,�Ü  ×!3Ñ!3Ó!5Ö6�AÜ# A q×)Ô)Ø'×.Ñ.¨qÖ1ó 7ó -÷
 ŸÜ" 5›z˜l‰OçÙ-0Ó1©S¨ Ÿt˜t©SÑ1Á5Ó4IÁ5¸a°q·T°TÁ5Ñ4IÕI‰OçÙ*/ÓC©% Q´s¸1³vÀ±{Ÿq˜q©%ˆOÐCˆOçà×'Ñ'×)Ò)¬Q¨t¯w©w°q­z«]×-DÑ-DÈÔ-NÜ#& u£: ,‘ñ (-Ó7¡u !°Q±ŸA˜A¡u�Ð7Ü#& x£= /�ä�3 Ô%ˆØ×Ñ×%Ñ%×*Ñ*×.Ñ.ˆÜ" 3×#4Ñ#4°QÓ#7¸Ó>‰ˆˆ1àˆÜ�3‹xˆä ˆAØˆEä! $×"2Ñ"2×"=Ñ"=×>‘��1àŸL™L›N�	Ü˜Y›¨!Õ+�ä˜v¨�zÖ*�AØ% f¨q¥jÕ1�Eà ”zÙ à˜A�˜q 1�u�~¨Ô.Ø˜q 1�u a¨!¥e˜n×-°#·,±,¸uÓ2EÌÈ1ÈqÍ5ÐSTÍ9ÐWXÍ=ÐZ[ÓH\Õ2\Õ]Õ-à14·±¸eÓ1DÄrÈ!ÈaÍ%ÐRSÍ)ÐVWÍ-ÐYZÓG[Õ1[˜˜q 1�u a¨!¥e˜nÓ-ô +ñ ?ð  ˆCÙ%*Ó+¡U ˜—t�t¡UˆGÐ+Ü˜“LˆEÜ˜“LˆEÜÑ-¡uÓ-Ó-ˆFÜÑ.©Ó.Ó.ˆGà �ˆJØˆFØˆCØˆHä˜5 %¨!¥)Ö,�Ø˜”<Üö  GØ+0¯;©;¬=ó Gä%&§V¡Vô-�Dð —J‘J˜tÖ$à—J‘JœqŸv™vÖ&ñ -ô % S¨!Ó,ˆCð —I‘IˆEÜ˜aŸf™fŸo™o¨c¯n©n¸RÕ.@ÓAÀ1ÈSÔQˆIØ!Ÿ™Ó(ˆIçÜ˜y›>¨AÕ-�Ü  ¨:Ó6�
Ø�ZÕˆEàˆBà×"Ñ"Ó$¨Ô,Ø—W‘W˜Q•Z‘à×$Ñ$Ó&¨%Ô/°A¸´F¼sÀ1»vÈ¼{ÌsÐSbÓOcÐghÔOhÜ  e¬c°!«f¥nÓ5�ä�r“7œS ›VÔ#Ü8=¼cÀ!»fÄcÈ"ÃgÔ8NÓOÑ8N°1˜"˜Q�%¤)¨A£,×.Ð.Ñ8N�BÐOä�2‹w˜�ä˜w¨×/�AÜŸ™�Bä"˜Ø˜q �t�8 aœ<Ü/0¯v©v˜F 1 q¨¥t¥8Ò,à  1¥�X¬¨B«Ô/Ø/1°!°a¸µdµ(­|˜F 1 q¨¥t¥8Ò,à!" Q q¥T¥¨VÔ!3Ü%(¨£Y°¸¸Q¸q½T½Õ1BÕ%B˜FÜ/5°f«~˜F 1 q¨¥t¥8Ñ,Ø$ŸO™O¨F°1°q¸µtµ8Õ,<Ô=à˜Q�4 1Ÿ9Ø %¨¥(§-¡-°°1Ó"5¸¸qÀ1ÀQÅ4½xÕ8HÕ"HÕH›Bñ #ð —J‘J˜r—Nñ% 0ô* ˜sÐ. XÓ.�ä˜f¤d×+Ò+ä"¤3 r£7¨EÖ2˜à Fœ?Ü%(¨£Y°¸µÕ%9˜FÜ(.¨v«˜F 1™Ià! !�9¨Ô.ØŸI™I f¨V°A­YÕ&7Ö8ð ŸI™I f¨Q¥iÖ0ñ 3÷ Ø Ÿ™Ô):¸3ÀÓ)CÀQÈ
Ð(SÔTÚ à Ÿ™Ô):¸3ÀÓ)CÀQÐ(GÔHÚ äœs 2›w¨Ö.�Aà ”Ü!$ T£¨U°A­XÕ!5˜Ü$*¨6£N˜˜q™	à�AÛ#˜Ø! !�9¨ž>ØŸI™I a¨¨q­	¥lÔ3Ø $šAñ $÷ ™1ØŸ	™	 &¨¥)Ö,ñ /÷ Ø—‘Ô!2°3¸Ó!;¸QÀ
Ð KÕLð —‘Ô!2°3¸Ó!;¸QÐ ?Ô@Ø�A�I‹DñA !ðB ˆùòm 2ùÒ4Iùò Dùò 8ùò< ,ùòT Ps0   Êl
Ê5lËlË3lÍlÍ#lÔ#lÝ"l#c                ó   aaaaa€ Vf   V P                  4       pMTp\        V\        4      '       d   \        V4      ^8X  d   V^ ,          p^ oMÜ\        V\        4      '       d$   \        V4      ^8X  d   V^,          oV^ ,          pM£\        V4      ^8X  d+   \        V^ ,          4      ^8X  d   V^ ,          ^ ,          p^ oMi\        V4      ^8X  d9   \        V^ ,          4      ^8X  d"   V^ ,          ^,          oV^ ,          ^ ,          pM!V Uu. uF  q`P	                  VR7      NK  	  up# V\        S4      ,
          p\        VP                  4      ^,
          pVP                  P                  pV P                  oV P                  p	VP                  P                  p
VP                  P                  P                  pVP                  4       pV
 Uu. uF!  qÜP                  VP!                  4       4      NK#  	  pp\#        V4       Uu. uF  qnV,          ) Wè,          ,          NK  	  upo\%        VP                  4      oV^,           V8  di   \#        V^,           V,
          W,
          4       FD  o\'        VVV3R l\#        V4       4       \(        P*                  R7      pSP-                  V4       KF  	  V'       d   S# \'        VV3R l\/        S4       4       \(        P*                  R7      pV'       d+   V\1        SV\        S4      ,           ,          S4      ,          pV	^ 8w  d   VP3                  SSV	,
          4      # V# u upi u upi u upi )aà  
Finds the power series expansion of given holonomic function about :math:`x_0`.

Explanation
===========

A list of series might be returned if :math:`x_0` is a regular point with
multiple roots of the indicial equation.

Examples
========

>>> from sympy.holonomic.holonomic import HolonomicFunction, DifferentialOperators
>>> from sympy import QQ
>>> from sympy import symbols
>>> x = symbols('x')
>>> R, Dx = DifferentialOperators(QQ.old_poly_ring(x),'Dx')
>>> HolonomicFunction(Dx - 1, x, 0, [1]).series()  # e^x
1 + x + x**2/2 + x**3/6 + x**4/24 + x**5/120 + O(x**6)
>>> HolonomicFunction(Dx**2 + 1, x, 0, [0, 1]).series(n=8)  # sin(x)
x - x**3/6 + x**5/120 - x**7/5040 + O(x**8)

See Also
========

HolonomicFunction.to_sequence
)Ú_recurc              3   ó”   <"  € T F=  pSV,           ^ 8¼  g   K  \        SV,          S4      SSV,           ,          ,          x € K?  	  R# 5ir}  )ÚDMFsubs)rÊ   r‡   r†   rP   Úsubs   & €€€rE   rË   Ú+HolonomicFunction.series.<locals>.<genexpr>i  s?   øé € ð =Ù%- °°Qµ¸!±ô =œW S¨¥V¨QÓ/°#°a¸!µeµ*×<Ò<Û%-ùs
   ƒA˜0ArB  c              3   óV   <"  € T F  w  rSVS,           ,          V,          x € K   	  R # 5ir@   rª   )rÊ   r†   r‡   Úconstantpowerr}   s   &  €€rE   rË   rÉ  p  s%   øé € ÐI¹.±$°!�1�q˜=Õ(Õ)¨A×-Ò-».ùs   ƒ&))rˆ  ra   Útuplerƒ   Úseriesró   r—  Ú
recurrencer„   r}   rÐ   r‚   r{   rU   rü   rý   rþ   r˜   r‹   rI  r   rô   r‘   r~   r3   r!  )rc   r½   Úcoefficientr„   rÅ  rÎ  r†   ÚlrV  rÐ   Úseq_dmprç   r	  r‡   ÚseqrU  ÚserrË  rP   rÈ  r}   s   &&&&& `          @@@@rE   rÍ  ÚHolonomicFunction.series(  sŒ  ü€ ð: Š>Ø×)Ñ)Ó+‰JàˆJä�j¤%×(Ò(¬S°«_ÀÔ-AØ# A�ˆJØ‰MÜ˜
¤E×*Ò*¬s°:«À!Ô/CØ& q�MˆMØ# A�‰Jä�‹_ Ô!¤c¨*°Q­-Ó&8¸AÔ&=Ø# A� qÕ)ˆJØ‰MÜ�‹_ Ô!¤c¨*°Q­-Ó&8¸AÔ&=Ø& q�M¨!Õ,ˆMØ# A� qÕ)‰Já3=Ó>±:¨a—K‘K q�KÖ)±:Ñ>Ð>à”�MÓ"Õ"ˆÜ�
—‘Ó Õ"ˆØ×!Ñ!×'Ñ'ˆØ�F‰FˆØ�W‰WˆØ×'Ñ'×2Ñ2ˆØ×!Ñ!×(Ñ(×-Ñ-ˆØ�K‰K‹MˆÙ+2Ó3©7 a�u‰u�Q—Y‘Y“[Ö!©7ˆÐ3Ü).¨q¬Ó2© A�A•ˆw˜�×Ð©Ñ2ˆÜ�:—=‘=Ó!ˆàˆq�5�1Œ9ä˜1˜q�5 1�9 a¥eÖ,�Üö =Ü%*¨1¤Xó=ÜDEÇFÁFôL�à—
‘
˜5Ö!ñ -÷
 ØˆJäÕI¼)ÀC¼.ÓIÜŸ™ô ˆçØ”5˜˜Q¤ ]Ó!3Õ3Õ4°aÓ8Õ8ˆCØ�Œ7Ø—8‘8˜A˜q 2�vÓ&Ð&Øˆ
ùò= ?ùò 4ùÚ2s   ÄMÇ'MÈMc                óv  a	a
aaa€ V P                   ^ 8w  d*   V P                  V P                   4      P                  4       # V P                  P                  pV P                  P
                  P                  o	V P                  oS	P                  pS	P                  pV	V3R lo
\        R V 4       4      p^
\        ^V4      \        ^V P                  P                  4      ,           ,          oV
V3R lo\        V3R l\        V4       4       4      p\        V4       F�  w  rgVP                  4       p\        V4      ^,
          p^ We,           u;8:  d   V8:  d'   M M#W(WF,
          V,
          ,          V,          ,           pVS	P!                  SV,
          4      ,          pKƒ  	  \#        S	P%                  V4      S4      # )z*
Computes roots of the Indicial equation.
c                 ó~   <€ \        SP                  V 4      SR R7      p^ VP                  4       9   d
   V^ ,          # ^ # )rƒ  r„  )r.   r�   rŒ  )ÚpolyÚroot_allrç   r}   s   & €€rE   Ú_pole_degreeÚ1HolonomicFunction._indicial.<locals>._pole_degree†  s5   ø€ Ü˜QŸZ™Z¨Ó-¨q¸Ô=ˆHØ�H—M‘M“OÔ#Ø •{Ð"árH   c              3   ó@   "  € T F  qP                  4       x € K  	  R # 5ir@   rg  )rÊ   r‡   s   & rE   rË   Ú.HolonomicFunction._indicial.<locals>.<genexpr>�  s   é € Ð4© A—X‘X—Z�Z«ùrk  c                 ó<   <€ V P                   '       d   S# S! V 4      # r@   )rG  )ÚqrÙ  Úinfs   &€€rE   rF   Ú-HolonomicFunction._indicial.<locals>.<lambda>�  s   ø€ ˜qŸyŸy˜y˜Ð=©l¸1«oÐ=rH   c              3   óF   <"  € T F  w  rS! V4      V,
          x € K  	  R # 5ir@   rª   )rÊ   r‡   rÞ  Údegs   &  €rE   rË   rÜ  ‘  s   øé € Ð=Ñ'<™t˜q‘�A“˜—
’
Ó'<ùs   ƒ!)rÐ   r‡  r®  rÙ   r‚   r{   rU   r}   r^   r_   rû   r„   rH  r~   rŠ  rƒ   r€   r.   r�   )rc   Ú
list_coeffr.  Úyrh  rŒ   r†   r‡   rŽ  rç   rÙ  râ  rß  r}   s   &        @@@@@rE   r®  ÚHolonomicFunction._indicialx  sG  ü€ ð
 �7‰7�aŒ<Ø—<‘< §¡Ó(×2Ñ2Ó4Ð4à×%Ñ%×0Ñ0ˆ
Ø×Ñ×#Ñ#×(Ñ(ˆØ�F‰FˆØ�F‰FˆØ�E‰Eˆö	ô Ñ4©Ó4Ó4ˆØ”C˜˜6“N¤S¨¨D×,<Ñ,<×,BÑ,BÓ%CÕCÕDˆå=ˆÜÔ=¤y°Ô'<Ó=Ó=ˆä˜jÖ)‰DˆAØŸ™›ˆIÜ˜“^ aÕ'ˆFØ�A•EÖ#˜V×#Ø &¥*¨q¥.Õ1°AÕ5Õ5�Ø�—‘˜a !�eÓ$Õ$ŠAñ *ô �Q—Z‘Z “] AÓ&Ð&rH   c                óô  € ^ RI Hp Rp\        VR4      '       g·   Rp\        V4      pV P                  V8X  d   V! W.W$R7      R,          # VP
                  '       g   \        hV P                  pW‡8”  d   V) p\        Wx,
          V,          4      p	Wƒ,           .p\        V	^,
          4       F"  p
VP                  VR,          V,           4       K$  	  \        V P                  P                  P                  P                  V P                  P                  R,          4      V P                   4       F$  p
W P                  8X  g	   W¡9   g   K  \#        W
4      h	  V'       d   V! WW$R7      R,          # V! WW$R7      # )a¹  
Finds numerical value of a holonomic function using numerical methods.
(RK4 by default). A set of points (real or complex) must be provided
which will be the path for the numerical integration.

Explanation
===========

The path should be given as a list :math:`[x_1, x_2, \dots x_n]`. The numerical
values will be computed at each point in this order
:math:`x_1 \rightarrow x_2 \rightarrow x_3 \dots \rightarrow x_n`.

Returns values of the function at :math:`x_1, x_2, \dots x_n` in a list.

Examples
========

>>> from sympy.holonomic.holonomic import HolonomicFunction, DifferentialOperators
>>> from sympy import QQ
>>> from sympy import symbols
>>> x = symbols('x')
>>> R, Dx = DifferentialOperators(QQ.old_poly_ring(x),'Dx')

A straight line on the real axis from (0 to 1)

>>> r = [0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1]

Runge-Kutta 4th order on e^x from 0.1 to 1.
Exact solution at 1 is 2.71828182845905

>>> HolonomicFunction(Dx - 1, x, 0, [1]).evalf(r)
[1.10517083333333, 1.22140257085069, 1.34985849706254, 1.49182424008069,
1.64872063859684, 1.82211796209193, 2.01375162659678, 2.22553956329232,
2.45960141378007, 2.71827974413517]

Euler's method for the same

>>> HolonomicFunction(Dx - 1, x, 0, [1]).evalf(r, method='Euler')
[1.1, 1.21, 1.331, 1.4641, 1.61051, 1.771561, 1.9487171, 2.14358881,
2.357947691, 2.5937424601]

One can also observe that the value obtained using Runge-Kutta 4th order
is much more accurate than Euler's method.
)Ú_evalfFr  T)ÚmethodÚderivativesr©   )Úsympy.holonomic.numericalrç  r  r   rÐ   r#  r  ró   r˜   r‘   r.   rÙ   r{   rU   r�   r‚   r}   r<   )rc   Úpointsrè  Úhré  rç  ÚlprŒ   rõ   r½   r†   s   &&&&&      rE   r"  ÚHolonomicFunction.evalfœ  s4  € õ\ 	5Øˆô �v˜z×*Ò*ØˆBÜ�&“	ˆAØ�w‰w˜!Œ|Ù˜d C°ÔPÐQSÕTÐTà—;—;�;Ü)Ð)à—‘ˆAØŒuØ�B�Ü�Q•U˜a•KÓ ˆAØ•e�WˆFÜ˜1˜q�5–\�Ø—‘˜f R�j¨1�nÖ-ñ "ô �t×'Ñ'×.Ñ.×3Ñ3×<Ñ<¸T×=MÑ=M×=XÑ=XÐY[Õ=\Ó]Ð_c×_eÑ_eÖfˆAØ—G‘GŒ|˜qž{Ü& tÓ/Ð/ñ g÷ Ù˜$¨vÔOÐPRÕSÐSÙ�d¨6ÔKÐKrH   c                óf  € V P                   P                  P                  P                  pVP	                  V4      p\        VR4      w  rEV P                   P                   Uu. uF  qc! VP                  4       4      NK  	  pp\        Wt4      p\        WqV P                  V P                  4      # u upi )z}
Changes only the variable of Holonomic Function, for internal
purposes. For composition use HolonomicFunction.composition()
r[   )rÙ   r{   rU   rà   râ   rX   r‚   rþ   r]   rÖ   rÐ   rØ   )rc   Úzrà   rç   r{   ré   r‡   rP   s   &&      rE   Úchange_xÚHolonomicFunction.change_xç  s’   € ð ×Ñ×%Ñ%×*Ñ*×.Ñ.ˆØ×Ñ˜aÓ ˆÜ)¨!¨TÓ2‰	ˆØ'+×'7Ñ'7×'BÒ'BÓCÑ'B !ˆq�—‘“Ž~Ñ'BˆÐCÜ# CÓ0ˆÜ  ¨¯©°$·'±'Ó:Ð:ùò Ds   Á"B.c           
     óê  € V P                   pV P                  P                  pV P                  P                  P                  pV Uu. uF8  qTP                  VP                  V4      P                  W"V,           4      4      NK:  	  pp\        W`P                  P                  4      pV P                  V,
          pV P                  4       '       g   \        Wb4      # \        WbWpP                  4      # u upi )z
Substitute `x + a` for `x`.
)r}   rÙ   r‚   r{   rU   r€   r�   r!  r]   rÐ   rÜ   rÖ   rØ   )rc   rõ   r}   ÚlistaftershiftrU   r†   rP   rÐ   s   &&      rE   r‡  ÚHolonomicFunction.shift_xô  s¼   € ð
 �F‰FˆØ×)Ñ)×4Ñ4ˆØ×Ñ×&Ñ&×+Ñ+ˆáIWÓXÉÀA�‰˜tŸ}™}¨QÓ/×4Ñ4°Q¸A½Ó>Ö?ÉˆÐXÜ" 3×(8Ñ(8×(?Ñ(?Ó@ˆØ�W‰W�q�[ˆØ×#Ñ#×%Ò%Ü$ SÓ,Ð,Ü  ¨¯W©WÓ5Ð5ùò Ys   Á>C0c                óÆ  a€ Vf   V P                  4       pMTp\        V\        4      '       d'   \        V4      ^8X  d   V^,          pV^ ,          p^ pEM'\        V\        4      '       d-   \        V4      ^8X  d   V^,          pV^,          pV^ ,          pMå\        V4      ^8X  d;   \        V^ ,          4      ^8X  d$   V^ ,          ^,          pV^ ,          ^ ,          p^ pM›\        V4      ^8X  dI   \        V^ ,          4      ^8X  d2   V^ ,          ^,          pV^ ,          ^,          pV^ ,          ^ ,          pMCV P	                  W^ ,          R7      pVR,           F  pW`P	                  WR7      ,          pK  	  V# VP
                  pVP                  oV P                  p	V P                  p
SP                  pV^ 8X  Ed»   \        SP                  P                  P                  SP                  ^ ,          4      VP                  RR7      p\         P"                  p\%        V4       F¸  w  r×V^ 8  g   \'        V4      '       g   K  \)        V4      pV\        V4      8  dY   \        W‡,          \*        \,        34      '       d   W‡,          P/                  4       W‡&   WhV,          W—,          ,          ,          pK’  V\1        RV,          4      W—,          ,          ,          pKº  	  \        V\*        \,        34      '       d   VP/                  4       W•,          ,          pMWiV,          ,          pV'       d&   V
^ 8w  d   VP3                  W™V
,
          4      3.# V3.# V
^ 8w  d   VP3                  W™V
,
          4      # V# WK,           \        V4      8”  d   \5        R4      h\6        ;QJ d,    V3R lSP                  ^R
  4       F  '       g   K   RM!	  R	M! V3R lSP                  ^R
  4       4      '       d   \9        W P                  4      hSP                  ^ ,          pSP                  R
,          p\        VP;                  4       \*        \,        34      '       dŒ   \!        VP;                  4       P/                  4       4      W¾P=                  4       ,          ,          ) \!        VP;                  4       P/                  4       4      W¿P=                  4       ,          ,          ,          pMn\!        VP;                  4       4      W¾P=                  4       ,          ,          ) \!        VP;                  4       4      W¿P=                  4       ,          ,          ,          p^ p\        SP                  P                  P                  V4      VP                  4      p\        SP                  P                  P                  V4      VP                  4      pV'       d   . p\?        WK,           4       EFB  pWt8  d|   V'       dM   XPA                  \!        W‡,          4      W—V,           ,          ,          P3                  W™V
,
          4      34       M%V\!        W‡,          4      W—,          ,          ,          pK…  \!        W‡,          4      ^ 8X  d   K�  . p. p\C        VPE                  4       4       F:  pVPG                  \I        VV,
          V,          4      .VV,          ,          4       K<  	  \C        VPE                  4       4       F:  pVPG                  \I        VV,
          V,          4      .VV,          ,          4       K<  	  ^V9   d   VPK                  ^4       MVPA                  ^4       V'       d~   XPA                  \!        W‡,          4      W—V,           ,          ,          P3                  W™V
,
          4      \M        VVVW›,          ,          4      P3                  W™V
,
          4      34       EKþ  V\!        W‡,          4      \M        VVVW›,          ,          4      ,          W—,          ,          ,          pEKE  	  V'       d   X# WiV,          ,          pV
^ 8w  d   VP3                  W™V
,
          4      # V# )a)  
Returns a hypergeometric function (or linear combination of them)
representing the given holonomic function.

Explanation
===========

Returns an answer of the form:
`a_1 \cdot x^{b_1} \cdot{hyper()} + a_2 \cdot x^{b_2} \cdot{hyper()} \dots`

This is very useful as one can now use ``hyperexpand`` to find the
symbolic expressions/functions.

Examples
========

>>> from sympy.holonomic.holonomic import HolonomicFunction, DifferentialOperators
>>> from sympy import ZZ
>>> from sympy import symbols
>>> x = symbols('x')
>>> R, Dx = DifferentialOperators(ZZ.old_poly_ring(x),'Dx')
>>> # sin(x)
>>> HolonomicFunction(Dx**2 + 1, x, 0, [0, 1]).to_hyper()
x*hyper((), (3/2,), -x**2/4)
>>> # exp(x)
>>> HolonomicFunction(Dx - 1, x, 0, [1]).to_hyper()
hyper((), (), x)

See Also
========

from_hyper, from_meijerg
)Úas_listrÅ  r¡   rç   r„  r†  z+Can't compute sufficient Initial Conditionsc              3   óh   <"  € T F'  qSP                   P                  P                  8g  x € K)  	  R # 5ir@   rÉ   ©rÊ   r†   rD   s   & €rE   rË   Ú-HolonomicFunction.to_hyper.<locals>.<genexpr>m  s$   øé € ÐCÑ0B¨1�A—H‘H—M‘M×&Ñ&Ö&Ó0Bùs   ƒ/2TFr©   )'rˆ  ra   rÌ  rƒ   Úto_hyperr—  rÎ  r}   rÐ   r„   r.   r{   rU   r�   r‚   r½   r   rô   r~   r   ró   r)   r*   Úas_exprr   r!  r  Úanyr;   ÚLCrh  r˜   r‘   r   rŒ  r°  r5   Úremover%   )rc   r÷  rÅ  rÎ  r�  rË  rP   r†   r—  r}   rÐ   ÚmÚnonzerotermsr‡   rõ   rŒ   r&  Úarg1Úarg2Ú	listofsolÚapÚbqrV  rD   s   &&&                    @rE   rû  ÚHolonomicFunction.to_hyper  s  ø€ ðF Š>Ø×)Ñ)Ó+‰JàˆJä�j¤%×(Ò(¬S°«_ÀÔ-AØ# A�ˆJØ# A�ˆJØŠMÜ˜
¤E×*Ò*¬s°:«À!Ô/CØ# A�ˆJØ& q�MˆMØ# A�‰JÜ�‹_ Ô!¤c¨*°Q­-Ó&8¸AÔ&=Ø# A� qÕ)ˆJØ# A� qÕ)ˆJØ‰MÜ�‹_ Ô!¤c¨*°Q­-Ó&8¸AÔ&=Ø# A� qÕ)ˆJØ& q�M¨!Õ,ˆMØ# A� qÕ)‰Jà—-‘-¨À1½�-ÓFˆCØ —^�^�Ø—}‘}¨W�}Ó?Õ?’ñ $àˆJà�]‰]ˆØ×!Ñ!ˆØ�F‰FˆØ�W‰Wˆð �G‰Gˆð ��6Ü  §¡§¡×!7Ñ!7¸¿¹ÀQ½Ó!HÈ*Ï,É,Ð_bÔcˆLä—&‘&ˆCÜ! ,Ö/‘�à�q”5¤
¨1§¢Ùä˜“F�Ø”s˜2“w”;Ü! "¥%¬+´{Ð)C×DÒDØ "¥§¡£˜™Ø˜a�5 1¥4�<Õ'’Cð œ6 &¨!¥)Ó,¨q­tÕ3Õ3’Cñ 0ô ˜#¤¬[Ð9×:Ò:Ø—k‘k“m aÕ&6Õ6‘à˜}Õ,Õ,�ßØ˜”7Ø ŸX™X a¨R­Ó0Ð3Ð4Ð4Ø˜�yÐ Ø�QŒwØ—x‘x  r¥6Ó*Ð*ØˆJà�>œC ›GÔ#Ü%Ð&SÓTÐT÷ ‹3ÔC°·±¸Q¸rÑ0BÓC�3�3Š3ÔC°·±¸Q¸rÑ0BÓC×CÒCÜ% d¯G©GÓ4Ð4à�L‰L˜�OˆØ�L‰L˜Õˆô �a—d‘d“fœ{¬KÐ8×9Ò9Ü�Q—T‘T“V—^‘^Ó%Ó&¨¯X©X«Z­Õ8Ð9¼Q¸q¿t¹t»v¿~¹~Ó?OÓ=PÐST×W_ÑW_ÓWaÕSbÕ=bÕc‰Aä�Q—T‘T“V“9˜q§8¡8£:�Õ.Ð/´1°Q·T±T³V³9¸qÇ8Á8Ã:½Õ3NÕOˆAàˆä�Q—X‘X—]‘]×+Ñ+¨AÓ.°
·±Ó=ˆÜ�Q—X‘X—]‘]×+Ñ+¨AÓ.°
·±Ó=ˆ÷ ØˆIÜ�z•~×&ˆAð Œ~ßØ×$Ñ$¤q¨­£x°!¸µoÕ2FÕ'F×&LÑ&LÈQÐRTÕPTÓ&UÐ%XÕYàœ1˜R�U›8 a¥d�?Õ*�CÙô
 �•‹x˜1Œ}ÙàˆBØˆBô ˜TŸY™Y›[Ö)�Ø—	‘	œ9 a¨!¥e¨q¥[Ó1Ð2°T¸!µWÕ<Ö=ñ *ô ˜TŸY™Y›[Ö)�Ø—	‘	œ9 a¨!¥e¨q¥[Ó1Ð2°T¸!µWÕ<Ö=ñ *ð �BŒwØ—	‘	˜!•à—	‘	˜!”ßØ× Ñ ¤1 R¥U£8¨A°-µÕ,@Õ#@×"FÑ"FÀqÈBÍ$Ó"OÔRWÐXZÐ\^Ð`aÐbcÕbfÕ`fÓRg×QmÑQmÐnoÐsuÕquÓQvÐ!w×xà”q˜�“x¤%¨¨B°°AµDµÓ"9Õ9¸A½DÕ@Õ@“ñK '÷L ØÐØ�}Õ$Õ$ˆØ�Œ7Ø—8‘8˜A 2�vÓ&Ð&àˆ
rH   c                óP   € \        V P                  4       4      P                  4       # )a÷  
Converts a Holonomic Function back to elementary functions.

Examples
========

>>> from sympy.holonomic.holonomic import HolonomicFunction, DifferentialOperators
>>> from sympy import ZZ
>>> from sympy import symbols, S
>>> x = symbols('x')
>>> R, Dx = DifferentialOperators(ZZ.old_poly_ring(x),'Dx')
>>> HolonomicFunction(x**2*Dx**2 + x*Dx + (x**2 - 1), x, 0, [0, S(1)/2]).to_expr()
besselj(1, x)
>>> HolonomicFunction((1 + x)*Dx**3 + Dx**2, x, 0, [1, 1, 1]).to_expr()
x*log(x + 1) + log(x + 1) + 1

)r4   rû  Úsimplifyr±   s   &rE   r   ÚHolonomicFunction.to_expr´  s   € ô& ˜4Ÿ=™=›?Ó+×4Ñ4Ó6Ð6rH   c                ó  € RpVfD   \        V P                  4      V P                  P                  8”  d   \        V P                  4      pV P                  P                  P
                  P                  p \        V P                  4       V P                  WVR7      pV'       d   XP                  V8X  d   V# V P                  VRR7      p\        V P                  V P                  W4      #   \        \        3 d    Rp Ldi ; i)a‚  
Changes the point `x0` to ``b`` for initial conditions.

Examples
========

>>> from sympy.holonomic import expr_to_holonomic
>>> from sympy import symbols, sin, exp
>>> x = symbols('x')

>>> expr_to_holonomic(sin(x)).change_ics(1)
HolonomicFunction((1) + (1)*Dx**2, x, 1, [sin(1), cos(1)])

>>> expr_to_holonomic(exp(x)).change_ics(2)
HolonomicFunction((-1) + (1)*Dx, x, 2, [exp(2)])
T)r}   rÐ   ÚlenicsrB   F)ré  )rƒ   rØ   rÙ   r„   r{   rU   rB   Úexpr_to_holonomicr   r}   r:   r;   rÐ   r"  rÖ   )rc   rŒ   r  Úsymbolicrà   rP   rØ   s   &&&    rE   r  ÚHolonomicFunction.change_icsÉ  sÎ   € ð$ ˆàŠ>œc $§'¡'›l¨T×-=Ñ-=×-CÑ-CÔCÜ˜Ÿ™“\ˆFØ×Ñ×%Ñ%×*Ñ*×1Ñ1ˆð	Ü# D§L¡L£N°d·f±fÀÐZ]Ô^ˆC÷ ˜Ÿ™ !œØˆJà�Z‰Z˜ tˆZÓ,ˆÜ  ×!1Ñ!1°4·6±6¸1ÓAÐAøô $Ô%8Ð9ô 	ØŠHð	ús   Á5'C+ Ã+DÄ Dc                ó  € V P                  RR7      p\        P                  pV F\  p\        V4      ^8X  d   W#^ ,          ,          pK$  \        V4      ^8X  g   K6  W#^ ,          \	        V^,          4      ,          ,          pK^  	  V# )a‚  
Returns a linear combination of Meijer G-functions.

Examples
========

>>> from sympy.holonomic import expr_to_holonomic
>>> from sympy import sin, cos, hyperexpand, log, symbols
>>> x = symbols('x')
>>> hyperexpand(expr_to_holonomic(cos(x) + sin(x)).to_meijerg())
sin(x) + cos(x)
>>> hyperexpand(expr_to_holonomic(log(x)).to_meijerg()).simplify()
log(x)

See Also
========

to_hyper
T)r÷  )rû  r   rô   rƒ   Ú_hyper_to_meijerg)rc   rE  rP   r†   s   &   rE   Ú
to_meijergÚHolonomicFunction.to_meijergì  sj   € ð, �m‰m DˆmÓ)ˆÜ�f‰fˆãˆAÜ�1‹v˜Œ{Ø˜•t•’ä�Q“˜1–Ø˜•tÔ/°°!µÓ5Õ5Õ5’ñ ð ˆ
rH   )rÙ   r}   rÐ   rØ   r}  ©F©T)é   FTN)ÚRK4gš™™™™™©?F©FNr@   )'ro   rp   rq   rr   rs   rÓ   rd   rg   rt   rá   rí   rÜ   rö   r¥   r  r’   rm   rš   r�   r«   r®   r²   r¸   r¿   rh  ru  rˆ  r‰  rÍ  r®  r"  rñ  r‡  rû  r   r  r  ru   rv   rw   s   @rE   rÖ   rÖ   t  sÑ   ø‡ € ñ@ðD €Lôò:ð €Hòò<ò òLòO;ôb}?ò~K;òZò_?ðB €Hò!ò!òò&ò òDDò>.ô@{,ôzJôXNò`"'ôHILòV;ò6ô nò`7ô*!B÷F ð  rH   rÖ   Fc           	     óü  € V P                   pV P                  pV P                  ^,          pVP                  \        4      P                  4       p\        \        P                  ! V4      R4      w  rxWh,          p	^p
V F  pW©V,           ,          p
K  	  V	^,
          pTpV F  pWÜV,           ,          pK  	  W­,
          p\        V 4      pV\        \        39   d   \        Wö4      P                  V4      # \        V\        4      '       ga   \!        VWaVP"                  RR7      pV'       g%   V^,          p\!        VWaVP"                  RR7      pK,  \        Wö4      P                  WQV4      # \        V\        4      '       de   ^p\!        VWaVP"                  VRR7      pV'       g&   V^,          p\!        VWaVP"                  VRR7      pK-  \        Wö4      P                  WQV4      # \        Wö4      P                  V4      # )a   
Converts a hypergeometric function to holonomic.
``func`` is the Hypergeometric Function and ``x0`` is the point at
which initial conditions are required.

Examples
========

>>> from sympy.holonomic.holonomic import from_hyper
>>> from sympy import symbols, hyper, S
>>> x = symbols('x')
>>> from_hyper(hyper([], [S(3)/2], x**2/4))
HolonomicFunction((-x) + (2)*Dx + (x)*Dx**2, x, 1, [sinh(1), -sinh(1) + cosh(1)])
r[   F©Ú	use_limit)r  r  r6  Úatomsr   ÚpoprX   r+   râ   r4   r   r   rÖ   ru  ra   r%   Ú_find_conditionsr„   )ÚfuncrÐ   r"  rõ   rŒ   rð  r}   rç   r[   ÚxDxÚr1ÚaiÚxDx_1Úr2ÚbirP   ÚsimprØ   s   &&&               rE   Ú
from_hyperr'    s£  € ð  	�‰€AØ�‰€AØ�	‰	�!�€AØ	�‰”‹×ÑÓ€AÜ!¤"×"2Ò"2°1Ó"5°tÓ<�E€Að �$€CØ	
€BÛˆØ
�B�h�Šñ à�!�G€Eà	€BÛˆØ
�b�jÕŠñ à
�'€Cä�tÓ€Dà”Ô*Ð+Ô+Ü  Ó(×4Ñ4°QÓ7Ð7ô �dœE×"Ò"Ü˜d A¨3¯9©9ÀÔFˆßð �!�GˆBÜ! $¨¨s¯y©yÀEÔJŠBä  Ó(×4Ñ4°Q¸BÓ?Ð?ä�$œ×ÒØˆä˜d A¨3¯9©9°eÀuÔMˆßØ�!�GˆBÜ! $¨¨s¯y©y¸%È5ÔQŠBÜ  Ó(×4Ñ4°Q¸BÓ?Ð?ä˜SÓ$×0Ñ0°Ó3Ð3rH   Tc           	     óæ  € V P                   pV P                  p\        V P                  4      p\        V P                  4      p\        V4      p	V P
                  ^,          p
V
P                  \        4      P                  4       p\        VP                  V4      R4      w  rÍW½,          pV^,           pVRW‡,           V	,
          ,          ,          pV F  pVVV,
          ,          pK  	  ^pV F  pVVV,
          ,          pK  	  VV,
          pV'       g   \        VV4      P                  V
4      # \        V 4      pV\        \        39   d   \        VV4      P                  V
4      # \!        V\"        4      '       gb   \%        VW±VP&                  RR7      pV'       g%   V^,          p\%        VW±VP&                  RR7      pK,  \        VV4      P                  W¡V4      # \!        V\"        4      '       df   ^p\%        VW±VP&                  VRR7      pV'       g&   V^,          p\%        VW±VP&                  VRR7      pK-  \        VV4      P                  W¡V4      # \        VV4      P                  V
4      # )aŠ  
Converts a Meijer G-function to Holonomic.
``func`` is the G-Function and ``x0`` is the point at
which initial conditions are required.

Examples
========

>>> from sympy.holonomic.holonomic import from_meijerg
>>> from sympy import symbols, meijerg, S
>>> x = symbols('x')
>>> from_meijerg(meijerg(([], []), ([S(1)/2], [0]), x**2/4))
HolonomicFunction((1) + (1)*Dx**2, x, 0, [0, 1/sqrt(pi)])
r[   Fr  r©   )r  r  rƒ   ÚanÚbmr6  r  r   r  rX   râ   rÖ   ru  r4   r   r   ra   r&   r  r„   )r  rÐ   r"  r  rB   rõ   rŒ   r½   r   r  rð  r}   rç   r[   r   ÚxDx1r!  r"  r$  r%  rP   r&  rØ   s   &&&&&                  rE   Úfrom_meijergr,  N  sþ  € ð  	�‰€AØ�‰€AÜˆD�G‰G‹€AÜˆD�G‰G‹€AÜˆA‹€AØ�	‰	�!�€AØ	�‰”‹×ÑÓ€AÜ! &×"6Ñ"6°qÓ"9¸4Ó@�E€Að �$€CØ��7€DØ	
ˆB�!•%˜!•)ÕÕ	€BÛˆØ
ˆd�R�i�Šñ ð 
€BÛˆØ
ˆc�B�h�Šñ à
ˆr�'€CçÜ   aÓ(×4Ñ4°QÓ7Ð7ä�tÓ€Dà”Ô*Ð+Ô+Ü   aÓ(×4Ñ4°QÓ7Ð7ô �dœG×$Ò$Ü˜d A¨3¯9©9ÀÔFˆßØ�!�GˆBÜ! $¨¨s¯y©yÀEÔJŠBä   aÓ(×4Ñ4°Q¸BÓ?Ð?ä�$œ× Ò ØˆÜ˜d A¨3¯9©9°eÀuÔMˆßØ�!�GˆBÜ! $¨¨s¯y©y¸%È5ÔQŠBä   aÓ(×4Ñ4°Q¸BÓ?Ð?ä˜S !Ó$×0Ñ0°Ó3Ð3rH   Úx_1N)Ú_mytypec           
     óˆ
  € \        V 4      p V P                  pV'       g-   \        V4      ^8X  d   VP                  4       pM"\	        R4      hW9   d   VP                  V4       \        V4      pVfO   V P                  \        4      '       d   \        pM\        p\        V4      ^ 8w  d   WX,          P                  4       p\        WW#WEVR7      p	V	'       d   V	# \        '       g   Vs/ s\        \        VR7       M V\        8w  d   Vs/ s\        \        VR7       V P                   '       Edµ   V P#                  V\$        4      p
\'        V
\$        4      pV\        9   d.   \        V,          pV^ ,          ^,          P)                  V4      pM¢\+        WRVR7      pV'       g   \,        hV'       d   W=n        V'       g	   V'       g	   W-n        V# V'       g   VP2                  P4                  p\7        WW$4      pV'       g   V^,          p\7        WW$4      pK  \9        VP2                  WV4      # V'       g	   V'       g9   VP;                  V P<                  ^ ,          4      pV'       d   W=n        W-n        V# V'       g   VP2                  P4                  p\7        WW$4      pV'       g   V^,          p\7        WW$4      pK  VP;                  V P<                  ^ ,          W.4      # V P<                  pV P>                  p
\A        V^ ,          VRVR7      pV
\B        J d;   \E        ^\        V4      4       F   pV\A        VV,          VRVR7      ,          pK"  	  M]V
\F        J d;   \E        ^\        V4      4       F   pV\A        VV,          VRVR7      ,          pK"  	  MV
\H        J d   Wß^,          ,          pW-n        V'       g   \,        hV'       d   W=n        V'       g	   V'       g   V# VP.                  '       d   V# V'       g   VP2                  P4                  pVP2                  PK                  V4      '       dÅ   VPM                  4       p\        V4      p\        V4      ^8X  dš   VV^ ,          ,          \N        PP                  8X  dw   V^ ,          pWV,
          V,          ,          p\7        VWV4      p\S        V4       UUu. uF  w  ppV\U        V4      ,          NK  	  pppVV/p\9        VP2                  WV4      # \7        WW$4      pV'       g   V^,          p\7        WW$4      pK  \9        VP2                  WV4      # u uppi )aý  
Converts a function or an expression to a holonomic function.

Parameters
==========

func:
    The expression to be converted.
x:
    variable for the function.
x0:
    point at which initial condition must be computed.
y0:
    One can optionally provide initial condition if the method
    is not able to do it automatically.
lenics:
    Number of terms in the initial condition. By default it is
    equal to the order of the annihilator.
domain:
    Ground domain for the polynomials in ``x`` appearing as coefficients
    in the annihilator.
initcond:
    Set it false if you do not want the initial conditions to be computed.

Examples
========

>>> from sympy.holonomic.holonomic import expr_to_holonomic
>>> from sympy import sin, exp, symbols
>>> x = symbols('x')
>>> expr_to_holonomic(sin(x))
HolonomicFunction((1) + (1)*Dx**2, x, 0, [0, 1])
>>> expr_to_holonomic(exp(x))
HolonomicFunction((-1) + (1)*Dx, x, 0, [1])

See Also
========

sympy.integrals.meijerint._rewrite1, _convert_poly_rat_alg, _create_table
z%Specify the variable for the function)rÐ   rØ   r  rB   r  )rB   F©r  rB   )r}   r  rB   )+r   Úfree_symbolsrƒ   r  Ú
ValueErrorrÿ  r‹   rD  r   r,   r+   rü   Ú_convert_poly_rat_algÚ_lookup_tableÚdomain_for_tableÚ_create_tableÚis_Functionr!  r-  r.  rñ  Ú_convert_meijerintr  rØ   rÐ   rÙ   r„   r  rÖ   ru  r6  r  r  r   r˜   r   r   rÑ   r®  r   r·   r~   r   )r  r}   rÐ   rØ   r  rB   r  ÚsymsÚ
extra_symsÚsolpolyÚfÚtrÐ  rP   r  r6  r†   rD   ÚgÚsingular_icsr‡   s   &&&&&&&              rE   r  r  —  s  € ôR �4‹=€DØ×Ñ€DçÜˆt‹9˜Œ>Ø�x‰x‹z‰AäÐDÓEÐEØ	
ŒØ�‰�AŒä�d“€Jà‚~Ø�8‰8”E�?Š?Ü‰FäˆFÜˆz‹?˜aÔØÕ'×1Ñ1Ó3ˆFô $ D°À&ÐbjÔk€GßØˆ÷ ‹=Ø!ÐØˆÜ”m¨FÖ3Ø	Ô#Ô	#Ø!ÐØˆÜ”m¨FÕ3ð ××ÑØ�I‰I�aœÓˆÜ�A”s‹OˆØ”ÔÜ˜aÕ ˆAØ�A•$�q•'×"Ñ" 1Ó%‰Cä$ T°uÀVÔLˆCßÜ)Ð)ßØ”ßŸØ”Ø�
ßØŸ™×.Ñ.�Ü" 4¨BÓ7ˆCßØ�a•�Ü& t°Ó;’Ü$ S§_¡_°a¸SÓAÐAç—XØ—/‘/ $§)¡)¨A¥,Ó/ˆCßØ”ØŒFØˆJßØ—_‘_×*Ñ*ˆFä˜t¨Ó3ˆßØ�!�GˆBÜ" 4¨BÓ7ŠCØ�‰˜tŸy™y¨�|¨RÓ5Ð5ð �9‰9€DØ�	‰	€AÜ
˜D �G q°5ÀÔ
H€CàŒCƒxÜ�qœ#˜d›)Ö$ˆAØÔ$ T¨!¥W°¸EÈ&ÔQÕQŠCò %ð 
Œc‹Ü�qœ#˜d›)Ö$ˆAØÔ$ T¨!¥W°¸EÈ&ÔQÕQŠCò %ð 
Œc‹Ø˜•7�lˆØ„FßÜ!Ð!ß	ØŒß	—Øˆ
Ø
‡v‡v€vØˆ
ßØ—‘×&Ñ&ˆØ
‡�×"Ñ" 2×&Ò&Ø�M‰M‹OˆÜ�‹GˆÜˆq‹6�QŒ;˜1˜Q˜q�T�7¤a§e¡eÔ+Ø�!•ˆAØ˜B� •{Õ"ˆAÜ+¨A¨q°fÓ=ˆLÜ9BÀ<Ô9PÔQÑ9P±°°A˜A¤	¨!£×,Ð,Ñ9PˆLÑQØ�LÐ!ˆBÜ$ S§_¡_°a¸RÓ@Ð@ä
˜4 BÓ
/€CßØ
ˆa�ˆÜ˜t¨Ó3Šä˜SŸ_™_¨a°SÓ9Ð9ùó Rs   Ó T>c                ó  € . p. pVP                   pVP                  4       pVP                  \        P                  4      p. p\        V 4       Fï  w  rš\        W¥P                  4      '       d0   VP                  VP                  V
P                  4       4      4       MV\        W¦P                  4      '       g+   VP                  VP                  \        V
4      4      4       MVP                  V
4       VP                  W‰,          P                  4       4       VP                  W‰,          P                  4       4       Kñ  	  V F  p	V	P                  V4      pK  	  V'       d   V) pVP                  VP                  4       4      p\        V4       F  w  ršW§,          W‰&   K  	  V! VR,          P                  4       VR,          P                  4       ,          P                  4       4      pV F  p	V	P                  V4      pK  	  VP                  VP                  4       4      p\        V4       FH  w  ršW«,          pV! VP                  4       VP                  4       ,          P                  4       4      W‰&   KJ  	  \!        W�4      # )z
Normalize a given annihilator
r©   )rU   rü   r€   r   r·   r~   ra   r   r‘   rý   rþ   r   ÚnumerÚdenomÚlcmÚgcdr]   )Úlist_ofr{   rú   ÚnumrB  rU   r	  Ú	lcm_denomÚlist_of_coeffr†   r‡   Ú	gcd_numerÚfrac_anss   &&&          rE   r  r  ;	  sø  € ð
 €CØ€EØ�;‰;€DØ�‰Ó€AØ—‘¤§¡Ó&€IØ€Mô ˜'Ö"‰ˆÜ�aŸ™×$Ò$Ø× Ñ  §¡ q§y¡y£{Ó!3Õ4Ü˜AŸw™w×'Ò'Ø× Ñ  §¡¬g°a«jÓ!9Õ:à× Ñ  Ô#ð 	�
‰
�=Õ#×)Ñ)Ó+Ô,ð 	�‰�]Õ%×+Ñ+Ó-Ö.ñ #ó ˆØ—E‘E˜)Ó$Š	ñ ÷ Ø�Jˆ	à—‘�i×'Ñ'Ó)Ó*€Iô ˜-Ö(‰ˆØ�=ˆÓñ )ñ �m BÕ'×-Ñ-Ó/°-ÀÕ2C×2IÑ2IÓ2KÕK×TÑTÓVÓW€Ió ˆØ—E‘E˜)Ó$Š	ñ ð —‘�i×'Ñ'Ó)Ó*€Iô ˜-Ö(‰ˆØ•=ˆÙ §¡Ó!1°H·N±NÓ4DÕ!D× MÑ MÓ OÓPˆÓñ )ô   Ó6Ð6rH   c                ó$  € . p\        V 4      ^,
          pVP                  \        V ^ ,          V4      4       \        V R,          4       F,  w  rEVP                  \        WQ4      W,          ,           4       K.  	  VP                  W,          4       V# )a  
Let a differential equation a0(x)y(x) + a1(x)y'(x) + ... = 0
where a0, a1,... are polynomials or rational functions. The function
returns b0, b1, b2... such that the differential equation
b0(x)y(x) + b1(x)y'(x) +... = 0 is formed after differentiating the
former equation.
r¡   )rƒ   r‘   rF  r~   )r‚   r	  rP   rõ   r†   r‡   s   &&    rE   r5  r5  t	  so   € ð €CÜˆJ‹˜!Õ€AØ‡J�JŒw�z !•} aÓ(Ô)ä˜* R�.Ö)‰ˆØ�
‰
”7˜1“= :¥=Õ0Ö1ñ *ð ‡J�Jˆz�}ÔØ€JrH   c                óâ  € V P                   pV P                  p\        ;QJ d    R V 4       F  '       g   K   RM	  RM! R V 4       4      '       d   \        V 4      # V P                  ^,          pR V 4       pRp\
        P                  3pR V 4       p\
        P                  pV F  p	V\        V	4      ,          pK  	  V F  p	V\        V	4      ,          pK  	  V\        WEWgV) 4      ,          # )z 
Converts a `hyper` to meijerg.
c              3   óV   "  € T F  q^ 8*  ;'       d    \        V4      V8H  x € K!  	  R# 5ir}  )ró   ri  s   & rE   rË   Ú$_hyper_to_meijerg.<locals>.<genexpr>�	  s%   é € Ð
.©2 a�‰6×!Ð!”c˜!“f ‘kÔ!«2ùs   ‚)’)TFc              3   ó4   "  € T F  p^V,
          x € K  	  R# 5ir¥  rª   ri  s   & rE   rË   rN  •	  s   é € Ð	™�Aˆ!ˆa�%Š%›ùó   ‚c              3   ó4   "  € T F  p^V,
          x € K  	  R# 5ir¥  rª   ri  s   & rE   rË   rN  ˜	  s   é € Ð
™"�Qˆ1ˆq�5Š5›"ùrP  rª   )
r  r  rý  r4   r6  r   rô   r·   r$   r&   )
r  r  r  rð  r)  Úanpr*  ÚbmqrV  r†   s
   &         rE   r  r  ˆ	  sÆ   € ð 
�‰€BØ	�‰€Bç
ƒsÑ
.©2Ó
.‡s‡s‚sÑ
.©2Ó
.×.Ò.Ü˜4Ó Ð à�	‰	�!�€Añ 
™Ó	€BØ
€CÜ
�&‰&ˆ€BÙ
™"Ó
€Cä	�‰€AãˆØ”�a“�LŠñ ó ˆØ”�a“�LŠñ ð Œw�r ¨!¨Ó,Õ,Ð,rH   c                ó4  € \        V 4      \        V4      8:  d;   \        W4       UUu. uF  w  r#W#,           NK  	  uppV\        V 4      R ,           pV# \        W4       UUu. uF  w  r#W#,           NK  	  uppV \        V4      R ,           pV# u uppi u uppi )znTakes polynomial sequences of two annihilators a and b and returns
the list of polynomials of sum of a and b.
N)rƒ   r  )Úlist1Úlist2rõ   rŒ   rP   s   &&   rE   r“   r“   ¥	  sŒ   € ô ˆ5ƒz”S˜“ZÔÜ!$ UÔ!2Ô3Ñ!2™˜ˆq�uˆuÑ!2Ò3°e¼CÀ»J¸KÐ6HÕHˆð €Jô "% UÔ!2Ô3Ñ!2™˜ˆq�uˆuÑ!2Ò3°e¼CÀ»J¸KÐ6HÕHˆØ€Jùó 4ùã3s   ¨BÁ"Bc                ó~  € V P                   P                  V P                  4      '       g   V P                  4       R8X  d   V P                  # V P                   pVP
                  p. pV P                  pVP                  P                  pVP                  4       pVP                   Fb  p\        W‚P                  P                  P                  4      '       g   K4  VP                  VP                  VP                  4       4      4       Kd  	  \        V4      V8  g   V\        V4      8:  d   V# \!        V4       U	u. uF  p	WI,          ) WC,          ,          NK  	  p
p	VR\#        \        V4      V4       p\!        W,
          4       Fž  p^ p\%        Wº4       Fn  w  r>\'        WàP                  4      p\)        VRR4      '       g   Vu u # \        V\*        \,        34      '       d   VP/                  4       pWÓV,          ,          pKp  	  VP                  V4       \1        W§4      p
K   	  W[\        V4      R ,           # u up	i )zm
Tries to find more initial conditions by substituting the initial
value point in the differential equation.
TNr³  )rÙ   rÑ   rÐ   rí   rØ   r„   r{   rU   rü   r‚   ra   r   r‘   rý   rþ   rƒ   r˜   rH  r  rÇ  Úgetattrr)   r*   rü  r5  )Ú	Holonomicr½   rÙ   rõ   r‚   rØ   rç   r	  r‡   r†   Úlist_redr  ré   rP   rŒ   rD   s   &&              rE   r  r  °	  sÊ  € ð ×Ñ×(Ñ(¨¯©×6Ò6¸)×:RÑ:RÓ:TÐX\Ô:\Ø�|‰|Ðà×'Ñ'€KØ×Ñ€Aà€Jà	�‰€BØ×Ñ×Ñ€AØ	�‰‹€Aà×#Ô#ˆÜ�a×+Ñ+×0Ñ0×6Ñ6×7Ô7Ø×Ñ˜aŸe™e A§I¡I£KÓ0Ö1ñ $ô ˆ2ƒw�„{�aœ3˜r›7”lØˆ	ä˜qœó#Ù!�Að •� ¥×.Ð.Ù!ð ð #à	ÐŒS”�R“˜!‹_Ð	€BÜ�1•5Ž\ˆØˆÜ˜Ö%‰DˆAÜ˜Ÿ<™<Ó(ˆAÜ˜1˜k¨4×0Ò0Ø”	Ü˜!œk¬;Ð7×8Ò8Ø—I‘I“K�Ø�q•5�LŠCñ &ð 	�	‰	�#ŒÜ$ XÓ1Šñ ð ”3�r“7�8�ÕÐùò#s   Ä:H:c                 óV  € \        V \        4      '       g   V P                  4       # VP                  V 4      pVP	                  V 4      pV) VP                  4       ,          W2P                  4       ,          ,           pV^,          pV! VP                  4       VP                  4       34      # r¢  )ra   r-   r’   rA  rB  rþ   )Úfracr	  r  rÞ  Úsol_numÚ	sol_denoms   &&    rE   rF  rF  Ù	  s|   € ä�dœC× Ò Ø�y‰y‹{Ðà	�‰�‹€AØ	�‰�‹€AØˆc�A—F‘F“H�n˜q§6¡6£8�|Õ+€GØ�1•€IÙˆg�o‰oÓ ×!2Ñ!2Ó!4Ð5Ó6Ð6rH   c                 óö  € \        V \        4      '       g   V # V P                  pV P                  p\        P
                  p\        P
                  pV'       d   ^ RIHp \        \        V4      4       FF  w  r‰V'       d%   \        V	4      P                  XP                  4      p	WYW,          ,          ,          pKH  	  \        \        V4      4       FF  w  r‰V'       d%   \        V	4      P                  XP                  4      p	WiW,          ,          ,          pKH  	  \        V\        \        34      '       d   VP                  4       p\        V\        \        34      '       d   VP                  4       pWV,          # )r    )Úmp)ra   r-   rF  Údenr   rô   Úmpmathr`  r~   Úreversedr   Ú
_to_mpmathÚprecr)   r*   rü  )
r\  rÐ   Úmpmr  rÞ  Úsol_pÚsol_qr`  r†   r‡   s
   &&&       rE   rÇ  rÇ  å	  s   € ä�dœC× Ò Øˆà�‰€AØ�‰€AÜ�F‰F€EÜ�F‰F€Eç
Ýäœ( 1›+Ö&‰ˆßÜ˜“
×%Ñ% b§g¡gÓ.ˆAØ�R•U•ÕŠñ 'ô
 œ( 1›+Ö&‰ˆßÜ˜“
×%Ñ% b§g¡gÓ.ˆAØ�R•U•ÕŠñ 'ô
 �%œ+¤{Ð3×4Ò4Ø—‘“ˆÜ�%œ+¤{Ð3×4Ò4Ø—‘“ˆà�=ÐrH   c                ó¬
  € V P                  4       pV'       g   V P                  4       pMRpV'       g�   V'       gy   V P                  4       w  ršV	P                  4       '       dN   V
P                  '       d<   \	        V
\
        4      '       d   \        V
4      p
V
P                  V
P                  rËRpMRpMRpV'       g   V'       g   V'       g   R# VP                  V4      p\        VR4      w  ppV P                  V4      '       g   \        VV^ V .4      # V'       Ed   V V,          V P                  V4      ,
          p\        VP                  VP                   RR7      pVP#                  V4      pVfÂ   V^ 8X  d»   V'       d³   VP%                  V 4      P'                  4       p\)        \+        V4      4       F(  w  ppV^ 8X  d   K  \-        \+        V4      4      VR pTp M	  \)        X4       F7  w  pp\	        V\.        \0        34      '       g   K$  VP3                  4       VV&   K9  	  X\5        V4      /pEMÔV'       d‚   V P7                  4       w  ppVV,          V,          VVP                  V4      ,          ,           VVP                  V4      ,          ,
          p\        VP                  VP                   RR7      pEMKV'       EdC   XVX,          ,          V,          ^,
          p\        VV4      P9                  X	4      P:                  pVP#                  V4      pVfë   V^ 8X  dä   V'       dÜ   Ve   V^8:  dÑ   VP%                  V	4      P'                  4       p\)        \+        V4      4       F_  w  ppV^ 8X  d   K  \	        V\.        \0        34      '       d   VP3                  4       p\5        V4      X
,          p\5        V4      V
,          p M	  \	        X\.        \0        34      '       d   VP3                  4       pX\5        V.4      /pV'       g	   V'       g   \        XWV4      # V'       g   XP<                  pXP#                  V4      '       dÅ   \        VW4      P?                  4       p\-        V4      p\A        V4      ^8X  d�   VV^ ,          ,          \4        PB                  8X  dm   V^ ,          pWV,
          V,          ,          p\E        VWV4      p\)        V4       UUu. uF  w  ppV\G        V4      ,          NK  	  pppVV/p\        VWV4      # \E        WW$4      pV'       g   V^,          p\E        WW$4      pK  \        VWV4      # u uppi )zG
Converts polynomials, rationals and algebraic functions to holonomic.
TFNr[   rù   )$Úis_polynomialÚis_rational_functionÚas_base_expr#  ra   r   r5   r  rÞ  râ   rX   rD  rÖ   r’   r  r‚   r{   rÑ   r€   rþ   r~   rc  r‹   r)   r*   rü  r   Úas_numer_denomru  rÙ   r„   r®  rƒ   r·   r  r   )r  r}   rÐ   rØ   r  rB   r  ÚispolyÚisratÚbasepolyÚratexpr   r½   Úis_algrç   ré   r[   rP   rÑ   rE  r†   r‡   rU  Úindicialr  rÞ  rD   rÐ  r>  r?  s   &&&&&&&                       rE   r3  r3  
  s.  € ð
 ×ÑÓ!€FßØ×)Ñ)Ó+‰àˆç—eØ×+Ñ+Ó-ÑˆØ×!Ñ!×#Ò#¨×(8×(8Ð(8Ü˜&¤%×(Ò(Ü" 6Ó*�Ø—8‘8˜VŸX™XˆqØ‰Fà‰Fàˆç—eŸvÙà×Ñ˜QÓ€AÜ! ! TÓ*�E€A€rð �8‰8�A�;Š;Ü   Q¨¨D¨6Ó2Ð2ç€và�R�i˜$Ÿ)™) A›,Õ&ˆÜ˜Ÿ™¨¯©¸eÔDˆØ—o‘o bÓ)ˆð Š:˜" œ'§kØ—,‘,˜tÓ$×,Ñ,Ó.ˆCÜ!¤(¨3£-Ö0‘��1Ø˜”6ÙÜœX c›]Ó+¨A¨BÐ/�Ø�Ùñ 1ô " %Ö(‘��1Ü˜a¤+¬{Ð!;×<Ô<Ø Ÿy™y›{�E˜!“Hñ )ð œA˜e›HÐ%ˆBùç	Ø×"Ñ"Ó$‰ˆˆ1à�!�e�b�j˜1˜qŸv™v a›y�=Õ(¨1¨q¯v©v°a«y­=Õ8ˆÜ˜Ÿ™¨¯©¸eÔDŠç	ˆØ�1�q•5�k˜BÕ Õ"ˆÜ  QÓ'×3Ñ3°HÓ=×IÑIˆØ—o‘o bÓ)ˆð Š:˜" œ'§kØŠ^˜v¨œ{Ø—,‘,˜xÓ(×0Ñ0Ó2ˆCÜ!¤(¨3£-Ö0‘��1Ø˜”6ÙÜ˜a¤+¬{Ð!;×<Ò<ØŸ	™	›�Aä˜!›˜f��Ü˜Q›4 &�=�Ùñ 1ô ˜%¤+¬{Ð!;×<Ò<ØŸ™›�ØœA˜u˜g›JÐ'ˆBç	—Ü   a¨RÓ0Ð0çØ—‘ˆà
‡��r×ÒÜ˜c 1Ó)×3Ñ3Ó5ˆÜ�‹GˆÜˆq‹6�QŒ;˜1˜Q˜q�T�7¤a§e¡eÔ+Ø�!•ˆAØ˜B� •{Õ"ˆAÜ+¨A¨q°fÓ=ˆLÜ9BÀ<Ô9PÔQÑ9P±°°A˜A¤	¨!£×,Ð,Ñ9PˆLÑQØ�LÐ!ˆBÜ$ S¨!°Ó4Ð4ä	˜$ 2Ó	.€BßØ
ˆa�ˆÜ˜d rÓ2Šä˜S !¨Ó,Ð,ùó Rs   Ó&Uc           	      óÄ  a€ \         P                  ! V S4      pV'       d   Vw  rVrxMR # V U	u. uF  q•V	^ ,          ,          NK  	  p
p	VP                  4       pV^ ,          S8X  d
   V^,          M\        P                  pV U	u. uF  qœV	^,          ,           NK  	  pp	V U	u. uF  q™^,          NK  	  pp	V3R lpV! V^ ,          V^ ,          4      w  ppV
^ ,          V,          \        VW#R7      ,          p\        ^\        V4      4       FC  p	V! Wé,          WÙ,          4      w  ppVW©,          V,          \        VW#R7      ,          ,          pKE  	  V# u up	i u up	i u up	i )Nc                 óÀ  <a€ V P                   R,          pVP                  \        4      '       d   VP                  \        \
        4      pVP                  SRR7      p\        V4      ^ ,          pW4,          pVP                  4       pV^ ,          S8X  d
   V^,          M\        P                  pW,          oV3R lV P                   ^ ,          ^ ,           4       pV3R lV P                   ^ ,          ^,           4       pV3R lV P                   ^,          ^ ,           4       p	V3R lV P                   ^,          ^,           4       p
VS) ,          \        Wx3Wš3V4      3# )r¢   F)r2  c              3   ó4   <"  € T F  qS,           x € K  	  R # 5ir@   rª   rù  s   & €rE   rË   Ú5_convert_meijerint.<locals>._shift.<locals>.<genexpr>Š
  ó   øé € Ð-™_˜�!�eŠe›_ùó   ƒc              3   ó4   <"  € T F  qS,           x € K  	  R # 5ir@   rª   rù  s   & €rE   rË   rw  ‹
  rx  ry  c              3   ó4   <"  € T F  qS,           x € K  	  R # 5ir@   rª   rù  s   & €rE   rË   rw  Œ
  rx  ry  c              3   ó4   <"  € T F  qS,           x € K  	  R # 5ir@   rª   rù  s   & €rE   rË   rw  �
  rx  ry  r©   )r6  rD  r	   r!  r   r   Úcollectr‹   rl  r   rô   r&   )r  r.  rð  ÚdrŒ   rõ   r=  r)  r  r*  r  rD   r}   s   &&         @€rE   Ú_shiftÚ"_convert_meijerint.<locals>._shift~
  sô   ù€ Ø�I‰I�b�MˆØ�5‰5”�8Š8Ø—‘”y¤#Ó&ˆAà�I‰I�a %ˆIÓ(ˆÜ�‹G�A�JˆØ�Dˆà�M‰M‹OˆØ�a•D˜A”IˆAˆaŽD¤1§6¡6ˆØ�EˆÜ-˜TŸY™Y q�\¨!ž_Ó-ˆÜ-˜TŸY™Y q�\¨!ž_Ó-ˆÜ-˜TŸY™Y q�\¨!ž_Ó-ˆÜ-˜TŸY™Y q�\¨!ž_Ó-ˆà�1�"�u”g˜r˜h¨¨°!Ó4Ð4Ð4rH   r0  )r'   Ú	_rewrite1rl  r   rô   r,  r˜   rƒ   )r  r}   r  rB   r6  ÚfacÚpor>  ré   r†   Úfac_listr=  r.  Úpo_listÚG_listr  rU  r   rP   s   &f&&               rE   r8  r8  n
  s3  ø€ Ü×Ò˜t QÓ'€DçØ‰ˆ��Aáñ %&Ó&¡A˜q�a˜•d—
�
¡A€HÐ&Ø
�‰Ó€AØ�!•˜”	ˆˆ!ŽœqŸv™v€AÙ!"Ó#¡˜A�1�Q•4�xˆx¡€GÐ#ÙÓ™A�q��dˆd™A€FÐõ5ñ& �f˜Q•i ¨¥Ó,�H€Eˆ1Ø
�1�+˜Õ
¤¨Q¸Ô QÕ
Q€Cô �1”c˜&“kÖ"ˆÙ˜&�) W¥ZÓ0‰ˆˆqØˆx�{˜UÕ"¤\°!¸hÔ%VÕVÕVŠñ #ð €JùòE 'ùò $ùÚs   ­EÂEÂ Ec                óö  a € RV 3R llpVP                  \        4      p\        VR4      w  rEV! \        \        4      V^,          ^,           \        ^ ^ ^.4       V! \	        \        4      V^,          ^,           \        ^ ^^ .4       V! \        \        4      V^,
          \        ^ ^4       V! \        \        4      V\        V^,          ,          ,           \        ^^ ^.4       V! \        \        4      ^\        ,          V,          V^,          ,           \        ^ ^ ^\        \        4      ,          .4       V! \        \        4      ^\        ,          V,          V^,          ,           \        ^ ^R\        \        4      ,          .4       V! \        \        4      R\        ,          V,          V^,          ,           \        ^ ^ ^\        \        4      ,          .4       V! \        \        4      V^,          ^,
          \        ^ ^ ^.4       V! \        \        4      V^,          ^,
          \        ^ ^^ .4       V! \        \        4      \        ^V,          ,           \        V^,          ,          ,           \        4       V! \        \        4      \        V,          ^V^,          ,          ,           \        V^,          ,          ,           \        4       V! \!        \        4      \        V,          ^V^,          ,          ,           \        V^,          ,          ,           \        4       V! \#        \        4      \        ) V,          ^V^,          ,          ,           \        V^,          ,          ,           \        4       R# )z]
Creates the look-up table. For a similar implementation
see meijerint._create_lookup_table.
c           	     ó~   <€ SP                  \        V \        4      . 4      P                  V \	        WW44      34       R# )z"
Adds a formula in the dictionary
N)r3  r.  r-  r‘   rÖ   )ÚformularÙ   ÚargrÐ   rØ   Útables   &&&&&€rE   ÚaddÚ_create_table.<locals>.add¢
  s8   ø€ ð 	×Ñœ ¬#Ó.°Ó3×:Ñ:¸GÜ˜k°Ó7ð<9ö 	:rH   r[   N)r    rª   éþÿÿÿ)râ   r-  rX   r   r   r   r   r!   r   r
   r"   r#   r   r   r   r    r   r   )r‹  rB   rŒ  rç   ré   r[   s   f&    rE   r6  r6  œ
  s+  ø€ ÷:ð 	×ÑœSÓ!€AÜ! ! TÓ*�E€Añ ŒŒC‹�"�a•%˜!•)œS ! a¨ VÔ,ÙŒŒC‹�"�a•%˜!•)œS ! a¨ VÔ,ÙŒŒC‹�"�q•&œ#˜q !Ô$ÙŒŒC‹�"”s˜2˜q�5•y•.¤# q¨1¨a¨&Ô1áŒŒC‹�!”C•%˜•(˜R �UÕ"¤C¨¨Q°´$´r³(µ
¨OÔ<ÙŒŒS‹	�1”S•5˜•8˜b !�eÕ#¤S¨!¨a°´D¼³HµÐ-=Ô>ÙŒŒS‹	�2”c•6˜"•9˜r 1�uÕ$¤c¨1¨q°!´D¼³Hµ*¨oÔ>áŒŒS‹	�2�q•5˜1•9œc 1 q¨! fÔ-ÙŒŒS‹	�2�q•5˜1•9œc 1 q¨! fÔ-áŒŒS‹	”3˜˜2�•:¤ B¨¥E¥	Õ)¬3Ô/áŒŒ3‹”�R•˜!˜B �E�'Õ!¤C¨¨A­¥IÕ-¬sÔ3ÙŒŒ3‹”�R•˜!˜B �E�'Õ!¤C¨¨A­¥IÕ-¬sÔ3áŒŒC‹”3�$�r•'˜A˜b !�e�GÕ#¤c¨"¨a­%¥iÕ/´Ö5rH   c                 ój  € . p\        V4       F¡  pV P                  W4      pV'       d   VP                  4       pV'       d#   \        V\        4      '       d   \        WV4      pVP                  R J g   \        V\        4      '       d    R# VP                  V4       V P                  V4      p K£  	  V# r  )	r˜   r!  r"  ra   r   r2   r³  r‘   r’   )	r  r}   rÐ   r„   r"  r  rØ   ré   Úvals	   &&&&&&   rE   r  r  Á
  s†   € Ø	€BÜ�5Ž\ˆØ�i‰i˜ÓˆßØ—)‘)“+ˆCßœ C¬×-Ò-Ü˜ Ó$ˆCØ�=‰=˜EÓ!¤Z°´S×%9Ò%9ÚØ
�	‰	�#ŒØ�y‰y˜‹|Šñ ð €IrH   )r    F)Nr    NNNTr  r  r=  )trs   Ú
sympy.corer   r   r   Úsympy.core.numbersr   r   r   r   r	   r
   r   r   Úsympy.core.singletonr   Úsympy.core.sortingr   Úsympy.core.symbolr   r   Úsympy.core.sympifyr   Ú(sympy.functions.combinatorial.factorialsr   r   r   Ú&sympy.functions.elementary.exponentialr   r   r   Ú%sympy.functions.elementary.hyperbolicr   r   Ú(sympy.functions.elementary.miscellaneousr   Ú(sympy.functions.elementary.trigonometricr   r   r   Ú'sympy.functions.special.error_functionsr   r   r    r!   r"   r#   Ú'sympy.functions.special.gamma_functionsr$   Úsympy.functions.special.hyperr%   r&   Úsympy.integralsr'   Úsympy.matricesr(   Úsympy.polys.ringsr)   Úsympy.polys.fieldsr*   Úsympy.polys.domainsr+   r,   Úsympy.polys.polyclassesr-   Úsympy.polys.polyrootsr.   Úsympy.polys.polytoolsr/   Úsympy.polys.matricesr0   Úsympy.printingr1   Úsympy.series.limitsr2   Úsympy.series.orderr3   Úsympy.simplify.hyperexpandr4   Úsympy.simplify.simplifyr5   Úsympy.solvers.solversr6   rÎ  r7   r8   r9   Úholonomicerrorsr:   r;   r<   r=   rQ   rX   rS   r]   rÖ   r'  r,  r-  r4  r5  Úsympy.integrals.meijerintr.  r  r  r5  r  r“   r  rF  rÇ  r3  r8  r6  r  rª   rH   rE   Ú<module>r°     sQ  ðñ÷
 %Ñ $÷"÷ "ó "å "Ý &ß +Ý &ß LÑ Lß FÑ Fß >Ý 9ß EÑ Eß R× RÝ 9ß 8Ý %Ý !Ý )Ý *ß &Ý 'Ý 'Ý &Ý -Ý Ý %Ý $Ý 2Ý -Ý 'ç RÑ R÷)ó )òò#,÷LA3ñ A3÷HSGñ SG÷lXñ Xôv4<4ð~  5°4Àô @4ñF ˆEƒl€Ø€ØÐ Ý -ô_:ôH67òrò(-ò:ò&òR	7ôð> '(¨D¸ÀbÐSWô g-ðT *.°bô +ð\ !#ô "6öJrH   