# How to make characteristics zero in GAP?

I have the following code written in GAP. In summary, In this code, I have a subgroup defined as SL(2,5). I applied the tensor product to each of these group elements with the identity and added a new element to the group, which is not in SL(2,5). Originally, I wanted to add a matrix that does not belong to SL(2,5), but GAP gave me an error. So, I had to write it over field 5, which forced everything into this characteristic and made it finite (Thanks for the warning @ahulpke).

After that, I checked if the new group is finite or not, and I also calculated the number of elements in this group. The thing is, I want to do the exact same thing with characteristic zero. However, I do not know how to do that. Originally, I wrote this code in Sagemath, but then I thought Sagemath might be more limited than GAP. That is why I converted my code from Sagemath to GAP. Now I want to make the characteristic 0 because my addition matrix will be an SU(4) matrix, and it should not have characteristic 5.

Id := IdentityMat;
new_matrices_ := [];
gens_ := GeneratorsOfGroup(SL(2,5)); # the subgroup you are interested in

for m in gens_ do
tensor_mat_ := KroneckerProduct(m, Id(2)*Z(5)^0); # Id(2)
od;

G := Group(new_matrices_);
Print(IsFinite(G));
Print(Size(G));
Print(StructureDescription(G));


I don't know whether this is what you want, but you can get a $$2$$-dimensional group G0 isomorphic to $${\rm SL}(2,5)$$ in characteristic $$0$$ (with entries in the cyclotomic field of degree $$5$$) by:
G := SL(2,5);

• Thank you so much for the answer. When I update my code with your solution, I also rewrite identity as Id(2) instead of Id(2)*Z(5)^0 . But then I got the following error: Error, Variable: 'Id' must have an assigned value in tensor_mat_ := KroneckerProduct( m, Id( 2 ) ); at zero_characteristic.g:10 called from <function "unknown">( <arguments> ). Should I keep Identity matrix as it is? Commented Jul 21, 2023 at 0:31