+
    7åûj×Š  ã                   óÒ  € ^ RI Ht ^ RIHt ^ RIHt ^ RIHt ^ RIH	t	 ^ RI
HtHt ^ RI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 ^ RIHt ^ RI H!t!H"t" ^ RI#H$t$H%t% ^ RI&H't' ^ RI(H)t)H*t*H+t+  ! R R]4      t, ! R R],]R7      t- ! R R],4      t. ! R R].4      t/ ! R R].4      t0 ! R R],4      t1R(R! lt2 ! R" R#],4      t3 ! R$ R%]34      t4 ! R& R']34      t5R # ))é    )ÚBasic)Úcacheit)ÚTuple)Úcall_highest_priority)Úglobal_parameters)ÚAppliedUndefÚexpand©ÚMul)ÚInteger)ÚEq)ÚSÚ	Singleton)Úordered)ÚDummyÚSymbolÚWild©Úsympify)ÚMatrix)ÚlcmÚfactor)ÚIntervalÚIntersection)ÚIdx)ÚflattenÚis_sequenceÚiterablec                   ób  a € ] tR t^t o RtRt^t]R 4       tR t	]
R 4       t]
R 4       t]
R 4       t]
R 4       t]
R	 4       t]
R
 4       t]
R 4       t]R 4       tR tR tR tR tR tR t]! R4      R 4       tR t]! R4      R 4       tR tR t]! R4      R 4       t R t!R t"R!R lt#R t$V t%R# )"ÚSeqBasezBase class for sequencesTc                ód   €  V P                   pV#   \         d    \        P                  p T# i ; i)zKReturn start (if possible) else S.Infinity.

adapted from Set._infimum_key
)ÚstartÚNotImplementedErrorr   ÚInfinity)Úexprr"   s   & ÚRC:\Ai_Coding\apps\studio\ComfyUI\.venv\Lib\site-packages\sympy\series\sequences.pyÚ
_start_keyÚSeqBase._start_key    s6   € ð	Ø—J‘JˆEð ˆøô #ô 	Ü—J‘J‰EØˆð	ús   ‚ �/®/c                ór   € \        V P                  VP                  4      pVP                  VP                  3# )zDReturns start and stop.

Takes intersection over the two intervals.
)r   ÚintervalÚinfÚsup)ÚselfÚotherr*   s   && r&   Ú_intersect_intervalÚSeqBase._intersect_interval,   s+   € ô
   §¡¨u¯~©~Ó>ˆØ�|‰|˜XŸ\™\Ð)Ð)ó    c                ó&   € \        RV ,          4      h)z&Returns the generator for the sequencez(%s).gen©r#   ©r-   s   &r&   ÚgenÚSeqBase.gen4   s   € ô " *¨tÕ"3Ó4Ð4r1   c                ó&   € \        RV ,          4      h)z-The interval on which the sequence is definedz(%s).intervalr3   r4   s   &r&   r*   ÚSeqBase.interval9   s   € ô " /°DÕ"8Ó9Ð9r1   c                ó&   € \        RV ,          4      h)ú:The starting point of the sequence. This point is includedz
(%s).startr3   r4   s   &r&   r"   ÚSeqBase.start>   s   € ô " ,°Õ"5Ó6Ð6r1   c                ó&   € \        RV ,          4      h)z8The ending point of the sequence. This point is includedz	(%s).stopr3   r4   s   &r&   ÚstopÚSeqBase.stopC   s   € ô " +°Õ"4Ó5Ð5r1   c                ó&   € \        RV ,          4      h)zLength of the sequencez(%s).lengthr3   r4   s   &r&   ÚlengthÚSeqBase.lengthH   s   € ô " -°$Õ"6Ó7Ð7r1   c                ó   € R# )z-Returns a tuple of variables that are bounded© rC   r4   s   &r&   Ú	variablesÚSeqBase.variablesM   s	   € ð ˆ	r1   c                óž   € V P                    UUu0 uF/  qP                  P                  V P                  4       F  q"kK  	  K1  	  upp# u uppi )zÿ
This method returns the symbols in the object, excluding those
that take on a specific value (i.e. the dummy symbols).

Examples
========

>>> from sympy import SeqFormula
>>> from sympy.abc import n, m
>>> SeqFormula(m*n**2, (n, 0, 5)).free_symbols
{m}
)ÚargsÚfree_symbolsÚ
differencerD   )r-   ÚiÚjs   &  r&   rH   ÚSeqBase.free_symbolsR   sH   € ð !ŸIšIô 0™I�q¯~©~ß‘J˜tŸ~™~Ó.ò0/¨!’ñ 0/‘™Iò 0ð 	1ùó 0s   �5A	c                óž   € WP                   8  g   WP                  8”  d   \        RV: RV P                  : 24      hV P	                  V4      # )z#Returns the coefficient at point ptzIndex z out of bounds )r"   r=   Ú
IndexErrorr*   Ú_eval_coeff©r-   Úpts   &&r&   ÚcoeffÚSeqBase.coeffc   s:   € ð —
‘
Œ?˜b§9¡9œnÝ»BÀÇÃÐNÓOÐOØ×Ñ Ó#Ð#r1   c                ó:   € \        R V P                  ,          4      h)zhThe _eval_coeff method should be added to%s to return coefficient so it is availablewhen coeff calls it.)r#   ÚfuncrP   s   &&r&   rO   ÚSeqBase._eval_coeffj   s"   € Ü!ð #9ð %)§I¡Iõ#.ó /ð 	/r1   c                óÔ   € V P                   \        P                  J d   V P                  pMV P                   pV P                   \        P                  J d   RpM^pW!V,          ,           # )a  Returns the i'th point of a sequence.

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

If start point is negative infinity, point is returned from the end.
Assumes the first point to be indexed zero.

Examples
=========

>>> from sympy import oo
>>> from sympy.series.sequences import SeqPer

bounded

>>> SeqPer((1, 2, 3), (-10, 10))._ith_point(0)
-10
>>> SeqPer((1, 2, 3), (-10, 10))._ith_point(5)
-5

End is at infinity

>>> SeqPer((1, 2, 3), (0, oo))._ith_point(5)
5

Starts at negative infinity

>>> SeqPer((1, 2, 3), (-oo, 0))._ith_point(5)
-5
éÿÿÿÿ)r"   r   ÚNegativeInfinityr=   )r-   rJ   ÚinitialÚsteps   &&  r&   Ú
_ith_pointÚSeqBase._ith_pointp   sR   € ð@ �:‰:œ×+Ñ+Ó+Ø—i‘i‰Gà—j‘jˆGà�:‰:œ×+Ñ+Ó+Ø‰DàˆDà˜4�ÕÐr1   c                ó   € R# )a	  
Should only be used internally.

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

self._add(other) returns a new, term-wise added sequence if self
knows how to add with other, otherwise it returns ``None``.

``other`` should only be a sequence object.

Used within :class:`SeqAdd` class.
NrC   ©r-   r.   s   &&r&   Ú_addÚSeqBase._addœ   ó   € ñ r1   c                ó   € R# )a  
Should only be used internally.

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

self._mul(other) returns a new, term-wise multiplied sequence if self
knows how to multiply with other, otherwise it returns ``None``.

``other`` should only be a sequence object.

Used within :class:`SeqMul` class.
NrC   r_   s   &&r&   Ú_mulÚSeqBase._mul¬   rb   r1   c                ó   € \        W4      # )a=  
Should be used when ``other`` is not a sequence. Should be
defined to define custom behaviour.

