danielrademacher / BruhatDecomposition

Other
2 stars 0 forks source link

Can you give an example? #3

Closed jackschmidt closed 3 years ago

jackschmidt commented 3 years ago

I tried the following:

d := 4;
q := 2;
stdgens := LGOStandardGensSL(d, q);
grp := Group(stdgens);
Assert(0, grp = SL(d, q));
elt := Random(grp);
ret := BruhatDecompositionSL( stdgens, elt );
dec := ret[2];
Assert(0, elt = dec[1] * dec[3] * dec[4] * dec[2]);

but I cannot recover the element as a product of its Bruhat decomposition. Usually the second assertion fails (about 1 in 3 times it works, 30% of SL(4,2)). I chose q=2 so that dec[4] is always the identity. For SL(3,2) it works about 67% of the time. I could not get SL(3,3) to work.

Here is my percentage testing:

SetInfoLevel(InfoBruhat,0);
stdgens := LGOStandardGensSL(d, q);; grp := Group(stdgens);;
good:=0;; bad:=0;; for elt in grp do ret := BruhatDecompositionSL( stdgens, elt );; dec := ret[2];; if elt = dec[1]*dec[3]*dec[4]*dec[2] then good:=good+1; else bad:=bad+1; fi; od; good/(good+bad +0.0);
jackschmidt commented 3 years ago

In case it is a version problem, this is on GAP 4.11.1 of 2021-03-02 using version 32da38ad21a6ba61a7f2a7d240b19dc53648cbec of BruhatDecomposition2 from 2021-04-26

jackschmidt commented 3 years ago

Ah, I got some help and found that the first and last element need to be inverted. For other readers, here is the correct way:

stdgens := LGOStandardGensSL(d, q);; grp := Group(stdgens);;
good:=0;; bad:=0;; for elt in grp do ret := BruhatDecompositionSL( stdgens, elt );; dec := ret[2];;
if elt = dec[1]^-1*dec[3]*dec[4]*dec[2]^-1
then good:=good+1; else bad:=bad+1; fi; od; good/(good+bad +0.0);
danielrademacher commented 3 years ago

Yes, exactly. I am sorry for my late reply.

If I can improve the package in any way, please let me know. Should I mention the information about inverting of the first and last element somewhere else to make it easier to use? Maybe some short introduction in the Readme file?