+
    ‹°³j*a  ã                   ó¨   € ^ RI HtHtHtHtHtHtHtHt	H
t
 ^ RIHt ^ RIHt ^ RIHt ^ RIHt ^ RIHt R.t ! R R]]4      t ! R	 R
]4      tR tR# )é    )	ÚSÚsympifyÚexpandÚsqrtÚAddÚzerosÚacosÚImmutableMatrixÚsimplify)Útrigsimp)Ú	Printable)Ú
filldedent)Ú
EvalfMixin)Úprec_to_dpsÚVectorc                   ó†  a € ] tR t^t o RtRtRtR t]R 4       t	R t
R tR tR tR	 tR
 tR tR tR tR tR tR(R ltR tR t]t]tR tR t]P                  ]n        ]tR t]P                  ]n        R t]P                  ]n        R(R ltR)R lt R t!R t"R t#R t$R t%R t&R t'R  t(R! t)R" t*R# t+R$ t,R% t-R&t.V t/R'# )*r   a  The class used to define vectors.

It along with ReferenceFrame are the building blocks of describing a
classical mechanics system in PyDy and sympy.physics.vector.

Attributes
==========

simp : Boolean
    Let certain methods use trigsimp on their outputs

Fc                óˆ  € . V n         V^ 8X  d   . p\        V\        4      '       d   TpMO/ pV FG  pV^,          V9   d%   W#^,          ;;,          V^ ,          ,          uu&   K5  V^ ,          W#^,          &   KI  	  VP                  4        F5  w  rEV\	        . RO4      8w  g   K  V P                   P                  WT34       K7  	  R# )a_  This is the constructor for the Vector class. You should not be
calling this, it should only be used by other functions. You should be
treating Vectors like you would with if you were doing the math by
hand, and getting the first 3 from the standard basis vectors from a
ReferenceFrame.

The only exception is to create a zero vector:
zv = Vector(0)

N)r   r   r   )ÚargsÚ
isinstanceÚdictÚitemsÚMatrixÚappend)ÚselfÚinlistÚdÚinpÚkÚvs   &&    Ú\/home/luca/screen-checking/.venv/lib/python3.14/site-packages/sympy/physics/vector/vector.pyÚ__init__ÚVector.__init__   s›   € ð ˆŒ	Ø�QŒ;ØˆFÜ�fœd×#Ò#Ø‰AàˆAÛ�Ø�q•6˜Q”;Ø˜!•f—I  Q¥Õ'•Ià # A¥�A˜!•f“Iñ	 ð —G‘G–I‰DˆAØ”Fš9Ó%Ö%Ø—	‘	× Ñ  ! Ö(ó ó    c                ó   € \         # )zReturns the class Vector. )r   ©r   s   &r    ÚfuncÚVector.func<   s	   € ô ˆr#   c                ó>   € \        \        V P                  4      4      # ©N)ÚhashÚtupler   r%   s   &r    Ú__hash__ÚVector.__hash__A   s   € Ü”E˜$Ÿ)™)Ó$Ó%Ð%r#   c                óv   € V^ 8X  d   V # \        V4      p\        V P                  VP                  ,           4      # )zThe add operator for Vector. )Ú_check_vectorr   r   ©r   Úothers   &&r    Ú__add__ÚVector.__add__D   s0   € à�AŒ:ØˆKÜ˜eÓ$ˆÜ�d—i‘i %§*¡*Õ,Ó-Ð-r#   c                óh  € ^ RI HpHp \        W4      '       dc   V! V4      p\	        ^ 4      pVP
                   F=  pWE^ ,          V^,          ,          V^,          P                  V 4      ,          ,          pK?  	  V# \        V4      p\        P                  pV P
                   Fh  pVP
                   FU  pWh^ ,          P                  V^,          P                  V^,          4      ,          V^ ,          ,          ^ ,          ,          pKW  	  Kj  	  \        P                  '       d   \        VRR7      # V# )a¯  Dot product of two vectors.

Returns a scalar, the dot product of the two Vectors

Parameters
==========

other : Vector
    The Vector which we are dotting with

Examples
========

>>> from sympy.physics.vector import ReferenceFrame, dot
>>> from sympy import symbols
>>> q1 = symbols('q1')
>>> N = ReferenceFrame('N')
>>> dot(N.x, N.x)
1
>>> dot(N.x, N.y)
0
>>> A = N.orientnew('A', 'Axis', [q1, N.x])
>>> dot(N.y, A.y)
cos(q1)

©ÚDyadicÚ_check_dyadicT)Ú	recursive)Úsympy.physics.vector.dyadicr6   r7   r   r   r   Údotr/   r   ÚZeroÚTÚdcmÚsimpr   )	r   r1   r6   r7   Úolr   ÚoutÚv1Úv2s	   &&       r    r:   Ú
Vector.dotK   sÞ   € ÷8 	FÜ�e×$Ò$Ù! %Ó(ˆEÜ˜“ˆBØ—Z”Z�Ø˜•d˜Q˜q�T•k Q q¥T§X¡X¨d£^Õ4Õ4’ñ  àˆIÜ˜eÓ$ˆÜ�f‰fˆØ—)”)ˆBØ—j”j�Ø˜A�Ÿ™ R¨¥U§Y¡Y¨r°!­uÓ%5Õ6¸"¸Q½%Õ@À!ÕDÕD’ó !ñ ô �;�;ˆ;Ü˜C¨4Ô0Ð0àˆJr#   c                óN   € V P                  \        P                  V,          4      # )z6This uses mul and inputs self and 1 divided by other. )Ú__mul__r   ÚOner0   s   &&r    Ú__truediv__ÚVector.__truediv__x   s   € à�|‰|œAŸE™E E�MÓ*Ð*r#   c                óŒ  € V^ 8X  d   \        ^ 4      p \        V4      pT P                  . 8X  d   TP                  . 8X  d   R# T P                  . 8X  g   TP                  . 8X  d   R# T P                  ^ ,          ^,          pT F+  p\	        Y,
          P                  T4      4      ^ 8w  g   K*   R# 	  R#   \         d     R# i ; i)a<  Tests for equality.

It is very import to note that this is only as good as the SymPy
equality test; False does not always mean they are not equivalent
Vectors.
If other is 0, and self is empty, returns True.
If other is 0 and self is not empty, returns False.
If none of the above, only accepts other as a Vector.

FT)r   r/   Ú	TypeErrorr   r   r:   )r   r1   Úframer   s   &&  r    Ú__eq__ÚVector.__eq__|   s¨   € ð �AŒ:Ü˜1“IˆEð	Ü! %Ó(ˆEð �I‰I˜ŒO %§*¡*°Ô"2ÙØ�i‰i˜2Œo 5§:¡:°Ô#3Ùà—	‘	˜!•˜Q•ˆÛˆAÜ�t•|×(Ñ(¨Ó+Ó,°Ö1Úñ ñ øô ô 	Úð	ús   ”B4 Â4CÃCc                óÜ   € \        V P                  4      p\        V4      p\        \	        V4      4       F*  pWV,          ^ ,          ,          W#,          ^,          3W#&   K,  	  \        V4      # )aL  Multiplies the Vector by a sympifyable expression.

Parameters
==========

other : Sympifyable
    The scalar to multiply this Vector with

Examples
========

>>> from sympy.physics.vector import ReferenceFrame
>>> from sympy import Symbol
>>> N = ReferenceFrame('N')
>>> b = Symbol('b')
>>> V = 10 * b * N.x
>>> print(V)
10*b*N.x

)Úlistr   r   ÚrangeÚlenr   )r   r1   ÚnewlistÚis   &&  r    rE   ÚVector.__mul__™   sT   € ô, �t—y‘y“/ˆÜ˜“ˆÜ”s˜7“|Ö$ˆAØ¨!¥*¨Q¥-Õ/°µ¸AµÐ?ˆG‹Jñ %ä�g‹Ðr#   c                ó   € V R,          # ©é   éÿÿÿÿ© r%   s   &r    Ú__neg__ÚVector.__neg__µ   s   € Ø�b�yÐr#   c           	     óª  € ^ RI Hp \        V4      pV! ^ 4      pV P                   EF(  pVP                   EF  pW2! V^ ,          ^ ,          V^ ,          ^ ,          ,          V^,          P                  V^,          P                  3.4      ,          pW2! V^ ,          ^ ,          V^ ,          ^,          ,          V^,          P                  V^,          P
                  3.4      ,          pW2! V^ ,          ^ ,          V^ ,          ^,          ,          V^,          P                  V^,          P                  3.4      ,          pW2! V^ ,          ^,          V^ ,          ^ ,          ,          V^,          P
                  V^,          P                  3.4      ,          pW2! V^ ,          ^,          V^ ,          ^,          ,          V^,          P
                  V^,          P
                  3.4      ,          pW2! V^ ,          ^,          V^ ,          ^,          ,          V^,          P
                  V^,          P                  3.4      ,          pW2! V^ ,          ^,          V^ ,          ^ ,          ,          V^,          P                  V^,          P                  3.4      ,          pW2! V^ ,          ^,          V^ ,          ^,          ,          V^,          P                  V^,          P
                  3.4      ,          pW2! V^ ,          ^,          V^ ,          ^,          ,          V^,          P                  V^,          P                  3.4      ,          pEK  	  EK+  	  V# )aH  Outer product between two Vectors.

A rank increasing operation, which returns a Dyadic from two Vectors

Parameters
==========

other : Vector
    The Vector to take the outer product with

Examples
========

>>> from sympy.physics.vector import ReferenceFrame, outer
>>> N = ReferenceFrame('N')
>>> outer(N.x, N.x)
(N.x|N.x)

)r6   )r9   r6   r/   r   ÚxÚyÚz)r   r1   r6   r?   r   rB   s   &&    r    ÚouterÚVector.outer¸   sm  € õ* 	7Ü˜eÓ$ˆÙ�A‹YˆØ—•ˆAØ—j•j�ð �f˜q �t A�w¨¨A­¨q­Õ1°1°Qµ4·6±6¸2¸a½5¿7¹7ÐCÐDÓEÕE�Ø�f˜q �t A�w¨¨A­¨q­Õ1°1°Qµ4·6±6¸2¸a½5¿7¹7ÐCÐDÓEÕE�Ø�f˜q �t A�w¨¨A­¨q­Õ1°1°Qµ4·6±6¸2¸a½5¿7¹7ÐCÐDÓEÕE�Ø�f˜q �t A�w¨¨A­¨q­Õ1°1°Qµ4·6±6¸2¸a½5¿7¹7ÐCÐDÓEÕE�Ø�f˜q �t A�w¨¨A­¨q­Õ1°1°Qµ4·6±6¸2¸a½5¿7¹7ÐCÐDÓEÕE�Ø�f˜q �t A�w¨¨A­¨q­Õ1°1°Qµ4·6±6¸2¸a½5¿7¹7ÐCÐDÓEÕE�Ø�f˜q �t A�w¨¨A­¨q­Õ1°1°Qµ4·6±6¸2¸a½5¿7¹7ÐCÐDÓEÕE�Ø�f˜q �t A�w¨¨A­¨q­Õ1°1°Qµ4·6±6¸2¸a½5¿7¹7ÐCÐDÓEÕE�Ø�f˜q �t A�w¨¨A­¨q­Õ1°1°Qµ4·6±6¸2¸a½5¿7¹7ÐCÐDÓEÕE“ô !ñ ð ˆ	r#   c                ó°  € V P                   p\        V4      ^ 8X  d   \        ^ 4      # . pV EFR  pR	 EFG  pV^ ,          V,          ^8X  d3   VP                  RV^,          P                  V,          ,           4       KK  V^ ,          V,          R
8X  d3   VP                  RV^,          P                  V,          ,           4       K’  V^ ,          V,          ^ 8w  g   K©  VP                  V^ ,          V,          4      p\        V^ ,          V,          \        4      '       d
   RV,          pV^ ,          R8X  d   VR,          pRpMRpVP                  Wv,           V^,          P                  V,          ,           4       EKJ  	  EKU  	  RP                  V4      pVP                  R4      '       d   VR,          pV# VP                  R4      '       d
   VR,          pV# )zLatex Printing method. ú + ú - ú(%s)Ú-ºrW   NNÚ ºé   NNÚ ©r   rW   é   rX   )
r   rQ   Ústrr   Ú
latex_vecsÚ_printr   r   ÚjoinÚ
startswith)	r   ÚprinterÚarr?   r   ÚjÚarg_strÚ	str_startÚoutstrs	   &&       r    Ú_latexÚVector._latexà   sk  € ð �Y‰YˆÜˆr‹7�aŒ<Ü�q“6ˆMØˆÜˆAÜ�à�Q•4˜•7˜a”<Ø—I‘I˜e a¨¥d§o¡o°aÕ&8Õ8Ö9à�q•T˜!•W ”]Ø—I‘I˜e a¨¥d§o¡o°aÕ&8Õ8Ö9Ø�q•T˜!•W –\ð &Ÿn™n¨Q¨q­T°!­WÓ5�GÜ! ! A¥$ q¥'¬3×/Ò/Ø"(¨7Õ"2˜Ø˜q•z SÔ(Ø")¨"¥+˜Ø$)™	à$)˜	Ø—I‘I˜iÕ1°A°aµD·O±OÀAÕ4FÕF×Gô% ñ ð( —‘˜“ˆØ×Ñ˜U×#Ò#Ø˜B•ZˆFð ˆð ×Ñ˜s×#Ò#Ø˜B•ZˆFØˆr#   c           	     ó,  aa€ ^ RI Ho . pVV3R lpV P                   FÐ  w  rE\        ^4       F¼  pWF,          ^ 8X  d   K  WF,          ^8X  d+   VP	                  S! VP
                  V,          4      4       KI  WF,          R8X  d8   VP	                  S! R4      S! VP
                  V,          4      ,          4       K�  VP	                  V! WF,          VP
                  V,          4      4       K¾  	  KÒ  	  V'       d   SP                  ! V!  pV# S! R4      pV# )zPretty Printing method. )Ú
