o
    iQ	                     @   s*   d dl mZmZmZmZ G dd dZdS )    )	fuzzy_andfuzzy_or	fuzzy_not	fuzzy_xorc                   @   sl   e Zd ZdZdd Zdd Zdd Zdd	 Zd
d ZeZ	dd Z
dd Zdd Zdd Zdd Zdd ZdS )intervalMembershipaj  Represents a boolean expression returned by the comparison of
    the interval object.

    Parameters
    ==========

    (a, b) : (bool, bool)
        The first value determines the comparison as follows:
        - True: If the comparison is True throughout the intervals.
        - False: If the comparison is False throughout the intervals.
        - None: If the comparison is True for some part of the intervals.

        The second value is determined as follows:
        - True: If both the intervals in comparison are valid.
        - False: If at least one of the intervals is False, else
        - None
    c                 C   s   ||f| _ d S N_wrappedselfab r   ~/var/www/html/eduruby.in/lip-sync/lip-sync-env/lib/python3.10/site-packages/sympy/plotting/intervalmath/interval_membership.py__init__   s   zintervalMembership.__init__c                 C   s*   z| j | W S  ty   td|w )Nz,{} must be a valid indexing for the 2-tuple.)r	   
IndexErrorformat)r   ir   r   r   __getitem__   s   zintervalMembership.__getitem__c                 C   s   dS )N   r   r   r   r   r   __len__!   s   zintervalMembership.__len__c                 C   s
   t | jS r   )iterr	   r   r   r   r   __iter__$      
zintervalMembership.__iter__c                 C   s
   dj |  S )NzintervalMembership({}, {}))r   r   r   r   r   __str__'   r   zintervalMembership.__str__c                 C   sB   t |tstd|| \}}|\}}tt||gt||gS Nz'The comparison is not supported for {}.)
isinstancer   
ValueErrorr   r   r   otherZa1b1Za2b2r   r   r   __and__+      
zintervalMembership.__and__c                 C   B   t |tstd|| \}}|\}}tt||gt||gS r   )r   r   r   r   r   r   r   r   r   r   __or__4   r$   zintervalMembership.__or__c                 C   s   | \}}t t||S r   )r   r   r
   r   r   r   
__invert__=   s   zintervalMembership.__invert__c                 C   r%   r   )r   r   r   r   r   r   r   r   r   r   __xor__A   r$   zintervalMembership.__xor__c                 C   s
   | j |kS r   r   r   r    r   r   r   __eq__J   r   zintervalMembership.__eq__c                 C   s
   | j |kS r   r   r)   r   r   r   __ne__M   r   zintervalMembership.__ne__N)__name__
__module____qualname____doc__r   r   r   r   r   __repr__r#   r&   r'   r(   r*   r+   r   r   r   r   r      s    			r   N)Zsympy.core.logicr   r   r   r   r   r   r   r   r   <module>   s    