U
    «Ì0e"  ã                   @   s\  d 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
 ddlmZ ddl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 ddlmZmZ ddlmZ edƒZ edƒZ!edƒZ"edƒZ#edƒZ$edƒZ%edƒZ&edƒZ'e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'„ Z0d(d)„ Z1ed*d+„ ƒZ2d,d-„ Z3d.S )/zp
If the arbitrary constant class from issue 4435 is ever implemented, this
should serve as a set of test cases.
é    )ÚFunction)ÚI)ÚPow)ÚEq)ÚS)ÚSymbol)ÚexpÚlog)ÚcoshÚsinh)Úsqrt)ÚacosÚcosÚsin)ÚIntegral)ÚconstantsimpÚconstant_renumber)ÚXFAILÚxÚyÚzÚu2Ú_aÚC1ÚC2ÚC3Úfc                   C   s¢  t ttt tgƒƒtt ks t‚t ttt tgƒƒtt ks@t‚t ttt tgƒƒtt ks`t‚t ttt tgƒƒtt ks€t‚t tdt tgƒƒtksœt‚t ttd tgƒƒtks¸t‚t ttt t ttgƒƒtt ksÞt‚t ttt t ttgƒƒtt kst‚t ttt t ttgƒƒtt ks.t‚t ttt t ttgƒƒtt ksVt‚t ttt t ttgƒƒtt ks~t‚t ttt td  tgƒƒtt td  ks°t‚t ttt td  tgƒƒtt td  ksât‚t tttt  tgƒƒtt t kst‚t tttt  tgƒƒtt t ks6t‚t tttt  ttgƒƒtt ks^t‚t ttt t ttgƒƒtt ks†t‚t ttt t ttgƒƒtt ks®t‚t tttd  t ttgƒƒtksÖt‚t ttt t ttgƒƒtt ksþt‚t tttt  ttgƒƒtt ks&t‚t ttt t ttgƒƒtt ksNt‚t ttt t t t d ttgƒƒttd  ks†t‚t ttt t t tttgƒƒtt ks´t‚t ttt td  ttƒ tttgƒƒtt ksêt‚t ttt tgƒƒtkst‚t ttt ttgƒƒtks(t‚t ttt ttgƒƒtksHt‚t ttt t ttgƒƒtkslt‚t ttt dt  tgƒƒtt dt  ksžt‚d S )Né   é   )	r   r   r   r   ÚAssertionErrorr   r   r   r   © r    r    úI/tmp/pip-unpacked-wheel-_6tpq7m6/sympy/solvers/tests/test_constantsimp.pyÚtest_constant_mul    s<        &((((22**(((((((8.6  $r"   c                   C   s  t ttt tgƒƒtkst‚t ttd tgƒƒtks8t‚t tdt tgƒƒtksTt‚t ttt ttgƒƒtksrt‚t ttt tgƒƒtt ks’t‚t ttt tgƒƒtks®t‚t ttt ttgƒƒtksÌt‚t ttt ttgƒƒtksêt‚t ttt t ttgƒƒtkst‚d S ©Nr   )r   r   r   r   r   r   r   r    r    r    r!   Útest_constant_addA   s     r$   c                   C   s:  t ttt tgƒƒtkst‚t ttttƒtgƒƒtks:t‚t ttt tgƒƒtksVt‚t ttt ttgƒƒtkstt‚t ttt ttgƒƒtks’t‚t ttt ttgƒƒtks°t‚t ttt ttgƒƒtksÎt‚t ttt tgƒƒtt ksît‚t ttd tgƒƒtkst‚t tttt  tgƒƒttt  ks6t‚d S r#   )r   r   r   r   r   r   r   r   r    r    r    r!   Útest_constant_power_as_baseM   s     ÿ
ÿr%   c                   C   sÔ  t ttt tgƒƒtt ks t‚t ttt ttgƒƒtks>t‚t tttt  ttgƒƒtt ksdt‚t ttt t tgƒƒtt t ksŒt‚t tttt  ttgƒƒtt ks²t‚t tttt  ttgƒƒtt ksØt‚t tttt  ttgƒƒtt ksþt‚t ttt t tgƒƒtt t ks(t‚t tdt tgƒƒtksFt‚t ttdƒt tgƒƒtksht‚t tttƒtgƒƒtks†t‚t tttt ƒtgƒƒtttƒ ks°t‚t ttdtƒtgƒƒtksÐt‚d S r#   )	r   r   r   r   r   r   r   r   r   r    r    r    r!   Útest_constant_power_as_exp[   sB     &ÿ
ÿÿÿ&ÿÿÿ
ÿ
"ÿ
ÿ
r&   c                   C   sF  t tttƒtgƒƒtkst‚t tttƒtgƒƒtks8t‚t ttttƒtgƒƒtksVt‚t ttttƒttgƒƒtksvt‚t ttttƒttgƒƒtks–t‚t ttttƒttgƒƒtks¶t‚t ttttƒtgƒƒtttƒksÚt‚t ttttƒttgƒƒtksút‚t ttttƒttgƒƒtkst‚t tttttƒtttgƒƒtksBt‚d S ©N)	r   r   r   r   r   r   r   r   r   r    r    r    r!   Útest_constant_functionp   s       ÿÿ "r(   c                   C   s,   t tttttƒtgƒƒttttƒks(t‚d S r'   )r   r   r   r   r   r   r    r    r    r!   Útest_constant_function_multiple~   s
    ÿ
ÿr)   c                   C   s¾   t ttd d tgƒƒtks t‚t ttd t tgƒƒtt ksDt‚t ttd d d tgƒƒtksht‚t ttdt ƒt tdƒ tgƒƒtt ks˜t‚t tdt t ttgƒƒtksºt‚d S r#   )r   r   r   r   r   r   r   r   r    r    r    r!   Útest_constant_multiple…   s     $$ÿÿr*   c                   C   s$   t t t  tt t t  ƒks t‚d S r'   )r   r   r   r   r    r    r    r!   Útest_constant_repeated   s    r+   c                
   C   sþ  t tttdt ƒ ttƒtt   tttgƒƒt tttƒ ttdt ƒ  ƒksTt‚t ttt	tƒt
t ttd ƒ tttd ƒ  ƒttgƒƒt tt	tƒtttd ƒ tttd ƒ  ƒƒksÂt‚t ttt	tƒtt ttƒ ƒƒtgƒƒtt	tƒttttƒ ƒƒks
t‚t tttt	tƒt ƒdttt	tƒ ƒ  dƒtgƒƒtttt	tƒ ƒdttt	tƒ ƒ  dƒkspt‚t tttttdƒ tdt ƒ tt	tƒƒ t ƒtd dt	tƒd    dƒtgƒƒtttttƒ tt	tƒƒ ƒtd dt	tƒd    dƒkst‚t tttt	tƒ t ƒ tt	tƒt ƒ d ttt ƒ tt	tƒt ƒtt	tƒ t ƒ d  dƒtgƒƒttt	tƒ t ƒ tt	tƒt ƒ d ttt ƒ tt	tƒt ƒtt	tƒ t ƒ d  dƒksØt‚t tttdtdtd  ƒt  tttt	tƒ fƒ tt	tƒt ƒ dƒtgƒƒttdttdtd  ƒ  tttt	tƒ fƒ ttt	tƒ ƒ dƒksrt‚dd„ tt	tƒtt t td  ƒƒtt	tƒtt t td  ƒ ƒfD ƒtt	tƒtttt  ƒƒtt	tƒtttt  ƒ ƒgksút‚d S )Nr   é   r   r   éÿÿÿÿc                 S   s   g | ]}t |tgƒ‘qS r    )r   r   )Ú.0Úir    r    r!   Ú
<listcomp>§   s     z&test_ode_solutions.<locals>.<listcomp>)r   r   r   r   r   r   r   r   r   r   r   r   r
   r   r   r	   r   r   r   r   r   r    r    r    r!   Útest_ode_solutions   sx    .ÿ6ÿ,þ&ÿ
0ÿ(þ
*ÿÿÿÿ8þ
8$ÿÿÿBÿÿÿþ
ÿÿÿÿ.ÿÿþ
J4ÿr1   c                   C   s.   t tt tt  ttgƒttt  ks*t‚d S r'   )r   r   r   r   r   r    r    r    r!   Útest_nonlocal_simplification«   s    r2   c                   C   sl   t ttdttƒt  ƒtgƒttttƒ tƒks4t‚t ttdttƒ t ƒtgƒtttƒt tƒksht‚d S )Nr,   )r   r   r   r   r   r   r    r    r    r!   Útest_constant_Eq°   s    4r3   N)4Ú__doc__Zsympy.core.functionr   Zsympy.core.numbersr   Zsympy.core.powerr   Zsympy.core.relationalr   Zsympy.core.singletonr   Zsympy.core.symbolr   Z&sympy.functions.elementary.exponentialr   r	   Z%sympy.functions.elementary.hyperbolicr
   r   Z(sympy.functions.elementary.miscellaneousr   Z(sympy.functions.elementary.trigonometricr   r   r   Zsympy.integrals.integralsr   Zsympy.solvers.ode.oder   r   Zsympy.testing.pytestr   r   r   r   r   r   r   r   r   r   r"   r$   r%   r&   r(   r)   r*   r+   r1   r2   r3   r    r    r    r!   Ú<module>   sD   !