prettyFormc                 ó¼   <€ SP                  V 4      pSP                  V4      pV P                  '       d   S! VP                  4       !  pSP                  W#.R R7      # )rk   )Ú	delimiter)rp   Úis_AddÚparensÚ
_print_seq)ÚaÚbÚpaÚpbr|   rs   s   &&  €€r    Ú	juxtaposeÚ!Vector._pretty.<locals>.juxtapose  sP   ø€ Ø—‘ Ó"ˆBØ—‘ Ó"ˆBØ�x�xˆxÙ §¡£Ñ-�Ø×%Ñ% r h¸#Ð%Ó>Ð>r#   z-1Ú0rX   )Ú sympy.printing.pretty.stringpictr|   r   rP   r   Úpretty_vecsr2   )	r   rs   Útermsr†   ÚMÚNrS   Úpretty_resultr|   s	   &f      @r    Ú_prettyÚVector._pretty  sØ   ù€ å?àˆö	?ð —I”I‰DˆAÜ˜1–X�Ø•4˜1”9ÙØ•T˜Q”YØ—L‘L¡¨A¯M©M¸!Õ,<Ó!=Ö>Ø•T˜R”ZØ—L‘L¡¨DÓ!1±J¸q¿}¹}ÈQÕ?OÓ4PÕ!PÖQà—L‘L¡¨1­4°·±¸qÕ1AÓ!BÖCó ñ ÷ Ø&×.Ò.°Ñ6ˆMð Ðñ ' s›OˆMàÐr#   c                ó"   € RV ,          V,           # rV   rY   r0   s   &&r    Ú__rsub__ÚVector.__rsub__!  s   € Ø�T•	˜UÕ"Ð"r#   c                ó  € V'       d   \        V P                  4      ^8X  d   \        V P                  4      pM”\        V P                  4      ^ 8X  d   VP                  ^ 4      # V P                   Uu/ uF  qD^,          V^ ,          bK  	  pp\	        VP                  4       R R7      p. pV F  pVP                  WW,          V34       K  	  . pV EFY  pR EFN  p	V^ ,          V	,          ^8X  d3   VP                  RV^,          P                  V	,          ,           4       KK  V^ ,          V	,          R8X  d3   VP                  RV^,          P                  V	,          ,           4       K’  V^ ,          V	,          ^ 8w  g   K©  VP                  V^ ,          V	,          4      p
\        V^ ,          V	,          \        4      '       d
   RV
,          p
V
^ ,          R8X  d   V
R,          p
RpMRpVP                  Wº,           R,           V^,          P                  V	,          ,           4       EKQ  	  EK\  	  R	P                  V4      pVP                  R4      '       d   VR
,          pV# VP                  R4      '       d
   VR,          pV# u upi )zPrinting method. c                 ó   € V P                   # r)   )Úindex)r]   s   &r    Ú<lambda>Ú"Vector._sympystr.<locals>.<lambda>,  s   € °!·'²'r#   )Úkeyrc   rd   re   rf   rg   Ú*rh   ri   rk   rl   rX   )rQ   r   rO   rp   ÚsortedÚkeysr   Ústr_vecsr   r   rq   rr   )r   rs   Úorderrt   r   r   rœ   r™   r?   ru   rv   rw   rx   s   &&&          r    Ú	_sympystrÚVector._sympystr$  sê  € çœ˜DŸI™I›¨!Ô+Ü�d—i‘i“‰BÜ�—‘‹^˜qÔ Ø—>‘> !Ó$Ð$à%)§Y¢YÓ/¡Y �1•�q˜•t’¡YˆAÐ/Ü˜!Ÿ&™&›(Ñ(9Ô:ˆDØˆBÛ�Ø—	‘	˜1�6 3˜-Ö(ñ àˆÜˆAÜ�à�Q•4˜•7˜a”<Ø—I‘I˜e a¨¥d§m¡m°AÕ&6Õ6Ö7à�q•T˜!•W ”]Ø—I‘I˜e a¨¥d§m¡m°AÕ&6Õ6Ö7Ø�q•T˜!•W –\ð &Ÿn™n¨Q¨q­T°!­WÓ5�GÜ! ! A¥$ q¥'¬3×/Ò/Ø"(¨7Õ"2˜Ø˜q•z SÔ(Ø")¨"¥+˜Ø$)™	à$)˜	Ø—I‘I˜iÕ1°CÕ7¸!¸A½$¿-¹-ÈÕ:JÕJ×Kô% ñ ð( —‘˜“ˆØ×Ñ˜U×#Ò#Ø˜B•ZˆFð ˆð ×Ñ˜s×#Ò#Ø˜B•ZˆFØˆùò? 0s   Á2Jc                ó2   € V P                  VR,          4      # )zThe subtraction operator. rX   )r2   r0   s   &&r    Ú__sub__ÚVector.__sub__L  s   € à�|‰|˜E B�JÓ'Ð'r#   c                ó\  € ^ RI HpHp \        W4      '       ds   V! V4      pV! ^ 4      p\	        VP
                  4       FG  w  rVWF^ ,          V P                  V^,          4      P                  V^,          4      ,          ,          pKI  	  V# \        V4      pVP
                  . 8X  d   \        ^ 4      # R p. pVP
                  p	V	 FÙ  pV^,          P                  p
V^,          P                  pV^,          P                  pW«V.V P                  V
4      V P                  V4      V P                  V4      .\        V.4      P                  V
4      \        V.4      P                  V4      \        V.4      P                  V4      ..pW‡! V4      P
                  ,          pKÛ  	  \        V4      # )aú  The cross product operator for two Vectors.

