o
    *ήcu                     @   s   d dl mZmZmZ d dlmZ d dlmZ d dlm	Z	m
Z
 d dlmZ d dlmZmZmZ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 d
d Zdd Zdd Zdd Zdd Z dd Z!dd Z"dS )    )IRationaloo)S)Symbol)explog)sqrt)singularitiesis_increasingis_strictly_increasingis_decreasingis_strictly_decreasingis_monotonic)Interval	FiniteSet)raises)xyc                      s  t d t d  tjksJ t  d d   d   tddks&J td d d   ttt ks9J t  d d   tddtdt  d dtdt  d ks\J tdtd dt t  d  ttt tdt  t tdt  ksJ t ddd td d d   tjksJ ttd   tj	td	ksJ ttd   t
ddtjksJ tt d d  t
ddtdksJ tt fd
d d S )Nr            T)realr   c                      s   t  t   S )N)r
   r    r   r   N/tmp/pip-target-vg8gfxp4/lib/python/sympy/calculus/tests/test_singularities.py<lambda>"   s    z$test_singularities.<locals>.<lambda>)r   r
   r   EmptySetr   r   r	   r   r   Realsr   r   r   NotImplementedErrorr   r   r   r   test_singularities   s    ,&* $ "$*r"   c                  C   s$  t ddd} ttd dtd   dt  tjsJ ttd  tt ds(J ttd  tdtr5J tdtd  dtd   d	t  d
 tddrOJ ttd t tdtts^J ttd  |  tdttsnJ tdstJ tdtd  dtd   d	t  d
 tdddu sJ dS )z1Test whether is_increasing returns correct value.aT)negativer   r      r      H      r   r   FN)r   r   r   r   r    r   r   r   )r#   r   r   r   test_is_increasing%   s   (4 <r)   c                   C   s  t dtd  dtd   dt  d tt dsJ t dtd  dtd   dt  d tdts7J t dtd  dtd   dt  d tddrRJ t td  tdtr_J td	reJ t dtd  dtd   dt  d tddd
u sJ dS )z:Test whether is_strictly_increasing returns correct value.r%   r   r&   r   r'   r(   r   r   r   FN)r   r   r   Ropenr   Lopenopenr   r   r   r   r   test_is_strictly_increasing4   s   .,,>r-   c                  C   s   t ddd} tdtd dt   ttdddsJ tdtd dt   tdds/J tdtd dt   tdtsBJ tdtd dt   tt tddrYJ ttd  tt drgJ ttd  |  tt dtrxJ d	S )
z1Test whether is_decreasing returns correct value.bT)positiver   r   r         ?r   N)	r   r   r   r   r,   r   r+   r   r*   )r.   r   r   r   test_is_decreasingA   s   ,&&.&r1   c                   C   s   t dtd dt   tdtsJ t dtd dt   tt tddr*J t td  tt dr8J t dr>J t dtd dt   ttdddsTJ t dtd dt   tddsgJ dS )z:Test whether is_strictly_decreasing returns correct value.r   r   r   r   r0   N)r   r   r   r+   r   r*   r   r,   r   r   r   r   test_is_strictly_decreasingM   s   &$,*r2   c                   C   s   t dtd dt   ttdddsJ t dtd dt   tdds)J t dtd dt   tdts<J t td dtd   dt  tjsPJ t td  tjr[J t td t	 d tddtslJ t
tdd  dS )	z0Test whether is_monotonic returns correct value.r   r   r   r0   r%   c                   S   s   t td t d S )Nr   r   )r   r   r   r   r   r   r   r   _   s    z#test_is_monotonic.<locals>.<lambda>N)r   r   r   r,   r   r+   r   r   r    r   r   r!   r   r   r   r   test_is_monotonicW   s   ,&&("r3   c                  C   sB   t d} | d d| d  d|   d  }t|tdd| sJ d S )Nr   r   gMbPr   g?)r   r   r   )r   exprr   r   r   test_issue_23401b   s    r5   N)#sympy.core.numbersr   r   r   sympy.core.singletonr   sympy.core.symbolr   &sympy.functions.elementary.exponentialr   r   (sympy.functions.elementary.miscellaneousr	   sympy.calculus.singularitiesr
   r   r   r   r   r   
sympy.setsr   r   sympy.testing.pytestr   	sympy.abcr   r   r"   r)   r-   r1   r2   r3   r5   r   r   r   r   <module>   s      
