a
    khj                 	   @   s  d dl mZ d dlmZ d dlmZ d dlmZ d dlm	Z	m
Z
mZmZ d dlmZmZmZmZmZmZmZmZ d dlmZmZmZmZ d dlmZ d d	lmZmZ d d
l m!Z! d dl"m#Z#m$Z$m%Z% d dl&m'Z'm(Z(m)Z)m*Z*m+Z+m,Z,m-Z-m.Z.m/Z/m0Z0m1Z1 d dl2m3Z3m4Z4m5Z5m6Z6 d dl7m8Z8m9Z9m:Z: d dl;m<Z<m=Z=m>Z>m?Z?m@Z@mAZAmBZBmCZCmDZDmEZEmFZFmGZG d dlHmIZImJZJ d dlKmLZLmMZM d dlNmOZOmPZPmQZQmRZRmSZSmTZTmUZUmVZVmWZWmXZXmYZYmZZZ d dl[m\Z\ d dl]m^Z^m_Z_m`Z`maZa d dlbmcZcmdZdmeZemfZf d dlgmhZhmiZimjZj d dlkmlZlmmZmmnZnmoZo d dlpmqZqmrZrmsZsmtZtmuZumvZvmwZwmxZxmyZy d dlzm{Z{ d dl|m}Z}m~Z~mZmZmZ d dlmZ d dlmZmZmZmZmZmZmZmZ d dlmZ d dlmZ d dlmZ d d lmZmZmZmZmZ d d!lmZmZmZmZ d d"lmZ d d#lmZ d d$lmZ d d%lmZmZmZmZmZmZmZ d d&lmZ d d'lmZ d d(lmZmZmZmZmZmZmZ d d)lmZmZ ed*\	ZZZZZZZZZe Ze Zd+d, Zd-d. Zd/d0 Zd1d2 Zd3d4 Zd5d6 Zd7d8 Zd9d: Zd;d< Zd=d> Zd?d@ ZdAdB ZdCdD ZdEdF ZdGdH ZdIdJ ZdKdL ZdMdN ZdOdP ZdQdR ZdSdT ZdUdV ZdWdX ZdYdZ Zd[d\ Zd]d^ Zd_d` Zdadb Zdcdd Zdedf Zdgdh Zdidj Zdkdl Zdmdn Zdodp Zdqdr Zdsdt Zdudv Zdwdx Zdydz Zd{d| Zd}d~ Zdd Zdd Zdd Zdd Zdd Zdd Zdd Zdd Zdd Zdd Zdd Zdd Zdd Zdd Zdd Zdd Zdd Z dd Zdd Zdd Zdd Zdd Zdd Zdd Zdd Zdd Z	dd Z
dd Zdd Zdd Zdd Zdd Zdd Zdd ZddĄ ZddƄ ZddȄ Zddʄ Zdd̄ Zdd΄ ZddЄ Zdd҄ ZddԄ Zddք Zdd؄ Zeddڄ Zdd܄ Zddބ Zdd Z dd Z!dd Z"dd Z#dd Z$dd Z%dd Z&dd Z'dd Z(dd Z)dd Z*dd Z+dd Z,dd Z-dd Z.dd Z/dd  Z0dd Z1dd Z2dd Z3dS (      )AccumBounds)Sum)Basic)Tuple)
DerivativeLambdadiffFunction)zooFloatIntegerIoopiERational)LtGeNeEq)S)symbolsSymbol)sympify)
factorial2binomial	factorial)lucasbellcatalaneuler
tribonacci	fibonacci	bernoulliprimenu
primeomegatotientreduced_totient)reim	conjugateAbs)expLambertWlog)tanhacothatanhcothasinhacschasechacoshcschsinhcoshsech)ceilingfloor)MaxMin)cscsectanatansinaseccotcosacotacscasinacos)	Heaviside)elliptic_pi
elliptic_f
elliptic_k
elliptic_e)fresnelcfresnelsEiexpint)gamma
uppergamma
lowergamma)mathieusprimemathieusmathieucprimemathieuc)	jacobi
chebyshevu
chebyshevthermiteassoc_legendre
gegenbauerassoc_laguerrelegendrelaguerre)SingularityFunction)polylog	stieltjeslerchphidirichlet_etazeta)Integral)XorOrfalsetrueAnd
EquivalentImpliesNot)Matrix)Determinant)MatrixSymbol)ComplexSpace	FockSpacehbarHilbertSpaceDagger)MathMLPresentationPrinterMathMLPrinterMathMLContentPrintermathml)Limit)Contains)Range)IntervalUnionSymmetricDifference
Complement	FiniteSetIntersection
ProductSet)RandomSymbol)IndexedBase)
Divergence
CoordSys3DCrossCurlDot	LaplacianGradient)raisesXFAILz	x:z a:e nc                  C   s*   t  } | dt tdt ks&J d S N   )r|   doprintxmp)m r   N/var/www/auris/lib/python3.9/site-packages/sympy/printing/tests/test_mathml.pytest_mathml_printerB   s    r   c                   C   s   t dt dksJ d S )Nr   z*<apply><plus/><ci>x</ci><cn>1</cn></apply>)r   r   r   r   r   r   r   test_content_printmethodG   s    r   c                  C   s&  t dt } | jdksJ | j}t|dks2J |d jdksDJ |d  du sXJ |d jd u sjJ |d jdv s|J |d jdkr|d jd jd	ksJ |d
 jd jdksJ n0|d jd jdksJ |d
 jd jd	ksJ t td
 }|jdks
J |j}|d jd jdks*J |d
 jd jdksDJ t d
t }|jdksbJ |j}|d jdks|J |d jd jdksJ |d
 jd jdksJ t tdd
t }|jdksJ |j}|d jdksJ |d jd jdksJ |d
 jd jdks"J d S )Nr   apply   r   plusF)cncir   1   r   2times      ?1.0)	r   _printr   nodeName
childNodeslenZhasChildNodes	nodeValuer   mml_1nodesmml_2mml_3mmlr   r   r   test_content_mathml_coreK   s<    r   c                  C   s  t tt} | jdksJ | jd jdks0J | jd jdksDJ t ttttdd}|jdksjJ |jd jdks~J |jd jd	ksJ |jd jd jdksJ t tttt tdd}|jdksJ |jd jd
ksJ |jd jd	ksJ |jd jd jdksJ t t	ttftt }|jdksBJ |jd jd	ksXJ |jd jd jdkstJ |jd jd	ksJ |jd jd jdksJ |jd jdksJ d S )Nr   r   rC   r   r   Fevaluater   bvarZpartialdifflambdar   )
r   r   rC   r   r   r   r   rF   yr   r   r   r   Zmml_4r   r   r   test_content_mathml_functionsp   sJ    






r   c                  C   s~   t tt } tt| td}|jd jdks2J |jd jdksFJ |jd jdksZJ |jd  t|  kszJ d S )Nr   limitr   r   r   lowlimitr   )rC   r   r   r   r   r   r   toxmlZlim_funr   r   r   r   test_content_mathml_limits   s    r   c                  C   s   t } tt| t ddf}|jd jdks.J |jd jdksBJ |jd jdksVJ |jd jdksjJ |jd	  t|  ksJ d S )
Nr   r   intr   r   r   r   uplimit   )r   r   r   rj   r   r   r   )Z	integrandr   r   r   r   test_content_mathml_integrals   s    r   c                  C   s  t g d} t g dg dg dg}t| }|jd jdksDJ |jd jd jdks^J |jd jd jd jdks~J |jd	 jdksJ |jd	 jd jdksJ |jd	 jd jd jd
ksJ |jd jdksJ |jd jd jdksJ |jd jd jd jdksJ t|}|jd jdks<J |jd jd jdksXJ |jd jd jd jdkszJ |jd jd	 jdksJ |jd jd	 jd jdksJ |jd jd jdksJ |jd jd jd jdksJ |jd	 jdksJ |jd	 jd jdks(J |jd	 jd jd jd
ksJJ |jd	 jd	 jdksfJ |jd	 jd	 jd jdksJ |jd	 jd jdksJ |jd	 jd jd jdksJ |jd jdksJ |jd jd jdksJ |jd jd jd jdksJ |jd jd	 jdks6J |jd jd	 jd jdksXJ |jd jd jdkstJ |jd jd jd jdksJ d S )Nr   r   r   r      r   r   r   r   	      r   r   Z	matrixrowr   r   r   r   r   305497)rs   r   r   r   r   r   ABZmll_1Zmll_2r   r   r   test_content_mathml_matrices   sD    
  "
""""""""r   c                  C   s   t } tt| t ddf}|jd jdks.J |jd jdksBJ |jd jdksVJ |jd jd	ksjJ |jd
  t|  ksJ d S )Nr   
   r   sumr   r   r   r   r   r   )r   r   r   r   r   r   r   )Zsummandr   r   r   r   test_content_mathml_sums   s    r   c                  C   s   t dg} | jdksJ | jd jdks.J t| jdks@J t dtdg}|jdks`J |jd jdkstJ |jd jdksJ t|jdksJ d S )Nr   listr   r   r   )r   r   r   r   r   r   r   r   r   r   r   test_content_mathml_tuples   s    r   c                  C   sf   t td td  t } | jd jdks.J | jd jd jdksHJ | jd jd jdksbJ d S )Nr   r   r   r   r   minusr   )r   r   r   r   r   r   r   r   r   test_content_mathml_add   s    r   c                  C   sF   t tdd} | jdksJ t tdd}|jd jdksBJ d S )Nr   r   r   r   r   divide)r   r   r   r   r   r   r   r   r   test_content_mathml_Rational   s    r   c                  C   s  t t} | jdksJ t t} | jdks0J t t} | jdksHJ t t} | jdks`J ttdkspJ tt	j
dksJ tt	jdksJ tt	j} | dksJ tt	j} | d	ksJ tt	j} | d
ksJ tt	j} | dksJ tt	j} | dksJ d S )NZ
imaginaryiZexponentialeZinfinityr   z<hbar/>z<tribonacciconstant/>z<cn>&#966;</cn>z<eulergamma/>z<emptyset/>z<true/>z<false/>z<notanumber/>)r   r   r   r   r   r   r   r~   rx   r   TribonacciConstantGoldenRatio
EulerGammaEmptySetrn   rm   NaNr   r   r   r   test_content_mathml_constants   s*    








