Skip to content

Commit

Permalink
fix: is_irreducible for number field order elements
Browse files Browse the repository at this point in the history
  • Loading branch information
thofma committed Jan 7, 2025
1 parent 264490b commit 9e6a6b4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/NumberTheory/NmbThy.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions test/NumberTheory/nmbthy.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 9e6a6b4

Please sign in to comment.