Examples

Example GrpMatQZ_ZClasses (H68E1)

We split the GL3(Q)-conjugacy class of the following faithful representation of the dihedral group with 12 elements.
> G := MatrixGroup< 3, Integers() |
>  [ 1, -1, 0, 0, -1, 0, 0, 0, 1 ],
>  [ 1, -1, 0, 1, 0, 0, 0, 0, -1 ] >;
> Z, T:= ZClasses(G);
> #Z;
3
> < #t : t in T >;
<1, 2>
So there are 2 classes of homogeneously decomposable lattices represented by T[1,1] and T[2,1]. The third lattice T[2,2] belongs to T[2,1] as we check.
> Q := Rationals();
> GQ := ChangeRing(G, Q);
> Ids := CentralIdempotents(EndomorphismRing(GQ));
> L := VerticalJoin([ Matrix(Integers(), T[2,2] * i) : i in Ids]);
> Image(L) eq Image(Matrix(Integers(), T[2,1]));
true
Finally, we check that the 3 GL3(Z)-conjugacy classes stored in Z correspond to the 3 lattices in T.
> TT := &cat T;
> [ GQ eq ChangeRing(Z[i], Q)^(GL(3, Q) ! TT[i]) : i in [1..#Z] ];
[ true, true, true ]

Example GrpMatQZ_conjugacy (H68E2)

We test that the automorphism groups of the lattices B8 and D8 are conjugate in GL8(Q) but not in GL8(Z).
> G := AutomorphismGroup( Lattice("B", 8) );
> H := AutomorphismGroup( Lattice("D", 8) );
> ok, x := IsGLQConjugate(G, H); ok, x;
true
[ 1 -1  0  0  0  0  0  0]
[ 1 -1 -2  0  0  0  0  0]
[-1  1  2  2  2  2  2  2]
[ 1  1  0  0  0  0  0  0]
[-1  1  2  2  2  2  2  0]
[ 1 -1 -2 -2 -2  0  0  0]
[-1  1  2  2  2  2  0  0]
[-1  1  2  2  0  0  0  0]
> Determinant(x);
-128
> IsGLZConjugate(G,H);
false

Example GrpMatQZ_conjugacy_matrices (H68E3)

Let C be the companion matrix of the fifth cyclotomic polynomial. We find a unimodular matrix that induces the automorphism C - > C2.
> C:= CompanionMatrix(CyclotomicPolynomial(5));
> ok, h:= IsGLZConjugate(C, C^2); ok;
true
> C^2 eq h^-1 * C * h;
true
We now check by hand that this automorphism cannot be realized by a matrix of determinant 1.
> Determinant(h);
-1
> G:= CentralizerGLZ(C);
> [ Determinant(g) : g in Generators(G) ];
[1, 1, 1]
Of course, we could also just ask:
> IsSLZConjugate(C, C^2);
false

Example GrpMatQZ_GLnZClasses-EHOB (H68E4)

We use the algorithm of Eick et al. [EHO19] to decide integral conjugacy and to construct integral centralisers.
> A := GL(4, Integers ())!
>  [ 1, 0, 0, -3, 1, 1, -4, -3,
>    0, 0, -1, 0, 5, 5, -21, -14 ];
> B := GL(4, Integers ())!
> [-104, -21, -8, -3, 7729, 1552, 253, 218,
>   0, 0, -1, 0, -51848, -10407, -1532, -1460 ];
> flag, C := AreGLConjugate (A, B);
> flag;
true
> assert C^-1 * A * C eq B;
> C := GLCentraliser (A);
> assert forall{c * A eq A * c: c in Generators (C)};
>
> // another example with rational entries
> Q := Rationals ();
> A := GL(3,Q)!
> [ -5/3, -13/3, 25/3,
>   -7/3, 19/3, -16/3,
>   -5/3, 5/3, -2/3 ];
> B := GL(3, Q) !
> [ -19/3, -21, -119/3,
>    -1, 1, -2,
>    5/3, 5, 28/3 ];
> f, C := AreGLConjugate (A, B);
> C;
[ 1  2  4]
[ 0 -1 -2]
[ 0  0 -1]
> C := GL(3, Q) ! C;
> assert A^C eq B;
> C := GLCentraliser (A);
> C := sub<GL(3, Q) | Generators (C)>;
> assert forall{c * A eq A * c: c in Generators (C)};
V2.28, 13 July 2023