
    \hׁ                       S r SSKJr  SSKJr  SSKJrJrJrJ	r	J
r
Jr  SSKJr  SSKJr  SSKJr  SSKJr  SS	KJr  S
SKJrJr  S
SKJrJr  SSKJrJr   " S S\5      r\" \5      S 5       r  " S S\5      r!\" \!5      S 5       r"g)zI
A Printer for generating readable representation of most SymPy classes.
    )annotations)Any)SRationalPowBasicMulNumber)_keep_coeff)Integer)
Relational)default_sort_key)sift   )
precedence
PRECEDENCE)Printerprint_function)prec_to_dpsto_strc            	      ~   \ rS rSr% SrSSSSSSSSS.rS\S	'   0 rS
\S'   SS jrSS jr	S r
SS jrS rS rS rS rS rS rS rS rS rS rS rS rS rS rS rS rS  rS! rS" rS# rS$ r S% r!S& r"S' r#S( r$S) r%S* r&S+ r'S, r(S- r)S. r*S/ r+S0 r,S1 r-S2 r.S3 r/S4 r0S5 r1S6 r2S7 r3S8 r4S9 r5S: r6S; r7S< r8S= r9S> r:S? r;S@ r<SA r=SB r>SC r?SD r@SE rASF rBSG rCSH rDSI rESJ rFSK rGSL rHSM rISN rJSO rKSP rLSQ rMSR rNSSS jrOST rPSU rQSV rRSW rSSX rTSY rUSZ rVS[ rWS\ rXS] rYS^ rZS_ r[S` r\Sa r]Sb r^Sc r_Sd r`Se raSf rbSg rcSh rdSi reSj rfSk rgSl rhSm riSn rjSo rk\krl\krmSp rnSq roSr rpSs rqSt rrSu rsSv rtSw ruSx rvSy rwSz rxS{ ryS| rzS} r{S~ r|S r}S r~S rS rS rS rS rS rS rS rS rS rS rS rS rS rS rS rSrg)
StrPrinter   	_sympystrNautoFT)order	full_precsympy_integersabbrevperm_cyclicminmaxdpszdict[str, Any]_default_settingszdict[str, str]_relationalsc                    [        U5      U:  d  U(       d#  [        U5      U::  a  SU R                  U5      -  $ U R                  U5      $ )N(%s))r   _print)selfitemlevelstricts       J/var/www/auris/envauris/lib/python3.13/site-packages/sympy/printing/str.pyparenthesizeStrPrinter.parenthesize#   s@    tu$v:d;Ku;TDKK---;;t$$    c           	     l    UR                  U Vs/ s H  o@R                  XC5      PM     sn5      $ s  snf N)joinr.   )r)   argssepr+   r*   s        r-   	stringifyStrPrinter.stringify)   s,    xxDIDD**47DIJJIs   1c                    [        U[        5      (       a  U$ [        U[        5      (       a  [        U5      $ [        U5      $ r2   )
isinstancestrr   reprr)   exprs     r-   emptyPrinterStrPrinter.emptyPrinter,   s5    dC  Ke$$:t9r0   c                   U R                  XS9n[        U5      n/ nU H  nU R                  U5      nUR                  S5      (       a  UR                  (       d  SnUSS  nOSn[        U5      U:  d  UR                  (       a  UR                  USU-  /5        M}  UR                  X/5        M     UR                  S5      nUS:X  a  SnUSR                  U5      -   $ )	Nr   -r   +r'   r     )_as_ordered_termsr   r(   
startswithis_Addextendpopr3   )	r)   r=   r   termsprecltermtsigns	            r-   
_print_AddStrPrinter._print_Add4   s    &&t&9$DD!A||C  abE$$&$++$
+,$#  uuQx3;Dchhqk!!r0   c                    g)NTrue r<   s     r-   _print_BooleanTrueStrPrinter._print_BooleanTrueI   s    r0   c                    g)NFalserU   r<   s     r-   _print_BooleanFalseStrPrinter._print_BooleanFalseL       r0   c                T    SU R                  UR                  S   [        S   5      -  $ )Nz~%sr   Not)r.   r4   r   r<   s     r-   
_print_NotStrPrinter._print_NotO   s'    t((1j6GHIIr0   c                J   [        UR                  5      n[        U5       Hf  u  p4[        U[        5      (       d  M  UR
                  R                  [        R                  L d  ME  UR                  SUR                  U5      5        Mh     U R                  US[        S   5      $ )Nr   z & 
BitwiseAnd)listr4   	enumerater9   r   	canonicalrhsr   NegativeInfinityinsertrJ   r6   r   )r)   r=   r4   jis        r-   
_print_AndStrPrinter._print_AndR   sr    DIIdODA!Z((KKOOq'9'99Atxx{+ $ ~~dE:l+CDDr0   c                J    U R                  UR                  S[        S   5      $ )Nz | 	BitwiseOrr6   r4   r   r<   s     r-   	_print_OrStrPrinter._print_OrZ   s    ~~dii
;0GHHr0   c                J    U R                  UR                  S[        S   5      $ )Nz ^ 
BitwiseXorro   r<   s     r-   
_print_XorStrPrinter._print_Xor]   s    ~~dii
<0HIIr0   c                |    U R                  UR                  5      < SU R                  UR                  S5      < S3$ N(, ))r(   functionr6   	argumentsr<   s     r-   _print_AppliedPredicate"StrPrinter._print_AppliedPredicate`   s/    KK&t~~t(LN 	Nr0   c                    UR                    Vs/ s H  o R                  U5      PM     nnUR                  R                  SSR	                  U5      -  -   $ s  snf Nr'   ry   )r4   r(   	__class____name__r3   )r)   r=   orM   s       r-   _print_BasicStrPrinter._print_Basicd   sG    %)YY/Y[[^Y/~~&&$))A,)>>> 0s   Ac                    UR                   R                  S:X  a  U R                  UR                   S   5        U R                  UR                   5      $ )N)r   r   )r   r   )blocksshaper(   )r)   Bs     r-   _print_BlockMatrixStrPrinter._print_BlockMatrixh   s9    88>>V#KK'{{188$$r0   c                    g)NCatalanrU   r<   s     r-   _print_CatalanStrPrinter._print_Catalanm   s    r0   c                    g)NzoorU   r<   s     r-   _print_ComplexInfinity!StrPrinter._print_ComplexInfinityp       r0   c                   [        UR                  UR                  4 Vs/ s H  o R                  U5      PM     sn5      nUR                  [
        R                  L a  SU-  $ X0R                  UR                  5      4-  nSU-  $ s  snf )NzConditionSet(%s, %s)zConditionSet(%s, %s, %s))tuplesym	conditionr(   base_setr   UniversalSet)r)   srj   r4   s       r-   _print_ConditionSetStrPrinter._print_ConditionSets   st    quuakk.BC.Bkk!n.BCD::')D00QZZ(**)D00	 Ds   Bc                   ^  UR                   nUR                   Vs/ s H  o3S   S:X  a  US   OUPM     nnSSR                  U 4S jU/U-    5       5      -  $ s  snf )Nr   r   zDerivative(%s)ry   c              3  F   >#    U  H  nTR                  U5      v   M     g 7fr2   r(   .0argr)   s     r-   	<genexpr>/StrPrinter._print_Derivative.<locals>.<genexpr>}   s     ,Y#T[[-=-=   !)r=   variable_countr3   )r)   r=   dexprrj   dvarss   `    r-   _print_DerivativeStrPrinter._print_Derivativez   s`    		373F3FG3Fa11)3FG$)),Y%SX,Y"ZZZ Hs   Ac                    [        UR                  5       [        S9n/ nU H=  nU R                  U5      < SU R                  X   5      < 3nUR	                  U5        M?     SSR                  U5      -  $ )Nkeyz: {%s}ry   )sortedkeysr   r(   appendr3   )r)   dr   itemsr   r*   s         r-   _print_dictStrPrinter._print_dict   sd    affh$45C#{{3/QV1DEDLL  		%(((r0   c                $    U R                  U5      $ r2   )r   r<   s     r-   _print_DictStrPrinter._print_Dict       %%r0   c                @   [        US5      (       a"  SU R                  UR                  5       5      -   $ [        US5      (       a=  SU R                  UR                  5      -   S-   U R                  UR                  5      -   $ SU R                  UR                  5      -   $ )N
