gap-packages / RepnDecomp

Decompose representations of finite groups into irreducibles
https://gap-packages.github.io/RepnDecomp
GNU General Public License v3.0
10 stars 2 forks source link

bug in UnitaryRepresentation #11

Closed dimpase closed 2 years ago

dimpase commented 3 years ago

it calls LDLDecomposition, a function to decompose symmetric p.s.d. matrices. Instead it should call a slightly different function, for Hermitean p.s.d. matrices (which are not symmetric, but equal to their conjugate transpose).

kaashif commented 3 years ago

The funny thing here is that the LDLDecomposition function already would work perfectly well for Hermitian non-symmetric matrices. The formulas I use work perfectly well in that case:

https://github.com/gap-packages/RepnDecomp/blob/a36a1f79171f1e6b7fc2e78e3e3412333e430d80/lib/unitary.gi#L24-L28

I'm not sure why I restricted this function to symmetric matrices in the first place. I added an example/test to the documentation with a non-symmetric but conjugate-symmetric matrix in a36a1f79171f1e6b7fc2e78e3e3412333e430d80.

One thing I am worried about, though, is that I take the square roots of the entries of D in UnitaryRepresentation. Maybe this is fine for some other reason, but of course you can't in general take square roots of elements of cyclotomic fields and stay in a cyclotomic field.

dimpase commented 2 years ago

you can't in general take square roots of elements of cyclotomic fields and stay in a cyclotomic field.

You can, as far as I understand (although in a bigger cyclotomic field).

dimpase commented 2 years ago

So, can this be closed?

kaashif commented 2 years ago

you can't in general take square roots of elements of cyclotomic fields and stay in a cyclotomic field.

You can, as far as I understand (although in a bigger cyclotomic field).

Is that true? I am under the impression that, for example, while $\sqrt{2}$ is in a cyclotomic field if $\alpha = \sqrt[4]{2}$ then since its minimal polynomial $x^4 - 2$ has Galois group $D_8$ which isn't Abelian, that means $\alpha$ can't be in any cyclotomic field. The Galois theory part of my brain is completely rusted over so I might be wrong.

I'm still worried about this!

dimpase commented 2 years ago

You are right, I wasn't careful when I wrote my comment. The thing is that the entries of $D$ are totally positive - equivalently, sums of squares of real cyclotomics. What I wrote is correct for the totally positive cyclotomics, but not for the more general ones, such as $\sqrt{2}$ (which has an embedding into $\mathbb{C}$ which is negative, i.e. $-\sqrt{2}$.)

So square roots of $D_k$ are cyclotomic.

kaashif commented 2 years ago

Interesting. In that case, yeah, this issue can be closed and the current UnitaryRepresentation works fine.