r   c                  C   sV  t tt} | jd jdks"J t tt} | jd jdksDJ t tt} | jd jdksfJ t tt} | jd jdksJ t t	t} | jd jdksJ t t
t} | jd jdksJ t tt} | jd jdksJ t tt} | jd jd	ksJ t tt} | jd jd
ks6J t tt} | jd jdksZJ t tt} | jd jdks~J t tt} | jd jdksJ t tt} | jd jdksJ t tt} | jd jdksJ t tt} | jd jdksJ t tt} | jd jdks2J t tt} | jd jdksVJ t tt} | jd jdkszJ t tt} | jd jdksJ t tt} | jd jdksJ t tt} | jd jdksJ t tt} | jd jdks
J t tt} | jd jdks.J t tt} | jd jdksRJ d S )Nr   rC   rF   rA   rE   r?   r@   arcsinarccosarctanZarccotZarccscZarcsecr8   r9   r/   r2   r7   r:   arcsinharctanharccoshZarccothZarccschZarcsech)r   r   rC   r   r   r   rF   rA   rE   r?   r@   rI   rJ   rB   rG   rH   rD   r8   r9   r/   r2   r7   r:   r3   r1   r6   r0   r4   r5   r   r   r   r   test_content_mathml_trig  s`    r   c                  C   sX  t ttd} | jdksJ | jd jdks2J | jd jdksFJ | jd jd jdks`J | jd jdkstJ | jd jd jd	ksJ t tdt}|jdksJ |jd jd
ksJ |jd jdksJ |jd jd jd	ksJ |jd jdksJ |jd jd jdks J t tdt}|jdks@J |jd jdksVJ |jd jdkslJ |jd jd jd	ksJ |jd jdksJ |jd jd jdksJ t t	dt}|jdksJ |jd jdksJ |jd jdksJ |jd jd jd	ks"J |jd jdks8J |jd jd jdksTJ d S )Nr   r   r   eqr   r   r   r   r   ZneqZgeqlt)
r   r   r   r   r   r   r   r   r   r   r   r   r   r   test_content_mathml_relationalY  s8    r   c                  C   sd  t t} | jdksJ | jd jdks,J ~ t td} | jdksJJ | jd jdks^J | jd jd jdksxJ | jd jd jd jdksJ | jd jd jdksJ | jd jd jd jdksJ ~ t td	} | jdksJ | jd jdksJ | jd jd jdks"J | jd jd jd jdksDJ | jd jd jdks`J | jd jd jd jdksJ ~ t td
} | jdksJ | jd jdksJ | jd jd jdksJ | jd jd jd jdksJ | jd jd jdksJ | jd jd jd jdks4J ~ t td} | jdksTJ | jd jdksjJ | jd jd jdksJ | jd jd jd jdksJ | jd jd jdksJ | jd jd jd jdksJ | jd jd jdksJ | jd jd jd jdks$J ~ t td} | jdksDJ | jd jdksZJ | jd jd jdksvJ | jd jd jd jdksJ | jd jd jdksJ | jd jd jd jdksJ | jd jd jdksJ | jd jd jd jdksJ ~ t td} | jdks4J | jd jdksJJ | jd jd jdksfJ | jd jd jd jdksJ | jd jd jdksJ | jd jd jd jdksJ | jd jd jd jd jdksJ | jd jd jd jdksJ | jd jd jd jd jdks8J | jd jd jd jdksZJ | jd jd jd jd jdksJ ~ t td} | jdksJ | jd jdksJ | jd jd jdksJ | jd jd jd jdksJ | jd jd jdksJ | jd jd jd jdks4J | jd jd jd jd jdks\J | jd jd jd jdks~J | jd jd jd jd jdksJ | jd jd jd jdksJ | jd jd jd jd jdksJ ~ t td} | jdksJ | jd jdks&J | jd jd jdksBJ | jd jd jd jdksdJ | jd jd jdksJ | jd jd jd jdksJ | jd jd jd jd jdksJ | jd jd jd jdksJ | jd jd jd jd jdksJ | jd jd jd jdks6J | jd jd jd jd jdks^J ~ d S )Nr   r   r   x^2zmml:msupzmml:mir   r   x__2x_2zmml:msubx^3_2zmml:msubsupr   r   x__3_2x_2_azmml:mrowzmml:mo ax^2^ax__2__a)r   r   r   r   r   r   r   r   r   r   r   test_content_symbol{  s    
  """"""""""""
"
"
""
"
"
""
"
"
r   c                  C   s  t td} | jdksJ | jd jdks0J t tddksFJ t tddks\J t tdd	ksrJ t td
dksJ t tddksJ t tddksJ t tddksJ t tddksJ t tddksJ t tddksJ t tddks&J t tddks>J t tddksVJ t tddksnJ t td d!ksJ t td"d#ksJ t td$d%ksJ t td&d'ksJ t td(d)ksJ t td*d+ksJ t td,d-ksJ t td.d/ks.J t td0d1ksFJ t td2d3ks^J t td4d5ksvJ t td6d7ksJ t td8d9ksJ t td:d;ksJ t td<d=ksJ t td>d?ksJ t td@dAksJ t tdBdCksJ t tdDdEks6J t tdFdGksNJ t tdHdIksfJ t tdJdKks~J t tdLdMksJ t tdNdOksJ t tdPdQksJ t tdRdSksJ t tdTdUksJ t tdVdWksJ t tdXdYks&J t tdZd[ks>J t td\d]ksVJ t td^d_ksnJ t td`daksJ t tdbdcksJ t tdddeksJ d S )fNalphar   r      αz<ci>&#945;</ci>betaz<ci>&#946;</ci>rT   z<ci>&#947;</ci>deltaz<ci>&#948;</ci>epsilonz<ci>&#949;</ci>ri   z<ci>&#950;</ci>etaz<ci>&#951;</ci>thetaz<ci>&#952;</ci>iotaz<ci>&#953;</ci>kappaz<ci>&#954;</ci>r   z<ci>&#955;</ci>muz<ci>&#956;</ci>nuz<ci>&#957;</ci>xiz<ci>&#958;</ci>omicronz<ci>&#959;</ci>r   z<ci>&#960;</ci>rhoz<ci>&#961;</ci>varsigmaz<ci>&#962;</ci>sigmaz<ci>&#963;</ci>tauz<ci>&#964;</ci>upsilonz<ci>&#965;</ci>phiz<ci>&#966;</ci>chiz<ci>&#967;</ci>psiz<ci>&#968;</ci>omegaz<ci>&#969;</ci>Alphaz<ci>&#913;</ci>Betaz<ci>&#914;</ci>Gammaz<ci>&#915;</ci>Deltaz<ci>&#916;</ci>Epsilonz<ci>&#917;</ci>Zetaz<ci>&#918;</ci>Etaz<ci>&#919;</ci>Thetaz<ci>&#920;</ci>Iotaz<ci>&#921;</ci>Kappaz<ci>&#922;</ci>r   z<ci>&#923;</ci>Muz<ci>&#924;</ci>Nuz<ci>&#925;</ci>Xiz<ci>&#926;</ci>Omicronz<ci>&#927;</ci>Piz<ci>&#928;</ci>Rhoz<ci>&#929;</ci>Sigmaz<ci>&#931;</ci>Tauz<ci>&#932;</ci>Upsilonz<ci>&#933;</ci>Phiz<ci>&#934;</ci>Chiz<ci>&#935;</ci>Psiz<ci>&#936;</ci>Omegaz<ci>&#937;</ci>)r   r   r   r   r   r   r   r   r   r   r   test_content_mathml_greek  sh    r)  c                  C   s  t d t d t  dt  td   td  } tddi}|| }|jd jd jdks\J |jd jd jd jd	ks|J |jd jd jd jd
ksJ |jd jd jdksJ |jd jd jd jdksJ |jd jd jd jdksJ tddi}|| }|jd jd jdks(J |jd jd jd jdksJJ |jd jd jd jdkslJ |jd jd jdksJ |jd jd jd jd	ksJ |jd jd jd jd
ksJ d S )Nr   r   r   orderlexr   r   powerr   r   r   r   rev-lex)r   r   r}   r   r   r   dataexprr   r   r   r   r   test_content_mathml_order  s"    ,
    
