U
    	-eRq                    @   sD  d Z ddlmZmZ 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mZmZmZ ddlmZ dd	lmZmZmZmZmZmZmZmZ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- ddl.m/Z/m0Z0 ddl1m2Z2m3Z3m4Z4m5Z5 ddl6m7Z7m8Z8m9Z9 ddl:m;Z;m<Z<m=Z=m>Z> ddl?m@Z@mAZA ddlBmCZCmDZDmEZE ddlFmGZG ddlHmIZImJZJmKZKmLZLmMZMmNZNmOZOmPZPmQZQmRZR ddlSmTZT ddlUmVZV ddlWmXZXmYZY ddlZm[Z[m\Z\ ddl]m^Z^ ddl_m`Z`maZa ddlbmcZc ddldmeZe ddlfmgZg ddlhmiZimjZj dd lkmlZl dd!lmmnZompZqmrZsmtZu dd"lvmwZwmxZx dd#lymzZz dd$l{m|Z| dd%l}m~Z~ dd&lmZ dd'lmZ dd(lmZmZmZmZ dd)lmZ dd*lmZ dd+lmZ dd,lmZ dd-lmZ dd.lmZmZmZmZ dd/lmZ dd0lmZ dd1lmZmZ dd2lmZ dd3lmZmZ dd4lmZ dd5lmZ dd6lmZ dd7lZdd8l.mZ dd9lUmZ dd:lmZmZmZ dd;lbmZ dd<lmZmZmZmZmZmZ dd=lmZ dd>lmZmZ dd?lmZmZmZ dd@lmZmZ ddAlmZmZ ddBlmZ ddClmZ ddDlmZ ddElmZ ddFlmZ ddGlmZ ddHlmZ ddIlmZmZmZmZmZ ddJlmZ ddKlmZmZmZ ddLlmZ ddMl mZ ddNlmZmZ ddOlmZ ddPlmZ ddQlmZ e$jZeZe(dR\ZZZe(dSdTdU\ZZZZZZedVZedWZdXdY ZdZd[ Zd\d] Zd^d_ Zd`da Zdbdc Zddde Zdfdg Zdhdi Z djdk Zdldm Zdndo Zdpdq Zdrds Zdtdu Zdvdw Zdxdy Zdzd{ Z	d|d} Z
d~d Zdd Zdd Zedd Zdd Zdd Zedd Zdd Zedd Zdd Zdd Zdd Zdd Zedd Zedd Zedd Zedd Zedd Zedd Zedd Zedd Zedd Z dd Z!dd Z"edd Z#edd Z$edd Z%dd Z&dd Z'dd Z(dd Z)dd Z*edd Z+edd Z,ddÄ Z-ddń Z.ddǄ Z/ddɄ Z0edd˄ Z1dd̈́ Z2eddτ Z3ddф Z4ddӄ Z5ddՄ Z6ddׄ Z7ded  ded   ded   ded   ded   d Z8ded  ded   ded   ded   ded   ded   d Z9ded  ded   ded   ded   de  d Z:dd Z;dd Z<dd Z=dd Z>dd Z?dd Z@dd  ZAdd ZBedd ZCdd ZDdd ZEd	d
 ZFdd ZGedd ZHdd ZIedd ZJedd ZKdd ZLdd ZMdd ZNdd ZOdd ZPdd  ZQed!d" ZRed#d$ ZSd%d& ZTd'd( ZUed)d* ZVd+d, ZWd-d. ZXed/d0 ZYd1d2 ZZd3d4 Z[ed5d6 Z\ed7d8 Z]ed9d: Z^ed;d< Z_ed=d> Z`d?d@ ZaedAedBdC ZbedDdE ZcdFdG ZddHdI ZeedJdK ZfdLdM ZgdNdO ZhdPdQ ZidRdS ZjdTdU ZkdVdW ZldXdY ZmdZd[ Zned\d] Zod^d_ Zpd`da Zqedbdc Zreddde Zsdfdg Ztedhdi Zudjdk Zvdldm Zwedndo Zxdpdq Zydrds Zzdtdu Z{dvdw Z|dxdy Z}dzd{ Z~d|d} Zd~d Zdd Zdd Zdd Zedd Zdd Zedd Zedd Zedd Zedd Zdd Zedd Zdd Zdd Zedd Zedd Zdd Zedd Zdd Zedd Zedd Zdd Zedd Zedd Zedd Zdd Zdd Zdd Zdd Zdd Zdd Zdd Zdd Zdd ZeddÄ ZdĐdń ZdƐdǄ ZdȐdɄ Zedʐd˄ Zed̐d̈́ Zedΐdτ ZdАdф ZdҐdӄ ZdԐdՄ Zd֐dׄ Zdؐdل Zdڐdۄ Zedܐd݄ Zedސd߄ Zedd Zedd Zeedd Zedd Zeedd Zdd Zdd Zdd Zdd Zdd Zedd Zdd Zdd Zedd Zdd Zdd Zed d Zdd Zedd ZÐdd ZĐdd	 ZŐd
d ZƐdd Zedd ZȐdd Zɐdd Zʐdd Zːdd Z̐dd Zedd Zedd Zϐdd ZАd d! Zѐd"d# ZҐd$d% ZӐd&d' ZԐd(d) ZՐd*d+ Z֐d,d- Zאd.d/ Zed0d1 Zِd2d3 Zڐd4d5 Zېd6d7 Zܐd8d9 Zݐd:d; Zސd<d= Zߐd>d? Zed@dA ZedBdC ZdDdE ZedFdG ZdHdI ZdJdK ZedLdM ZedNdO ZedPdQ ZdRdS ZedTdU ZedVdW ZdXdY ZdZd[ Zd\d] Zd^d_ Zd`da Zdbdc Zeddde Zedfdg Zedhdi Zedjdk Zedldm Zdndo Zdpdq Zedrds Zdtdu Zedvdw Zedxdy Zedzd{ Zed|d} Zed~d Z edd Zdd Zdd Zdd Zeedd Zedd Zedd Zedd Zdd Z	dd Z
dd Zdd Zdd Zdd Zedd Zedd Zedd Zedd Zedd Zdd Zdd Zdd Zdd Zdd Zdd Zdd Zdd Zedd Zedd Zedd Zdd Zdd Z dd Z!ddÄ Z"dĐdń Z#dƐdǄ Z$edȐdɄ Z%dʐd˄ Z&d̐d̈́ Z'edΐdτ Z(dАdф Z)dҐdӄ Z*dԐdՄ Z+ed֐dׄ Z,edؐdل Z-dڐdۄ Z.edܐd݄ Z/edސd߄ Z0edd Z1edd Z2dd Z3dd Z4dd Z5dd Z6edd Z7edd Z8dd Z9edd Z:dd Z;dd Z<dd Z=edd Z>eedd Z?dd Z@ed d ZAedd ZBedd ZCedd ZDeedd	 ZEeed
d ZFeedd ZGeedd ZHdd ZIedd ZJeedd ZKedd ZLedd ZMdd ZNedd ZOdd ZPed d! ZQd"d# ZRd$d% ZSd&d' ZTed(d) ZUed*d+ ZVd,d- ZWd.d/ ZXed0d1 ZYd2d3 ZZeed4d5 Z[eed6d7 Z\d8d9 Z]d:d; Z^d<d= Z_d>d? Z`d@dA ZadBdC ZbedDdE ZcdFdG ZddHdI ZedJdK ZfdLdM ZgdNdO ZhdPdQ ZiedRdS ZjdTdU ZkedVdW ZledXdYdZ Zmd[d\ Zned]d^ Zoed_d` Zpedadb Zqedcdd Zrdedf Zsedgdh Ztdidj Zudkdl Zvdmdn Zwdodp Zxdqdr Zyedsdt Zzedudv Z{dwdx Z|dydz Z}ed{ed|d} Z~ed~d Zedd Zedd Zdd Zdd Zdd Zedd Zedd Zedd Zd7S (  z Tests from Michael Wester's 1999 paper "Review of CAS mathematical
capabilities".

http://www.math.unm.edu/~wester/cas/book/Wester.pdf
See also http://math.unm.edu/~wester/cas_review.html for detailed output of
each tested system.
    )Qask)refine)product)
EulerGamma)N)
DerivativeFunctionLambdaSubsdiffexpandexpand_func)Mul)	AlgebraicNumberEIRationaligcdnanoopizoo)EqLt)S)DummySymbolsymbols)rfbinomial	factorial
factorial2)	bernoulli	fibonacci)	conjugateimresign)LambertWexplog)asinhcoshsinhtanh)ceilingfloor)MaxMinsqrt)	Piecewise)
acosacotasinatancoscotcscsecsintan)besselj)
DiracDelta)
elliptic_e
elliptic_f)gamma	polygamma)hyper)assoc_legendre
chebyshevt)polylog)idiff)And)hessian	wronskian)MatMul)continued_fraction_convergentscontinued_fraction_iteratorcontinued_fraction_periodiccontinued_fraction_reduce)	factorinttotient)
primerange)npartitions)ZZ)legendre_poly)apart)Polyfactorgcd	resultant)limit)O)residue)series)ImageSet)	FiniteSetIntersectionIntervalUnion)combsimp)hyperexpand)	powdenestpowsimp)radsimp)
logcombinesimplify)
sqrtdenest)trigsimp)solveN)stirling)	Heaviside)CiSierf)zeta)XFAILslowSKIPskipON_CIraises)
partitions)mpimpc)MatrixGramSchmidteye)BlockMatrixblock_collapse)MatrixSymbol
ZeroMatrix)
Commutator)PolyRing)	FracField)solve_lin_sys)Sum)Product)	integrate)laplace_transforminverse_laplace_transformLaplaceTransformfourier_transformmellin_transform)rsolve)solvesetsolveset_reallinsolve)dsolve)Equality)islice	takewhile)fps)fourier_series)minimumx y zzi j k l m nTintegerfgc                   C   sB   t ttttttt tttB t tttB t tttttks>td S Nrc   ijklmAssertionError r   r   b/var/www/html/Darija-Ai-Train/env/lib/python3.8/site-packages/sympy/utilities/tests/test_wester.pytest_B1w   s
    
r   c                   C   sN   t ttttttt ttt@ t ttt@ ttthttthttthksJtd S r   )rc   r   r   r   r   r   rd   r   r   r   r   r   test_B2|   s
    
r   c                   C   s.   t tttttt t t ttttks*td S r   r   r   r   r   r   test_B3   s    r   c                   C   s>   t t ttt tt  t ttfttfttfttfks:td S r   )rc   r   r   r   r   r   r   r   r   r   test_B4   s    r   c                   C   s   t ddkstd S )N2   l         <:.kjFt=VfvaI= )r!   r   r   r   r   r   test_C1   s    r   c                   C   s8   t tddddddddddd	d	d	d	d	d	d
ks4td S )Nr   /                        )r   r                              %   )   +   r   )rS   r!   r   r   r   r   r   test_C2   s             r   c                   C   s   t dt dfdkstd S )N
   	   )i   i  )r"   r   r   r   r   r   test_C3   s    r   c                   C   s   ddkst d S )Ni
  )r   r   r   r   r   test_C4   s    r   c                   C   s   dt ddkstd S )N{   Z234r   intr   r   r   r   r   test_C5   s    r   c                   C   s*   t ddt dd  kr dks&n td S )NZ677r   Z1BF   i  r   r   r   r   r   test_C6   s    r   c                   C   s   t dddkstd S )Ni   r   r   )r+   r   r   r   r   r   test_C7   s    r   c                   C   s,   t dddkstt dddks(td S )Nr   r   r      )rW   invertr   r   r   r   r   test_C8   s    r   c                   C   s   t t ddddkstd S )N  i  iB  J   )r   r   r   r   r   r   test_C9   s    r   c                  C   s8   d} t ddD ]}| td|7 } q| tddks4td S )Nr   r   r   r   i  i	  )rangeRr   )xnr   r   r   test_C10   s    r   c                   C   s   t ddtdkstd S )Nr   r   z