Returns a Vector, expressed in the same ReferenceFrames as self.

Parameters
==========

other : Vector
    The Vector which we are crossing with

Examples
========

>>> from sympy import symbols
>>> from sympy.physics.vector import ReferenceFrame, cross
>>> q1 = symbols('q1')
>>> N = ReferenceFrame('N')
>>> cross(N.x, N.y)
N.z
>>> A = ReferenceFrame('A')
>>> A.orient_axis(N, q1, N.x)
>>> cross(A.x, N.y)
N.z
>>> cross(N.y, A.x)
- sin(q1)*A.y - cos(q1)*A.z

r5   c                ón  € V ^ ,          ^ ,          V ^,          ^,          V ^,          ^,          ,          V ^,          ^,          V ^,          ^,          ,          ,
          ,          V ^ ,          ^,          V ^,          ^,          V ^,          ^ ,          ,          V ^,          ^ ,          V ^,          ^,          ,          ,
          ,          ,           V ^ ,          ^,          V ^,          ^ ,          V ^,          ^,          ,          V ^,          ^,          V ^,          ^ ,          ,          ,
          ,          ,           # )zÕThis is needed as a little method for to find the determinant
of a list in python; needs to work for a 3x3 list.
SymPy's Matrix will not take in Vector, so need a custom function.
You should not be calling this.

rY   )Úmats   &r    Ú_detÚVector.cross.<locals>._detx  sÜ   € ð ˜•F˜1•I  Q¥¨¥¨S°­V°A­YÕ!6¸¸Q½À½ÀSÈÅVÈAÅYÕ9NÕ!NÕOØ˜!•f˜Q•i 3 q¥6¨!¥9¨s°1­v°a­yÕ#8¸3¸q½6À!½9Ø˜•F˜1•Iõ<õ $õ õà!$ Q¥¨¥¨c°!­f°Q­i¸#¸a½&À½)Õ.CØ˜•F˜1•I  A¥ q¥	Õ)õ/*õ "+õ+ð ,r#   )r9   r6   r7   r   Ú	enumerater   Úcrossr`   r/   r   r]   r^   r_   r:   )r   r1   r6   r7   r?   rS   r   r§   Úoutlistrt   ÚtempxÚtempyÚtempzÚtempms   &&            r    rª   ÚVector.crossP  s`  € ÷: 	FÜ�e×$Ò$Ù! %Ó(ˆEÙ˜“ˆBÜ! %§*¡*Ö-‘�Ø˜•d˜tŸz™z¨!¨A­$Ó/×6Ñ6°q¸µtÓ<Õ=Õ=’ñ .àˆIÜ˜eÓ$ˆØ�:‰:˜ÔÜ˜!“9Ðò	,ð ˆØ�Z‰ZˆÛˆAØ�a•D—F‘FˆEØ�a•D—F‘FˆEØ�a•D—F‘FˆEØ UÐ+Ø—x‘x “¨¯©°«¸¿¹À%»ÐIÜ˜q˜c“{—‘ uÓ-¬v°q°c«{¯©¸uÓ/EÜ˜q˜c“{—‘ uÓ-ð/ð0ˆEð �t˜E“{×'Ñ'Õ'ŠGñ ô �g‹Ðr#   c                óZ   € / pV P                    F  p\        V.4      W^,          &   K  	  V# )as  
The constituents of this vector in different reference frames,
as per its definition.

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

