o
    à8Vaø  ã                   @   s¨   d 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 g d¢ZG dd„ deƒZG d	d
„ d
eƒZG dd„ deƒZG dd„ deƒZG dd„ deƒZG dd„ deƒZdS )a4  
Module for mathematical equality [1] and inequalities [2].

The purpose of this module is to provide the instances which represent the
binary predicates in order to combine the relationals into logical inference
system. Objects such as ``Q.eq``, ``Q.lt`` should remain internal to
assumptions module, and user must use the classes such as :obj:`~.Eq()`,
:obj:`~.Lt()` instead to construct the relational expressions.

References
==========

.. [1] https://en.wikipedia.org/wiki/Equality_(mathematics)
.. [2] https://en.wikipedia.org/wiki/Inequality_(mathematics)
é    )ÚQ)Úis_eqÚis_neqÚis_gtÚis_geÚis_ltÚis_leé   )ÚBinaryRelation)ÚEqualityPredicateÚUnequalityPredicateÚStrictGreaterThanPredicateÚGreaterThanPredicateÚStrictLessThanPredicateÚLessThanPredicatec                   @   s6   e Zd ZdZdZdZdZdZedd„ ƒZ	d	dd„Z
dS )
r   aW  
    Binary predicate for $=$.

    The purpose of this class is to provide the instance which represent
    the equality predicate in order to allow the logical inference.
    This class must remain internal to assumptions module and user must
    use :obj:`~.Eq()` instead to construct the equality expression.

    Evaluating this predicate to ``True`` or ``False`` is done by
    :func:`~.core.relational.is_eq()`

    Examples
    ========

    >>> from sympy import ask, Q
    >>> Q.eq(0, 0)
    Q.eq(0, 0)
    >>> ask(_)
    True

    See Also
    ========

    sympy.core.relational.Eq

    TÚeqNc                 C   ó   t jS ©N)r   Úne©Úself© r   úE/usr/lib/python3/dist-packages/sympy/assumptions/relation/equality.pyÚnegated:   ó   zEqualityPredicate.negatedc                 C   ó   |dkrd }t g |¢|‘R Ž S ©NT)r   ©r   ÚargsZassumptionsr   r   r   Úeval>   ó   zEqualityPredicate.eval©T©Ú__name__Ú