0.[142857])r   r   r   r   r   r   r   test_C11   s    r   c                   C   s    t ddt dd dkstd S )Nr   r   r   r   r   r   r   r   r   r   test_C12   s    r   c                  C   s@   t dddt dd t dd  } dt dd }| |ks<td S )Nr   r   r   r   i  r   r   testZgoodr   r   r   test_C13   s    "r   c                   C   s,   t tdtd d dtd ks(td S )Nr   r   r   r   rn   r4   r   r   r   r   r   test_C14   s    r   c                  C   sX   t tddtddtddtddtd        } tdd }| |ksTtd S )N   r   r   r   r   r   r   r   r   r   test_C15   s    <r   c                  C   sX   t tddtd  dtd  dtd  } tdtd td }| |ksTtd S )Nr   r   r      r   r   r   r   r   r   r   test_C16   s    0r   c                  C   sD   t tdtd tdtd  } ddtd  }| |ks@td S )Nr   r   r   r   )rk   r4   r   r   r   r   r   test_C17   s    $r   c                   C   s8   t tdtd tdtd  jdddks4td S )NTcomplexr   )rm   r4   r   r   r   r   r   r   test_C18   s    r   c                   C   s6   t tddtd  tdd dtd ks2td S )NZ   "   r   r   r   )rk   rm   r4   r   r   r   r   r   r   test_C19   s    r   c                  C   sT   ddt d  } t| tdd d t d | tdd  }t|tdksPtd S )N   N   r   r   r   r   )r4   r   r   rm   r   )Zinsider   r   r   r   test_C20   s    ,r   c                   C   s:   t tddtd  tdd tdtd ks6td S )Nr   r   r   r   r   )rm   r   r4   r   r   r   r   r   r   test_C21   s     r   c                  C   s   t ddtd  tddtd   ddtd  tddtd    d dtd  d	td d
  } tdd ttdd d  }| |kstd S )Nr   r   r   r   r   r          0   H   r   )rm   r4   r+   r   r   r   r   r   test_C22   s    6

 r   c                   C   s   dt  d t kstd S )Nr   r   )r   r   r   r   r   r   test_C23  s    r   c                   C   s   t dd S )Nz2**aleph_null == aleph_1NotImplementedErrorr   r   r   r   test_C24	  s    r   c                   C   s   dt d dkstd S )N        r   )r4   r   r   r   r   r   test_D1  s    r  c                   C   s   t td dkstd S )Niz3.29683147808856e-434295)strr*   evalfr   r   r   r   r   test_D2  s    r  c                   C   s&   t ttd djds"td S )N   r   l   h	a%)r*   r   r4   r  numaer   r   r   r   r   test_D3  s    r  c                   C   s0   t tdddkstttdddks,td S )Nr   r   r   )r1   r   r   r0   r   r   r   r   test_D4  s    r
  c                   C   s   t dd S )Nz6cubic_spline([1, 2, 4, 5], [1, 4, 2, 3], x)(3) == 27/8r   r   r   r   r   test_D5!  s    r  c                   C   s   t dd S )Nz,translate sum(a[i]*x**i, (i,1,n)) to FORTRANr   r   r   r   r   test_D6&  s    r  c                   C   s   t dd S )Nz&translate sum(a[i]*x**i, (i,1,n)) to Cr   r   r   r   r   test_D7+  s    r  c                   C   s   t dd S )Nz.apply Horner's rule to sum(a[i]*x**i, (i,1,5))r   r   r   r   r   test_D80  s    r  c                   C   s   t dd S )Nztranslate D8 to FORTRANr   r   r   r   r   test_D98  s    r  c                   C   s   t dd S )Nztranslate D8 to Cr   r   r   r   r   test_D10=  s    r  c                   C   s   t dd S )Nz.flops(sum(product(f[i][k], (i,1,k)), (k,1,n)))r   r   r   r   r   test_D11B  s    r  c                   C   sN   t ddt t dd d t ddtd  t ddt  t dd	 ksJtd S )
Nr   r   r   r   r   r   )r~   r   r   r   r   r   r   test_D12H  s    r  c                   C   s   t dd S )Nz:discretize a PDE: diff(f(x,t),t) == diff(diff(f(x,t),x),x)r   r   r   r   r   test_D13M  s    r  c                   C   s&   t tdtdt  dt  ks"td S )Nr   r   r   )r   r   r   r   r   r   r   test_F1W  s    r  c                   C   s.   t ttdttd  td  d ks*td S )Nr   r   r   r   )r   r    r   r   r   r   r   r   test_F2[  s    r  c                   C   s8   t dt tt tdt d  tdt ks4td S Nr   r   )rg   r   r!   r"   r   r   r   r   r   test_F3_  s    r  c                   C   s@   t dt tt tdt d tdtf tdt ks<td S r  )rg   r   r!   r   r   r   r   r   r   r   test_F4d  s    r  c                   C   sN   t ttdd tt tt tdt ddt   ttd  ksJtd S Nr   r   )rD   r   r   r4   r   r!   r   r   r   r   r   test_F5i  s    r  c                  C   sH   dd t dD } ddidddddidddddig}| |ksDtd S )Nc                 S   s   g | ]}|  qS r   )copy).0pr   r   r   
<listcomp>o  s     ztest_F6.<locals>.<listcomp>r   r   )r   r   r   )r   r   )r}   r   )ZpartTestZpartDesiredr   r   r   test_F6n  s    &r"  c                   C   s   t ddkstd S )Nr   r   )rV   r   r   r   r   r   test_F7t  s    r#  c                   C   s   t dddddkstd S )Nr   r   T)signedi)rq   r   r   r   r   r   test_F8x  s    r%  c                   C   s   t ddkstd S )Nr   i@  )rT   r   r   r   r   r   test_F9|  s    r&  c                   C   s   t tddddgkstd S )N/B iDB iCB )listrU   r   r   r   r   r   test_G1  s    r)  c                   C   s   t dd S )Nz$find the primitive root of 191 == 19r   r   r   r   r   test_G2  s    r*  c                   C   s   t dd S )Nz,(a+b)**p mod p == a**p + b**p mod p; p primer   r   r   r   r   test_G3  s    r+  c                   C   sX   t td dtddks$tttdd tt	tdd tddksTtd S )Nr   r      c                 S   s
   | j dkS )Nr   )qr   r   r   r   <lambda>      ztest_G15.<locals>.<lambda>r	  )
r   r4   r  limit_denominatorr   r   r(  r   cf_ccf_ir   r   r   r   test_G15  s    $ r4  c                   C   s2   t tttdddddddddddg
ks.td S )Nr   r   r   r   r   i$  r   )r(  r   r3  r   r   r   r   r   r   test_G16  s    r5  c                   C   s$   t ddddddddggks td S )Nr   r   r   r   r   r   )cf_pr   r   r   r   r   test_G17  s    r7  c                   C   sB   t ddddggksttdgg tjtdd  ks>td S )Nr   r   r   )r6  r   cf_rr   r   Halfr4   r   r   r   r   test_G18  s    r:  c                  C   sf   t dddd} ttd|  d td|  d  }tt|ddd|  d|  d	|  d
|  gksbtd S )NsTr   positiver   r   r   r   r   r   r   )r   r3  r*   r(  r   r   )r;  itr   r   r   test_G19  s    $r?  c                  C   s:   t dddd} td|  gg| t| d d  ks6td S )Nr;  Tr<  r   r   )r   r8  r4   r   r;  r   r   r   test_G20  s    rA  c                  C   s6   t dddd} t| d| d d d|  ggks2td S )Nr;  Tr<  r   r   )r   r6  r   r@  r   r   r   	test_G20b  s    rB  c                   C   sL   t ddt  t dtd  ks$ttddt  t dtd  ksHtd S r  )rm   r   r   ri   r   r   r   r   test_H1  s    $rC  c                   C   s$   t ddt  dtd  ks td S )Nr   r   )rj   r   r   r   r   r   r   test_H2  s    rD  c                   C   s   dt t d   dkstd S Nr	  r   )r   r   r   r   r   r   test_H3  s    rF  c                  C   sP   t dt d } t| tks t| jd dks2t| jd dt d ksLtd S )Nr   r   r   r   r   r   r   )r[   r   typer   r   args)exprr   r   r   test_H4  s    rJ  @   r      r   ~   r   .   r   r   <   Q   r      r   r   r   '   S   4   6   r   F   r      r   [   V   c                   C   s   t tttdkstd S Nr   )r\   p1p2r   r   r   r   r   r   test_H5  s    r]  c                   C   s&   t ttt ttt tks"td S r   )r\   r   r[  r-  r\  r   r   r   r   r   test_H6  s    r^  c                  C   s   dt  td  td  dt d  td  td   dt d  td	  td
   dt d   d } dt d  td  td  dt d  td  td   dt d	  td  td   dtd  t  }t| |t ttdkstd S )Nr   r   r   r   r   r   r   r   r   r   r   r   r   r   rW  r   r   r   r   P   r   r   r   yzr\   r   r[  r\  r   r   r   test_H7  s    `drd  c                  C   s>  dt  td  td  dt d  td  td   dt d  td	  td
   dt d   d } dt d  td  td  dt d  td  td   dt d	  td  td   dtd  t  }dt d  td  td  dt d
  td  td   dt d  td  td   }t| | || t tt|ks:td S )Nr   r   r   r   r   r   r   r   r   r   r   r   r   r   rW  r   r   r   r   r_  r   r   r   r   r`  )r[  r\  r-  r   r   r   test_H8  s    `dTre  c                  C   s^   t ddd} d| td   | td   }d| td   d| t   }t||| t ksZtd S )Nr   F)zeror   r   r   r   )r   r   r\   r   )r   r[  r\  r   r   r   test_H9  s    rg  c                  C   s\   dt d  dt d   t d  t  d } t d dt d   t  d }t| |t dksXtd S )Nr   r   r   r   r   )r   r]   r   rc  r   r   r   test_H10  s    (rh  c                   C   s    t tt tt tdkstd S Nr   )r]   r[  r-  r\  r   r   r   r   r   r   test_H11  s    rj  c                  C   sD   t d d } t d dt   d }t| | t d t d  ks@td S )Nr   r   )r   rm   r   )r  Zdenr   r   r   test_H12  s    rk  c                   C   s8   t ttd ttd d  ttd d ks4td S r  )rm   r*   r   r   r   r   r   r   test_H13  s    rl  c                  C   s$  t d d } t| }|ddt   dt d   dt d   dt d   d	t d
   dt d   dt d   dt d   dt d   dt d   dt d   dt d   dt d   dt d   d	t d   dt d   dt d   dt d   dt d   t d  ks
tt|t }|ddt   dt d   d t d   dt d   d!t d
   d"t d   d#t d   d$t d   d%t d   d%t d   d$t d   d#t d   d"t d   d!t d   dt d   d t d   dt d   dt d   dt d   kstt|ddt  d  ks td S )&Nr   rW     r   it  r   i  r   i<  r   ih  r   i. r   i r   i r   i r   r   r   r   r   r   r   r      r   i|  i\  iK  ip iG i` i i1 )r   r   r   r   r[   )r   epdepr   r   r   test_H14  s    <














0