Examples
========

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

)r   r   )r   Ú
componentsr]   s   &  r    ÚseparateÚVector.separate•  s/   € ð( ˆ
Ø—”ˆAÜ% q c›{ˆJ˜•tÓñ àÐr#   c                ó$   € V P                  V4      # r)   )r:   r0   s   &&r    Ú__and__ÚVector.__and__®  s   € Ø�x‰x˜‹Ðr#   c                ó$   € V P                  V4      # r)   )rª   r0   s   &&r    Ú__xor__ÚVector.__xor__³  ó   € Ø�z‰z˜%Ó Ð r#   c                ó$   € V P                  V4      # r)   )r`   r0   s   &&r    Ú__or__ÚVector.__or__·  r»   r#   c                óF  € ^ RI Hp V! V4       \        V4      p. pV P                   Fì  pV^ ,          pV^,          pW‚8X  d   WWP	                  V4      V3.,          pK7  V'       d0   VP                  V4      P	                  V4      \        ^^4      8X  d   WWP	                  V4      V3.,          pKŠ  \        V.4      P                  V4      p	V	P                  ^ ,          ^ ,          P	                  V4      p
V\        W¢3.4      P                  ,          pKî  	  \        V4      # )aÚ  Returns the partial derivative of the vector with respect to a
variable in the provided reference frame.

Parameters
==========
var : Symbol
    What the partial derivative is taken with respect to.
frame : ReferenceFrame
    The reference frame that the partial derivative is taken in.
var_in_dcm : boolean
    If true, the differentiation algorithm assumes that the variable
    may be present in any of the direction cosine matrices that relate
    the frame to the frames of any component of the vector. But if it
    is known that the variable is not present in the direction cosine
    matrices, false can be set to skip full reexpression in the desired
    frame.

Examples
========

>>> from sympy import Symbol
>>> from sympy.physics.vector import dynamicsymbols, ReferenceFrame
>>> from sympy.physics.vector import init_vprinting
>>> init_vprinting(pretty_print=False)
>>> t = Symbol('t')
>>> q1 = dynamicsymbols('q1')
>>> N = ReferenceFrame('N')
>>> A = N.orientnew('A', 'Axis', [q1, N.y])
>>> A.x.diff(t, N)
- sin(q1)*q1'*N.x - cos(q1)*q1'*N.z
>>> A.x.diff(t, N).express(A).simplify()
- q1'*A.z
>>> B = ReferenceFrame('B')
>>> u1, u2 = dynamicsymbols('u1, u2')
>>> v = u1 * A.x + u2 * B.y
>>> v.diff(u2, N, var_in_dcm=False)
B.y

)Ú_check_frame)	Úsympy.physics.vector.framerÀ   r   r   Údiffr=   r   r   Úexpress)r   ÚvarrK   Ú
var_in_dcmrÀ   r   Úvector_componentÚmeasure_numberÚcomponent_frameÚreexp_vec_compÚderivs   &&&&       r    rÂ   ÚVector.diff»  s  € õR 	<á�UÔÜ�c‹lˆàˆà $§	¤	ÐØ-¨aÕ0ˆNØ.¨qÕ1ˆOØÔ'Ø×/Ñ/°Ó4°eÐ<Ð=Õ=’÷ " e§i¡i°Ó&@×&EÑ&EÀcÓ&JÜ&+¨A¨q£kô'2à× 3Ñ 3°CÓ 8¸/ÐJÐKÕK’Fä%+Ð-=Ð,>Ó%?×%GÑ%GÈÓ%N�NØ*×/Ñ/°Õ2°1Õ5×:Ñ:¸3Ó?�EØœf u nÐ%5Ó6×;Ñ;Õ;’Fñ !*ô  �f‹~Ðr#   c                ó"   € ^ RI Hp V! WVR7      # )aŒ  
Returns a Vector equivalent to this one, expressed in otherframe.
Uses the global express method.

Parameters
==========

otherframe : ReferenceFrame
    The frame for this Vector to be described in

variables : boolean
    If True, the coordinate symbols(if present) in this Vector
    are re-expressed in terms otherframe

Examples
========

>>> from sympy.physics.vector import ReferenceFrame, dynamicsymbols
>>> from sympy.physics.vector import init_vprinting
>>> init_vprinting(pretty_print=False)
>>> q1 = dynamicsymbols('q1')
>>> N = ReferenceFrame('N')
>>> A = N.orientnew('A', 'Axis', [q1, N.y])
>>> A.x.express(N)
cos(q1)*N.x - sin(q1)*N.z

)rÃ   )Ú	variables)Úsympy.physics.vectorrÃ   )r   Ú
otherframerÍ   rÃ   s   &&& r    rÃ   ÚVector.expressý  s   € õ8 	1Ù�t°9Ô=Ð=r#   c                ó~   € \        V Uu. uF  q P                  V4      NK  	  up4      P                  ^^4      # u upi )aä  Returns the matrix form of the vector with respect to the given
frame.

Parameters
----------
reference_frame : ReferenceFrame
    The reference frame that the rows of the matrix correspond to.

Returns
-------
matrix : ImmutableMatrix, shape(3,1)
    The matrix that gives the 1D vector.

Examples
========

