§
    PŠtjbO  ã                  óD  — 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
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 d dlmZ d dlmZmZmZmZ d dlmZ d dl m!Z!m"Z"m#Z# d dl$m%Z%  G d„ de¦  «        Z&d„ Z'd e'e¦  «        giej(        e&<    G d„ de&e
¦  «        Z) G d„ dee&¦  «        Z* G d„ dee&¦  «        Z+ G d„ dee&¦  «        Z, G d„ de&¦  «        Z- G d„ de¦  «        Z.d „ Z/d!„ Z0e&e&_1        e+e&_2        e*e&_3        e,e&_4        e)e&_5         e,¦   «         e&_6        d"S )#é    )Úannotations)Úproduct)ÚAddÚBasic)Ú	StdFactKB)Ú
AtomicExprÚExpr)ÚPow)ÚS)Údefault_sort_key)Úsympify©Úsqrt)ÚImmutableDenseMatrix)ÚBasisDependentZeroÚBasisDependentÚBasisDependentMulÚBasisDependentAdd)Ú
CoordSys3D)ÚDyadicÚ
BaseDyadicÚ	DyadicAdd)Ú
VectorKindc                  ó>  — e Zd ZU dZdZdZdZded<   ded<   ded<   ded	<   ded
<   ded<    e¦   «         Z	ded<   e
d„ ¦   «         Zd„ Zd„ Zd„ Zd„ Zd„ Zej        e_        d„ Zd„ Zej        e_        d„ Zdd„Ze
d„ ¦   «         Zd„ Zej        e_        d„ Zd„ Zd„ ZdS ) ÚVectorz�
    Super class for all Vector classes.
    Ideally, neither this class nor any of its subclasses should be
    instantiated by the user.
    FTg      (@ztype[Vector]Ú
_expr_typeÚ	_mul_funcÚ	_add_funcÚ
_zero_funcÚ
_base_funcÚ
VectorZeroÚzeror   Úkindc                ó   — | j         S )a‚  
        Returns the components of this vector in the form of a
        Python dictionary mapping BaseVector instances to the
        corresponding measure numbers.

        Examples
        ========

        >>> from sympy.vector import CoordSys3D
        >>> C = CoordSys3D('C')
        >>> v = 3*C.i + 4*C.j + 5*C.k
        >>> v.components
        {C.i: 3, C.j: 4, C.k: 5}

        )Ú_components©Úselfs    úQ/var/www/html/CA-Chatbot/venv/lib/python3.11/site-packages/sympy/vector/vector.pyÚ