Examples
========

>>> from sympy import SeqFormula
>>> from sympy.abc import n
>>> SeqFormula(n**2).coeff_mul(2)
SeqFormula(2*n**2, (n, 0, oo))

Notes
=====

'*' defines multiplication of sequences with sequences only.
r
   r_   s   &&r&   Ú	coeff_mulÚSeqBase.coeff_mul¼   s   € ô$ �4ÓÐr1   c                óz   € \        V\        4      '       g   \        R\        V4      ,          4      h\	        W4      # )zôReturns the term-wise addition of 'self' and 'other'.

``other`` should be a sequence.

Examples
========

>>> from sympy import SeqFormula
>>> from sympy.abc import n
>>> SeqFormula(n**2) + SeqFormula(n**3)
SeqFormula(n**3 + n**2, (n, 0, oo))
zcannot add sequence and %s©Ú
isinstancer    Ú	TypeErrorÚtypeÚSeqAddr_   s   &&r&   Ú__add__ÚSeqBase.__add__Ð   s1   € ô ˜%¤×)Ò)ÜÐ8¼4À»;ÕFÓGÐGÜ�dÓ"Ð"r1   ro   c                ó   € W,           # ©NrC   r_   s   &&r&   Ú__radd__ÚSeqBase.__radd__á   ó
   € à�|Ðr1   c                ó|   € \        V\        4      '       g   \        R\        V4      ,          4      h\	        W) 4      # )z÷Returns the term-wise subtraction of ``self`` and ``other``.

``other`` should be a sequence.

Examples
========

>>> from sympy import SeqFormula
>>> from sympy.abc import n
>>> SeqFormula(n**2) - (SeqFormula(n))
SeqFormula(n**2 - n, (n, 0, oo))
zcannot subtract sequence and %srj   r_   s   &&r&   Ú__sub__ÚSeqBase.__sub__å   s3   € ô ˜%¤×)Ò)ÜÐ=ÄÀUÃÕKÓLÐLÜ�d˜FÓ#Ð#r1   rw   c                ó   € V ) V,           # rr   rC   r_   s   &&r&   Ú__rsub__ÚSeqBase.__rsub__ö   s   € à�˜�Ðr1   c                ó$   € V P                  R4      # )z›Negates the sequence.

Examples
========

>>> from sympy import SeqFormula
>>> from sympy.abc import n
>>> -SeqFormula(n**2)
SeqFormula(-n**2, (n, 0, oo))
rX   )rg   r4   s   &r&   Ú__neg__ÚSeqBase.__neg__ú   s   € ð �~‰~˜bÓ!Ð!r1   c                óz   € \        V\        4      '       g   \        R\        V4      ,          4      h\	        W4      # )a3  Returns the term-wise multiplication of 'self' and 'other'.

``other`` should be a sequence. For ``other`` not being a
sequence see :func:`coeff_mul` method.

Examples
========

>>> from sympy import SeqFormula
>>> from sympy.abc import n
>>> SeqFormula(n**2) * (SeqFormula(n))
SeqFormula(n**3, (n, 0, oo))
zcannot multiply sequence and %s)rk   r    rl   rm   ÚSeqMulr_   s   &&r&   Ú__mul__ÚSeqBase.__mul__  s1   € ô ˜%¤×)Ò)ÜÐ=ÄÀUÃÕKÓLÐLÜ�dÓ"Ð"r1   r�   c                ó   € W,          # rr   rC   r_   s   &&r&   Ú__rmul__ÚSeqBase.__rmul__  ru   r1   c              #  óŽ   "  € \        V P                  4       F'  pV P                  V4      pV P                  V4      x € K)  	  R # 5irr   )Úranger@   r\   rR   )r-   rJ   rQ   s   &  r&   Ú__iter__ÚSeqBase.__iter__  s4   é € Ü�t—{‘{Ö#ˆAØ—‘ Ó#ˆBØ—*‘*˜R“.Ô ó $ùs   ‚AAc                ó   € \        V\        4      '       d#   V P                  V4      pV P                  V4      # \        V\        4      '       d{   VP
                  VP                  r2Vf   ^ pVf   V P                  p\        Y#VP                  ;'       g    ^4       Uu. uF"  q@P                  V P                  V4      4      NK$  	  up# R # u upi rr   )
rk   Úintr\   rR   Úslicer"   r=   r@   r‡   r[   )r-   Úindexr"   r=   rJ   s   &&   r&   Ú__getitem__ÚSeqBase.__getitem__"  s«   € Ü�eœS×!Ò!Ø—O‘O EÓ*ˆEØ—:‘:˜eÓ$Ð$Ü˜œu×%Ò%ØŸ+™+ u§z¡z�4ØŠ}Ø�ØŠ|Ø—{‘{�ä˜% u§z¡z§ °QÔ7ó9Ù7ð 89—J‘J˜tŸ™¨qÓ1Ö2Ù7ñ9ð 9ñ &ùò9s   Â(CNc           
     ób  € ^ RI Hp V RV  Uu. uF  qT! \        V4      4      NK  	  pp\        V4      pVf   V^,          pM\	        W'^,          4      p. p	\        ^V^,           4       EF  p
^V
,          p. p\        V
4       F  pVP                  WmWÚ,            4       K  	  \        V4      pVP                  4       ^ 8w  g   K\  V! VP                  \        WjV 4      4      4      pW{8X  d   \        VRRR1,          4      p	 Mr. p\        W§V
,
          4       F  pVP                  WmWÚ,            4       K  	  \        V4      pWï,          \        WkR 4      8X  g   Kô  \        VRRR1,          4      p	 M	  Vf   V	# \        V	4      p
V
^ 8X  d   . R3# Wj^,
          ,          W:^,
          ,          ,          ^Wš^,
          ,          W:,          ,          ,
          r!\        V
^,
          4       F�  pWV,          VV,          ,          ,          p\        V
V,
          ^,
          4       F<  pWV,          VV,          ,          VVV,           ^,           ,          ,          ,          pK>  	  W)V,          VV^,           ,          ,          ,          pKŸ  	  W”! \        V4      \        V4      ,          4      3# u upi )a³  
Finds the shortest linear recurrence that satisfies the first n
terms of sequence of order `\leq` ``n/2`` if possible.
If ``d`` is specified, find shortest linear recurrence of order
`\leq` min(d, n/2) if possible.
Returns list of coefficients ``[b(1), b(2), ...]`` corresponding to the
recurrence relation ``x(n) = b(1)*x(n-1) + b(2)*x(n-2) + ...``
Returns ``[]`` if no recurrence is found.
If gfvar is specified, also returns ordinary generating function as a
function of gfvar.

Examples
========