rq  c                   C   sF   t tdd ttd td  d D  td td  d ksBtd S )Nc                 S   s   g | ]}t | qS r   r.  )r  rr   r   r   r!    s     ztest_H15.<locals>.<listcomp>r   r   r   )rm   r   r   r   r   r   r   r   r   test_H15  s    rs  c                   C   s  t td d td td  td d  td td  td  t d  td td  td  t d  td td  td  td  d  td td	  td
  td  d  td td	  td
  td  d  td td  td  td
  d  kstd S )Nd   r   r   r   r   r   r   rW  r   r   r   (      r[   r   r   r   r   r   r   test_H16  s2    6""rx  c                   C   s(   t tttt tt  dks$td S ri  )rm   r[   r   r[  r\  r   r   r   r   r   test_H17  s    ry  c                  C   s   t dtd  dtd   dtd   dt  d } dt dt  dt dt   td dt   td dt   }| |kstd S )	Nr   r   r   M   r   rn     r   )r[   r   r   r   r   r   r   r   test_H18"  s    4@r|  c                  C   s6   t d} t| d t| d d | d ks2td S )Nar   r   )r   rZ   r   r   r}  r   r   r   test_H19*  s    r  c                   C   s   t dd S )NzXlet a**2==2; (x**3 + (a-2)*x**2 - (2*a+3)*x - 3*a) / (x**2-2) = (x**2 - 2*x - 3) / (x-a)r   r   r   r   r   test_H200  s    r  c                   C   s   t dd S )Nzuevaluate (b+c)**4 assuming b**3==2, c**2==3.                               Answer is 2*b + 8*c + 18*b**2 + 12*b*c + 9r   r   r   r   r   test_H216  s    r  c                   C   s@   t td dtd   d ddtd d td d  ks<td S )Nr   r   r   r   r   modulusrw  r   r   r   r   test_H22<  s    r  c                  C   sl   t d t  d } t d t  d t d t d  t d  t d  t d  t d  d  }t| d	d
|kshtd S )Nr   r   r   r   r   r   r   r   i  r  )r   r[   r   r   r   r   r   r   test_H23@  s    Dr  c                  C   sf   t tjjdddd} ttd dtd   d | d	t|  td |   td |   t|   ksbtd S )
NT)funcphi)aliasr   r   r   r   	extension)r   r   ZGoldenRatior   r[   r   r   )r  r   r   r   test_H24F  s    &r  c                  C   s8   t dtd   dtd   d } tt| | ks4td S )Nr   r   rW  r   ra  rb  r[   r   r   )er   r   r   test_H25L  s     r  c                  C   sr   t ttdttd   dttd   d } t| ddtt dttd   dttd   d ksntd S )Nr   r   rW  F)r   )	r   r>   r   r:   ra  r?   rb  r[   r   )r   r   r   r   test_H26Q  s    0r  c                  C   s  dt  td  td  dt d  td  td   dt d  td	  td
   dt d   d } dt d  td  td  dt d  td  td   dt d	  td  td   dtd  t  }dt td  dt d	  td	  td  dt d  td   dt t d  td   dtd    dt d  dt d  td  td   dt d  td	  td
   dt  td  td   d  }tt| | |kstd S )Nr   r   r   r   r   r   r   r   r   r   r   r   r   r   rW  r   r   r   r   r_  r   r   r   ru  r  )r   r   hr   r   r   test_H27V  s    `dR^r  c                   C   s   t dd S )Nzgexpand ((1 - c**2)**5 * (1 - s**2)**5 * (c**2 + s**2)**10) with c**2 + s**2 = 1. Answer is c**10*s**10.r   r   r   r   r   test_H28_  s    r  c                   C   sD   t dtd  dt t  dtd   ddtt tt  ks@td S )Nr   r   rL  rW  r   r  )r[   r   ra  r   r   r   r   r   test_H29e  s    r  c                  C   s|   t td td  tdd} tt tttdd tdd t     tttdd tdd t     }|| ksxtd S )Nr   r  r   r   )r[   r   ra  r4   r   r   r   )r   answerr   r   r   test_H30j  s    Pr  c                  C   sp   t d dt   d t d dt d   dt   d  } dt d d  dt d   dt d   }t| |ksltd S )Nr   r   r   r   r   )r   rY   r   r  r   r   r   test_H31p  s    4(r  c                   C   s   t dd S )Nzp[A*B*C - (A*B*C)**(-1)]*A*C*B (product                               of a non-commuting product and its inverse)r   r   r   r   r   test_H32v  s    r  c                  C   sV   t ddd\} }}t| t||t|t||  t|t| |   dksRtd S )NzA, B, CF)commutativer   )r   r   doitr   r   )ABCr   r   r   test_H33|  s    
r  c                   C   s0   t ttdd tddtd   ks,td S )Nr   r   r   r   r   )r?   r   r   r4   r   r   r   r   r   test_I1  s    r  c                   C   s&   t dtd d td ks"td S )Nr   r   r   r   )r4   r:   r   r   r   r   r   test_I2  s    r  c                   C   s8   t tt tdt d t d  dt d ks4td S )Nr   r   r   r	  )r:   r   r   r>   r   r   r   r   r   test_I3  s    r  c                   C   sL   t ttttt  ttd ttt   ttdt d ksHtd S )Nr   r	  r   )r   r:   r   r   r>   r   r   r   r   r   r   r   test_I4  s    r  c                   C   s@   t td d td d  td d  td  t dks<td S )Nr   r   r   r   rv  r   )r>   r   r   r   r   r   r   r   test_I5  s    r  c                   C   s   t dd S )NzHassuming -3*pi<x<-5*pi/2, abs(cos(x)) == -cos(x), abs(sin(x)) == -sin(x)r   r   r   r   r   test_I6  s    r  c                   C   s8   t dt t t t td dttd   ks4td S Nr   r   r:   r   r>   r   r   r   r   r   test_I7  s    r  c                   C   s0   t dt t t dt dt  d ks,td S )Nr   r   r   )r:   r   r   r   r   r   r   test_I8  s    r  c                   C   s8   t dt t t t td dttd   ks4td S r  r  r   r   r   r   test_I9  s    r  c                   C   sH   t ttd d ttd  ttd ttd  d  tksDtd S Nr   r   r   )ro   r?   r   r:   r>   r   r   r   r   r   r   test_I10  s    r  Zhangsc                   C   sL   t ttd d ttd  ttd ttd  d  tddksHtd S )Nr   r   r   r   )r^   r?   r   r:   r>   r   r   r   r   r   test_I11  s    r  c                  C   sN   t ttd d ttd  ttd ttd  d  t} | tksJtd S r  )r   r?   r   r:   r>   r   r   )resr   r   r   test_I12  s    >r  c                   C   s   t dtddkstd S )Nr   ii  )r#   r   r   r   r   r   r   test_J1  s    r  c                   C   s<   t tttd ttttd tttd  t ks8td S Nr   )r   rB   r   ra  rC   r   r   r   r   r   test_J2  s    r  c                   C   s   t dd S )NzDJacobi elliptic functions: diff(dn(u,k), u) == -k**2*sn(u,k)*cn(u,k)r   r   r   r   r   test_J3  s    r  c                   C   s"   t tdddtt kstd S )Nr	  r   r   )rD   r   r4   r   r   r   r   r   r   test_J4  s    r  c                   C   sB   t dtddtd tdt d  t ttd ks>td S )Nr   r   r   r   )rE   r   r+   r4   r   r   r   r   r   r   r   test_J5  s    r  c                   C   s    t ddtddstd S )Nr   y      ?      ?z0.04157988694396212z0.24739764151330632)mpmathr@   r  r   r   r   r   r   r   test_J6  s    r  c                   C   s,   t ttddtd dtd  ks(td S )Nr   r   r   )rm   r@   r   r   r   r   r   r   r   test_J7  s    r  c                  C   sP   t tddt} ttt tt ttt d  }tt| | dksLt	d S Nr   r   r   )
r@   r   rb  r>   r:   r4   r   rm   r   r   )r   r-  r   r   r   test_J8  s    $r  c                   C   s$   t dttt dt ks td S Nr   r   )r@   rb  r   r   r   r   r   r   test_J9  s    r  c                  C   s^   t ddd\} }t|| dd|  tt t||  d d  t| |  d d  ksZtd S )Nzmu, nuTr   r   r   r   )r   rG   r4   r   rD   r   )munur   r   r   test_J10  s    r  c                   C   sH   t tddtt tdd tdtd   dtd  d  ksDtd S )Nr   r   r   r   )rm   rG   r   r   r4   r   r   r   r   r   test_J11  s    r  c                   C   s6   t tdtdt tdt  tdt dks2td S )Ni  r   i  i  r   )rm   rH   r   r   r   r   r   r   test_J12  s    r  c                  C   s(   t dddd} t| dd|  ks$td S )Nr}  TF)r   negativer	  )r   rH   r   r~  r   r   r   test_J13  s    r  c                  C   s<   t tjtjgtddgtd } t| ttt ks8td S r  )rF   r   r9  r   rb  rh   r8   r   )r   r   r   r   test_J14  s     r  c                   C   s   t dd S )NzcF((n+2)/2,-(n-2)/2,R(3,2),sin(z)**2) == sin(n*z)/(n*sin(z)*cos(z)); F(.) is hypergeometric functionr   r   r   r   r   test_J15  s    r  c                   C   s   t dd S )Nz&diff(zeta(x), x) @ x=0 == -log(2*pi)/2r   r   r   r   r   test_J16  s    r  c                   C   sv   t ttd d ttd d  tttttd t  tddfdttdd ttttttd ksrt	d S )Nr   r   r   r   r   r   )
r   r   r   rA   r   r   r   r   r   r   r   r   r   r   test_J17  s    r  c                   C   s   t dd S )Nz define an antisymmetric functionr   r   r   r   r   test_J18  s    r  c                  C   s^   t ddd\} }t| t|  t| t|  ks6tt| t|  t| t| ksZtd S )Nzz1, z2Tr   )r   r'   r   r&   r   )Zz1Zz2r   r   r   test_K1  s    &r  c                   C   s4   t dtd ttdtd d   dks0td S )Nr   r   r   r   r   )absr4   r   r   r   r   r   r   test_K2  s    r  c                  C   sX   t ddd\} }ttd| t|   t|   dt| d t|  | d   ksTtd S )Nza, bTrealr   r   )r   rm   r  r   r4   r   r}  br   r   r   test_K3!  s    r  c                   C   s:   t ddt  jddt dtttdd  ks6td S )Nr   r   Tr   r   )r+   r   r   r9   r   r   r   r   r   r   test_K4'  s    r  c                  C   s|   t ddd\} }t| t|  jddtd|  td|  td|   ttd|  td|  td|    ksxtd S )Nzx, yTr  r   r   )	r   r?   r   r   r>   r:   r-   r.   r   r   ra  r   r   r   test_K5+  s    *
&r  c                   C   sx   t tt ttd  t ttt  t tt t t ks@tt tt ttd  t ttt  t tksttd S r  )r4   r   ra  r  rb  r   r   r   r   r   test_K61  s    @r  c                  C   sR   t dddd} tt|  ttd  tttt  }t|}|t| ksNtd S )Nra  TF)r  r  r   )r   r4   r   r  rb  rm   r   )ra  rI  Zsexprr   r   r   test_K76  s    (r  c                  C   sf   t ddd} ttd|  dt|   dks0tt dddd} ttd|  dt|   dksbtd S )Nrb  Tr   r   r   F)r   r  r   rm   r4   r   rb  r   r   r   test_K8=  s    $r  c                  C   s4   t ddd} ttd|  dt|   dks0td S )Nrb  Tr=  r   r   r  r  r   r   r   test_K9D  s    r  c                  C   s4   t ddd} ttd|  dt|   dks0td S )Nrb  T)r  r   r   r  r  r   r   r   test_K10I  s    r  c                   C   s"   t ddtdd  dkstd S )Ni  i;r   r   r   r4   r   r   r   r   r   r   test_L1R  s    r  c                   C   s"   t ddtdd  dkstd S )Nr'  l   ^|E!or   r   r   r  r   r   r   r   test_L2V  s    r  c                   C   sT   t dtdd dtdd  d ddtdd dtdd    d dksPtd S )Nr   r   r   r   r   r   )rm   r   r   r   r   r   r   test_L3Z  s    r  c                   C   s8   t ttd ttttd   tt dks4td S r  )ro   r:   r   r>   r   r   r   r   r   test_L4^  s    r  c                   C   s6   t ttddt td  ttt dks2td S )Nr   r   r   r   )r+   r?   r   r   r   r,   r   r   r   r   r   test_L5b  s    r  c                   C   s@   t ttd td  ttt ttdidks<td S )Nr   r   r   )r+   r?   r   r   r,   r   subsr   r   r   r   r   test_L6g  s    r  c                   C   s@   t tdtt d tdt dtt  d  dks<td S )Nr   r   r   r   )rm   r+   r4   r   r   r   r   r   r   test_L7k  s    r  c                   C   st   t dt dtt  d ttdtt d   dtt d ddtt d    dtt  d dksptd S )Nr   r   r   r   )rm   r   r4   r   r   r   r   r   test_L8p  s    0"
r  c                  C   s\   t ddd} tdd|   t|  t|  t| t d  td td|    dksXtd S )Nrb  Tr   r   r   r   )r   rm   rD   rv   r:   r   r   r  r   r   r   test_L9v  s    r  c                   C   s2   t tdd t dd t td d dks.td S r  )r   r   r   r   r   r   r   test_M1~  s    r  c                  C   sD   t dtd  dtd   dt  d t} tdd | D s@td S )Nr   rn  r   !   r   c                 s   s   | ]}|j d djV  qdS )Tr   N)r   Zis_real)r  r;  r   r   r   	<genexpr>  s     ztest_M2.<locals>.<genexpr>)r   r   allr   )solr   r   r   test_M2  s    *r  c                   C   s   t td dtd   dtd   dtd   dt  d ttd	td d	td td
 d
 ttd d  td
 d
 ttd d  td d
 ttd d  td d
 ttd d  kstd S )Nr   r   r   r      r   $   r   gr(?gr(?g<n=e?)r   r   rc   r4   r   r   r   r   r   r   test_M5  s    r  c                   C   s2   t ttd d tdd tddD ks.td S )Nr   r   c              	   S   s<   h | ]4}t |t td d tt|t td d   qS )r   r   )r:   r   r   r   r>   r  r   r   r   r   	<setcomp>  s     ztest_M6.<locals>.<setcomp>r   )setr   r   r   r   r   r   r   r   test_M6  s    r  c                   C   s  t ttd dtd   dtd   dtd   dtd   d	td
   dtd   dt  d tdtdt ttddtd
   d
  d  dtdtdttd
dtd
     d  dtdt ttddtd
  d
  d  dtdtdttd
dtd
     d  dtdt ttddtd
  d
  d  dtdtdttd
dtd
     d  dtdtdttd
dtd
     d  dtdt ttddtd
   d
  d  hkstd S )Nr   r   r   r   \   r      r      r      r      rN  r   r  )r  rp   r   r4   r   r   r   r   r   r   test_M7  s&    F
0......0r  c                  C   s   t d} tddd}ttd|  dt|   d | | tjttd| dt|  d td| dt|  d ks|t	d S )Nr   rb  Tr   r   r   )
r   r   r   r*   r   Realsrc   r+   r4   r   )r   rb  r   r   r   test_M8  s
    (8r  c                   C   s   t dd S )Nz6solveset(exp(2-x**2)-exp(-x),x) has complex solutions.r   r   r   r   r   test_M9  s    r  c                   C   s&   t ttt ttd gks"td S )Nr	  )rp   r*   r   r)   r   r   r   r   r   test_M10  s    r  c                   C   s$   t tt t ttddks td S rE  )r   r   rc   r   r   r   r   r   test_M11  s    r  c                   C   s   t td ttd d d  tdt d  tdtd td t tdtd  ttdtd  tttdtd   tttdtd   gkstd S )Nr   r   r   r	  r   )	rp   r   r>   r:   r   r   r+   r4   r   r   r   r   r   test_M12  s    0    r  c               	   C   sJ   t d} ttttt ttt| | t ttdd  t	j
ksFtd S )Nr   r   r   )r   r   r>   r   r:   rb   r
   r   r   r   Integersr   r   r   r   r   test_M13  s    r  c                  C   s@   t d} tttd ttt| | t td  tjks<t	d S )Nr   r   r   )
r   r   r?   r   rb   r
   r   r   r   r   r  r   r   r   test_M14  s    r  c                     s   t d} ttttj  t fddttt	| d|  t
 t
d  tjtt	| d|  t
 t
tdd  tjttt	| d|  t
 t
tdd  tjtt	| d|  t
 t
d  tjfD std S )Nr   c                 3   s   | ]}  |V  qd S r   )Zdummy_eq)r  r   gotr   r   r    s     ztest_M15.<locals>.<genexpr>r   r   r   )r   r   r>   r   r   r9  anyrf   rb   r
   r   r   r   r   r  r   r  r   test_M15  s    "&( r  c                  C   s<   t d} ttttt ttt| | t tj	ks8t
d S )Nr   )r   r   r>   r   r?   rb   r
   r   r   r   r   r  r   r   r   test_M16  s    r  c                   C   s&   t tttt ttdks"td S ri  )r   r8   r   r9   rc   r   r   r   r   r   test_M17  s    r	  c                   C   s6   t tttt ttttdd d ks2td S )Nr   r   r   )r   r6   r   r9   rc   r4   r   r   r   r   r   test_M18  s    r
  c                   C   s*   t td ttdd  tdgks&td S Nr   r   r   )rp   r   r   r   r   r   r   r   test_M19  s    r  c                   C   s*   t ttd d t d ttks&td S r  )r   r4   r   EmptySetr   r   r   r   r   test_M20  s    r  c                   C   s$   t ttt d tdks td S r  )r   r   r4   rc   r   r   r   r   r   test_M21  s    r  c                   C   s<   t dtt dttdd   d ttddks8td S )Nr   r   r   r   r   )r   r4   r   r   rc   r   r   r   r   r   test_M22  s    r  c                  C   sf   t ddd} t| dtd| d    t ttjtdd   ttddtdd  gksbtd S )Nr   Tr   r   r   r   r	  )r   rp   r4   r   r   r9  r   r   r.  r   r   r   test_M23  s
     r  c                  C   sN   t dttddt   t} tdttd   d}| d  | ksJtd S Nr   r   r   )rp   r    r   r   r+   r   r   )solutionr  r   r   r   test_M24  s    r  c                  C   sf   t ddd\} }}}t d}t| ||  |||   |d  t||  t||   ksbtd S )Nz:dTr  r   r   )r   rp   r   r+   r   )r}  r  cdr   r   r   r   test_M25  s    r  c                   C   s0   t tttttt dtdgks,td S )Nr   r   )rp   r4   r+   r   r*   r   r   r   r   r   test_M26  s    r  c                  C   sp   t ddd} t ddd}tttt| tdd | d d | |tttdd  tdd gkslt	d S )	Nr   Tr  r  r   r   r   r   )
r   rp   r+   r6   r8   r   r>   r:   r*   r   )r   r  r   r   r   test_M27   s
    *"r  c                   C   sF   t dt ttd d  dtd   tttddddgksBtd S )	Nr   r   r   r   )ZassumegOqg0eg?)r   r   r*   r   r  r   r   r   r   r   test_M28*  s    r  c                  C   s4   t d} tt| d d tjdtddks0td S )Nr   r   r   domainr	  r   )r   r   r  r   r  rc   r   r.  r   r   r   test_M29/  s    r  c                   C   s4   t tdt d ttd  ttddks0td S )Nr   r   r	  )r   r  r   rc   r   r   r   r   r   test_M304  s    r  c                   C   sD   t dtt tt d td  tttddtddks@td S )Nr   r   r  r   )r   r  r   r2   rc   r   r   r   r   r   r   test_M31;  s    r   c                   C   s>   t tdtd  ttt td d  ttddks:td S )Nr   r   r   r	  r   r2   r   rc   r   r   r   r   r   test_M32B  s    r"  c                   C   s8   t tdtd  ttd d  ttdddks4td S )Nr   r   r   r  g,r!  r   r   r   r   test_M33I  s    r#  c                  C   sN   t ddd} tdt |  dt t|   dt  | tddt  ksJtd S )Nrb  Tr   r   r   r   )r   r   r   r%   rc   r   r  r   r   r   test_M34R  s    r$  c                  C   sL   t ddd\} }td|  d|  t|  dt   || tdksHtd S )Nx yTr  r   r   )r   r   )r   r   r   Zas_real_imagrc   r   r  r   r   r   test_M35X  s    r&  c                   C   s4   t ttd tt d tttddks0td S )Nr   r   r   )r   r   r   rc   r   r   r   r   r   test_M36]  s    r'  c                   C   s`   t tt t d dt t dt  d tdt  t d gttttt d dtfks\td S )Nr   r   r   r   r   )r   r   ra  rb  rc   r   r   r   r   r   test_M37d  s    Br(  c            8      C   s  t d\} }}t| ||gt }td|}|j\1}}}}}	}
}}}}}}}}}}}}}}}}}}}}}} }!}"}#}$}%}&}'}(})}*}+},}-}.}/}0}1}2}3}4}5| | |  || |   | | |  || |   | | |  || |   | | || |   || |   | | |  || |   | | |  || |   | | |  || |   | | | |  || |   | | |  || |   | | | |  || |   || |   || |   ||	 |   ||	 |   ||0 |  ||0 |   | |1 |  ||1 |   | | |  || |   | |0 |  ||0 |   ||2 |  ||2 |   |d |3 | d  d| | |3 | d   |d |3 | d   || | | |  || |   | |
 |  ||
 |  | | |  || |   | | |  || |  ||1 |  ||1 |   | |2 |  ||2 |   |4 ||4 |   ||4 |  |d |4 | |   |5 ||5 |   ||5 |  |d |5 | |   | | | || |  | | | || |  | | | || |  | | | | |  || |  | | | || |  | ||| |  || |   | |
 |  ||
 |  | | | || |  || | |  || |  | | | |  || |  | | | || |  |  | | || |  | | |  || |  | |	 |  ||	 |  |  |0 | ||0 |  | |1 | ||1 |  | | | || |  | | |  || |  | |0 | ||0 |  |  |2 | ||2 |  |3 ||3 |   ||3 |  |d |3 | |   | | | || |  |  |1 | ||1 |  | |2 | ||2 |  | d |4 |d  d|  | |4 |d   |d |4 |d   |5 | |5 |  | |5 |  | d |5 ||   || |  | | || |  | | | |  || |  |  | | || |  || | |  || |  || |  || |   | | |  || |  |  |
 | ||
 |  |  | | || |  |  | | || |  | |  | | || |  | |  | | || |  |  | | || |  | | |  || |  |  | | || |  | | |  || |  | |	 |  ||	 |  | |0 | ||0 |  |  |1 | ||1 |  |  |0 | ||0 |  | |2 | ||2 |  |3 ||3 |   ||3 |  |d |3 | |   |  | | || |  | |1 | ||1 |  |  |2 | ||2 |  |4 | |4 |  | |4 |  | d |4 ||   | d |5 |d  d|  | |5 |d   |d |5 |d   ||| || | || |! ||$ | | |# | |" |' |0|1 |(|| |+ | |* ||) || |  || |   |& |. d|0 |1|2||3 |  ||3 |   |-|0|2 | |3 |  ||3 |   || | | |  | | || |  |% |1|2 |  |4 | ||4 |  | |  | ||  |  |, |1 |2| |4 | ||4 |  | |5 | ||5 |  |  |5 | ||5 |  | | | ||| ||||| ||" || |# | |0 |1|" |
 ||$ |||% |   ||% |   |0|2 | |3 |  ||3 |   |( |#|+ |	 |$ |* ||) || |& |  ||& |  |. |0d|1 |2| |4 | ||4 |  | |' | ||' |  |- |0 |2||3 |  ||3 |   |  |5 | ||5 |  |, |1|2 |  |4 | ||4 |  | |5 | ||5 |  |||| | | | | |)| | |* | | |) | |
 | | |+ |  ||, |   ||, |   |0|1 | |0 |2||3 |  ||3 |   |!|$|* |#|+ |	 | |" |'| |- |  ||- |  |0 |1| |& | |. |  ||. |  |0|1d|2 | |3 |  ||3 |   |  |4 | ||4 |  | |5 | ||5 |  |%|1 |2| |4 | ||4 |  |  |5 | ||5 |  g}6|5d|4d|3d|2d|1d|0d|-d|,d|*d|)d|(d|'d|%d|$d|"d|!d| d|d|d|d|d|d|d|d|d|d|d|d|d|d|d|d|d|d|d|d|
d|	d|d|d|d|d|&|| |. |#|+|| | |. ||+i.}7t|6||7kstd S )Nza, b, czk1:50r   r   r   )r   r   rW   Z	to_domainr   Zgensr   r   )8r}  r  r  r  ringZk1Zk2Zk3Zk4Zk5Zk6Zk7Zk8Zk9Zk10Zk11Zk12Zk13Zk14Zk15Zk16Zk17Zk18Zk19Zk20Zk21Zk22Zk23Zk24Zk25Zk26Zk27Zk28Zk29Zk30Zk31Zk32Zk33Zk34Zk35Zk36Zk37Zk38Zk39Zk40Zk41Zk42Zk43Zk44Zk45Zk46Zk47Zk48Zk49systemr  r   r   r   test_M38i  s   
                                          H    >  0 0  00      .    H  .  0   >0      .    0 H   0   0>              
                             
          
                                  
              *                                                                               
    
  	r+  c                  C   s  t ddd\} }}t| d | d| |  d d| d  | d|d   d d| |d  |d  d g|d|d| d	i|d|d| di|tdt |tddtdt d  | td	tdt   i|tdt |tddtdt d  | td	tdt  i|td t |tddtdt d  | td	tdt   i|td t |tddtdt d  | td	tdt  igkstd S )
