-
Notifications
You must be signed in to change notification settings - Fork 126
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
Ideals in Z #229
Comments
Agreed, this is a good idea. I actually needed a few times, but never found the time to implement it. |
The same should also be done for plain fields such as |
For ZZ this is implemented now (in Hecke), although not documented and not all the functionality that you mentioned. The syntax for creation is |
Well, (at least now) we can just use
So perhaps providing For the missing functionality of |
@fingolfin Is the current ideal functionality good enough? If so, we should close the issue:
Some things are missing, but I'm not sure whether that is critical:
|
On Wed, Apr 05, 2023 at 12:30:25PM -0700, YueRen wrote:
@fingolfin Is the current ideal functionality good enough? If so, we should close the issue:
```
julia> ideal(ZZ,[3])+ideal(ZZ,[2])
1ZZ
julia> ideal(ZZ,[2])*ideal(ZZ,[3])
6ZZ
julia> intersect(ideal(ZZ,[3]),ideal(ZZ,[2]))
6ZZ
```
Some things are missing, but I'm not sure whether that is critical:
```
julia> radical(ideal(ZZ,[9]))
ERROR: MethodError: no method matching radical(::Hecke.ZZIdl)
Closest candidates are:
radical(::T) where T<:Integer at ~/.julia/packages/Hecke/IGeky/src/Misc/Integer.jl:1267
radical(::Hecke.AbsAlgAss{T}) where T at ~/.julia/packages/Hecke/IGeky/src/AlgAss/AbsAlgAss.jl:1202
radical(::MPolyIdeal) at ~/.julia/dev/Oscar/src/Rings/mpoly-ideals.jl:418
...
Stacktrace:
[1] top-level scope
@ REPL[42]:1
julia> primary_decomposition(ideal(ZZ,[9]))
ERROR: MethodError: no method matching primary_decomposition(::Hecke.ZZIdl)
Closest candidates are:
primary_decomposition(::Hecke.AlgAssAbsOrdIdl) at ~/.julia/packages/Hecke/IGeky/src/AlgAssAbsOrd/Ideal.jl:2229
primary_decomposition(::Hecke.AlgAssAbsOrdIdl, ::Hecke.AlgAssAbsOrd) at ~/.julia/packages/Hecke/IGeky/src/AlgAssAbsOrd/Ideal.jl:2229
primary_decomposition(::MPolyIdeal; alg) at ~/.julia/dev/Oscar/src/Rings/mpoly-ideals.jl:497
...
Stacktrace:
[1] top-level scope
@ REPL[43]:1
```
I guess ideals in ZZ satisfy the calssical number-theory interface to ideals, not
the geometry interface...
…
--
Reply to this email directly or view it on GitHub:
#229 (comment)
You are receiving this because you are subscribed to this thread.
Message ID: ***@***.***>
|
We actually have the "geometric interface" for all our other ideals:
|
On Thu, Apr 06, 2023 at 12:00:01AM -0700, Tommy Hofmann wrote:
We actually have the "geometric interface" for all our other ideals:
```
julia> QQQ, = rationals_as_number_field(); ZZZ = ring_of_integers(QQQ);
julia> primary_decomposition(ideal(ZZZ, 9))
1-element Vector{Tuple{NfOrdIdl, NfOrdIdl}}:
(<9, 9>
[...]
julia> radical(ideal(ZZZ, 9))
<3, 3>
[...]
```
I just discovered and was impressed
… --
Reply to this email directly or view it on GitHub:
#229 (comment)
You are receiving this because you commented.
Message ID: ***@***.***>
|
This is complete to my satisfaction. Adding |
For teaching (and simple test), ideals in Z would be nice to have. I guess something like
ideal(ring, gens)
would be the default patterns, soideal(ZZ, [ ZZ(7) ])
; and perhaps as a special case, also allow producing principal ideals viaideal(ring, gen)
(soideal(ZZ, ZZ(7))
) or evengen*ring
(so7*ZZ
) ?And then have some basic features: intersection, sums, containment test, subset test, computing
ZZ/I
, ... but I guess also properties of the ideals (maximal / prime / ...). All of this is of course "easy", and for my own code, I don't need this, as I can just invokegcd
etc. directly. But as I said: it's very useful for teaching; but also to set an easy example for people who need to implement new, more complicated rings. (Of course if it'd be easy to piggy back all of this into e.g. existing Hecke or Nemo code, that'd be also fine, I absolutely do not insist on a separate implementation just forZZ
ideals).I am not sure what the "ideal" (haha) place for this would be; personally I'd just start it in
experiments
here in Oscar, and we can move it to another place later shrug.The text was updated successfully, but these errors were encountered: