Galois fields and quotient rings of ZZ #1906
Answered
by
fieker
JohnAAbbott
asked this question in
Q&A
Replies: 5 comments 3 replies
-
On Tue, Feb 07, 2023 at 03:08:56AM -0800, JohnAAbbott wrote:
In Oscar one gets two different results from the following two inputs:
`GF(3)` and `quo(ZZ,3)`
type stability: GF(3) yields always a field, by type, quo(ZZ, 6) will
never return a field (type)
…
Is there a reason why the results are different?
Of course, `GF(6)` must fail, whereas `quo(ZZ,6)` must succeed.
[newbie here -- constructive feedback welcome]
--
Reply to this email directly or view it on GitHub:
#1906
You are receiving this because you are subscribed to this thread.
Message ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
1 reply
-
On Tue, Feb 07, 2023 at 07:49:25AM -0800, JohnAAbbott wrote:
`ResidueField(ZZ,3)` returns a field, but seems to be different from `GF(3)` -- well, they print out differently.
Tricky... we should fix that
…
--
Reply to this email directly or view it on GitHub:
#1906 (reply in thread)
You are receiving this because you commented.
Message ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
0 replies
-
The function
|
Beta Was this translation helpful? Give feedback.
1 reply
-
On Wed, Feb 08, 2023 at 06:05:51AM -0800, JohnAAbbott wrote:
`ResidueField` seems to have no artificial limit:
```
# The following gave no error, but was so fast that I imagine it
# did not check that 2^1257787-1 is prime
ResidueField(ZZ, BigInt(2)^1257787-1); # works
```
ResidueField(ZZ, BigInt(2)^12); # also works
as a hint: try
@less ResidueField(ZZ, BigInt(2)^12); # also works
to see what it does (nothing), not quite sure why this is there or
useful
…
--
Reply to this email directly or view it on GitHub:
#1906 (reply in thread)
You are receiving this because you commented.
Message ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
0 replies
-
On Wed, Feb 08, 2023 at 06:04:53AM -0800, JohnAAbbott wrote:
The function `GF` appears to be limited to `2^63-1`. Maybe there is a missing conversion from `Int128` to `fmpz`?
Yes/ no: we have
GF(::Int)
GF(::UInt)
GF(::fmpz)
we need
GF(a:Integer) = GF(fmpz(a))
we're missing many types:
julia> subtypes(Integer)
5-element Vector{Any}:
Bool
CxxWrap.CxxWrapCore.CppEnum
Polymake.Integer
Signed
Unsigned
julia> subtypes(Signed)
7-element Vector{Any}:
BigInt
CxxWrap.CxxWrapCore.CxxSigned
Int128
Int16
Int32
Int64
Int8
… ```
using Oscar;
p_small = 9223372036854775783; ## last prime before 2^63
p_large = 9223372036854775837; ## first prime after 2^63
ResidueField(ZZ,p_small); # works
ResidueField(ZZ,p_large); # works
GF(p_small); # works
GF(p_large); # ERROR
ERROR: MethodError: no method matching GF(::Int128)
Closest candidates are:
GF(::Integer, ::Int64) at ~/.julia/packages/Hecke/TlFaj/src/Misc/FiniteField.jl:15
GF(::Integer, ::Int64, ::Union{AbstractString, Symbol}; cached) at ~/.julia/packages/Hecke/TlFaj/src/Misc/FiniteField.jl:15
GF(::Int64; cached) at ~/.julia/packages/Nemo/g02iz/src/flint/gfp_elem.jl:471
...
Stacktrace:
[1] top-level scope
@ REPL[3]:1
```
--
Reply to this email directly or view it on GitHub:
#1906 (comment)
You are receiving this because you commented.
Message ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
fingolfin
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
In Oscar one gets two different results from the following two inputs:
GF(3)
andquo(ZZ,3)
Is there a reason why the results are different?
Of course,
GF(6)
must fail, whereasquo(ZZ,6)
must succeed.[newbie here -- constructive feedback welcome]
Beta Was this translation helpful? Give feedback.
All reactions