>>> from sympy import sequence, sqrt, oo, lucas
>>> from sympy.abc import n, x, y
>>> sequence(n**2).find_linear_recurrence(10, 2)
[]
>>> sequence(n**2).find_linear_recurrence(10)
[3, -3, 1]
>>> sequence(2**n).find_linear_recurrence(10)
[2]
>>> sequence(23*n**4+91*n**2).find_linear_recurrence(10)
[5, -10, 10, -5, 1]
>>> sequence(sqrt(5)*(((1 + sqrt(5))/2)**n - (-(1 + sqrt(5))/2)**(-n))/5).find_linear_recurrence(10)
[1, 1]
>>> sequence(x+y*(-2)**(-n), (n, 0, oo)).find_linear_recurrence(30)
[1/2, 1/2]
>>> sequence(3*5**n + 12).find_linear_recurrence(20,gfvar=x)
([6, -5], 3*(5 - 21*x)/((x - 1)*(5*x - 1)))
>>> sequence(lucas(n)).find_linear_recurrence(15,gfvar=x)
([1, 1], (x - 2)/(x**2 + x - 1))
)ÚsimplifyNrX   )Úsympy.simplifyr‘   r	   ÚlenÚminr‡   Úappendr   ÚdetÚLUsolver   r   )r-   ÚnÚdÚgfvarr‘   ÚtÚxÚlxÚrÚcoeffsÚlÚl2ÚmlistÚkÚmÚyrJ   rK   s   &&&&              r&   Úfind_linear_recurrenceÚSeqBase.find_linear_recurrence/  s(  € õD 	,Ø*.¨r°©(Ó3©( QˆX”f˜Q“iÖ ©(ˆÐ3Ü�‹VˆØŠ9Ø�A•‰Aä�A˜!•e“ˆAØˆÜ�q˜!˜A�#—ˆAØ�1•ˆBØˆEÜ˜1–X�Ø—‘˜Q ¥˜XÖ&ñ ä�u“ˆAØ�u‰u‹w˜!Ž|Ù˜QŸY™Y¤v¨a°"¨g£Ó7Ó8�Ø”8Ü$ Q¡t¨ t¥WÓ-�FÙØ�Ü˜q A¥ž�AØ—L‘L  Q¥S Ö*ñ 'ä˜5“M�Ø•3œ&  3 ›.Ö(Ü$ Q¡t¨ t¥WÓ-�FÙñ# ð$ Š=ØˆMä�F“ˆAØ�AŒvØ˜4�x�à˜1�•v˜e¨¥c�lÕ*¨A°¸µsµ¸E½HÕ0DÕ,D�1Ü˜q �sž�AØ˜1�˜e Q�h�Õ&�AÜ" 1 Q¥3 q¥5ž\˜Ø A�Y q¨¥t�^¨E°A°aµC¸µE­NÕ:Õ:šñ *à � 5¨1¨Q­3¥<Õ/Õ/’Añ	 $ð
 ˜x¬¨q«	´&¸³)Õ(;Ó<Ð<Ð<ùòM 4s   ŽJ,rC   )NN)&Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__Úis_commutativeÚ_op_priorityÚstaticmethodr'   r/   Úpropertyr5   r*   r"   r=   r@   rD   rH   r   rR   rO   r\   r`   rd   rg   ro   r   rs   rw   rz   r}   r�   r„   rˆ   rŽ   r¦   Ú__static_attributes__Ú__classdictcell__©Ú__classdict__s   @r&   r    r       sX  ø‡ € Ù"à€NØ€Làñ	ó ð	ò*ð ñ5ó ð5ð ñ:ó ð:ð ñ7ó ð7ð ñ6ó ð6ð ñ8ó ð8ð ñó ðð ñ1ó ð1ð  ñ$ó ð$ò/ò* òXò ò  ò(#ñ" ˜9Ó%ñó &ðò$ñ" ˜9Ó%ñó &ðò"ò#ñ$ ˜9Ó%ñó &ðò!ò
9÷I=ò I=r1   r    c                   óP   a € ] tR tRt o Rt]R 4       t]R 4       tR tR t	Rt
V tR# )	ÚEmptySequenceiz  a�  Represents an empty sequence.

The empty sequence is also available as a singleton as
``S.EmptySequence``.

Examples
========

>>> from sympy import EmptySequence, SeqPer
>>> from sympy.abc import x
>>> EmptySequence
EmptySequence
>>> SeqPer((1, 2), (x, 0, 10)) + EmptySequence
SeqPer((1, 2), (x, 0, 10))
>>> SeqPer((1, 2)) * EmptySequence
EmptySequence
>>> EmptySequence.coeff_mul(-1)
EmptySequence
c                ó"   € \         P                  # rr   )r   ÚEmptySetr4   s   &r&   r*   ÚEmptySequence.interval�  s   € ä�z‰zÐr1   c                ó"   € \         P                  # rr   )r   ÚZeror4   s   &r&   r@   ÚEmptySequence.length“  s   € ä�v‰vˆr1   c                ó   € V # ©z"See docstring of SeqBase.coeff_mulrC   )r-   rR   s   &&r&   rg   ÚEmptySequence.coeff_mul—  s   € àˆr1   c                ó   € \        . 4      # rr   )Úiterr4   s   &r&   rˆ   ÚEmptySequence.__iter__›  s   € Ü�B‹xˆr1   rC   N)r¨   r©   rª   r«   r¬   r°   r*   r@   rg   rˆ   r±   r²   r³   s   @r&   r¶   r¶   z  sA   ø‡ € ñð( ñó ðð ñó ðò÷ð r1   r¶   )Ú	metaclassc                   ó„   a € ] tR tRt o Rt]R 4       t]R 4       t]R 4       t]R 4       t	]R 4       t
]R 4       tR	tV tR
# )ÚSeqExpriŸ  a‘  Sequence expression class.

Various sequences should inherit from this class.

Examples
========

>>> from sympy.series.sequences import SeqExpr
>>> from sympy.abc import x
>>> from sympy import Tuple
>>> s = SeqExpr(Tuple(1, 2, 3), Tuple(x, 0, 10))
>>> s.gen
(1, 2, 3)
>>> s.interval
Interval(0, 10)
>>> s.length
11

See Also
========