>>> from sympy import symbols
>>> from sympy.physics.vector import ReferenceFrame
>>> a, b, c = symbols('a, b, c')
>>> N = ReferenceFrame('N')
>>> vector = a * N.x + b * N.y + c * N.z
>>> vector.to_matrix(N)
Matrix([
[a],
[b],
[c]])
>>> beta = symbols('beta')
>>> A = N.orientnew('A', 'Axis', (beta, N.x))
>>> vector.to_matrix(A)
Matrix([
[                         a],
[ b*cos(beta) + c*sin(beta)],
[-b*sin(beta) + c*cos(beta)]])

)r   r:   Úreshape)r   Úreference_frameÚunit_vecs   && r    Ú	to_matrixÚVector.to_matrix  sD   € ôJ Ù&ó(Ù&ð /7—x‘x Ö)Ù&ñ(ó )ß)0©°°A«ð	7ùò (s   Š:c                óŽ   a€ / pV P                    F(  pV^ ,          P                  V3R l4      W#^,          &   K*  	  \        V4      # )z(Calls .doit() on each term in the Vectorc                 ó(   <€ V P                   ! R/ SB # )NrY   )Údoit)r]   Úhintss   &€r    r—   ÚVector.doit.<locals>.<lambda>H  s   ø€ ¨q¯vªv©¸ªr#   )r   Ú	applyfuncr   )r   rÚ   r   r   s   &l  r    rÙ   ÚVector.doitD  s9   ø€ àˆØ—”ˆAØ˜•d—n‘nÔ%>Ó?ˆA��d‹Gñ ä�a‹yÐr#   c                ó   € ^ RI Hp V! W4      # )zî
Returns a Vector which is the time derivative of
the self Vector, taken in frame otherframe.

Calls the global time_derivative method

Parameters
==========

otherframe : ReferenceFrame
    The frame to calculate the time derivative in

)Útime_derivative)rÎ   rß   )r   rÏ   rß   s   && r    ÚdtÚ	Vector.dtK  s   € õ 	9Ù˜tÓ0Ð0r#   c                óx   € / pV P                    F  p\        V^ ,          4      W^,          &   K   	  \        V4      # )zReturns a simplified Vector.)r   r   r   )r   r   r   s   &  r    r   ÚVector.simplify\  s2   € àˆØ—”ˆAÜ˜q �t“nˆA��d‹Gñ ä�a‹yÐr#   c                ó†   € / pV P                    F%  pV^ ,          P                  ! V/ VB W4^,          &   K'  	  \        V4      # )zÛSubstitution on the Vector.

Examples
========

>>> from sympy.physics.vector import ReferenceFrame
>>> from sympy import Symbol
>>> N = ReferenceFrame('N')
>>> s = Symbol('s')
>>> a = N.x * s
>>> a.subs({s: 2})
2*N.x

)r   Úsubsr   )r   r   Úkwargsr   r   s   &*,  r    rå   ÚVector.subsc  s>   € ð  ˆØ—”ˆAØ˜•d—i’i Ð0¨Ñ0ˆA��d‹Gñ ä�a‹yÐr#   c                ó6   € \        V P                  V 4      4      # )zôReturns the magnitude (Euclidean norm) of self.

Warnings
========

Python ignores the leading negative sign so that might
give wrong results.
``-A.x.magnitude()`` would be treated as ``-(A.x.magnitude())``,
instead of ``(-A.x).magnitude()``.

)r   r:   r%   s   &r    Ú	magnitudeÚVector.magnitudex  s   € ô �D—H‘H˜T“NÓ#Ð#r#   c                ód   € \        V P                  . ,           4      V P                  4       ,          # )z9Returns a Vector of magnitude 1, codirectional with self.)r   r   ré   r%   s   &r    Ú	normalizeÚVector.normalize†  s!   € ä�d—i‘i "•nÓ%¨¯©Ó(8Õ8Ð8r#   c                ó¼   € \        V4      '       g   \        R4      h/ pV P                   F$  pV^ ,          P                  V4      W#^,          &   K&  	  \	        V4      # )z/Apply a function to each component of a vector.z`f` must be callable.)ÚcallablerJ   r   rÜ   r   )r   Úfr   r   s   &&  r    rÜ   ÚVector.applyfuncŠ  sL   € ä˜�{Š{ÜÐ3Ó4Ð4àˆØ—”ˆAØ˜•d—n‘n QÓ'ˆA��d‹Gñ ä�a‹yÐr#   c                óz   € V P                  4       pVP                  4       p\        VP                  V4      4      pV# )a;  
Returns the smallest angle between Vector 'vec' and self.

Parameter
=========

vec : Vector
    The Vector between which angle is needed.

Examples
========

>>> from sympy.physics.vector import ReferenceFrame
>>> A = ReferenceFrame("A")
>>> v1 = A.x
>>> v2 = A.y
>>> v1.angle_between(v2)
pi/2

>>> v3 = A.x + A.y + A.z
>>> v1.angle_between(v3)
acos(sqrt(3)/3)

Warnings
========

Python ignores the leading negative sign so that might give wrong
results. ``-A.x.angle_between()`` would be treated as
``-(A.x.angle_between())``, instead of ``(-A.x).angle_between()``.

)rì   r	   r:   )r   ÚvecÚvec1Úvec2Úangles   &&   r    Úangle_betweenÚVector.angle_between”  s3   € ðB �~‰~ÓˆØ�}‰}‹ˆÜ�T—X‘X˜d“^Ó$ˆØˆr#   c                ó8   € V P                  V4      P                  # )an  Returns the free symbols in the measure numbers of the vector
expressed in the given reference frame.

Parameters
==========
reference_frame : ReferenceFrame
    The frame with respect to which the free symbols of the given
    vector is to be determined.

Returns
=======
set of Symbol
    set of symbols present in the measure numbers of
    ``reference_frame``.

)rÕ   Úfree_symbols)r   rÓ   s   &&r    rú   ÚVector.free_symbolsº  s   € ð$ �~‰~˜oÓ.×;Ñ;Ð;r#   c                ó    € ^ RI Hp V! WR7      # )a–  Returns the free dynamic symbols (functions of time ``t``) in the
measure numbers of the vector expressed in the given reference frame.