Nr   Tr   r   r   r   r  r   r	  )r   rp   r4   r   r   r   r   ra  rb  r   r   r   test_M39  s    X><@>r-  c                   C   s   t tt tt kstd S r   )r   r   r   r   r   r   r   r   test_N1  s    r.  c                  C   sP   t ddd} t| d |  d dkdks,tt| d |  d dkdksLtd S )Nr   Tr  r   r   r   Fr   r   r   r.  r   r   r   test_N2  s     r0  c                  C   s8   t ddd} tttd| t| dt| dk s4td S )Nr   Tr  r	  r   )r   r   rK   r   r  r   r.  r   r   r   test_N3  s    r1  c                  C   sF   t ddd\} }td| d  d|d  k| |k|dk@ dksBtd S )Nr%  Tr  r   r   r/  r  r   r   r   test_N4  s    r2  c                  C   sP   t ddd\} }}t|| d  ||d  k| |k|dk@ |dk@ dksLtd S )Nzx y kTr  r   r   r/  )r   ra  r   r   r   r   test_N5  s    r3  c                  C   sZ   t ddd\} }}}t|| |  |||  k| |k|dk@ |dk@ |dk@ dksVtd S )Nzx y k nTr  r   r/  )r   ra  r   r   r   r   r   test_N6  s    r4  c                  C   s:   t ddd\} }t|dk| dk|| d k@ dks6td S )Nr%  Tr  r   r   r/  r  r   r   r   test_N7  s    r5  c                  C   sH   t ddd\} }}tt| |t||@ | |k||k@ || k@ sDtd S )Nr   Tr  )r   r   r   r   r,  r   r   r   test_N8  s    r6  c                  C   sH   t d} tt| d dktjdttt dddtdtdksDtd S )	Nr   r   r   r  r	  FTr   )	r   r   r  r   r  rf   re   r   r   r.  r   r   r   test_N9  s    (
r7  c               	   C   sz   t d} | d | d  | d  | d  | d  }tt|dk tjdttt dd	d	tddd	d	tddd	d	ksvtd S )
Nr   r   r   r   r   r   r   r  T)	r   r   r   r   r  rf   re   r   r   )r   r   r   r   r   test_N10  s    ($r8  c                  C   sF   t d} td| d  dktjdttt dddtdtksBtd S )Nr   r   r   r  Tr   )r   r   r   r  rf   re   r   r   r.  r   r   r   test_N11  s    r9  c                  C   s4   t d} tt| dk tjdtddddks0td S )Nr   r   r  r   r   FT)r   r   r4   r   r  re   r   r.  r   r   r   test_N12  s    r:  c                  C   s,   t d} tt| dk tjdtjks(td S )Nr   r   r  )r   r   r>   r   r  r   r.  r   r   r   test_N13  s    r;  c                  C   sP   t d} tt| dk | tjdttt td ddttd tddksLt	d S )Nr   r   r  r   T)
r   r   r>   r   r  rf   re   r   r   r   r.  r   r   r   test_N14  s    *r<  c                  C   s:   t d\} }ttd|  t|d  d dk| tj d S )Nr tr   r   )r   r   r  r:   r   r  rr  tr   r   r   test_N15  s    r@  c                  C   sB   t d\} }t| d t|d d  t|d  dk | tj d S )Nr=  r   r   r   )r   r   r:   r>   r   r  r>  r   r   r   test_N16  s    rA  c                   C   s6   t tt dktt dk fttftttk ks2td S ri  )r   r   ra  r  r   r   r   r   r   test_N17  s    rB  c                  C   s:   t dt ddt f} tt| | jtdks6td S )Nr   r   r   r   )r   r   r4   r   dotHr   Mr   r   r   test_O1  s    rG  c                   C   s.   t dt dt dgdgdggks*td S )N)r   r   r  )r   r   r   r   r   r   )r   crossr   r   r   r   r   test_O2$  s    rI  c                   C   s   t dd S NzfThe vector module has no way of representing
        vectors symbolically (without respect to a basis)r   r   r   r   r   test_O3+  s    rK  c                  C   s   ddl m} m} | d}| }| \}}}| \}}}	||| |	  ||| |	 d   ||d |	d    }
