+
    i@                    x   ^ RI t ^ RIHt ^ RIHt ^ RIHt ^ RIHt ^ RI	H
t
 ^ RIHtHt ^ RIHt ^ R	IHt ^ R
IHt ^ RIHt ^ RIHt ^ RIHtHtHt ^ RIHtHt ^ RIH t  ^ RI!H"t" ^ RI#H$t$ ^ RI%H&t&H't' ^ RI(H)t)H*t*H+t+H,t,H-t-H.t.H/t/H0t0H1t1H2t2H3t3H4t4H5t5H6t7 ]/t8]2t9 ! R R]4      t:]! ]:4      R 4       t;R t<]<t=R t>R# )    N)S)Add)Tuple)FunctionMul)NumberRational)Pow)default_sort_key)Symbol)SympifyError)requires_partial)
PRECEDENCE
precedenceprecedence_traditional)Printerprint_function)sstr)has_variety)sympy_deprecation_warning)
prettyForm
stringPict)hobjvobjxobjxsympretty_symbolpretty_atompretty_use_unicodegreek_unicodeUpretty_try_use_unicode	annotatedis_subscriptable_in_unicode
center_padrootc                   N  a  ] tR t^t o RtRtRRRRRRRR	R
RRR	RR	RRRRRR	/
tRR ltR t]	R 4       t
R tR tR tR tRR lt]tR tR tR tR tR tR tR  tR! tR" t]t]t]t]t]t]t]t ]t!]t"R# t#R$ t$R% t%R& t&R' t'R( t(R) t)RR* lt*R+ t+R, t,R- t-R. t.R/ t/RR0 lt0RR1 lt1R2 t2R3 t3R4 t4R5 t5R6 t6R7 t7R8 t8R9 t9R: t:R; t;R< t<R= t=R> t>RR? lt?R@ t@RA tARB tBRC tCRD tDRE tERF tFRG tGRH tHRI tIRJ tJRK tKRL tLRM tMRN tNRO tORP tPRQ tQRR tRRS tSRT tTRU tURV tVRW tWRX tXRY tYRZ tZR[ t[R\ t\R] t]R^ t^/ 3R_ lt_R` t`Ra taRb tbRc tcRd tdRe teRf tfRg tgRh thER Ri ltiRj tjRk tkRl tlRm tmERRn ltnRo toRp tpRq tqRr trERRt ltsRu tt]	Rv 4       tuRw tvRx twRy txRz tyR{ tzR| t{R} t|R~ t}R t~R tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR tRR ltR tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR t]t]t]tRRRsR R	3R ltR tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR t]tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR tRtV tR# (  PrettyPrinterz?Printer, which converts an expression into 2D ASCII-art figure._prettyorderN	full_precautouse_unicode	wrap_lineTnum_columnsuse_unicode_sqrt_charroot_notationmat_symbol_styleplainimaginary_unitiperm_cyclicc                \   \         P                  ! W4       \        V P                  R ,          \        4      '       g,   \        RP                  V P                  R ,          4      4      hV P                  R ,          R9  d,   \        RP                  V P                  R ,          4      4      hR# )r5   z&'imaginary_unit' must a string, not {}z4'imaginary_unit' must be either 'i' or 'j', not '{}'N)r6   j)r   __init__
isinstance	_settingsstr	TypeErrorformat
ValueError)selfsettingss   &&|/Users/tonyclaw/.openclaw/workspace/skills/math-calculator/venv/lib/python3.14/site-packages/sympy/printing/pretty/pretty.pyr:   PrettyPrinter.__init__/   s    ($..)9:C@@DKKDNN[kLlmnn^^,-Z?SZZ[_[i[ijz[{|}} @    c                *    \        \        V4      4      # Nr   r=   rA   exprs   &&rC   emptyPrinterPrettyPrinter.emptyPrinter7   s    #d)$$rE   c                L    V P                   R ,          '       d   R# \        4       # )r.   T)r<   r    )rA   s   &rC   _use_unicodePrettyPrinter._use_unicode:   s    >>-((%''rE   c                X    V P                  V4      P                  ! R/ V P                  B # )N )_printrenderr<   rI   s   &&rC   doprintPrettyPrinter.doprintA   s#    {{4 ''9$..99rE   c                    V# rG   rQ   rA   es   &&rC   _print_stringPictPrettyPrinter._print_stringPictE   s    rE   c                    \        V4      # rG   )r   rW   s   &&rC   _print_basestringPrettyPrinter._print_basestringH   s    !}rE   c                    \        V P                  VP                  4      P                  4       !  p\        VP	                  R 4      !  pV# )atan2)r   
_print_seqargsparensleftrA   rX   pforms   && rC   _print_atan2PrettyPrinter._print_atan2K   s:    DOOAFF3::<=EJJw/0rE   c                D    \        VP                  V4      p\        V4      # rG   )r   namer   )rA   rX   	bold_namesymbs   &&& rC   _print_SymbolPrettyPrinter._print_SymbolP   s    QVVY/$rE   c                L    V P                  WP                  R ,          R8H  4      # )r3   bold)rl   r<   rW   s   &&rC   _print_MatrixSymbol!PrettyPrinter._print_MatrixSymbolT   s"    !!!^^4F%G6%QRRrE   c                ~    V P                   R ,          pVR8X  d   V P                  ^8H  p\        \        WR7      4      # )r,   r-   )r,   )r<   _print_levelr   r   )rA   rX   r,   s   && rC   _print_FloatPrettyPrinter._print_FloatW   s:     NN;/	))Q.I$q677rE   c           	        VP                   pVP                  pV P                  V4      p\        VP	                  R 4      !  p\        VP                  R4      !  p\        VP	                  V P                  \        R4      4      4      !  p\        VP	                  R4      !  p\        VP	                  V P                  V4      4      !  p\        VP	                  R 4      !  pV# )()MULTIPLICATION SIGN_expr1_expr2rR   r   rc   rightr"   rA   rX   vec1vec2re   s   &&   rC   _print_CrossPrettyPrinter._print_Cross_   s    xxxxD!EJJsO,EKK,-EJJt{{15J3K'LMNEJJsO,EJJt{{4'89:EJJsO,rE   c           	     `   VP                   pV P                  V4      p\        VP                  R 4      !  p\        VP	                  R4      !  p\        VP                  V P                  \        R4      4      4      !  p\        VP                  V P                  \        R4      4      4      !  pV# )rw   rx   ry   NABLA_exprrR   r   rc   r}   r"   rA   rX   vecre   s   &&  rC   _print_CurlPrettyPrinter._print_Curlk   s    ggC EJJsO,EKK,-EJJt{{15J3K'LMNEJJt{{1W:'>?@rE   c           	     `   VP                   pV P                  V4      p\        VP                  R 4      !  p\        VP	                  R4      !  p\        VP                  V P                  \        R4      4      4      !  p\        VP                  V P                  \        R4      4      4      !  pV# )rw   rx   DOT OPERATORr   r   r   s   &&  rC   _print_DivergencePrettyPrinter._print_Divergencet   s    ggC EJJsO,EKK,-EJJt{{1^3D'EFGEJJt{{1W:'>?@rE   c           	        VP                   pVP                  pV P                  V4      p\        VP	                  R 4      !  p\        VP                  R4      !  p\        VP	                  V P                  \        R4      4      4      !  p\        VP	                  R4      !  p\        VP	                  V P                  V4      4      !  p\        VP	                  R 4      !  pV# )rw   rx   r   rz   r~   s   &&   rC   
_print_DotPrettyPrinter._print_Dot}   s    xxxxD!EJJsO,EKK,-EJJt{{1^3D'EFGEJJsO,EJJt{{4'89:EJJsO,rE   c           	         VP                   pV P                  V4      p\        VP                  R 4      !  p\        VP	                  R4      !  p\        VP                  V P                  \        R4      4      4      !  pV# )rw   rx   r   r   rA   rX   funcre   s   &&  rC   _print_GradientPrettyPrinter._print_Gradient   sc    wwD!EJJsO,EKK,-EJJt{{1W:'>?@rE   c           	         VP                   pV P                  V4      p\        VP                  R 4      !  p\        VP	                  R4      !  p\        VP                  V P                  \        R4      4      4      !  pV# )rw   rx   	INCREMENTr   r   s   &&  rC   _print_LaplacianPrettyPrinter._print_Laplacian   sc    wwD!EJJsO,EKK,-EJJt{{1[>'BCDrE   c                     \        \        VP                  P                  V R 7      4      #   \         d    T P                  T4      u # i ; i))printer)r   r   	__class____name__KeyErrorrK   rW   s   &&rC   _print_AtomPrettyPrinter._print_Atom   sC    	(k!++*>*>MNN 	($$Q''	(s   ), A
Ac                v    V P                   '       d   V P                  V4      # R R.pV P                  VRR4      # )z-oooorw   rx   )rN   r   r`   )rA   rX   inf_lists   && rC   _print_RealsPrettyPrinter._print_Reals   s;    ##A&&t}H??8S#66rE   c                   VP                   ^ ,          pV P                  V4      pVP                  '       d   VP                  '       g*   VP                  '       g   \        VP                  4       !  p\        VP                  R4      !  pV# r   !)ra   rR   
is_Integeris_nonnegative	is_Symbolr   rb   rc   rA   rX   xre   s   &&  rC   _print_subfactorial!PrettyPrinter._print_subfactorial   s_    FF1IA!"2"2"2q{{{/EEJJsO,rE   c                   VP                   ^ ,          pV P                  V4      pVP                  '       d   VP                  '       g*   VP                  '       g   \        VP                  4       !  p\        VP                  R4      !  pV# r   ra   rR   r   r   r   r   rb   r}   r   s   &&  rC   _print_factorialPrettyPrinter._print_factorial   s`    FF1IA!"2"2"2q{{{/EEKK,-rE   c                   VP                   ^ ,          pV P                  V4      pVP                  '       d   VP                  '       g*   VP                  '       g   \        VP                  4       !  p\        VP                  R4      !  pV# )r   z!!r   r   s   &&  rC   _print_factorial2PrettyPrinter._print_factorial2   s`    FF1IA!"2"2"2q{{{/EEKK-.rE   c                   VP                   w  r#V P                  V4      pV P                  V4      pR \        VP                  4       VP                  4       4      ,          p\	        VP                  V4      !  p\	        VP                  V4      !  p\	        VP                  RR4      !  pVP                  ^,           ^,          Vn        V# ) rw   rx   )ra   rR   maxwidthr   aboverb   baseline)rA   rX   nkn_pformk_pformbarre   s   &&      rC   _print_binomialPrettyPrinter._print_binomial   s    vv++a.++a.#gmmow}}77GMM#./EKK01ELLc23..1,q0rE   c                &   \        R \        VP                  4      ,           R ,           4      pV P                  VP                  4      pV P                  VP
                  4      p\        \        P                  ! W2V4      R\         P                  / pV# )r   binding)	r   r   rel_oprR   lhsrhsr   nextOPENrA   rX   oplrre   s   &&    rC   _print_RelationalPrettyPrinter._print_Relational   se    d188n,s23KKKKJOOA15OzOrE   c                   ^ RI HpHp V P                  '       d   VP                  ^ ,          pV P                  V4      p\        WB4      '       d   V P                  V\        R4      R7      # \        WC4      '       d   V P                  V\        R4      R7      # VP                  '       d*   VP                  '       g   \        VP                  4       !  p\        VP                  \        R4      4      !  # V P                  V4      # )r   )
EquivalentImpliesNotEquiv)altcharNotArrowNot)sympy.logic.boolalgr   r   rN   ra   rR   r;   _print_Equivalentr   _print_Implies
is_Booleanis_Notr   rb   rc   _print_Function)rA   rX   r   r   argre   s   &&    rC   
_print_NotPrettyPrinter._print_Not   s    =&&)CKK$E#**--c;z;R-SS#''**3J8O*PP~~~cjjj"ELLN3uzz+e*<=>>''**rE   c                4   VP                   pV'       d   \        VP                   \        R 7      pV^ ,          pV P                  V4      pVP                  '       d*   VP
                  '       g   \        VP                  4       !  pVR,           F  pV P                  V4      pVP                  '       d*   VP
                  '       g   \        VP                  4       !  p\        VP                  RV,          4      !  p\        VP                  V4      !  pK  	  V# )key   NN %s )	ra   sortedr   rR   r   r   r   rb   r}   )rA   rX   charsortra   r   re   	pform_args   &&&&    rC   __print_BooleanPrettyPrinter.__print_Boolean   s    vv!&&&67D1gC >>>#***/E88CC(I~~~cjjj&	(8(8(:;	FTM :;EI 67E  rE   c                    V P                   '       d   V P                  V\        R 4      4      # V P                  VRR7      # )AndTr   rN   _PrettyPrinter__print_Booleanr   r   rW   s   &&rC   
_print_AndPrettyPrinter._print_And  <    '';u+=>>'''55rE   c                    V P                   '       d   V P                  V\        R 4      4      # V P                  VRR7      # )OrTr   r   rW   s   &&rC   	_print_OrPrettyPrinter._print_Or  s<    '';t+<=='''55rE   c                    V P                   '       d   V P                  V\        R 4      4      # V P                  VRR7      # )XorTr   r   rW   s   &&rC   
_print_XorPrettyPrinter._print_Xor  r   rE   c                    V P                   '       d   V P                  V\        R 4      4      # V P                  VRR7      # )NandTr   r   rW   s   &&rC   _print_NandPrettyPrinter._print_Nand  s<    '';v+>??'''55rE   c                    V P                   '       d   V P                  V\        R 4      4      # V P                  VRR7      # )NorTr   r   rW   s   &&rC   
_print_NorPrettyPrinter._print_Nor$  r   rE   c                    V P                   '       d'   T P                  Y;'       g    \        R 4      RR7      # V P                  V4      # )ArrowFr   r   rA   rX   r   s   &&&rC   r   PrettyPrinter._print_Implies*  sC    ''+J+Jk'6JQV'WW''**rE   c                    V P                   '       d%   T P                  Y;'       g    \        R 4      4      # V P                  VRR7      # )EquivTr   r   r  s   &&&rC   r   PrettyPrinter._print_Equivalent0  sB    ''+J+Jk'6JKK'''55rE   c           	         V P                  VP                  ^ ,          4      p\        VP                  \	        RVP                  4       4      4      !  # )r   _)rR   ra   r   r   r   r   rd   s   && rC   _print_conjugatePrettyPrinter._print_conjugate6  s9    AFF1I&EKKc5;;=)ABDDrE   c                |    V P                  VP                  ^ ,          4      p\        VP                  RR4      !  pV# )r   |)rR   ra   r   rb   rd   s   && rC   
_print_AbsPrettyPrinter._print_Abs:  s2    AFF1I&ELLc23rE   c                    V P                   '       d>   V P                  VP                  ^ ,          4      p\        VP	                  RR4      !  pV# V P                  V4      # )r   lfloorrfloorrN   rR   ra   r   rb   r   rd   s   && rC   _print_floorPrettyPrinter._print_floor?  sO    KKq	*EXx @AEL''**rE   c                    V P                   '       d>   V P                  VP                  ^ ,          4      p\        VP	                  RR4      !  pV# V P                  V4      # )r   lceilrceilr  rd   s   && rC   _print_ceilingPrettyPrinter._print_ceilingG  sO    KKq	*EWg >?EL''**rE   c                   \        VP                  4      '       d   V P                  '       d   \        R 4      pMRpRp^ p\	        VP
                  4       F  w  rVV P                  V4      p\        VP                  V4      !  pWF,          pVP                  '       d   V^8  d   V\        \        V4      4      ,          pVf   TpKr  \        VP                  R4      !  p\        VP                  V4      !  pK  	  \        V P                  VP                  4      P                  4       R\        P                  / p	\        V4      p
V^8  R8w  d   V
\        \        V4      4      ,          p
\        V
P                  \        P                   V4      !  p
V
P"                  ^,           V
n        \        \        P$                  ! W4      !  p
\        P&                  V
n        V
# )PARTIAL DIFFERENTIALdNr   r   F)r   rJ   rN   r"   reversedvariable_countrR   r   rc   r   r=   r}   rb   FUNCbelowr   LINEr   r   MULr   )rA   derivderiv_symbolr   count_total_derivsymnumsdsfre   s   &&         rC   _print_DerivativePrettyPrinter._print_DerivativeO  su   EJJ''D,=,=,=34LL !5!56HCC AQVVL12B$NNNaCH--y-, 7 &*kk%**&=&D&D&FHOOH <(!e+:c*;&<==EEKK
;<!+JOOE56"rE   c                   ^ RI HpHp W! 4       8X  d#   \        R4      p\	        VP                  4       !  # V! VP                  4       4      P                  pV. 8X  d:   V P                  VP                  ^,
          4      p\	        VP                  4       !  # \        R4      pV FN  pV P                  \        \        V4      4      P                  RR4      4      p\	        VP                  V4      !  pKP  	  V# )r   PermutationCycle ,) sympy.combinatorics.permutationsr5  r6  r   r   rb   listcyclic_formrR   sizer=   tuplereplacer}   )rA   dcr5  r6  cycdc_listr6   r   s   &&      rC   _print_CyclePrettyPrinter._print_Cyclet  s    G=R.Cszz|,,bggi(44b=++bggk*Cszz|,,nACaM11#r:;Aciil+C  
rE   c                |   ^ RI HpHp VP                  pVe   \	        RV R2RR^R7       MV P
                  P                  RR4      pV'       d   V P                  V! V4      4      # VP                  p\        \        \        V4      4      4      p\        R	4      pRp\        We4       Fz  w  rV P                  V	4      pV P                  V
4      p\        VP!                  V4      !  pV'       d   R
pM\        VP#                  R4      !  p\        VP%                  V4      !  pK|  	  \        VP'                  4       !  # )r   r4  zw
                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
stacklevelr7   Tr7  Fr   )r9  r5  r6  print_cyclicr   r<   getrB  
array_formr:  rangelenr   ziprR   r   r&  rc   r}   rb   )rA   rJ   r5  r6  r7   lowerupperresultfirstur   s1s2cols   &&            rC   _print_Permutation PrettyPrinter._print_Permutation  s   G!.."%++6- 8 */+P ..,,]DAK$$U4[11U3u:&'B%DAQBQBbhhrl+C #((3-0c!23F & 6==?++rE   c                   VP                   pV P                  V4      pVP                  '       d   \        VP	                  4       !  pTpVP
                   F`  pV P                  V^ ,          4      pVP                  4       ^8  d   \        VP	                  4       !  p\        VP                  RV4      !  pKb  	  RpRpVP
                   EF  p	VP                  4       p
V
^,           pV P                  '       * pV'       d
   V^,          p\        RV4      p\        V4      pVP                  W,
          ^,          ,           Vn        \        V	4      ^8  Ed,   \        V	4      ^8X  d$   \        R4      pV P                  V	^,          4      p\        V	4      ^8X  d1   V P                  V	^,          4      pV P                  V	^,          4      pV'       d   \        ^^XP                  4       ,
          4      p\        VP                  RV,          4      !  p\        ^^XP                  4       ,
          4      p\        VP                  RV,          4      !  p\        VP                  X4      !  p\        VP!                  X4      !  pV'       g   \        VP                  R4      !  pV'       d   TpRpEK  \        VP                  V4      !  pEK  	  \        VP                  V4      !  p\        P"                  Vn        V# )r   z dTNintr7  r   F)functionrR   is_Addr   rb   limitsr   r}   heightrN   r   r   rL  r   rc   r   r&  r(  r   )rA   integralr0  prettyFr   r   	prettyArg	firsttermr.  limhH
ascii_modevintre   prettyAprettyBspcs   &&                rC   _print_IntegralPrettyPrinter._print_Integral  sW    ++a.888 '.."23G AAaD)I 1$&	(8(8(:;	ciii89C ! 	??C

AAA "...JQq>D t$E \\- EN 3x!| s8q=(nG"kk#a&1Gs8q="kk#a&1G"kk#a&1G aW]]_!45C(',,sSy*ABGaW]]_!45C('--c	*BCG"EKK$89"EKK$89"EKK$45!	u.] #` CHHQK("rE   c                   VP                   pV P                  V4      p\        R ^4      p\        R ^4      p\        R^4      pV P                  '       d   \        R^4      p\        R^4      pVP	                  4       pRp^ p	^ p
VP
                   EF  pV P                  V4      w  rV^,           ^,          ^,          ^,
          pWE,           WN^,
          ,          ,           V,           V,           .p\        V^,           4       F>  pVP                  RV,           RV^,
          ,          ,           V,           R,           4       K@  	  \        R4      p\        VP                  ! V!  !  p\        WP	                  4       4      p	V'       d   VP	                  4       p
\        VP                  V4      !  p\        VP                  V4      !  pV'       d
   ^ Vn        RpVP	                  4       p\        R4      p\        VP                  ! R.V^,
          ,          !  !  p\        VP!                  V4      !  p\        VP!                  V4      !  pEK  	  W^,          ,           Vn        \        P"                  Vn        V# )r  r  -UpTackTr   r7  F)termrR   r   rN   r]  r\  '_PrettyPrinter__print_SumProduct_LimitsrK  appendr   r   stackr   r   r&  r   r}   r(  r   )rA   rJ   r   pretty_funchorizontal_chr
corner_chrvertical_chrfunc_heightrQ  	max_uppersign_heightrb  pretty_lowerpretty_upperr   
sign_linesr  pretty_signr]  paddings   &&                  rC   _print_ProductPrettyPrinter._print_Product  s   yykk$'c1#q\
C|!#q\Nh*J!((*	;;C)-)G)G)L&L 1_)Q.2E(5QR79STWaadrrsJ;?+!!#"4uQw"H<"WZ]"]^ , %R.K$k&7&7&DEK I':':'<=I)002$k&7&7&EFK$k&7&7&EFK'($ '')F nG '--#
1C"DEG$k&7&7&@AK$k&7&7&DEK; >  )>9(nnrE   c                t   a  V 3R  lpS P                  V^,          4      pV! V^ ,          V^,          4      pWC3# )c                    < \        R \        R4      ,           R ,           4      pSP                  V 4      pSP                  V4      p\        \        P                  ! W2V4      !  pV# )r   ==)r   r   rR   r   r   )r   r   r   r   r   re   rA   s   &&    rC   print_start<PrettyPrinter.__print_SumProduct_Limits.<locals>.print_start.  sQ    C$t*,s23BC AC A
q 9:ELrE   )rR   )rA   rb  r  prettyUpperprettyLowers   f&   rC   __print_SumProduct_Limits'PrettyPrinter.__print_SumProduct_Limits-  s9    	 kk#a&)!#a&#a&1''rE   c                h   V P                   '       * pR  pVP                  pV P                  V4      pVP                  '       d   \	        VP                  4       !  pVP                  4       ^,           pRp^ p^ p	VP                   EFm  p
V P                  V
4      w  r\        WP                  4       4      pV! WkP                  4       VP                  4       V4      w  rpp\        R4      p\	        VP                  ! V!  !  pV'       d   VP                  4       p	\	        VP                  V4      !  p\	        VP                  V4      !  pV'       dH   V;P                  WP                  4       ^,          VP                  ,
          ,
          ,          un        Rp\        R4      p\	        VP                  ! R.V,          !  !  p\	        VP!                  V4      !  p\	        VP!                  V4      !  pEKp  	  X'       g   TM^ pW^,          ,           V,           Vn        \        P"                  Vn        V# )c                    R
R lp\        V ^4      pV^,          pV^,           pV ^,          p. p	V'       Ed9   V	P                  RV,          R,           4       V	P                  RRV^,
          ,          ,          4       \        ^V4       F/  p
V	P                  RV
,          : RRWz,
          ,          : 24       K1  	  V'       d-   V	P                  RV,          : RRWv,
          ,          : 24       \        \        ^V4      4       F/  p
V	P                  RV
,          : RRWz,
          ,          : 24       K1  	  V	P                  RRV^,
          ,          ,           R,           4       WeV,           W3# Wx,           pWh,           p\	        R	^4      pV	P                  RV,          4       \        ^ V4       F?  p
V	P                  RV
,          : V^,          : RWz,
          ^,
          ,          : 24       KA  	  \        \        ^ V4      4       F?  p
V	P                  RV
,          : V^,          : RWz,
          ^,
          ,          : 24       KA  	  V	P                  V^,          V,          4       We^V,          ,           W3# )Nc                 F   V'       d   \        V 4      V8  d   V # V\        V 4      ,
          pVR9   g   V\        R 4      9  d   V RV,          ,           # V^,          pRV,          pVR8X  d   RV,          V ,           # WP,           RV\        V4      ,
          ,          ,           # )<^>r   >)r  <)rL  r:  )r.  widhowneedhalfleads   &&&   rC   adjust6PrettyPrinter._print_Sum.<locals>.asum.<locals>.adjust=  s    c!fslHSV|,&#T%[*@s4x<'Qw4x#:t8a<'x#tc$i'7"888rE   r  r   z\%s`\rx   /r8  sum)Nr  )r   rq  rK  r#  r   )	hrequiredrN  rO  	use_asciir  rc  r"  wmorelinesr6   vsums   &&&&        rC   asum&PrettyPrinter._print_Sum.<locals>.asum<  s   
9 Iq!A1AAAq=DEyS!Ws]+WQU45q!ALLSUUCK!@A %LLCGGS!%[!AB!%1+.ALLCEE3;!?@ /S3A;.45d(E//HHE1~S!W%q!ALLSUDGS!%!)_!MN %!%1+.ALLSUDGS!%!)_!MN /T!Wa[)af*e11rE   Tr7  Fr   )rN   rZ  rR   r[  r   rb   r]  r\  rp  r   r   r   rr  r   r&  r   r}   r(  r   )rA   rJ   re  r  r0  r_  rd  rQ  rx  ry  rb  r  r  r"  rc  slines
adjustment
prettySignpadascii_adjustments   &&                  rC   
_print_SumPrettyPrinter._print_Sum9  s   ***
(	2T MM++a.888 '.."23GNNq  	;;C'+'E'Ec'J$KI'9'9';<I (,$$&(9(9(;Z(I$A&*#BJ#Z%5%5v%>?J(//1#Z%5%5k%BCJ#Z%5%5k%BCJ  A)91)<)0)9)9*: %; ;  R.Ccii#q12C#Z%5%5c%:;J *"2"27";<G9 @ .8:Q$A~58HH$..rE   c                   VP                   w  r#rEV P                  V4      p\        V4      \        R ,          8:  d   \	        VP                  RR4      !  p\	        R4      pV P                  V4      pV P                  '       d1   \	        VP                  \        R^4       \        R4       24      !  pM\	        VP                  R4      !  p\	        VP                  V P                  V4      4      !  p\        V4      R8X  g&   V\        P                  \        P                  39   d   RpM8V P                  '       d'   \        V4      R	8X  d   \        R
4      M
\        R4      p\	        VP                  V P                  V4      4      !  p\	        VP                  V4      !  p\	        VP                  V4      R\        P                  / pV# )r   rw   rx   rb  rm  r  z->z+-r7  +SuperscriptPlusSuperscriptMinusr   )ra   rR   r   r   r   rb   rN   r}   r   r   r=   r   InfinityNegativeInfinityr&  r(  )	rA   r   rX   zz0dirELimLimArgs	   &&       rC   _print_LimitPrettyPrinter._print_Limit  sZ   bKKNa=Ju--AHHS#./AQc1{7?S>T.U!VWFd!34FV\\$++b/:;s8trajj!2D2D%EEC   8;CCk"34[YkMlV\\$++c*:;<#))F+,#))A,?
?
rE   c           	     h   Tp/ p\        VP                  4       F<  p\        VP                  4       F   pV P                  W$V3,          4      W4V3&   K"  	  K>  	  ^p^pR.VP                  ,          p\        VP                  4       FS  p\	        \        VP                  4       Uu. uF  qCWE3,          P                  4       NK  	  up;'       g    ^ .4      W&   KU  	  Rp	\        VP                  4       EF$  pRp
\        VP                  4       F  pW4V3,          pVP                  4       W,          8:  g   Q h\        VP                  4       W,          4      w  r\        VP                  V4      !  p\        VP                  V4      !  pV
f   Tp
K  \        V
P                  RV,          4      !  p
\        V
P                  V4      !  p
K  	  V	f   T
p	K  \        V4       F  p\        V	P                  R4      !  p	K  	  \        V	P                  V
4      !  p	EK'  	  V	f   \        R4      p	V	# u upi )z<
This method factors out what is essentially grid printing.
Nr   r7  )rK  rowscolsrR   r   r   r&   r   r}   rc   r&  )rA   rX   MMsr6   r9   hsepvsepmaxwDD_rowr.  rc   r}   r  s   &&             rC   _print_matrix_contents$PrettyPrinter._print_matrix_contents  s    qvvA166];;qAw/a4 # 
  taff}qvvAU166]C]ad8>>+]CJJsKDG  qvvAE166]!tH wwyDG+++
 )DG</t- =E"EKKD$9:"EKKN31 #4 y 4[- ! AGGEN+AK N 92A_ Ds   & H/
c                    V P                  V4      pVP                  4       ^,          Vn        \        VP	                  W#4      !  pV# )   )r  r]  r   r   rb   )rA   rX   lparensrparensr  s   &&&& rC   _print_MatrixBasePrettyPrinter._print_MatrixBase  s;    ''*XXZ]
23rE   c                \   VP                   pVP                  '       d|   ^ RIHp \	        W#4      '       d   V P                  VP                  RRR7      # V P                  V4      pVP                  4       ^,          Vn	        \        VP                  RR4      !  # V P                  VRRR7      # )r   BlockMatrixr  )r  r  )r   is_MatrixExpr&sympy.matrices.expressions.blockmatrixr  r;   r  blocksrR   r]  r   r   rb   )rA   rX   matr  r  s   &&   rC   _print_Determinant PrettyPrinter._print_Determinant  s    eeJ#++--cjj#s-SSC AQAJqxxS122))#sC)HHrE   c                r    V P                   '       d   R pMRpV P                  VP                  RRVR R7      # )u   ⊗.*Nc                 4    \        V 4      \        R ,          8*  # r   r   r   r   s   &rC   <lambda>4PrettyPrinter._print_TensorProduct.<locals>.<lambda>      #9!#<
5@Q#QrE   parenthesizerN   r`   ra   )rA   rJ   circled_timess   && rC   _print_TensorProduct"PrettyPrinter._print_TensorProduct  s?    $M Mtyy$mQ  S 	SrE   c                r    V P                   '       d   R pMRpV P                  VP                  RRVR R7      # )u   ∧z/\Nc                 4    \        V 4      \        R ,          8*  # r   r  r  s   &rC   r  3PrettyPrinter._print_WedgeProduct.<locals>.<lambda>  r  rE   r  r  )rA   rJ   wedge_symbols   && rC   _print_WedgeProduct!PrettyPrinter._print_WedgeProduct  s?    #L Ltyy$lQ  S 	SrE   c                    V P                  VP                  4      p\        VP                  R R4      !  pVP	                  4       ^,          Vn        \        VP                  R4      !  pV# )rw   rx   tr)rR   r   r   rb   r]  r   rc   )rA   rX   r  s   && rC   _print_TracePrettyPrinter._print_Trace  sR    KKS)*XXZ]
/0rE   c                   ^ RI Hp \        VP                  V4      '       d   VP                  P
                  '       do   VP                  P
                  '       dS   V P                  \        VP                  P                  RVP                  VP                  3,          ,           4      4      # V P                  VP                  4      p\        VP                  4       !  pV P                  VP                  VP                  3RR7      P                  RRR7      ^ ,          p\        \        P                  ! W44      R\        P                  / pW5n        WEn        V# )	r   MatrixSymbolz_%d%d, 	delimiter[]rc   r}   r   )sympy.matricesr  r;   parentr6   	is_numberr9   rR   r   ri   r   rb   r`   r   r   r%  
prettyFunc
prettyArgs)rA   rJ   r  r  prettyIndicesre   s   &&    rC   _print_MatrixElement"PrettyPrinter._print_MatrixElement%  s   /t{{L11FF$$$)9)9)9;;4;;++g8H.HHIK K T[[1J#Z%6%6%89J OOTVVTVV,<O f#Sf1!5M__Z?Az AE  *,LrE   c                  a  ^ RI Hp S P                  VP                  4      p\	        VP                  V4      '       g   \        VP                  4       !  pV 3R lpS P                  V! VP                  VP                  P                  4      V! VP                  VP                  P                  4      3RR7      P                  RRR7      ^ ,          p\        \        P                  ! W54      R\
        P                  / pW6n        WVn        V# )	r   r  c                    < \        V 4      p V ^,          ^8X  d   V ^ V ^ ,          ^ 8X  d   RV ^ &   V ^,          V8X  d   RV ^&   \        SP                  V RR7      !  # )r  r7  :r  )r:  r   r`   )r   dimrA   s   &&rC   ppslice1PrettyPrinter._print_MatrixSlice.<locals>.ppslice@  s^    QAtqyaDtqy!ts{!tqC@AArE   r  r  r  r  r  r   )r  r  rR   r  r;   r   rb   r`   rowslicer  colslicer  r   r   r%  r  r  )rA   mr  r  r   r  re   s   f&     rC   _print_MatrixSlice PrettyPrinter._print_MatrixSlice:  s    /[[*
!((L11#Z%6%6%89J	B __gajj!((--&HAJJ.&0;? % AAGSX[A\]^`
 &0ooj&MOOOO &%rE   c                
   VP                   pV P                  V4      p^ RIHpHp \        W$4      '       g;   \        W%4      '       g*   VP                  '       d   \        VP                  4       !  pV\        R4      ,          pV# )r   r  r  T)	r   rR   r  r  r  r;   r  r   rb   )rA   rJ   r  re   r  r  s   &&    rC   _print_TransposePrettyPrinter._print_TransposeU  s`    hhC <3--3,,1B1B1B/E
3(rE   c                Z   VP                   pV P                  V4      pV P                  '       d   \        \	        R 4      4      pM\        R4      p^ RIHpHp \        W%4      '       g;   \        W&4      '       g*   VP                  '       d   \        VP                  4       !  pW4,          pV# )Daggerr  r  )r   rR   rN   r   r   r  r  r  r;   r  rb   )rA   rJ   r  re   dagr  r  s   &&     rC   _print_AdjointPrettyPrinter._print_Adjoint_  s}    hhC [23CS/C<3--3,,1B1B1B/E
rE   c                    VP                   P                  R8X  d#   V P                  VP                   R,          4      # V P                  VP                   4      # )r   r   r   r   r   )r  shaperR   )rA   Bs   &&rC   _print_BlockMatrix PrettyPrinter._print_BlockMatrixm  s<    88>>V#;;qxx~..{{188$$rE   c                   R pVP                    F  pV P                  V4      pVf   TpK  VP                  4       ^ ,          p\        V4      P	                  4       '       d1   \        \        P                  ! VR4      !  pV P                  V4      pM\        \        P                  ! VR4      !  p\        \        P                  ! W$4      !  pK  	  V# )Nr    + )ra   rR   as_coeff_mmulr   could_extract_minus_signr   r   r   )rA   rJ   r.  itemre   coeffs   &&    rC   _print_MatAddPrettyPrinter._print_MatAddr  s    IIDKK%Ey**,Q/U84466"JOOAs$;<A KK-E"JOOAu$=>A
 9:  rE   c                   \        VP                  4      p^ RIHp ^ RIHp ^ RIHp \        V4       Fu  w  rg\        V\        WSV34      '       dE   \        VP                  4      ^8  d+   \        V P                  V4      P                  4       !  W&&   Kb  V P                  V4      W&&   Kw  	  \        P                  ! V!  # )r   HadamardProduct)KroneckerProductMatAdd)r:  ra   #sympy.matrices.expressions.hadamardr"  $sympy.matrices.expressions.kroneckerr#  !sympy.matrices.expressions.mataddr%  	enumerater;   r   rL  r   rR   rb   __mul__)rA   rJ   ra   r"  r#  r%  r6   as   &&      rC   _print_MatMulPrettyPrinter._print_MatMul  s    DIIGI<dODA1sF=MNOODII*$dkk!n&;&;&=>++a. $ !!4((rE   c                d    V P                   '       d   \        \        R 4      4      # \        R4      # )IdentityMatrixIrN   r   r   rI   s   &&rC   _print_IdentityPrettyPrinter._print_Identity  s)    k*:;<<c?"rE   c                d    V P                   '       d   \        \        R 4      4      # \        R4      # )
ZeroMatrix0r1  rI   s   &&rC   _print_ZeroMatrixPrettyPrinter._print_ZeroMatrix  s(    k,788c?"rE   c                d    V P                   '       d   \        \        R 4      4      # \        R4      # )	OneMatrix1r1  rI   s   &&rC   _print_OneMatrixPrettyPrinter._print_OneMatrix  s(    k+677c?"rE   c                    \        VP                  4      p\        V4       F  w  r4V P                  V4      W#&   K  	  \        P
                  ! V!  # rG   )r:  ra   r)  rR   r   r*  rA   rJ   ra   r6   r+  s   &&   rC   _print_DotProductPrettyPrinter._print_DotProduct  s?    DIIdODAkk!nDG $!!4((rE   c                (   V P                  VP                  4      p^ RIHp \	        VP                  V4      '       g4   VP                  P
                  '       d   \        VP                  4       !  pW P                  VP                  4      ,          pV# )r   r  )	rR   baser  r  r;   r  r   rb   exp)rA   rJ   re   r  s   &&  rC   _print_MatPowPrettyPrinter._print_MatPow  sa    DII&/$))\22tyy7N7N7N/EDHH-.rE   c           	        aaa ^ RI Ho ^ RIHo ^ RIHo V P                  '       d   \        R4      pMRpV P                  VP                  RRVVVV3R lR7      # )	r   r!  r$  MatMulRingr  Nc                 "   < \        V SSS34      # rG   r;   )r   r"  r%  rI  s   &rC   r  6PrettyPrinter._print_HadamardProduct.<locals>.<lambda>  s    z!ffo5V'WrE   r  )
r&  r"  r(  r%  !sympy.matrices.expressions.matmulrI  rN   r   r`   ra   )rA   rJ   delimr"  r%  rI  s   && @@@rC   _print_HadamardProduct$PrettyPrinter._print_HadamardProduct  sN    G<<'EEtyy$eW  Y 	YrE   c                   V P                   '       d   \        R 4      pMV P                  R4      pV P                  VP                  4      pV P                  VP                  4      p\        VP                  4      \        R,          8  d   \        VP                  4       !  p\        \        P                  ! W$4      R\        P                  / pW5,          # )rJ  .r   r   )rN   r   rR   rC  rD  r   r   r   rb   r   r   r'  )rA   rJ   circpretty_base
pretty_exppretty_circ_exps   &&    rC   _print_HadamardPower"PrettyPrinter._print_HadamardPower  s    v&D;;s#Dkk$)),[[*
dhh*U"33#Z%6%6%89J$__T.
OO
 ++rE   c                   aa ^ RI Ho ^ RIHo V P                  '       d   R\        R4       R2pMRpV P                  VP                  RRVVV3R lR7      # )	r   r$  rH  r   TensorProductz x Nc                     < \        V SS34      # rG   rL  )r   r%  rI  s   &rC   r  7PrettyPrinter._print_KroneckerProduct.<locals>.<lambda>  s    z!ff5E'FrE   r  )r(  r%  rN  rI  rN   r   r`   ra   )rA   rJ   rO  r%  rI  s   && @@rC   _print_KroneckerProduct%PrettyPrinter._print_KroneckerProduct  sU    <<O45Q7EEtyy$eF  H 	HrE   c                    V P                  VP                  P                  4      p\        VP	                  R R4      !  pV# r  r  )rR   lamdarJ   r   rb   )rA   Xr  s   && rC   _print_FunctionMatrix#PrettyPrinter._print_FunctionMatrix  s2    KK%c*+rE   c           	     
   VP                   ^8X  gC   VP                   VP                  r2\        V\        VRRR7      RR7      pV P	                  V4      # V P                  ^4      V P                  VP                  4      ,          # )r   Fevaluater  )r-  denr   r   
_print_MulrR   )rA   rJ   r-  ri  ress   &&   rC   _print_TransferFunction%PrettyPrinter._print_TransferFunction  sb    xx1}xxc3sB7%HC??3'';;q>$++dhh"777rE   c                    \        VP                  4      p\        VP                  4       F-  w  r4\        V P	                  V4      P                  4       !  W#&   K/  	  \        P                  ! V!  # rG   )r:  ra   r)  r   rR   rb   r*  r?  s   &&   rC   _print_SeriesPrettyPrinter._print_Series  sR    DIIdii(DA $++a."7"7"9:DG )!!4((rE   c                   ^ RI Hp \        VP                  4      p. p\	        V4       F  p\        WR4      '       dp   \        VP                  4      ^8  dV   V P                  V4      pVP                  4       ^,          Vn	        VP                  \        VP                  4       !  4       K  V P                  V4      pVP                  4       ^,          Vn	        VP                  V4       K  	  \        P                  ! V!  # )r   )MIMOParallel)sympy.physics.control.ltirr  r:  ra   r#  r;   rL  rR   r]  r   rq  r   rb   r*  )rA   rJ   rr  ra   pretty_argsr+  
expressions   &&     rC   _print_MIMOSeriesPrettyPrinter._print_MIMOSeries  s    :DII$A1++DII0B![[^
&0&7&7&91&<
#"":z/@/@/B#CD![[^
&0&7&7&91&<
#"":.   !!;//rE   c                J   R pVP                    F  pV P                  V4      pVf   TpK  \        \        P                  ! V4      !  pVP                  4       ^,          Vn        \        \        P                  ! VR4      !  p\        \        P                  ! W$4      !  pK  	  V# )Nr  )ra   rR   r   r   r   r]  r   )rA   rJ   r.  r  re   s   &&   rC   _print_ParallelPrettyPrinter._print_Parallel  s    IIDKK%Ey
 23XXZ]

5 9:
 9:  rE   c                   ^ RI Hp RpVP                   F  pV P                  V4      pVf   TpK  \	        \
        P                  ! V4      !  pVP                  4       ^,          Vn        \	        \
        P                  ! VR4      !  p\        WB4      '       d   VP                  4       ^,
          Vn        \	        \
        P                  ! W54      !  pK  	  V# )r   )TransferFunctionMatrixNr  )
rs  r|  ra   rR   r   r   r   r]  r   r;   )rA   rJ   r|  r.  r  re   s   &&    rC   _print_MIMOParallel!PrettyPrinter._print_MIMOParallel  s    DIIDKK%Ey
 23XXZ]

5 9:d;;!"aAJ
 9:  rE   c                   ^ RI HpHp VP                  V! ^^VP                  4      rT\        WC4      '       d   \        VP                  4      MV.p\        VP                  V4      '       d    \        VP                  P                  4      MVP                  .p\        WC4      '       d)   \        VP                  V4      '       d   V! . VOVO5!  pM\        WC4      '       dK   \        VP                  V4      '       d/   VP                  V8X  d   V! V!  pMV! . VOVP                  N5!  pMu\        WB4      '       d5   \        VP                  V4      '       d   WE8X  d   V! V!  pM;V! V.VO5!  pM0WE8X  d   V! V!  pM#VP                  V8X  d   V! V!  pMV! . VOVO5!  p\        \        P                  ! V P                  V4      4      !  p	V	P                  4       ^,          V	n        VP                  R8X  d   \        \        P                  ! V	R4      !  M\        \        P                  ! V	R4      !  p	\        \        P                  ! WP                  V4      4      !  p	V P                  V4      V	,          # )r   )TransferFunctionSeriesr   - r  )sympy.physics.controlr  r  sys1varr;   r:  ra   sys2r   r   r   rR   r]  r   sign)
rA   rJ   r  r  r-  tfnum_arg_listden_arg_listri  denoms
   &&        rC   _print_FeedbackPrettyPrinter._print_Feedback  s   B))-aDHH=R)3C)@)@tCHH~setyy&)) DIINN+04		{ 	 c""z$))V'D'D6,66C$$DII?O)P)PyyBl+6l6DII6..:dii3P3Pyl+S0<0yl+bl+:l:\:JOODKKO<=*>Bii2o
JOOE59:Z__UE:; 	JOOE;;s3CDE{{3%%rE   c                   ^ RI HpHp V P                  V! VP                  VP
                  4      4      pV P                  VP
                  4      p\        \        P                  ! V4      !  pVP                  R8X  d   \        \        P                  ! RV4      !  M\        \        P                  ! RV4      !  p\        \        P                  ! V4      !  p^ Vn        \        \        P                  ! VR4      !  pVP                  4       ^,          Vn        \        P                  ! V\        R4      4      p\        VP
                  V4      '       d   VP                  4       ^,
          Vn        \        \        P                  ! We4      !  pV# )r   )
MIMOSeriesr|  zI + zI - z-1 r   r  )r  r  r|  rR   r  r  r   r   r   r  r}   rb   r   r]  r*  r;   )rA   rJ   r  r|  inv_matplant	_feedbacks   &&     rC   _print_MIMOFeedback!PrettyPrinter._print_MIMOFeedback;  s"   L++jDII>?DII&
 89	HL		UWJ
 0 0 CDZ--fi@A 	
 1 1) <=		
 0 0E BC	&--/2	&&y*S/B	dii!788!*!1!1!3a!7I
	 AB	rE   c                    V P                  VP                  4      pVP                  4       ^,
          Vn        V P                  '       d   \
        R,          MRp\        VP                  V4      !  pV# )r   tauz{t})rR   	_expr_matr]  r   rN   r!   r   r}   )rA   rJ   r  	subscripts   &&  rC   _print_TransferFunctionMatrix+PrettyPrinter._print_TransferFunctionMatrixM  sU    kk$..)zz|a',0,=,=,=M%(6	#))I./
rE   c                    ^ RI Hp VP                  pVP                  pVP                  pVP
                  pV! W4.WV..4      pV P                  VP                  4      # )r   r  )r  r  _A_B_C_DrR   r  )rA   rJ   r  Ar  Cr  r  s   &&      rC   _print_StateSpacePrettyPrinter._print_StateSpaceT  sO    FGGGGGGGGA6A6*+{{3::&&rE   c                   ^ RI Hp V P                  '       g   \        R4      hWP                  8X  d    \        VP                  P                  4      # . p. p\        W4      '       d    VP                  4       P                  4       pM^ V3.pV EF  w  rg\        VP                  P                  4       4      pVP                  R R7       V F  w  rV
^8X  d$   VP                  RV	P                  ,           4       MyV
R8X  d$   VP                  RV	P                  ,           4       MOV P                  V
4      P                  4       ^ ,          pVP                  VR,           V	P                  ,           4       VP                  V	P                  4       K  	  EK  	  V^ ,          P!                  R4      '       d   V^ ,          R	,          V^ &   M1V^ ,          P!                  R4      '       d   V^ ,          R
,          V^ &   . pR.p. p\#        V4       EFN  w  ppVP                  ^ 4       RV9   g   K!  TpVP%                  WO,          R4      p\'        R^4      V9   d   \)        \+        V4      4       Fs  p^W&   VV,          \'        R^4      8X  g   K!  VV^,           ,          R8X  g   K8  VRV \'        R^4      ,           R,           WO,          ,           VV^,           R ,           p Mu	  Mr\'        R^4      V9   db   VP-                  \'        R^4      4      pVR8w  d@   ^W&   VRV \'        R^4      ,           R,           WO,          ,           VV^,           R ,           pVW?&   EKQ  	  V Uu. uF  pVP/                  R4      NK  	  pp\1        R V 4       4      p^V9   dU   \#        V4       FE  w  pp\+        V4      ^8X  g   K  VP3                  ^ R\+        V^ ,          4      ,          4       ^W&   KG  	  \#        V4       EF  w  ppVP                  \+        VW,          ,          4      4       \)        V4       EFx  pV^,           \+        V4      8:  d   V\+        V4      8  dC   VP                  R\5        VRR 4      ^\+        V4      ^,
          ,          ,           ,          4       VW,          8X  d2   WV,          ;;,          VW,          ,          R,           ,          uu&   K  VV;;,          VV,          RVR,          \+        VV,          4      ,
          ^,           ,          ,           ,          uu&   K  V\+        V4      8  dC   VP                  R\5        VRR 4      ^\+        V4      ^,
          ,          ,           ,          4       VV;;,          RVR,          ^,           ,          ,          uu&   EK{  	  EK  	  \        RP7                  V Uu. uF  pVRR NK
  	  up4      4      # u upi u upi )r   )Vectorz:ASCII pretty printing of BasisDependent is not implementedc                 0    V ^ ,          P                  4       # r   )__str__r  s   &rC   r  5PrettyPrinter._print_BasisDependent.<locals>.<lambda>m  s    AaDLLNrE   r   r7  z(-1) r   r  :   NNr   
z)_extNz)_lower_hookc              3   8   "   T F  p\        V4      x  K  	  R # 5irG   )rL  ).0r   s   & rC   	<genexpr>6PrettyPrinter._print_BasisDependent.<locals>.<genexpr>  s     ,AQs   r  )sympy.vectorr  rN   NotImplementedErrorzeror   _pretty_formr;   separateitemsr:  
componentsr   rq  rR   rb   
startswithr)  r>  r   rK  rL  rfindsplitr   insertr  join)rA   rJ   r  o1vectstrsr  systemvect
inneritemsr   varg_strlengthsstrsflagr6   partstrtempstrparenindexr   
n_newlinespartsr9   r.  s   &&                       rC   _print_BasisDependent#PrettyPrinter._print_BasisDependent]  s   '   %&bcc99dii4455d##MMO))+EYKE!LFdoo3356JOO":O;" 6IIbnn- . "WIIgnn- . #kk!68A'G IIgmann<=/% # "0 a5E""qE"IBqEUc""qE"IBqEt#B-JAwKKNw!!//(+r:#w.!&s7|!4"#"5>T'1-=='%RS)BTX\B\ '.fuoWa8H&H+.'/2:+'>@GPQ	
@S'TG! "5 .!,7 $MM$~q*ABE{"#")&5/D4K"K'*#+.6k#:<CEAIJ<O#P1 (4 &((RaggdmR(,,,
9%bM5u:?LLC3uQx=$9:DG *
 ""HAuNN3uTW~./:&Q3#e*$CI~C3ws|+<+,c'l1n+=,> %? @DG|!Wtw%)??Q58c72;36uQx=4A3445 /6 $6 6 CI~C3ws|+<+,c'l1n+=,> %? @GsGBKM22G ' && $))T$:TQsVT$:;<<9 )8 %;s   $W W%c           	     L  a
 ^ RI Ho
 VP                  4       ^ 8X  d   V P                  VR,          4      # . .\	        VP                  4       4       Uu. uF  p. NK  	  up,           pVP
                   Uu. uF  p\        \	        V4      4      NK  	  ppV
3R lp\        P                  ! V!   EF$  pVR,          P                  W,          4       Rp\	        VP                  4       ^,
          RR4       F  p\        W8^,           ,          4      VP
                  V,          8  d    Kz  V'       d&   W8,          P                  W8^,           ,          4       MgW8,          P                  V! W8^,           ,          4      4       \        W8^,           ,          4      ^8X  d!   V! W8,          R,          ..4      W8,          R&   V'       * p. W8^,           &   K  	  EK'  	  V^ ,          ^ ,          p	VP                  4       ^,          ^8X  d
   V! V	.4      p	V P                  V	4      # u upi u upi )r   )ImmutableMatrixc                    < S! V R R7      # )Frg  rQ   )r   r  s   &rC   r  0PrettyPrinter._print_NDimArray.<locals>.<lambda>  s    E:rE   TrQ   r  )sympy.matrices.immutabler  rankrR   rK  r  r:  	itertoolsproductrq  rL  )rA   rJ   r6   	level_strshape_rangesr  outer_ievenback_outer_iout_exprr  s   &&        @rC   _print_NDimArrayPrettyPrinter._print_NDimArray  s   <99;!;;tBx((Ddiik(:;(:1B(:;;	04

;
1U1X
;: ((,7GbM  /D %diik!mR <ya01DJJ|4LL+229!^3LM+223!q.143 49A%5671<69'5b9:;7=	/3x,.	q.) != 8" Q<?99;?aH:H{{8$$3 <;s   H4H!c           
        \        V4      p\        R VP                  4       ,          4      p\        R VP                  4       ,          4      pRpRpV EF  p	V P                  V	P                  ^ ,          4      p
W9   g	   V'       d`   WyP                  8X  dP   V	P                  '       d    \        \         P                  ! VR4      !  pM\        \         P                  ! VR4      !  pW9   dT   \        \         P                  ! V
R4      !  p
\        \         P                  ! WP                  W9,          4      4      !  p
RpMRpV	P                  '       dt   \        VP                  V
4      !  p\        VP                  R V
P                  4       ,          4      !  p\        VP                  R V
P                  4       ,          4      !  pMr\        VP                  V
4      !  p\        VP                  R V
P                  4       ,          4      !  p\        VP                  R V
P                  4       ,          4      !  pV	P                  pEK  	  \        VP                  V4      !  p\        VP                  V4      !  pV# )r   Nr8  =TF)
r   r   rR   ra   is_upr   r   r}   r   r&  )rA   ri   indices	index_mapcentertopbotlast_valenceprev_mapr  indpicpicts   &&&&        rC   _printer_tensor_indices%PrettyPrinter._printer_tensor_indices  s   D!V\\^+,V\\^+,E[[A/F#lkk6Q;;;$jooc3&?@C$jooc3&?@C!#Z__VS%AB#Z__V[[IY=Z%[\ {{{ #))F"34#V\\#flln2D%EF #))C,>"?@ #))F"34#V\\#flln2D%EF #))C,>"?@ ;;L+ . 6<<,-4::c?+rE   c                ~    VP                   ^ ,          P                  pVP                  4       pV P                  W#4      # r  )ra   ri   get_indicesr  )rA   rJ   ri   r  s   &&  rC   _print_TensorPrettyPrinter._print_Tensor  s4    yy|  ""$++D::rE   c                    VP                   P                  ^ ,          P                  pVP                   P                  4       pVP                  pV P                  W#V4      # r  )rJ   ra   ri   r  r  r  )rA   rJ   ri   r  r  s   &&   rC   _print_TensorElement"PrettyPrinter._print_TensorElement  sH    yy~~a %%))'')NN	++D9EErE   c                ^   VP                  4       w  r#V Uu. uFU  p\        V4      \        R ,          8  d'   \        V P	                  V4      P                  4       !  MV P	                  V4      NKW  	  pp\        P                  ! V!  pV'       d   \        VP                  V4      !  # V# u upi r   )!_get_args_for_traditional_printerr   r   r   rR   rb   r*  rc   )rA   rJ   r  ra   r6   re   s   &&    rC   _print_TensMulPrettyPrinter._print_TensMul  s    ;;=
 
  #1%
5(99 A--/0?C{{1~N 	 

 ""D)uzz$/00L
s   AB*c                
   VP                    Uu. uFU  p\        V4      \        R ,          8  d'   \        V P	                  V4      P                  4       !  MV P	                  V4      NKW  	  pp\        P                  ! V!  # u upi r   )ra   r   r   r   rR   rb   __add__)rA   rJ   r6   ra   s   &&  rC   _print_TensAddPrettyPrinter._print_TensAdd  s}     YY
  #1%
5(99 A--/0?C{{1~N 	 

 !!4((
s   AB c                t    VP                   ^ ,          pVP                  '       g   V) pV P                  V4      # r  )ra   r  rR   )rA   rJ   r,  s   && rC   _print_TensorIndex PrettyPrinter._print_TensorIndex'  s.    iilzzz$C{{3rE   c                D   V P                   '       d   \        R 4      pMRpRp\        VP                  4       Fd  pV P	                  V4      p\        VP                  V4      !  pVf   TpK4  \        VP                  R4      !  p\        VP                  V4      !  pKf  	  \        V P	                  VP                  4      P                  4       R\
        P                  / p\        V4      p\        VP                  4      ^8  d+   WP	                  \        VP                  4      4      ,          p\        VP                  \        P                  V4      !  pVP                  ^,           Vn        \        \        P                   ! W4      !  p\
        P"                  Vn        V# )r!  r"  Nr   r   )rN   r"   r#  	variablesrR   r   rc   r}   rJ   rb   r%  rL  r&  r   r'  r   r   r(  r   )	rA   r)  r*  r   variabler.  r/  r0  re   s	   &&       rC   _print_PartialDerivative&PrettyPrinter._print_PartialDerivative-  s;   34LL 1HH%AQVVL12By-, 2 &*kk%**&=&D&D&FHOOH <(u!#;;s5??';<<EEKK
;<!+JOOE56"rE   c           	        aa / o\        VP                  4       F  w  r#V P                  VP                  4      SV^ 3&   VP                  R8X  d   \        R4      SV^3&   KH  \        \        R4      P                  V P                  VP                  4      4      !  SV^3&   K  	  ^p^p\        VP                  4      p\        ^4       Uau. uF"  o\        VV3R l\        V4       4       4      NK$  	  ppRp	\        V4       EF7  p
Rp\        ^4       F  oSV
S3,          pVP                  4       VS,          8:  g   Q hVS,          VP                  4       ,
          pV^,          pW,
          p\        VP                  RV,          4      !  p\        VP                  RV,          4      !  pVf   TpK  \        VP                  RV,          4      !  p\        VP                  V4      !  pK  	  V	f   Tp	K  \        V4       F  p\        V	P                  R4      !  p	K  	  \        V	P                  V4      !  p	EK:  	  \        V	P                  RR4      !  p	V	P                  4       ^,          V	n        \
        P                   V	n        V	# u upi )	r   T	otherwisezfor c              3   V   <"   T F  pSVS3,          P                  4       x  K   	  R # 5irG   )r   )r  r6   Pr9   s   & rC   r  1PrettyPrinter._print_Piecewise.<locals>.<genexpr>\  s!     =_AadGMMOO_s   &)Nr   {r7  )r)  ra   rR   rJ   condr   r}   rL  rK  r   r   rc   r&  rb   r]  r   r   r   )rA   pexprr   ecr  r  len_argsr9   r  r  r6   r  pwdeltawleftwrightr  r  s   &&     `         @rC   _print_PiecewisePrettyPrinter._print_PiecewiseM  s-   uzz*EAkk"''*AadGww$$[1!Q$$'--dkk"''.BCE!Q$ + uzz? q#!A =U8_==! 	 #
 xAE1XadGwwyDG+++a1779,!F
 34s5y 12=E"EKKD$9:"EKKN3! " y 4[- ! AGGEN+A7 !: b)*XXZ]
OO	O#s   (Jc                N    ^ RI Hp V P                  VP                  V4      4      # )r   )	Piecewise)$sympy.functions.elementary.piecewiser  rR   rewrite)rA   iter  s   && rC   
_print_ITEPrettyPrinter._print_ITE  s    B{{3;;y122rE   c                    R pV F=  pTpVf   TpK  \        VP                  R4      !  p\        VP                  V4      !  pK?  	  Vf   \        R4      pV# )Nr  r   )r   r}   r   )rA   r  r  r+  r  s   &&   rC   _hprint_vecPrettyPrinter._hprint_vec  sY    AAy.
+  93ArE   c                   V'       d+   V P                   '       g   V P                  VR V3W4VRR7      # V P                  W3W4VR7      p\        \        R VP	                  4       4      VP
                  R7      pV P                  WV3W4VR7      # )r  T)rc   r}   r  ifascii_nougly)rc   r}   r  r   )rN   r`   r   r   r]  r   )	rA   p1p2rc   r}   r  r  tmpseps	   &&&&&&&  rC   _hprint_vseparator PrettyPrinter._hprint_vseparator  s    $"3"3"3??BR=t-6t # M Moorid9oUc3::<03<<H}4)2  4 	4rE   c           	     "   VP                    Uu. uF  q P                  V4      NK  	  ppVP                   Uu. uF  q@P                  V4      NK  	  ppV P                  VP                  4      pVP	                  4       ^,          Vn        RpW53 FL  pV P                  V4      p	Vf   T	pK  \        VP                  R4      !  p\        VP                  V	4      !  pKN  	  VP	                  4       ^,          Vn        \        VP                  R4      !  p\        VP                  R4      !  pV P                  Wv4      p\        VP                  RR4      !  pVP	                  4       ^,          ^,
          p
VP	                  4       V
,
          ^,
          p\        R4      w  rrNp\        RW,
          ,          V,           RW,
          ,          ,           W,           R7      pV^,           ^,          p\        VP                  V P                  \        VP                   4      4      4      !  p\        VP                  V P                  \        VP                  4      4      4      !  pW,           Vn        \        VP                  RV4      !  pV# u upi u upi )r  Nr   rw   rx   Fr  r   )aprR   bqargumentr]  r   r  r   r&  rc   r}   r%  rb   r$   rL  )rA   rX   r+  r)  br*  r  r  r  r  r   r&  sztaddimgr(  s   &&               rC   _print_hyperPrettyPrinter._print_hyper  s   &'dd+dkk!nd+&'dd+dkk!nd+KK

#XXZ]
 A$$Q'Ey-/  XXZ]
 s$% ##A) c*+ 
A!
U"Q&&s^qstuy)C/$%)2DD %
,Avkt{{3qtt9567CI 678[
Q(Y ,+s
   JJc                
   / pVP                    Uu. uF  q0P                  V4      NK  	  upVR
&   VP                   Uu. uF  q0P                  V4      NK  	  upVR&   VP                   Uu. uF  q@P                  V4      NK  	  upVR&   VP                   Uu. uF  q@P                  V4      NK  	  upVR&   V P                  VP
                  4      pVP                  4       ^,          Vn        / pV F  pV P                  W',          4      Wg&   K  	  \        ^4       F  p\        V^ V3,          P                  4       V^V3,          P                  4       4      p	\        ^4       F  p
WjV3,          pWP                  4       ,
          ^,          pW,
          VP                  4       ,
          p\        VP                  RV,          4      !  p\        VP                  RV,          4      !  pWW3&   K  	  K  	  \        VR
,          P                  RVR,          4      !  p\        VP                  R4      !  p\        VR,          P                  RVR,          4      !  p\        VP                  V4      !  pVP                  4       ^,          Vn        \        VP                  R4      !  p\        VP                  R4      !  pV P!                  VV4      p\        VP#                  RR4      !  pVP                  4       ^,          ^,
          pVP                  4       V,
          ^,
          p\%        R4      w  ppppp\        RVV,
          ,          V,           RVV,
          ,          ,           VV,           R7      pV P                  \'        VP(                  4      4      pV P                  \'        VP*                  4      4      pV P                  \'        VP                  4      4      pV P                  \'        VP                   4      4      pR pV! VV4      w  ppV! VV4      w  pp\        VP                  R	V4      !  p\        VP                  R	V4      !  pVP                  V,
          ^,
          pV^ 8  d    \        VP                  RV,          4      !  p\        VP                  V4      !  p VVn        \        VP                  V 4      !  pVV,           Vn        \        VP                  RV4      !  pV# u upi u upi u upi u upi )r   r   z  rw   rx   Gr  r   c                     V P                  4       VP                  4       ,
          pV^ 8X  d   W3# V^ 8  d"   V \        VP                  RV,          4      !  3# \        V P                  RV) ,          4      !  V3# )r   r   )r   r   rc   )r!  r"  diffs   && rC   r  ,PrettyPrinter._print_meijerg.<locals>.adjust
  si    88:
*Dqyv:rwws4x'8999!2773u9#56::rE   r  r  )r   r   )r   r   r  )anrR   aotherbmbotherr+  r]  r   r  rK  r   r   r   rc   r}   r&  r%  rb   r$   rL  r)  r*  )!rA   rX   r  r+  r,  r  vpidxr6   r  r9   r.  rc   r}   D1D2r  r   r&  r-  r.  r/  r0  r(  pppqpmpnr  puplhtr  s!   &&                               rC   _print_meijergPrettyPrinter._print_meijerg  s    -.TT2T[[^T2&	-.XX6X[[^X6&	-.TT2T[[^T2&	-.XX6X[[^X6&	KK

#XXZ]
C&&qv.BG  qAr1a&z'')2q!f:+;+;+=>D1X1vJwwy(Q.aggi/sTz 23e 45A6
   F))$6
;<#'F))$6
;<% XXZ]
 s$% ##Aq) c*+ 
A!
U"Q&&s^Aq#stuqy)C/$%!)2DD %
, [[QTT#[[QTT#[[QTT#[[QTT#	; BBBB$+,$+,ZZ%!#6RXXd2g./B%

#S[
Q(] 3626s   S4S9+S>Tc                |    \        \        R R4      4      pW P                  VP                  ^ ,          4      ,          # Exp1rX   )r   r   rR   ra   )rA   rX   rC  s   && rC   _print_ExpBasePrettyPrinter._print_ExpBase%  s/     +fc23{{166!9---rE   c                ,    \        \        R R4      4      # rJ  )r   r   rW   s   &&rC   _print_Exp1PrettyPrinter._print_Exp1+  s    +fc233rE   c           	     T    V P                  VP                  VP                  W#WER 7      # ))r   	func_namerc   r}   )_helper_print_functionr   ra   )rA   rX   r   rR  rc   r}   s   &&&&&&rC   r   PrettyPrinter._print_Function.  s'     **166166`d*rrrE   c                (    V P                  VR R7      # r  rR  r   rW   s   &&rC   _print_mathieucPrettyPrinter._print_mathieuc4      ##A#55rE   c                (    V P                  VR R7      # r   rW  rX  rW   s   &&rC   _print_mathieusPrettyPrinter._print_mathieus7  r[  rE   c                (    V P                  VR R7      # )zC'rW  rX  rW   s   &&rC   _print_mathieucprime"PrettyPrinter._print_mathieucprime:      ##A#66rE   c                (    V P                  VR R7      # )zS'rW  rX  rW   s   &&rC   _print_mathieusprime"PrettyPrinter._print_mathieusprime=  rc  rE   r  c	                   V'       d   \        V\        R 7      pV'       g   \        VR4      '       d   VP                  pV'       d   V P	                  \        V4      4      p	M&\        V P	                  V4      P                  4       !  p	V'       d_   V P                  '       d   \        R4      p
MRp
V P	                  V
4      p
\        \        P                  ! W4      R\        P                  / p	\        V P                  W%R7      P                  WxR7      !  p\        \        P                  ! W4      R\        P                  / pWn        Wn        V# )r   r   zModifier Letter Low RingrS  r   r  r  )r   r   hasattrr   rR   r   r   rb   rN   r   r   r   r'  r`   r%  r  r  )rA   r   ra   r   rR  r  elementwiserc   r}   r  rT  r  re   s   &&&&&&&&&    rC   rS  $PrettyPrinter._helper_print_function@  s    $$45DWT:66IVI%67J#T[[%6%=%=%?@J   "#=>;;t$D#2"J
  !K!R!R6: "S "I J
 &0ooj&MOOOO &%rE   c                `    VP                   pVP                  pV.pV P                  W$R RR7      # )r7  T)r  ri  )rZ  rJ   rS  )rA   rX   r   r   ra   s   &&   rC   _print_ElementwiseApplyFunction-PrettyPrinter._print_ElementwiseApplyFunctione  s4    zzffu**4QU*VVrE   c                   ^ RI Hp ^ RIHpHp ^ RIHp ^ RIHp ^ RI	H
p ^ RIHp V\        R,          R.V\        R,          R.V\        R	,          R
.V\        R,          R.V\        R,          R.V\        R,          R.VRR./# )r   )KroneckerDelta)gamma
lowergamma)lerchphi)beta)
DiracDelta)ChideltaGammaPhirr  rp  Betar  ru  )(sympy.functions.special.tensor_functionsro  'sympy.functions.special.gamma_functionsrp  rq  &sympy.functions.special.zeta_functionsrr  &sympy.functions.special.beta_functionsrs  'sympy.functions.special.delta_functionsrt  'sympy.functions.special.error_functionsru  r!   )rA   ro  rp  rq  rr  rs  rt  ru  s   &       rC   _special_function_classes'PrettyPrinter._special_function_classesk  s    KMC?F?w!7 Ag.8=/<]73W=}V,c2]73W=eU^% 	%rE   c                |   V P                    F  p\        W4      '       g   K  VP                  VP                  8X  g   K3  V P                  '       d&   \	        V P                   V,          ^ ,          4      u # \	        V P                   V,          ^,          4      u # 	  VP                  p\	        \        V4      4      # r  )r  
issubclassr   rN   r   r   )rA   rJ   clsrR  s   &&  rC   _print_FunctionClass"PrettyPrinter._print_FunctionClass{  s    11C$$$#,,)F$$$%d&D&DS&I!&LMM%d&D&DS&I!&LMM 2 MM	-	233rE   c                $    V P                  V4      # rG   )rK   rI   s   &&rC   _print_GeometryEntity#PrettyPrinter._print_GeometryEntity  s      &&rE   c                   V P                  VP                  ^ ,          4      pV P                  '       dJ   \        V4      '       d9   V P	                  \        RV,          4      ! VP                  ^,          4      4      # V P	                  V4      # )r   zLi_%srR   ra   rN   r%   r   r   rA   rX   r  s   && rC   _print_polylogPrettyPrinter._print_polylog  sh    KKq	*	!<Y!G!G''91D(EaffQi(PQQ##A&&rE   c                h    V P                   '       d   \        R ,          MRpV P                  WR7      # )rx  rr  rW  rN   r!   r   rA   rX   rR  s   && rC   _print_lerchphiPrettyPrinter._print_lerchphi  s-    ,0,=,=,=M%(:	##A#;;rE   c                h    V P                   '       d   \        R ,          MRpV P                  WR7      # )etadirichlet_etarW  r  r  s   && rC   _print_dirichlet_eta"PrettyPrinter._print_dirichlet_eta  s-    ,0,=,=,=M%(?	##A#;;rE   c                T   V P                   '       d   \        R ,          MRpVP                  ^,          \        P                  J dR   \        V P                  VP                  ^ ,          4      P                  4       !  p\        VP                  V4      !  pV# V P                  WR7      # )theta	HeavisiderW  )
rN   r!   ra   r   Halfr   rR   rb   rc   r   )rA   rX   rR  re   s   &&  rC   _print_HeavisidePrettyPrinter._print_Heaviside  s}    .2.?.?.?M'*[	66!9AFF1I 6 = = ?@E

9 56EL'''??rE   c                (    V P                  VR R7      # r]  rX  rW   s   &&rC   _print_fresnelsPrettyPrinter._print_fresnels  r[  rE   c                (    V P                  VR R7      # rV  rX  rW   s   &&rC   _print_fresnelcPrettyPrinter._print_fresnelc  r[  rE   c                (    V P                  VR R7      # )AirW  rX  rW   s   &&rC   _print_airyaiPrettyPrinter._print_airyai  rc  rE   c                (    V P                  VR R7      # )BirW  rX  rW   s   &&rC   _print_airybiPrettyPrinter._print_airybi  rc  rE   c                (    V P                  VR R7      # )zAi'rW  rX  rW   s   &&rC   _print_airyaiprime PrettyPrinter._print_airyaiprime      ##A#77rE   c                (    V P                  VR R7      # )zBi'rW  rX  rW   s   &&rC   _print_airybiprime PrettyPrinter._print_airybiprime  r  rE   c                (    V P                  VR R7      # )WrW  rX  rW   s   &&rC   _print_LambertWPrettyPrinter._print_LambertW  r[  rE   c                (    V P                  VR R7      # )CovrW  rX  rW   s   &&rC   _print_CovariancePrettyPrinter._print_Covariance  r  rE   c                (    V P                  VR R7      # )VarrW  rX  rW   s   &&rC   _print_VariancePrettyPrinter._print_Variance  r  rE   c                (    V P                  VR R7      # )r  rW  rX  rW   s   &&rC   _print_Probability PrettyPrinter._print_Probability  r[  rE   c                ,    V P                  VR RRR7      # )r  r  r  )rR  rc   r}   rX  rW   s   &&rC   _print_Expectation PrettyPrinter._print_Expectation  s    ##A3c#JJrE   c           	     ^   VP                   pVP                  pV P                  '       d   R \        R4       R 2pMRp\	        V4      ^8X  d#   V^ ,          P
                  '       d
   V^ ,          pV P                  V4      p\        \        P                  ! WTV P                  V4      4      R^/ # )r   ArrowFromBar -> r   )
rJ   	signaturerN   r   rL  	is_symbolrR   r   r   r   )rA   rX   rJ   sigarrowvar_forms   &&    rC   _print_LambdaPrettyPrinter._print_Lambda  s    vvkkN34A6EEs8q=SV---a&C;;s#:??8DKK<MNZXYZZrE   c                   V P                  VP                  4      pVP                  '       dO   \        ;QJ d&    R  VP                   4       F  '       g   K   RM	  RM! R  VP                   4       4      '       g   \	        VP
                  4      ^8  Ed   \        VP                  R4      !  p\	        VP
                  4      ^8  d3   \        VP                  V P                  VP
                  4      4      !  pMS\	        VP
                  4      '       d9   \        VP                  V P                  VP
                  ^ ,          4      4      !  pV P                  '       d'   \        VP                  R\        R4       R24      !  pM\        VP                  R4      !  p\	        VP                  4      ^8  d3   \        VP                  V P                  VP                  4      4      !  pM8\        VP                  V P                  VP                  ^ ,          4      4      !  p\        VP                  4       !  p\        VP                  R4      !  pV# )c              3   F   "   T F  q\         P                  8g  x  K  	  R # 5irG   )r   Zero)r  r  s   & rC   r  -PrettyPrinter._print_Order.<locals>.<genexpr>  s     ?JqAFF{Js   !TF; r   r  r  O)rR   rJ   pointanyrL  r   r   r}   rN   r   rb   rc   rA   rJ   re   s   && rC   _print_OrderPrettyPrinter._print_Order  s   DII&JJJ33?DJJ?333?DJJ???t~~"D 12E4>>"Q&"EKKDNN0K$LMT^^$$"EKKDNN1<M0N$OP   "EKK!K4H3I0K$LM"EKK$784::""EKKDJJ0G$HI"EKKDJJqM0J$KLELLN+EJJsO,rE   c                X   V P                   '       d   V P                  VP                  ^ ,          VP                  ^,          ,
          4      pV P                  VP                  ^,          4      p\        R4      p\        VP	                  V4      !  p\        VP	                  R4      !  pWC,          pV# V P                  VP                  ^,          4      pV P                  VP                  ^ ,          VP                  ^,          ,
          4      pV P                  VRRR4      pWC,          # )r   r  r  r   )rN   rR   ra   r   r}   r`   )rA   rX   shiftr   rC  re   s   &&    rC   _print_SingularityFunction(PrettyPrinter._print_SingularityFunction  s    KKq	!&&) 34EAFF1I&Ac?Dtzz%01Dtzz#/DGELAFF1I&AKKq	!&&) 34E??5#sC8D7NrE   c                h    V P                   '       d   \        R ,          MRpV P                  WR7      # )ry  r  rW  r  r  s   && rC   _print_betaPrettyPrinter._print_beta  s-    -1->->->M&)C	##A#;;rE   c                *    R pV P                  WR7      # )zB'rW  rX  r  s   && rC   _print_betaincPrettyPrinter._print_betainc  s    	##A#;;rE   c                *    R pV P                  WR7      # )r0  rW  rX  r  s   && rC   _print_betainc_regularized(PrettyPrinter._print_betainc_regularized  s    	##A#;;rE   c                h    V P                   '       d   \        R ,          MR pV P                  WR7      # rw  rW  r  r  s   && rC   _print_gammaPrettyPrinter._print_gamma  -    .2.?.?.?M'*W	##A#;;rE   c                h    V P                   '       d   \        R ,          MR pV P                  WR7      # r  r  r  s   && rC   _print_uppergammaPrettyPrinter._print_uppergamma  r  rE   c                h    V P                   '       d   \        R ,          MRpV P                  WR7      # )rp  rq  rW  r  r  s   && rC   _print_lowergammaPrettyPrinter._print_lowergamma  s-    .2.?.?.?M'*\	##A#;;rE   c                   V P                   '       Ed;   \        VP                  4      ^8X  d   \        \        R,          4      pV P                  VP                  ^,          4      p\        VP                  4       !  pV P                  VP                  ^ ,          4      p\        VP                  4       !  pW#,          p\        VP                  R4      !  p\        VP                  V4      !  pV# V P                  VP                  ^ ,          4      p\        VP                  4       !  p\        VP                  \        R,          4      !  pV# V P                  V4      # )r  rv  r   )
rN   rL  ra   r   r!   rR   rb   r}   rc   r   )rA   rX   r+  r,  cre   s   &&    rC   _print_DiracDeltaPrettyPrinter._print_DiracDelta
  s    166{a}W56KKq	*
+KKq	*
+"EKK$45"EKKN3KKq	*E/E

=+A BCEL''**rE   c                   V P                  VP                  ^ ,          4      pV P                  '       dJ   \        V4      '       d9   V P	                  \        RV,          4      ! VP                  ^,          4      4      # V P	                  V4      # )r   zE_%sr  r  s   && rC   _print_expintPrettyPrinter._print_expint  sh    KKq	*	!<Y!G!G'')1C(DQVVAY(OPP##A&&rE   c                    \        R 4      p\        V P                  VP                  4      P                  4       !  p\        \        P
                  ! W#4      R\         P                  / pW$n        W4n        V# )ru  r   )	r   r`   ra   rb   r   r   r%  r  r  )rA   rX   r  r  re   s   &&   rC   
_print_ChiPrettyPrinter._print_Chi#  se      &
!8!?!?!AB
&0ooj&MOOOO &%rE   c                H   V P                  VP                  ^ ,          4      p\        VP                  4      ^8X  d   TpM3V P                  VP                  ^,          4      pV P                  W$4      p\	        VP                  4       !  p\	        VP                  R4      !  pV# )r   r  )rR   ra   rL  r%  r   rb   rc   )rA   rX   pforma0re   pforma1s   &&   rC   _print_elliptic_ePrettyPrinter._print_elliptic_e2  sz    ++affQi(qvv;!Ekk!&&),G++G=EELLN+EJJsO,rE   c                    V P                  VP                  ^ ,          4      p\        VP                  4       !  p\        VP	                  R4      !  pV# )r   K)rR   ra   r   rb   rc   rd   s   && rC   _print_elliptic_kPrettyPrinter._print_elliptic_k=  s?    AFF1I&ELLN+EJJsO,rE   c                   V P                  VP                  ^ ,          4      pV P                  VP                  ^,          4      pV P                  W#4      p\        VP	                  4       !  p\        VP                  R4      !  pV# )r   r(  )rR   ra   r%  r   rb   rc   )rA   rX   r  r  re   s   &&   rC   _print_elliptic_fPrettyPrinter._print_elliptic_fC  se    ++affQi(++affQi(''9ELLN+EJJsO,rE   c                P   V P                   '       d   \        R ,          MR pV P                  VP                  ^ ,          4      pV P                  VP                  ^,          4      p\	        VP                  4      ^8X  d   V P                  W44      pMeV P                  VP                  ^,          4      pV P                  WFRR7      p\        VP                  R4      !  p\        VP                  V4      !  p\        VP                  4       !  p\        VP                  V4      !  pV# )PiFr  r  )	rN   r!   rR   ra   rL  r%  r   rc   rb   )rA   rX   ri   r  r  re   pforma2pformas   &&      rC   _print_elliptic_pi PrettyPrinter._print_elliptic_piK  s    &*&7&7&7}T"T++affQi(++affQi(qvv;!++G=Ekk!&&),G,,We,TFT!23FG 45EELLN+EJJt,-rE   c                    V P                   '       d   \        \        R 4      4      # V P                  \	        R4      4      # )phiGoldenRatiorN   r   r   rR   r   rI   s   &&rC   _print_GoldenRatio PrettyPrinter._print_GoldenRatioZ  s2    mE233{{6-011rE   c                    V P                   '       d   \        \        R 4      4      # V P                  \	        R4      4      # )rp  
EulerGammar  rI   s   &&rC   _print_EulerGammaPrettyPrinter._print_EulerGamma_  s2    mG455{{6,/00rE   c                6    V P                  \        R 4      4      # )r4  )rR   r   rI   s   &&rC   _print_CatalanPrettyPrinter._print_Cataland  s    {{6#;''rE   c                   V P                  VP                  ^ ,          4      pVP                  \        P                  8  d   \        VP                  4       !  p\        VP                  R4      !  p\        VP                  V P                  VP                  ^,          4      4      !  p\        P                  Vn        V# )r   z mod )rR   ra   r   r   r(  rb   r}   r   r  s   && rC   
_print_ModPrettyPrinter._print_Modg  s    DIIaL)==:>>)/EEKK01EKKDIIaL(ABC"rE   c                    V P                  WR 7      p. . rTR p\        V4       EF  w  rxVP                  '       dx   VP                  4       '       db   VP	                  RR7      w  rV	R8X  d   \        V
RR/ pM\        V	) .V
O5RR/ pV P                  V4      pVP                  V! W4      4       K  VP                  '       d6   VP                  ^8  d%   VP                  R4       VP                  V4       K  VP                  '       d4   V^ 8  d-   V P                  V) 4      pVP                  V! W4      4       EK  VP                  '       d9   VP                  \        V P                  V4      P                  4       !  4       EKe  VP                  V P                  V4      4       EK  	  V'       d   RpV F   pVf   K	  VP                  4       ^8  g   K    M	  RpV F  pW7,          RrV^ 8  d   V) RrV'       dC   \        \        VP                   4      4      \        \        VP                  4      4      ,          pMV P                  V4      pV'       d	   V! W4      pWV&   K  	  \        P"                  ! V!  # )r+   c                X   V^ 8X  d   V P                  4       ^8  d   RpMRpMRpV P                  \        P                  8  g    V P                  \        P                  8X  d   \        V P                  4       !  pMT p\
        P                  ! W#4      p\        VR\        P                  / # )z'Prepend a minus sign to a pretty form. z- rm  r  r   )r]  r   r   NEGADDr   rb   r   )re   r  	pform_negr  s   &&  rC   pretty_negative1PrettyPrinter._print_Add.<locals>.pretty_negativet  s     z<<>A% $I #I!	