sympy.series.sequences.SeqPer
sympy.series.sequences.SeqFormula
c                ó(   € V P                   ^ ,          # ©r   ©rG   r4   s   &r&   r5   ÚSeqExpr.gen¹  s   € à�y‰y˜�|Ðr1   c                óz   € \        V P                  ^,          ^,          V P                  ^,          ^,          4      # ©é   )r   rG   r4   s   &r&   r*   ÚSeqExpr.interval½  s'   € ä˜Ÿ	™	 !� Q�¨¯©°1­°a­Ó9Ð9r1   c                ó.   € V P                   P                  # rr   ©r*   r+   r4   s   &r&   r"   ÚSeqExpr.startÁ  ó   € à�}‰}× Ñ Ð r1   c                ó.   € V P                   P                  # rr   ©r*   r,   r4   s   &r&   r=   ÚSeqExpr.stopÅ  rÑ   r1   c                óJ   € V P                   V P                  ,
          ^,           # rË   ©r=   r"   r4   s   &r&   r@   ÚSeqExpr.lengthÉ  ó   € à�y‰y˜4Ÿ:™:Õ%¨Õ)Ð)r1   c                ó8   € V P                   ^,          ^ ,          3# rË   rÈ   r4   s   &r&   rD   ÚSeqExpr.variablesÍ  s   € à—	‘	˜!•˜Q•Ð!Ð!r1   rC   N)r¨   r©   rª   r«   r¬   r°   r5   r*   r"   r=   r@   rD   r±   r²   r³   s   @r&   rÅ   rÅ   Ÿ  s‚   ø‡ € ñð2 ñó ðð ñ:ó ð:ð ñ!ó ð!ð ñ!ó ð!ð ñ*ó ð*ð ñ"ó ö"r1   rÅ   c                   óf   a € ] tR tRt o RtRR lt]R 4       t]R 4       tR t	R t
R	 tR
 tRtV tR# )ÚSeqPeriÒ  aj  
Represents a periodic sequence.

The elements are repeated after a given period.

Examples
========

>>> from sympy import SeqPer, oo
>>> from sympy.abc import k

>>> s = SeqPer((1, 2, 3), (0, 5))
>>> s.periodical
(1, 2, 3)
>>> s.period
3

For value at a particular point

>>> s.coeff(3)
1

supports slicing

>>> s[:]
[1, 2, 3, 1, 2, 3]

iterable

>>> list(s)
[1, 2, 3, 1, 2, 3]

sequence starts from negative infinity

>>> SeqPer((1, 2, 3), (-oo, 0))[0:6]
[1, 2, 3, 1, 2, 3]

Periodic formulas

>>> SeqPer((k, k**2, k**3), (k, 0, oo))[0:6]
[0, 1, 8, 3, 16, 125]

See Also
========

sympy.series.sequences.SeqFormula
Nc                ó"  € \        V4      pR  pRRRrepVf   V! V4      ^ \        P                  rep\        V\        4      '       d3   \        V4      ^8X  d   Vw  rEpM\        V4      ^8X  d   V! V4      pVw  rV\        V\        \        34      '       d	   Ve   Vf   \        R\        V4      ,          4      hV\        P                  J d    V\        P                  J d   \        R4      h\        WEV34      p\        V\        4      '       d   \        \        \        V4      4      4      pM\        RV,          4      h\        V^,          V^,          4      \        P                  J d   \        P                   # \"        P$                  ! WV4      # )c                 ó„   € V P                   p\        V P                   4      ^8X  d   VP                  4       # \        R4      # )rÌ   r£   )rH   r“   Úpopr   )Ú
periodicalÚfrees   & r&   Ú_find_xÚSeqPer.__new__.<locals>._find_x  s6   € Ø×*Ñ*ˆDÜ�:×*Ñ*Ó+¨qÔ0Ø—x‘x“zÐ!ä˜S“zÐ!r1   NúInvalid limits given: %sz/Both the start and end valuecannot be unboundedz6invalid period %s should be something like e.g (1, 2) )r   r   r$   r   r   r“   rk   r   r   Ú
ValueErrorÚstrrY   Útupler   r   r¸   r¶   r   Ú__new__)Úclsrà   Úlimitsrâ   rœ   r"   r=   s   &&&    r&   rè   ÚSeqPer.__new__  sS  € Ü˜ZÓ(ˆ
ò	"ð ˜t T�$ˆØŠ>Ù$ ZÓ0°!´Q·Z±Z�dˆAÜ�vœu×%Ò%Ü�6‹{˜aÔØ!'‘�™$Ü�V“ Ô!Ù˜JÓ'�Ø$‘�ä˜!œf¤c˜]×+Ò+¨uª}ÀÂÜÐ7¼#¸f»+ÕEÓFÐFà”A×&Ñ&Ó&¨4´1·:±:Ó+=Ü ð "7ó 8ð 8ô ˜! DÐ)Ó*ˆä�z¤5×)Ò)Ü ¤¤w¨zÓ':Ó!;Ó<‰Jäð 0Ø2<õ=ó >ð >ô �F˜1•I˜v a�yÓ)¬Q¯Z©ZÓ7Ü—?‘?Ð"ä�}Š}˜S¨fÓ5Ð5r1   c                ó,   € \        V P                  4      # rr   )r“   r5   r4   s   &r&   ÚperiodÚSeqPer.period+  s   € ä�4—8‘8‹}Ðr1   c                ó   € V P                   # rr   ©r5   r4   s   &r&   rà   ÚSeqPer.periodical/  ó   € à�x‰xˆr1   c                ó6  € V P                   \        P                  J d&   V P                  V,
          V P                  ,          pM#WP                   ,
          V P                  ,          pV P
                  V,          P                  V P                  ^ ,          V4      # rÇ   )r"   r   rY   r=   rí   rà   ÚsubsrD   )r-   rQ   Úidxs   && r&   rO   ÚSeqPer._eval_coeff3  sc   € Ø�:‰:œ×+Ñ+Ó+Ø—9‘9˜r•> T§[¡[Õ0‰CàŸ
