
    XhI                    b   d Z ddlmZ ddlmZmZmZmZmZm	Z	m
Z
mZmZ ddlmZ ddlmZ ddlmZ ddlmZ ddlmZmZ dd	lmZ dd
lmZ ddlmZmZ ddlm Z   ed          Z! ed          Z" ed          Z# ed          Z$ ed          Z% ed          Z& G d de
          Z' G d de
          Z(d Z) G d de
          Z* G d de
          Z+ G d de          Z, G d de
          Z- G d  d!e
          Z. G d" d#e
          Z/ G d$ d%e
          Z0 G d& d'e          Z1 e1            Z2d( Z3 e3d)          Z4dRd+d*d*d,d-Z5d. Z6d/ Z7dSd0Z8dSd1Z9dRd2Z:dSd3Z;dSd4Z<dRd5Z= G d6 d7e
          Z> G d8 d9e
          Z? G d: d;e          Z@ G d< d=e@          ZA G d> d?e@          ZB G d@ dAe@          ZC G dB dCe@          ZD G dD dEe@          ZE G dF dGeA          ZF G dH dIe          ZG G dJ dKeG          ZH G dL dMeG          ZI G dN dOe
e          ZJ G dP dQe
e          ZKd*S )Tz
AST nodes specific to Fortran.

The functions defined in this module allows the user to express functions such as ``dsign``
as a SymPy function for symbolic manipulation.
    )annotations)		Attribute	CodeBlockFunctionCallNodenoneStringToken	_mk_TupleVariable)BasicTuple)Expr)Function)FloatInteger)Str)sympifytruefalse)iterablepure	elemental	intent_in
intent_outintent_inoutallocatablec                  6    e Zd ZdZdxZZeZ ed           Z	dS )Programaf   Represents a 'program' block in Fortran.

    Examples
    ========

    >>> from sympy.codegen.ast import Print
    >>> from sympy.codegen.fnodes import Program
    >>> prog = Program('myprogram', [Print([42])])
    >>> from sympy import fcode
    >>> print(fcode(prog, source_format='free'))
    program myprogram
        print *, 42
    end program

    )namebodyc                    t          |  S Nr   r#   s    f/var/www/tools.fuzzalab.pt/emblema-extractor/venv/lib/python3.11/site-packages/sympy/codegen/fnodes.py<lambda>zProgram.<lambda>4       	40@     N)
__name__
__module____qualname____doc__	__slots___fieldsr	   _construct_namestaticmethod_construct_body r+   r(   r!   r!   "   s<          +*IO"l#@#@AAOOOr+   r!   c                  "    e Zd ZdZdxZZeZeZdS )
use_renamea   Represents a renaming in a use statement in Fortran.

    Examples
    ========

    >>> from sympy.codegen.fnodes import use_rename, use
    >>> from sympy import fcode
    >>> ren = use_rename("thingy", "convolution2d")
    >>> print(fcode(ren, source_format='free'))
    thingy => convolution2d
    >>> full = use('signallib', only=['snr', ren])
    >>> print(fcode(full, source_format='free'))
    use signallib, only: snr, thingy => convolution2d

    )localoriginalN)	r,   r-   r.   r/   r0   r1   r	   _construct_local_construct_originalr5   r+   r(   r7   r7   7   s2          0/I r+   r7   c                N    t          | d          r| j        S t          |           S )Nr"   )hasattrr"   r	   args    r(   _namer@   K   s'    sF xc{{r+   c                  j    e Zd ZdZdxZZeedZ ee	          Z
 ed           Z ed           ZdS )usea   Represents a use statement in Fortran.

    Examples
    ========

    >>> from sympy.codegen.fnodes import use
    >>> from sympy import fcode
    >>> fcode(use('signallib'), source_format='free')
    'use signallib'
    >>> fcode(use('signallib', [('metric', 'snr')]), source_format='free')
    'use signallib, metric => snr'
    >>> fcode(use('signallib', only=['snr', 'convolution2d']), source_format='free')
    'use signallib, only: snr, convolution2d'

    )	namespacerenameonly)rD   rE   c                (    t          d | D              S )Nc                N    g | ]"}t          |t                    r|nt          | #S r5   )
