Skip to content

Commit

Permalink
move code from Oscar.jl/experimental/GModule/Misc.jl here (#1720)
Browse files Browse the repository at this point in the history
The idea is to add this code to Nemo.jl,
and then to remove it from Oscar.jl.

Concerning the usefulness of this code (and tests to be added),
I am not sure which vectors shall be supported by the new methods;
vectors of integers are already addressed by other methods.
  • Loading branch information
ThomasBreuer authored Apr 26, 2024
1 parent e273779 commit e2cb1d4
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/HeckeMiscFiniteField.jl
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,15 @@ function (k::FqPolyRepField)(a::QQFieldElem)
return k(numerator(a)) // k(denominator(a))
end

function (k::Nemo.fpField)(a::Vector)
@assert length(a) == 1
return k(a[1])
end

function (k::fqPolyRepField)(a::Vector)
return k(polynomial(Native.GF(Int(characteristic(k))), a))
end


(F::fqPolyRepField)(a::zzModRingElem) = F(a.data)

Expand Down

0 comments on commit e2cb1d4

Please sign in to comment.