™
•? d§k¡kÕ1ˆCØ�‰˜sÕ#×(Ñ(¨¯©¸Õ):¸BÓ?Ð?r1   c                ó˜  € \        V\        4      '       d´   V P                  V P                  r2VP                  VP                  rT\	        W54      p. p\        V4       F8  pW(V,          ,          p	WHV,          ,          p
VP                  Wš,           4       K:  	  V P                  V4      w  r¼\        WpP                  ^ ,          W¼34      # R# ©zSee docstring of SeqBase._addN©	rk   rÜ   rà   rí   r   r‡   r•   r/   rD   ©r-   r.   Úper1Úlper1Úper2Úlper2Ú
per_lengthÚnew_perrœ   Úele1Úele2r"   r=   s   &&           r&   r`   ÚSeqPer._add:  ó£   € ä�eœV×$Ò$ØŸ/™/¨4¯;©;�%Ø×*Ñ*¨E¯L©L�%ä˜UÓ*ˆJàˆGÜ˜:Ö&�Ø �I•�Ø �I•�Ø—‘˜t�{Ö+ñ 'ð
 ×2Ñ2°5Ó9‰KˆEÜ˜'§N¡N°1Õ$5°uÐ#CÓDÐDñ %r1   c                ó˜  € \        V\        4      '       d´   V P                  V P                  r2VP                  VP                  rT\	        W54      p. p\        V4       F8  pW(V,          ,          p	WHV,          ,          p
VP                  Wš,          4       K:  	  V P                  V4      w  r¼\        WpP                  ^ ,          W¼34      # R# ©zSee docstring of SeqBase._mulNrù   rú   s   &&           r&   rd   ÚSeqPer._mulK  r  r1   c                óœ   € \        V4      pV P                   Uu. uF  q"V,          NK  	  pp\        W0P                  ^,          4      # u upi r¾   )r   rà   rÜ   rG   )r-   rR   rœ   Úpers   &&  r&   rg   ÚSeqPer.coeff_mul\  s?   € ä˜“ˆØ"&§/¢/Ó2¡/˜Q�5�yˆy¡/ˆÐ2Ü�cŸ9™9 Q�<Ó(Ð(ùò 3s   šA	rC   rr   )r¨   r©   rª   r«   r¬   rè   r°   rí   rà   rO   r`   rd   rg   r±   r²   r³   s   @r&   rÜ   rÜ   Ò  sU   ø‡ € ñ.ô`&6ðP ñó ðð ñó ðò@òEò"E÷")ð )r1   rÜ   c                   ó\   a € ] tR tRt o RtRR lt]R 4       tR tR t	R t
R	 tR
 tRtV tR# )Ú
SeqFormulaic  a  
Represents sequence based on a formula.

Elements are generated using a formula.

Examples
========

>>> from sympy import SeqFormula, oo, Symbol
>>> n = Symbol('n')
>>> s = SeqFormula(n**2, (n, 0, 5))
>>> s.formula
n**2

For value at a particular point

>>> s.coeff(3)
9

supports slicing

>>> s[:]
[0, 1, 4, 9, 16, 25]

iterable

>>> list(s)
[0, 1, 4, 9, 16, 25]

sequence starts from negative infinity

>>> SeqFormula(n**2, (-oo, 0))[0:6]
[0, 1, 4, 9, 16, 25]

See Also
========

sympy.series.sequences.SeqPer
Nc                ó–  € \        V4      pR  pRRRrepVf   V! V4      ^ \        P                  rep\        V\        4      '       d3   \        V4      ^8X  d   Vw  rEpM\        V4      ^8X  d   V! V4      pVw  rV\        V\        \        34      '       d	   Ve   Vf   \        R\        V4      ,          4      hV\        P                  J d    V\        P                  J d   \        R4      h\        WEV34      p\        V^,          V^,          4      \        P                  J d   \        P                  # \        P                   ! WV4      # )c                 ó¤   € V P                   p\        V4      ^8X  d   VP                  4       # V'       g   \        R4      # \	        RV ,          4      h)rÌ   r£   z¦ specify dummy variables for %s. If the formula contains more than one free symbol, a dummy variable should be supplied explicitly e.g., SeqFormula(m*n**2, (n, 0, 5)))rH   r“   rß   r   rå   )Úformulará   s   & r&   râ   Ú#SeqFormula.__new__.<locals>._find_x�  sN   € Ø×'Ñ'ˆDÜ�4‹y˜AŒ~Ø—x‘x“zÐ!ßÜ˜S“zÐ!ä ðOð õóð r1   Nrä   z0Both the start and end value cannot be unbounded)r   r   r$   r   r   r“   rk   r   r   rå   ræ   rY   r   r¸   r¶   r   rè   )ré   r  rê   râ   rœ   r"   r=   s   &&&    r&   rè   ÚSeqFormula.__new__Œ  s  € Ü˜'Ó"ˆò	ð ˜t T�$ˆØŠ>Ù$ WÓ-¨q´!·*±*�dˆAÜ�vœu×%Ò%Ü�6‹{˜aÔØ!'‘�™$Ü�V“ Ô!Ù˜GÓ$�Ø$‘�ä˜!œf¤c˜]×+Ò+¨uª}ÀÂÜÐ7¼#¸f»+ÕEÓFÐFà”A×&Ñ&Ó&¨4´1·:±:Ó+=Ü ð "7ó 8ð 8ä˜! DÐ)Ó*ˆä�F˜1•I˜v a�yÓ)¬Q¯Z©ZÓ7Ü—?‘?Ð"ä�}Š}˜S¨6Ó2Ð2r1   c                ó   € V P                   # rr   rð   r4   s   &r&   r  ÚSeqFormula.formula³  rò   r1   c                ó^   € V P                   ^ ,          pV P                  P                  W!4      # rÇ   )rD   r  rô   )r-   rQ   r™   s   && r&   rO   ÚSeqFormula._eval_coeff·  s%   € Ø�N‰N˜1ÕˆØ�|‰|× Ñ  Ó'Ð'r1   c                ó  € \        V\        4      '       dt   V P                  V P                  ^ ,          r2VP                  VP                  ^ ,          rTW$P	                  WS4      ,           pV P                  V4      w  rx\        WcWx34      # R# rø   ©rk   r  r  rD   rô   r/   ©	r-   r.   Úform1Úv1Úform2Úv2r  r"   r=   s	   &&       r&   r`   ÚSeqFormula._add»  óo   € ä�eœZ×(Ò(ØŸ™ d§n¡n°QÕ&7�2ØŸ™ u§¡°qÕ'9�2ØŸj™j¨Ó0Õ0ˆGØ×2Ñ2°5Ó9‰KˆEÜ˜g¨EÐ'8Ó9Ð9ñ )r1   c                ó  € \        V\        4      '       dt   V P                  V P                  ^ ,          r2VP                  VP                  ^ ,          rTW$P	                  WS4      ,          pV P                  V4      w  rx\        WcWx34      # R# r  r  r  s	   &&       r&   rd   ÚSeqFormula._mulÄ  r  r1   c                óv   € \        V4      pV P                  V,          p\        W P                  ^,          4      # r¾   )r   r  r  rG   )r-   rR   r  s   && r&   rg   ÚSeqFormula.coeff_mulÍ  s,   € ä˜“ˆØ—,‘, Õ&ˆÜ˜'§9¡9¨Q¥<Ó0Ð0r1   c                ój   € \        \        V P                  .VO5/ VB V P                  ^,          4      # rË   )r  r	   r  rG   )r-   rG   Úkwargss   &*,r&   r	   ÚSeqFormula.expandÓ  s*   € Üœ& §¡Ð?°Ò?¸Ñ?ÀÇÁÈ1ÅÓNÐNr1   rC   rr   )r¨   r©   rª   r«   r¬   rè   r°   r  rO   r`   rd   rg   r	   r±   r²   r³   s   @r&   r  r  c  sE   ø‡ € ñ&ôP%3ðN ñó ðò(ò:ò:ò1÷Oð Or1   r  c                   óÊ   a € ] tR tRt o RtRR lt]R 4       t]R 4       t]R 4       t	]R 4       t
]R	 4       t]R
 4       t]R 4       t]R 4       t]R 4       tR tR tRtV tR# )ÚRecursiveSeqiÖ  a´  
A finite degree recursive sequence.

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

That is, a sequence a(n) that depends on a fixed, finite number of its
previous values. The general form is

    a(n) = f(a(n - 1), a(n - 2), ..., a(n - d))

for some fixed, positive integer d, where f is some function defined by a
SymPy expression.

Parameters
==========

recurrence : SymPy expression defining recurrence
    This is *not* an equality, only the expression that the nth term is
    equal to. For example, if :code:`a(n) = f(a(n - 1), ..., a(n - d))`,
    then the expression should be :code:`f(a(n - 1), ..., a(n - d))`.

yn : applied undefined function
    Represents the nth term of the sequence as e.g. :code:`y(n)` where
    :code:`y` is an undefined function and `n` is the sequence index.

n : symbolic argument
    The name of the variable that the recurrence is in, e.g., :code:`n` if
    the recurrence function is :code:`y(n)`.

initial : iterable with length equal to the degree of the recurrence
    The initial values of the recurrence.

start : start value of sequence (inclusive)

Examples
========

>>> from sympy import Function, symbols
>>> from sympy.series.sequences import RecursiveSeq
>>> y = Function("y")
>>> n = symbols("n")
>>> fib = RecursiveSeq(y(n - 1) + y(n - 2), y(n), n, [0, 1])

>>> fib.coeff(3) # Value at a particular point
2

>>> fib[:6] # supports slicing
[0, 1, 1, 2, 3, 5]

>>> fib.recurrence # inspect recurrence
Eq(y(n), y(n - 2) + y(n - 1))

>>> fib.degree # automatically determine degree
2

>>> for x in zip(range(10), fib): # supports iteration
...     print(x)
(0, 0)
(1, 1)
(2, 1)
(3, 2)
(4, 3)
(5, 5)
(6, 8)
(7, 13)
(8, 21)
(9, 34)

See Also
========

sympy.series.sequences.SeqFormula

Nc                óŽ  € \        V\        4      '       g   \        R P                  V4      4      h\        V\        4      '       d   VP
                  '       g   \        RP                  V4      4      hVP                  V38w  d   \        R4      hVP                  p\        RV3R7      p^ pVP                  V4      p	V	 F­  p