isinstancer7   .0r?   s     r(   
<listcomp>z use.<lambda>.<locals>.<listcomp>d   sF      :D  :D  :DwzCQ[A\A\:r##blnqbr  :D  :D  :Dr+   r   argss    r(   r)   zuse.<lambda>d   s1    %  :D  :D  C  :D  :D  :D  3E r+   c                (    t          d | D              S )Nc                Z    g | ](}t          |t                    r|nt          |          )S r5   )rH   r7   r@   rI   s     r(   rK   z use.<lambda>.<locals>.<listcomp>e   s6    7{7{7{orz#z?Z?Z8j`efi`j`j7{7{7{r+   r   rL   s    r(   r)   zuse.<lambda>e   s    7{7{vz7{7{7{0| r+   N)r,   r-   r.   r/   r0   r1   r   defaultsr3   r@   _construct_namespace_construct_rename_construct_onlyr5   r+   r(   rB   rB   Q   st          :9I--H'<..$  &E  &E  F  F"l#|#|}}OOOr+   rB   c                  d    e Zd ZdZdxZZd e            iZeZ	e
d             Z ed           ZdS )Modulea\   Represents a module in Fortran.

    Examples
    ========

    >>> from sympy.codegen.fnodes import Module
    >>> from sympy import fcode
    >>> print(fcode(Module('signallib', ['implicit none'], []), source_format='free'))
    module signallib
    implicit none
    <BLANKLINE>
    contains
    <BLANKLINE>
    <BLANKLINE>
    end module

    )r"   declarationsdefinitionsrV   c                ,    d |D             }t          | S )Nc                Z    g | ](}t          |t                    rt          |          n|)S r5   )rH   strr   rI   s     r(   rK   z2Module._construct_declarations.<locals>.<listcomp>   s1    JJJcJsC009CcJJJr+   r&   )clsrM   s     r(   _construct_declarationszModule._construct_declarations~   s     JJTJJJ$r+   c                    t          |  S r%   r&   r>   s    r(   r)   zModule.<lambda>   s
    io r+   N)r,   r-   r.   r/   r0   r1   r   rP   r	   r2   classmethodr\   r3   _construct_definitionsr5   r+   r(   rU   rU   h   sk         " BAI(HO    [  *\*E*EFFr+   rU   c                  \    e Zd ZdZdZeej        z   ZeZ e	d           Z
ed             ZdS )
Subroutinea   Represents a subroutine in Fortran.

    Examples
    ========

    >>> from sympy import fcode, symbols
    >>> from sympy.codegen.ast import Print
    >>> from sympy.codegen.fnodes import Subroutine
    >>> x, y = symbols('x y', real=True)
    >>> sub = Subroutine('mysub', [x, y], [Print([x**2 + y**2, x*y])])
    >>> print(fcode(sub, source_format='free', standard=2003))
    subroutine mysub(x, y)
    real*8 :: x
    real*8 :: y
    print *, x**2 + y**2, x*y
    end subroutine

    )r"   