componentszVector.components(   s   € ð& ÔÐó    c                ó&   — t          | | z  ¦  «        S )z7
        Returns the magnitude of this vector.
        r   r&   s    r(   Ú	magnitudezVector.magnitude=   s   € õ �D˜4‘KÑ Ô Ð r*   c                ó0   — | |                       ¦   «         z  S )z@
        Returns the normalized version of this vector.
        )r,   r&   s    r(   Ú	normalizezVector.normalizeC   s   € ð �d—n’nÑ&Ô&Ñ&Ð&r*   c                ó`   — | |z
  }|                      |¦  «        }|                     d¦  «        S )aM  
        Check if ``self`` and ``other`` are identically equal vectors.

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

        Checks if two vector expressions are equal for all possible values of
        the symbols present in the expressions.

        Examples
        ========

        >>> from sympy.vector import CoordSys3D
        >>> from sympy.abc import x, y
        >>> from sympy import pi
        >>> C = CoordSys3D('C')

        Compare vectors that are equal or not:

        >>> C.i.equals(C.j)
        False
        >>> C.i.equals(C.i)
        True

        These two vectors are equal if `x = y` but are not identically equal
        as expressions since for some values of `x` and `y` they are unequal:

        >>> v1 = x*C.i + C.j
        >>> v2 = y*C.i + C.j
        >>> v1.equals(v1)
        True
        >>> v1.equals(v2)
        False

        Vectors from different coordinate systems can be compared:

        >>> D = C.orient_new_axis('D', pi/2, C.i)
        >>> D.j.equals(C.j)
        False
        >>> D.j.equals(C.k)
        True

        Parameters
        ==========

        other: Vector
            The other vector expression to compare with.

        Returns
        =======

        ``True``, ``False`` or ``None``. A return value of ``True`` indicates
        that the two vectors are identically equal. A return value of ``False``
        indicates that they are not. In some cases it is not possible to
        determine if the two vectors are identically equal and ``None`` is
        returned.

        See Also
        ========

        sympy.core.expr.Expr.equals
        r   )ÚdotÚequals)r'   ÚotherÚdiffÚ	diff_mag2s       r(   r1   zVector.equalsI   s1   € ð~ �e‰|ˆØ—H’H˜T‘N”Nˆ	Ø×Ò Ñ"Ô"Ð"r*   c                ó  ‡ — t          |t          ¦  «        r„t          ‰ t          ¦  «        rt          j        S t          j        }|j                             ¦   «         D ];\  }}|j        d                              ‰ ¦  «        }|||z  |j        d         z  z  }Œ<|S ddl	m
} t          ||t          f¦  «        s"t          t          |¦  «        dz   dz   ¦  «        ‚t          ||¦  «        rˆ fd„}|S t          ‰ |¦  «        S )aN  
        Returns the dot product of this Vector, either with another
        Vector, or a Dyadic, or a Del operator.
        If 'other' is a Vector, returns the dot product scalar (SymPy
        expression).
        If 'other' is a Dyadic, the dot product is returned as a Vector.
        If 'other' is an instance of Del, returns the directional
        derivative operator as a Python function. If this function is
        applied to a scalar expression, it returns the directional
        derivative of the scalar field wrt this Vector.

        Parameters
        ==========

        other: Vector/Dyadic/Del
            The Vector or Dyadic we are dotting with, or a Del operator .

        Examples
        ========

        >>> from sympy.vector import CoordSys3D, Del
        >>> C = CoordSys3D('C')
        >>> delop = Del()
        >>> C.i.dot(C.j)
        0
        >>> C.i & C.i
        1
        >>> v = 3*C.i + 4*C.j + 5*C.k
        >>> v.dot(C.k)
        5
        >>> (C.i & delop)(C.x*C.y*C.z)
        C.y*C.z
        >>> d = C.i.outer(C.i)
        >>> C.i.dot(d)
        C.i

        r   é   )ÚDelz is not a vector, dyadic or zdel operatorc                ó(   •— ddl m}  || ‰¦  «        S )Nr   )Údirectional_derivative)Úsympy.vector.functionsr9   )Úfieldr9   r'   s     €r(   r9   z*Vector.dot.<locals>.directional_derivativeÃ   s(   ø€ ØIÐIÐIÐIÐIÐIØ-Ð-¨e°TÑ:Ô:Ð:r*   )Ú
isinstancer   r!   r   r"   r)   ÚitemsÚargsr0   Úsympy.vector.deloperatorr7   Ú	TypeErrorÚstr)r'   r2   ÚoutvecÚkÚvÚvect_dotr7   r9   s   `       r(   r0   z
Vector.dotŒ   s'  ø€ õP �e�VÑ$Ô$ð 	Ý˜$¥
Ñ+Ô+ð #Ý”{Ð"Ý”[ˆFØÔ(×.Ò.Ñ0Ô0ð 3ð 3‘��1Øœ6 !œ9Ÿ=š=¨Ñ.Ô.�Ø˜( Q™,¨¬°¬Ñ2Ñ2��ØˆMØ0Ð0Ð0Ð0Ð0Ð0Ý˜% #¥v Ñ/Ô/ð 	,Ý�C ™JœJÐ)GÑGØ*ñ+ñ ,ô ,ð ,õ �e˜SÑ!Ô!ð 	*ð;ð ;ð ;ð ;ð ;ð *Ð)å�4˜ÑÔÐr*   c                ó,   — |                       |¦  «        S ©N©r0   ©r'   r2   s     r(   Ú__and__zVector.__and__Ê   s   € Ø�xŠx˜‰ŒÐr*   c                óx  — t          |t          ¦  «        r–t          | t          ¦  «        rt          j        S t          j        }|j                             ¦   «         D ]M\  }}|                      |j        d         ¦  «        }|                     |j        d         ¦  «        }|||z  z  }ŒN|S t          | |¦  «        S )aÃ  
        Returns the cross product of this Vector with another Vector or
        Dyadic instance.
        The cross product is a Vector, if 'other' is a Vector. If 'other'
        is a Dyadic, this returns a Dyadic instance.

        Parameters
        ==========

        other: Vector/Dyadic
            The Vector or Dyadic we are crossing with.

        Examples
        ========

        >>> from sympy.vector import CoordSys3D
        >>> C = CoordSys3D('C')
        >>> C.i.cross(C.j)
        C.k
        >>> C.i ^ C.i
        0
        >>> v = 3*C.i + 4*C.j + 5*C.k
        >>> v ^ C.i
        5*C.j + (-4)*C.k
        >>> d = C.i.outer(C.i)
        >>> C.j.cross(d)
        (-1)*(C.k|C.i)

        r   r6   )	r<   r   r!   r"   r)   r=   Úcrossr>   Úouter)r'   r2   ÚoutdyadrC   rD   Úcross_productrM   s          r(   rL   zVector.crossÏ   s¯   € õ@ �e�VÑ$Ô$ð 	Ý˜$¥
Ñ+Ô+ð #Ý”{Ð"Ý”kˆGØÔ(×.Ò.Ñ0Ô0ð %ð %‘��1Ø $§
¢
¨1¬6°!¬9Ñ 5Ô 5�Ø%×+Ò+¨A¬F°1¬IÑ6Ô6�Ø˜1˜u™9Ñ$��ØˆNå�T˜5Ñ!Ô!Ð!r*   c                ó,   — |                       |¦  «        S rG   ©rL   rI   s     r(   Ú__xor__zVector.__xor__û   ó   € Ø�zŠz˜%Ñ Ô Ð r*   c                óX  — t          |t          ¦  «        st          d¦  «        ‚t          | t          ¦  «        st          |t          ¦  «        rt          j        S d„ t          | j                             ¦   «         |j                             ¦   «         ¦  «        D ¦   «         }t          |Ž S )a±  
        Returns the outer product of this vector with another, in the
        form of a Dyadic instance.

        Parameters
        ==========

        other : Vector
            The Vector with respect to which the outer product is to
            be computed.

        Examples
        ========

        >>> from sympy.vector import CoordSys3D
        >>> N = CoordSys3D('N')
        >>> N.i.outer(N.j)
        (N.i|N.j)

        z!Invalid operand for outer productc                óL   — g | ]!\  \  }}\  }}||z  t          ||¦  «        z  ‘Œ"S © )r   )Ú.0Úk1Úv1Úk2Úv2s        r(   ú
