o
    8VaM                     @   s   d dl mZmZmZmZmZmZmZmZ d dl	m
Z
mZmZmZ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S )    )SymbolexplogooSIsqrtRational)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   I/usr/lib/python3/dist-packages/sympy/calculus/tests/test_singularities.py<lambda>   s    z$test_singularities.<locals>.<lambda>)r   r
   r   Z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_increasing0   s   .,,>r,   c                  C   s   t ddd} tdtd dt   tddsJ tdtd dt   tdts,J tdtd dt   tt tddrCJ ttd  tt drQJ ttd  |  tt dtrbJ d	S )
z1Test whether is_decreasing returns correct value.bT)Zpositiver   r   r         ?r   N)	r   r   r   r   r+   r*   r   r)   r	   )r-   r   r   r   test_is_decreasing=   s   &&.&r/   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ddsQJ dS )z:Test whether is_strictly_decreasing returns correct value.r   r   r   r   r.   N)r   r   r   r*   r   r)   r	   r+   r   r   r   r   test_is_strictly_decreasingH   s   &$*r0   c                   C   s   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s:J t td  tjrEJ t td t d tddtsVJ t	t
dd  dS )	z0Test whether is_monotonic returns correct value.r   r   r   r.   r$   c                   S   s   t td t d S )Nr   r   )r   r   r   r   r   r   r   r   Y   s    z#test_is_monotonic.<locals>.<lambda>N)r   r   r   r+   r*   r   r   r   r   r   r    r   r   r   r   test_is_monotonicR   s   &&("r1   N)Zsympyr   r   r   r   r   r   r   r	   Zsympy.calculus.singularitiesr
   r   r   r   r   r   Z
sympy.setsr   r   Zsympy.testing.pytestr   Z	sympy.abcr   r   r!   r(   r,   r/   r0   r1   r   r   r   r   <module>   s   (  
