From 91f076adc70d61263e725dc9b0595501b5eaaf7b Mon Sep 17 00:00:00 2001 From: Tommy Hofmann Date: Wed, 8 Jan 2025 11:53:26 +0100 Subject: [PATCH] fix: is_irreducible for number field order elements (#4424) --- src/NumberTheory/NmbThy.jl | 6 +++--- test/NumberTheory/nmbthy.jl | 1 + 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/NumberTheory/NmbThy.jl b/src/NumberTheory/NmbThy.jl index 140c6597161b..dcc0a886aa85 100644 --- a/src/NumberTheory/NmbThy.jl +++ b/src/NumberTheory/NmbThy.jl @@ -180,9 +180,9 @@ function is_irreducible(a::AbsSimpleNumFieldOrderElem) return false end s, ms = Hecke.sunit_mod_units_group_fac_elem(S) - V = transpose(matrix(ZZ, [ZZRingElem[valuation(ms(x), y) for y = S] for x = gens(s)])) - b = transpose(matrix(ZZ, [ZZRingElem[valuation(a, y) for y = S]])) - sol = solve(V, b) + V = matrix(ZZ, [ZZRingElem[valuation(ms(x), y) for y = S] for x = gens(s)]) + b = matrix(ZZ, [ZZRingElem[valuation(a, y) for y = S]]) + sol = transpose(solve(V, b)) #want to write sol = x+y where # Cx, Cy > 0 diff --git a/test/NumberTheory/nmbthy.jl b/test/NumberTheory/nmbthy.jl index bc6790ac17a3..f34f32cfdeb4 100644 --- a/test/NumberTheory/nmbthy.jl +++ b/test/NumberTheory/nmbthy.jl @@ -11,6 +11,7 @@ end f = factorizations(zk(6)) @test length(f) == 2 @test all(x -> evalu(x) == 6, f) + @test !is_irreducible(zk(6)) end @testset "norm_equation.absolute" begin