<listcomp>z Vector.outer.<locals>.<listcomp>  sJ   € ð Oð Oð OÑ3E±8°B¸¹X¸bÀ"��b‘�J r¨2Ñ.Ô.Ñ.ð Oð Oð Or*   )
r<   r   r@   r!   r   r"   r   r)   r=   r   )r'   r2   r>   s      r(   rM   zVector.outer   s¨   € õ. ˜%¥Ñ(Ô(ð 	ÝÐ?Ñ@Ô@Ð@Ý˜�zÑ*Ô*ð 	Ý˜5¥*Ñ-Ô-ð	å”;ÐðOð OÝ˜4œ?×0Ò0Ñ2Ô2°EÔ4D×4JÒ4JÑ4LÔ4LÑMÔMðOñ Oô Oˆõ ˜$ÐÐr*   c                ó*  — |                       t          j        ¦  «        r|rt          j        nt          j        S |r+|                      |¦  «        |                      | ¦  «        z  S |                      |¦  «        |                      | ¦  «        z  | z  S )a«  
        Returns the vector or scalar projection of the 'other' on 'self'.

        Examples
        ========

        >>> from sympy.vector.coordsysrect import CoordSys3D
        >>> C = CoordSys3D('C')
        >>> i, j, k = C.base_vectors()
        >>> v1 = i + j + k
        >>> v2 = 3*i + 4*j
        >>> v1.projection(v2)
        7/3*C.i + 7/3*C.j + 7/3*C.k
        >>> v1.projection(v2, scalar=True)
        7/3

        )r1   r   r"   r   ÚZeror0   )r'   r2   Úscalars      r(   Ú
projectionzVector.projection$  sx   € ð$ �;Š;•v”{Ñ#Ô#ð 	5Ø#Ð4•1”6�6­¬Ð4àð 	;Ø—8’8˜E‘?”? T§X¢X¨d¡^¤^Ñ3Ð3à—8’8˜E‘?”? T§X¢X¨d¡^¤^Ñ3°dÑ:Ð:r*   c                ó$  ‡ — ddl m} t          ‰ t          ¦  «        r#t          j        t          j        t          j        fS t          t           |‰ ¦  «        ¦  «        ¦  «                             ¦   «         }t          ˆ fd„|D ¦   «         ¦  «        S )aé  
        Returns the components of this vector but the output includes
        also zero values components.

        Examples
        ========

        >>> from sympy.vector import CoordSys3D, Vector
        >>> C = CoordSys3D('C')
        >>> v1 = 3*C.i + 4*C.j + 5*C.k
        >>> v1._projections
        (3, 4, 5)
        >>> v2 = C.x*C.y*C.z*C.i
        >>> v2._projections
        (C.x*C.y*C.z, 0, 0)
        >>> v3 = Vector.zero
        >>> v3._projections
        (0, 0, 0)
        r   )Ú_get_coord_systemsc                ó:   •— g | ]}‰                      |¦  «        ‘ŒS rV   rH   )rW   Úir'   s     €r(   r\   z'Vector._projections.<locals>.<listcomp>X  s#   ø€ Ð4Ð4Ð4 a�d—h’h˜q‘k”kÐ4Ð4Ð4r*   )
