|
26 | 26 | # appropriate field. |
27 | 27 | InstallGlobalFunction("ConjugateToSesquilinearForm", |
28 | 28 | function(group, type, gramMatrix) |
29 | | - local gapForm, newForm, gapToCanonical, canonicalToNew, field, formMatrix, |
| 29 | + local gapForm, newForm, baseChangeMatrix, field, formMatrix, |
30 | 30 | result, d, q, broadType; |
31 | 31 | if not type in ["S", "O-B", "O-Q", "U"] then |
32 | 32 | ErrorNoReturn("<type> must be one of 'S', 'U', 'O-B', 'O-Q'"); |
@@ -82,12 +82,9 @@ function(group, type, gramMatrix) |
82 | 82 | ErrorNoReturn("The form preserved by <group> must be similar to the form ", |
83 | 83 | "described by the Gram matrix <gramMatrix>."); |
84 | 84 | fi; |
85 | | - gapToCanonical := BaseChangeHomomorphism(BaseChangeToCanonical(gapForm), |
86 | | - field); |
87 | | - canonicalToNew := BaseChangeHomomorphism(BaseChangeToCanonical(newForm) ^ (-1), |
88 | | - field); |
89 | | - result := MatrixGroup(field, canonicalToNew(gapToCanonical(GeneratorsOfGroup(group)))); |
90 | | - |
| 85 | + baseChangeMatrix := BaseChangeToCanonical(gapForm)^-1 * BaseChangeToCanonical(newForm); |
| 86 | + result := MatrixGroup(field, List(GeneratorsOfGroup(group), g -> g ^ baseChangeMatrix)); |
| 87 | + |
91 | 88 | # Set useful attributes |
92 | 89 | UseIsomorphismRelation(group, result); |
93 | 90 | else |
|
0 commit comments