parametersr#   c                D    t          t          t          j        |            S r%   )r   mapr   deduced)paramss    r(   r)   zSubroutine.<lambda>   s    s8CSU[?\?\8] r+   c                B    t          |t                    r|S t          | S r%   )rH   r   )r[   itrs     r(   r4   zSubroutine._construct_body   s#    c9%% 	#Jc?"r+   N)r,   r-   r.   r/   r0   r   r1   r	   r2   r3   _construct_parametersr^   r4   r5   r+   r(   ra   ra      sc         $ /I$,&GO(L)])]^^# # [# # #r+   ra   c                  F    e Zd ZdZdxZZ ee          Z ee	          Z
dS )SubroutineCallz Represents a call to a subroutine in Fortran.

    Examples
    ========

    >>> from sympy.codegen.fnodes import SubroutineCall
    >>> from sympy import fcode
    >>> fcode(SubroutineCall('mysub', 'x y'.split()))
    '       call mysub(x, y)'

    )r"   subroutine_argsN)r,   r-   r.   r/   r0   r1   r3   r@   r2   r   _construct_subroutine_argsr5   r+   r(   rk   rk      sE        
 
 65I"l5))O!-i!8!8r+   rk   c                      e Zd ZdZdxZZ ed          edZ e	d           Z
 e	e          Z e	e          Z e	e          Z e	e          Z e	d           ZdS )Doa   Represents a Do loop in in Fortran.

    Examples
    ========

    >>> from sympy import fcode, symbols
    >>> from sympy.codegen.ast import aug_assign, Print
    >>> from sympy.codegen.fnodes import Do
    >>> i, n = symbols('i n', integer=True)
    >>> r = symbols('r', real=True)
    >>> body = [aug_assign(r, '+', 1/i), Print([i, r])]
    >>> do1 = Do(body, i, 1, n)
    >>> print(fcode(do1, source_format='free'))
    do i = 1, n
        r = r + 1d0/i
        print *, i, r
    end do
    >>> do2 = Do(body, i, 1, n, 2)
    >>> print(fcode(do2, source_format='free'))
    do i = 1, n, 2
        r = r + 1d0/i
        print *, i, r
    end do

    )r#   counterfirstlaststep
concurrent   )rs   rt   c                    t          |  S r%   r&   r'   s    r(   r)   zDo.<lambda>   r*   r+   c                "    | rt           nt          S r%   r   r>   s    r(   r)   zDo.<lambda>   s    S5KTTe r+   N)r,   r-   r.   r/   r0   r1   r   r   rP   r3   r4   r   _construct_counter_construct_first_construct_last_construct_step_construct_concurrentr5   r+   r(   ro   ro      s         4 UTI

%88H"l#@#@AAO%g..#|G,,"l7++O"l7++O(L)K)KLLr+   ro   c                  0    e Zd ZdZdxZZ ee          ZdS )ArrayConstructoraT   Represents an array constructor.

    Examples
    ========

    >>> from sympy import fcode
    >>> from sympy.codegen.fnodes import ArrayConstructor
    >>> ac = ArrayConstructor([1, 2, 3])
    >>> fcode(ac, standard=95, source_format='free')
    '(/1, 2, 3/)'
    >>> fcode(ac, standard=2003, source_format='free')
    '[1, 2, 3]'

    )elementsN)	r,   r-   r.   r/   r0   r1   r3   r   _construct_elementsr5   r+   r(   r~   r~      s6          ('I&,y11r+   r~   c                      e Zd ZdZdxZZd ed          iZ ee	          Z
 ee	          Z ee	          Z ee	          Z ee	          ZdS )ImpliedDoLoopa   Represents an implied do loop in Fortran.

    Examples
    ========

    >>> from sympy import Symbol, fcode
    >>> from sympy.codegen.fnodes import ImpliedDoLoop, ArrayConstructor
    >>> i = Symbol('i', integer=True)
    >>> idl = ImpliedDoLoop(i**3, i, -3, 3, 2)  # -27, -1, 1, 27
    >>> ac = ArrayConstructor([-28, idl, 28]) # -28, -27, -1, 1, 27, 28
    >>> fcode(ac, standard=2003, source_format='free')
    '[-28, (i**3, i = -3, 3, 2), 28]'

    )exprrp   rq   rr   rs   rs   ru   N)r,   r-   r.   r/   r0   r1   r   rP   r3   r   _construct_exprrx   ry   rz   r{   r5   r+   r(   r   r      s          GFI

#H"l7++O%g..#|G,,"l7++O"l7++OOOr+   r   c                      e Zd ZdZd Zd ZdS )ExtentaC   Represents a dimension extent.

    Examples
    ========

    >>> from sympy.codegen.fnodes import Extent
    >>> e = Extent(-3, 3)  # -3, -2, -1, 0, 1, 2, 3
    >>> from sympy import fcode
    >>> fcode(e, source_format='free')
    '-3:3'
    >>> from sympy.codegen.ast import Variable, real
    >>> from sympy.codegen.fnodes import dimension, intent_out
    >>> dim = dimension(e, e)
    >>> arr = Variable('x', real, attrs=[dim, intent_out])
    >>> fcode(arr.as_Declaration(), source_format='free', standard=2003)
    'real*8, dimension(-3:3, -3:3), intent(out) :: x'

    c                8   t          |          dk    r5|\  }}t          j        | t          |          t          |                    S t          |          dk    st          |          dk    r|d         dv rt          j        |           S t	          d          )N   r   ru   ):Nz5Expected 0 or 2 args (or one argument == None or ':'))lenr   __new__r   