||
 d|d  |d  |	 d| |	d   | || |  d| |d  |	d  ||	  |  kstd S )Nr   )
CoordSys3DDelr   r   r   r   )Zsympy.vectorrL  rM  Zbase_vectorsZbase_scalarsrH  r  r   )rL  rM  r   Zdelopr   r   r   r   ra  rb  Fr   r   r   test_O41  s    8rO  c                   C   s   t dd S rJ  r   r   r   r   r   test_O5:  s    rP  c               	   C   s   t dddgt dddgt dddgg} t| t dgdgdggt tddgtddgtd	dggt td
dgtddgtddgggkstd S )Nr   r   r   r   r   r   r   ?   ii  ia  ii  iY)r   r   r   r   )Lr   r   r   test_O10C  s"    (





rS  c                   C   s.   t dddd dt ddddgks*td S )Nr   c                 S   s   ||  S r   r   )r   r   r   r   r   r/  T  r0  ztest_P1.<locals>.<lambda>r	  r   r   )r   Zdiagonalr   r   r   r   r   test_P1S  s
      rT  c                  C   sT   t dddgdddgddd	gg} | d | d | t ddgddggksPtd S )
Nr   r   r   r   r   r   r   r   r   )r   Zrow_delZcol_delr   rE  r   r   r   test_P2X  s     


rU  c                     s$  t ddddgddddgd	d
ddgddddgg} | ddddf }| d }| }| ddddf  }| d  }t||ggj}| |g||gg tt fdd t  }|t ddddddgddddddgd d!d"dddgddddddgddddddgd	d
ddd#dgddddd$dggks td S )%Nr   r   r   r   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   c                      s   t  S r   )r   r   rowsr   r   r/  n  r0  ztest_P3.<locals>.<lambda>iiir  iiii)r   r   Tr|   
ValueErrorr   )r  A11A12ZA21ZA221ZA222A22r  r   rX  r   test_P3`  s0    




rb  c                   C   s   t dd S )Nz*Block matrix diagonalization not supportedr   r   r   r   r   test_P4z  s    rc  c                  C   s8   t ddgddgg} | d t ddgddggks4td S )Nr   r   r   r   r   r   r   )r   r   rE  r   r   r   test_P5  s    rd  c                  C   sd   t ttttgtt ttgg} | tdt tt tt gtttt ggks`td S r  )r   r:   r   r>   r   r   rE  r   r   r   test_P6  s    re  c                  C   s   t ttggtt dddgdddgg t ddd	gd
ddgg  } | t ttd  tdt d   tdt d  tdt d   tdt d	  tdt d   ggkstd S )Nr   r   r   r   r   r   r   r   r  r   rZ  r   r   r   )r   r   ra  rb  r   rE  r   r   r   test_P7  s    
<rg  c                  C   s6   t ddt gdt dgg} | jtjddks2td S )Nr   r   r  r   )ordr   )r   r   normr   Infinityr   rE  r   r   r   test_P8  s    
rk  c                  C   s   t ddd\} }}t| ||  d| d| gd| || |  d|  gd| d|  || |  gg}t|d| d |d  |d  t| t| t|  kstd S )Na b cT)Znonzeror   Zfror   )r   r   r[   ri  r  r   r}  r  r  rF  r   r   r   test_P9  s    rn  c                  C   s^   t dddt  gtddt  dgg} | jt dtddt  gddt  dggksZtd S )Nr   r   r   r   r   r   )r   r   r   rD  r   rE  r   r   r   test_P10  s    ro  c                   C   sP   t ttgdtt gg dtd d  t tdgdt tt gg ksLtd S Nr   r   r	  )r   r   ra  invr   r   r   r   r   test_P11  s    
rr  c                  C   sh   t ttgdtt ggd} tt| }t|| | ddt|t tt t gdtggddksdtd S )Nr   ZADJF)evaluater	  )r   r   ra  rq  r\   tuplerN   r   )rF  r  r   r   r   test_P11_workaround  s    ru  c                  C   s~   t dtt} t dtt}t dtt}t| |gttt|gg}t|jt| jd| j | |j gttt|jggksztd S )Nr_  r`  ra  r	  )r   r   r   r   r   r   r   )r_  r`  ra  r  r   r   r   test_P12  s    "rv  c                  C   s   t dtd td gtd td dt  d td dt  d gtd td d dtd  dt  d gg} |  \}}}t|t dddgtd ddgtd td dggkstt|t dtd td gdd	td
 gddtd ggkstd S )Nr   r   r   r   r   r   r   r   r   r   r   )r   r   ZLUdecompositionrm   r   )rF  rR  U_r   r   r   test_P13  s    ,(ry  c               
   C   s   t dddddgdddddgdddddgdddddgg} |  \}}|t dddddgdddddgdddddgdddddggkstd S )Nr   r   r   r   r   r   r	  )r   Zrrefr   )rF  r   rx  r   r   r   test_P14  s    rz  c                  C   s:   t ddddgddddgddd	d
gg} |  dks6td S )Nr	  r   r   r   r   r   r   r   r   r  )r   rankr   rE  r   r   r   test_P15  s
    

r|  c                  C   s@   t dtd dgdtd dtd gg} |  dks<td S )Nr   r   r   r   r   r   )r   r4   r{  r   rE  r   r   r   test_P16  s    r}  c                  C   st   t ddd} ttd|  td|  gddt| d   t|  ddt| d   t|  gg}| dksptd S )Nr?  Tr  r   r   )r   r   r>   r:   r{  r   )r?  rF  r   r   r   test_P17  s    6r~  c                  C   sf   t ddddgddddgddddgg} |  t dgd	gdgdggt dgd
gdgdgggksbtd S )Nr   r   r   r   r	  r   r   r   r  )r   Z	nullspacer   rE  r   r   r   test_P18  s    

r  c               	   C   sJ  t d} tddddg| tttg| d td td td g| d td td td gg}| | d td  t | d td  t  | d t td   | d t td   | d td  t  | d t td   | d td  t  | d td  t  | d t td   | d t td   | d td  t  | d t td   | td  td   | td  td   | td  td   | td  td   | td  td   | td  td   td td  t  td t td   td td  t  td t td   ttd  td   ttd  td   ksFtd S )Nwr   r   r   )r   r   r   ra  rb  detr   )r  rF  r   r   r   test_P19  s^    
Tr  c                   C   s   t dd S )Nz'Matrix minimal polynomial not supportedr   r   r   r   r   test_P20  s    r  c                  C   sV   t dddgdddgdddgg} | t td dtd   dt  d	 ksRtd S )
Nr   r  r  r   r   r   r  r   r   )r   Zcharpolyr   Zas_exprr   rE  r   r   r   test_P21  s
    
r  c                  C   s2   d} dt  t|  }| t  d | iks.td S )Nrt  r   )r   r   	eigenvalsr   )r  rF  r   r   r   test_P22!  s    r  c                  C   s   t dddddgdddddgdddddgdddddgdddddgg} |  tddtddtddtddtddiks|td S )	Nr   r   r   123zsqrt(3) + 2z-sqrt(3) + 2r   r  r   r   rE  r   r   r   test_P23'  s&         r  c                  C   s   t ddddddddgdd	d
dddddgdd
d	dddddgddddddddgddddddddgddddddddgddddddddgddddddddgg} |  tddtddtddtddtd dtd!dtd"dikstd S )#Nc     @  r  r     q   r\  =   1   r   rT  rW  ;   r[       c   q0r   z10*sqrt(10405)z100*sqrt(26) + 510Z1000r   z-100*sqrt(26) + 510z-10*sqrt(10405)Z1020r  rE  r   r   r   test_P246  s2           r  c                  C   s   t tddddddddgdd	d
dddddgdd
d	dddddgddddddddgddddddddgddddddddgddddddddgddddddddgg} t| jdd}tdddddd d!d"g}t||D ]\}}t|| d#k stqd S )$Nr  r  r  r  r  r  r  r   r  r  r  r\  r  r  r  r   rT  rW  r  r[  r  r  r  r  r  T)ZmultiplegMcdr   gyP9?g     @@gx5F27ߏ@g     @gMcd@g-q=)r   r   sortedr  zipr  r   )ZMFZev_1Zev_2r   ra  r   r   r   test_P25I  s&    	
  r  c                  C   s   t d\} }}}}t| | | | |  ddddg	dddddddddg	dddddddddg	dddddddddg	dddddddddg	dddddddddg	dddddddddg	dddddddddg	dddddddddg	g	}|jddtddtd	dikstd S )
Nza0 a1 a2 a3 a4r   r   r	  F)Zerror_when_incompletez-1/2 - sqrt(3)*I/2r   z-1/2 + sqrt(3)*I/2)r   r   r  r   r   )Za0Za1Za2a3Za4rF  r   r   r   test_P26\  s"     	
  r  c                  C   s   t d} t| ddddgdddddgdd| ddgddd| dgdddddgg}| | dtdddddgtdddddgtdddddggfdt dtddt d dddggfdt dtddt d dddggfgkstd S )Nr}  r   r   r   r   r   )r   r   Z
eigenvectsr   r   )r}  rF  r   r   r   test_P27l  s(    r  c                   C   s   t dd S NzQGeneralized eigenvectors not supported https://github.com/sympy/sympy/issues/5293r   r   r   r   r   test_P28  s    r  c                   C   s   t dd S r  r   r   r   r   r   test_P29  s    r  c                  C   s   t dddddgdddddgdddddgdddddgdddddgg} |  \}}|t dddddgdddddgdddddgdddddgdddddggkstd S )Nr   r   r	  r   r   r  r   )r   Zjordan_formr   )rF  rx  Jr   r   r   test_P30  s    r  c                   C   s   t dd S )Nz!Smith normal form not implementedr   r   r   r   r   test_P31  s    r  c                  C   sd   t ddgddgg} t| t t ttd t td gttd ttd ggks`td S )Nr   r   r   )r   r*   rewriter:   rm   r   r>   r   rE  r   r   r   test_P32  s    *r  c                  C   sp  t d\} }tddddgdddd|  gddddgdd|  d| d  dgg}t|| t tdd| dt||   |   d	| |  d	t||    dt||   |  d|   gddt||   d d
|  t||   d	|   dt||   gddt||   |  d|   dt||   d t||  |  gddt||   d|  t||   t||  ggksltd S )Nzw tr   r   r   r   r   r  r   r   r  )r   r   r*   r  r:   r   r>   r   )r  r?  rF  r   r   r   test_P33  s    
R>>.r  c                  C   s
  t ddd\} }}t| dddddgd| ddddgdd|dddgddd|ddgdddd|dgddddd|gg}t|tt| t| ddddgdt| ddddgddt|dddgdddt|t|t| d gddddt|t|gdddddt|ggkstd S )Nrl  Tr  r   r   r   )r   r   r>   r:   r   rm  r   r   r   test_P34  s     r  c                  C   s@   t d tdddgdddgdddgg } t| tdks<td S r  )r   r   r>   r   r   rE  r   r   r   test_P35  s
    r  c                  C   s8   t ddgddgg} t| t ddgddggks4td S )Nr   r   r   r   r   r   )r   r4   r   rE  r   r   r   test_P36  s    r  c                  C   sX   t dddgdddgdddgg} | tj t dtdddgdddgdddggksTtd S Nr   r   r   )r   r   r9  r   r   rE  r   r   r   test_P37  s    
r  c               	   C   sJ   t dddgdddgdddgg} tt | tj  d s<tW 5 Q R X d S r  )r   r|   r   r   r9  rE  r   r   r   test_P38  s    


