|
49 | 49 |
|
50 | 50 | function _is_principal_maximal_simple_component(a, M, side = :right)
|
51 | 51 | 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 | + |
53 | 63 | if isdefined(A, :isomorphic_full_matrix_algebra)
|
54 | 64 | local B::MatAlgebra{AbsSimpleNumFieldElem, Generic.MatSpaceElem{AbsSimpleNumFieldElem}}
|
55 | 65 | B, AtoB = A.isomorphic_full_matrix_algebra
|
56 |
| - #@show B |
57 | 66 | OB = _get_order_from_gens(B, elem_type(B)[AtoB(elem_in_algebra(b)) for b in absolute_basis(M)])
|
58 | 67 | #@show OB
|
59 | 68 | ainOB = ideal_from_lattice_gens(B, elem_type(B)[(AtoB(b)) for b in absolute_basis(a)])
|
60 | 69 | #@show ainOB
|
61 | 70 | #@show is_maximal(OB)
|
62 | 71 | 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 |
64 | 75 | elseif base_ring(A) isa QQField && dim(A) == 4 && !is_split(A)
|
65 | 76 | return _is_principal_maximal_quaternion(a, M, side)
|
66 | 77 | elseif dim(ZA) == 4 && !isdefined(A, :isomorphic_full_matrix_algebra)
|
|
0 commit comments