.==JNN2/	-A q9jnn99rE   F)rationalrh  NTr  )_as_ordered_termsr)  is_Mulr  as_coeff_mulr   rR   rq  is_Rationalq	is_Numberis_Relationalr   rb   r]  r=   r  r  )rA   rJ   r+   termspformsr  r&  r6   ro  r  othernegtermre   largenegatives   &&&            rC   
_print_AddPrettyPrinter._print_Addp  s   &&t&9b	:* !'GA{{{t<<>>#00%0@B;!5959G!5&A5A5AGG,oe78!!!dffqjd#q!D1HTE*oe78###j$++d*;*B*B*DEFdkk$/0% (( E$!);   !&5h!8&*UD(&s466{3Js466{4KKE KK-E+E5E!q	   !!6**rE   c           	     d  a ^ RI Ho VP                  pV^ ,          \        P                  J gI   \
        ;QJ d#    R VR,           4       F  '       g   K   RM	  RM! R VR,           4       4      '       d   \        \        V P                  V4      4      pV^ ,          R8H  pV'       d   \        R^ ^ 4      V^ &   \        P                  ! V!  pV'       d3   \        RVP                  ,           VP                  VP                  4      pV# . p. pV P                  R9  d   VP                  4       pM\        VP                  4      p\!        VV3R	 lR