r  c                   C   s   t ddS )zQ
    M=Matrix([
        [1, 1],
        [2, 2],
        [3, 3]])
    M.SVD()
    z,Singular value decomposition not implementedNr   r   r   r   r   test_P39  s    	r  c                  C   st   t ddd\} }t| t| | t| g}|t| |gtt||  t| gt|| t| ggksptd S )Nr=  Tr  )r   r   r:   r>   Zjacobianr   )rr  r?  rF  r   r   r   test_P40  s
    &r  c                  C   st   t ddd\} }t| d t| | |ftdt| d|  t| gd|  t| | d  t| ggksptd S )Nr=  Tr  r   )r   rL   r>   r   r:   r   r>  r   r   r   test_P41  s    4 r  c                   C   s&   t ttttgt dks"td S rZ  )rM   r:   r   r>   rm   r   r   r   r   r   test_P42
  s    r  c                  C   sx   dd } t ddd\}}t|t| |t| g}| |||gtt|| t| gt||t| ggksttd S )Nc                    s   t  fdd|D jS )Nc                    s   g | ]}  |jqS r   )r   r]  r  vrE  r   r   r!    s     z3test_P43.<locals>.__my_jacobian.<locals>.<listcomp>)r   r]  )rF  Yr   rE  r   __my_jacobian  s    ztest_P43.<locals>.__my_jacobianr=  Tr  )r   r   r:   r>   r   )r  rr  r?  rF  r   r   r   test_P43  s    "r  c                  C   s|   dd } t ddd\}}| |d t| ||ftdt| d| t| gd| t| |d  t| ggksxtd S )Nc                    s,   t fdd|D  t  fdd|D S )Nc                    s   g | ]}t  |qS r   )r   r  r   r   r   r!    s     z2test_P44.<locals>.__my_hessian.<locals>.<listcomp>c                    s   g | ]} j |qS r   )r]  r   r  )Vr   r   r!    s     )r   )r   r  r   )r  r   r   __my_hessian  s    ztest_P44.<locals>.__my_hessianr=  Tr  r   )r   r>   r   r:   r   )r  rr  r?  r   r   r   test_P44  s     r  c                  C   s.   dd } | t tttgt dks*td S )Nc                    s(   t  fddtdt D }| S )Nc                    s   g | ]}t  jt|qS r   )r   r]  r   r   r  r  r   r   r!  #  s     z4test_P45.<locals>.__my_wronskian.<locals>.<listcomp>r   )r   r   lenr  )r  r  rF  r   r  r   __my_wronskian"  s     z test_P45.<locals>.__my_wronskianr   )r:   r   r>   rm   r   )r  r   r   r   test_P45!  s    r  c                  C   st   t dddd\} }}td|d}t|| df t||df |d|d f|  d | d|d f}|  tdd S )	Nzi j nTr<  xnr   r   r   zUnknown result)r   r   r   r  r   )r   r   r   r  Smr   r   r   test_R1*  s
    @r  c            	      C   s   t d\} }t dddd\}}td|d}td|d}t||df | ||df   | d	 |d|d f}t|| }t||}t||f| |ftjd
 d S )Nzm bzi nTr<  r  r   ynr   r   r  )r   r   r   r   r   r   r  )	r   r  r   r   r  r  r   f1f2r   r   r   test_R24  s    4

r  c                  C   sn   t dddd\} }d| td|  |d  }t||dtf}| }| }|d|  td|  |  ksjtd S )Nn kTr<  r	  r   r   )r   r    r   r   r  rg   r   )r   r   skr  r]  T2r   r   r   test_R3A  s    r  c                   C   s   t dd S )NzIndefinite sum not supportedr   r   r   r   r   test_R4M  s    r  c                  C   s   t dddd\} }}}}d| t| | | | t|| ||  t||  ||   }t||dtf}| }|t| | | t| t| t|  kstd S )Nz	a b c n kTr<  r	  r   )r   r    r   r   r  r!   r   )r}  r  r  r   r   r  r  r]  r   r   r   test_R5c  s    r  c                  C   sx   t dddd\} }td| d d}t||df ||d df  |d| d f}| |d  || d df  ksttd S )	Nr  Tr<  gnr   r   r   )r   r   )r   r   r   r  r   )r   r   r  r  r   r   r   test_R6m  s    ,r  c                  C   sR   t dddd\} }t|d |d| f }| | d | d d  d ksNtd S )Nr  Tr<  r   r   r   r   )r   r   r  r[   r   )r   r   r]  r   r   r   test_R7t  s    r  c                  C   s`   t dddd\} }t|d t| | |d| f}| }| | | d  d| d   ks\td S Nr  Tr<  r   r   )r   r   r    r  rg   r   r   r   r  r]  r   r   r   test_R8y  s    r  c                  C   s`   t dddd\} }tt| |d | |d| d f}|  d| d  d | d  ks\td S Nr  Tr<  r   r   )r   r   r    r  rm   r   )r   r   r  r   r   r   test_R9  s    "r  c                  C   s   t dddd\} }}}tt| |t|||  |d|f}| }| t}|t||  t|t||  |   ks|t|t||  |tkst|t}|t||  |kstd S )Nzn m r kTr<  r   )r   r   r    r  rg   r  r!   r   )r   r   rr  r   r  r]  r  ZT3r   r   r   test_R10  s    $,
r  c                  C   sT   t dddd\} }t| |t| }t||d| f}| }|td|  ksPtd S )Nr  Tr<  r   r   )r   r    r$   r   r  r   )r   r   r  r  r]  r   r   r   test_R11  s
    r  c                  C   sR   t dddd\} }tt|d |d| f}| }|t| t| d  ksNtd S )Nr  Tr<  r   r   r   )r   r   r$   r  r   r  r   r   r   test_R12  s    r  c                  C   sz   t dddd\} }tt|t |d| f}| }| ttd d ttd|  d  d dttd    ksvtd S r  )	r   r   r>   r   r  rm   r;   r:   r   r  r   r   r   test_R13  s    r  c                  C   sb   t dddd\} }ttd| d t |d| f}| }| t| t d tt ks^td S r  )r   r   r>   r   r  rm   r   r  r   r   r   test_R14  s     r  c                  C   sX   t dddd\} }tt| | ||dt| d f}| }| t| d ksTtd S )Nr  Tr<  r   r   r   )r   r   r    r1   r  rm   r$   r   r  r   r   r   test_R15  s    "r  c                  C   sV   t dddd} td| d  d| d   | dtf}| tdtd d  ksRtd S )Nr   Tr<  r   r   r   r   )r   r   r   r  rv   r   r   )r   r  r   r   r   test_R16  s    $r  c                  C   sJ   t dddd} tttd| d  d| d   | dtfd dk sFtd S )	Nr   Tr<  r   r   r   g3@V瞯<)r   r  floatr   r   r   r   r   r   r   test_R17  s    (r  c                  C   sd   t dddd} tdd|  | d   | dtf}| }| tdd  d td d  ks`td S )Nr   Tr<  r   r   r   )r   r   r   r  rm   r+   r   r   r   r  r]  r   r   r   test_R18  s     r  c                  C   sx   t dddd} tdd|  d d|  d  d|  d   | dtf}| }| td d tdt d	  ksttd S )
Nr   Tr<  r   r   r   r   r   r   )	r   r   r   r  rm   r+   r4   r   r   r  r   r   r   test_R19  s    4r  c                  C   st   t dddd\} }tt| d| |dtf}| }| d| d  tt|  d  d d| d  d  ksptd S )Nr  Tr<  r   r   r   r   )	r   r   r    r   r  rm   r:   r   r   r  r   r   r   test_R20  s    r  c                  C   s^   t dddd} tdt| | d  t| t| d    | dtf}| }| dksZtd S )Nr   Tr<  r   )r   r   r4   r   r  rm   r   r  r   r   r   test_R21  s    4r  c                  C   s   t dddd\} }ttt| t|d t| d|    tt |  tt | |   | d| tf|dtf}| }|dttd td  dtd   dt t  d  kstd S )	Nr  Tr<  r   r   r	  r   r   )	r   r   r!   r   ra  r   r  r4   r   r  r   r   r   test_R23  s    &
r  c                  C   sR   t dddd\} }tt|d| d  |d| f| dtf}| td ksNtd S )Nzm kTr<  r   r   )r   r   r   r   r  r   r   )r   r   r  r   r   r   test_R24  s    (r  c                  C   sR   t dddd} tt| d | ddf}|  dtd td  d ksNtd S )	Nr   Tr<  r   r   r   i  i  )r   r   rD   r  rm   r4   r   r   )r   Prr   r   r   test_S1  s    r  c                  C   s6   t dddd\} }t||d| f t| ks2td S Nr  Tr<  r   )r   r   r  r!   r   r   r   r   r   r   test_S2	  s    r  c                  C   sJ   t dddd\} }tt| |d| f  t| | d  d  ksFtd S r  )r   r   r   r  rm   r   r  r   r   r   test_S3  s    r  c                  C   sB   t dddd\} }tdd|  |d| d f  | ks>td S r  )r   r   r  rm   r   r  r   r   r   test_S4  s    r  c                  C   sd   t dddd\} }td| d d|  |d| f  t| tj ttt| d   ks`t	d S r  )
r   r   r  Z	gammasimprD   r   r9  r4   r   r   r  r   r   r   test_S5  s    & r  c                  C   sr   t dddd\} }ttd dt t|t |    d |d| d f  td|   d td d  ksntd S r  )r   r   r   r:   r   r  rm   r   r  r   r   r   test_S6  s    :r  c                  C   sT   t dddd} t| d d | d d  | dtf}| }| tddksPtd S )Nr   Tr<  r   r   r   )r   r   r   r  rm   r   r   r   r  r]  r   r   r   test_S7&  s    $r  c                  C   sN   t dddd} tddd|  d   | dtf}| }| dt ksJtd S )Nr   Tr<  r   r   )r   r   r   r  rm   r   r   r  r   r   r   test_S8.  s     r  c                  C   sV   t dddd} tdd| d  d|  d   | dtf}| }| tdksRtd S )Nr   Tr<  r   r	  r   )r   r   r   r  rm   r4   r   r  r   r   r   test_S97  s    (r  c                  C   s^   t dddd} t| | d  d t | | d  d t  | dtf}| }| dksZtd S )Nr   Tr<  r   r   r	  )r   r   r   r   r  rm   r   r  r   r   r   test_S10A  s    4r  c                   C   sJ   t ddt  t tttks tt dtt td  tdtjksFtd S r  )	r^   r   r   r   r   r:   r   r   r9  r   r   r   r   test_T1J  s     r  c                   C   s,   t dt dt  dt  ttdks(td S )Nr   r   r   )r^   r   r   r   r   r   r   r   test_T2O  s    r  c                   C   s,   t tttttt  ttdks(td S rZ  )r^   r+   r   r>   r   r   r   r   r   r   test_T3S  s    r  c                   C   sZ   t tttt  tt tdtd  td    tt t tttd ksVtd S )Nr   r   r   )r^   r*   r   r   r   r   r   r   r   test_T4W  s    4 r  c                   C   sr   t ttt tttt td  d  tttd dttdtd  tt    tttddksntd S )Nr   r   r   )r^   r   r+   r*   r   r   r   r   r   r   r   test_T5\  s    2 r   c                   C   s0   t dt ttdt   tttdks,td S Nr   r	  )r^   r   r!   r   r*   r   r   r   r   r   test_T6a  s    r  c                   C   s(   t dt ttd dt   tt d S rZ  )r^   r   rD   r   r   r   r   r   test_T7e  s    r  c                  C   sJ   t ddd\} }tt||  t| t|  t|  |tdksFtd S )Nza zTr  r   )r   r^   rD   r*   r+   r   r   )r}  rb  r   r   r   test_T8i  s    r  c                  C   s<   t ddd\} }ttd|fd| | |tt| ks8td S )Nzz kTr  r   )r   )r   r^   rF   r   r*   r   )rb  r   r   r   r   test_T9n  s    r  c                   C   sD   t ttdtd   tdtdt dtt  tdtfks@td S r  )r^   rv   r   r   r1   r   r   r   r   r   r   test_T10v  s    r  c                  C   sN   t dddd\} }t| t ttdt|  |d| f  | tttksJtd S r  )r   r^   r   r   r   rD   r   r  r   r   r   test_T11{  s    r  c                  C   sT   t ddd\} }t| tt|d  |d| f dt| d    | ddksPtd S )Nx tTr  r   r   r   )r   r^   r   r*   r   )r   r?  r   r   r   test_T12  s    0 r	  c                  C   sL   t ddd} t| t|  | dddt| t|  | dddgdd	gksHtd S )
Nr   Tr  r   -dir+r	  r   )r   r^   r  r   r.  r   r   r   test_T13  s    r  c                  C   s6   t ddd} ttt|  | dddtd ks2td S )Nr   Tr  r   r  r  r   )r   r^   r9   r+   r   r   r.  r   r   r   test_T14  s    r  c                  C   s*   t ddd} tt| | t| ks&td S )Nr   Tr  )r   r   r  r(   r   r.  r   r   r   test_U1  s    r  c                  C   sR   t ttt tdk fttdkf} t| tttdtdk fdtdkfksNtd S )Nr   r	  r   r
   r   r5   r   r   r  r   r   r   test_U2  s    "r  c                  C   sl   t tttd d tdkftd tdkf} t tt| tt}|tdtd  ksXt|ddkshtd S r  r  )r   r  r   r   r   test_U3  s    ,r  c                  C   sD   t dddd} t ddd}t||  || }|tt| ks@td S )Nr   Tr<  r   r  )r   r   r  r!   r   )r   r   r  r   r   r   test_U4  s    r  c                  C   s   t d} ttt| t| tt| | df ttt| t| dftt| | d   }tt| | d|ksxt| |kstd S )Nr?  r   )r   r   r   r   r   r   r  )r?  Zansr   r   r   test_U5  s    &*r  c                  C   sj   t d} tttt| tttf}|tttttttt t| tt| tt  ksftd S )Nr  )	r	   r   r   ra  r   r   r   r   r   )r  r]  r   r   r   test_U6  s
    2r  c                  C   s"   t ddd\} }tt| | d S )Nzp tTr  )r   r   r   )r   r?  r   r   r   test_U7  s    r  c                  C   sb   t ddd\} }t| | |  }t|| || | t| |  d | t| |  d  ks^td S )Nr%  Tr  r   )r   r:   rJ   r>   r   )r   ra  eqr   r   r   test_U8  s    r  c                  C   s   t ddd\} }tt| || tt| || }|t| |t| d |d  }|  }|| | ttt| | | | d |d   d kst	d S )Nr%  Tr  r   )
r   r   r   r  r   r  r[   r   r   r   )r   ra  Zsus2Zs3r   r   r   test_U9  s
    
 "	r  c                   C   s:   t td d td d td   tdtddks6td S )Nr   r   r   r   r	  rf  )r`   rb  r   r   r   r   r   r   test_U10  s    r  c                   C   s   t d S r   r   r   r   r   r   test_U11  s    r  c                   C   s   t dd S )Nz0External diff of differential form not supportedr   r   r   r   r   test_U12  s    r  c                   C   s8   t td t d tddtdd  d d ks4td S )Nr   r   r  r   r   r   )r   r   r   r   r   r   r   r   test_U13  s    r  c                   C   s   t dd S )Nz$minimize(), maximize() not supportedr   r   r   r   r   test_U14	  s    r   c                   C   s   t dd S )NzRminimize() not supported and also solve does not support multivariate inequalitiesr   r   r   r   r   test_U15
	  s    r!  c                   C   s   t dd S )Nz[minimize() not supported in SymPy and also solve does not support multivariate inequalitiesr   r   r   r   r   test_U16	  s    r"  c                   C   s   t dd S )Nz;Linear programming, symbolic simplex not supported in SymPyr   r   r   r   r   test_U17	  s    r#  c                  C   sJ   t ddd} tt| | t| d  d | dkf| d d dfksFtd S )Nr   Tr  r   r   )r   r   r  r5   r   r.  r   r   r   test_V1	  s    r$  c                   C   sR   t tt tdk fttdkftttd  d tdk ftd d dfksNtd S )Nr   r   T)r   r5   r   r   r   r   r   r   test_V2!	  s     &r%  c                   C   s6   t dtd d  t  dtd d  ks2td S )Nr   r   r   )r   r   r   rm   r   r   r   r   r   test_V3&	  s    r&  c                   C   s:   t dt tddt   ttdt td ks6td S )Nr   r   r   )r   r   r4   r,   r+   r   r   r   r   r   test_V4*	  s    r'  c                   C   sj   t dt d d dt d tdd  t ddt  dtd   ddt d tdd   ksftd S )	Nr   r   r   r   r   ir_  -   )r   r   r   rm   r   r   r   r   r   test_V5.	  s    .0r)  c                   C   s|   t ddttt  dtt t    ttdtdttt  td tdttt  td   dt  ksxtd S )Nr   r   r   r   rW  )r   r*   r   r   r4   r+   r   r   r   r   r   test_V65	  s
    06r*  c                  C   sb   t ttd ttd  } |  ttdd ttd dtt   dtt d  ks^td S )Nr   r   r  r   )r   r.   r   r-   rm   r   r/   r   r1r   r   r   test_V7<	  s    r-  c                   C   s   t dd S )Nz'Integrate with assumption not supportedr   r   r   r   r   
