### Diagonalisability check Malfunctioning

I ran the following code:

```
A = matrix(QQbar,
```~~[[2,-1,0],[-1,2,1],[0,-1,2]])
~~[[2,-1,0],[-1,2,1],[0,-1,2]]);
D, P = A.diagonalization()

This generated a value error saying that A is not diagonalisable. To see if there are workarounds, I replaced the `diagonalization`

method by `eigenmatrix_right()`

, and the results were weird.

`D`

was twice the identity matrix, and `P`

had zero vectors in its creation. I think writing `QQbar`

to make the thing work in algebraic numbers is not proving fruitful at all, because replacing it with `QQ`

yields exactly the same result.

UPD1: I thought that the issue might lie with the implementation of `QQbar`

, so I tried it `Q[sqrt(2)]`

instead, which does indeed contain the eigenvalues of my matrix: `2, 2 + \sqrt(2), 2 - \sqrt(2)`

, and the entries of the corresponding eigenvectors as well, but to no avail. I think it's the matrix construction mechanism itself which is faulty here. Unless addressed soon, I suppose I would remove the `QQbar`

tag from the question then.