-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathishypiscyc.mag
74 lines (62 loc) · 1.79 KB
/
ishypiscyc.mag
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
/* ***********************************************************
ishypiscyc.mag
This is code from David Swinarski to compute if
a given action represents hyperelliptic or cyclic
trigonal curves, found here:
http://faculty.fordham.edu/dswinarski/RiemannSurfaceAutomorphisms/
Swinarski, David. Equations of Riemann surfaces with automorphisms
(2016). https://arxiv.org/abs/1607.04778
Below: G is the automorphism group
genus is the genus of the corresponding Riemann Action
M is the generating vectors
************************************************************ */
//see Breuer Lemma 10.4 page 37
NumberOfFixedPoints:=function(G,M,h)
N:=Normalizer(G,sub<G |h>);
m:=Order(h);
O:=[ Order(M[i]) : i in [1..#M] ];
k:=Order(N);
sum:=0;
for i:=1 to #M do
if IsDivisibleBy(O[i],m) then
if IsConjugate(G,sub<G | h>,sub<G | M[i]^(Round(O[i]/m))>) then
sum:=sum+1/O[i];
end if;
end if;
end for;
return k*sum;
end function;
// We test to see if there is a central involution
// with 2g+2 fixed points
IsHyperelliptic:=function(G,genus,M)
Z:=Center(G);
if Order(Z) eq 1 then
return false,G.0;
end if;
L:= {@ z : z in Z | Order(z) eq 2 @};
if #L eq 0 then
return false,G.0;
end if;
M:={@ z : z in L | NumberOfFixedPoints(G,M,z) eq 2*genus+2 @};
if #M eq 0 then
return false,G.0;
end if;
if #M gt 0 then
return true,M[1];
end if;
end function;
// We test to see if there is an order 3 automorphism
// with g+2 fixed points
IsCyclicTrigonal:=function(G,genus,M)
L:= {@ g :g in G | Order(g) eq 3 @};
if #L eq 0 then
return false,G.0;
end if;
M:={@ z : z in L | NumberOfFixedPoints(G,M,z) eq genus+2 @};
if #M eq 0 then
return false,G.0;
end if;
if #M gt 0 then
return true,M;
end if;
end function;