test_V8_V9A	  s    r.  c                   C   sJ   t dddtt  dtt   ttdttd  d d ksFtd S )Nr   r   r   r   )r   r:   r   r>   r+   r?   r   r   r   r   r   test_V10R	  s    r/  c                  C   sp   t dddtt  dtt   t} t| }t|ddtttd d ttd d  tdd kslt	d S )Nr   r   r   T)forcer   r   )
r   r:   r   r>   r[   rl   r+   r?   r   r   r,  r2r   r   r   test_V11V	  s
    &
,r3  c                  C   sF   t dddtt  dtt   t} | dttd d  ksBtd S )Nr   r   r   r   r	  r   )r   r:   r   r>   r?   r   r+  r   r   r   test_V12]	  s    &r4  c                  C   sj   t dddtt  dtt   t} |  dtd ttddttd  d  d  d ksftd S )Nr   r   r   r   r   r   )	r   r:   r   r>   rm   r4   r9   r?   r   r+  r   r   r   test_V13b	  s    &r5  c                  C   sr   t tttd td  t} |  ttttd td   tttt   tttt   dt  ksntd S r  )r   r+   r  r   ra  rm   r   r+  r   r   r   test_V14j	  s     r6  c                  C   sR   t tttt  t} t| tt td td  ttt   d  dksNtd S Nr   r   )r   r   r7   ra  rm   r   r+  r   r   r   test_V15s	  s    r8  c                   C   s^   t tdt tdt  ttdt tdt  d tdt tdt  d  ksZtd S )Nr   r   r   r   r   )r   r:   r   rs   r>   rt   r   r   r   r   r   test_V16x	  s    r9  c                  C   s   t tttttt tttttt  ttd ttd   t} t| tttt tttt  d  dks~td S r7  )r   r   r   r   r   rm   r   r+  r   r   r   test_V17}	  s    r:  c                   C   s,   t dtt  ttd td fdks(td S )Nr   r   )r   r   ra  r   r   r   r   r   test_W1	  s    r;  c                   C   s0   t dtt d  ttd td ftks,td S r  )r   r   ra  r   r   r   r   r   r   test_W2	  s    r<  c                   C   s2   t ttdt  d tddftddks.td S Nr   r   r   r   r   r   r4   r   r   r   r   r   r   r   test_W3	  s    r?  c                   C   sB   t ttdt  d tddfdtd d tdd ks>td S )Nr   r   r   r   r   r>  r   r   r   r   test_W4	  s    r@  c                   C   sB   t ttdt  d tddfdtd d tdd ks>td S )Nr   r   r   r   r   r   r>  r   r   r   r   test_W5	  s    rA  c                   C   sH   t tddtdt   d tttdd t d ftdksDtd S )Nr   r  r   )r   r4   r:   r   r   r   r   r   r   r   r   test_W6	  s    rB  c                  C   sT   t ddd} ttttd | d   tt tf}| tt|   |  ksPtd S )Nr}  Tr  r   )	r   r   r:   r   r   rm   r   r*   r   )r}  r,  r   r   r   test_W7	  s    &rC  c                   C   s   t dd S )Nz1Integrate with assumption 0 < a < 1 not supportedr   r   r   r   r   test_W8	  s    rD  c                  C   s   t dtd  dt td  td  td   tt tf} |  }|dt ttd d d ttdd d   ks|td S )	Nr   r   r   r   r   r   r   g      ?)r   r   r   r  r   r4   r   r1  r   r   r   test_W9	  s    :rE  c                  C   sl   t tdt td  td   tt tf} |  }|dt tdd d  tttdd  d kshtd S )Nr   r   r   r   g      ?)	r   r   r   r  r   r4   r<   r   r   r1  r   r   r   test_W10	  s    *rF  c                   C   s@   t tdtd  dtd   tddftdtd  ks<td S rp  )r   r4   r   r   r   r   r   r   r   test_W11	  s    &rG  c                  C   s   t ddd} t ddd}ttt|  td  d| t   tt tf}| tt| t|d |   | tdd  ks~t	d S )Nr   Tr  r-  r  r   r   )
r   r   r   r*   r   rm   r4   r   r   r   )r   r-  r,  r   r   r   test_W12	  s    0rH  c                  C   sH   t dtt ddt   ttdt  tddf} | dt ksDtd S r  )r   r+   r   r   r   r+  r   r   r   test_W13	  s    4rI  c                   C   s6   t ttt tdt t  tt tfdks2td S r7  )r   r>   r   r*   r   r   r   r   r   r   r   test_W14	  s    rJ  c                   C   s:   t ttttdt t  tddftddks6td S )Nr   r   r   r   )r   r+   rD   r   r:   r   r   r   r   r   r   r   test_W15	  s    rK  c                   C   s>   t dt d tdt tdt tddftddks:td S )Nr   r   r   r	  r  #   )r   r   rX   r   r   r   r   r   r   test_W16	  s
     rM  c                  C   s`   t ddd\} }tt|  t td|t  tdtfd|t| d |d  d   ks\td S )Na bTr  r   r   r   )r   r   r*   r   r@   r   r4   r   r  r   r   r   test_W17	  s    rO  c                   C   s2   t tdtt d tdtfddt  ks.td S r=  )r   r@   r   r   r   r   r   r   r   r   test_W18
  s    rP  c                   C   sB   t tttddtdt   tdtftdd d ks>td S )Nr   r   r   r   )r   rs   r   r@   r4   r   r:   r   r   r   r   r   test_W19
  s    rQ  c                   C   s   t td tddtd   tddftd  d tdd tdd  td  d dtd  tdd  d	 td d
  kstd S )Nr   r   r   r   r  r   l   r   gUUUUUU'@r   )r   r   rI   r   r   rv   r+   r   r   r   r   r   test_W20
  s
    $"4rS  c                	   C   s>   t tttd tddtd   tddfd dk s:td S )Nr   r   r   r   g5?r  )r  r   r   r   rI   r   r   r   r   r   test_W21
  s
    *rT  c                  C   s   t ddd\} }tttdttdktdkfd}t|| t|  | d|ftd|dk fttd| ttd| dfkst	d S )Nzt uTr  r   r   )r   Tr   )
r   r
   r   r5   rK   r   r:   r>   r3   r   )r?  ur;  r   r   r   test_W22
  s    "
 rV  c                  C   sf   t ddd\} }ttttd td   t| |ftt tf}|t t |  t|  ksbtd S NrN  Tr  r   )	r   r   r   ra  r   collectr   cancelr   )r}  r  r,  r   r   r   test_W23#
  s    .rZ  c                  C   s^   t ddd\} }ttttd td   tt tft| |f}|tt|  |  ksZtd S rW  )r   r   r   ra  r   rX  r   r   )r}  r  r2  r   r   r   	test_W23b*
  s    .r[  c                  C   sp   t rtd tddd\} }ttt| d |d  | ddf|ddf}|tdtd d   dksltd S )	NToo slow for CI.r%  Tr  r   r   r   r   )r{   rz   r   r   r4   r,   rm   r   )r   ra  r,  r   r   r   test_W241
  s
    ,r]  c                  C   s   t rtd tddd\} }}tt| t| tdt| d t|d  t|d    |dtd f}t||dtd f}|t|  d   dkstd S )Nr\  za x yTr  r   r   r   )	r{   rz   r   r   r>   r4   r   rm   r   )r}  r   ra  i1i2r   r   r   test_W25=
  s    :r`  c                  C   sJ   t ddd\} }ttt|| d  |ddf| ddftdd	ksFtd S )
Nr%  Tr  r   r   r	  r   rN  r   )r   r   r  r   r   r  r   r   r   test_W26J
  s    ra  c               
   C   sn   t d\} }}tttdtd|dt|   t|   ftd|dt|    ftd| f| | | d ksjtd S )Nrl  r   r   r   )r   r   rb  r   ra  r   )r}  r  r  r   r   r   test_W27P
  s    &rb  c                  C   s   t ddd\} }tdtd| | d   | dddd	| d
  d|d
   d| d  d|d    | d d|d    d t| d  kstd S )Nv cTr  r   r   r   r   Zx0r   r   r   r   r   r   r   ra   r4   r_   r   )r  r  r   r   r   test_X1W
  s    "Rrf  c                  C   sv   t ddd\} }tdtd| | d   | ddd}d|d  j| ddd| d  |d  d t| d  ksrtd S )	Nrc  Tr  r   r   r   r   rd  re  )r  r  s1r   r   r   test_X2]
  s    $rh  c                  C   sl   t t tt   } tt }|ttd d  dtd  d  ttd  ks\t| |kshtd S )Nr   r   r   r   r   )r>   r   ra   r:   r?   r_   r   )rg  r  r   r   r   test_X3c
  s    4ri  c                  C   sf   t ttt  } | td  d td d  ttd  ksBtt tttt  | ksbtd S )Nr   r   r      )r+   r>   r   ra   r_   r   )rg  r   r   r   test_X4j
  s    .rk  c                  C   sb   t d} tddd\}}}}ttt|t tt|t  t| |t tdtf t|dd d S )Nr  za b c dTr  r   r   rd  )	r	   r   ra   r   r   r   r   r   ra  )r  r}  r  r  r  r   r   r   test_X5p
  s    6  rl  c                  C   s|   t dddd\} }tt| | t t| t t|t   tdddtd |  | d ||  d   ttd  ksxtd S )NrN  F)r  Zscalarr   r   rd  r   )r   ra   r*   r   r_   r   r  r   r   r   test_X6
  s    2,rm  c                   C   st   t dtttd   tddtd ddt   tdd td d  td d	  td
 d  ttd  ksptd S )Nr   r   r   r   r   r   i  r   i v  r   i u )ra   r   r*   r   r_   r   r   r   r   r   test_X7
  s    .