Parameters
==========
reference_frame : ReferenceFrame
    The frame with respect to which the free dynamic symbols of the
    given vector is to be determined.

Returns
=======
set
    Set of functions of time ``t``, e.g.
    ``Function('f')(me.dynamicsymbols._t)``.

)Úfind_dynamicsymbols)rÓ   )Ú!sympy.physics.mechanics.functionsrý   )r   rÓ   rý   s   && r    Úfree_dynamicsymbolsÚVector.free_dynamicsymbolsÎ  s   € õ& 	Já" 4ÔIÐIr#   c                óÊ   € V P                   '       g   V # . p\        V4      pV P                    F(  w  rEVP                  VP                  VR 7      V.4       K*  	  \	        V4      # ))Ún)r   r   r   Úevalfr   )r   ÚprecÚnew_argsÚdpsr¦   rK   s   &&    r    Ú_eval_evalfÚVector._eval_evalfå  sV   € Ø�y�yˆyØˆKØˆÜ˜$ÓˆØŸ)œ)‰JˆCØ�O‰O˜SŸY™Y¨˜YÓ-¨uÐ5Ö6ñ $ä�hÓÐr#   c                óŒ   € . pV P                    F(  w  r4VP                  V4      pVP                  W4.4       K*  	  \        V4      # )až  Replace occurrences of objects within the measure numbers of the
vector.

Parameters
==========

rule : dict-like
    Expresses a replacement rule.

Returns
=======

Vector
    Result of the replacement.

Examples
========

>>> from sympy import symbols, pi
>>> from sympy.physics.vector import ReferenceFrame
>>> A = ReferenceFrame('A')
>>> x, y, z = symbols('x y z')
>>> ((1 + x*y) * A.x).xreplace({x: pi})
(pi*y + 1)*A.x
>>> ((1 + x*y) * A.x).xreplace({x: pi, y: 2})
(1 + 2*pi)*A.x

Replacements occur only if an entire node in the expression tree is
matched:

>>> ((x*y + z) * A.x).xreplace({x*y: pi})
(z + pi)*A.x
>>> ((x*y*z) * A.x).xreplace({x*y: pi})
x*y*z*A.x

)r   Úxreplacer   r   )r   Úruler  r¦   rK   s   &&   r    r
  ÚVector.xreplaceî  sC   € ðL ˆØŸ)œ)‰JˆCØ—,‘,˜tÓ$ˆCØ�O‰O˜S˜LÖ)ñ $ô �hÓÐr#   )r   N)T)F)0Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__r>   Ú	is_numberr!   Úpropertyr&   r,   r2   r:   rG   rL   rE   rZ   r`   ry   r�   r’   rŸ   r¢   rª   Ú__radd__Ú__rmul__r³   r¶   Ú__rand__r¹   r½   rÂ   rÃ   rÕ   rÙ   rà   r   rå   ré   rì   rÜ   r÷   rú   rÿ   r  r
  Ú__static_attributes__Ú__classdictcell__)Ú__classdict__s   @r    r   r      s  ø‡ € ñð €DØ€Iò)ð: ñó ðò&ò.ò+òZ+òò:ò8ò&òP òDò>#ô&òP(ò@ðD €HØ€Hòò2à—k‘k€G„OØ€Hò!à—m‘m€G„Oò!à—]‘]€F„Nô@ôD>ò>&7òPò1ò"òò*$ò9òò$òL<ò(Jò. ÷* ð * r#   c                   ó2   a a€ ] tR tRt oV 3R ltRtVtV ;t# )ÚVectorTypeErrori  c           
     óz   <€ \        R \        V4      : RV: R\        V4      : R24      p\        SV `  V4       R# )zExpected an instance of z, but received object 'z' of Ú.N)r   ÚtypeÚsuperr!   )r   r1   ÚwantÚmsgÚ	__class__s   &&& €r    r!   ÚVectorTypeError.__init__  s0   ø€ ÝÜ*.¨t®*³e¼TÀ%¾[ðJó Kˆä‰Ñ˜Ör#   rY   )r  r  r  r  r!   r  r  Ú__classcell__)r"  r  s   @@r    r  r    s   ù‡ € ÷õ r#   r  c                 óH   € \        V \        4      '       g   \        R 4      hV # )zA Vector must be supplied)r   r   rJ   )r1   s   &r    r/   r/   #  s    € Ü�eœV×$Ò$ÜÐ3Ó4Ð4Ø€Lr#   N)Úsympyr   r   r   r   r   r   r	   r
   r   r   Úsympy.simplify.trigsimpr   Úsympy.printing.defaultsr   Úsympy.utilities.miscr   Úsympy.core.evalfr   Úmpmath.libmp.libmpfr   Ú__all__r   rJ   r  r/   rY   r#   r    Ú<module>r-     sN   ð÷8÷ 8õ 8å ,Ý -Ý +Ý 'å +ð ˆ*€ôJ ˆY˜
ô J ôZ�iô ôr#   