ValueError)r[   rM   lowhighs       r(   r   zExtent.__new__  s    t99>>IC=gcllGDMMBBBYY!^^D		Q47k3I3I=%%%TUUUr+   c                ~    t          | j                  dk    rdS d                    d | j        D                       S )Nr   r   c              3  4   K   | ]}t          |          V  d S r%   )rZ   rI   s     r(   	<genexpr>z#Extent._sympystr.<locals>.<genexpr>%  s(      66SC666666r+   )r   rM   join)selfprinters     r(   	_sympystrzExtent._sympystr"  s=    ty>>Q3xx66DI666666r+   N)r,   r-   r.   r/   r   r   r5   r+   r(   r   r     s?         $V V V7 7 7 7 7r+   r   c                 j   t          |           dk    rt          d          g }| D ]}t          |t                    r|                    |           -t          |t
                    rK|dk    r"|                    t                                 j|                    t          |                     t          |          r|                    t          |            |                    t          |                     t          |           dk    rt          d          t          d|          S )a   Creates a 'dimension' Attribute with (up to 7) extents.

    Examples
    ========

    >>> from sympy import fcode
    >>> from sympy.codegen.fnodes import dimension, intent_in
    >>> dim = dimension('2', ':')  # 2 rows, runtime determined number of columns
    >>> from sympy.codegen.ast import Variable, integer
    >>> arr = Variable('a', integer, attrs=[dim, intent_in])
    >>> fcode(arr.as_Declaration(), source_format='free', standard=2003)
    'integer*4, dimension(2, :), intent(in) :: a'

       z0Fortran only supports up to 7 dimensional arraysr   r   zNeed at least one dimension	dimension)