Úsympy.vector.operatorsrb   r<   r!   r   r^   ÚnextÚiterÚbase_vectorsÚtuple)r'   rb   Úbase_vecs   `  r(   Ú_projectionszVector._projections>  sŒ   ø€ ð, 	>Ð=Ð=Ð=Ð=Ð=Ý�d�JÑ'Ô'ð 	,Ý”F�AœF¥A¤FÐ+Ð+Ý�Ð/Ð/°Ñ5Ô5Ñ6Ô6Ñ7Ô7×DÒDÑFÔFˆÝÐ4Ð4Ð4Ð4¨8Ð4Ñ4Ô4Ñ5Ô5Ð5r*   c                ó,   — |                       |¦  «        S rG   )rM   rI   s     r(   Ú__or__zVector.__or__Z  rS   r*   c                ó^   ‡ — t          ˆ fd„|                     ¦   «         D ¦   «         ¦  «        S )a  
        Returns the matrix form of this vector with respect to the
        specified coordinate system.

        Parameters
        ==========

        system : CoordSys3D
            The system wrt which the matrix form is to be computed

        Examples
        ========

        >>> from sympy.vector import CoordSys3D
        >>> C = CoordSys3D('C')
        >>> from sympy.abc import a, b, c
        >>> v = a*C.i + b*C.j + c*C.k
        >>> v.to_matrix(C)
        Matrix([
        [a],
        [b],
        [c]])

        c                ó:   •— g | ]}‰                      |¦  «        ‘ŒS rV   rH   )rW   Úunit_vecr'   s     €r(   r\   z$Vector.to_matrix.<locals>.<listcomp>y  s1   ø€ ð .ð .ð .¨h�t—x’x Ñ)Ô)ð .ð .ð .r*   )ÚMatrixrh   )r'   Úsystems   ` r(   Ú	to_matrixzVector.to_matrix_  sI   ø€ õ4 ð .ð .ð .ð .Ø×*Ò*Ñ,Ô,ð.ñ .ô .ñ /ô /ð 	/r*   c                ó®   — i }| j                              ¦   «         D ]8\  }}|                     |j        t          j        ¦  «        ||z  z   ||j        <   Œ9|S )aÅ  
        The constituents of this vector in different coordinate systems,
        as per its definition.

        Returns a dict mapping each CoordSys3D to the corresponding
        constituent Vector.

        Examples
        ========

        >>> from sympy.vector import CoordSys3D
        >>> R1 = CoordSys3D('R1')
        >>> R2 = CoordSys3D('R2')
        >>> v = R1.i + R2.i
        >>> v.separate() == {R1: R1.i, R2: R2.i}
        True

        )r)   r=   Úgetrr   r   r"   )r'   ÚpartsÚvectÚmeasures       r(   ÚseparatezVector.separate|  s\   € ð( ˆØ!œ_×2Ò2Ñ4Ô4ð 	2ð 	2‰MˆD�'Ø"'§)¢)¨D¬K½¼Ñ"EÔ"EØ"&¨¡.ñ#1ˆE�$”+ÑÐàˆr*   c                óJ  — t          | t          ¦  «        r$t          |t          ¦  «        rt          d¦  «        ‚t          | t          ¦  «        rG|t          j        k    rt          d¦  «        ‚t          | t          |t          j        ¦  «        ¦  «        S t          d¦  «        ‚)z( Helper for division involving vectors. zCannot divide two vectorszCannot divide a vector by zeroz#Invalid division involving a vector)	r<   r   r@   r   r^   Ú
ValueErrorÚ	VectorMulr
   ÚNegativeOne)Úoner2   s     r(   Ú_div_helperzVector._div_helper–  sŽ   € å�c�6Ñ"Ô"ð 	C¥z°%½Ñ'@Ô'@ð 	CÝÐ7Ñ8Ô8Ð8Ý˜�VÑ$Ô$ð 	CØ�œŠˆÝ Ð!AÑBÔBÐBÝ˜S¥# e­Q¬]Ñ";Ô";Ñ<Ô<Ð<åÐAÑBÔBÐBr*   N)F)Ú__name__Ú
__module__Ú__qualname__Ú__doc__Ú	is_scalarÚ	is_VectorÚ_op_priorityÚ__annotations__r   r#   Úpropertyr)   r,   r.   r1   r0   rJ   rL   rR   rM   r`   rk   rm   rs   ry   r   rV   r*   r(   r   r      s¹  € € € € € € ðð ð €IØ€IØ€LàÐÐÑØÐÐÑØÐÐÑØÐÐÑØÐÐÑØÐÐÑà!�z‘|”|€DÐ#Ð#Ð#Ñ#àð ð  ñ „Xð ð(!ð !ð !ð'ð 'ð 'ðA#ð A#ð A#ðF< ð < ð < ð|ð ð ð ”k€G„Oð*"ð *"ð *"ðX!ð !ð !ð ”m€G„Oð" ð " ð " ðH;ð ;ð ;ð ;ð4 ð6ð 6ñ „Xð6ð6!ð !ð !ð ”]€F„Nð/ð /ð /ð:ð ð ð4	Cð 	Cð 	Cð 	Cð 	Cr*   r   c                ó   ‡ — ˆ fd„}|S )Nc                óö   •— t           t          i‰         }g }| j        D ]1}t          |j        t
          ¦  «        r|                     |¦  «         Œ2|t          k    rt          |Ž                      d¬¦  «        S d S )NF)Údeep)r   Ú	VectorAddr>   r<   r#   r   ÚappendÚdoit)ÚexprÚ	vec_classÚvectorsÚtermÚclss       €r(   Ú_postprocessorz)get_postprocessor.<locals>._postprocessor¤  s~   ø€ Ý�)Ð$ SÔ)ˆ	ØˆØ”Ið 	%ð 	%ˆDÝ˜$œ)¥ZÑ0Ô0ð %Ø—’˜tÑ$Ô$Ð$øà�	Ò!Ð!Ý˜gÐ&×+Ò+°Ð+Ñ7Ô7Ð7ð "Ð!r*   rV   )r“   r”   s   ` r(   Úget_postprocessorr•   £  s$   ø€ ð8ð 8ð 8ð 8ð 8ð Ðr*   r   c                  ób   ‡ — e Zd ZdZd	ˆ fd„	Zed„ ¦   «         Zd„ Zd„ Zed„ ¦   «         Z	d„ Z
ˆ xZS )
Ú
BaseVectorz)
    Class to denote a base vector.

    Nc                óž  •— |€d                      |¦  «        }|€d                      |¦  «        }t          |¦  «        }t          |¦  «        }|t          dd¦  «        vrt          d¦  «        ‚t	          |t
          ¦  «        st          d¦  «        ‚|j        |         }t          ¦   «          	                    | t          |¦  «        |¦  «        }||_        |t          j        i|_        t          j        |_        |j        dz   |z   |_        d|z   |_        ||_        ||_        ||f|_        d	d
