o
    h                     @   s  d Z ddlmZ ddl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 edddZed	dd
Zeg dg dg dgZeg dg dg dgZedZeedZedZed\ZZZdd Zdd Zdd Zdd Zdd Zdd Zdd Z dS )z
We have a few different kind of Matrices
Matrix, ImmutableMatrix, MatrixExpr

Here we test the extent to which they cooperate
    )symbols)MatrixMatrixSymboleyeIdentityImmutableMatrix)
MatrixExprMatAddclassof)raisesX   v   )r      r   )         )      	   za,b,cc                   C   sL   t tt ts	J t tt tsJ t dt t tsJ tts$J d S )Nr   )
isinstanceMMIMr   equals r   r   \/var/www/html/ai/venv/lib/python3.10/site-packages/sympy/matrices/tests/test_interactions.py
test_IM_MM   s   r   c                   C   sV   t tdt tsJ t tt tsJ t tt tsJ tdt d dks)J d S )Nr   r   r   r   )r   r   r   r   SMr	   r   r   r   r   
test_ME_MM    s   r!   c                  C   sR   t dtdttd} }}| ||fD ]}| ||fD ]	}||s%J qqd S )Nr   )r   r   r   r   )abcxyr   r   r   test_equality'   s    r'   c                  C   s4   t ddd} td|  }|d d| d  ksJ d S )Nr   r   r   r   )r   r   )r   Yr   r   r   test_matrix_symbol_MM.   s   r)   c                  C   sT   t t } tt }| |ksJ tjt j j}||ksJ tjtj j}||ks(J d S N)r   SVr   T)ABCDr   r   r   /test_matrix_symbol_vector_matrix_multiplication4   s   r1   c                   C   s|   t t d dt  ksJ tt d td td  ksJ tt d td td  td td   td td   ks<J d S )Nr   r   )r   r   )r   r   )r   r   )r   r   )r"   r   r    r   r   r   r   test_indexing_interactions>   s
    (r2   c                     s   t ddtd tddtd} tdddt  t ksJ t| | tks(J t | tks1J t|  tks:J tt fdd d S )Nr   r   r/   c                      s
   t  S r*   r
   r   r-   r/   r   r   <lambda>M   s   
 ztest_classof.<locals>.<lambda>)r   ranger   r   r   r   	TypeError)r.   r   r3   r   test_classofE   s   r7   N)!__doc__sympy.core.symbolr   sympy.matricesr   r   r   r   r   sympy.matrices.expressionsr   r	   sympy.matrices.matrixbaser   sympy.testing.pytestr   r    r+   r   r   meyeimeyeideyer"   r#   r$   r   r!   r'   r)   r1   r2   r7   r   r   r   r   <module>   s*    