\        V
P                  4      ^8w  d   \        R4      hV
P                  ^ ,          P                  W7,           4      V,          pVP                  4       '       d   VP                  '       d   V^ 8  g   \        RP                  V
4      4      hV) V8”  g   Kª  V) pK¯  	  V'       g3   \        V4       Uu. uF  p\        RP                  V4      4      NK  	  pp\        V4      V8w  d   \!        R4      h\#        V4      p\%        V4      p\'        R	 V 4       !  p\        P(                  ! WW#WE4      p\+        V4       UUu/ uF  w  r}V! WW,           4      VbK  	  uppVn        WŒn        V# u upi u uppi )
zErecurrence sequence must be an applied undefined function, found `{}`z0recurrence variable must be a symbol, found `{}`z)recurrence sequence does not match symbolr£   )Úexcludez)Recurrence should be in a single variablezDRecurrence should have constant, negative, integer shifts (found {})zc_{}z)Number of initial terms must equal degreec              3   ó8   "  € T F  p\        V4      x € K  	  R # 5irr   r   )Ú.0rœ   s   & r&   Ú	<genexpr>Ú'RecursiveSeq.__new__.<locals>.<genexpr>O  s   é € Ð6©g¨œ' !Ÿ*˜*«gùó   ‚)rk   r   rl   Úformatr   Ú	is_symbolrG   rU   r   Úfindr“   ÚmatchÚis_constantÚ
is_integerr‡   r   rå   r   r   r   rè   Ú	enumerateÚcacheÚdegree)ré   Ú
recurrenceÚynr˜   rZ   r"   r¥   r£   r7  Úprev_ysÚprev_yÚshiftÚseqÚinits   &&&&&&        r&   rè   ÚRecursiveSeq.__new__#  sí  € Ü˜"œl×+Ò+Üð +ß+1©6°"«:ó7ð 7ô ˜!œU×#Ò#¨1¯;¯;¨;Üð +ß+1©6°!«9ó6ð 6ð �7‰7�q�dŒ?ÜÐGÓHÐHà�G‰Gˆä�˜q˜dÔ#ˆØˆð —/‘/ !Ó$ˆÛˆFÜ�6—;‘;Ó 1Ô$ÜÐ KÓLÐLà—K‘K •N×(Ñ(¨­Ó/°Õ2ˆEØ×%Ñ%×'Ò'¨E×,<×,<Ð,<ÀÈÄÜð !.ç.4©f°V«nó>ð >ð ˆv˜ŽØ˜’ñ ÷ Ü8=¸f¼ÓF¹°1”u˜VŸ]™]¨1Ó-Ö.¹ˆGÐFäˆw‹<˜6Ô!ÜÐHÓIÐIä˜“ˆÜ˜“ˆäÑ6©gÓ6Ñ7ˆä�mŠm˜C¨R°GÓCˆä7@ÀÔ7IÔJÑ7I©G¨A‘Q�u•y“\ 4Ò'Ñ7IÒJˆŒ	ØŒ
àˆ
ùò Gùó Ks   Æ#H<ÈIc                ó(   € V P                   ^ ,          # ©zEquation defining recurrence.rÈ   r4   s   &r&   Ú_recurrenceÚRecursiveSeq._recurrenceX  ó   € ð �y‰y˜�|Ðr1   c                óP   € \        V P                  V P                  ^ ,          4      # rA  )r   r9  rG   r4   s   &r&   r8  ÚRecursiveSeq.recurrence]  s   € ô �$—'‘'˜4Ÿ9™9 Q�<Ó(Ð(r1   c                ó(   € V P                   ^,          # )z*Applied function representing the nth termrÈ   r4   s   &r&   r9  ÚRecursiveSeq.ynb  rD  r1   c                ó.   € V P                   P                  # )z3Undefined function for the nth term of the sequence)r9  rU   r4   s   &r&   r¥   ÚRecursiveSeq.yg  s   € ð �w‰w�|‰|Ðr1   c                ó(   € V P                   ^,          # )zSequence index symbolrÈ   r4   s   &r&   r˜   ÚRecursiveSeq.nl  rD  r1   c                ó(   € V P                   ^,          # )z"The initial values of the sequencerÈ   r4   s   &r&   rZ   ÚRecursiveSeq.initialq  rD  r1   c                ó(   € V P                   ^,          # )r:   rÈ   r4   s   &r&   r"   ÚRecursiveSeq.startv  rD  r1   c                ó"   € \         P                  # )z&The ending point of the sequence. (oo))r   r$   r4   s   &r&   r=   ÚRecursiveSeq.stop{  s   € ô �z‰zÐr1   c                ó:   € V P                   \        P                  3# )z&Interval on which sequence is defined.)r"   r   r$   r4   s   &r&   r*   ÚRecursiveSeq.interval€  s   € ð —
‘
œAŸJ™JÐ'Ð'r1   c                ó>  € WP                   ,
          \        V P                  4      8  d#   V P                  V P                  V4      ,          # \	        \        V P                  4      V^,           4       Fu  pV P                   V,           pV P
                  P                  V P                  V/4      pVP                  V P                  4      pWPP                  V P                  V4      &   Kw  	  V P                  V P                  V P                   X,           4      ,          # rË   )r"   r“   r6  r¥   r‡   rB  Úxreplacer˜   )r-   r�   ÚcurrentÚ	seq_indexÚcurrent_recurrenceÚnew_terms   &&    r&   rO   ÚRecursiveSeq._eval_coeff…  sÉ   € Ø—:‘:Õ¤ D§J¡J£Ô/Ø—:‘:˜dŸf™f U›mÕ,Ð,äœS §¡›_¨e°a­iÖ8ˆGð Ÿ
™
 WÕ,ˆIØ!%×!1Ñ!1×!:Ñ!:¸D¿F¹FÀIÐ;NÓ!OÐØ)×2Ñ2°4·:±:Ó>ˆHà,4�J‰J�t—v‘v˜iÓ(Ó)ñ 9ð �z‰z˜$Ÿ&™& §¡¨gÕ!5Ó6Õ7Ð7r1   c              #  ó`   "  € V P                   p V P                  V4      x € V^,          pK  5i)T)r"   rO   )r-   r�   s   & r&   rˆ   ÚRecursiveSeq.__iter__”  s+   é € Ø—
‘
ˆØØ×"Ñ" 5Ó)Ò)Ø�Q�JŠEùs   ‚,.rC   )Nr   )r¨   r©   rª   r«   r¬   rè   r°   rB  r8  r9  r¥   r˜   rZ   r"   r=   r*   rO   rˆ   r±   r²   r³   s   @r&   r'  r'  Ö  sÕ   ø‡ € ñJôX3ðj ñó ðð ñ)ó ð)ð ñó ðð ñó ðð ñó ðð ñó ðð ñó ðð ñó ðð ñ(ó ð(ò8÷ð r1   r'  Nc                óp   € \        V 4      p \        V \        4      '       d   \        W4      # \	        W4      # )aÊ  
Returns appropriate sequence object.

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

If ``seq`` is a SymPy sequence, returns :class:`SeqPer` object
otherwise returns :class:`SeqFormula` object.

Examples
========

>>> from sympy import sequence
>>> from sympy.abc import n
>>> sequence(n**2, (n, 0, 5))
SeqFormula(n**2, (n, 0, 5))
>>> sequence((1, 2, 3), (n, 0, 5))
SeqPer((1, 2, 3), (n, 0, 5))

See Also
========

sympy.series.sequences.SeqPer
sympy.series.sequences.SeqFormula
)r   r   r   rÜ   r  )r=  rê   s   &&r&   Úsequencer_  ›  s0   € ô4 �#‹,€Cä�3œ×ÒÜ�cÓ"Ð"ä˜#Ó&Ð&r1   c                   ó„   a € ] tR tRt o Rt]R 4       t]R 4       t]R 4       t]R 4       t	]R 4       t
]R 4       tR	tV tR
# )Ú	SeqExprOpiÂ  a•  
Base class for operations on sequences.