7      pV EF~  pVP"                  '       d   VP$                  '       d   VP&                  P(                  '       d   VP&                  P*                  '       dx   VP&                  R8w  d5   VP-                  \/        VP0                  VP&                  ) RR7      4       K  VP-                  \/        VP0                  VP&                  ) 4      4       K  VP(                  '       d   V\        P2                  Jdq   VP4                  ^8w  d%   VP-                  \7        VP4                  4      4       VP8                  ^8w  d(   VP-                  \7        VP8                  4      4       EKj  EKm  VP-                  V4       EK  	  V U	u. uF  qP                  V	4      NK  	  pp	V U
u. uF  qP                  V
4      NK  	  pp
\;        V4      ^ 8X  d   \        P                  ! V!  # \;        V4      ^ 8X  d/   VP-                  V P                  \        P                  4      4       \        P                  ! V!  \        P                  ! V!  ,          # u up	i u up
i )r   )Quantityc              3   B   "   T F  p\        V\        4      x  K  	  R # 5irG   )r;   r	   )r  r   s   & rC   r  +PrettyPrinter._print_Mul.<locals>.<genexpr>  s     "Ohs:c6#:#:hs   r   TFz-1r;  rm  c                    < \        V S4      ;'       g/    \        V \        4      ;'       d    \        V P                  S4      # rG   )r;   r   rC  )r   r9  s   &rC   r  *PrettyPrinter._print_Mul.<locals>.<lambda>  s;    *Q*A +K +K C(IIZ-I+KrE   r   rg  )oldnoner  )sympy.physics.unitsr9  ra   r   Oner  r:  maprR   r   r*  r.  r   r   r+   as_ordered_factorsr   is_commutativeis_PowrD  r,  is_negativerq  r   rC  r  r  r
   r-  rL  )rA   r  ra   strargsnegoneobjr+  r,  r  aibir9  s   &&         @rC   rj  PrettyPrinter._print_Mul  s   0 ||7aeess"Od2h"Osss"Od2h"OOO3t{{D12G QZ4'F'Q2
$$g.C suucllCKKHJ::_,--/D%D d !K L D"""t{{{txx7K7K7KPTPXPXPdPdPd88r>HHSTXXIFGHHSTXXI67!!!d!**&<66Q;HHhtvv.066Q;HHhtvv.0    ())q[[_q)'()q[[_q) q6Q;%%q))1v{$++aee,.%%q)**<*<a*@@@ *)s   N(>N-c                  a	a
 V P                  V4      pV P                  R ,          '       d   V P                  '       dy   V^8X  dr   VP                  4       ^8X  d]   VP	                  4       ^8X  g%   VP
                  '       d6   VP                  '       d$   \        VP                  \        ^,          4      !  # \        R^4      o	\        R^4      S	,           pV P                  V4      pVP                  4       ^8w  d/   V P                  V4      V P                  ^V,          4      ,          # V^8X  d   RM\        V4      P                  ^4      p\        V4      ^8  d!   R\        V4      ^,
          ,          V,           p\        VR,           V,           4      p^ Vn        VP                  4       ^,
          o
\        RP!                  V	V
3R l\#        S
4       4       4      4      pS
^,
          Vn        \        VP%                  V4      !  p\'        ^VP                  4      Vn        \        \)        R^VP	                  4       ,           4      4      p\        VP+                  V4      !  p\        VP                  V4      !  pV# )r1   r  r  r7  r   r  c              3   |   <"   T F1  pR SV,
          ^,
          ,          S,           R V,          ,           x  K3  	  R# 5i)r   NrQ   )r  r6   _zZ
linelengths   & rC   r  0PrettyPrinter._print_nth_root.<locals>.<genexpr>  s7      (
& a!#$s*SU22&s   9<r  )rR   r<   rN   r]  r   r   r   r   rc   nth_rootr   r=   ljustrL  r   r   r  rK  r}   r   r   r   )rA   rC  r'   bprettyrootsignrprettyrD  diagonalr.  rO  rP  s   &&&      @@rC   _print_nth_rootPrettyPrinter._print_nth_root  s   ++d# NN2338I8I8I	gnn.!3A%___)<)<)<w||HQK899 3la=3&++d#>>q ;;t$dkk!D&&999AIb3w<#5#5a#8s8a<CHqL)H4HcDj834^^%)
dii (
:&(
 
 
 'Nx~~h78  7#3#34tCW]]_!456a()x()rE   c           	     h   ^ RI Hp VP                  4       w  r4VP                  '       Ed   V\        P
                  J d"   \        R4      V P                  V4      ,          # V! V4      w  rVV\        P                  J ds   VP                  '       da   VP                  '       gO   VP                  '       g   VP                  '       d+   V P                  R,          '       d   V P                  W64      # VP                  '       d5   V^ 8  d.   \        R4      V P                  \        W4) RR7      4      ,          # VP                   '       dE   \        V P                  V4      P#                  4       !  P%                  V P                  V4      4      # V P                  V4      V P                  V4      ,          # )r   )fractionr;  r2   Frg  )sympy.simplify.simplifyr[  as_base_exprD  r   NegativeOner   rR   rA  is_Atomr   r,  r   r<   rX  r   r/  rb   __pow__)rA   powerr[  r,  rX   r   r"  s   &&     rC   
_print_PowPrettyPrinter._print_Pow!  s!   4  "AMM!!#t{{1~55A;DAAEEzaiii!---STS^S^S^77++A11}}}Q!#t{{3q"u3M'NNN???t{{1~4467??AOO{{1~t{{1~--rE   c                F    V P                  VP                  ^ ,          4      # r  )rR   ra   rI   s   &&rC   _print_UnevaluatedExpr$PrettyPrinter._print_UnevaluatedExpr3  s    {{499Q<((rE   c                   V^8X  d@   V^ 8  d%   \        \        V4      \         P                  R7      # \        \        V4      4      # \        V4      ^
8  d   \        V4      ^
8  dr   V^ 8  d>   \        \        V4      \         P                  R7      \        \        V4      4      ,          # \        \        V4      4      \        \        V4      4      ,          # R# )r   )r   N)r   r=   r#  abs)rA   r  r-  s   &&&rC   __print_numer_denom!PrettyPrinter.__print_numer_denom6  s    61u!#a&*..AA!#a&))Vr\c!fl1u!#a&*..A*SQRVBTTT
 "#a&)*SV*<<<rE   c                |    V P                  VP                  VP                  4      pVe   V# V P                  V4      # rG   )!_PrettyPrinter__print_numer_denomr  r-  rK   rA   rJ   rP  s   && rC   _print_RationalPrettyPrinter._print_RationalH  s8    ))$&&$&&9M$$T**rE   c                |    V P                  VP                  VP                  4      pVe   V# V P                  V4      # rG   )rl  	numeratordenominatorrK   rm  s   && rC   _print_FractionPrettyPrinter._print_FractionP  s:    ))$..$:J:JKM$$T**rE   c                   \        VP                  4      ^8  dg   \        VP                  4      '       gL   V P                  VP                  ^ ,          4      V P                  \        VP                  4      4      ,          # V P                  '       d   \        R4      MRpV P                  VP                  RRRV,          R R7      # )r   Multiplicationr   Nr   c                 j    V P                   ;'       g!    V P                  ;'       g    V P                  # rG   )is_Unionis_Intersectionis_ProductSetsets   &rC   r  1PrettyPrinter._print_ProductSet.<locals>.<lambda>^  s8    CLL =L =L#&#6#6=L =L:=:K:K=LrE   r  )rL  setsr   rR   rN   r   r`   )rA   r  	prod_chars   && rC   _print_ProductSetPrettyPrinter._print_ProductSetX  s    qvv;!K$7$7;;qvvay)T[[QVV-EEE9=9J9J9J$45PSI??1664v	7I1L # M MrE   c                `    \        VP                  \        R 7      pV P                  VRRR4      # )r   r	  }r  )r   ra   r   r`   )rA   r.  r  s   && rC   _print_FiniteSetPrettyPrinter._print_FiniteSeta  s(    qvv#34uc366rE   c                   V P                   '       d   \        R 4      pMRpVP                  P                  '       dI   VP                  P                  '       d-   VP
                  P                  '       d	   VR^ ^V3pMV^^ RV3pMVP                  P                  '       d%   W!R,          VP
                  ,
          VR,          3pMVP                  P                  '       d$   \        V4      p\        V4      \        V4      V3pME\        V4      ^8  d+   \        V4      p\        V4      \        V4      W!R,          3pM\        V4      pV P                  VRRR4      # )Dots...r	  r  r  r  )rN   r   startis_infinitestopstepis_positiveiterr   rL  r=  r`   )rA   r.  dotsprintsetits   &&   rC   _print_RangePrettyPrinter._print_Rangee  s   v&DD77166#5#5#5vv!!!Q4/Ar4/WW   rUQVV^QrU2HVVaBBxb4/HVaZaBBxb426HQxHxc499rE   c                "   VP                   VP                  8X  d%   V P                  VP                  R ,          RR4      # VP                  '       d   RpMRpVP
                  '       d   RpMRpV P                  VP                  R,          W#4      # ):Nr   Nr	  r  rw   r  rx   r  Nr  N)r  endr`   ra   	left_open
right_openrA   r6   rc   r}   s   &&  rC   _print_IntervalPrettyPrinter._print_Interval~  sn    77aee??166":sC88 {{{|||??166":t;;rE   c                P    R pRpV P                  VP                  R,          W#4      # )r  r  r  r`   ra   r  s   &&  rC   _print_AccumulationBounds'PrettyPrinter._print_AccumulationBounds  s%    qvvbz477rE   c                j    R \        RR4      ,          pV P                  VP                  RRVR R7      # )r   Intersectionr   Nc                 j    V P                   ;'       g!    V P                  ;'       g    V P                  # rG   )rz  rx  is_Complementr{  s   &rC   r  3PrettyPrinter._print_Intersection.<locals>.<lambda>  s8    8I8I 9A 9A"||9A 9A/2/@/@9ArE   r  r   r`   ra   rA   rR  r  s   && rC   _print_Intersection!PrettyPrinter._print_Intersection  s=    [==	qvvtT9-A  B 	BrE   c                j    R \        RR4      ,          pV P                  VP                  RRVR R7      # )r   Unionr"   Nc                 j    V P                   ;'       g!    V P                  ;'       g    V P                  # rG   )rz  ry  r  r{  s   &rC   r  ,PrettyPrinter._print_Union.<locals>.<lambda>  s:    8I8I 9H 9H"229H 9H696G6G9HrE   r  r  )rA   rR  union_delimiters   && rC   _print_UnionPrettyPrinter._print_Union  s=     ;w#<<qvvtT?-H  I 	IrE   c                    V P                   '       g   \        R 4      hR\        R4      ,          pV P                  VP                  RRV4      # )z?ASCII pretty printing of SymmetricDifference is not implementedr   SymmetricDifferenceN)rN   r  r   r`   ra   )rA   rR  sym_delimeters   && rC   _print_SymmetricDifference(PrettyPrinter._print_SymmetricDifference  sC       %&ghh-B!CCqvvtT=AArE   c                H    R pV P                  VP                  RRVR R7      # )z \ Nc                 j    V P                   ;'       g!    V P                  ;'       g    V P                  # rG   )rz  ry  rx  r{  s   &rC   r  1PrettyPrinter._print_Complement.<locals>.<lambda>  s2    c&7&7 '/ '/3;N;N '/ '/"%,,'/rE   r  r  r  s   && rC   _print_ComplementPrettyPrinter._print_Complement  s.    	qvvtT9/  0 	0rE   c           	     6  a V P                   '       d   \        R 4      oMRoVP                  pVP                  pVP                  pV P                  VP                  4      p\        V4      ^8X  d;   V P                  V^ ,          SV^ ,          3RR7      pV P                  WVRRRRR7      # \        ;QJ d     . V3R l\        WC4       4       F  NK  	  5M! V3R l\        WC4       4       4      pV P                  VR	R R
R7      pV P                  WVRRRRR7      # )SmallElementOfinr   r  r	  r  Trc   r}   r  r  c              3   H   <"   T F  w  rVR SR VR3 F  q3x  K  	  K  	  R# 5i)r   r  NrQ   )r  r  setvr9   inns   &   rC   r  0PrettyPrinter._print_ImageSet.<locals>.<genexpr>  s6      <-A	S#tT: GH!: -As   "Nr7  r  )rN   r   rb  	base_setsr  rR   rJ   rL  r`   r%  r=  rM  )	rA   tsfunr~  r  rJ   r   pargsr  s	   &&      @rC   _print_ImageSetPrettyPrinter._print_ImageSet  s   ./CChh||MM	{{388$ y>Q1sDG <*-   /A**4033:># + O O E <S-A <EE <S-A < <Ecr
b9A**4033:># + O OrE   c           	        V P                   '       d   \        R 4      p\        R4      pMRpRpV P                  \        VP                  4      4      p\        VP                  RR4      pVe+   V P                  VP                  P                  4       4      pMUV P                  VP                  4      pV P                   '       d)   V P                  V4      p\        VP                  4       !  pVP                  \        P                  J d   V P                  WFRRRR	R
7      # V P                  VP                  4      pV P                  WBWsV3R	R7      pV P                  WHRRRR	R
7      # )r  r   r  andas_exprNr	  r  Tr   r  r  )rN   r   r`   r   r,  getattr	conditionrR   r  r   rb   base_setr   UniversalSetr%  )	rA   r  r  _andr   r  r
  rC  r  s	   &&       rC   _print_ConditionSet!PrettyPrinter._print_ConditionSet  s@   ./C u%DCDOOE"&&M2	",,	48;;r||3356D;;r||,D   {{4(!4;;=1;;!..(**914T58 + : : {{2;;'OOYT>&)  +&&y#S6:c ' K 	KrE   c           	     :   V P                   '       d   \        R 4      pMRpV P                  VP                  4      pV P	                  VP
                  4      pV P	                  VP                  4      pV P                  W2V3RR7      pV P                  WFRRRRR7      # )r  r  r   r  r	  r  Tr  )rN   r   r`   r   rR   rJ   r~  r%  )rA   r  r  r   rJ   prodsetsr  s   &&     rC   _print_ComplexRegion"PrettyPrinter._print_ComplexRegion  s    ./CCOOBLL1	{{277#;;rww'OOYX6&)  +&&tS6:c ' K 	KrE   c           	        VP                   w  r#V P                  '       dN   R \        R4       R 2p\        \        P
                  ! V P                  V4      W@P                  V4      4      R^/ # \        \        V4      4      # )r   	ElementOfr   )ra   rN   r   r   r   r   rR   r   )rA   rX   r  r|  els   &&   rC   _print_ContainsPrettyPrinter._print_Contains  sy    66[-.a0Bzt{{3/?/1;;s3C E QNOQ Q d1g&&rE   c                   VP                   P                  \        P                  J dD   VP                  P                  \        P                  J d   V P                  VP                  4      # V P                  '       d   \        R 4      pMRpV P                  VP                  4       4      V P                  V4      ,           # )r  r  )r8  formular   r  bnrR   a0rN   r   r6  truncate)rA   r.  r  s   && rC   _print_FourierSeries"PrettyPrinter._print_FourierSeries	  sz    44<<166!addllaff&<;;qtt$$v&DDqzz|,t{{4/@@@rE   c                8    V P                  VP                  4      # rG   )r6  infiniterA   r.  s   &&rC   _print_FormalPowerSeries&PrettyPrinter._print_FormalPowerSeries	  s    qzz**rE   c                    \        V P                  VP                  4      P                  4       !  pV P                  \	        R 4      4      p\        VP                  V4      !  # )SetExpr)r   rR   r|  rb   r   r}   )rA   se
pretty_setpretty_names   &&  rC   _print_SetExprPrettyPrinter._print_SetExpr	  sK    RVV!4!;!;!=>
kk&"34;,,Z899rE   c                   V P                   '       d   \        R 4      pMRp\        VP                  P                  4      ^ 8  g%   \        VP
                  P                  4      ^ 8  d   \        R4      hVP                  \        P                  J de   VP
                  pW!P                  V^,
          4      VP                  V^,
          4      VP                  V^,
          4      VP                  V4      3pM`VP
                  \        P                  J g   VP                  ^8  d'   VR,          pVP                  V4       \        V4      pM\        V4      pV P                  V4      # )r  r  z@Pretty printing of sequences with symbolic bound not implemented:N   N)rN   r   rL  r  free_symbolsr  r  r   r  r  r  lengthrq  r=  _print_list)rA   r.  r  r  r  s   &&   rC   _print_SeqFormulaPrettyPrinter._print_SeqFormula	  s   v&DDqww##$q(C0C0C,Dq,H%&hii77a(((66DggdQh/1Bq!1774=2HVVqzz!QXX\uHOOD!XHQxH))rE   c                    R # FrQ   r  s   &rC   r  PrettyPrinter.<lambda>3	  s    5rE   c                n   . pV Fc  pV P                  V4      p	V! V4      '       d   \        V	P                  4       !  p	V'       d   VP                  V4       VP                  V	4       Ke  	  V'       g   \	        R 4      p
M\        \        P
                  ! V!  !  p
\        V
P                  W#VR7      !  p
V
# )r7  r  )rR   r   rb   rq  r   r   )rA   seqrc   r}   r  r  r  r1  r  re   r.  s   &&&&&&&    rC   r`   PrettyPrinter._print_seq2	  s     DKK%ED!!"ELLN3i(MM%   2AJOOV45A^LMrE   c                    R pV F;  pVf   TpK  \        VP                  V4      !  p\        VP                  V4      !  pK=  	  Vf   \        R4      # V# )Nr7  )r   r}   )rA   r  ra   re   r   s   &&&  rC   r  PrettyPrinter.joinF	  sW    C}"EKK	$:;"EKK$45  =b>!LrE   c                (    V P                  VR R4      # ra  r`   )rA   r   s   &&rC   r  PrettyPrinter._print_listU	  s    q#s++rE   c                    \        V4      ^8X  dP   \        \        P                  ! V P	                  V^ ,          4      R4      !  p\        VP                  RRRR7      !  # V P                  VRR4      # )r   r8  rw   rx   Tr  )rL  r   r   r   rR   rb   r`   )rA   r.  ptuples   && rC   _print_tuplePrettyPrinter._print_tupleX	  s\    q6Q;QqT1BC!HIFv}}S#d}KLL??1c3//rE   c                $    V P                  V4      # rG   )r  rI   s   &&rC   _print_TuplePrettyPrinter._print_Tuple_	  s      &&rE   c                ,   \        VP                  4       \        R 7      p. pV F[  pV P                  V4      pV P                  W,          4      p\	        \
        P                  ! VRV4      !  pVP                  V4       K]  	  V P                  VRR4      # )r   z: r	  r  )	r   keysr   rR   r   r   r   rq  r`   )rA   r"  r  r  r   r  Vr.  s   &&      rC   _print_dictPrettyPrinter._print_dictb	  sx    affh$45AAAAD!AJOOAtQ78ALLO  uc3//rE   c                $    V P                  V4      # rG   )r
  )rA   r"  s   &&rC   _print_DictPrettyPrinter._print_Dicto	  s    ""rE   c                    V'       g   \        R 4      # \        V\        R7      pV P                  V4      p\        VP	                  RRRR7      !  pV# )zset()r   r	  r  Tr  )r   r   r   r`   rb   rA   r.  r  prettys   &&  rC   
_print_setPrettyPrinter._print_setr	  sI    g&&q./'V]]3D]IJrE   c                >   V'       g   \        R 4      # \        V\        R7      pV P                  V4      p\        VP	                  RRRR7      !  p\        VP	                  RRRR7      !  p\        \
        P                  ! \        V4      P                  V4      !  pV# )zfrozenset()r   r	  r  Tr  rw   rx   )	r   r   r   r`   rb   r   r   typer   r  s   &&  rC   _print_frozensetPrettyPrinter._print_frozensetz	  s    m,,q./'V]]3D]IJV]]3D]IJZ__T!W-=-=vFGrE   c                d    V P                   '       d   \        \        R 4      4      # \        R4      # )Universer  r1  r  s   &&rC   _print_UniversalSet!PrettyPrinter._print_UniversalSet	  s)    k*566n--rE   c                *    \        \        V4      4      # rG   r   r   )rA   rings   &&rC   _print_PolyRingPrettyPrinter._print_PolyRing	      $t*%%rE   c                *    \        \        V4      4      # rG   r  )rA   fields   &&rC   _print_FracFieldPrettyPrinter._print_FracField	  s    $u+&&rE   c                *    \        \        V4      4      # rG   rH   )rA   elms   &&rC   _print_FreeGroupElement%PrettyPrinter._print_FreeGroupElement	  s    #c(##rE   c                *    \        \        V4      4      # rG   r  )rA   polys   &&rC   _print_PolyElement PrettyPrinter._print_PolyElement	  r!  rE   c                *    \        \        V4      4      # rG   r  )rA   fracs   &&rC   _print_FracElement PrettyPrinter._print_FracElement	  r!  rE   c                    VP                   '       d.   V P                  VP                  4       P                  4       4      # V P                  VP                  4       4      # rG   )
is_aliasedrR   as_polyr  rI   s   &&rC   _print_AlgebraicNumber$PrettyPrinter._print_AlgebraicNumber	  s>    ???;;t||~55788;;t||~..rE   c                    V P                  VP                  R R7      VP                  .p\        V P	                  V4      P                  4       !  p\        VP                  R4      !  pV# )lexr!  CRootOf)r6  rJ   r  r   r`   rb   rc   rA   rJ   ra   re   s   &&  rC   _print_ComplexRootOf"PrettyPrinter._print_ComplexRootOf	  sU    		7DDOOD188:;EJJy12rE   c                N   V P                  VP                  R R7      .pVP                  \        P                  Jd+   VP                  V P                  VP                  4      4       \        V P                  V4      P                  4       !  p\        VP                  R4      !  pV# )r8  r!  RootSum)r6  rJ   r  r   IdentityFunctionrq  rR   r   r`   rb   rc   r:  s   &&  rC   _print_RootSumPrettyPrinter._print_RootSum	  sz    		78881---KKDHH-.DOOD188:;EJJy12rE   c                    V P                   '       d   \        R 4       R2pMRp\        \        W!P                  ,          4      4      # )Integersz_%dzGF(%d))rN   r   r   r   mod)rA   rJ   forms   && rC   _print_FiniteField PrettyPrinter._print_FiniteField	  s;    !*-.c2DD-xx899rE   c                d    V P                   '       d   \        \        R 4      4      # \        R4      # )rC  ZZr1  rI   s   &&rC   _print_IntegerRing PrettyPrinter._print_IntegerRing	  s)    k*566d##rE   c                d    V P                   '       d   \        \        R 4      4      # \        R4      # )	RationalsQQr1  rI   s   &&rC   _print_RationalField"PrettyPrinter._print_RationalField	  s)    k+677d##rE   c                    V P                   '       d   \        R 4      pMRpVP                  '       d   \        V4      # V P	                  \        VR,           \        VP                  4      ,           4      4      # )RealsRRr  rN   r   has_default_precisionr   rR   r   r=   	precisionrA   domainprefixs   && rC   _print_RealFieldPrettyPrinter._print_RealField	  s\     )FF'''f%%;;}Vc\C@P@P<Q-QRSSrE   c                    V P                   '       d   \        R 4      pMRpVP                  '       d   \        V4      # V P	                  \        VR,           \        VP                  4      ,           4      4      # )	ComplexesCCr  rT  rW  s   && rC   _print_ComplexField!PrettyPrinter._print_ComplexField	  s\     -FF'''f%%;;}Vc\C@P@P<Q-QRSSrE   c                   \        VP                  4      pVP                  P                  '       gL   \	        \	        R 4      P                  V P                  VP                  4      4      !  pVP                  V4       V P                  VRR4      p\	        VP                  V P                  VP                  4      4      !  pV# order=r  r  r:  symbolsr+   
is_defaultr   r}   rR   rq  r`   rc   rX  rA   rJ   ra   r+   re   s   &&   rC   _print_PolynomialRing#PrettyPrinter._print_PolynomialRing	      DLL!zz$$$
8 4 : :4;;tzz;R STEKKc3/EJJt{{4;;'?@ArE   c                   \        VP                  4      pVP                  P                  '       gL   \	        \	        R 4      P                  V P                  VP                  4      4      !  pVP                  V4       V P                  VRR4      p\	        VP                  V P                  VP                  4      4      !  pV# )rc  rw   rx   rd  rg  s   &&   rC   _print_FractionField"PrettyPrinter._print_FractionField	  rj  rE   c                H   VP                   p\        VP                  4      \        VP                  4      8w  d%   VR \        VP                  4      ,           3,           pV P	                  VRR4      p\        VP                  V P                  VP                  4      4      !  pV# rb  )	re  r=   r+   default_orderr`   r   rc   rR   rX  )rA   rJ   gre   s   &&  rC   _print_PolynomialRingBase'PrettyPrinter._print_PolynomialRingBase	  sw    LLtzz?c$"4"455XDJJ/11A3,EJJt{{4;;'?@ArE   c                   VP                    Uu. uF  pV P                  W!P                  R 7      NK!  	  pp\        V P	                  RV4      P                  RRR7      !  pVP                   Uu. uF  q@P                  V4      NK  	  pp\        \        R4      P                  V P                  VP                  4      4      !  p\        \        R4      P                  V P                  VP                  4      4      !  pV P	                  RV.V,           Wg.,           4      p\        VP                  4       !  p\        VP                  VP                  P                  4      !  pV# u upi u upi )r!  r  r  r  r  zdomain=rc  )exprsr6  r+   r   r  rb   gensrR   r}   rX  rc   r   r   )	rA   basisr   rt  genru  rX  r+   re   s	   &&       rC   _print_GroebnerBasis"PrettyPrinter._print_GroebnerBasis	  s*   "[[+(c //#[[/9( 	 +DIIdE299s#9NO-2ZZ9ZcS!Z9	"((U\\)BCE!''EKK(@AC 		$$& @AELLN+EJJu'?'?@A!+ :s   %E$.E)c                   V P                  VP                  4      p\        VP                  4       !  pVP	                  4       ^8  d   VP	                  4       M^p\        \        RV4      VP                  R7      p\        VP                  V4      !  pVP                  pVP	                  4       ^,
          Vn        \        TP                  T P                  \        VP                  VP                  4       Uu. uFN  pV P                  V P                  V^ ,          4      \        R4      V P                  V^,          4      3RR7      NKP  	  up4      4      !  pWRn        V# u upi )r   r  r   r  r7  r  )rR   rJ   r   rb   r]  r   r   r   r}   r`   rM  r   r  r   )rA   rX   re   rc  rvertr,  r  s   &&     rC   _print_SubsPrettyPrinter._print_Subs
  s   AFF#ELLN+#llnq0ELLNa4Q<%..AEKK./NN!+EKK'*1;;'@9C'@! OOT[[1.T
DKK!<MN  '@9C )D E F 9Cs   8AE!c                   \        V4      pV P                  VP                  ^ ,          4      p\        RVP                  4       ,          4      p\        VP	                  V4      !  p\        VP                  V4      !  p\        VP                  4      ^8X  d   V# VP                  w  rgTp\        V P                  V.4      P                  4       !  p	\        \        P                  ! W4      R\         P                  / pWn        Wn        V# )r   r   r   )r   rR   ra   r   r&  r}   rL  r`   rb   r   r   r%  r  r  )
rA   rX   ri   re   r   r   r  r   r  r  s
   &&&       rC   _print_number_function$PrettyPrinter._print_number_function
  s     4 kk!&&)$s399;/		 45	EKK	23qvv;!Lvv
!!5!<!<!>?
&0ooj&MOOOO%%rE   c                &    V P                  VR 4      # )r  r  rW   s   &&rC   _print_eulerPrettyPrinter._print_euler3
      **1c22rE   c                &    V P                  VR 4      # )r  r  rW   s   &&rC   _print_catalanPrettyPrinter._print_catalan6
  r  rE   c                &    V P                  VR 4      # )r  r  rW   s   &&rC   _print_bernoulliPrettyPrinter._print_bernoulli9
  r  rE   c                &    V P                  VR 4      # )Lr  rW   s   &&rC   _print_lucasPrettyPrinter._print_lucas>
  r  rE   c                &    V P                  VR 4      # )r(  r  rW   s   &&rC   _print_fibonacciPrettyPrinter._print_fibonacciA
  r  rE   c                &    V P                  VR 4      # )r	  r  rW   s   &&rC   _print_tribonacciPrettyPrinter._print_tribonacciD
  r  rE   c                    V P                   '       d   V P                  V\        R ,          4      # V P                  VR4      # )rp  	stieltjes)rN   r  r!   rW   s   &&rC   _print_stieltjesPrettyPrinter._print_stieltjesG
  s9    ..q-2HII..q+>>rE   c                d   V P                  VP                  ^ ,          4      p\        VP                  \        R4      4      !  p\        VP                  V P                  VP                  ^,          4      4      !  pV P                  '       d   \        \        R4      4      pM\        R4      pTp\        VP                  RVP                  4       ,          4      !  p\        VP                  RVP                  4       ,          4      !  p\        VP                  V4      R\        P                  / # )r   r8  rv  r"  r   r   )rR   ra   r   r}   rN   r   r   rc   r   r&  POW)rA   rX   re   r+  r,  r  r  s   &&     rC   _print_KroneckerDelta#PrettyPrinter._print_KroneckerDeltaM
  s    AFF1I&EKK
389EKKAFF1I(>?@=12A3A!&&QWWY/0!''#aggi-01399S>B*..BBrE   c                   \        VR 4      '       dI   V P                  R4      p\        VP                  V P                  VP	                  4       4      4      !  pV# \        VR4      '       d   V P                  R4      p\        VP                  V P                  VP
                  4      4      !  p\        VP                  V P                  R4      4      !  p\        VP                  V P                  VP                  4      4      !  pV# \        VR4      '       dE   V P                  R4      p\        VP                  V P                  VP
                  4      4      !  pV# V P                  R4      # )
as_booleanzDomain: r|  z in re  z
Domain on N)rh  rR   r   r}   r  re  r|  )rA   r"  re   s   && rC   _print_RandomDomain!PrettyPrinter._print_RandomDomainZ
  s   1l##KK
+EDKK,G HIELQKK
+EDKK		,B CDEDKK,? @AEDKK,> ?@ELQ	""KK-EDKK		,B CDEL;;t$$rE   c                     VP                   e+   V P                  VP                   P                  V4      4      #  V P                  \	        V4      4      #   \         d     L'i ; irG   )r  rR   to_sympyr   reprrA   r  s   &&rC   
_print_DMPPrettyPrinter._print_DMPl
  s[    	vv!{{166??1#566 "
 {{47##  		s   7A A#"A#c                $    V P                  V4      # rG   )r  r  s   &&rC   
_print_DMFPrettyPrinter._print_DMFu
  s    q!!rE   c                J    V P                  \        VP                  4      4      # rG   rR   r   ri   )rA   objects   &&rC   _print_ObjectPrettyPrinter._print_Objectx
  s    {{=566rE   c                    \        R 4      pV P                  VP                  4      pV P                  VP                  4      pVP	                  W$4      ^ ,          p\        V4      # )z-->)r   rR   rX  codomainr}   r   )rA   morphismr  rX  r  tails   &&    rC   _print_MorphismPrettyPrinter._print_Morphism{
  sO    UX__-;;x001||E,Q/$rE   c                    V P                  \        VP                  4      4      pV P                  V4      p\	        VP                  R V4      ^ ,          4      # )r  )rR   r   ri   r  r   r}   )rA   r  r  pretty_morphisms   &&  rC   _print_NamedMorphism"PrettyPrinter._print_NamedMorphism
  sF    kk-">?..x8+++CA!DEErE   c                h    ^ RI Hp V P                  V! VP                  VP                  R4      4      # )r   )NamedMorphismid)sympy.categoriesr  r  rX  r  )rA   r  r  s   && rC   _print_IdentityMorphism%PrettyPrinter._print_IdentityMorphism
  s0    2(((//8+<+<dCE 	ErE   c                T   \        R 4      pVP                   Uu. uF  p\        VP                  4      NK  	  ppVP	                  4        VP                  V4      R,           pV P                  V4      pV P                  V4      p\        VP                  V4      ^ ,          4      # u upi )rS  r  )
r   r  r   ri   reverser  rR   r  r   r}   )rA   r  circle	componentcomponent_names_listcomponent_namesr  r  s   &&      rC   _print_CompositeMorphism&PrettyPrinter._print_CompositeMorphism
  s    c
 .6-@-@ B-@	 !.inn =-@ 	  B$$& ++&:;cAkk/2..x8+++O<Q?@@ Bs   B%c                J    V P                  \        VP                  4      4      # rG   r  )rA   categorys   &&rC   _print_CategoryPrettyPrinter._print_Category
  s    {{=788rE   c                l   VP                   '       g    V P                  \        P                  4      # V P                  VP                   4      pVP                  '       dF   R \        R4      ,          pV P                  VP                  4      ^ ,          pVP                  W44      p\        V^ ,          4      # )r   z==>)premisesrR   r   EmptySetconclusionsr   r}   r   )rA   diagrampretty_resultresults_arrowpretty_conclusionss   &&   rC   _print_DiagramPrettyPrinter._print_Diagram
  s    ;;qzz**G$4$45"T%[0M!%W-@-@!A!!D)//3M -*++rE   c                ,   ^ RI Hp T! \        VP                  4       UUu. uFK  p\        VP                  4       Uu. uF(  pWV3,          '       d   WV3,          M
\        R4      NK*  	  upNKM  	  upp4      pV P                  V4      # u upi u uppi )r   )Matrixr   )r  r  rK  r]  r   r   r  )rA   gridr  r6   r9   matrixs   &&    rC   _print_DiagramGrid PrettyPrinter._print_DiagramGrid
  s    )"'"46"4Q $)#46#4a )-T

$!t*sC#46"46 7 **6226 6s   B
.B+B
B
c                (    V P                  VR R4      # ra  r  rA   r  s   &&rC   _print_FreeModuleElement&PrettyPrinter._print_FreeModuleElement
  s    q#s++rE   c           
         VP                    UUu. uF,  q" Uu. uF  q1P                  P                  V4      NK  	  upNK.  	  pppV P                  VR R4      # u upi u uppi r  r  )ru  r  r  r`   )rA   r  rw  rp  ru  s   &&   rC   _print_SubModulePrettyPrinter._print_SubModule
  sO    =>VVDVcS1S#S1VDtS#.. 2Ds   A#AAAc                x    V P                  VP                  4      V P                  VP                  4      ,          # rG   )rR   r  r  rA   r  s   &&rC   _print_FreeModulePrettyPrinter._print_FreeModule
  s'    {{166"DKK$777rE   c                    VP                   P                  pT P                  VP                  P                   Uu. uF  w  q2! V4      NK  	  upR R4      # u upi r  )r  r  r`   _moduleru  )rA   r  r,  r   s   &&  rC   _print_ModuleImplementedIdeal+PrettyPrinter._print_ModuleImplementedIdeal
  sB    ffoo!))..A.3AA.A3LLAs   Ac                x    V P                  VP                  4      V P                  VP                  4      ,          # rG   )rR   r  
base_idealrA   Rs   &&rC   _print_QuotientRing!PrettyPrinter._print_QuotientRing
  s'    {{166"T[[%>>>rE   c                    V P                  VP                  P                  V4      4      V P                  VP                  P                  4      ,           # rG   )rR   r  r  r  r  s   &&rC   _print_QuotientRingElement(PrettyPrinter._print_QuotientRingElement
  s6    {{166??1-.QVV=N=N1OOOrE   c                    V P                  VP                  4      V P                  VP                  P                  4      ,           # rG   )rR   datamodulekilled_moduler  s   &&rC   _print_QuotientModuleElement*PrettyPrinter._print_QuotientModuleElement
  s-    {{166"T[[1G1G%HHHrE   c                x    V P                  VP                  4      V P                  VP                  4      ,          # rG   )rR   rC  r  r  s   &&rC   _print_QuotientModule#PrettyPrinter._print_QuotientModule
  s'    {{166"T[[%AAArE   c                8   V P                  VP                  4       4      pVP                  4       ^,          Vn        \	        VP                  RV P                  VP                  4      R\        R^4      ,          V P                  VP                  4      4      !  pV# )r  z : z %s> rm  )	rR   _sympy_matrixr]  r   r   r}   rX  r   r  )rA   rc  r  re   s   &&  rC   _print_MatrixHomomorphism'PrettyPrinter._print_MatrixHomomorphism
  sq    Q__./ --/Q.FLLAHH0Ed3l"DKK

$;= >rE   c                8    V P                  VP                  4      # rG   rR   ri   )rA   manifolds   &&rC   _print_ManifoldPrettyPrinter._print_Manifold
  s    {{8==))rE   c                8    V P                  VP                  4      # rG   r  )rA   patchs   &&rC   _print_PatchPrettyPrinter._print_Patch
  s    {{5::&&rE   c                8    V P                  VP                  4      # rG   r  )rA   coordss   &&rC   _print_CoordSystem PrettyPrinter._print_CoordSystem
  s    {{6;;''rE   c                    VP                   P                  VP                  ,          P                  pV P	                  \        V4      4      # rG   )
_coord_sysre  _indexri   rR   r   )rA   r#  strings   && rC   _print_BaseScalarField$PrettyPrinter._print_BaseScalarField
  s6    !!))%,,7<<{{=011rE   c                    \        R 4      R,           VP                  P                  VP                  ,          P                  ,           pV P                  \        V4      4      # )r!  r  )r"   r  re  r  ri   rR   r   )rA   r#  r.  s   && rC   _print_BaseVectorField$PrettyPrinter._print_BaseVectorField
  sF    $%+e.>.>.F.Fu||.T.Y.YY{{=+,,rE   c                   V P                   '       d   \        R 4      pMRpVP                  p\        VR4      '       dZ   VP                  P
                  VP                  ,          P                  pV P                  VR,           \        V4      ,           4      # V P                  V4      p\        VP                  4       !  p\        VP                  V4      !  # )Differentialr"  r  r   )rN   r   _form_fieldrh  r  re  r  ri   rR   r   r   rb   rc   )rA   r6  r"  r#  r  re   s   &&    rC   _print_Differential!PrettyPrinter._print_Differential
  s    N+AA  5,''%%--ell;@@F;;q3wv)>>??KK&E/Euzz!}--rE   c                    V P                  VP                  ^ ,          4      p\        VP                  RVP                  P
                  ,          4      !  p\        VP                  R4      !  pV# )r   z%s(rx   )rR   ra   r   rc   r   r   r}   )rA   r  re   s   && rC   	_print_TrPrettyPrinter._print_Tr
  sR    AFF1I&EJJu0D0D'EFGEKK,-rE   c                   V P                  VP                  ^ ,          4      p\        VP                  4       !  pV P                  '       d&   \        VP                  \        R,          4      !  pV# \        VP                  R4      !  pV# )r   nurR   ra   r   rb   rN   rc   r!   rd   s   && rC   _print_primenuPrettyPrinter._print_primenu
  sm    AFF1I&ELLN+

=+> ?@E  

4 01ErE   c                   V P                  VP                  ^ ,          4      p\        VP                  4       !  pV P                  '       d&   \        VP                  \        R,          4      !  pV# \        VP                  R4      !  pV# )r   Omegar"  rd   s   && rC   _print_primeomegaPrettyPrinter._print_primeomega  sm    AFF1I&ELLN+

=+A BCE  

7 34ErE   c                    VP                   P                   R 8X  dK   V P                  '       d   V P                  \        R4      4      pV# V P                  \	        ^4      4      pV# V P                  V4      # )degreeDegree)ri   rN   rR   r   chrrK   rd   s   && rC   _print_QuantityPrettyPrinter._print_Quantity  sb    66;;("   K$9: L CH-L$$Q''rE   c                   \        R \        VP                  4      ,           R ,           4      pV P                  VP                  4      pV P                  VP
                  4      p\        \        P                  ! W2V4      !  pV# )r   )r   r   r   rR   r   r   r   r   r   s   &&    rC   _print_AssignmentBase#PrettyPrinter._print_AssignmentBase  s\    d144j(3./KKKKJOOA156rE   c                8    V P                  VP                  4      # rG   r  r  s   &&rC   
_print_StrPrettyPrinter._print_Str#  s    {{166""rE   rQ   rG   r  )Tra  )NNr7  F)FNrw   rx   )FNr  Frw   rx   )r   
__module____qualname____firstlineno____doc__printmethod_default_settingsr:   rK   propertyrN   rT   rY   r\   rf   rl   _print_RandomSymbolrp   rt   r   r   r   r   r   r   r   _print_Infinity_print_NegativeInfinity_print_EmptySet_print_Naturals_print_Naturals0_print_Integers_print_Rationals_print_Complexes_print_EmptySequencer   r   r   r   r   r   r   r   r   r   r   r   r  r   r   r  r  r  r  r1  rB  rV  rj  r  rp  r  r  r  r  r  r  r  r  r  r  r
  r  r  r  r,  r2  r7  r<  r@  rE  rP  rX  r^  rd  rl  ro  rv  ry  r}  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r%  r1  rG  rL  rO  r   rY  r^  ra  re  rS  rl  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  r  r   r  r  r  r  r  r  r  r6  rj  rX  rb  re  rl  rn  rs  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  _print_SeqPer_print_SeqAdd_print_SeqMulr`   r  r  r  r  r
  r  r  r  r  r  r$  r(  r,  r0  r5  r;  r@  rF  rJ  rO  rZ  r_  rh  rl  rq  rx  r|  r  r  r  r  _print_bellr  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  r  r  r#  r'  r-  r0  r3  __static_attributes____classdictcell__)__classdict__s   @rC   r)   r)      s    IK 	VtTtG#t~% ( (:
  (S8

( "O)!O!O"!O""&7 +"*66666+6E
++#J&",JIV4l
(_B8AF
ISS*6%
")###)	Y, H
8)0""&H$'d=L%B @B !F;
F) @6p34.`Rh.4s6677#JW % %4''<<@6677886886K[*<<<<<<+&'	2
1
(F+P:Az*X.$)$++M7:2<"8BIB0O:K>K'A+:
** &M%M%M#'tt((,0'0#.&'$&&/	:$$	T	T

&"(333 #K333?C%$$"7 F
E
A9,3,/8M?PIB*'(2-.(# #rE   r)   c                    \        V4      pVP                  R,          p\        V4      p VP                  V 4      \        V4       #   \        T4       i ; i)z{Returns a string containing the prettified form of expr.

For information on keyword arguments see pretty_print function.

r.   )r)   r<   r    rT   )rJ   rB   r@  r.   uflags   &,   rC   r  r  '  sK     
x	 B ,,}-K{+E"zz$5!5!s   A Ac                0    \        \        V 3/ VB 4       R# )a^  Prints expr in pretty form.

pprint is just a shortcut for this function.

Parameters
==========

expr : expression
    The expression to print.

wrap_line : bool, optional (default=True)
    Line wrapping enabled/disabled.

num_columns : int or None, optional (default=None)
    Number of columns before line breaking (default to None which reads
    the terminal width), useful when using SymPy without terminal.

use_unicode : bool or None, optional (default=None)
    Use unicode characters, such as the Greek letter pi instead of
    the string pi.

full_prec : bool or string, optional (default="auto")
    Use full precision.

order : bool or string, optional (default=None)
    Set to 'none' for long expressions if slow; default is None.

use_unicode_sqrt_char : bool, optional (default=True)
    Use compact single-character square root symbol (when unambiguous).

root_notation : bool, optional (default=True)
    Set to 'False' for printing exponents of the form 1/n in fractional form.
    By default exponent is printed in root form.

mat_symbol_style : string, optional (default="plain")
    Set to "bold" for printing MatrixSymbols using a bold mathematical symbol face.
    By default the standard face is used.

imaginary_unit : string, optional (default="i")
    Letter to use for imaginary unit when use_unicode is True.
    Can be "i" (default) or "j".
N)printr  )rJ   kwargss   &,rC   pretty_printrR  :  s    V 
&
 
 !rE   c                    ^ RI Hp ^ RIHp RV9  d   RVR&   V! \	        V 3/ VB P                  V! 4       4      4       R# )ao  Prints expr using the pager, in pretty form.

This invokes a pager command using pydoc. Lines are not wrapped
automatically. This routine is meant to be used with a pager that allows
sideways scrolling, like ``less -S``.

Parameters are the same as for ``pretty_print``. If you wish to wrap lines,
pass ``num_columns=None`` to auto-detect the width of the terminal.

)pager)getpreferredencodingr0   i  N)pydocrT  localerU  r  encode)rJ   rB   rT  rU  s   &,  rC   pager_printrY  j  s=     +H$"(	&
"
"
)
)*>*@
ABrE   )?r  
sympy.corer   sympy.core.addr   sympy.core.containersr   sympy.core.functionr   sympy.core.mulr   sympy.core.numbersr	   r
   sympy.core.powerr   sympy.core.sortingr   sympy.core.symbolr   sympy.core.sympifyr   sympy.printing.conventionsr   sympy.printing.precedencer   r   r   sympy.printing.printerr   r   sympy.printing.strr   sympy.utilities.iterablesr   sympy.utilities.exceptionsr    sympy.printing.pretty.stringpictr   r   &sympy.printing.pretty.pretty_symbologyr   r   r   r   r   r   r    r!   r"   r#   r$   r%   r&   r'   rR  pprint_use_unicodepprint_try_use_unicoder)   r  rR  pprintrY  rQ   rE   rC   <module>ro     s       ' (  /   / $ + 7 T T : # 1 @ Cb b b b
 ( / F,#G F,#RX " "$+"Z 
CrE   