# Weyl Tensor calculations using Symbolic module


```python
import sympy
from sympy import cos, sin, sinh
from einsteinpy.symbolic import MetricTensor, WeylTensor

sympy.init_printing()
```

### Defining the Anti-de Sitter spacetime Metric


```python
syms = sympy.symbols("t chi theta phi")
t, ch, th, ph = syms
m = sympy.diag(-1, cos(t) ** 2, cos(t) ** 2 * sinh(ch) ** 2, cos(t) ** 2 * sinh(ch) ** 2 * sin(th) ** 2).tolist()
metric = MetricTensor(m, syms)
```

### Calculating the Weyl Tensor (with all indices covariant)


```python
weyl = WeylTensor.from_metric(metric)
weyl.tensor()
```


```python
weyl.config
```




    'llll'



c9713d8c2f39c1c776a7bdde8de30e60db42907e
ipynb
Jupyter Notebook
docs/source/examples/Weyl Tensor symbolic calculation.ipynb
bibek22/einsteinpy
78bf5d942cbb12393852f8e4d7a8426f1ffe6f23
MIT
2020-06-01T18:37:53.000Z
2020-06-01T18:37:53.000Z
docs/source/examples/Weyl Tensor symbolic calculation.ipynb
bibek22/einsteinpy
78bf5d942cbb12393852f8e4d7a8426f1ffe6f23
MIT
2019-04-08T17:39:50.000Z
2019-04-11T03:10:09.000Z
docs/source/examples/Weyl Tensor symbolic calculation.ipynb
bibek22/einsteinpy
78bf5d942cbb12393852f8e4d7a8426f1ffe6f23
MIT
Qwen/Qwen-72B
1. YES
2. YES