-
Notifications
You must be signed in to change notification settings - Fork 133
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
Primary decomposition rerouting #3091
Primary decomposition rerouting #3091
Conversation
Why do you reroute |
I am not a big fan of the name |
Yes and no. In general (in particular in the groebner bases context), it does. |
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## master #3091 +/- ##
==========================================
+ Coverage 80.51% 80.55% +0.04%
==========================================
Files 524 525 +1
Lines 70408 70635 +227
==========================================
+ Hits 56689 56901 +212
- Misses 13719 13734 +15
|
@ederc : There seems to be some hickup with algebraic solving in the tests here. I suppose it does not have to do with my changes. Do you agree? |
Agreed. We will figure it out next week. |
Since you will have to touch the code anyway, maybe you could also add some documentation in form of a comment (just the general idea, maybe at the top of |
I tested locally with Julia 1.6 and I cannot recreate the failing test. Also in PR #3090 the test does not fail which is strange. |
If tests pass, this should be ready to go. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I still get incomprehensible errors for
julia> K, a = number_field([x - 1, x - 2]);
julia> Kt, t = K["t"];
julia> L, b = number_field(t - 1, "b");
julia> M, = number_field(t - 1, "b");
julia> Mx, = polynomial_ring(M, 2);
julia> primary_decomposition(ideal(Mx, [gen(Mx, 1)]))
ERROR: MethodError: no method matching _expand_coefficient_field(::MPolyQuoRing{AbstractAlgebra.Generic.MPoly{NfAbsNSElem}}; rec_depth::Int64)
This is a regression, since it is working fine on current master:
julia> Qx, x = QQ["x"]
(Univariate polynomial ring in x over QQ, x)
julia> K, a = number_field([x - 1, x - 2]);
julia> Kt, t = K["t"];
julia> L, b = number_field(t - 1, "b");
julia> M, = number_field(t - 1, "b");
julia> Mx, = polynomial_ring(M, 2);
julia> primary_decomposition(ideal(Mx, [gen(Mx, 1)]))
1-element Vector{Tuple{MPolyIdeal{AbstractAlgebra.Generic.MPoly{Hecke.NfRelElem{NfAbsNSElem}}}, MPolyIdeal{AbstractAlgebra.Generic.MPoly{Hecke.NfRelElem{NfAbsNSElem}}}}}:
(ideal(x1), ideal(x1))
Catching this cannot be handled using the signature, so you need to use something like
_is_a_tower_we_can_handle(K::QQField) = true
_is_a_tower_we_can_handle(K::NumField) = (K isa AnticNumberField || K isa Oscar.Hecke.NfRel) && _is_a_tower_we_can_handle(base_field(K))
And then check inside the function and call the ordinary primary decomposition in case it returns false
.
Alternatively, methods need to be added for conversion of the other field types.
What now? Can this be merged? |
As I said on slack, I will review it today. |
It's a shame we (I) did not implement |
Yes, that's what I would have needed. Let me know, should that change one day. |
I will adjust it once thofma/Hecke.jl#1324 is merged. |
Very good, thanks! |
A prototype for what @afkafkafk13 suggested and @wdecker requested in #3083 .