i}t)          |¦  «        |_        ||_        |S )Nzx{}zx_{}r   é   zindex must be 0, 1 or 2zsystem should be a CoordSys3Dú.Ú ÚcommutativeT)ÚformatrA   Úranger{   r<   r   r@   Ú_vector_namesÚsuperÚ__new__r   Ú_base_instanceÚOner%   Ú_measure_numberÚ_nameÚ_pretty_formÚ_latex_formÚ_systemÚ_idr   Ú_assumptionsÚ_sys)	r“   Úindexrr   Ú
pretty_strÚ	latex_strÚnameÚobjÚassumptionsÚ	__class__s	           €r(   r¡   zBaseVector.__new__º  s5  ø€ ØÐØŸš eÑ,Ô,ˆJØÐØŸš eÑ,Ô,ˆIÝ˜‘_”_ˆ
Ý˜	‘N”Nˆ	à�˜a ™œÐ#Ð#ÝÐ6Ñ7Ô7Ð7Ý˜&¥*Ñ-Ô-ð 	=ÝÐ;Ñ<Ô<Ð<ØÔ# EÔ*ˆå‰gŒg�oŠo˜c¥1 U¡8¤8¨VÑ4Ô4ˆà ˆÔØ¥¤˜,ˆŒÝœeˆÔØ”L 3Ñ&¨Ñ-ˆŒ	Ø 
™?ˆÔØ#ˆŒØˆŒà˜&�/ˆŒØ$ dÐ+ˆÝ$ [Ñ1Ô1ˆÔð
 ˆŒàˆ
r*   c                ó   — | j         S rG   )r¨   r&   s    r(   rr   zBaseVector.systemÝ  s
   € àŒ|Ðr*   c                ó   — | j         S rG   )r¥   )r'   Úprinters     r(   Ú	_sympystrzBaseVector._sympystrá  s
   € ØŒzÐr*   c                ób   — | j         \  }}|                     |¦  «        dz   |j        |         z   S )Nrš   )r©   Ú_printrŸ   )r'   rµ   r¬   rr   s       r(   Ú