"""r1  c                   C   s   t tdd  d S )Nc                   S   s   t tddS )Ngarbage)methodr~   r   r   r   r   r   <lambda>:      z'test_content_settings.<locals>.<lambda>r   	TypeErrorr   r   r   r   test_content_settings9  s    r9  c                   C   sp   t tttdksJ t tttdks,J t tttdksBJ t tttdksXJ t ttdkslJ d S )Nz)<apply><and/><ci>x</ci><ci>y</ci></apply>z(<apply><or/><ci>x</ci><ci>y</ci></apply>z)<apply><xor/><ci>x</ci><ci>y</ci></apply>z-<apply><implies/><ci>x</ci><ci>y</ci></apply>z<apply><not/><ci>x</ci></apply>)r~   ro   r   r   rl   rk   rq   rr   r   r   r   r   test_content_mathml_logic=  s
    r:  c                  C   s  t ttdksJ t tttdks*J t tttttdksFJ tt} tt}tt}tt}t| |dd}t||dd}t| |dd}t||dd}t| |dd}t||dd}	t	| |}
t	||}t |dksJ t |dksJ t |dksJ t |
d	ksJ t t| |ddd
ks,J t t||dddksHJ t t||	dddksdJ t t|
|dddksJ t t| |dddksJ t t||dddksJ t t||	dddksJ t t|
|dddksJ t t| |	dddksJ t t||dddks(J t t||dddksDJ t t|
|dddks`J t t	| |dksxJ t t	||dksJ t t	||dksJ t t	||	dksJ d S )Nz<set><ci>a</ci></set>z<set><ci>a</ci><ci>b</ci></set>z4<set><ci>c</ci><set><ci>a</ci><ci>b</ci></set></set>Fr   zA<apply><union/><set><ci>a</ci></set><set><ci>b</ci></set></apply>zE<apply><intersect/><set><ci>a</ci></set><set><ci>b</ci></set></apply>zC<apply><setdiff/><set><ci>a</ci></set><set><ci>b</ci></set></apply>zL<apply><cartesianproduct/><set><ci>a</ci></set><set><ci>b</ci></set></apply>zq<apply><intersect/><set><ci>a</ci></set><apply><union/><set><ci>c</ci></set><set><ci>d</ci></set></apply></apply>z<apply><intersect/><apply><union/><set><ci>a</ci></set><set><ci>b</ci></set></apply><apply><union/><set><ci>c</ci></set><set><ci>d</ci></set></apply></apply>z<apply><intersect/><apply><setdiff/><set><ci>a</ci></set><set><ci>b</ci></set></apply><apply><setdiff/><set><ci>c</ci></set><set><ci>d</ci></set></apply></apply>z<apply><intersect/><apply><cartesianproduct/><set><ci>a</ci></set><set><ci>b</ci></set></apply><apply><cartesianproduct/><set><ci>c</ci></set><set><ci>d</ci></set></apply></apply>zq<apply><union/><set><ci>a</ci></set><apply><intersect/><set><ci>c</ci></set><set><ci>d</ci></set></apply></apply>z<apply><union/><apply><intersect/><set><ci>a</ci></set><set><ci>b</ci></set></apply><apply><intersect/><set><ci>c</ci></set><set><ci>d</ci></set></apply></apply>z<apply><union/><apply><setdiff/><set><ci>a</ci></set><set><ci>b</ci></set></apply><apply><setdiff/><set><ci>c</ci></set><set><ci>d</ci></set></apply></apply>z<apply><union/><apply><cartesianproduct/><set><ci>a</ci></set><set><ci>b</ci></set></apply><apply><cartesianproduct/><set><ci>c</ci></set><set><ci>d</ci></set></apply></apply>zq<apply><setdiff/><set><ci>a</ci></set><apply><setdiff/><set><ci>c</ci></set><set><ci>d</ci></set></apply></apply>z<apply><setdiff/><apply><union/><set><ci>a</ci></set><set><ci>b</ci></set></apply><apply><union/><set><ci>c</ci></set><set><ci>d</ci></set></apply></apply>z<apply><setdiff/><apply><intersect/><set><ci>a</ci></set><set><ci>b</ci></set></apply><apply><intersect/><set><ci>c</ci></set><set><ci>d</ci></set></apply></apply>z<apply><setdiff/><apply><cartesianproduct/><set><ci>a</ci></set><set><ci>b</ci></set></apply><apply><cartesianproduct/><set><ci>c</ci></set><set><ci>d</ci></set></apply></apply>z<apply><cartesianproduct/><set><ci>a</ci></set><apply><cartesianproduct/><set><ci>c</ci></set><set><ci>d</ci></set></apply></apply>z<apply><cartesianproduct/><apply><union/><set><ci>a</ci></set><set><ci>b</ci></set></apply><apply><union/><set><ci>c</ci></set><set><ci>d</ci></set></apply></apply>z<apply><cartesianproduct/><apply><intersect/><set><ci>a</ci></set><set><ci>b</ci></set></apply><apply><intersect/><set><ci>c</ci></set><set><ci>d</ci></set></apply></apply>z<apply><cartesianproduct/><apply><setdiff/><set><ci>a</ci></set><set><ci>b</ci></set></apply><apply><setdiff/><set><ci>c</ci></set><set><ci>d</ci></set></apply></apply>)
r~   r   r   bcdr   r   r   r   )r   r   CDU1ZU2I1ZI2C1ZC2P1ZP2r   r   r   test_content_finite_setsE  s    

















rD  c                   C   sr   t dt dksJ t td dks,J t td dksBJ t td dksXJ t dt d	ksnJ d S )
Nr   z+<mrow><mi>x</mi><mo>+</mo><mn>1</mn></mrow>r   z!<msup><mi>x</mi><mn>2</mn></msup>z#<mfrac><mn>1</mn><mi>x</mi></mfrac>z:<mfrac><mn>1</mn><msup><mi>x</mi><mn>2</mn></msup></mfrac>z:<mrow><mn>2</mn><mo>&InvisibleTimes;</mo><mi>x</mi></mrow>)mppr   r   r   r   r   r   test_presentation_printmethod  s    rH  c                  C   s
  t dt } | jdksJ | j}t|dks2J |d jdv sDJ |d jdksVJ |d jdkr|d jd jdks|J |d	 jd jd
ksJ n0|d jd jd
ksJ |d	 jd jdksJ t td	 }|jdksJ |j}|d jd jd
ksJ |d jd jdksJ t d	t }|jdks:J |j}|d jd jdksZJ |d jd jdkstJ |d	 jd jd
ksJ t tdd	t }|jdksJ |j}|d jd jdksJ |d jd jdksJ |d	 jd jd
ksJ d S )Nr   mrowr   r   )mimnmorK  r   r   r   msupr   z&InvisibleTimes;r   r   )rG  r   r   r   r   r   r   r   r   r   r   r   test_presentation_mathml_core  s8    rN  c                  C   sT  t tt} | jd jd jdks(J | jd jd jd jdksHJ t ttttdd}|jdksnJ |jd jd jd jd jdksJ |jd jd jdksJ |jd jd jd jd jdksJ t tttt	 tdd}|jd jd	ksJ |jd jd jd jd jd
ks.J |jd jd jd jdksPJ d S )Nr   rC   r   r   Fr   rI  z&dd;mfracz&#x2202;rF   )
rG  r   rC   r   r   r   r   r   rF   r   )r   r   r   r   r   r   "test_presentation_mathml_functions  sT    
rP  c                  C   sL   t d} t| ttttttttt}t|dks4J t|dddksHJ d S )Nfz<apply><partialdiff/><bvar><ci>y</ci><ci>z</ci><degree><cn>2</cn></degree><ci>x</ci><ci>z</ci><ci>x</ci></bvar><apply><f/><ci>x</ci><ci>y</ci><ci>z</ci></apply></apply>presentationprinteraf  <mrow><mfrac><mrow><msup><mo>&#x2202;</mo><mn>6</mn></msup></mrow><mrow><mo>&#x2202;</mo><mi>y</mi><msup><mo>&#x2202;</mo><mn>2</mn></msup><mi>z</mi><mo>&#x2202;</mo><mi>x</mi><mo>&#x2202;</mo><mi>z</mi><mo>&#x2202;</mo><mi>x</mi></mrow></mfrac><mrow><mi>f</mi><mrow><mo>(</mo><mi>x</mi><mo>,</mo><mi>y</mi><mo>,</mo><mi>z</mi><mo>)</mo></mrow></mrow></mrow>)r	   r   r   r   zr~   )rQ  r=  r   r   r   test_print_derivative  s    
rV  c                  C   s   t tt } tt| td}|jd jdks2J |jd jd jd jdksRJ |jd jd jd jd jdksxJ |jd jd jd jd jdksJ |jd jd jd jd jdksJ d S )	Nr   ZmunderZlimr   r   z&#x2192;r   r   )rC   r   rG  r   r   r   r   r   r   r   r   r   test_presentation_mathml_limits  s:    rW  c               	   C   s   t tttddfdksJ t ttttdks:J t ttt ttdksXJ td\} }t ttt |  tt| dksJ t ttt |  | tt| |dksJ t tttt| ddfd	ksJ t tttdfd
ksJ d S )Nr   r   zf<mrow><msubsup><mo>&#x222B;</mo><mn>0</mn><mn>1</mn></msubsup><mi>x</mi><mo>&dd;</mo><mi>x</mi></mrow>zy<mrow><mo>&#x222B;</mo><mrow><mi>log</mi><mrow><mo>(</mo><mi>x</mi><mo>)</mo></mrow></mrow><mo>&dd;</mo><mi>x</mi></mrow>z<mrow><mo>&#x222C;</mo><mrow><mi>x</mi><mo>&InvisibleTimes;</mo><mi>y</mi></mrow><mo>&dd;</mo><mi>y</mi><mo>&dd;</mo><mi>x</mi></mrow>zz wz<mrow><mo>&#x222D;</mo><mrow><mi>x</mi><mo>&InvisibleTimes;</mo><mi>y</mi><mo>&InvisibleTimes;</mo><mi>z</mi></mrow><mo>&dd;</mo><mi>z</mi><mo>&dd;</mo><mi>y</mi><mo>&dd;</mo><mi>x</mi></mrow>a-  <mrow><mo>&#x222B;</mo><mo>&#x222B;</mo><mo>&#x222B;</mo><mo>&#x222B;</mo><mrow><mi>w</mi><mo>&InvisibleTimes;</mo><mi>x</mi><mo>&InvisibleTimes;</mo><mi>y</mi><mo>&InvisibleTimes;</mo><mi>z</mi></mrow><mo>&dd;</mo><mi>w</mi><mo>&dd;</mo><mi>z</mi><mo>&dd;</mo><mi>y</mi><mo>&dd;</mo><mi>x</mi></mrow>z<mrow><msubsup><mo>&#x222B;</mo><mn>0</mn><mn>1</mn></msubsup><mo>&#x222B;</mo><mo>&#x222B;</mo><mi>x</mi><mo>&dd;</mo><mi>z</mi><mo>&dd;</mo><mi>y</mi><mo>&dd;</mo><mi>x</mi></mrow>zV<mrow><msup><mo>&#x222B;</mo><mn>0</mn></msup><mi>x</mi><mo>&dd;</mo><mi>x</mi></mrow>)rG  r   rj   r   r.   r   r   )rU  wr   r   r   "test_presentation_mathml_integrals  s,     rY  c                  C   sv  t g d} t g dg dg dg}t| }|jd jdksDJ |jd jd jdks^J t|jd jd	ksvJ |jd jd jd jd
ksJ t|jd jd jdksJ |jd jd jd jd jd jdksJ |jd jd jd jd jd jdksJ |jd jd jd jd jd jdks<J t|}|jd jdks\J |jd jd jdksxJ t|jd jd	ksJ |jd jd jd jd
ksJ t|jd jd jd	ksJ |jd jd jd jd jd jdksJ |jd jd jd jd jd jdks0J |jd jd jd jd jd jdks^J |jd jd jd jd jd jdksJ |jd jd jd jd jd jdksJ |jd jd jd jd jd jdksJ |jd jd jd jd jd jdksJ |jd jd jd jd jd jdksDJ |jd jd jd jd jd jdksrJ d S )Nr   r   r   r   r   Zmtabler   Zmtrr   Zmtdr   r   r   r   r   r   r   r   r   )rs   rG  r   r   r   r   r   r   r   r   r   !test_presentation_mathml_matrices&  s    
 


" 







rZ  c                  C   s   t tttddf} | jd jdks*J t| jd jdksBJ | jd jd jd jdksbJ t| jd jd jdksJ | jd jd jd jdksJ | jd jd jd	ksJ t tttddfd
ksJ t ttt	 tddfdksJ d S )Nr   r   r   Z
munderoverr   z&#x2211;r   10r   zw<mrow><munderover><mo>&#x2211;</mo><mrow><mi>x</mi><mo>=</mo><mn>1</mn></mrow><mn>10</mn></munderover><mi>x</mi></mrow>z<mrow><munderover><mo>&#x2211;</mo><mrow><mi>x</mi><mo>=</mo><mn>1</mn></mrow><mn>10</mn></munderover><mrow><mo>(</mo><mrow><mi>x</mi><mo>+</mo><mi>y</mi></mrow><mo>)</mo></mrow></mrow>)
rG  r   r   r   r   r   r   r   r   r   )r   r   r   r   test_presentation_mathml_sumsO  s"    r\  c                  C   s   t td td  t } t| jdks,J | jd jd jd jdksLJ | jd jd jd jdkslJ | jd jd jdksJ | jd jd jd jdksJ | jd jd jd jd	ksJ | jd
 jd jdksJ | jd jd jdksJ d S )Nr   r   r   r   r   r   -r   r   r   +)rG  r   r   r   r   r   r   r   r   r   test_presentation_mathml_add`  s"    r_  c                  C   st   t tdd} | jdksJ t tdd}|jdks<J |jd jd jdksVJ |jd jd jdkspJ d S )	Nr   rK  r   r   rO  r   r   r   )rG  r   r   r   r   r   r   r   r   r   !test_presentation_mathml_Rationalp  s    r`  c                  C   s   t t} | jd jdksJ t t} | jd jdks<J t t} | jd jdksZJ t t} | jd jdksxJ tt	dddksJ tt
jddd	ksJ tt
jddd
ksJ tt
jdddksJ ttdddksJ tt
jdddksJ d S )Nr   z&ImaginaryI;z&ExponentialE;z&#x221E;z&pi;rR  rS  <mi>&#x210F;</mi><mi>TribonacciConstant</mi><mi>&#x3B3;</mi><mi>&#x3A6;</mi>z*<mover><mo>&#x221E;</mo><mo>~</mo></mover>z<mi>NaN</mi>)rG  r   r   r   r   r   r   r   r~   rx   r   r   r   r   r
   r   r   r   r   r   "test_presentation_mathml_constantsz  s,    




re  c                  C   s  t tt} | jd jd jdks(J t tt} | jd jd jdksPJ t tt} | jd jd jdksxJ t tt} | jd jd jdksJ t t	t} | jd jd jdksJ t t
t} | jd jd jdksJ t tt} | jd jd jdksJ t tt} | jd jd jd	ksDJ t tt} | jd jd jd
ksnJ t tt} | jd jd jdksJ t tt} | jd jd jdksJ t tt} | jd jd jdksJ d S )Nr   rC   rF   rA   r   r   r   r8   r9   r/   r   r   r   )rG  r   rC   r   r   r   rF   rA   rI   rJ   rB   r8   r9   r/   r3   r1   r6   r   r   r   r   test_presentation_mathml_trig  s0    rf  c                  C   s  t ttd} t| jdks"J | jd jdks6J | jd jd jdksPJ | jd jdksdJ | jd jd jdks~J | jd jd	ksJ | jd jd jd
ksJ t tdt}t|jdksJ |jd jd	ksJ |jd jd jd
ksJ |jd jdksJ |jd jd jdks.J |jd jdksDJ |jd jd jdks`J t t	dt}t|jdksJ |jd jd	ksJ |jd jd jd
ksJ |jd jdksJ |jd jd jdksJ |jd jdksJ |jd jd jdksJ t t
dt}t|jdks>J |jd jd	ksTJ |jd jd jd
kspJ |jd jdksJ |jd jd jdksJ |jd jdksJ |jd jd jdksJ d S )Nr   r   r   rJ  r   rL  =r   rK  r   z&#x2260;z&#x2265;<)rG  r   r   r   r   r   r   r   r   r   r   r   r   r   r   #test_presentation_mathml_relational  s@    ri  c                  C   s  t t} | jdksJ | jd jdks,J ~ t td} | jdksJJ | jd jdks^J | jd jd jdksxJ | jd jdksJ | jd jd jdksJ ~ t td} | jdksJ | jd jdksJ | jd jd jdksJ | jd jdksJ | jd jd jdks$J ~ t td	} | jd
ksDJ | jd jdksZJ | jd jd jdksvJ | jd jdksJ | jd jd jdksJ ~ t td} | jdksJ | jd jdksJ | jd jd jdksJ | jd jdksJ | jd jd jdks,J | jd jdksBJ | jd jd jdks^J ~ t td} | jdks~J | jd jdksJ | jd jd jdksJ | jd jdksJ | jd jd jdksJ | jd jdksJ | jd jd jdksJ ~ t td} | jd
ks4J | jd jdksJJ | jd jd jdksfJ | jd jdks|J | jd jd jdksJ | jd jd jd jdksJ | jd jd jdksJ | jd jd jd jdksJ | jd jd jdksJ | jd jd jd jdks6J ~ t td} | jdksVJ | jd jdkslJ | jd jd jdksJ | jd jdksJ | jd jd jdksJ | jd jd jd jdksJ | jd jd jdksJ | jd jd jd jdksJ | jd jd jdks6J | jd jd jd jdksXJ ~ t td} | jdksxJ | jd jdksJ | jd jd jdksJ | jd jdksJ | jd jd jdksJ | jd jd jd jdksJ | jd jd jdksJ | jd jd jd jdks<J | jd jd jdksXJ | jd jd jd jdkszJ ~ d S )NrJ  r   r   r   rM  r   r   r   r   Zmsubr   Zmsubsupr   r   r   r   rI  rL  r   r   r   r   )rG  r   r   r   r   r   r   r   r   r   r   test_presentation_symbol  s    
"""""""""rj  c                  C   s  t td} | jdksJ | jd jdks0J t tddksFJ t tddks\J t tdd	ksrJ t td
dksJ t tddksJ t tddksJ t tddksJ t tddksJ t tddksJ t tddksJ t tddks&J t tddks>J t tddksVJ t tddksnJ t td d!ksJ t td"d#ksJ t td$d%ksJ t td&d'ksJ t td(d)ksJ t td*d+ksJ t td,d-ksJ t td.d/ks.J t td0d1ksFJ t td2d3ks^J t td4d5ksvJ t td6d7ksJ t td8d9ksJ t td:d;ksJ t td<d=ksJ t td>d?ksJ t td@dAksJ t tdBdCksJ t tdDdEks6J t tdFdGksNJ t tdHdIksfJ t tdJdKks~J t tdLdMksJ t tdNdOksJ t tdPdQksJ t tdRdSksJ t tdTdUksJ t tdVdWksJ t tdXdYks&J t tdZd[ks>J t td\d]ksVJ t td^d_ksnJ t td`daksJ t tdbdcksJ t tdddeksJ d S )fNr   rJ  r   r   z<mi>&#945;</mi>r   z<mi>&#946;</mi>rT   z<mi>&#947;</mi>r   z<mi>&#948;</mi>r   z<mi>&#949;</mi>ri   z<mi>&#950;</mi>r  z<mi>&#951;</mi>r  z<mi>&#952;</mi>r  z<mi>&#953;</mi>r  z<mi>&#954;</mi>r   z<mi>&#955;</mi>r  z<mi>&#956;</mi>r  z<mi>&#957;</mi>r  z<mi>&#958;</mi>r  z<mi>&#959;</mi>r   z<mi>&#960;</mi>r	  z<mi>&#961;</mi>r
  z<mi>&#962;</mi>r  z<mi>&#963;</mi>r  z<mi>&#964;</mi>r  z<mi>&#965;</mi>r  z<mi>&#966;</mi>r  z<mi>&#967;</mi>r  z<mi>&#968;</mi>r  z<mi>&#969;</mi>r  z<mi>&#913;</mi>r  z<mi>&#914;</mi>r  z<mi>&#915;</mi>r  z<mi>&#916;</mi>r  z<mi>&#917;</mi>r  z<mi>&#918;</mi>r  z<mi>&#919;</mi>r  z<mi>&#920;</mi>r  z<mi>&#921;</mi>r  z<mi>&#922;</mi>r   z<mi>&#923;</mi>r  z<mi>&#924;</mi>r  z<mi>&#925;</mi>r  z<mi>&#926;</mi>r  z<mi>&#927;</mi>r   z<mi>&#928;</mi>r!  z<mi>&#929;</mi>r"  z<mi>&#931;</mi>r#  z<mi>&#932;</mi>r$  z<mi>&#933;</mi>r%  z<mi>&#934;</mi>r&  z<mi>&#935;</mi>r'  z<mi>&#936;</mi>r(  z<mi>&#937;</mi>)rG  r   r   r   r   r   r   r   r   r   r   test_presentation_mathml_greek:  sh    rk  c                  C   s  t d t d t  dt  td   td  } tddi}|| }|jd jdksVJ |jd jd jd jdksvJ |jd jd	 jd jd