rn  c               	   C   s   t ddd} ttt| | td d dddt| ttdd   | ttdd  tdd d	  | ttdd  td
d d  t| ttdd  d | ttdd f kstd S )Nr   Tr  r   r   r   rd  r   r   r      )r   ra   r4   r=   r   r   r_   r   r.  r   r   r   test_X8
  s    8(rp  c                   C   st   t tt tddddttt  td ttd  d  td ttd  d  ttd ttd   ksptd S )Nr   r   rd  r   r   r   r   )ra   r   r+   r_   r   r   r   r   r   test_X9
  s
    8rq  c                  C   sp   t d\} }ttt| tt| |  | dddtt|t|  | t| t|  t| d  ksltd S Nzz wr   r   rd  r   ra   r+   r.   r-   r_   r   rb  r  r   r   r   test_X10
  s    &2ru  c                  C   sl   t d\} }ttt| t| |  | dddtt|t|  | t| t|  t| d  kshtd S rr  rs  rt  r   r   r   test_X11
  s    "2rv  c                  C   s   t ddd\} }}tt||  t| |  |ddd|d |  t| d| d|  |d  d  t|d d   ks|td S )Nza b xTr  r   r   rd  )r   ra   r+   r*   r_   r   )r}  r  r   r   r   r   test_X12
  s    $>rw  c                   C   sF   t tdtd  d ttddtdt tdt ttf ksBtd S )Nr   r   rd  )ra   r4   r   r   r_   r   r   r   r   r   test_X13
  s    rx  c                   C   s\   t dddt   tdt t tttkdddtttt  tdt ttf ksXtd S )Nr   r   r  )	ra   r   r    r   r   r4   r   r_   r   r   r   r   r   test_X14
  s      $ry  z*https://github.com/sympy/sympy/issues/7164c                  C   s   t ddd\} }tt| | || tf}t|| tddd| d  d| d	   d
| d   d
|   t| d | tf ks|td S )Nr  Tr  r   rd  r   r   r   r   r   r   )r   r   r*   r   ra   r_   r   )r   r?  e1r   r   r   test_X15
  s
    <r{  c                   C   sx   t ttt tt ddddtt d d  ttd td t  td td   ttd   td  tt ksttd S )Nr   r   rd  r   r   r   )ra   r:   r   ra  r_   r   r   r   r   r   test_X16
  s    ,>r|  c                   C   sh   t tttt tdt ddt d   tdt  tdt   ttdt   tdtfksdt	d S )Nr	  r   r   )
r   r+   r>   r   r   r   r#   r!   r   r   r   r   r   r   test_X17
  s    Jr}  c                  C   sf   t d} ttt tt tdtj|   ttdd|  t	  t|   t
|  | dtfksbtd S )Nr   r   r   r   r   )r   r   r*   r   r>   r   r   r9  r   r   r!   r   r   r  r   r   r   test_X18
  s    >r~  c                   C   s   t dd S )NzTSolve using series not supported. Inverse Taylor series expansion also not supportedr   r   r   r   r   test_X19  s    r  c                   C   s   t dd S )Nz'Symbolic Pade approximant not supportedr   r   r   r   r   test_X20  s    r  c                  C   s   t ddd} t dddd}ttt|  | f}|jjdks<t|jj|jjd ddks\t|jj|jjd |d|  t	 d|  | t
|t	 t |   kstd	S )
z
    Test whether `fourier_series` of x periodical on the [-p, p] interval equals
    `- (2 p / pi) sum( (-1)^n / n sin(n pi x / p), n = 1..infinity )`.
    r   Tr  r   )r=  r   r   r   r	  N)r   r   r   ZanZformular   Zbnr  	variablesr   r>   )r   r   r;  r   r   r   test_X21&  s     *r  c                   C   s   t dd S )NzFourier series not supportedr   r   r   r   r   test_X228  s    r  c                  C   sb   t ddd} t ddd}t d}tt|d |  | |\}}}|||d |d d   ks^td S )	Nr?  Tr  r  r  r;  r   r   )r   r   r:   r   r?  r  r;  rN  rx  r   r   r   test_Y1Y  s
    r  c                  C   s`   t ddd} t ddd}t d}t||d |d d   || dd	}|t| |d  ks\td S )
Nr?  Tr  r  r  r;  r   r   rm   )r   r   r:   r   )r?  r  r;  r   r   r   r   test_Y2a  s
    $r  c                  C   sn   t ddd} t ddd}t d}tt||  t||   | |dd\}}}|||d d	|d    ksjtd S )
Nr?  Tr  r  r  r;  r  r   r   )r   r   r.   r-   r   r  r   r   r   test_Y3i  s
    *r  c                  C   s^   t ddd} t d}ttdt|  | |dd\}}}|d| tdt| |  ksZtd S )	Nr?  Tr  r;  r   r  r   r  )r   r   ru   r4   r*   r   )r?  r;  rN  rx  r   r   r   test_Y4q  s    "r  c                  C   s   t ddd} t d}td}tt|| | d||  dt| d t| d    | |dd	\}}}||d t|| | | ||d
  t|| | | tt|| | | d
 ddt|  td|  |   j	dd}|d
kst
d S )Nr?  Tr  r;  ra  r   r   r   r  r   r   F)r  )r   r	   r   r   rr   r   r   r   r*   rm   r   )r?  r;  ra  rN  rx  Dr   r   r   
test_Y5_Y6x  s(      $r  c               	   C   s   t ddd} t ddd}t d}tddtd	t t| t|   tdtf  | |\}}}|dtd	t t| t |  | tdtf d|  kstd S )
Nr?  Tr  r}  r  r;  r   r   r	  )r   r   r   r   rr   r   r*   r   )r?  r}  r;  rN  rx  r   r   r   test_Y7  s     
r  c                   C   s   t dttttkstd S rZ  )r   r   rb  rA   r   r   r   r   r   test_Y8  s    r  c                   C   sF   t tdtd  ttttttd  td  d  d ksBtd S )Nrf  r   r   r   )r   r*   r   rb  r4   r   r   r   r   r   r   test_Y9  s    $r  c                   C   sp   t tttdtt  tt dtd  td  d dtd  td  dtd  td   d  ksltd S )	Nr  r  r   rn  r   r   r   rP  )r   r  r   r*   rb  rY  r   r   r   r   r   r   test_Y10  s    "Br  z*https://github.com/sympy/sympy/issues/7181c                  C   sB   t d\} }tdd|   | |\}}}|ttt|  ks>td S )Nx sr   )r   r   r   r;   r   r   r;  rN  rx  r   r   r   test_Y11  s    r  c                  C   sd   t d\} }ttd| | d  | |\}}}|d|d   t|d  t| d d  ks`td S )Nr  r   r   r   )r   r   r@   rD   r   r  r   r   r   test_Y12  s     r  c                   C   s   t dd S Nzz-transform not supportedr   r   r   r   r   test_Y13  s    r  c                   C   s   t dd S r  r   r   r   r   r   test_Y14  s    r  c                  C   sp   t d} t| td d| td   | t d | t| dd| dti td ttd   d ksltd S )Nrr  r   r   r   )r	   r   r   r   rm   r   rr  r   r   r   test_Z1  s    .r  c                  C   sf   t d} t| td| td  d| td    | t| dd| ddidt  dt  ksbtd S )Nrr  r   r   r   r   r   r   )r	   r   r   r   r  r   r   r   test_Z2  s    Br  c                  C   s   t d} tdd tdd  t tdd tdd   tdd tdd  t tdd tdd    }t| t| td | td   | t| dd| ddi}||kstd S )Nrr  r   r   r   r   )r	   r   r4   r   r   r   )rr  expectedr  r   r   r   test_Z3  s    22<r  c               	   C   s  t d} td}t| td| |td   |td   d|t   | td  |d|td    d|td    | td   d  | t| dd| ddd|  |d  d|  i}||td  |td  d|  d  td |d   d|  t |d d |d    dkstd S )Nrr  r  r   r   r   r   )r	   r   r   r   r   )rr  r  r;  r   r   r   test_Z4  s*    >. *$r  c                  C   s  t d\} }ttttddtt  tdt  }t|tt}tt|j}|t|tdt  | td  tdt   kst	ttt
|tt}t|d|df}|t| ||  ||| }|t tdt  d tdt d  kst	tdd S )NzC1 C2r   r   r   r   z1ODE solving with initial conditions not supported)r   r   r   r   r>   r   r
   rhsr:   r   r   rp   r  r   )ZC1ZC2r  r  Zf0r  Z
const_dictresultr   r   r   test_Z5  s    (4 .r  c                  C   s   t ddd} t d}tt| | ddt|   td|   }t|| |\}}}||d tt| | | dtt| | |  d|d d   kstd S )Nr?  Tr  r;  r   r   )r   r   r   r>   r   r   r   )r?  r;  r  rN  rx  r   r   r   test_Z6  s    (r  (  __doc__Zsympy.assumptions.askr   r   Zsympy.assumptions.refiner   Zsympy.concrete.productsr   Z
sympy.corer   Zsympy.core.evalfr   Zsympy.core.functionr   r	   r
   r   r   r   r   Zsympy.core.mulr   Zsympy.core.numbersr   r   r   r   r   r   r   r   r   Zsympy.core.relationalr   r   Zsympy.core.singletonr   Zsympy.core.symbolr   r   r   Z(sympy.functions.combinatorial.factorialsr   r    r!   r"   Z%sympy.functions.combinatorial.numbersr#   r$   Z$sympy.functions.elementary.complexesr%   r&   r'   r(   Z&sympy.functions.elementary.exponentialr)   r*   r+   Z%sympy.functions.elementary.hyperbolicr,   r-   r.   r/   Z#sympy.functions.elementary.integersr0   r1   Z(sympy.functions.elementary.miscellaneousr2   r3   r4   Z$sympy.functions.elementary.piecewiser5   Z(sympy.functions.elementary.trigonometricr6   r7   r8   r9   r:   r;   r<   r=   r>   r?   Zsympy.functions.special.besselr@   Z'sympy.functions.special.delta_functionsrA   Z*sympy.functions.special.elliptic_integralsrB   rC   Z'sympy.functions.special.gamma_functionsrD   rE   Zsympy.functions.special.hyperrF   Z#sympy.functions.special.polynomialsrG   rH   Z&sympy.functions.special.zeta_functionsrI   Zsympy.geometry.utilrJ   Zsympy.logic.boolalgrK   Zsympy.matrices.denserL   rM   Z!sympy.matrices.expressions.matmulrN   Z sympy.ntheory.continued_fractionrO   r2  rP   r3  rQ   r6  rR   r8  Zsympy.ntheory.factor_rS   rT   Zsympy.ntheory.generaterU   Zsympy.ntheory.partitions_rV   Zsympy.polys.domains.integerringrW   Zsympy.polys.orthopolysrX   Zsympy.polys.partfracrY   Zsympy.polys.polytoolsrZ   r[   r\   r]   Zsympy.series.limitsr^   Zsympy.series.orderr_   Zsympy.series.residuesr`   Zsympy.series.seriesra   Zsympy.sets.fancysetsrb   Zsympy.sets.setsrc   rd   re   rf   Zsympy.simplify.combsimprg   Zsympy.simplify.hyperexpandrh   Zsympy.simplify.powsimpri   rj   Zsympy.simplify.radsimprk   Zsympy.simplify.simplifyrl   rm   Zsympy.simplify.sqrtdenestrn   Zsympy.simplify.trigsimpro   Zsympy.solvers.solversrp   r  rq   rr   Z'sympy.functions.special.error_functionsrs   rt   ru   rv   Zsympy.testing.pytestrw   rx   ry   rz   r{   r|   Zsympy.utilities.iterablesr}   r~   r   Zsympy.matricesr   r   r   Z&sympy.matrices.expressions.blockmatrixr   r   Zsympy.matrices.expressionsr   r   Zsympy.physics.quantumr   Zsympy.polys.ringsr   Zsympy.polys.fieldsr   Zsympy.polys.solversr   Zsympy.concreter   r   Zsympy.integralsr   Zsympy.integrals.transformsr   r   r   r   r   Zsympy.solvers.recurrr   Zsympy.solvers.solvesetr   r   r   Zsympy.solvers.oder   r   	itertoolsr   r   Zsympy.series.formalr   Zsympy.series.fourierr   Zsympy.calculus.utilr   r  r   r   ra  rb  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+  r4  r5  r7  r:  r?  rA  rB  rC  rD  rF  rJ  r[  r\  r-  r]  r^  rd  re  rg  rh  rj  rk  rl  rq  rs  rx  ry  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  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  r1  r2  r3  r4  r5  r6  r7  r8  r9  r:  r;  r<  r@  rA  rB  rG  rI  rK  rO  rP  rS  rT  rU  rb  rc  rd  re  rg  rk  rn  ro  rr  ru  rv  ry  rz  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  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/  r3  r4  r5  r6  r8  r9  r:  r;  r<  r?  r@  rA  rB  rC  rD  rE  rF  rG  rH  rI  rJ  rK  rM  rO  rP  rQ  rS  rT  rV  rZ  r[  r]  r`  ra  rb  rf  rh  ri  rk  rl  rm  rn  rp  rq  ru  rv  rw  rx  ry  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>   s  $,0 





















	















BN>





				


?			

			
			
		
	
		

 