__module__Ú__qualname__Ú__doc__Úis_reflexiveÚis_symmetricÚnameÚhandlerÚpropertyr   r   r   r   r   r   r      ó    
r   c                   @   s6   e Zd ZdZdZdZdZdZedd„ ƒZ	d
dd	„Z
dS )r   a`  
    Binary predicate for $\neq$.

    The purpose of this class is to provide the instance which represent
    the inequation predicate in order to allow the logical inference.
    This class must remain internal to assumptions module and user must
    use :obj:`~.Ne()` instead to construct the inequation expression.

    Evaluating this predicate to ``True`` or ``False`` is done by
    :func:`~.core.relational.is_neq()`

    Examples
    ========

    >>> from sympy import ask, Q
    >>> Q.ne(0, 0)
    Q.ne(0, 0)
    >>> ask(_)
    False

    See Also
    ========

    sympy.core.relational.Ne

    FTr   Nc                 C   r   r   )r   r   r   r   r   r   r   f   r   zUnequalityPredicate.negatedc                 C   r   r   )r   r   r   r   r   r   j   r    zUnequalityPredicate.evalr!   r"   r   r   r   r   r   E   r,   r   c                   @   óB   e Zd ZdZdZdZdZdZedd„ ƒZ	edd„ ƒZ
dd
d„ZdS )r   aS  
    Binary predicate for $>$.

    The purpose of this class is to provide the instance which represent
    the ">" predicate in order to allow the logical inference.
    This class must remain internal to assumptions module and user must
    use :obj:`~.Gt()` instead to construct the equality expression.

    Evaluating this predicate to ``True`` or ``False`` is done by
    :func:`~.core.relational.is_gt()`

    Examples
    ========

    >>> from sympy import ask, Q
    >>> Q.gt(0, 0)
    Q.gt(0, 0)
    >>> ask(_)
    False

    See Also
    ========

    sympy.core.relational.Gt

    FÚgtNc                 C   r   r   ©r   Últr   r   r   r   Úreversed’   r   z#StrictGreaterThanPredicate.reversedc                 C   r   r   ©r   Úler   r   r   r   r   –   r   z"StrictGreaterThanPredicate.negatedTc                 C   r   r   )r   r   r   r   r   r   š   r    zStrictGreaterThanPredicate.evalr!   ©r#   r$   r%   r&   r'   r(   r)   r*   r+   r1   r   r   r   r   r   r   r   q   ó    

r   c                   @   óB   e Zd ZdZdZdZdZdZedd„ ƒZ	edd	„ ƒZ
dd
d„ZdS )r   aT  
    Binary predicate for $>=$.

    The purpose of this class is to provide the instance which represent
    the ">=" predicate in order to allow the logical inference.
    This class must remain internal to assumptions module and user must
    use :obj:`~.Ge()` instead to construct the equality expression.

    Evaluating this predicate to ``True`` or ``False`` is done by
    :func:`~.core.relational.is_ge()`

    Examples
    ========

    >>> from sympy import ask, Q
    >>> Q.ge(0, 0)
    Q.ge(0, 0)
    >>> ask(_)
    True

    See Also
    ========

    sympy.core.relational.Ge

    TFÚgeNc                 C   r   r   r2   r   r   r   r   r1   Â   r   zGreaterThanPredicate.reversedc                 C   r   r   r/   r   r   r   r   r   Æ   r   zGreaterThanPredicate.negatedc                 C   r   r   )r   r   r   r   r   r   Ê   r    zGreaterThanPredicate.evalr!   r4   r   r   r   r   r   ¡   r5   r   c                   @   r-   )r   aS  
    Binary predicate for $<$.

    The purpose of this class is to provide the instance which represent
    the "<" predicate in order to allow the logical inference.
    This class must remain internal to assumptions module and user must
    use :obj:`~.Lt()` instead to construct the equality expression.

    Evaluating this predicate to ``True`` or ``False`` is done by
    :func:`~.core.relational.is_lt()`

    Examples
    ========

    >>> from sympy import ask, Q
    >>> Q.lt(0, 0)
    Q.lt(0, 0)
    >>> ask(_)
    False

    See Also
    ========

    sympy.core.relational.Lt

    Fr0   Nc                 C   r   r   ©r   r.   r   r   r   r   r1   ò   r   z StrictLessThanPredicate.reversedc                 C   r   r   ©r   r7   r   r   r   r   r   ö   r   zStrictLessThanPredicate.negatedTc                 C   r   r   )r   r   r   r   r   r   ú   r    zStrictLessThanPredicate.evalr!   r4   r   r   r   r   r   Ñ   r5   r   c                   @   r6   )r   aT  
    Binary predicate for $<=$.

    The purpose of this class is to provide the instance which represent
    the "<=" predicate in order to allow the logical inference.
    This class must remain internal to assumptions module and user must
    use :obj:`~.Le()` instead to construct the equality expression.

    Evaluating this predicate to ``True`` or ``False`` is done by
    :func:`~.core.relational.is_le()`

    Examples
    ========

    >>> from sympy import ask, Q
    >>> Q.le(0, 0)
    Q.le(0, 0)
    >>> ask(_)
    True

    See Also
    ========

    sympy.core.relational.Le

    TFr3   Nc                 C   r   r   r9   r   r   r   r   r1   "  r   zLessThanPredicate.reversedc                 C   r   r   r8   r   r   r   r   r   &  r   zLessThanPredicate.negatedc                 C   r   r   )r   r   r   r   r   r   *  r    zLessThanPredicate.evalr!   r4   r   r   r   r   r     r5   r   N)r&   Zsympy.assumptionsr   Zsympy.core.relationalr   r   r   r   r   r   Zbinrelr
   Ú__all__r   r   r   r   r   r   r   r   r   r   Ú<module>   s     ,,000