_sympyreprzBaseVector._sympyreprä  s1   € Øœ‰ˆˆvØ�~Š~˜fÑ%Ô%¨Ñ+¨fÔ.BÀ5Ô.IÑIÐIr*   c                ó   — | hS rG   rV   r&   s    r(   Úfree_symbolszBaseVector.free_symbolsè  s	   € àˆvˆr*   c                ó   — | S rG   rV   r&   s    r(   Ú_eval_conjugatezBaseVector._eval_conjugateì  s   € Øˆr*   )NN)r€   r�   r‚   rƒ   r¡   rˆ   rr   r¶   r¹   r»   r½   Ú__classcell__)r²   s   @r(   r—   r—   ´  s®   ø€ € € € € ðð ð
!ð !ð !ð !ð !ð !ðF ðð ñ „Xððð ð ðJð Jð Jð ðð ñ „Xððð ð ð ð ð ð r*   r—   c                  ó   — e Zd ZdZd„ Zd„ ZdS )rŒ   z2
    Class to denote sum of Vector instances.
    c                ó0   — t          j        | g|¢R i |¤Ž}|S rG   )r   r¡   ©r“   r>   Úoptionsr°   s       r(   r¡   zVectorAdd.__new__õ  ó'   € ÝÔ'¨Ð>¨dÐ>Ð>Ð>°gÐ>Ð>ˆØˆ
r*   c                óX  — d}t          |                      ¦   «                              ¦   «         ¦  «        }|                     d„ ¬¦  «         |D ]R\  }}|                     ¦   «         }|D ]6}||j        v r+| j        |         |z  }||                     |¦  «        dz   z  }Œ7ŒS|d d…         S )Nr›   c                ó6   — | d                               ¦   «         S )Nr   )Ú__str__)Úxs    r(   ú<lambda>z%VectorAdd._sympystr.<locals>.<lambda>ü  s   €   1¤§¢¡¤€ r*   ©Úkeyz + éýÿÿÿ)Úlistry   r=   Úsortrh   r)   r¸   )	r'   rµ   Úret_strr=   rr   rw   Ú
base_vectsrÇ   Ú	temp_vects	            r(   r¶   zVectorAdd._sympystrù  sÇ   € ØˆÝ�T—]’]‘_”_×*Ò*Ñ,Ô,Ñ-Ô-ˆØ�
Š
Ð/Ð/ˆ
Ñ0Ô0Ð0Ø!ð 	Að 	A‰LˆF�DØ×,Ò,Ñ.Ô.ˆJØð Að A�Ø˜œÐ'Ð'Ø $¤°Ô 2°QÑ 6�IØ˜wŸ~š~¨iÑ8Ô8¸5Ñ@Ñ@�GøðAð �s˜�sŒ|Ðr*   N)r€   r�   r‚   rƒ   r¡   r¶   rV   r*   r(   rŒ   rŒ   ð  s<   € € € € € ðð ðð ð ð
ð 
ð 
ð 
ð 
r*   rŒ   c                  óD   — e Zd ZdZd„ Zed„ ¦   «         Zed„ ¦   «         ZdS )r|   z>
    Class to denote products of scalars and BaseVectors.
    c                ó0   — t          j        | g|¢R i |¤Ž}|S rG   )r   r¡   rÁ   s       r(   r¡   zVectorMul.__new__  rÃ   r*   c                ó   — | j         S )z) The BaseVector involved in the product. )r¢   r&   s    r(   Úbase_vectorzVectorMul.base_vector  s   € ð Ô"Ð"r*   c                ó   — | j         S )zU The scalar expression involved in the definition of
        this VectorMul.
        )r¤   r&   s    r(   Úmeasure_numberzVectorMul.measure_number  s   € ð
 Ô#Ð#r*   N)r€   r�   r‚   rƒ   r¡   rˆ   rÔ   rÖ   rV   r*   r(   r|   r|     sc   € € € € € ðð ðð ð ð ð#ð #ñ „Xð#ð ð$ð $ñ „Xð$ð $ð $r*   r|   c                  ó$   — e Zd ZdZdZdZdZd„ ZdS )r!   z'
    Class to denote a zero vector
    g333333(@Ú0z\mathbf{\hat{0}}c                ó.   — t          j        | ¦  «        }|S rG   )r   r¡   )r“   r°   s     r(   r¡   zVectorZero.__new__%  s   € Ý Ô(¨Ñ-Ô-ˆØˆ
r*   N)r€   r�   r‚   rƒ   r†   r¦   r§   r¡   rV   r*   r(   r!   r!     s>   € € € € € ðð ð €LØ€LØ%€Kðð ð ð ð r*   r!   c                  ó   — e Zd ZdZd„ Zd„ ZdS )ÚCrossaŒ  
    Represents unevaluated Cross product.

    Examples
    ========

    >>> from sympy.vector import CoordSys3D, Cross
    >>> R = CoordSys3D('R')
    >>> v1 = R.i + R.j + R.k
    >>> v2 = R.x * R.i + R.y * R.j + R.z * R.k
    >>> Cross(v1, v2)
    Cross(R.i + R.j + R.k, R.x*R.i + R.y*R.j + R.z*R.k)
    >>> Cross(v1, v2).doit()
    (-R.y + R.z)*R.i + (R.x - R.z)*R.j + (-R.x + R.y)*R.k

    c                óì   — t          |¦  «        }t          |¦  «        }t          |¦  «        t          |¦  «        k    rt          ||¦  «         S t          j        | ||¦  «        }||_        ||_        |S rG   )r   r   rÛ   r	   r¡   Ú_expr1Ú_expr2©r“   Úexpr1Úexpr2r°   s       r(   r¡   zCross.__new__<  sm   € Ý˜‘”ˆÝ˜‘”ˆÝ˜EÑ"Ô"Õ%5°eÑ%<Ô%<Ò<Ð<Ý˜% Ñ'Ô'Ð'Ð'ÝŒl˜3  uÑ-Ô-ˆØˆŒ
ØˆŒ
Øˆ
r*   c                ó6   — t          | j        | j        ¦  «        S rG   )rL   rÝ   rÞ   ©r'   Úhintss     r(   rŽ   z
Cross.doitF  s   € Ý�T”[ $¤+Ñ.Ô.Ð.r*   N©r€   r�   r‚   rƒ   r¡   rŽ   rV   r*   r(   rÛ   rÛ   *  s<   € € € € € ðð ð"ð ð ð/ð /ð /ð /ð /r*   rÛ   c                  ó   — e Zd ZdZd„ Zd„ ZdS )ÚDota�  
    Represents unevaluated Dot product.

    Examples
    ========

    >>> from sympy.vector import CoordSys3D, Dot
    >>> from sympy import symbols
    >>> R = CoordSys3D('R')
    >>> a, b, c = symbols('a b c')
    >>> v1 = R.i + R.j + R.k
    >>> v2 = a * R.i + b * R.j + c * R.k
    >>> Dot(v1, v2)
    Dot(R.i + R.j + R.k, a*R.i + b*R.j + c*R.k)
    >>> Dot(v1, v2).doit()
    a + b + c

    c                óÀ   — t          |¦  «        }t          |¦  «        }t          ||gt          ¬¦  «        \  }}t          j        | ||¦  «        }||_        ||_        |S )NrÉ   )r   Úsortedr   r	   r¡   rÝ   rÞ   rß   s       r(   r¡   zDot.__new__^  sY   € Ý˜‘”ˆÝ˜‘”ˆÝ˜u e˜nÕ2BÐCÑCÔC‰ˆˆuÝŒl˜3  uÑ-Ô-ˆØˆŒ
ØˆŒ
Øˆ
r*   c                ó6   — t          | j        | j        ¦  «        S rG   )r0   rÝ   rÞ   rã   s     r(   rŽ   zDot.doitg  s   € Ý�4”; ¤Ñ,Ô,Ð,r*   Nrå   rV   r*   r(   rç   rç   J  s<   € € € € € ðð ð&ð ð ð-ð -ð -ð -ð -r*   rç   c                ó   ‡ ‡— t          ‰ t          ¦  «        r+t                               ˆfd„‰ j        D ¦   «         ¦  «        S t          ‰t          ¦  «        r+t                               ˆ fd„‰j        D ¦   «         ¦  «        S t          ‰ t
          ¦  «        röt          ‰t
          ¦  «        rá‰ j        ‰j        k    r‰‰ j        d         }‰j        d         }||k    rt          j        S h d£ 	                    ||h¦  «         
                    ¦   «         }|dz   dz  |k    rdnd}|‰ j                             ¦   «         |         z  S ddlm} 	  |‰ ‰j        ¦  «        }t          |‰¦  «        S # t          $ r t!          ‰ ‰¦  «        cY S w xY wt          ‰ t"          ¦  «        st          ‰t"          ¦  «        rt          j        S t          ‰ t$          ¦  «        rIt'          t)          ‰ j                             ¦   «         ¦  «        ¦  «        \  }}	|	t          |‰¦  «        z  S t          ‰t$          ¦  «        rIt'          t)          ‰j                             ¦   «         ¦  «        ¦  «        \  }
}|t          ‰ |
¦  «        z  S t!          ‰ ‰¦  «        S )	a^  
    Returns cross product of two vectors.

    Examples
    ========

    >>> from sympy.vector import CoordSys3D
    >>> from sympy.vector.vector import cross
    >>> R = CoordSys3D('R')
    >>> v1 = R.i + R.j + R.k
    >>> v2 = R.x * R.i + R.y * R.j + R.z * R.k
    >>> cross(v1, v2)
    (-R.y + R.z)*R.i + (R.x - R.z)*R.j + (-R.x + R.y)*R.k

    c              3  ó8   •K  — | ]}t          |‰¦  «        V — Œd S rG   rQ   ©rW   rd   Úvect2s     €r(   ú	<genexpr>zcross.<locals>.<genexpr>|  s+   øè è € Ð!FÐ!F°a¥%¨¨5¡/¤/Ð!FÐ!FÐ!FÐ!FÐ!FÐ!Fr*   c              3  ó8   •K  — | ]}t          ‰|¦  «        V — Œd S rG   rQ   ©rW   rd   Úvect1s     €r(   rï   zcross.<locals>.<genexpr>~  s+   øè è € Ð!FÐ!F°a¥%¨¨q¡/¤/Ð!FÐ!FÐ!FÐ!FÐ!FÐ!Fr*   r   >   r   r6   é   r6   r™   éÿÿÿÿ©Úexpress)r<   r   rŒ   Úfromiterr>   r—   r«   r   r"   Ú
