forked from stmar89/AbVarFq
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathPowerBass.m
121 lines (105 loc) · 4.19 KB
/
PowerBass.m
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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
/*
This package includes functions do work with torsion-free R modules of finite rank, where R is a Bass order in an etale algebra K.Note that every such module M, say of rank r, is R-isomorphic to a direct sum of r fractional ideals of R.
Also two such modules, I_1+...+I_r and J_1+...+J_r are R-isomorphic if and only if for every i=1,..,r we have (I_i:I_i)=(J_i:J_i) and the Steinintz classes are R-isomorphic, that is there is a non-zero divisor x of K such that \prod_iI_i=x*\prod_iJ_i.
In particular, every module of rank is R-isomorphic to S_1+...+S_{r-1}+I with (I:I)\supseteq S_{r-1}.
We use this results to produce functions to list representatives of all classes and to check whether two modules are R-isomorphic
It requires Ordersext. and Picardext. and AbelianVarieties.
LIST OF FUNCTIONS
chains_of_overorders:=procedure(r,~chain,~all_chains)
direct_sums_overorders:=function(R,r)
intrinsic SteinitzClass(bc::Tub)->AlgAssVOrdIdl
intrinsic AllBassClasses(R::AlgAssVOrd, r::RngIntElt)->SeqEnum[AlgAssVOrdIdl]
*/
chains_of_overorders:=procedure(r,~chain,~all_chains)
if #chain eq r then
Append(~all_chains,chain);
else
T:=chain[#chain];
for S in FindOverOrders(T) do
chain1:=chain;
Append(~chain1,S);
$$(r,~chain1,~all_chains);
end for;
end if;
end procedure;
direct_sums_overorders:=function(R,r)
//given a (Bass) order R and a rank r, it returns all sequences S_1,..,S_r where R\subseteq S_
choo:=<>;
oo:=FindOverOrders(R);
for S in oo do
ch:=<S>;
chains_of_overorders(r,~ch,~choo);
end for;
return choo;
end function;
intrinsic AllBassClasses(R::AlgAssVOrd, r::RngIntElt)->SeqEnum[AlgAssVOrdIdl]
{Given a Bass order R and a rank r, it returns representatives of all the isormorphism classes of torsion-free R modules of rank r}
require IsBass(R) : "the first input must be a Bass order";
require r gt 0 : "the second input must be a positive integer";
output:=<>;
choo:=direct_sums_overorders(R,r);
for ch in choo do
P,p:=PicardGroup(ch[r]);
pic:=[p(g) : g in P];
ch_rem:=Prune(ch);
for I in pic do
Append(~output,Append(ch_rem,I));
end for;
end for;
return output;
end intrinsic;
intrinsic SteinitzClass(bc::Tup)->AlgAssVOrdIdl
{returns the product of the fractional ideals in the input}
S:=MultiplicatorRing(bc[1]);
st:=&*[ideal<S|ZBasis(bc[i])> : i in [1..#bc] ];
return st;
end intrinsic;
intrinsic IsBassIsomorphic(bc1::Tup,bc2::Tup)->BoolElt,AlgAssElt
{Given two sequences of frational R-ideals, where R is a Bass order, it returns wheter their direct sums are R-isomorphic, and if that is the case also an element x that sends the Steinitz class of the first direct sum into the Steinintz class of the second direct sum. We require that the fractional ideals in the decomposition are ordered wrt MultiplicatorRings, i.e. (I1:I1) subseteq (I2:I2) ...}
assert #bc1 eq #bc2;
N:=#bc1;
assert forall{i : i in [1..N] | Algebra(bc1[i]) eq Algebra(bc2[i])};
S1i:=MultiplicatorRing(bc1[1]);
S2i:=MultiplicatorRing(bc2[1]);
for i in [1..N-1] do
S1i_next:=MultiplicatorRing(bc1[i+1]);
S2i_next:=MultiplicatorRing(bc2[i+1]);
if i lt N then
require S1i subset S1i_next and S2i subset S2i_next : "the fractional ideals should be permutated such that the MultiplicatorRings are in incresing order";
end if;
if not S1i eq S2i then
return false,_;
end if;
S1i:=S1i_next;
S2i:=S2i_next;
end for;
//the orders are the same
st1:=SteinitzClass(bc1);
st2:=SteinitzClass(bc2);
return IsIsomorphic2(st1,st2);
end intrinsic;
/*
//TESTS
AttachSpec("packages.spec");
Attach("packages/PowerBass.m");
_<x>:=PolynomialRing(Integers());
f:=x^6-x^5+2*x^4-2*x^3+4*x^2-4*x+8;
A:=AssociativeAlgebra(f);
F:=PrimitiveElement(A);
R:=Order([F,ComplexConjugate(F)]);
iso_cl:=AllBassClasses(R,3);
assert #iso_cl eq 6;
for cl in iso_cl do
cl_dual:=< ComplexConjugate(TraceDualIdeal(I)) : I in cl>;
IsBassIsomorphic(cl,cl_dual);
end for;
_<x>:=PolynomialRing(Integers());
f:=x^4 + 3*x^3 + 8*x^2 + 39*x + 169;
A:=AssociativeAlgebra(f);
F:=PrimitiveElement(A);
q:=Integers() ! (Coefficients(f)[1]^(2/Degree(f)));
R:=Order([F,q/F]);
ver:=[62,97,144,206,286,387,512,664,846,1061];
res:=[#AllBassClasses(R,i) : i in [1..10]];
assert res eq ver;
*/