
    \h
                     n    S r SSKrSSKJr  SSKJr  \R                  " S\R                  5      rS r	S r
g)z5
A few practical conventions common to all printers.
    N)Iterable)
Derivativez^([^\W\d_]+)(\d+)$c                    U (       d  U / / 4$ SnSn/ n/ nU[        U 5      :  Ga  US-   nXUS-    S:X  a  US-  nU R                  SU5      nUS:  a  [        U 5      nU R                  SU5      nUS:  a  [        U 5      n[        Xg5      nXU n	UnUc  U	nOU	R                  S5      (       a  UR	                  U	SS 5        OaU	R                  S5      (       a  UR	                  U	SS 5        O6U	R                  S5      (       a  UR	                  U	SS 5        O[        S5      eU[        U 5      :  a  GM  [        R                  U5      n
U
(       a$  U
R                  5       u  p+UR                  SU5        X#U4$ )	aH  Split a symbol name into a name, superscripts and subscripts

The first part of the symbol name is considered to be its actual
'name', followed by super- and subscripts. Each superscript is
preceded with a "^" character or by "__". Each subscript is preceded
by a "_" character.  The three return values are the actual name, a
list with superscripts and a list with subscripts.

Examples
========

>>> from sympy.printing.conventions import split_super_sub
>>> split_super_sub('a_x^1')
('a', ['1'], ['x'])
>>> split_super_sub('var_sub1__sup_sub2')
('var', ['sup'], ['sub1', 'sub2'])

r   N      __^_zThis should never happen.)
lenfindmin
startswithappendRuntimeError_name_with_digits_pmatchgroupsinsert)textposnamesuperssubsstartpos_hatpos_uscpos_nextpartmsubs               R/var/www/auris/envauris/lib/python3.13/site-packages/sympy/printing/conventions.pysplit_super_subr"      so   & R|
CDFD
D	/aC!G$QJE))C'Q;$iG))C'Q;$iGw(!<D__S!!MM$qr(#__T""MM$qr(#__S!!KKQR!:;;- D	/4 	!!$'AHHJ	As    c                    [        U [        5      (       a  [        U R                  5      $ [        U R                  [
        5      (       d!  [        [        U R                  5      5      S:  $ [        S U R                   5       5      S:  $ )a-  Return whether a partial derivative symbol is required for printing

This requires checking how many free variables there are,
filtering out the ones that are integers. Some expressions do not have
free variables. In that case, check its variable list explicitly to
get the context of the expression.
r   c              3   B   #    U  H  oR                   (       + v   M     g 7f)N)
is_integer).0ss     r!   	<genexpr>#requires_partial.<locals>.<genexpr>X   s     ;):A<<):s   )

isinstancer   requires_partialexprfree_symbolsr   r   set	variablessum)r-   s    r!   r,   r,   I   sh     $
##		**d''223t~~&'!++;):):;;a??r#   )__doc__recollections.abcr   sympy.core.functionr   compileUNICODEr   r"   r,    r#   r!   <module>r9      s7    
 $ *jj!6

C 9x@r#   