differenceÚpoprh   Ú	functionsrö   rL   r{   rÛ   r!   r|   rf   rg   r)   r=   )rò   rî   Ún1Ún2Ún3Úsignrö   rD   rY   Úm1r[   Úm2s   ``          r(   rL   rL   k  sƒ  øø€ õ  �%�ÑÔð GÝ×!Ò!Ð!FÐ!FÐ!FÐ!F¸5¼:Ð!FÑ!FÔ!FÑFÔFÐFÝ�%�ÑÔð GÝ×!Ò!Ð!FÐ!FÐ!FÐ!F¸5¼:Ð!FÑ!FÔ!FÑFÔFÐFÝ�%�Ñ$Ô$ð #­°E½:Ñ)FÔ)Fð #ØŒ:˜œÒ#Ð#Ø”˜A”ˆBØ”˜A”ˆBØ�RŠxˆxÝ”{Ð"Ø�'�'×$Ò$ b¨" XÑ.Ô.×3Ò3Ñ5Ô5ˆBØ˜q™& A™¨Ò+Ð+�1�1°"ˆDØ˜œ
×/Ò/Ñ1Ô1°"Ô5Ñ5Ð5Ø&Ð&Ð&Ð&Ð&Ð&ð	#Ø�˜˜uœzÑ*Ô*ˆAõ ˜˜E‘?”?Ð"øõ ð 	'ð 	'ð 	'Ý˜ Ñ&Ô&Ð&Ð&Ð&ð	'øøøõ �%�Ñ$Ô$ð ­
°5½*Ñ(EÔ(Eð ÝŒ{ÐÝ�%�Ñ#Ô#ð #Ý•d˜5Ô+×1Ò1Ñ3Ô3Ñ4Ô4Ñ5Ô5‰ˆˆBØ•%˜˜EÑ"Ô"Ñ"Ð"Ý�%�Ñ#Ô#ð #Ý•d˜5Ô+×1Ò1Ñ3Ô3Ñ4Ô4Ñ5Ô5‰ˆˆBØ•%˜˜rÑ"Ô"Ñ"Ð"å�˜ÑÔÐs   ÅE. Å.FÆ
Fc                ó2  ‡ ‡— t          ‰ t          ¦  «        r%t          j        ˆfd„‰ j        D ¦   «         ¦  «        S t          ‰t          ¦  «        r%t          j        ˆ fd„‰j        D ¦   «         ¦  «        S t          ‰ t          ¦  «        r‹t          ‰t          ¦  «        rv‰ j        ‰j        k    r‰ ‰k    rt          j        nt          j        S ddl	m
} 	  |‰‰ j        ¦  «        }t          ‰ |¦  «        S # t          $ r t          ‰ ‰¦  «        cY S w xY wt          ‰ t          ¦  «        st          ‰t          ¦  «        rt          j        S t          ‰ t          ¦  «        rIt!          t#          ‰ j                             ¦   «         ¦  «        ¦  «        \  }}|t          |‰¦  «        z  S t          ‰t          ¦  «        rIt!          t#          ‰j                             ¦   «         ¦  «        ¦  «        \  }}|t          ‰ |¦  «        z  S t          ‰ ‰¦  «        S )a2  
    Returns dot product of two vectors.

    Examples
    ========

    >>> from sympy.vector import CoordSys3D
    >>> from sympy.vector.vector import dot
    >>> R = CoordSys3D('R')
    >>> v1 = R.i + R.j + R.k
    >>> v2 = R.x * R.i + R.y * R.j + R.z * R.k
    >>> dot(v1, v2)
    R.x + R.y + R.z

    c              3  ó8   •K  — | ]}t          |‰¦  «        V — Œd S rG   rH   rí   s     €r(   rï   zdot.<locals>.<genexpr>¬  s+   øè è € Ð>Ð>¨a�C  5™MœMÐ>Ð>Ð>Ð>Ð>Ð>r*   c              3  ó8   •K  — | ]}t          ‰|¦  «        V — Œd S rG   rH   rñ   s     €r(   rï   zdot.<locals>.<genexpr>®  s+   øè è € Ð>Ð>¨a�C  q™MœMÐ>Ð>Ð>Ð>Ð>Ð>r*   r6   rõ   )r<   r   r÷   r>   r—   r«   r   r£   r^   rú   rö   r0   r{   rç   r!   r|   rf   rg   r)   r=   )rò   rî   rö   rD   rY   rÿ   r[   r   s   ``      r(   r0   r0   ›  s  øø€ õ  �%�ÑÔð ?ÝŒ|Ð>Ð>Ð>Ð>°5´:Ð>Ñ>Ô>Ñ>Ô>Ð>Ý�%�ÑÔð ?ÝŒ|Ð>Ð>Ð>Ð>°5´:Ð>Ñ>Ô>Ñ>Ô>Ð>Ý�%�Ñ$Ô$ð 	!­°E½:Ñ)FÔ)Fð 	!ØŒ:˜œÒ#Ð#Ø! UšN˜N•1”5�5µ´Ð6Ø&Ð&Ð&Ð&Ð&Ð&ð	!Ø�˜˜uœzÑ*Ô*ˆAõ �u˜a‘=”=Ð øõ ð 	%ð 	%ð 	%Ý�u˜eÑ$Ô$Ð$Ð$Ð$ð	%øøøõ �%�Ñ$Ô$ð ­
