Skip to content

Commit 0f1023e

Browse files
committed
feat: add more tests
1 parent b801de3 commit 0f1023e

File tree

2 files changed

+404
-3
lines changed

2 files changed

+404
-3
lines changed

src/AlgAssAbsOrd/PIP/maximal.jl

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,18 +49,29 @@ end
4949

5050
function _is_principal_maximal_simple_component(a, M, side = :right)
5151
A = algebra(M)
52-
ZA, _ = _as_algebra_over_center(A)
52+
ZA, ZAtoA = _as_algebra_over_center(A)
53+
54+
if !isdefined(A, :isomorphic_full_matrix_algebra) && dim(ZA) == 1
55+
B = matrix_algebra(base_ring(ZA), 1)
56+
img = [preimage(ZAtoA, x) for x in basis(A)]
57+
m = matrix(base_ring(B), dim(A), dim(B), [(x.coeffs[1])/(one(A).coeffs[1]) for x in img])
58+
minv = matrix([ZAtoA(x[1, 1] * one(ZA)).coeffs for x in basis(B)])
59+
AtoB = AbsAlgAssMorGen(A, B, m, minv)
60+
A.isomorphic_full_matrix_algebra = B, AtoB
61+
end
62+
5363
if isdefined(A, :isomorphic_full_matrix_algebra)
5464
local B::MatAlgebra{AbsSimpleNumFieldElem, Generic.MatSpaceElem{AbsSimpleNumFieldElem}}
5565
B, AtoB = A.isomorphic_full_matrix_algebra
56-
#@show B
5766
OB = _get_order_from_gens(B, elem_type(B)[AtoB(elem_in_algebra(b)) for b in absolute_basis(M)])
5867
#@show OB
5968
ainOB = ideal_from_lattice_gens(B, elem_type(B)[(AtoB(b)) for b in absolute_basis(a)])
6069
#@show ainOB
6170
#@show is_maximal(OB)
6271
fl, gen = _is_principal_maximal_full_matrix_algebra(ainOB, OB, side)
63-
return fl, (AtoB\gen)::elem_type(A)
72+
gentr = (AtoB\gen)::elem_type(A)
73+
@hassert :PIP 1 gentr * M == a
74+
return fl, gentr
6475
elseif base_ring(A) isa QQField && dim(A) == 4 && !is_split(A)
6576
return _is_principal_maximal_quaternion(a, M, side)
6677
elseif dim(ZA) == 4 && !isdefined(A, :isomorphic_full_matrix_algebra)

0 commit comments

Comments
 (0)