# 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'



9a6ff37c47932ef7fe2ea9e731e9d51c7933f694
ipynb
Jupyter Notebook
docs/source/examples/Weyl Tensor symbolic calculation.ipynb
r0cketr1kky/einsteinpy
d86f412736a42e2cf688a1e21d7b553868a14bc4
MIT
2019-04-07T04:01:57.000Z
2019-07-11T11:59:55.000Z
docs/source/examples/Weyl Tensor symbolic calculation.ipynb
r0cketr1kky/einsteinpy
d86f412736a42e2cf688a1e21d7b553868a14bc4
MIT
docs/source/examples/Weyl Tensor symbolic calculation.ipynb
r0cketr1kky/einsteinpy
d86f412736a42e2cf688a1e21d7b553868a14bc4
MIT
2022-03-19T18:46:13.000Z
2022-03-19T18:46:13.000Z
Qwen/Qwen-72B
1. YES
2. YES