Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error in absolute_coordinates method with native prime fields #1546

Closed
mjrodgers opened this issue Jun 19, 2024 · 2 comments · Fixed by Nemocas/Nemo.jl#1796
Closed

Error in absolute_coordinates method with native prime fields #1546

mjrodgers opened this issue Jun 19, 2024 · 2 comments · Fixed by Nemocas/Nemo.jl#1796

Comments

@mjrodgers
Copy link

We have the absolute_coordinates method to convert a finite field element to a vector over the prime field corresponding to its internal representation. However while this method is defined for all types of finite field elements, it fails when called on an fpFieldElem or an FpFieldElem due to a missing coeff method for these element types.

julia> k = Native.GF(7)
Finite field of characteristic 7

julia> a = (k)(3)
3

julia> absolute_coordinates(a)
ERROR: MethodError: no method matching coeff(::fpFieldElem, ::Int64)

Closest candidates are:
  coeff(::QQPolyRingElem, ::Int64)
   @ Nemo ~/.julia/packages/Nemo/0n54t/src/flint/fmpq_poly.jl:53
  coeff(::DualRootSpaceElem, ::Int64)
   @ Oscar ~/.julia/dev/Oscar/experimental/LieAlgebras/src/RootSystem.jl:627
  coeff(::fpAbsPowerSeriesRingElem, ::Int64)
   @ Nemo ~/.julia/packages/Nemo/0n54t/src/flint/nmod_abs_series.jl:76
  ...

Stacktrace:
 [1] absolute_coordinates(x::fpFieldElem)
   @ Hecke ~/.julia/packages/Hecke/gMNzj/src/Misc/RelFiniteField.jl:518
 [2] top-level scope
   @ REPL[4]:1
@fieker
Copy link
Collaborator

fieker commented Jun 19, 2024 via email

@mjrodgers
Copy link
Author

I went with adding coeffs because it was easy and could possibly fix other issues if anything else generic calls coeffs. But I'm open to the alternative if that's preferable for any reason.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants