| Server IP : 35.80.110.71 / Your IP : 216.73.216.221 Web Server : Apache/2.4.58 (Ubuntu) System : Linux ip-172-31-21-44 6.17.0-1019-aws #19~24.04.1-Ubuntu SMP Tue Jun 23 18:53:06 UTC 2026 x86_64 User : ubuntu ( 1000) PHP Version : 8.3.31 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : OFF Directory : /lib/python3/dist-packages/sympy/tensor/__pycache__/ |
Upload File : |
�
M�Zd� � � � d Z ddlmZ ddlmZ ddlmZ ddlmZ ddl m
Z
mZ ddlm
Z
ddlZddlZdd lmZmZ dd
lmZ ddlmZmZmZmZ ddlmZmZmZmZmZm Z dd
l!m"Z"m#Z# ddl$m%Z% ddl&m'Z'm(Z( ddl)m*Z*m+Z+ ddl,m-Z- ddl.m/Z/ ddl0m1Z1 ddl2m3Z3m4Z4m5Z5 ddl6m7Z7m8Z8 ddl9m:Z: d� Z;d� Z<d� Z= G d� de*� Z>d� Z? G d� de*� Z@ e@� ZA G d� d � ZB eB� ZC G d!� d"e� ZD G d#� d$e� ZEd%� ZF G d&� d'e� ZG e8d(d)d*�+� d,� � ZH e8d-d)d.�+� G d/� d0e� � ZI e8d1d)d2�+� dWd3�� ZJ G d4� d5e� ZKdWd6�ZL G d7� d8ee� ZM G d9� d:eMe-� ZN G d;� d<eM� ZO G d=� d>eMe-� ZP G d?� d@eM� ZQ G dA� dBeK� ZR G dC� dDeO� ZS G dE� dFeE� ZT G dG� dHe� ZUdI� ZVdJ� ZWdK� ZXdL� ZYdM� ZZdN� Z[dO� Z\dP� Z]dQ� Z^dR� Z_dS� Z`dXdT�ZadU� ZbdV� Zcy)Ya�
This module defines tensors with abstract index notation.
The abstract index notation has been first formalized by Penrose.
Tensor indices are formal objects, with a tensor type; there is no
notion of index range, it is only possible to assign the dimension,
used to trace the Kronecker delta; the dimension can be a Symbol.
The Einstein summation convention is used.
The covariant indices are indicated with a minus sign in front of the index.
For instance the tensor ``t = p(a)*A(b,c)*q(-c)`` has the index ``c``
contracted.
A tensor expression ``t`` can be called; called with its
indices in sorted order it is equal to itself:
in the above example ``t(a, b) == t``;
one can call ``t`` with different indices; ``t(c, d) == p(c)*A(d,a)*q(-a)``.
The contracted indices are dummy indices, internally they have no name,
the indices being represented by a graph-like structure.
Tensors are put in canonical form using ``canon_bp``, which uses
the Butler-Portugal algorithm for canonicalization using the monoterm
symmetries of the tensors.
If there is a (anti)symmetric metric, the indices can be raised and
lowered when the tensor is put in canonical form.
� )�annotations)�Any)�reduce)�prod)�abstractmethod�ABC)�defaultdictN)�Integer�Rational��Permutation)�get_symmetric_group_sgs�bsgs_direct_product�canonicalize�riemann_bsgs)�Basic�Expr�sympify�Add�Mul�S)�Tuple�Dict)�default_sort_key)�Symbol�symbols)�CantSympify�_sympify)�AssocOp)�
SYMPY_INTS)�eye)�sympy_deprecation_warning�SymPyDeprecationWarning�ignore_warnings)�memoize_property�
deprecated)�siftc �"