o
    §ƒðj¨  ã                   @   sz   d Z ddlmZmZmZ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 eG dd	„ d	e	eeƒƒZeƒ Zd
S )z6Implementation of :class:`ExpressionRawDomain` class. é    )ÚExprÚSÚsympifyÚAdd)ÚCharacteristicZero)ÚField)ÚSimpleDomain)ÚCoercionFailed)Úpublicc                   @   sp   e Zd ZdZd ZZeZej	Z
ejZdZdZdZdd„ Zedd„ ƒZd	d
„ Zdd„ Zdd„ Zdd„ Zdd„ ZdS )ÚExpressionRawDomainzHA class for arbitrary expressions but without automatic simplification. TÚEXRAWFc                 C   s   d S ©N© ©Úselfr   r   ú©/tmp/claude-1000/-var-www-html-academy/3f42efd1-c2b7-4d08-9b05-30d86bb35479/scratchpad/piper/venv/lib/python3.10/site-packages/sympy/polys/domains/expressionrawdomain.pyÚ__init__   s   zExpressionRawDomain.__init__c                 C   s   t |ƒS r   )r   ©r   Úar   r   r   Únew   s   zExpressionRawDomain.newc                 C   s   |S )z!Convert ``a`` to a SymPy object. r   r   r   r   r   Úto_sympy#   ó   zExpressionRawDomain.to_sympyc                 C   s"   t |tƒstdt|ƒj› �ƒ‚|S )z)Convert SymPy's expression to ``dtype``. z&Expecting an Expr instance but found: )Ú
isinstancer   r	   ÚtypeÚ__name__r   r   r   r   Ú
from_sympy'   s   
zExpressionRawDomain.from_sympyc                 C   s
   |  |¡S )z5Convert a domain element from another domain to EXRAW)r   )r   r   ÚKr   r   r   Úconvert_from-   s   
z ExpressionRawDomain.convert_fromc                 C   s   | S )z*Returns a field associated with ``self``. r   r   r   r   r   Ú	get_field1   r   zExpressionRawDomain.get_fieldc                 C   s   t |Ž S r   )r   )r   Úitemsr   r   r   Úsum5   s   zExpressionRawDomain.sumN)r   Ú
__module__Ú__qualname__Ú__doc__Úis_SymbolicRawDomainÚis_EXRAWr   Údtyper   ÚZeroÚzeroÚOneÚoneÚrepÚhas_assoc_RingÚhas_assoc_Fieldr   Úclassmethodr   r   r   r   r   r    r   r   r   r   r      s"    
r   N)r#   Ú
sympy.corer   r   r   r   Ú&sympy.polys.domains.characteristiczeror   Úsympy.polys.domains.fieldr   Ú sympy.polys.domains.simpledomainr   Úsympy.polys.polyerrorsr	   Úsympy.utilitiesr
   r   r   r   r   r   r   Ú<module>   s    
,