ksJ |jd jdksJ |jd jd jd jdksJ |jd jd	 jd jdksJ tddi}|| }|jd jdksJ |jd jd jd jdks8J |jd jd	 jd jdksZJ |jd jdkspJ |jd jd jd jdksJ |jd jd	 jd jd
ksJ d S )Nr   r   r   r*  r+  r   rM  r   r   r      r   r   r-  )r   r   r{   r   r   r   r   r/  r   r   r   test_presentation_mathml_orders  s"    ,
    
"""rm  c                  C   s   t ddd} ttd| dks$J ttd| dddks@J ttd| dddks\J ttd| dddksxJ ttd| ddd	ksJ d S )
Nr   Trealr   z?<mrow><mo>[</mo><mn>0</mn><mo>,</mo><mi>a</mi><mo>]</mo></mrow>Fz?<mrow><mo>(</mo><mn>0</mn><mo>,</mo><mi>a</mi><mo>]</mo></mrow>z?<mrow><mo>[</mo><mn>0</mn><mo>,</mo><mi>a</mi><mo>)</mo></mrow>?<mrow><mo>(</mo><mn>0</mn><mo>,</mo><mi>a</mi><mo>)</mo></mrow>)r   rG  r   r   r   r   r   r   test_print_intervals  s     rr  c                	   C   s   t tddksJ t tdtdks.J t tdttdksHJ t tdddddd	ksfJ t tddtdddd
ksJ d S )Nr   z+<mrow><mo>(</mo><mn>0</mn><mo>)</mo></mrow>rp  zS<mrow><mo>(</mo><mn>0</mn><mo>,</mo><mi>a</mi><mo>,</mo><mi>a</mi><mo>)</mo></mrow>r   r   r   r   z{<mrow><mo>(</mo><mn>0</mn><mo>,</mo><mn>1</mn><mo>,</mo><mn>2</mn><mo>,</mo><mn>3</mn><mo>,</mo><mn>4</mn><mo>)</mo></mrow>z<mrow><mo>(</mo><mn>0</mn><mo>,</mo><mn>1</mn><mo>,</mo><mrow><mo>(</mo><mn>2</mn><mo>,</mo><mn>3</mn><mo>,</mo><mn>4</mn><mo>)</mo></mrow><mo>)</mo></mrow>)rG  r   r   r   r   r   r   r   test_print_tuples  s    rs  c                   C   sl   t ttdksJ t ttdks,J t ttd dddksJJ t ttd dddkshJ d S )NzH<mrow><mi>&#8476;</mi><mrow><mo>(</mo><mi>x</mi><mo>)</mo></mrow></mrow>zH<mrow><mi>&#8465;</mi><mrow><mo>(</mo><mi>x</mi><mo>)</mo></mrow></mrow>r   Fr   zi<mrow><mi>&#8476;</mi><mrow><mo>(</mo><mrow><mi>x</mi><mo>+</mo><mn>1</mn></mrow><mo>)</mo></mrow></mrow>zi<mrow><mi>&#8465;</mi><mrow><mo>(</mo><mrow><mi>x</mi><mo>+</mo><mn>1</mn></mrow><mo>)</mo></mrow></mrow>)rG  r   r(   r   r)   r   r   r   r   test_print_re_im  s    rt  c                   C   s4   t ttdksJ t ttd dks0J d S )Nz+<mrow><mo>|</mo><mi>x</mi><mo>|</mo></mrow>r   zL<mrow><mo>|</mo><mrow><mi>x</mi><mo>+</mo><mn>1</mn></mrow><mo>|</mo></mrow>)rG  r   r+   r   r   r   r   r   test_print_Abs  s    ru  c                   C   s*   t ttddgddggdks&J d S )Nr   r   r   r   z<mrow><mo>|</mo><mrow><mo>[</mo><mtable><mtr><mtd><mn>1</mn></mtd><mtd><mn>2</mn></mtd></mtr><mtr><mtd><mn>3</mn></mtd><mtd><mn>4</mn></mtd></mtr></mtable><mo>]</mo></mrow><mo>|</mo></mrow>)rG  r   rt   rs   r   r   r   r   test_print_Determinant  s    rv  c                   C   s   t tdd  d S )Nc                   S   s   t tdddS )NrR  r2  )rT  r3  r4  r   r   r   r   r5    s   z,test_presentation_settings.<locals>.<lambda>r7  r   r   r   r   test_presentation_settings  s    rw  c                  C   sz   ddl m} m}m}m}m} t|dks.J t| dks@J t|dksRJ t|dksdJ t|dksvJ d S )Nr   IntegersNaturals	Naturals0Reals	Complexesz&<mi mathvariant="normal">&#x2102;</mi>z&<mi mathvariant="normal">&#x2124;</mi>z&<mi mathvariant="normal">&#x2115;</mi>z=<msub><mi mathvariant="normal">&#x2115;</mi><mn>0</mn></msub>z&<mi mathvariant="normal">&#x211D;</mi>)Z
sympy.setsry  rz  r{  r|  r}  rG  r   rx  r   r   r   test_print_domains  s    r~  c                   C   sJ   t t dksJ t t t dks,J t tdd dksFJ d S )Nz!<mrow><mo>-</mo><mi>x</mi></mrow>z:<mrow><mo>-</mo><mfrac><mi>x</mi><mi>y</mi></mfrac></mrow>r   r   z:<mrow><mo>-</mo><mfrac><mn>1</mn><mn>2</mn></mfrac></mrow>)rG  r   r   r   r   r   r   r   r    test_print_expression_with_minus  s    r  c                  C   s<   ddl m}  G dd d| }|dd}t|dks8J d S )Nr   )AssocOpc                   @   s   e Zd ZdZdS )z'test_print_AssocOp.<locals>.TestAssocOpr   N)__name__
__module____qualname__identityr   r   r   r   TestAssocOp  s   r  r   r   z5<mrow><mi>testassocop</mi><mn>1</mn><mn>2</mn></mrow>)Zsympy.core.operationsr  rG  r   )r  r  r0  r   r   r   test_print_AssocOp  s    
r  c                  C   s:   t tdtd} t| dks$J t| dks6J d S )Nr   r   zZ<mrow><mi>basic</mi><mrow><mo>(</mo><mn>1</mn><mo>,</mo><mn>2</mn><mo>)</mo></mrow></mrow>z#<basic><cn>1</cn><cn>2</cn></basic>)r   r   rG  r   r   r0  r   r   r   test_print_basic  s
    r  c                  C   sZ   t ddgddgg} t| ddddks*J t| dd	dd
ks@J t| ddddksVJ d S )Nr   r   r   r   rR  [)rT  Z	mat_delimz<mrow><mo>[</mo><mtable><mtr><mtd><mn>1</mn></mtd><mtd><mn>2</mn></mtd></mtr><mtr><mtd><mn>3</mn></mtd><mtd><mn>4</mn></mtd></mtr></mtable><mo>]</mo></mrow>(z<mrow><mo>(</mo><mtable><mtr><mtd><mn>1</mn></mtd><mtd><mn>2</mn></mtd></mtr><mtr><mtd><mn>3</mn></mtd><mtd><mn>4</mn></mtd></mtr></mtable><mo>)</mo></mrow> z{<mtable><mtr><mtd><mn>1</mn></mtd><mtd><mn>2</mn></mtd></mtr><mtr><mtd><mn>3</mn></mtd><mtd><mn>4</mn></mtd></mtr></mtable>)rs   r~   r  r   r   r   test_mat_delim_print  s    r  c                  C   sL   t t} t| dddksJ t| ddddks2J t| ddddksHJ d S )NrR  rS  zD<mrow><mi>log</mi><mrow><mo>(</mo><mi>x</mi><mo>)</mo></mrow></mrow>F)rT  Zln_notationTzC<mrow><mi>ln</mi><mrow><mo>(</mo><mi>x</mi><mo>)</mo></mrow></mrow>)r.   r   r~   r  r   r   r   test_ln_notation_print  s    
r  c                  C   sx   t t } t| dddksJ t| dd ddks2J t| ddddksHJ t| ddddks^J t| dd	dd
kstJ d S )NrR  rS  z:<mrow><mi>x</mi><mo>&InvisibleTimes;</mo><mi>y</mi></mrow>)rT  Z
mul_symboldotz0<mrow><mi>x</mi><mo>&#xB7;</mo><mi>y</mi></mrow>Zldotz2<mrow><mi>x</mi><mo>&#x2024;</mo><mi>y</mi></mrow>r   z0<mrow><mi>x</mi><mo>&#xD7;</mo><mi>y</mi></mrow>)r   r   r~   r  r   r   r   test_mul_symbol_print  s     
r  c                   C   s   t tddddksJ d S )Nr   r   r   zp<mrow><mi>&#x3A6;</mi><mrow><mo>(</mo><mn>1</mn><mo>,</mo><mn>2</mn><mo>,</mo><mn>3</mn><mo>)</mo></mrow></mrow>)rG  r   rg   r   r   r   r   test_print_lerchphi  s    r  c                   C   s4   t tttdksJ ttttdks0J d S )Nz-<apply><polylog/><ci>x</ci><ci>y</ci></apply>zZ<mrow><msub><mi>Li</mi><mi>x</mi></msub><mrow><mo>(</mo><mi>y</mi><mo>)</mo></mrow></mrow>)r   r   re   r   r   rG  r   r   r   r   test_print_polylog  s    r  c                  C   s@   t h d} t| dksJ th d}t|dks<J d S )N>   r   r   r   zS<mrow><mo>{</mo><mn>1</mn><mo>,</mo><mn>3</mn><mo>,</mo><mn>5</mn><mo>}</mo></mrow>>   r   r   r   S<mrow><mo>{</mo><mn>1</mn><mo>,</mo><mn>2</mn><mo>,</mo><mn>3</mn><mo>}</mo></mrow>)	frozensetrG  r   set)rQ  sr   r   r   test_print_set_frozenset  s    r  c                  C   s"   t tdd} t| dksJ d S )Nr   r   zS<mrow><mo>{</mo><mn>1</mn><mo>,</mo><mn>3</mn><mo>,</mo><mi>x</mi><mo>}</mo></mrow>)r   r   rG  r   )f1r   r   r   test_print_FiniteSet$  s    r  c                   C   s2   t ttdksJ t tttdks.J d S )NzB<mrow><mi>W</mi><mrow><mo>(</mo><mi>x</mi><mo>)</mo></mrow></mrow>zV<mrow><mi>W</mi><mrow><mo>(</mo><mi>x</mi><mo>,</mo><mi>y</mi><mo>)</mo></mrow></mrow>)rG  r   r-   r   r   r   r   r   r   test_print_LambertW*  s    r  c                   C   s   t tjdksJ d S )Nz<mo>&#x2205;</mo>)rG  r   r   r   r   r   r   r   test_print_EmptySet/  s    r  c                   C   s   t tjdksJ d S )Nz<mo>&#x1D54C;</mo>)rG  r   r   ZUniversalSetr   r   r   r   test_print_UniversalSet3  s    r  c                   C   sB   t t dksJ t tddks*J t t dks>J d S )Nz<mi>&#x210B;</mi>r   z <msup>&#x1D49E;<mn>2</mn></msup>z<mi>&#x2131;</mi>)rG  r   ry   rv   rw   r   r   r   r   test_print_spaces7  s    r  c                   C   sR   t tdksJ t tjdks&J t tjdks:J t tjdksNJ d S )Nra  rb  rd  rc  )rG  r   rx   r   r   r   r   r   r   r   r   test_print_constants=  s    r  c                   C   s   t tttjdksJ d S )NzN<mrow><mi>x</mi><mo>&#x2208;</mo><mi mathvariant="normal">&#x2115;</mi></mrow>)rG  r   r   r   r   rz  r   r   r   r   test_print_ContainsD  s    r  c                  C   s&   t ddd} tt| dks"J d S )Nr   F)Zcommutativez<msup><mi>x</mi>&#x2020;</msup>)r   rG  r   rz   r   r   r   r   test_print_DaggerI  s    r  c                  C   sl  t tdd} t tdd}dd }|t| |ddd	ks:J |t| |ddd
ksTJ |t| |dddksnJ |t| |dddksJ t t}t t}t t	}t||dd}t||dd}t||dd}t||dd}	t
||}
|t||dddksJ |t||dddksJ |t||	dddks4J |t||
dddksPJ |t
||dkshJ d S )Nr   r   r   r   c                 S   s   t | ddS )NrR  rS  )r~   r  r   r   r   r5  R  r6  z"test_print_SetOp.<locals>.<lambda>Fr   z<mrow><mrow><mo>{</mo><mn>1</mn><mo>,</mo><mn>3</mn><mo>,</mo><mi>x</mi><mo>}</mo></mrow><mo>&#x222A;</mo><mrow><mo>{</mo><mn>2</mn><mo>,</mo><mn>4</mn><mo>,</mo><mi>y</mi><mo>}</mo></mrow></mrow>z<mrow><mrow><mo>{</mo><mn>1</mn><mo>,</mo><mn>3</mn><mo>,</mo><mi>x</mi><mo>}</mo></mrow><mo>&#x2229;</mo><mrow><mo>{</mo><mn>2</mn><mo>,</mo><mn>4</mn><mo>,</mo><mi>y</mi><mo>}</mo></mrow></mrow>z<mrow><mrow><mo>{</mo><mn>1</mn><mo>,</mo><mn>3</mn><mo>,</mo><mi>x</mi><mo>}</mo></mrow><mo>&#x2216;</mo><mrow><mo>{</mo><mn>2</mn><mo>,</mo><mn>4</mn><mo>,</mo><mi>y</mi><mo>}</mo></mrow></mrow>z<mrow><mrow><mo>{</mo><mn>1</mn><mo>,</mo><mn>3</mn><mo>,</mo><mi>x</mi><mo>}</mo></mrow><mo>&#x2206;</mo><mrow><mo>{</mo><mn>2</mn><mo>,</mo><mn>4</mn><mo>,</mo><mi>y</mi><mo>}</mo></mrow></mrow>z<mrow><mrow><mo>{</mo><mi>a</mi><mo>}</mo></mrow><mo>&#x222A;</mo><mrow><mo>(</mo><mrow><mrow><mo>{</mo><mi>c</mi><mo>}</mo></mrow><mo>&#x2229;</mo><mrow><mo>{</mo><mi>d</mi><mo>}</mo></mrow></mrow><mo>)</mo></mrow></mrow>z<mrow><mrow><mo>{</mo><mi>a</mi><mo>}</mo></mrow><mo>&#x2229;</mo><mrow><mo>(</mo><mrow><mrow><mo>{</mo><mi>c</mi><mo>}</mo></mrow><mo>&#x2216;</mo><mrow><mo>{</mo><mi>d</mi><mo>}</mo></mrow></mrow><mo>)</mo></mrow></mrow>z<mrow><mrow><mo>{</mo><mi>a</mi><mo>}</mo></mrow><mo>&#x2216;</mo><mrow><mo>(</mo><mrow><mrow><mo>{</mo><mi>c</mi><mo>}</mo></mrow><mo>&#x2206;</mo><mrow><mo>{</mo><mi>d</mi><mo>}</mo></mrow></mrow><mo>)</mo></mrow></mrow>z<mrow><mrow><mo>{</mo><mi>a</mi><mo>}</mo></mrow><mo>&#x2206;</mo><mrow><mo>(</mo><mrow><mrow><mo>{</mo><mi>c</mi><mo>}</mo></mrow><mo>&#x00d7;</mo><mrow><mo>{</mo><mi>d</mi><mo>}</mo></mrow></mrow><mo>)</mo></mrow></mrow>z<mrow><mrow><mo>{</mo><mi>a</mi><mo>}</mo></mrow><mo>&#x00d7;</mo><mrow><mo>(</mo><mrow><mrow><mo>{</mo><mi>c</mi><mo>}</mo></mrow><mo>&#x222A;</mo><mrow><mo>{</mo><mi>d</mi><mo>}</mo></mrow></mrow><mo>)</mo></mrow></mrow>)r   r   r   r   r   r   r   r   r<  r=  r   )r  f2Zprntrr   r>  r?  r@  rA  rB  ZD1rC  r   r   r   test_print_SetOpN  sL    



r  c                	   C   sT  t tttdksJ t tttdks0J t tttdksHJ t tttdks`J t tttdksxJ t tt	tttdkdksJ t tt	tdtdk ttd	 kd
ksJ t tt	tttdkdksJ t tt	tdttdk ttd	 kdksJ t t
tdks2J t t
tttdksPJ d S )Nz2<mrow><mi>x</mi><mo>&#x2227;</mo><mi>y</mi></mrow>z2<mrow><mi>x</mi><mo>&#x2228;</mo><mi>y</mi></mrow>z2<mrow><mi>x</mi><mo>&#x22BB;</mo><mi>y</mi></mrow>z2<mrow><mi>x</mi><mo>&#x21D2;</mo><mi>y</mi></mrow>z2<mrow><mi>x</mi><mo>&#x21D4;</mo><mi>y</mi></mrow>r   zt<mrow><mrow><mi>x</mi><mo>=</mo><mi>y</mi></mrow><mo>&#x2227;</mo><mrow><mi>x</mi><mo>></mo><mn>4</mn></mrow></mrow>r   r   z<mrow><mrow><mi>x</mi><mo>=</mo><mn>3</mn></mrow><mo>&#x2227;</mo><mrow><mi>x</mi><mo>></mo><mrow><mi>y</mi><mo>+</mo><mn>1</mn></mrow></mrow><mo>&#x2227;</mo><mrow><mi>y</mi><mo><</mo><mn>3</mn></mrow></mrow>zt<mrow><mrow><mi>x</mi><mo>=</mo><mi>y</mi></mrow><mo>&#x2228;</mo><mrow><mi>x</mi><mo>></mo><mn>4</mn></mrow></mrow>z<mrow><mrow><mi>x</mi><mo>=</mo><mn>3</mn></mrow><mo>&#x2227;</mo><mrow><mo>(</mo><mrow><mrow><mi>x</mi><mo>></mo><mrow><mi>y</mi><mo>+</mo><mn>1</mn></mrow></mrow><mo>&#x2228;</mo><mrow><mi>y</mi><mo><</mo><mn>3</mn></mrow></mrow><mo>)</mo></mrow></mrow>z&<mrow><mo>&#xAC;</mo><mi>x</mi></mrow>zo<mrow><mo>&#xAC;</mo><mrow><mo>(</mo><mrow><mi>x</mi><mo>&#x2227;</mo><mi>y</mi></mrow><mo>)</mo></mrow></mrow>)rG  r   ro   r   r   rl   rk   rq   rp   r   rr   r   r   r   r   test_print_logic  s>    "&
r  c                   C   s   t ttjd  dddksJ t ttjd  ddddks>J t ttjd  ddd	ks\J t ttjd  dddd
ks|J t ttdd dddksJ t ttdd ddddksJ d S )Nr   rR  rS  z#<mroot><mi>x</mi><mn>3</mn></mroot>F)rT  Zroot_notationz:<msup><mi>x</mi><mfrac><mn>1</mn><mn>3</mn></mfrac></msup>contentz;<apply><root/><degree><cn>3</cn></degree><ci>x</ci></apply>zM<apply><power/><ci>x</ci><apply><divide/><cn>1</cn><cn>3</cn></apply></apply>rE  z<<mfrac><mn>1</mn><mroot><mi>x</mi><mn>3</mn></mroot></mfrac>zS<mfrac><mn>1</mn><msup><mi>x</mi><mfrac><mn>1</mn><mn>3</mn></mfrac></msup></mfrac>)r~   r   r   ZOner   r   r   r   r   test_root_notation_print  s$    r  c                  C   sR   t tdd } t| dddks"J t| ddddks8J t| dd	ddksNJ d S )
Nr   r   rR  rS  z:<msup><mi>x</mi><mfrac><mn>5</mn><mn>2</mn></mfrac></msup>T)rT  Zfold_frac_powerszJ<msup><mi>x</mi><mfrac bevelled="true"><mn>5</mn><mn>2</mn></mfrac></msup>F)r   r   r~   r  r   r   r   test_fold_frac_powers_print  s    
r  c                  C   sN   t dd} t| dddksJ t| ddddks4J t| dd	ddksJJ d S )
Nr   r   rR  rS  z#<mfrac><mn>2</mn><mn>5</mn></mfrac>T)rT  Zfold_short_fracz3<mfrac bevelled="true"><mn>2</mn><mn>5</mn></mfrac>F)r   r~   r  r   r   r   test_fold_short_frac_print  s    

r  c                   C   s   t ttdksJ t ttd dks0J t ttdksFJ t ttd dks`J t tttdksxJ t tdtt dksJ d S )	Nz!<mrow><mi>x</mi><mo>!</mo></mrow>r   zc<mrow><mrow><mo>(</mo><mrow><mi>x</mi><mo>+</mo><mn>1</mn></mrow><mo>)</mo></mrow><mo>!</mo></mrow>z"<mrow><mi>x</mi><mo>!!</mo></mrow>zd<mrow><mrow><mo>(</mo><mrow><mi>x</mi><mo>+</mo><mn>1</mn></mrow><mo>)</mo></mrow><mo>!!</mo></mrow>zV<mrow><mo>(</mo><mfrac linethickness="0"><mi>x</mi><mi>y</mi></mfrac><mo>)</mo></mrow>r   zw<mrow><mo>(</mo><mfrac linethickness="0"><mn>4</mn><mrow><mi>x</mi><mo>+</mo><mi>y</mi></mrow></mfrac><mo>)</mo></mrow>)rG  r   r   r   r   r   r   r   r   r   r   test_print_factorials  s    r  c                  C   s    t t} t| dddksJ d S )NrR  rS  z7<mrow><mo>&#8970;</mo><mi>x</mi><mo>&#8971;</mo></mrow>)r<   r   r~   r  r   r   r   test_print_floor  s    
r  c                  C   s    t t} t| dddksJ d S )NrR  rS  z7<mrow><mo>&#8968;</mo><mi>x</mi><mo>&#8969;</mo></mrow>)r;   r   r~   r  r   r   r   test_print_ceiling  s    
r  c                  C   sL   t ttd } t| dddks"J t ttftt } t| dddksHJ d S )Nr   rR  rS  zg<mrow><mo>(</mo><mi>x</mi><mo>&#x21A6;</mo><mrow><mi>x</mi><mo>+</mo><mn>1</mn></mrow><mo>)</mo></mrow>z<mrow><mo>(</mo><mrow><mo>(</mo><mi>x</mi><mo>,</mo><mi>y</mi><mo>)</mo></mrow><mo>&#x21A6;</mo><mrow><mi>x</mi><mo>+</mo><mi>y</mi></mrow><mo>)</mo></mrow>)r   r   r~   r   r  r   r   r   test_print_Lambda  s    

r  c                   C   s4   t ttdksJ t ttd dks0J d S )Nz.<menclose notation="top"><mi>x</mi></menclose>r   zO<mrow><menclose notation="top"><mi>x</mi></menclose><mo>+</mo><mn>1</mn></mrow>)rG  r   r*   r   r   r   r   r   test_print_conjugate  s    r  c                  C   s`   t ddd} ttdddks$J ttd| dks<J tt| d | d d	ks\J d S )
Nr   Trn  r   r   zM<mrow><mo>&#10216;</mo><mn>0</mn><mo>,</mo><mn>1</mn><mo>&#10217;</mo></mrow>zM<mrow><mo>&#10216;</mo><mn>0</mn><mo>,</mo><mi>a</mi><mo>&#10217;</mo></mrow>r   z<mrow><mo>&#10216;</mo><mrow><mi>a</mi><mo>+</mo><mn>1</mn></mrow><mo>,</mo><mrow><mi>a</mi><mo>+</mo><mn>2</mn></mrow><mo>&#10217;</mo></mrow>)r   rG  r   r   rq  r   r   r   test_print_AccumBounds  s    r  c                   C   sz   t tddksJ t tddks,J t tddksBJ t tdt dks\J t td	t d
ksvJ d S )Ng}Ô%ITzL<mrow><mn>1.0</mn><mo>&#xB7;</mo><msup><mn>10</mn><mn>100</mn></msup></mrow>g0.++zM<mrow><mn>1.0</mn><mo>&#xB7;</mo><msup><mn>10</mn><mn>-100</mn></msup></mrow>g}Ô%IzM<mrow><mn>-1.0</mn><mo>&#xB7;</mo><msup><mn>10</mn><mn>100</mn></msup></mrow>r   z<mi>&#x221E;</mi>g      z(<mrow><mo>-</mo><mi>&#x221E;</mi></mrow>)rG  r   r   r   r   r   r   r   test_print_Float   s
    r  c                   C   sD  t ttdksJ t tttdks.J t tttdksFJ t ttdks\J t tttdkstJ t ttdksJ t t	tdksJ t t
tdksJ t ttd	ksJ t ttd
ksJ t ttdksJ t ttdksJ t ttdks(J t ttdks@J d S )NzH<mrow><mi>&#x393;</mi><mrow><mo>(</mo><mi>x</mi><mo>)</mo></mrow></mrow>z\<mrow><mi>&#x3B3;</mi><mrow><mo>(</mo><mi>x</mi><mo>,</mo><mi>y</mi><mo>)</mo></mrow></mrow>z\<mrow><mi>&#x393;</mi><mrow><mo>(</mo><mi>x</mi><mo>,</mo><mi>y</mi><mo>)</mo></mrow></mrow>zH<mrow><mi>&#x3B6;</mi><mrow><mo>(</mo><mi>x</mi><mo>)</mo></mrow></mrow>z\<mrow><mi>&#x3B6;</mi><mrow><mo>(</mo><mi>x</mi><mo>,</mo><mi>y</mi><mo>)</mo></mrow></mrow>zH<mrow><mi>&#x3B7;</mi><mrow><mo>(</mo><mi>x</mi><mo>)</mo></mrow></mrow>zH<mrow><mi>&#x39A;</mi><mrow><mo>(</mo><mi>x</mi><mo>)</mo></mrow></mrow>zH<mrow><mi>&#x3D5;</mi><mrow><mo>(</mo><mi>x</mi><mo>)</mo></mrow></mrow>zH<mrow><mi>&#x3BB;</mi><mrow><mo>(</mo><mi>x</mi><mo>)</mo></mrow></mrow>zH<mrow><mi>&#x3BD;</mi><mrow><mo>(</mo><mi>x</mi><mo>)</mo></mrow></mrow>zH<mrow><mi>&#x3A9;</mi><mrow><mo>(</mo><mi>x</mi><mo>)</mo></mrow></mrow>zB<mrow><mi>S</mi><mrow><mo>(</mo><mi>x</mi><mo>)</mo></mrow></mrow>zB<mrow><mi>C</mi><mrow><mo>(</mo><mi>x</mi><mo>)</mo></mrow></mrow>zu<mrow><mi>&#x398;</mi><mrow><mo>(</mo><mi>x</mi><mo>,</mo><mfrac><mn>1</mn><mn>2</mn></mfrac><mo>)</mo></mrow></mrow>)rG  r   rT   r   rV   r   rU   ri   rh   rN   r&   r'   r$   r%   rQ   rP   rK   r   r   r   r   test_print_different_functions  s    r  c                   C   s:   t d dksJ t tdks$J t tdks6J d S )Nz<mi>None</mi>z<mi>True</mi>z<mi>False</mi>)rG  r   rn   rm   r   r   r   r   test_mathml_builtins  s    r  c                   C   s   t tdddksJ t tdddks0J t tddddksJJ t tdd	dd
ksdJ t td	dddks~J t tdtddksJ t ttdddksJ t tdt ddksJ d S )Nr   3   zn<mrow><mo>{</mo><mn>1</mn><mo>,</mo><mn>2</mn><mo>,</mo><mi>&#8230;</mi><mo>,</mo><mn>50</mn><mo>}</mo></mrow>r   r  r   r   zS<mrow><mo>{</mo><mn>0</mn><mo>,</mo><mn>1</mn><mo>,</mo><mn>2</mn><mo>}</mo></mrow>   zn<mrow><mo>{</mo><mn>0</mn><mo>,</mo><mn>1</mn><mo>,</mo><mi>&#8230;</mi><mo>,</mo><mn>29</mn><mo>}</mo></mrow>rE  zo<mrow><mo>{</mo><mn>30</mn><mo>,</mo><mn>29</mn><mo>,</mo><mi>&#8230;</mi><mo>,</mo><mn>2</mn><mo>}</mo></mrow>r   zY<mrow><mo>{</mo><mn>0</mn><mo>,</mo><mn>2</mn><mo>,</mo><mi>&#8230;</mi><mo>}</mo></mrow>rF  zY<mrow><mo>{</mo><mi>&#8230;</mi><mo>,</mo><mn>2</mn><mo>,</mo><mn>0</mn><mo>}</mo></mrow>z[<mrow><mo>{</mo><mn>-2</mn><mo>,</mo><mn>-3</mn><mo>,</mo><mi>&#8230;</mi><mo>}</mo></mrow>)rG  r   r   r   r   r   r   r   test_mathml_Range  s0    r  c                   C   s8   t ttdksJ t tdtd dks4J d S )Nz.<msup><mi>&ExponentialE;</mi><mi>x</mi></msup>r   r   z\<mrow><mi>&ExponentialE;</mi><mo>+</mo><msup><mi>&ExponentialE;</mi><mn>2</mn></msup></mrow>)rG  r   r,   r   r   r   r   r   test_print_exp2  s    r  c                   C   sp   t tttdksJ t ttdtd dks6J t tttdksNJ t ttdtd dkslJ d S )NzX<mrow><mo>min</mo><mrow><mo>(</mo><mi>x</mi><mo>,</mo><mi>y</mi><mo>)</mo></mrow></mrow>r   r   z<mrow><mo>min</mo><mrow><mo>(</mo><mn>2</mn><mo>,</mo><mi>x</mi><mo>,</mo><msup><mi>x</mi><mn>3</mn></msup><mo>)</mo></mrow></mrow>zX<mrow><mo>max</mo><mrow><mo>(</mo><mi>x</mi><mo>,</mo><mi>y</mi><mo>)</mo></mrow></mrow>z<mrow><mo>max</mo><mrow><mo>(</mo><mn>2</mn><mo>,</mo><mi>x</mi><mo>,</mo><msup><mi>x</mi><mn>3</mn></msup><mo>)</mo></mrow></mrow>)rG  r   r>   r   r   r=   r   r   r   r   test_print_MinMax9  s    r  c                  C   s>  t d} tt| dddks J tt| dddks8J tt| dddksPJ tt| dddkshJ tt| dddksJ tt| dddksJ tt| ddd	ksJ tt| t	ddtt| t	dd  krd
ksn J tt| t	dddksJ tt| t	dddksJ tt| t	dddks:J d S )NnrR  rS  z!<msub><mi>C</mi><mi>n</mi></msub>z!<msub><mi>B</mi><mi>n</mi></msub>z!<msub><mi>E</mi><mi>n</mi></msub>z!<msub><mi>F</mi><mi>n</mi></msub>z!<msub><mi>L</mi><mi>n</mi></msub>z!<msub><mi>T</mi><mi>n</mi></msub>zY<mrow><msub><mi>B</mi><mi>n</mi></msub><mrow><mo>(</mo><mi>x</mi><mo>)</mo></mrow></mrow>zY<mrow><msub><mi>E</mi><mi>n</mi></msub><mrow><mo>(</mo><mi>x</mi><mo>)</mo></mrow></mrow>zY<mrow><msub><mi>F</mi><mi>n</mi></msub><mrow><mo>(</mo><mi>x</mi><mo>)</mo></mrow></mrow>zY<mrow><msub><mi>T</mi><mi>n</mi></msub><mrow><mo>(</mo><mi>x</mi><mo>)</mo></mrow></mrow>)
r   r~   r   r#   r   r    r"   r   r!   r   )r  r   r   r    test_mathml_presentation_numbersD  sH    

r  c                   C   st   t ttttdddksJ t ttttdddks8J t ttttdddksTJ t ttttdddkspJ d S )NrR  rS  zj<mrow><mi>C</mi><mrow><mo>(</mo><mi>x</mi><mo>,</mo><mi>y</mi><mo>,</mo><mi>z</mi><mo>)</mo></mrow></mrow>zj<mrow><mi>S</mi><mrow><mo>(</mo><mi>x</mi><mo>,</mo><mi>y</mi><mo>,</mo><mi>z</mi><mo>)</mo></mrow></mrow>zr<mrow><mi>C&#x2032;</mi><mrow><mo>(</mo><mi>x</mi><mo>,</mo><mi>y</mi><mo>,</mo><mi>z</mi><mo>)</mo></mrow></mrow>zr<mrow><mi>S&#x2032;</mi><mrow><mo>(</mo><mi>x</mi><mo>,</mo><mi>y</mi><mo>,</mo><mi>z</mi><mo>)</mo></mrow></mrow>)r~   rZ   r   r   rU  rX   rY   rW   r   r   r   r    test_mathml_presentation_mathieu_  s    r  c                   C   s6   t ttdddksJ t tttdddks2J d S )NrR  rS  z(<msub><mi>&#x03B3;</mi><mi>n</mi></msub>z`<mrow><msub><mi>&#x03B3;</mi><mi>n</mi></msub><mrow><mo>(</mo><mi>x</mi><mo>)</mo></mrow></mrow>)r~   rf   r  r   r   r   r   r   "test_mathml_presentation_stieltjesj  s    r  c                  C   s^   t ddd} t| dksJ t| dks0J t| dddd	ksFJ t| dd
dksZJ d S )Nr   r   r   z
<mi>A</mi>z
<ci>A</ci>rR  Zbold)rT  mat_symbol_stylez<mi mathvariant="bold">A</mi>)r  )ru   rG  r   r   r~   )r   r   r   r   test_print_matrix_symbolq  s    r  c                  C   s   ddl m}  ddl m} tddd}tddd}t| ||| ddd	ksNJ t| ||| ddd
kslJ t| |||dddksJ t|| ||dddksJ d S )Nr   )HadamardProduct)	TransposeXr   YrR  rS  zI<mrow><mi>X</mi><mo>&#x2218;</mo><msup><mi>Y</mi><mn>2</mn></msup></mrow>z<mrow><mrow><mo>(</mo><mrow><mi>X</mi><mo>&#x2218;</mo><mi>Y</mi></mrow><mo>)</mo></mrow><mo>&InvisibleTimes;</mo><mi>Y</mi></mrow>zM<mrow><mi>X</mi><mo>&#x2218;</mo><mi>Y</mi><mo>&#x2218;</mo><mi>Y</mi></mrow>zj<msup><mrow><mo>(</mo><mrow><mi>X</mi><mo>&#x2218;</mo><mi>Y</mi></mrow><mo>)</mo></mrow><mo>T</mo></msup>)Zsympy.matrices.expressionsr  r  ru   r~   )r  r  r  r  r   r   r   test_print_hadamard{  s$    r  c                  C   s4   t td} t| dksJ t| dks0J d S )NRz
<mi>R</mi>z
<ci>R</ci>)r   r   rG  r   r   )r  r   r   r   test_print_random_symbol  s    r  c                   C   sr   t ttt dddksJ t tttttf dddks>J t ttt ttt  tt dddksnJ d S )NrR  rS  z!<msub><mi>a</mi><mi>b</mi></msub>zj<msub><mi>a</mi><mrow><mo>(</mo><mi>b</mi><mo>,</mo><mi>c</mi><mo>,</mo><mi>d</mi><mo>)</mo></mrow></msub>z<mrow><msub><mi>a</mi><mi>b</mi></msub><mo>&InvisibleTimes;</mo><msub><mi>c</mi><mi>d</mi></msub><mo>&InvisibleTimes;</mo><mi>e</mi></mrow>)r~   r   r   r;  r<  r=  er   r   r   r   test_print_IndexedBase  s     r  c                   C   sT   t ttdddksJ t ttt dddks4J t tttfdddksPJ d S )NrR  rS  z
<mi>a</mi>z0<mrow><mfrac><mi>a</mi><mi>b</mi></mfrac></mrow>z?<mrow><mo>(</mo><mi>a</mi><mo>,</mo><mi>b</mi><mo>)</mo></mrow>)r~   r   r   r;  r   r   r   r   test_print_Indexed  s    r  c                  C   sp   t d\} }td| |}t|d dddks0J t|| |f dddksLJ t|| | df ddd	kslJ d S )
Nzi jr   )r   r   rR  rS  zB<msub><mi>A</mi><mrow><mn>0</mn><mo>,</mo><mn>0</mn></mrow></msub>zB<msub><mi>A</mi><mrow><mi>i</mi><mo>,</mo><mi>j</mi></mrow></msub>r   zr<msub><mi>A</mi><mrow><mrow><mi>i</mi><mo>&InvisibleTimes;</mo><mi>j</mi></mrow><mo>,</mo><mn>0</mn></mrow></msub>)r   ru   r~   )ijr   r   r   r   test_print_MatrixElement  s    r  c                  C   s~  t d} tt| j| j| j d | j dddks6J tt| j| jdddksTJ ttt| j| j dddksvJ ttt| j | jdddksJ ttd| j | j ddd	ksJ ttdt | j | j ddd
ksJ tttd| j | j  dddksJ ttdt | j | j | j dddks>J ttd| j | j dddksdJ tttd| j | j  dddksJ ttdt | j | j | j dddksJ tt	| j| j| j d | j dddksJ tt	| j| jdddksJ tt	t| j | jdddks2J ttt	| j| j dddksVJ tt
| jdddksrJ tt
| jd| j  dddksJ ttt
| j dddksJ tt
t| j dddksJ tt| j| jdddksJ tt| jdddksJ tt| jd| j  dddks:J ttt| j dddksZJ ttt| j dddkszJ d S )Nr   r   rR  rS  a%  <mrow><msub><mover><mi mathvariant="bold">i</mi><mo>^</mo></mover><mi mathvariant="bold">A</mi></msub><mo>&#xD7;</mo><mrow><mo>(</mo><mrow><mrow><mo>(</mo><mrow><mn>3</mn><mo>&InvisibleTimes;</mo><msub><mi mathvariant="bold">x</mi><mi mathvariant="bold">A</mi></msub></mrow><mo>)</mo></mrow><mo>&InvisibleTimes;</mo><msub><mover><mi mathvariant="bold">j</mi><mo>^</mo></mover><mi mathvariant="bold">A</mi></msub><mo>+</mo><msub><mover><mi mathvariant="bold">k</mi><mo>^</mo></mover><mi mathvariant="bold">A</mi></msub></mrow><mo>)</mo></mrow></mrow>z<mrow><msub><mover><mi mathvariant="bold">i</mi><mo>^</mo></mover><mi mathvariant="bold">A</mi></msub><mo>&#xD7;</mo><msub><mover><mi mathvariant="bold">j</mi><mo>^</mo></mover><mi mathvariant="bold">A</mi></msub></mrow>a-  <mrow><mi>x</mi><mo>&InvisibleTimes;</mo><mrow><mo>(</mo><mrow><msub><mover><mi mathvariant="bold">i</mi><mo>^</mo></mover><mi mathvariant="bold">A</mi></msub><mo>&#xD7;</mo><msub><mover><mi mathvariant="bold">j</mi><mo>^</mo></mover><mi mathvariant="bold">A</mi></msub></mrow><mo>)</mo></mrow></mrow>ae  <mrow><mo>-</mo><mrow><msub><mover><mi mathvariant="bold">j</mi><mo>^</mo></mover><mi mathvariant="bold">A</mi></msub><mo>&#xD7;</mo><mrow><mo>(</mo><mrow><mrow><mo>(</mo><mi>x</mi><mo>)</mo></mrow><mo>&InvisibleTimes;</mo><msub><mover><mi mathvariant="bold">i</mi><mo>^</mo></mover><mi mathvariant="bold">A</mi></msub></mrow><mo>)</mo></mrow></mrow></mrow>al  <mrow><mo>&#x2207;</mo><mo>&#xD7;</mo><mrow><mo>(</mo><mrow><mrow><mo>(</mo><mrow><mn>3</mn><mo>&InvisibleTimes;</mo><msub><mi mathvariant="bold">x</mi><mi mathvariant="bold">A</mi></msub></mrow><mo>)</mo></mrow><mo>&InvisibleTimes;</mo><msub><mover><mi mathvariant="bold">j</mi><mo>^</mo></mover><mi mathvariant="bold">A</mi></msub></mrow><mo>)</mo></mrow></mrow>a  <mrow><mo>&#x2207;</mo><mo>&#xD7;</mo><mrow><mo>(</mo><mrow><mrow><mo>(</mo><mrow><mn>3</mn><mo>&InvisibleTimes;</mo><msub><mi mathvariant="bold">x</mi><mi mathvariant="bold">A</mi></msub><mo>&InvisibleTimes;</mo><mi>x</mi></mrow><mo>)</mo></mrow><mo>&InvisibleTimes;</mo><msub><mover><mi mathvariant="bold">j</mi><mo>^</mo></mover><mi mathvariant="bold">A</mi></msub></mrow><mo>)</mo></mrow></mrow>a  <mrow><mi>x</mi><mo>&InvisibleTimes;</mo><mrow><mo>(</mo><mrow><mo>&#x2207;</mo><mo>&#xD7;</mo><mrow><mo>(</mo><mrow><mrow><mo>(</mo><mrow><mn>3</mn><mo>&InvisibleTimes;</mo><msub><mi mathvariant="bold">x</mi><mi mathvariant="bold">A</mi></msub></mrow><mo>)</mo></mrow><mo>&InvisibleTimes;</mo><msub><mover><mi mathvariant="bold">j</mi><mo>^</mo></mover><mi mathvariant="bold">A</mi></msub></mrow><mo>)</mo></mrow></mrow><mo>)</mo></mrow></mrow>a  <mrow><mo>&#x2207;</mo><mo>&#xD7;</mo><mrow><mo>(</mo><mrow><msub><mover><mi mathvariant="bold">i</mi><mo>^</mo></mover><mi mathvariant="bold">A</mi></msub><mo>+</mo><mrow><mo>(</mo><mrow><mn>3</mn><mo>&InvisibleTimes;</mo><msub><mi mathvariant="bold">x</mi><mi mathvariant="bold">A</mi></msub><mo>&InvisibleTimes;</mo><mi>x</mi></mrow><mo>)</mo></mrow><mo>&InvisibleTimes;</mo><msub><mover><mi mathvariant="bold">j</mi><mo>^</mo></mover><mi mathvariant="bold">A</mi></msub></mrow><mo>)</mo></mrow></mrow>al  <mrow><mo>&#x2207;</mo><mo>&#xB7;</mo><mrow><mo>(</mo><mrow><mrow><mo>(</mo><mrow><mn>3</mn><mo>&InvisibleTimes;</mo><msub><mi mathvariant="bold">x</mi><mi mathvariant="bold">A</mi></msub></mrow><mo>)</mo></mrow><mo>&InvisibleTimes;</mo><msub><mover><mi mathvariant="bold">j</mi><mo>^</mo></mover><mi mathvariant="bold">A</mi></msub></mrow><mo>)</mo></mrow></mrow>a  <mrow><mi>x</mi><mo>&InvisibleTimes;</mo><mrow><mo>(</mo><mrow><mo>&#x2207;</mo><mo>&#xB7;</mo><mrow><mo>(</mo><mrow><mrow><mo>(</mo><mrow><mn>3</mn><mo>&InvisibleTimes;</mo><msub><mi mathvariant="bold">x</mi><mi mathvariant="bold">A</mi></msub></mrow><mo>)</mo></mrow><mo>&InvisibleTimes;</mo><msub><mover><mi mathvariant="bold">j</mi><mo>^</mo></mover><mi mathvariant="bold">A</mi></msub></mrow><mo>)</mo></mrow></mrow><mo>)</mo></mrow></mrow>a  <mrow><mo>&#x2207;</mo><mo>&#xB7;</mo><mrow><mo>(</mo><mrow><msub><mover><mi mathvariant="bold">i</mi><mo>^</mo></mover><mi mathvariant="bold">A</mi></msub><mo>+</mo><mrow><mo>(</mo><mrow><mn>3</mn><mo>&InvisibleTimes;</mo><msub><mi mathvariant="bold">x</mi><mi mathvariant="bold">A</mi></msub><mo>&InvisibleTimes;</mo><mi>x</mi></mrow><mo>)</mo></mrow><mo>&InvisibleTimes;</mo><msub><mover><mi mathvariant="bold">j</mi><mo>^</mo></mover><mi mathvariant="bold">A</mi></msub></mrow><mo>)</mo></mrow></mrow>a%  <mrow><msub><mover><mi mathvariant="bold">i</mi><mo>^</mo></mover><mi mathvariant="bold">A</mi></msub><mo>&#xB7;</mo><mrow><mo>(</mo><mrow><mrow><mo>(</mo><mrow><mn>3</mn><mo>&InvisibleTimes;</mo><msub><mi mathvariant="bold">x</mi><mi mathvariant="bold">A</mi></msub></mrow><mo>)</mo></mrow><mo>&InvisibleTimes;</mo><msub><mover><mi mathvariant="bold">j</mi><mo>^</mo></mover><mi mathvariant="bold">A</mi></msub><mo>+</mo><msub><mover><mi mathvariant="bold">k</mi><mo>^</mo></mover><mi mathvariant="bold">A</mi></msub></mrow><mo>)</mo></mrow></mrow>z<mrow><msub><mover><mi mathvariant="bold">i</mi><mo>^</mo></mover><mi mathvariant="bold">A</mi></msub><mo>&#xB7;</mo><msub><mover><mi mathvariant="bold">j</mi><mo>^</mo></mover><mi mathvariant="bold">A</mi></msub></mrow>aN  <mrow><msub><mover><mi mathvariant="bold">j</mi><mo>^</mo></mover><mi mathvariant="bold">A</mi></msub><mo>&#xB7;</mo><mrow><mo>(</mo><mrow><mrow><mo>(</mo><mi>x</mi><mo>)</mo></mrow><mo>&InvisibleTimes;</mo><msub><mover><mi mathvariant="bold">i</mi><mo>^</mo></mover><mi mathvariant="bold">A</mi></msub></mrow><mo>)</mo></mrow></mrow>a-  <mrow><mi>x</mi><mo>&InvisibleTimes;</mo><mrow><mo>(</mo><mrow><msub><mover><mi mathvariant="bold">i</mi><mo>^</mo></mover><mi mathvariant="bold">A</mi></msub><mo>&#xB7;</mo><msub><mover><mi mathvariant="bold">j</mi><mo>^</mo></mover><mi mathvariant="bold">A</mi></msub></mrow><mo>)</mo></mrow></mrow>ze<mrow><mo>&#x2207;</mo><msub><mi mathvariant="bold">x</mi><mi mathvariant="bold">A</mi></msub></mrow>a  <mrow><mo>&#x2207;</mo><mrow><mo>(</mo><mrow><msub><mi mathvariant="bold">x</mi><mi mathvariant="bold">A</mi></msub><mo>+</mo><mrow><mn>3</mn><mo>&InvisibleTimes;</mo><msub><mi mathvariant="bold">y</mi><mi mathvariant="bold">A</mi></msub></mrow></mrow><mo>)</mo></mrow></mrow>z<mrow><mi>x</mi><mo>&InvisibleTimes;</mo><mrow><mo>(</mo><mrow><mo>&#x2207;</mo><msub><mi mathvariant="bold">x</mi><mi mathvariant="bold">A</mi></msub></mrow><mo>)</mo></mrow></mrow>z<mrow><mo>&#x2207;</mo><mrow><mo>(</mo><mrow><msub><mi mathvariant="bold">x</mi><mi mathvariant="bold">A</mi></msub><mo>&InvisibleTimes;</mo><mi>x</mi></mrow><mo>)</mo></mrow></mrow>z<mrow><mo>-</mo><mrow><msub><mi mathvariant="bold">x</mi><mi mathvariant="bold">A</mi></msub><mo>&#xD7;</mo><msub><mi mathvariant="bold">z</mi><mi mathvariant="bold">A</mi></msub></mrow></mrow>ze<mrow><mo>&#x2206;</mo><msub><mi mathvariant="bold">x</mi><mi mathvariant="bold">A</mi></msub></mrow>a  <mrow><mo>&#x2206;</mo><mrow><mo>(</mo><mrow><msub><mi mathvariant="bold">x</mi><mi mathvariant="bold">A</mi></msub><mo>+</mo><mrow><mn>3</mn><mo>&InvisibleTimes;</mo><msub><mi mathvariant="bold">y</mi><mi mathvariant="bold">A</mi></msub></mrow></mrow><mo>)</mo></mrow></mrow>z<mrow><mi>x</mi><mo>&InvisibleTimes;</mo><mrow><mo>(</mo><mrow><mo>&#x2206;</mo><msub><mi mathvariant="bold">x</mi><mi mathvariant="bold">A</mi></msub></mrow><mo>)</mo></mrow></mrow>z<mrow><mo>&#x2206;</mo><mrow><mo>(</mo><mrow><msub><mi mathvariant="bold">x</mi><mi mathvariant="bold">A</mi></msub><mo>&InvisibleTimes;</mo><mi>x</mi></mrow><mo>)</mo></mrow></mrow>)r   r~   r   r  r  r   kr   r   r   r   r   rU  r   ZACSr   r   r   test_print_Vector  s    $

$
	

$

$












r  c                  C   s8   t d} tt| j| jt| j| j dddks4J d S )Nr   rR  rS  z6<mover><mi mathvariant="bold">0</mi><mo>^</mo></mover>)r   r~   r   r   rU  r  r   r   r   test_vector_cross_xfailY  s    "r  c                   C   s<   t tttdddksJ t ttt tdddks8J d S )NrR  rS  z^<mrow><mi>&#x1d5a5;</mi><mrow><mo>(</mo><mi>x</mi><mo>|</mo><mi>y</mi><mo>)</mo></mrow></mrow>z<mrow><mi>&#x1d5a5;</mi><mrow><mo>(</mo><mrow><mfrac><mi>x</mi><mi>y</mi></mfrac></mrow><mo>|</mo><mi>y</mi><mo>)</mo></mrow></mrow>)r~   rM   r   r   r   r   r   r   test_print_elliptic_f_  s    r  c                   C   s6   t ttdddksJ t tttdddks2J d S )NrR  rS  zJ<mrow><mi>&#x1d5a4;</mi><mrow><mo>(</mo><mi>x</mi><mo>)</mo></mrow></mrow>z^<mrow><mi>&#x1d5a4;</mi><mrow><mo>(</mo><mi>x</mi><mo>|</mo><mi>y</mi><mo>)</mo></mrow></mrow>)r~   rO   r   r   r   r   r   r   test_print_elliptic_ee  s    r  c                   C   s:   t tttdddksJ t ttttdddks6J d S )NrR  rS  z^<mrow><mi>&#x1d6f1;</mi><mrow><mo>(</mo><mi>x</mi><mo>|</mo><mi>y</mi><mo>)</mo></mrow></mrow>zr<mrow><mi>&#x1d6f1;</mi><mrow><mo>(</mo><mi>x</mi><mo>;</mo><mi>y</mi><mo>|</mo><mi>z</mi><mo>)</mo></mrow></mrow>)r~   rL   r   r   rU  r   r   r   r   test_print_elliptic_pik  s    r  c                   C   s8   t ttdddksJ t ttt dddks4J d S )NrR  rS  zC<mrow><mi>Ei</mi><mrow><mo>(</mo><mi>x</mi><mo>)</mo></mrow></mrow>zZ<mrow><mi>Ei</mi><mrow><mo>(</mo><msup><mi>x</mi><mi>y</mi></msup><mo>)</mo></mrow></mrow>)r~   rR   r   r   r   r   r   r   test_print_Eiq  s    r  c                   C   sH   t tttdddksJ t tttd ttd dddksDJ d S )NrR  rS  zY<mrow><msub><mo>E</mo><mi>x</mi></msub><mrow><mo>(</mo><mi>y</mi><mo>)</mo></mrow></mrow>r   r   z<mrow><msub><mo>E</mo><msub><mi>x</mi><mn>1</mn></msub></msub><mrow><mo>(</mo><msub><mi>x</mi><mn>2</mn></msub><mo>)</mo></mrow></mrow>)r~   rS   r   r   r   r   r   r   r   test_print_expintw  s     r  c                   C   s"   t tttttdddksJ d S )NrR  rS  z<mrow><msubsup><mo>P</mo><mi>n</mi><mrow><mo>(</mo><mi>a</mi><mo>,</mo><mi>b</mi><mo>)</mo></mrow></msubsup><mrow><mo>(</mo><mi>x</mi><mo>)</mo></mrow></mrow>)r~   r[   r  r   r;  r   r   r   r   r   test_print_jacobi}  s    r  c                   C   s    t ttttdddksJ d S )NrR  rS  z<mrow><msubsup><mo>C</mo><mi>n</mi><mrow><mo>(</mo><mi>a</mi><mo>)</mo></mrow></msubsup><mrow><mo>(</mo><mi>x</mi><mo>)</mo></mrow></mrow>)r~   r`   r  r   r   r   r   r   r   test_print_gegenbauer  s    r  c                   C   s   t tttdddksJ d S )NrR  rS  zY<mrow><msub><mo>T</mo><mi>n</mi></msub><mrow><mo>(</mo><mi>x</mi><mo>)</mo></mrow></mrow>)r~   r]   r  r   r   r   r   r   test_print_chebyshevt  s    r  c                   C   s   t tttdddksJ d S )NrR  rS  zY<mrow><msub><mo>U</mo><mi>n</mi></msub><mrow><mo>(</mo><mi>x</mi><mo>)</mo></mrow></mrow>)r~   r\   r  r   r   r   r   r   test_print_chebyshevu  s    r  c                   C   s   t tttdddksJ d S )NrR  rS  zY<mrow><msub><mo>P</mo><mi>n</mi></msub><mrow><mo>(</mo><mi>x</mi><mo>)</mo></mrow></mrow>)r~   rb   r  r   r   r   r   r   test_print_legendre  s    r  c                   C   s    t ttttdddksJ d S )NrR  rS  z<mrow><msubsup><mo>P</mo><mi>n</mi><mrow><mo>(</mo><mi>a</mi><mo>)</mo></mrow></msubsup><mrow><mo>(</mo><mi>x</mi><mo>)</mo></mrow></mrow>)r~   r_   r  r   r   r   r   r   r   test_print_assoc_legendre  s    r  c                   C   s   t tttdddksJ d S )NrR  rS  zY<mrow><msub><mo>L</mo><mi>n</mi></msub><mrow><mo>(</mo><mi>x</mi><mo>)</mo></mrow></mrow>)r~   rc   r  r   r   r   r   r   test_print_laguerre  s    r  c                   C   s    t ttttdddksJ d S )NrR  rS  z<mrow><msubsup><mo>L</mo><mi>n</mi><mrow><mo>(</mo><mi>a</mi><mo>)</mo></mrow></msubsup><mrow><mo>(</mo><mi>x</mi><mo>)</mo></mrow></mrow>)r~   ra   r  r   r   r   r   r   r   test_print_assoc_laguerre  s    r  c                   C   s   t tttdddksJ d S )NrR  rS  zY<mrow><msub><mo>H</mo><mi>n</mi></msub><mrow><mo>(</mo><mi>x</mi><mo>)</mo></mrow></mrow>)r~   r^   r  r   r   r   r   r   test_print_hermite  s    r  c                   C   s   t ttdddddksJ t ttdddddks8J t ttddddd	ksTJ t ttttddd
kspJ t ttdddddksJ t ttdddddksJ d S )Nr   r   rR  rS  zq<msup><mrow><mo>&#10216;</mo><mrow><mi>x</mi><mo>-</mo><mn>4</mn></mrow><mo>&#10217;</mo></mrow><mn>5</mn></msup>zq<msup><mrow><mo>&#10216;</mo><mrow><mi>x</mi><mo>+</mo><mn>3</mn></mrow><mo>&#10217;</mo></mrow><mn>4</mn></msup>r   zP<msup><mrow><mo>&#10216;</mo><mi>x</mi><mo>&#10217;</mo></mrow><mn>4</mn></msup>z<msup><mrow><mo>&#10216;</mo><mrow><mrow><mo>-</mo><mi>a</mi></mrow><mo>+</mo><mi>x</mi></mrow><mo>&#10217;</mo></mrow><mi>n</mi></msup>rF  zr<msup><mrow><mo>&#10216;</mo><mrow><mi>x</mi><mo>-</mo><mn>4</mn></mrow><mo>&#10217;</mo></mrow><mn>-2</mn></msup>rE  zr<msup><mrow><mo>&#10216;</mo><mrow><mi>x</mi><mo>-</mo><mn>4</mn></mrow><mo>&#10217;</mo></mrow><mn>-1</mn></msup>)r~   rd   r   r   r  r   r   r   r   test_mathml_SingularityFunction  s$    r  c                  C   s  ddl m} m}m} tddd}tddd}t| |dddksDJ t| || ddd	ks`J t| || | ddd
ksJ t| || dddksJ t| || | dddksJ t| |d dddksJ t| |d dddksJ t| ||dddksJ t|| |dddks0J t| ||dddksNJ t|| |dddkslJ t|| || dddksJ t||dddksJ t||| dddksJ d S )Nr   )AdjointInverser  r  r   r  rR  rS  z(<msup><mi>X</mi><mo>&#x2020;</mo></msup>zj<msup><mrow><mo>(</mo><mrow><mi>X</mi><mo>+</mo><mi>Y</mi></mrow><mo>)</mo></mrow><mo>&#x2020;</mo></msup>zg<mrow><msup><mi>X</mi><mo>&#x2020;</mo></msup><mo>+</mo><msup><mi>Y</mi><mo>&#x2020;</mo></msup></mrow>zy<msup><mrow><mo>(</mo><mrow><mi>X</mi><mo>&InvisibleTimes;</mo><mi>Y</mi></mrow><mo>)</mo></mrow><mo>&#x2020;</mo></msup>zv<mrow><msup><mi>Y</mi><mo>&#x2020;</mo></msup><mo>&InvisibleTimes;</mo><msup><mi>X</mi><mo>&#x2020;</mo></msup></mrow>z`<msup><mrow><mo>(</mo><msup><mi>X</mi><mn>2</mn></msup><mo>)</mo></mrow><mo>&#x2020;</mo></msup>z`<msup><mrow><mo>(</mo><msup><mi>X</mi><mo>&#x2020;</mo></msup><mo>)</mo></mrow><mn>2</mn></msup>za<msup><mrow><mo>(</mo><msup><mi>X</mi><mn>-1</mn></msup><mo>)</mo></mrow><mo>&#x2020;</mo></msup>za<msup><mrow><mo>(</mo><msup><mi>X</mi><mo>&#x2020;</mo></msup><mo>)</mo></mrow><mn>-1</mn></msup>z`<msup><mrow><mo>(</mo><msup><mi>X</mi><mo>T</mo></msup><mo>)</mo></mrow><mo>&#x2020;</mo></msup>z`<msup><mrow><mo>(</mo><msup><mi>X</mi><mo>&#x2020;</mo></msup><mo>)</mo></mrow><mo>T</mo></msup>z<msup><mrow><mo>(</mo><mrow><msup><mi>X</mi><mo>&#x2020;</mo></msup><mo>+</mo><mi>Y</mi></mrow><mo>)</mo></mrow><mo>T</mo></msup>z!<msup><mi>X</mi><mo>T</mo></msup>zc<msup><mrow><mo>(</mo><mrow><mi>X</mi><mo>+</mo><mi>Y</mi></mrow><mo>)</mo></mrow><mo>T</mo></msup>)sympy.matricesr  r  r  ru   r~   )r  r  r  r  r  r   r   r   test_mathml_matrix_functions  sZ    





r  c                  C   sd   ddl m} m}m} t| ddddks,J t|dddddksFJ t|ddddd	ks`J d S )
Nr   Identity
ZeroMatrix	OneMatrixr   rR  rS  z<mi>&#x1D540;</mi>r   z<mn>&#x1D7D8</mn>z<mn>&#x1D7D9</mn>)r  r  r  r  r~   r  r   r   r   test_mathml_special_matrices  s    r  c                      sH   ddl m  t ttdkftd dfdks2J tt fdd d S )	Nr   	Piecewiser   r   Tz<piecewise><piece><ci>x</ci><apply><leq/><ci>x</ci><cn>1</cn></apply></piece><otherwise><apply><power/><ci>x</ci><cn>2</cn></apply></otherwise></piecewise>c                      s   t  ttdkfS r   r4  r   r  r   r   r5    r6  z'test_mathml_piecewise.<locals>.<lambda>)Z$sympy.functions.elementary.piecewiser  r~   r   r   
ValueErrorr   r   r  r   test_mathml_piecewise  s
    r  c                   C   s>   t tt tdddksJ t ttt ddddks:J d S )NrR  rS  z<mrow><mo>{</mo><mi>&#8230;</mi><mo>,</mo><mn>-1</mn><mo>,</mo><mn>0</mn><mo>,</mo><mn>1</mn><mo>,</mo><mi>&#8230;</mi><mo>}</mo></mrow>rE  z<mrow><mo>{</mo><mi>&#8230;</mi><mo>,</mo><mn>1</mn><mo>,</mo><mn>0</mn><mo>,</mo><mn>-1</mn><mo>,</mo><mi>&#8230;</mi><mo>}</mo></mrow>)r~   r   r   r   r   r   r   test_issue_17857  s    r  c                  C   s,   t d} tt| d}| |ks(J d S )Ng@;?z</cn>)r   floatr   r   strip)r   r   r   r   r   test_float_roundtrip  s    r  c                  C   sd   t  } | tddksJ t ddi} | tddks>J t ddi} | tddks`J d S )Nu_bzB<ci><mml:msub><mml:mi>u</mml:mi><mml:mi>b</mml:mi></mml:msub></ci>disable_split_super_subFTz<ci>u_b</ci>)r}   r   r   )r   r   r   r   +test_content_mathml_disable_split_super_sub  s    r  c                  C   sd   t  } | tddksJ t ddi} | tddks>J t ddi} | tddks`J d S )Nr  z!<msub><mi>u</mi><mi>b</mi></msub>r  FTz<mi>u_b</mi>)r{   r   r   )rG  r   r   r   0test_presentation_mathml_disable_split_super_sub  s    r  N(4  Z!sympy.calculus.accumulationboundsr   Zsympy.concrete.summationsr   Zsympy.core.basicr   Zsympy.core.containersr   Zsympy.core.functionr   r   r   r	   Zsympy.core.numbersr
   r   r   r   r   r   r   r   Zsympy.core.relationalr   r   r   r   Zsympy.core.singletonr   Zsympy.core.symbolr   r   Zsympy.core.sympifyr   Z(sympy.functions.combinatorial.factorialsr   r   r   Z%sympy.functions.combinatorial.numbersr   r   r   r    r!   r"   r#   r$   r%   r&   r'   Z$sympy.functions.elementary.complexesr(   r)   r*   r+   Z&sympy.functions.elementary.exponentialr,   r-   r.   Z%sympy.functions.elementary.hyperbolicr/   r0   r1   r2   r3   r4   r5   r6   r7   r8   r9   r:   Z#sympy.functions.elementary.integersr;   r<   Z(sympy.functions.elementary.miscellaneousr=   r>   Z(sympy.functions.elementary.trigonometricr?   r@   rA   rB   rC   rD   rE   rF   rG   rH   rI   rJ   Z'sympy.functions.special.delta_functionsrK   Z*sympy.functions.special.elliptic_integralsrL   rM   rN   rO   Z'sympy.functions.special.error_functionsrP   rQ   rR   rS   Z'sympy.functions.special.gamma_functionsrT   rU   rV   Z)sympy.functions.special.mathieu_functionsrW   rX   rY   rZ   Z#sympy.functions.special.polynomialsr[   r\   r]   r^   r_   r`   ra   rb   rc   Z-sympy.functions.special.singularity_functionsrd   Z&sympy.functions.special.zeta_functionsre   rf   rg   rh   ri   Zsympy.integrals.integralsrj   Zsympy.logic.boolalgrk   rl   rm   rn   ro   rp   rq   rr   Zsympy.matrices.densers   Z&sympy.matrices.expressions.determinantrt   Z"sympy.matrices.expressions.matexprru   Zsympy.physics.quantumrv   rw   rx   ry   rz   Zsympy.printing.mathmlr{   r|   r}   r~   Zsympy.series.limitsr   Zsympy.sets.containsr   Zsympy.sets.fancysetsr   Zsympy.sets.setsr   r   r   r   r   r   r   Zsympy.stats.rvr   Zsympy.tensor.indexedr   Zsympy.vectorr   r   r   r   r   r   r   Zsympy.testing.pytestr   r   r   r   rU  r   r;  r<  r=  r  r  r   rG  r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r)  r1  r9  r:  rD  rH  rN  rP  rV  rW  rY  rZ  r\  r_  r`  re  rf  ri  rj  rk  rm  rr  rs  rt  ru  rv  rw  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  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   <module>   s6  (488,($$%

%
	 J"k9d
#	)
&&Z9
	


=
!








	













'




 















&

	