°5½*Ñ(EÔ(Eð ÝŒvˆÝ�%�Ñ#Ô#ð !Ý•d˜5Ô+×1Ò1Ñ3Ô3Ñ4Ô4Ñ5Ô5‰ˆˆBØ•#�b˜%‘.”.Ñ Ð Ý�%�Ñ#Ô#ð !Ý•d˜5Ô+×1Ò1Ñ3Ô3Ñ4Ô4Ñ5Ô5‰ˆˆBØ•#�e˜R‘.”.Ñ Ð åˆu�eÑÔÐs   ÃC7 Ã7DÄDN)7Ú
__future__r   Ú	itertoolsr   Ú
sympy.corer   r   Úsympy.core.assumptionsr   Úsympy.core.exprr   r	   Úsympy.core.powerr
   Úsympy.core.singletonr   Úsympy.core.sortingr   Úsympy.core.sympifyr   Ú(sympy.functions.elementary.miscellaneousr   Úsympy.matrices.immutabler   rq   Úsympy.vector.basisdependentr   r   r   r   Úsympy.vector.coordsysrectr   Úsympy.vector.dyadicr   r   r   Úsympy.vector.kindr   r   r•   Ú"_constructor_postprocessor_mappingr—   rŒ   r|   r!   rÛ   rç   rL   r0   r   r   r   r   r    r"   rV   r*   r(   ú<module>r     s)  ðØ "Ð "Ð "Ð "Ð "Ð "Ø Ð Ð Ð Ð Ð à !Ð !Ð !Ð !Ð !Ð !Ð !Ð !Ø ,Ð ,Ð ,Ð ,Ð ,Ð ,Ø ,Ð ,Ð ,Ð ,Ð ,Ð ,Ð ,Ð ,Ø  Ð  Ð  Ð  Ð  Ð  Ø "Ð "Ð "Ð "Ð "Ð "Ø /Ð /Ð /Ð /Ð /Ð /Ø &Ð &Ð &Ð &Ð &Ð &Ø 9Ð 9Ð 9Ð 9Ð 9Ð 9Ø CÐ CÐ CÐ CÐ CÐ Cð:ð :ð :ð :ð :ð :ð :ð :ð :ð :ð :ð :à 0Ð 0Ð 0Ð 0Ð 0Ð 0Ø =Ð =Ð =Ð =Ð =Ð =Ð =Ð =Ð =Ð =Ø (Ð (Ð (Ð (Ð (Ð (ðKCð KCð KCð KCð KCˆ^ñ KCô KCð KCð^
ð 
ð 
ð 
ÐÐ˜cÑ"Ô"Ð#ð4€Ô (¨Ñ 0ð9ð 9ð 9ð 9ð 9�˜ñ 9ô 9ð 9ðxð ð ð ð Ð! 6ñ ô ð ð,$ð $ð $ð $ð $Ð! 6ñ $ô $ð $ð,ð ð ð ð Ð# Vñ ô ð ð/ð /ð /ð /ð /ˆFñ /ô /ð /ð@-ð -ð -ð -ð -ˆ$ñ -ô -ð -ðB-ð -ð -ð`'ð 'ð 'ðT €Ô Ø€Ô Ø€Ô Ø€Ô Ø€Ô Øˆj‰lŒl€„€€r*   