Examples
========

>>> from sympy.series.sequences import SeqExprOp, sequence
>>> from sympy.abc import n
>>> s1 = sequence(n**2, (n, 0, 10))
>>> s2 = sequence((1, 2, 3), (n, 5, 10))
>>> s = SeqExprOp(s1, s2)
>>> s.gen
(n**2, (1, 2, 3))
>>> s.interval
Interval(5, 10)
>>> s.length
6

See Also
========

sympy.series.sequences.SeqAdd
sympy.series.sequences.SeqMul
c                ó‚   € \         ;QJ d    . R V P                   4       F  NK  	  5# ! R V P                   4       4      # )zZGenerator for the sequence.

returns a tuple of generators of all the argument sequences.
c              3   ó8   "  € T F  qP                   x € K  	  R # 5irr   rð   ©r+  Úas   & r&   r,  Ú SeqExprOp.gen.<locals>.<genexpr>á  s   é € Ð.¡I˜q—U–U£Iùr.  )rç   rG   r4   s   &r&   r5   ÚSeqExprOp.genÛ  s.   € ÷ ŒuÑ. D§I¢IÓ.�uÐ.ˆuÑ. D§I¢IÓ.Ó.Ð.r1   c                ó6   € \        R V P                   4       !  # )zUSequence is defined on the intersection
of all the intervals of respective sequences
c              3   ó8   "  € T F  qP                   x € K  	  R # 5irr   ©r*   rd  s   & r&   r,  Ú%SeqExprOp.interval.<locals>.<genexpr>è  s   é € Ð<±)¨QŸjžj³)ùr.  )r   rG   r4   s   &r&   r*   ÚSeqExprOp.intervalã  s   € ô
 Ñ<°$·)²)Ó<Ñ=Ð=r1   c                ó.   € V P                   P                  # rr   rÏ   r4   s   &r&   r"   ÚSeqExprOp.startê  rÑ   r1   c                ó.   € V P                   P                  # rr   rÓ   r4   s   &r&   r=   ÚSeqExprOp.stopî  rÑ   r1   c                óz   € \        \        V P                   Uu. uF  qP                  NK  	  up4      4      # u upi )z%Cumulative of all the bound variables)rç   r   rG   rD   )r-   re  s   & r&   rD   ÚSeqExprOp.variablesò  s,   € ô ”W°4·9²9Ó=±9¨aŸkœk±9Ñ=Ó>Ó?Ð?ùÒ=s   ™8c                óJ   € V P                   V P                  ,
          ^,           # rË   rÖ   r4   s   &r&   r@   ÚSeqExprOp.length÷  rØ   r1   rC   N)r¨   r©   rª   r«   r¬   r°   r5   r*   r"   r=   rD   r@   r±   r²   r³   s   @r&   ra  ra  Â  s„   ø‡ € ñð0 ñ/ó ð/ð ñ>ó ð>ð ñ!ó ð!ð ñ!ó ð!ð ñ@ó ð@ð ñ*ó ö*r1   ra  c                   ó@   a € ] tR tRt o RtR t]R 4       tR tRt	V t
R# )rn   iü  aF  Represents term-wise addition of sequences.

Rules:
    * The interval on which sequence is defined is the intersection
      of respective intervals of sequences.
    * Anything + :class:`EmptySequence` remains unchanged.
    * Other rules are defined in ``_add`` methods of sequence classes.

Examples
========

>>> from sympy import EmptySequence, oo, SeqAdd, SeqPer, SeqFormula
>>> from sympy.abc import n
>>> SeqAdd(SeqPer((1, 2), (n, 0, oo)), EmptySequence)
SeqPer((1, 2), (n, 0, oo))
>>> SeqAdd(SeqPer((1, 2), (n, 0, 5)), SeqPer((1, 2), (n, 6, 10)))
EmptySequence
>>> SeqAdd(SeqPer((1, 2), (n, 0, oo)), SeqFormula(n**2, (n, 0, oo)))
SeqAdd(SeqFormula(n**2, (n, 0, oo)), SeqPer((1, 2), (n, 0, oo)))
>>> SeqAdd(SeqFormula(n**3), SeqFormula(n**2))
SeqFormula(n**3 + n**2, (n, 0, oo))

See Also
========

sympy.series.sequences.SeqMul
c                ó  a€ VP                  R \        P                  4      p\        V4      pV3R loS! V4      pV Uu. uF  qD\        P
                  Jg   K  VNK  	  ppV'       g   \        P
                  # \        R V 4       !  \        P                  J d   \        P
                  # V'       d   \        P                  V4      # \        \        V\        P                  4      4      p\        P                  ! V .VO5!  # u upi )Úevaluatec                 ó  <€ \        V \        4      '       d:   \        V \        4      '       d!   \        \	        SV P
                  4      . 4      # V .# \        V 4      '       d   \        \	        SV 4      . 4      # \        R 4      h©z2Input must be Sequences or  iterables of Sequences)rk   r    rn   ÚsumÚmaprG   r   rl   ©ÚargÚ_flattens   &€r&   r~  Ú SeqAdd.__new__.<locals>._flatten   sk   ø€ Ü˜#œw×'Ò'Ü˜c¤6×*Ò*Üœs 8¨S¯X©XÓ6¸Ó;Ð;à˜5�LÜ˜�}Š}Üœ3˜x¨Ó-¨rÓ2Ð2Üð 6ó 7ð 7r1   c              3   ó8   "  € T F  qP                   x € K  	  R # 5irr   rj  rd  s   & r&   r,  Ú!SeqAdd.__new__.<locals>.<genexpr>2  ó   é € Ð3©d¨Ÿ*ž*«dùr.  )Úgetr   rw  Úlistr   r¶   r   r¸   rn   Úreducer   r    r'   r   rè   )ré   rG   r$  rw  re  r~  s   &*,  @r&   rè   ÚSeqAdd.__new__  sÈ   ø€ Ø—:‘:˜jÔ*;×*DÑ*DÓEˆô �D‹zˆõ		7ñ ˜‹~ˆáÓ<™4�a¬A¯O©OÐ#;—�™4ˆÐ<÷ Ü—?‘?Ð"äÑ3©dÓ3Ñ4¼¿
¹
ÓBÜ—?‘?Ð"÷ Ü—=‘= Ó&Ð&ä”G˜D¤'×"4Ñ"4Ó5Ó6ˆä�}Š}˜SÐ( 4Ó(Ð(ùò =s   ¿DÁDc                ó€  € RpV'       d„   \        V 4       Fr  w  r#Rp\        V 4       FO  w  rEW$8X  d   K  VP                  V4      pVf   K$  V  Uu. uF  qwW539  g   K  VNK  	  ppVP                  V4        M	  V'       g   Ko  Tp  K‡  	  K‹  \        V 4      ^8X  d   V P	                  4       # \        V RR7      # u upi )zÓSimplify :class:`SeqAdd` using known rules.

Iterates through all pairs and ask the constituent
sequences if they can simplify themselves with any other constituent.

Notes
=====

adapted from ``Union.reduce``