as_booleanzDomain: setz in z
Domain on )hasattrr(   r   symbolsr   )r)   r   s     r-   _print_RandomDomainStrPrinter._print_RandomDomain   s    1l##ALLN ;;;QQYY!77&@KK&' (  $++aii"888r0   c                     SUR                   -   $ N_namer<   s     r-   _print_DummyStrPrinter._print_Dummy   s    TYYr0   c                    g)N
EulerGammarU   r<   s     r-   _print_EulerGammaStrPrinter._print_EulerGamma   s    r0   c                    g)NErU   r<   s     r-   _print_Exp1StrPrinter._print_Exp1       r0   c                |    SU R                  UR                  5      < SU R                  UR                  5      < S3$ rw   )r(   r=   condr<   s     r-   _print_ExprCondPairStrPrinter._print_ExprCondPair   s'    ![[3T[[5KLLr0   c                n    UR                   R                  SU R                  UR                  S5      -  -   $ r   )funcr   r6   r4   r<   s     r-   _print_FunctionStrPrinter._print_Function   s+    yy!!FT^^DIIt-L$LLLr0   c                    g)NGoldenRatiorU   r<   s     r-   _print_GoldenRatioStrPrinter._print_GoldenRatio   s    r0   c                n    UR                   R                  SU R                  UR                  S5      -  -   $ r   )r   r   r6   pargsr<   s     r-   _print_HeavisideStrPrinter._print_Heaviside   s-     yy!!FT^^DJJ-M$MMMr0   c                    g)NTribonacciConstantrU   r<   s     r-   _print_TribonacciConstant$StrPrinter._print_TribonacciConstant   s    #r0   c                    gNIrU   r<   s     r-   _print_ImaginaryUnitStrPrinter._print_ImaginaryUnit   r   r0   c                    g)NoorU   r<   s     r-   _print_InfinityStrPrinter._print_Infinity       r0   c                   ^  U 4S jnSR                  UR                   Vs/ s H
  o2" U5      PM     sn5      nST R                  UR                  5      < SU< S3$ s  snf )Nc                   > [        U 5      S:X  a  TR                  U S   5      $ TR                  U S   4[        U SS  5      -   5      $ Nr   r   lenr(   r   xabr)   s    r-   
_xab_tostr.StrPrinter._print_Integral.<locals>._xab_tostr   E    3x1}{{3q6**{{CF9uSW~#=>>r0   ry   z	Integral(rz   r3   limitsr(   r{   r)   r=   r   rM   Ls   `    r-   _print_IntegralStrPrinter._print_Integral   sL    	?
 IIdkk:kz!}k:;%)[[%?CC ;   Ac                `   SnUR                   u  p4pVUR                  (       a  UR                  (       a  SnOdUR                  (       a
  U(       d  SnOIUR                  (       a
  U(       d  SnO.U(       d
  U(       d  SnOU(       a
  U(       a  SnOU(       a  SnOSnUR                  " S0 X4US.D6$ )NzInterval{m}({a}, {b})rD   z.openz.Lopenz.Ropen)abmrU   )r4   is_infiniteformat)r)   rj   finr  r  rM   rr  s           r-   _print_IntervalStrPrinter._print_Interval   sz    &VV
a==Q]]A]]1A]]1A1A1AAAzz5!!455r0   c                |    SU R                  UR                  5      < SU R                  UR                  5      < S3$ )NzAccumBounds(ry   rz   )r(   r!   r"   )r)   rj   s     r-   _print_AccumulationBounds$StrPrinter._print_AccumulationBounds   s,    (,AEE(:(,AEE(:< 	<r0   c                N    SU R                  UR                  [        S   5      -  $ )Nz%s**(-1)r   r.   r   r   )r)   r   s     r-   _print_InverseStrPrinter._print_Inverse   s#    D--aeeZ5FGGGr0   c                    UR                   nUR                  n[        U5      S:X  a  US   R                  (       a  US   nSU R	                  U5      < SU R	                  U5      < S3$ )Nr   r   zLambda(ry   rz   )r=   	signaturer   	is_symbolr(   )r)   objr=   sigs       r-   _print_LambdaStrPrinter._print_Lambda   sR    xxmms8q=SV--a&C#';;s#3T[[5FGGr0   c                   ^  [        UR                  [        S9nUR                  R                  SSR                  U 4S jU 5       5      -  -   $ )Nr   r'   ry   c              3  F   >#    U  H  nTR                  U5      v   M     g 7fr2   r   r   s     r-   r   .StrPrinter._print_LatticeOp.<locals>.<genexpr>   s     6XSWCt{{37G7GSWr   )r   r4   r   r   r   r3   r)   r=   r4   s   `  r-   _print_LatticeOpStrPrinter._print_LatticeOp   s>    dii%56yy!!FTYY6XSW6X-X$XXXr0   c           
     h    UR                   u  p#pES[        [        U R                  X#XE45      5      -  $ )NzLimit(%s, %s, %s, dir='%s'))r4   r   mapr(   )r)   r=   ezz0dirs         r-   _print_LimitStrPrinter._print_Limit   s.    		b,uSqRo5V/WWWr0   c                ,    SU R                  US5      -  $ )N[%s]ry   )r6   r<   s     r-   _print_listStrPrinter._print_list   s    tT222r0   c                $    U R                  U5      $ r2   )r)  r<   s     r-   _print_ListStrPrinter._print_List   r   r0   c                $    UR                  U 5      $ r2   )_format_strr<   s     r-   _print_MatrixBaseStrPrinter._print_MatrixBase   r   r0   c                    U R                  UR                  [        S   SS9SU R                  UR                  5      < SU R                  UR
                  5      < S3-   $ )NAtomTr,   [ry   ])r.   parentr   r(   rj   ri   r<   s     r-   _print_MatrixElementStrPrinter._print_MatrixElement   sN      j.@ N KK/TVV1DEF 	Fr0   c                  ^  U 4S jnT R                  UR                  [        S   SS9S-   U" UR                  UR                  R                  5      -   S-   U" UR
                  UR                  R                  5      -   S-   $ )Nc                   > [        U 5      n U S   S:X  a  U S	 U S   S:X  a  SU S'   U S   U:X  a  SU S'   SR                  U4S jU  5       5      $ )N   r   r   rD   :c              3  F   >#    U  H  nTR                  U5      v   M     g 7fr2   r   r   s     r-   r   BStrPrinter._print_MatrixSlice.<locals>.strslice.<locals>.<genexpr>   s     ;#T[[--r   )rc   r3   )xdimr)   s     r-   strslice/StrPrinter._print_MatrixSlice.<locals>.strslice   s[    QAtqyaDtqy!ts{!88;;<<r0   r3  Tr4  r5  ry   r6  )r.   r7  r   rowslicerowscolslicecols)r)   r=   rB  s   `  r-   _print_MatrixSliceStrPrinter._print_MatrixSlice   s    	= !!$++z&/A$!ORUU(8(89:<@A(8(89:<?@ 	Ar0   c                    UR                   $ r2   r   r<   s     r-   _print_DeferredVector StrPrinter._print_DeferredVector      yyr0   c           
     &   [        U5      nUR                  nUS   [        R                  L d  [	        S USS   5       5      (       Ga  [        US SS9u  pE[        U5       H  u  pgUR                  R                  (       a  UR                  * nO>[        UR                  R                  5      n	U	S   * U	S'   [        R                  " U	5      nUS-
  (       a  [        UR                  USS9OUR                  XF'   M     / n
U(       aM  US   R                  (       d9  US   R                  5       (       a!  U R!                  UR#                  S5      5      /n
U
U Vs/ s H  nU R%                  XSS	9PM     sn-   nU(       d  S
/n['        U5      S:  a:  US   R                  5       (       a"  U R!                  UR#                  S5      5      /n
O/ n
U
U Vs/ s H  nU R%                  XSS	9PM     sn-   nSR)                  U5      nSR)                  U5      n['        U5      S:  a
  U< SU< S3$ U(       a	  U< SU< 3$ U$ UR+                  5       u  pUS:  a  [-        U* U5      nSnOSn/ n/ n/ nU R.                  S;  a  UR1                  5       nO[        R2                  " U5      nS nU GH  nUR4                  (       a  [7        U[        5      (       a  [9        UR                  R+                  5       S   S:  5      (       a  UR                  [        R:                  La  UR=                  U" U5      5        M  ['        UR                  S   R                  5      S:w  a6  [7        UR                  [        [        45      (       a  UR=                  U5        UR=                  UR                  5        GM  UR>                  (       a  U[        R@                  Lan  URB                  S:w  a$  UR=                  [E        URB                  5      5        URF                  S:w  a'  UR=                  [E        URF                  5      5        GM  GM  UR=                  U5        GM     U=(       d    [        R                  /nU Vs/ s H  nU R%                  UUSS	9PM     nnU Vs/ s H  nU R%                  UUSS	9PM     nnU HR  nUR                  U;   d  M  SUURI                  UR                  5         -  UURI                  UR                  5      '   MT     U(       d  USR)                  U5      -   $ ['        U5      S:X  a  USR)                  U5      -   S-   US   -   $ USR)                  U5      -   SSR)                  U5      -  -   $ s  snf s  snf s  snf s  snf )Nr   c              3     #    U  HK  n[        U[        5      =(       d/    UR                  =(       a    [        S  UR                   5       5      v   MM     g7f)c              3  8   #    U  H  oR                   v   M     g 7fr2   )
is_Integer)r   ais     r-   r   2StrPrinter._print_Mul.<locals>.<genexpr>.<genexpr>  s      @2s   N)r9   r
   is_Powallr4   )r   r  s     r-   r   (StrPrinter._print_Mul.<locals>.<genexpr>  sG      ## "A 1f% A@S @ @@A!s   AAr   c                    [        U [        5      =(       a)    [        U R                  R	                  5       S   S:  5      $ Nr   )r9   r   boolexpas_coeff_Mul)r@  s    r-   <lambda>'StrPrinter._print_Mul.<locals>.<lambda>  s0    1c"HtAEE,>,>,@,Ca,G'HHr0   T)binaryFevaluater4  1*z/(rz   /rB   rD   )oldnonec                D   U R                  5       u  p[        [        R                  " U5      5      nUS   [        R
                  L a  USS  nO	US   * US'   [        R                  " U5      n[        U [        5      (       a  U R                  XSS9$ U R                  USS9$ )Nr   r   Fr_  )
as_base_exprc   r	   	make_argsr   NegativeOne
_from_argsr9   r   r   )rj   r  r!  eargss       r-   apow#StrPrinter._print_Mul.<locals>.apowL  s    ==?DAq)*EQx1==(ab	!!H9au%A!S!!vvaUv3366!e6,,r0   r'   z/(%s))%r   r4   r   Oneanyr   rd   rZ  	is_Numberrc   r	   rj  r   baserH   could_extract_minus_signr(   rJ   r.   r   r3   r[  r   r   as_ordered_factorsrh  is_commutativer9   rY  ri  r   is_RationalInfinitypr   qindex)r)   r=   rL   r4   r   nrj   dir!  dargsprer  nfactorsdfactorscrP   r  	pow_parenrl  r*   r@  a_strb_strs                          r-   
_print_MulStrPrinter._print_Mul  s   $ yy7aees ## ab##  #  #  IDA #166##A -E %ayE!Hu-A:;a%s277A6RWW & C11)F)F)H)H{{1558,-A #///F H5 1vzad;;=={{1558,-A #///F H "A"A8}q $%q))"#Q''H  "q5r1%DDD	::_,**,D ==&D
	- D##tS))..03a788881==0HHT$Z(DIIaL--.!3&tyy3*==!((.HHTYY'!!d!**&<66Q;HHXdff-.66Q;HHXdff-.  % ( L!%%CDE1a""1d5"91ECDE1a""1d5"91E DyyA~,2U177499;M5N,Naggdii()  #((5/))Vq[#((5/)C/%(::#((5/)Gchhuo,EEEm~ FEs   U?V9V	Vc                   UR                  5       u  p#SnUR                  (       au  UR                  5       u  pVUR                  (       a!  UR                  (       a  [        U* U5      nSnO1UR                  (       a   UR                  (       a  [        U* U5      nSnUSR                  UR                   Vs/ s H  opR                  U[        U5      5      PM     sn5      -   $ s  snf )NrD   rB   rb  )
as_coeff_mmul	is_numberas_real_imagis_zerois_negativer   r3   r4   r.   r   )r)   r=   r  r  rP   reimr   s           r-   _print_MatMulStrPrinter._print_MatMul|  s    !!#;;^^%FBzzbnn"A2q)"A2q)chhAEK#sJt$45K
 
 	
Ks   5$C"
c                l    SR                  UR                  U R                  UR                  5      5      $ )Nz{}.({}))r  r{   r(   r=   r<   s     r-   _print_ElementwiseApplyFunction*StrPrinter._print_ElementwiseApplyFunction  s,    MMKK		"
 	
r0   c                    g)NnanrU   r<   s     r-   
_print_NaNStrPrinter._print_NaN  r   r0   c                    g)Nz-oorU   r<   s     r-   _print_NegativeInfinity"StrPrinter._print_NegativeInfinity  r   r0   c                p   UR                   (       a!  [        S UR                   5       5      (       ae  [        UR                   5      S::  a  SU R	                  UR
                  5      -  $ SU R                  UR
                  4UR                   -   SS5      -  $ SU R                  UR                  SS5      -  $ )Nc              3  D   #    U  H  o[         R                  L v   M     g 7fr2   )r   Zero)r   rw  s     r-   r   *StrPrinter._print_Order.<locals>.<genexpr>  s     $E*Q!&&[*s    r   zO(%s)ry   r   )	variablesrU  pointr   r(   r=   r6   r4   r<   s     r-   _print_OrderStrPrinter._print_Order  s    ~~$E$**$E!E!E4>>"a'TYY!777t~~0MtUV!WWWT^^DIItQ???r0   c                "    UR                  5       $ r2   __str__r<   s     r-   _print_OrdinalStrPrinter._print_Ordinal      ||~r0   c                "    UR                  5       $ r2   r  r<   s     r-   _print_CycleStrPrinter._print_Cycle  r  r0   c                h   SSK JnJn  SSKJn  UR
                  nUb  U" SU S3SSSS	9  OU R                  R                  S
S5      nU(       a  UR                  (       d  gU" U5      " UR                  S-
  5      R                  5       [        S5      S  nUR                  S5      nUS:X  d  SXgS  ;  a
  XgS  US U -   nUR                  SS5      nU$ UR                  5       nU(       dL  UR                  S:  a  SU R                  UR                  5      -  $ SU R                  UR                  5      -  $ U R                  UR                  S US   S-    5      SU R                  UR                  5      -  -   nU R                  UR                  5      =p[        U5      [        U
5      :  a  Un	SU	-  $ )Nr   )PermutationCycle)sympy_deprecation_warningzw
                Setting Permutation.print_cyclic is deprecated. Instead use
                init_printing(perm_cyclic=z).
                z1.6z#deprecated-permutation-print_cyclic   )deprecated_since_versionactive_deprecations_target
stacklevelr    Tz()r   r  rx   ,rD      zPermutation(%s)zPermutation([], size=%s)z	, size=%s) sympy.combinatorics.permutationsr  r  sympy.utilities.exceptionsr  print_cyclic	_settingsgetsize__repr__r   rfindreplacesupportr(   
array_form)r)   r=   r  r  r  r    r   lasttrimusefulls              r-   _print_PermutationStrPrinter._print_Permutation  s   GH!.."%++6- 8 */+P ..,,]DAK99 dDIIM*335c'lmDA773<D19AeH!4eHq$x'		#r"AHA99q=,t{{4??/KKK1DKK		4JJJ;;tz"	:;kDKKX\XaXaLb>bbDT__55C4y3t9$$s**r0   c                    UR                   u  p#n[        UR                  5      S:X  a
  US   nUS   nSU R                  U5      < SU R                  U5      < SU R                  U5      < S3$ )Nr   r   zSubs(ry   rz   )r4   r   r  r(   )r)   r  r=   rd  news        r-   _print_SubsStrPrinter._print_Subs  s`    3syy>Qa&Ca&CKKt{{3/S1AC 	Cr0   c                "    UR                  5       $ r2   r   r<   s     r-   _print_TensorIndexStrPrinter._print_TensorIndex      {{}r0   c                "    UR                  5       $ r2   r   r<   s     r-   _print_TensorHeadStrPrinter._print_TensorHead  r  r0   c                "    UR                  5       $ r2   r   r<   s     r-   _print_TensorStrPrinter._print_Tensor  r  r0   c                    UR                  5       u  p#USR                  U Vs/ s H  o@R                  U[        U5      5      PM     sn5      -   $ s  snf )Nrb  )!_get_args_for_traditional_printerr3   r.   r   )r)   r=   rP   r4   r   s        r-   _print_TensMulStrPrinter._print_TensMul  sO    ;;=
chhAEF#sJt$45F
 
 	
Fs   $A
c                "    UR                  5       $ r2   r   r<   s     r-   _print_TensAddStrPrinter._print_TensAdd  r  r0   c                8    U R                  UR                  5      $ r2   r(   r   r<   s     r-   _print_ArraySymbolStrPrinter._print_ArraySymbol  s    {{499%%r0   c           
         U R                  UR                  [        S   S5      < SSR                  UR                   Vs/ s H  o R                  U5      PM     sn5      < S3$ s  snf )NFuncTr5  ry   r6  )r.   r   r   r3   indicesr(   )r)   r=   rj   s      r-   _print_ArrayElementStrPrinter._print_ArrayElement  sW    diiF);TBDIIgkgsgsNtgsbc{{[\~gsNtDuw 	wNts    A%c                    UR                    Vs/ s H  nSU R                  U5      -  PM     nnSSR                  U5      -  $ s  snf )Nz    %szPermutationGroup([
%s])z,
)r4   r(   r3   )r)   r=   r  rw  s       r-   _print_PermutationGroup"StrPrinter._print_PermutationGroup  s?    04		:	1XA&	:)EJJqM99 ;s   Ac                    g)NpirU   r<   s     r-   	_print_PiStrPrinter._print_Pi  r   r0   c                   ^  SSR                  U 4S jUR                   5       5      < ST R                  UR                  5      < ST R                  UR                  5      < S3$ )NzPolynomial ring in ry   c              3  F   >#    U  H  nTR                  U5      v   M     g 7fr2   r   )r   rsr)   s     r-   r   -StrPrinter._print_PolyRing.<locals>.<genexpr>  s     ?,BB,r    over  with  orderr3   r   r(   domainr   )r)   rings   ` r-   _print_PolyRingStrPrinter._print_PolyRing  sB    YY?$,,?@KK$dkk$**&=? 	?r0   c                   ^  SSR                  U 4S jUR                   5       5      < ST R                  UR                  5      < ST R                  UR                  5      < S3$ )NzRational function field in ry   c              3  F   >#    U  H  nTR                  U5      v   M     g 7fr2   r   )r   fsr)   s     r-   r   .StrPrinter._print_FracField.<locals>.<genexpr>  s     @-BB-r   r  r  r  r  r)   fields   ` r-   _print_FracFieldStrPrinter._print_FracField  sD    YY@%--@AKK%t{{5;;'?A 	Ar0   c                "    UR                  5       $ r2   r  )r)   elms     r-   _print_FreeGroupElement"StrPrinter._print_FreeGroupElement  s    {{}r0   c                @    SUR                   < SUR                  < S3$ )Nrx    + z*I))r@  yr)   polys     r-   _print_GaussianElement!StrPrinter._print_GaussianElement  s     $//r0   c                2    UR                  U [        SS5      $ )Nz%s**%srb  )r:   r   r  s     r-   _print_PolyElementStrPrinter._print_PolyElement
  s    xxj(C88r0   c                    UR                   S:X  a  U R                  UR                  5      $ U R                  UR                  [        S   SS9nU R                  UR                   [        S   SS9nUS-   U-   $ )Nr   r	   Tr4  r3  rc  )denomr(   numerr.   r   )r)   fracr  r  s       r-   _print_FracElementStrPrinter._print_FracElement  so    ::?;;tzz**%%djj*U2CD%QE%%djj*V2DT%RE3;&&r0   c                   [         S   S-
  n/ UR                   Vs/ s H  o0R                  X25      PM     nnnUR                  5        GHh  u  pg/ n[	        U5       HA  u  pU
S:  d  M  U
S:X  a  UR                  XY   5        M(  UR                  XY   SU
-  -   5        MC     SR                  U5      nUR                  (       a1  U(       a  SU R                  U5      -   S-   nO{U R                  U5      nOiU(       aQ  U[        R                  L a  UR                  SU/5        M  U[        R                  L a  UR                  S	U/5        GM  U R                  U5      nU(       d  UnOUS-   U-   nUR                  S	5      (       a  UR                  S	USS  /5        GMU  UR                  SU/5        GMk     US   S
;   a"  UR                  S5      nUS	:X  a  S	US   -   US'   UR                  R                   S-   nSSKJn   USUR'                  5       -  -  nUS-  n[	        U5       HM  u  nn[+        U5      S:  d  M  US S S:X  d  M"  U[+        U5      S-
  S  S:X  d  M9  US[+        U5      S-
   UU'   MO     USR                  U5      SR                  U5      4-  $ s  snf ! U a    USUR)                  5       -  -  n Nf = f)Nr3  r   r   z**%drb  rx   rz   rC   rB   )rB   rC   z(%s, %s)PolynomialErrorz, modulus=%sz, domain='%s'r<  rE   ry   )r   gensr.   rK   rd   r   r3   rH   r(   r   rn  rI   ri  rG   rJ   r   r   sympy.polys.polyerrorsr  get_modulus
get_domainr   )r)   r=   	ATOM_PRECr   rK   r  monomcoeffs_monomrj   r!  s_coeffs_termmodifierr  r  ry  r*   s                     r-   _print_PolyStrPrinter._print_Poly  s   v&*	TYYPY--a;YtP JJLLEG!%(q5Avtw/tw!';< ) hhw'G||!DKK$66<G"kk%0G~c7^4 -c7^4 ++e,  30  %%c6!":./c6]+K )N 8z!yy|H3q>a((94:	:nt'7'7'999F 	#$T?KE44y1}$r(c/d3t9q=>6Jc6Q"1SY]3U + %$))D/:::} Qj  	:o(999F	:s   JJ" "K Kc                    g)Nr   rU   )r)   rw  s     r-   _print_UniversalSetStrPrinter._print_UniversalSetW  s    r0   c                    UR                   (       a-  U R                  UR                  5       R                  5       5      $ U R                  UR                  5       5      $ r2   )
is_aliasedr(   as_polyas_exprr<   s     r-   _print_AlgebraicNumber!StrPrinter._print_AlgebraicNumberZ  s<    ??;;t||~55788;;t||~..r0   c                  ^  [        U5      nUR                  [        R                  L a%  U(       d  ST R	                  UR
                  5      -  $ UR                  (       a  UR                  * [        R                  L a9  U(       d2  S[        U 4S j[        R                  UR
                  4 5       5      -  $ UR                  [        R                  * L a?  T R	                  [        R                  5      < ST R                  UR
                  USS9< 3$ T R                  UR                  USS9nT R                  S:X  ap  UR                  R                  (       aU  UR                  R                  S:w  a;  UR                  S	5      (       a%  T R                  UR
                  USS9< S
USS < 3$ T R                  UR
                  USS9< S
U< 3$ )aL  Printing helper function for ``Pow``

Parameters
==========

rational : bool, optional
    If ``True``, it will not attempt printing ``sqrt(x)`` or
    ``x**S.Half`` as ``sqrt``, and will use ``x**(1/2)``
    instead.

    See examples for additional details

Examples
========

>>> from sympy import sqrt, StrPrinter
>>> from sympy.abc import x

How ``rational`` keyword works with ``sqrt``:

>>> printer = StrPrinter()
>>> printer._print_Pow(sqrt(x), rational=True)
'x**(1/2)'
>>> printer._print_Pow(sqrt(x), rational=False)
'sqrt(x)'
>>> printer._print_Pow(1/sqrt(x), rational=True)
'x**(-1/2)'
>>> printer._print_Pow(1/sqrt(x), rational=False)
'1/sqrt(x)'

Notes
=====

``sqrt(x)`` is canonicalized as ``Pow(x, S.Half)`` in SymPy,
so there is no need of defining a separate printer for ``sqrt``.
Instead, it should be handled here as well.
zsqrt(%s)z%s/sqrt(%s)c              3  F   >#    U  H  nTR                  U5      v   M     g 7fr2   r   r   s     r-   r   (StrPrinter._print_Pow.<locals>.<genexpr>  s     -]J\3dkk#.>.>J\r   rc  Fr4  
_sympyreprr   z	(Rational**r  )r   rZ  r   Halfr(   rq  rt  r   rn  r.   printmethodru  rx  rG   )r)   r=   rationalPRECr!  s   `    r-   
_print_PowStrPrinter._print_Pow`  si   L $88qvvhDII 666yAFF"8 %u-]155RVR[R[J\-]'^^^xxAEE6!"&++aee"4"&"3"3DIItE"3"RT T dhhU;|+0D0DWX ||K((#'#4#4TYYU#4#SUVWXY[U\]],,TYYU,KQOOr0   c                >    U R                  UR                  S   5      $ rX  r(   r4   r<   s     r-   _print_UnevaluatedExpr!StrPrinter._print_UnevaluatedExpr  s    {{499Q<((r0   c                    [        U5      nU R                  UR                  USS9< SU R                  UR                  USS9< 3$ )NFr4  r0  )r   r.   rq  rZ  )r)   r=   r4  s      r-   _print_MatPowStrPrinter._print_MatPow  sJ    $,,TYYU,K**488T%*HJ 	Jr0   c                x    U R                   R                  SS5      (       a  SU-  $ [        UR                  5      $ )Nr   FzS(%s))r  r  r:   rw  r<   s     r-   _print_IntegerStrPrinter._print_Integer  s3    >>.66d##466{r0   c                    g)NIntegersrU   r<   s     r-   _print_IntegersStrPrinter._print_Integers      r0   c                    g)NNaturalsrU   r<   s     r-   _print_NaturalsStrPrinter._print_Naturals  rE  r0   c                    g)N	Naturals0rU   r<   s     r-   _print_Naturals0StrPrinter._print_Naturals0      r0   c                    g)N	RationalsrU   r<   s     r-   _print_RationalsStrPrinter._print_Rationals  rN  r0   c                    g)NRealsrU   r<   s     r-   _print_RealsStrPrinter._print_Reals  r\   r0   c                    g)N	ComplexesrU   r<   s     r-   _print_ComplexesStrPrinter._print_Complexes  rN  r0   c                    g)NEmptySetrU   r<   s     r-   _print_EmptySetStrPrinter._print_EmptySet  rE  r0   c                    g)NEmptySequencerU   r<   s     r-   _print_EmptySequenceStrPrinter._print_EmptySequence  s    r0   c                    [        U5      $ r2   r:   r<   s     r-   
_print_intStrPrinter._print_int      4yr0   c                    [        U5      $ r2   rd  r<   s     r-   
_print_mpzStrPrinter._print_mpz  rg  r0   c                   UR                   S:X  a  [        UR                  5      $ U R                  R	                  SS5      (       a  SUR                  < SUR                   < 3$ UR                  < SUR                   < 3$ )Nr   r   FzS(z)/rc  )rx  r:   rw  r  r  r<   s     r-   _print_RationalStrPrinter._print_Rational  sY    66Q;tvv;~~!!"2E::%)VVTVV44"ffdff--r0   c                    UR                   S:X  a  [        UR                  5      $ SUR                  UR                   4-  $ )Nr   z%d/%d)rx  r:   rw  r<   s     r-   _print_PythonRational StrPrinter._print_PythonRational  s3    66Q;tvv;dffdff---r0   c                    UR                   S:X  a  [        UR                  5      $ UR                  < SUR                   < 3$ Nr   rc  denominatorr:   	numeratorr<   s     r-   _print_FractionStrPrinter._print_Fraction  4    q t~~&&"nnd.>.>??r0   c                    UR                   S:X  a  [        UR                  5      $ UR                  < SUR                   < 3$ rr  rs  r<   s     r-   
_print_mpqStrPrinter._print_mpq  rx  r0   c                z   UR                   nU R                  R                  SS 5      nUc  US:  a  SO[        UR                   5      nU R                  S   SL a  SnO7U R                  S   SL a  SnO"U R                  S   S:X  a  U R                  S:  nS	U R                  ;   a  U R                  S	   OS nS
U R                  ;   a  U R                  S
   OS n[        UR                  UWXVS9nUR                  S5      (       a	  SUSS  -   nOUR                  S5      (       a  SUSS  -   nUR                  S5      nU$ )Nr#   r  r   r   TFr   r   r!   r"   )strip_zeros	min_fixed	max_fixedz-.0z-0.   z.0z0.r<  rC   )	_precr  r  r   _print_levelmlib_to_str_mpf_rG   removeprefix)r)   r=   rL   r#   striplowhighrvs           r-   _print_FloatStrPrinter._print_Float  s"   zznn  -;ax![%<C>>+&$.E^^K(E1E^^K(F2%%)E','>dnnU#D(-(?t~~e$TSes[==ABB]]4  12B__S!	r0   c           
        SSSSSSSSS	.nUR                   U;   aL  X!R                      < S
U R                  UR                  5      < SU R                  UR                  5      < S3$ U R	                  UR                  [        U5      5      < SU R                  R                  UR                   5      =(       d    UR                   < SU R	                  UR                  [        U5      5      < 3$ )NEqNe
AssignmentAddAugmentedAssignmentSubAugmentedAssignmentMulAugmentedAssignmentDivAugmentedAssignmentModAugmentedAssignment)z==z!=z:=z+=z-=z*=z/=z%=rx   ry   rz   rE   )rel_opr(   lhsrf   r.   r   r%   r  )r)   r=   charmaps      r-   _print_RelationalStrPrinter._print_Relational  s     *****	
 ;;'!#*;;#7TXX9N#';;txx#8: : "..txxD9IJ,,00=LL,,TXXz$7GHJ 	Jr0   c                T    SU R                  UR                  SS9UR                  4-  $ )NzCRootOf(%s, %d)lexrA   )rQ   r=   ry  r<   s     r-   _print_ComplexRootOfStrPrinter._print_ComplexRootOf  s.     DOODIIeO$L$(JJ$0 0 	0r0   c                    U R                  UR                  SS9/nUR                  [        R                  La*  UR                  U R                  UR                  5      5        SSR                  U5      -  $ )Nr  rA   zRootSum(%s)ry   )rQ   r=   funr   IdentityFunctionr   r(   r3   r  s      r-   _print_RootSumStrPrinter._print_RootSum  sY    		78881---KKDHH-.tyy..r0   c                   UR                   R                  nUR                   Vs/ s H  o0R                  X1R                  S9PM     nnSSR                  U5      -  nUR                   Vs/ s H  oPR                  U5      PM     nnSU R                  UR                  5      -  nSU R                  UR                  5      -  nU/U-   Xx/-   n	U< SSR                  U	5      < S3$ s  snf s  snf )NrA   r(  ry   zdomain='%s'z
order='%s'rx   rz   )	r   r   exprsrQ   r   r3   r  r(   r  )
r)   basisclsr   r  genr  r  r   r4   s
             r-   _print_GroebnerBasisStrPrinter._print_GroebnerBasis  s    oo&&DIKKPKSKK8KP5))-2ZZ9ZcS!Z9U\\!::t{{5;;77w~/		$00 Q :s   "C&+C+c                p   ^  [        U[        S9nSR                  U 4S jU 5       5      nU(       d  gSU-  $ )Nr   ry   c              3  F   >#    U  H  nTR                  U5      v   M     g 7fr2   r   r   r*   r)   s     r-   r   (StrPrinter._print_set.<locals>.<genexpr>)       =utT**ur   zset()r   )r   r   r3   r)   r   r   r4   s   `   r-   
_print_setStrPrinter._print_set&  s4    q./yy=u==}r0   c                   ^ ^ SSK Jm  [        U[        S9nSR	                  U 4S jU 5       5      n[        U4S jU 5       5      (       a  SR                  U5      $ SR                  U5      $ )	Nr   )	FiniteSetr   ry   c              3  F   >#    U  H  nTR                  U5      v   M     g 7fr2   r   r  s     r-   r   .StrPrinter._print_FiniteSet.<locals>.<genexpr>2  r  r   c              3  D   >#    U  H  oR                  T5      v   M     g 7fr2   )has)r   r*   r  s     r-   r   r  3  s     5utxx	""us    zFiniteSet({})z{{{}}})sympy.sets.setsr  r   r   r3   ro  r  )r)   r   r   r4   r  s   `   @r-   _print_FiniteSetStrPrinter._print_FiniteSet.  sX    -q./yy=u==5u555"))$//t$$r0   c                x   ^  [        U[        S9nSR                  U 4S jU 5       5      nSR                  U5      $ )Nr   ry   c              3  F   >#    U  H  nTR                  U5      v   M     g 7fr2   r   r   s     r-   r   .StrPrinter._print_Partition.<locals>.<genexpr>:  s     ;UcS))Ur   zPartition({}))r   r   r3   r  r  s   `   r-   _print_PartitionStrPrinter._print_Partition7  s5    q./yy;U;;%%d++r0   c                :    U(       d  gSU R                  U5      -  $ )Nzfrozenset()zfrozenset(%s))r  r)   r   s     r-   _print_frozensetStrPrinter._print_frozenset=  s     !333r0   c                   ^  U 4S jnSR                  UR                   Vs/ s H
  o2" U5      PM     sn5      nST R                  UR                  5      < SU< S3$ s  snf )Nc                   > [        U 5      S:X  a  TR                  U S   5      $ TR                  U S   4[        U SS  5      -   5      $ r   r   r   s    r-   r   )StrPrinter._print_Sum.<locals>._xab_tostrC  r   r0   ry   zSum(rz   r   r   s   `    r-   
_print_SumStrPrinter._print_SumB  sL    	?
 IIdkk:kz!}k:; $DMM :A>> ;r   c                    UR                   $ r2   r   r<   s     r-   _print_SymbolStrPrinter._print_SymbolK  rM  r0   c                    gr   rU   r<   s     r-   _print_IdentityStrPrinter._print_IdentityP  r   r0   c                    g)N0rU   r<   s     r-   _print_ZeroMatrixStrPrinter._print_ZeroMatrixS  r   r0   c                    g)Nra  rU   r<   s     r-   _print_OneMatrixStrPrinter._print_OneMatrixV  r   r0   c                     SUR                   -  $ )NzQ.%sr   r<   s     r-   _print_PredicateStrPrinter._print_PredicateY  s    		!!r0   c                    [        U5      $ r2   rd  r<   s     r-   
_print_strStrPrinter._print_str\  rg  r0   c                x    [        U5      S:X  a  SU R                  US   5      -  $ SU R                  US5      -  $ )Nr   z(%s,)r   r'   ry   )r   r(   r6   r<   s     r-   _print_tupleStrPrinter._print_tuple_  s;    t9>T[[a111DNN4666r0   c                $    U R                  U5      $ r2   )r  r<   s     r-   _print_TupleStrPrinter._print_Tuplee  s      &&r0   c                N    SU R                  UR                  [        S   5      -  $ )Nz%s.Tr   r  )r)   Ts     r-   _print_TransposeStrPrinter._print_Transposeh  s#    ))!%%E1BCCCr0   c                |    SU R                  UR                  5      < SU R                  UR                  5      < S3$ )NzUniform(ry   rz   )r(   r  r  r<   s     r-   _print_UniformStrPrinter._print_Uniformk  s'    $(KK$7TVV9LMMr0   c                    U R                   R                  SS5      (       a  SUR                  -  $ SUR                  -  $ )Nr   Fz%s)r  r  r   r   r<   s     r-   _print_QuantityStrPrinter._print_Quantityn  s7    >>h..$++%%diir0   c           	         UR                    Vs/ s H  o R                  U[        S   SS9PM     nnUS   /[        USS  S5       VVs/ s H  u  p$US-   U-   PM     snn-   nSR	                  U5      $ s  snf s  snnf )	Nr	   Tr4  r   r   ijkrb  r  )r4   r.   r   zipr3   )r)   r=   rj   r   ri   r  s         r-   _print_QuaternionStrPrinter._print_Quaternions  s~    KO99U9aq*U"3DA9UqTF#aeU*;<*;$!aeAg*;<<zz!} V<s   !A4	A9c                    [        U5      $ r2   rd  r<   s     r-   _print_DimensionStrPrinter._print_Dimensionx  rg  r0   c                     UR                   S-   $ r   r   r<   s     r-   _print_WildStrPrinter._print_Wild{      yy3r0   c                     UR                   S-   $ r   r   r<   s     r-   _print_WildFunctionStrPrinter._print_WildFunction~  r  r0   c                    UR                   $ r2   r   r<   s     r-   _print_WildDotStrPrinter._print_WildDot  rM  r0   c                    UR                   $ r2   r   r<   s     r-   _print_WildPlusStrPrinter._print_WildPlus  rM  r0   c                    UR                   $ r2   r   r<   s     r-   _print_WildStarStrPrinter._print_WildStar  rM  r0   c                z    U R                   R                  SS5      (       a  gU R                  [        S5      5      $ )Nr   FzS(0)r   )r  r  r?  r   r<   s     r-   _print_ZeroStrPrinter._print_Zero  s2    >>.66""71:..r0   c                    UR                   R                  nU R                  UR                  5       5      nU R                  UR                  5      nU< SU< SU< S3$ rw   )r   r   r(   to_listdom)r)   rw  r  repr	  s        r-   
_print_DMPStrPrinter._print_DMP  sD    kk""kk!))+&kk!%% "C--r0   c                    UR                   R                  nU R                  UR                  5      nU R                  UR                  5      nU R                  UR
                  5      nU< SU< SU< SU< S3$ rw   )r   r   r(   numdenr	  )r)   r=   r  r  r  r	  s         r-   
_print_DMFStrPrinter._print_DMF  sV    nn%%kk$((#kk$((#kk$((##&S#66r0   c                     SUR                   -  $ )NzObject("%s")r   )r)   r  s     r-   _print_ObjectStrPrinter._print_Object  s    ((r0   c                     SUR                   -  $ )NzIdentityMorphism(%s))r  r)   morphisms     r-   _print_IdentityMorphism"StrPrinter._print_IdentityMorphism  s    %77r0   c                \    SUR                   < SUR                  < SUR                  < S3$ )NzNamedMorphism(ry   z, "z"))r  codomainr   r  s     r-   _print_NamedMorphismStrPrinter._print_NamedMorphism  s#    !2!2HMMC 	Cr0   c                     SUR                   -  $ )NzCategory("%s")r   )r)   categorys     r-   _print_CategoryStrPrinter._print_Category  s    (--//r0   c                .    UR                   R                   $ r2   r   )r)   manifolds     r-   _print_ManifoldStrPrinter._print_Manifold  s    }}!!!r0   c                .    UR                   R                   $ r2   r   )r)   patchs     r-   _print_PatchStrPrinter._print_Patch  s    zzr0   c                .    UR                   R                   $ r2   r   )r)   coordss     r-   _print_CoordSystemStrPrinter._print_CoordSystem  s    {{r0   c                \    UR                   R                  UR                     R                  $ r2   
_coord_sysr   _indexr   r  s     r-   _print_BaseScalarField!StrPrinter._print_BaseScalarField  s#    ''5:::r0   c                b    SUR                   R                  UR                     R                  -  $ )Nze_%sr/  r  s     r-   _print_BaseVectorField!StrPrinter._print_BaseVectorField  s(    ((00>CCCCr0   c                    UR                   n[        US5      (       a0  SUR                  R                  UR                     R
                  -  $ SU R                  U5      -  $ )Nr0  zd%szd(%s))_form_fieldr   r0  r   r1  r   r(   )r)   diffr  s      r-   _print_DifferentialStrPrinter._print_Differential  sT      5,''5++33ELLAFFFFT[[///r0   c                N    S< SU R                  UR                  S   5      < S3$ )NTrrx   r   rz   r8  r<   s     r-   	_print_TrStrPrinter._print_Tr  s    TYYq\!:;;r0   c                8    U R                  UR                  5      $ r2   r  r  s     r-   
_print_StrStrPrinter._print_Str  s    {{166""r0   c                    UR                   nU R                  U5      < SU R                  UR                  5      < SU R                  UR                  5      < S3$ rw   )r{   r(   r  rf   )r)   r=   rels      r-   _print_AppliedBinaryRelation'StrPrinter._print_AppliedBinaryRelation  sA    mm#{{3/#{{4884#{{48846 	6r0   rU   )F)r   r2   )r   
__module____qualname____firstlineno__r2  r$   __annotations__r%   r.   r6   r>   rQ   rV   rZ   r_   rk   rp   rt   r}   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r	  r  r  r  r  r%  r)  r,  r0  r8  rH  rK  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r	  r  r  r!  r$  r*  r5  r9  r<  r?  rC  rH  rL  rQ  rU  rY  r]  ra  re  ri  rl  ro  rv  rz  r  r  r  r  r  r  r  r  r  r  r  _print_MatrixSymbol_print_RandomSymbolr  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r   r$  r(  r,  r2  r5  r:  r>  rA  rE  __static_attributes__rU   r0   r-   r   r      s   K	)~ 	 $&L.%%K"*JEIJN?%
1[
)&9MMN
$D6&<HHYX
3&&FAtFl
"
@'+RC
&w:?
A
09'@;D/;Pz)J

..@@*J*0/1%,4
?''"7'DN 

/
.7)8C0" ;D0<#6r0   r   c                >    [        U5      nUR                  U 5      nU$ )a:  Returns the expression as a string.

For large expressions where speed is a concern, use the setting
order='none'. If abbrev=True setting is used then units are printed in
abbreviated form.

Examples
========

>>> from sympy import symbols, Eq, sstr
>>> a, b = symbols('a b')
>>> sstr(Eq(a + b, 0))
'Eq(a + b, 0)'
)r   doprintr=   settingsrw  r   s       r-   sstrrR    s     " 	8A			$AHr0   c                  $    \ rS rSrSrS rS rSrg)StrReprPrinteri  z(internal) -- see sstrreprc                    [        U5      $ r2   )r;   r  s     r-   r  StrReprPrinter._print_str  s    Awr0   c                p    UR                   R                  < SU R                  UR                  5      < S3$ )Nrx   rz   )r   r   r(   r   r  s     r-   rA  StrReprPrinter._print_Str  s$    ;;//QVV1DEEr0   rU   N)r   rG  rH  rI  __doc__r  rA  rM  rU   r0   r-   rT  rT    s    $Fr0   rT  c                >    [        U5      nUR                  U 5      nU$ )zreturn expr in mixed str/repr form

i.e. strings are returned in repr form with quotes, and everything else
is returned in str form.

This function could be useful for hooking into sys.displayhook
)rT  rO  rP  s       r-   sstrreprr[    s      	x A			$AHr0   N)#rY  
__future__r   typingr   
sympy.corer   r   r   r   r	   r
   sympy.core.mulr   sympy.core.numbersr   sympy.core.relationalr   sympy.core.sortingr   sympy.utilities.iterablesr   r   r   printerr   r   mpmath.libmpr   r   r  r   rR  rT  r[  rU   r0   r-   <module>rf     s    #  ; ; & & , / * . , ;x6 x6v 
 ,FZ F   r0   