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



8500b71417d59b91fcc55908bab6dd606cbb18af
ipynb
Jupyter Notebook
docs/source/examples/Weyl Tensor symbolic calculation.ipynb
iamhardikat11/einsteinpy
7bf0ca0020b273e616b6e7c19aed7a5e13925444
MIT
2019-02-04T09:15:22.000Z
2022-03-19T13:50:17.000Z
docs/source/examples/Weyl Tensor symbolic calculation.ipynb
iamhardikat11/einsteinpy
7bf0ca0020b273e616b6e7c19aed7a5e13925444
MIT
2019-02-02T10:57:27.000Z
2022-02-26T16:37:05.000Z
docs/source/examples/Weyl Tensor symbolic calculation.ipynb
iamhardikat11/einsteinpy
7bf0ca0020b273e616b6e7c19aed7a5e13925444
MIT
2019-01-30T14:14:14.000Z
2022-02-28T21:18:18.000Z
Qwen/Qwen-72B
1. YES
2. YES