TF©rw  )r5  r`   r•   r“   rß   rn   ©rG   Únew_argsÚid1ÚsÚid2r›   Únew_seqre  s   &       r&   r…  ÚSeqAdd.reduce=  s´   € ð ˆßÜ# Dž/‘�Ø �Ü'¨žo‘F�CØ”zÙ ØŸf™f Q›i�Gð Ô*Ù/3Ó#G©t¨!ÀÀ±§A A©t˜Ð#GØ Ÿ™¨Ô0Ùñ .÷ ‘8Ø#�DÚó *ô  ˆt‹9˜Œ>Ø—8‘8“:Ðä˜$¨Ô/Ð/ùò $Hó   Á	B;ÁB;c                óB   a€ \        V3R lV P                   4       4      # )z9adds up the coefficients of all the sequences at point ptc              3   óD   <"  € T F  qP                  S4      x € K  	  R # 5irr   )rR   )r+  re  rQ   s   & €r&   r,  Ú%SeqAdd._eval_coeff.<locals>.<genexpr>c  s   øé € Ð2©	 1—7‘7˜2—;�;«	ùs   ƒ )rz  rG   rP   s   &fr&   rO   ÚSeqAdd._eval_coeffa  s   ø€ äÔ2¨¯	ª	Ó2Ó2Ð2r1   rC   N©r¨   r©   rª   r«   r¬   rè   r¯   r…  rO   r±   r²   r³   s   @r&   rn   rn   ü  s/   ø‡ € ñò8")ðH ñ!0ó ð!0÷F3ð 3r1   rn   c                   ó@   a € ] tR tRt o RtR t]R 4       tR tRt	V t
R# )r€   if  aÃ  Represents term-wise multiplication of sequences.

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

Handles multiplication of sequences only. For multiplication
with other objects see :func:`SeqBase.coeff_mul`.

Rules:
    * The interval on which sequence is defined is the intersection
      of respective intervals of sequences.
    * Anything \* :class:`EmptySequence` returns :class:`EmptySequence`.
    * Other rules are defined in ``_mul`` methods of sequence classes.

Examples
========

>>> from sympy import EmptySequence, oo, SeqMul, SeqPer, SeqFormula
>>> from sympy.abc import n
>>> SeqMul(SeqPer((1, 2), (n, 0, oo)), EmptySequence)
EmptySequence
>>> SeqMul(SeqPer((1, 2), (n, 0, 5)), SeqPer((1, 2), (n, 6, 10)))
EmptySequence
>>> SeqMul(SeqPer((1, 2), (n, 0, oo)), SeqFormula(n**2))
SeqMul(SeqFormula(n**2, (n, 0, oo)), SeqPer((1, 2), (n, 0, oo)))
>>> SeqMul(SeqFormula(n**3), SeqFormula(n**2))
SeqFormula(n**5, (n, 0, oo))

See Also
========

sympy.series.sequences.SeqAdd
c                óº  a€ VP                  R \        P                  4      p\        V4      pV3R loS! V4      pV'       g   \        P
                  # \        R V 4       !  \        P                  J d   \        P
                  # V'       d   \        P                  V4      # \        \        V\        P                  4      4      p\        P                  ! V .VO5!  # )rw  c                 ó  <€ \        V \        4      '       d:   \        V \        4      '       d!   \        \	        SV P
                  4      . 4      # V .# \        V 4      '       d   \        \	        SV 4      . 4      # \        R 4      hry  )rk   r    r€   rz  r{  rG   r   rl   r|  s   &€r&   r~  Ú SeqMul.__new__.<locals>._flatten�  sk   ø€ Ü˜#œw×'Ò'Ü˜c¤6×*Ò*Üœs 8¨S¯X©XÓ6¸Ó;Ð;à˜5�LÜ˜#—’Üœ3˜x¨Ó-¨rÓ2Ð2Üð 6ó 7ð 7r1   c              3   ó8   "  € T F  qP                   x € K  	  R # 5irr   rj  rd  s   & r&   r,  Ú!SeqMul.__new__.<locals>.<genexpr>   r‚  r.  )rƒ  r   rw  r„  r   r¶   r   r¸   r€   r…  r   r    r'   r   rè   )ré   rG   r$  rw  r~  s   &*, @r&   rè   ÚSeqMul.__new__‰  s¤   ø€ Ø—:‘:˜jÔ*;×*DÑ*DÓEˆô �D‹zˆõ		7ñ ˜‹~ˆ÷ Ü—?‘?Ð"äÑ3©dÓ3Ñ4¼¿
¹
ÓBÜ—?‘?Ð"÷ Ü—=‘= Ó&Ð&ä”G˜D¤'×"4Ñ"4Ó5Ó6ˆä�}Š}˜SÐ( 4Ó(Ð(r1   c                ó€  € RpV'       d„   \        V 4       Fr  w  r#Rp\        V 4       FO  w  rEW$8X  d   K  VP                  V4      pVf   K$  V  Uu. uF  qwW539  g   K  VNK  	  ppVP                  V4        M	  V'       g   Ko  Tp  K‡  	  K‹  \        V 4      ^8X  d   V P	                  4       # \        V RR7      # u upi )zîSimplify a :class:`SeqMul` using known rules.

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

Iterates through all pairs and ask the constituent
sequences if they can simplify themselves with any other constituent.

Notes
=====

adapted from ``Union.reduce``

TFrˆ  )r5  rd   r•   r“   rß   r€   r‰  s   &       r&   r…  ÚSeqMul.reduce«  s´   € ð  ˆßÜ# Dž/‘�Ø �Ü'¨žo‘F�CØ”zÙ ØŸf™f Q›i�Gð Ô*Ù/3Ó#G©t¨!ÀÀ±§A A©t˜Ð#GØ Ÿ™¨Ô0Ùñ .÷ ‘8Ø#�DÚó *ô  ˆt‹9˜Œ>Ø—8‘8“:Ðä˜$¨Ô/Ð/ùò $Hr�  c                ó^   € ^pV P                    F  pW#P                  V4      ,          pK  	  V# )z<multiplies the coefficients of all the sequences at point pt)rG   rR   )r-   rQ   Úvalre  s   &&  r&   rO   ÚSeqMul._eval_coeffÒ  s*   € àˆØ—”ˆAØ—7‘7˜2“;ÕŠCñ àˆ
r1   rC   Nr•  r³   s   @r&   r€   r€   f  s0   ø‡ € ñ òD )ðD ñ$0ó ð$0÷Lð r1   r€   rr   )6Úsympy.core.basicr   Úsympy.core.cacher   Úsympy.core.containersr   Úsympy.core.decoratorsr   Úsympy.core.parametersr   Úsympy.core.functionr   r	   Úsympy.core.mulr   Úsympy.core.numbersr   Úsympy.core.relationalr   Úsympy.core.singletonr   r   Úsympy.core.sortingr   Úsympy.core.symbolr   r   r   Úsympy.core.sympifyr   Úsympy.matricesr   Úsympy.polysr   r   Úsympy.sets.setsr   r   Úsympy.tensor.indexedr   Úsympy.utilities.iterablesr   r   r   r    r¶   rÅ   rÜ   r  r'  r_  ra  rn   r€   rC   r1   r&   Ú<module>r´     sË   ðÝ "Ý $Ý 'Ý 7Ý 3ß 4Ý Ý &Ý $ß -Ý &ß 1Ñ 1Ý &Ý !ß #ß 2Ý $ß DÑ Dô^=ˆeô ^=ô@"�G yõ "ôJ0"ˆgô 0"ôfN)ˆWô N)ôbqO�ô qOôfB�7ô BôJ'ôN7*�ô 7*ôtg3ˆYô g3ôTqˆYö qr1   