r   r   rH   r   appendrZ   r	   r   r   r   )rM   rb   r?   s      r(   r   r   *  s&    4yy1}}KLLLJ , ,c6"" 
	,c""""S!! 	,czz!!&((++++!!&++....c]] 	,fcl++++gcll++++
4yyA~~6777[*---r+   *Nr5   )attrsvaluetypec                  t          |t                    r8t          |j                  dk    rt	          dt          |          z            n	t          | }t          |          |gz   }|F|t          t          t          fvrt          t          t          d|         }|
                    |           |t          j        | ||          S t          | |||          S )a   Convenience function for creating a Variable instance for a Fortran array.

    Parameters
    ==========

    symbol : symbol
    dim : Attribute or iterable
        If dim is an ``Attribute`` it need to have the name 'dimension'. If it is
        not an ``Attribute``, then it is passed to :func:`dimension` as ``*dim``
    intent : str
        One of: 'in', 'out', 'inout' or None
    \*\*kwargs:
        Keyword arguments for ``Variable`` ('type' & 'value')

    Examples
    ========

    >>> from sympy import fcode
    >>> from sympy.codegen.ast import integer, real
    >>> from sympy.codegen.fnodes import array
    >>> arr = array('a', '*', 'in', type=integer)
    >>> print(fcode(arr.as_Declaration(), source_format='free', standard=2003))
    integer*4, dimension(*), intent(in) :: a
    >>> x = array('x', [3, ':', ':'], intent='out', type=real)
    >>> print(fcode(x.as_Declaration(value=1), source_format='free', standard=2003))
    real*8, dimension(3, :, :), intent(out) :: x = 1

    r   z/Got an unexpected Attribute argument as dim: %sN)inoutinout)r   r   )rH   r   rZ   r"   r   r   listr   r   r   r   r   re   )symboldimintentr   r   r   s         r(   arrayr   O  s    : #y!! sx==K''NQTUXQYQYYZZZ ( oKK3%E)Z>>>%j<PPQWXFV|e5AAAAE????r+   c                h    t          | t                    rt          |           nt          |           S r%   )rH   rZ   r	   r   r>   s    r(   
_printabler   |  s'    $S#..@6#;;;GCLL@r+   c                >    t          dt          |           g          S )a   Creates an AST node for a function call to Fortran's "allocated(...)"

    Examples
    ========

    >>> from sympy import fcode
    >>> from sympy.codegen.fnodes import allocated
    >>> alloc = allocated('x')
    >>> fcode(alloc, source_format='free')
    'allocated(x)'

    	allocatedr   r   )r   s    r(   r   r     s     j&7&7%8999r+   c                    t          dt          |           g|rt          |          gng z   |rt          |          gng z             S )ap   Creates an AST node for a function call to Fortran's "lbound(...)"

    Parameters
    ==========

    array : Symbol or String
    dim : expr
    kind : expr

    Examples
    ========

    >>> from sympy import fcode
    >>> from sympy.codegen.fnodes import lbound
    >>> lb = lbound('arr', dim=2)
    >>> fcode(lb, source_format='free')
    'lbound(arr, 2)'

    lboundr   r   r   kinds      r(   r   r     s_    ( 	E		!	)*S//		r	+#	+*T

			-  r+   c                    t          dt          |           g|rt          |          gng z   |rt          |          gng z             S )Nuboundr   r   s      r(   r   r     s]    	E		!	)*S//		r	+#	+*T

			-  r+   c                h    t          dt          |           g|rt          |          gng z             S )aR   Creates an AST node for a function call to Fortran's "shape(...)"

    Parameters
    ==========

    source : Symbol or String
    kind : expr

    Examples
    ========

    >>> from sympy import fcode
    >>> from sympy.codegen.fnodes import shape
    >>> shp = shape('x')
    >>> fcode(shp, source_format='free')
    'shape(x)'

    shaper   )sourcer   s     r(   r   r     sD    & 	F		#	+*T

			-  r+   c                    t          dt          |           g|rt          |          gng z   |rt          |          gng z             S )a   Creates an AST node for a function call to Fortran's "size(...)"

    Examples
    ========

    >>> from sympy import fcode, Symbol
    >>> from sympy.codegen.ast import FunctionDefinition, real, Return
    >>> from sympy.codegen.fnodes import array, sum_, size
    >>> a = Symbol('a', real=True)
    >>> body = [Return((sum_(a**2)/size(a))**.5)]
    >>> arr = array(a, dim=[':'], intent='in')
    >>> fd = FunctionDefinition(real, 'rms', [arr], body)
    >>> print(fcode(fd, source_format='free', standard=2003))
    real*8 function rms(a)
    real*8, dimension(:), intent(in) :: a
    rms = sqrt(sum(a**2)*1d0/size(a))
    end function

    sizer   r   s      r(   r   r     s_    ( 	E		!	)*S//		r	+#	+*T

			-  r+   c                    t          dt          |           t          |          g|rt          |          gng z   |rt          |          gng z             S )z Creates an AST node for a function call to Fortran's "reshape(...)"

    Parameters
    ==========

    source : Symbol or String
    shape : ArrayExpr

    reshaper   )r   r   padorders       r(   r   r     si     	F		Z../!	)*S//		r	+ #	+*U

			-  r+   c                F    t          d| rt          |           gng           S )a   Creates an Attribute ``bind_C`` with a name.

    Parameters
    ==========

    name : str

    Examples
    ========

    >>> from sympy import fcode, Symbol
    >>> from sympy.codegen.ast import FunctionDefinition, real, Return
    >>> from sympy.codegen.fnodes import array, sum_, bind_C
    >>> a = Symbol('a', real=True)
    >>> s = Symbol('s', integer=True)
    >>> arr = array(a, dim=[s], intent='in')
    >>> body = [Return((sum_(a**2)/s)**.5)]
    >>> fd = FunctionDefinition(real, 'rms', [arr, s], body, attrs=[bind_C('rms')])
    >>> print(fcode(fd, source_format='free', standard=2003))
    real*8 function rms(a, s) bind(C, name="rms")
    real*8, dimension(s), intent(in) :: a
    integer*4 :: s
    rms = sqrt(sum(a**2)/s)
    end function

    bind_C)r   r	   )r"   s    r(   r   r     s%    6 X=t~~2>>>r+   c                  N    e Zd ZdZdxZZdeiZ ee	          Z
 ee          ZdS )GoToa    Represents a goto statement in Fortran

    Examples
    ========

    >>> from sympy.codegen.fnodes import GoTo
    >>> go = GoTo([10, 20, 30], 'i')
    >>> from sympy import fcode
    >>> fcode(go, source_format='free')
    'go to (10, 20, 30), i'

    )labelsr   r   N)r,   r-   r.   r/   r0   r1   r   rP   r3   r   _construct_labelsr   r   r5   r+   r(   r   r     sL          -,I~H$Y//"l7++OOOr+   r   c                  8    e Zd ZdZdxZZdeiZ ee	          Z
dS )FortranReturnaK   AST node explicitly mapped to a fortran "return".

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

    Because a return statement in fortran is different from C, and
    in order to aid reuse of our codegen ASTs the ordinary
    ``.codegen.ast.Return`` is interpreted as assignment to
    the result variable of the function. If one for some reason needs
    to generate a fortran RETURN statement, this node should be used.

    Examples
    ========

    >>> from sympy.codegen.fnodes import FortranReturn
    >>> from sympy import fcode
    >>> fcode(FortranReturn('x'))
    '       return x'

    )return_valuer   N)r,   r-   r.   r/   r0   r1   r   rP   r3   r   _construct_return_valuer5   r+   r(   r   r   -  s@         ( ,+I%H*l733r+   r   c                      e Zd ZdZd ZdS )	FFunctionM   c           	         | j         j        }|j        d         | j        k     rt	          d|| j        fz            d                    |d                    t          |j        | j	                                      S )Nstandardz%s requires Fortran %d or newerz{}({})z, )
	__class__r,   	_settings_required_standardNotImplementedErrorformatr   rd   _printrM   )r   r   r"   s      r(   _fcodezFFunction._fcodeJ  sy    ~&Z(4+BBB%&G'+T-D&E'F G G GtTYYs7>49/M/M%N%NOOOr+   N)r,   r-   r.   r   r   r5   r+   r(   r   r   G  s.        P P P P Pr+   r   c                      e Zd ZdZdS )F95Function_   N)r,   r-   r.   r   r5   r+   r(   r   r   R  s        r+   r   c                      e Zd ZdZdZdS )isignz/ Fortran sign intrinsic for integer arguments. r   Nr,   r-   r.   r/   nargsr5   r+   r(   r   r   V  s        99EEEr+   r   c                      e Zd ZdZdZdS )dsignz8 Fortran sign intrinsic for double precision arguments. r   Nr   r5   r+   r(   r   r   [  s        BBEEEr+   r   c                      e Zd ZdZdZdS )cmplxz& Fortran complex conversion function. r   Nr   r5   r+   r(   r   r   `  s        00EEEr+   r   c                      e Zd ZdZdZdS )r   z Fortran kind function. ru   Nr   r5   r+   r(   r   r   e          ""EEEr+   r   c                      e Zd ZdZdZdS )mergez Fortran merge function    Nr   r5   r+   r(   r   r   j  r   r+   r   c                  *    e Zd ZU ded<   ded<   d ZdS )_literalrZ   _tokenint	_decimalsc                >   d                     | j                  | z                      d          \  }}|                    d                              d          }|d         |dd                              d          }}|dk    rdn|}|pd| j        z   |z   |pdz   S )	Nz%.{}ee0.r   ru   + )r   r   splitstriprstriplstripr   )r   r   rM   kwargsmantissasgnd_exex_sgnex_nums           r(   r   z_literal._fcodes  s    $^^DN;;dBII#NN'>>#&&--c22 WQRR[%7%7%<%<}}&C4;.76=SIIr+   N)r,   r-   r.   __annotations__r   r5   r+   r(   r   r   o  s<         KKKNNNJ J J J Jr+   r   c                      e Zd ZdZdZdZdS )
literal_spz' Fortran single precision real literal r   	   Nr,   r-   r.   r/   r   r   r5   r+   r(   r   r   {  s        11FIIIr+   r   c                      e Zd ZdZdZdZdS )
literal_dpz' Fortran double precision real literal d   Nr   r5   r+   r(   r   r     s        11FIIIr+   r   c                  L    e Zd ZdxZZeedZ ee          Z	 ee          Z
dS )sum_r   r   maskr   r  Nr,   r-   r.   r0   r1   r   rP   r3   r   _construct_array_construct_dimr5   r+   r(   r   r     D        22IT**H#|G,,!\'**NNNr+   r   c                  L    e Zd ZdxZZeedZ ee          Z	 ee          Z
dS )product_r   r  Nr  r5   r+   r(   r  r    r  r+   r  r%   )NN)Lr/   
__future__r   sympy.codegen.astr   r   r   r   r   r	   r
   r   r   sympy.core.basicr   sympy.core.containersr   sympy.core.exprr   sympy.core.functionr   sympy.core.numbersr   r   sympy.core.symbolr   sympy.core.sympifyr   sympy.logicr   r   sympy.utilities.iterablesr   r   r   r   r   r   r   r!   r7   r@   rB   rU   ra   rk   ro   r~   r   r   assumed_extentr   assumed_sizer   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r  r5   r+   r(   <module>r     s    # " " " " "                      # " " " " " ' ' ' ' ' '             ( ( ( ( ( ( - - - - - - - - ! ! ! ! ! ! & & & & & & # # # # # # # # . . . . . . yIk""	Ik""	Y|$$
y((i&&B B B B Be B B B*! ! ! ! ! ! ! !(  ~ ~ ~ ~ ~% ~ ~ ~.G G G G GU G G G<# # # # # # # #>9 9 9 9 9U 9 9 9""M "M "M "M "M "M "M "MJ2 2 2 2 2u 2 2 2&, , , , ,E , , ,07 7 7 7 7U 7 7 7B  .  .  .F y~~+@Rt$ +@ +@ +@ +@ +@ZA A A: : :    8      4   8   $? ? ? ?:, , , , ,5 , , ,&4 4 4 4 4E 4 4 44P P P P P P P P    )       I   
    I   
    I   
    9   
    K   
	J 	J 	J 	J 	Ju 	J 	J 	J              + + + + +5$ + + ++ + + + +ud + + + + +r+   