-
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
Fixes mres
and nres
in free_resolution
#3700
Conversation
@RafaelDavidMohr As far as I can see, the new functionality is only used with |
@jankoboehm userfacing function named |
Yes we want the keyword. There are use-cases for both options. |
proj_map = hom(F0, SQ_new, gens(SQ_new), check=false) | ||
F0_to_SQ = compose(proj_map, phi) | ||
F0_to_SQ.generators_map_to_generators = true | ||
AbstractAlgebra.set_name!(F0, "$br_name^$(ngens(SQ.sub))") |
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.
Why do you ned to set this name here and below? Since F0 and F1 are free module anyway, couldn't this be done generally as part of the show
methods for free modules?
As it is, this hardcodes the name of the basering, so if it changes later on, it will look ugly. Likewise if there is no name set, you hardcode br
forever.
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.
This is the current standard for presentations/resolutions/etc. and the same at other places. Thus I would keep it like this here right now and would instead think of some way to replace all of these instances by some AA printing magic in the future.
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.
Yeah if this is pervasive we should not try to deal with it in this PR. But perhaps we can open an issue as a reminder?
Or perhaps we just add it to #2891
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.
See #3730
@wdecker @jankoboehm do you have an example where |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #3700 +/- ##
==========================================
+ Coverage 81.34% 81.36% +0.01%
==========================================
Files 577 577
Lines 78618 78674 +56
==========================================
+ Hits 63952 64011 +59
+ Misses 14666 14663 -3
|
This example should do:
```julia
X = rational_d9_pi6();
Pn = ambient_coordinate_ring(X)
A = homogeneous_coordinate_ring(X)
n = ngens(Pn)-1
c = codim(X)
FA = free_resolution(A, algorithm = :fres)
C = Oscar.SimpleComplexWrapper(FA.C[0:first(range(FA.C))])
C_simp = simplify(C)
C_shift = shift(C_simp, c)
OmegaPn = graded_free_module(Pn, [n+1])
D = hom(C_shift, OmegaPn)
D_simp = simplify(D)
Z, inc = kernel(D_simp, 0)
B, inc_B = Oscar.boundary(D_simp, 0)
M = SubquoModule(D_simp[0], ambient_representatives_generators(Z), ambient_representatives_generators(B))
```
… Am 10.05.2024 um 17:13 schrieb Rafael Mohr ***@***.***>:
@wdecker <https://github.com/wdecker> @jankoboehm <https://github.com/jankoboehm> do you have an example where presentation produces something non-minimal that I can use as a test for the minimal free resolution?
—
Reply to this email directly, view it on GitHub <#3700 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AASSXETO6QBTAP236R4JSXLZBTPY7AVCNFSM6AAAAABHLCCC6KVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCMBUG44DINJWGU>.
You are receiving this because you were mentioned.
|
one more:
S, (x0, x1, x2, x3, x4) = graded_polynomial_ring(GF(3), ["x0", "x1", "x2", "x3", "x4"]);
m = ideal(S, [x1^2+(-x1+x2+x3-x4)*x0, x1*x2+(x1-x3+x4)*x0, x1*x3+(-x1+x4+x0)*x0, x1*x4+(-x1+x3+x4-x0)*x0, x2^2+(x1-x2-x4-x0)*x0, x2*x3+(x1-x2+x3+x4-x0)*x0, x2*x4+(x1+x2-x3-x4-x0)*x0, x3^2+(x3+x4-x0)*x0,x3*x4+(-x3-x4+x0)*x0, x4^2+(x1+x3-x4-x0)*x0]);
Qm, _ = quo(S, m);
FQm = free_resolution(Qm)
M, _ = image(map(FQm, 1))
… Am 10.05.2024 um 17:13 schrieb Rafael Mohr ***@***.***>:
@wdecker <https://github.com/wdecker> @jankoboehm <https://github.com/jankoboehm> do you have an example where presentation produces something non-minimal that I can use as a test for the minimal free resolution?
—
Reply to this email directly, view it on GitHub <#3700 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AASSXETO6QBTAP236R4JSXLZBTPY7AVCNFSM6AAAAABHLCCC6KVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCMBUG44DINJWGU>.
You are receiving this because you were mentioned.
|
Do we know the correct ranks for the minimal free resolution in this example so I can test? |
In |
There is a problem with the print function: julia> R, (x,y,z) = polynomial_ring(QQ, ["x", "y", "z"]); julia> A = R[x 1 y; 2x^2 z^2 3y^2]; julia> M = cokernel(A); julia> PM = presentation(M) julia> MPM = _presentation_minimal(M) julia> matrix(map(MPM,1)) julia> MPM[0] |
This case is caught in |
Fixed with f2a684b |
I am not sure what our policy here is. It may happen that a future developer may use this internal function and run into the border case. @fingolfin what do you think?
… Am 14.05.2024 um 11:54 schrieb Rafael Mohr ***@***.***>:
In _presentation_minimal please catch border case of a free module before entering AbstractAlgebra.set_name!(F0, "$br_name^$(ngens(SQ.sub))")
This case is caught in presentation already, and the user will only access _presentation_minimal via the minimal kw of presentation. Should I nonetheless treat this case seperately?
—
Reply to this email directly, view it on GitHub <#3700 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AASSXESK2FX6YF5GPGO34LDZCHNONAVCNFSM6AAAAABHLCCC6KVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCMBZG43TINRTGA>.
You are receiving this because you were mentioned.
|
@wdecker I am afraid I don't understand what you are asking about. What is "this internal function", and which border case? Happy to talk about it during triage today if anyone would like to. |
I think I understood the issue and can try to explain it later in triage if wdecker is not there |
I added the discussed minimization of the kernel in Currently this uses @wdecker Should I make a Singular issue regarding this? |
Can you give a concrete example where |
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.
This is ready to go as soon as the tests are green. Please check tests.
Maybe I'm misunderstanding the concept of length of a free resolution, but for example
|
@RafaelDavidMohr In your example, the resolution is short, so entering an increased length will not change anything: julia> R, (x, y) = polynomial_ring(GF(65521), ["x", "y"]); julia> I = ideal(R, [x^2, x*y, y]); julia> M = ideal_as_module(I); julia> FM = free_resolution(M, algorithm = :mres, length = 1) julia> FM = free_resolution(M, algorithm = :mres, length = 0) So why now does Singular print this: julia> Singular.mres(sm, 1) I guess, this is due to the fact that you use |
This PR will fix the
mres
andnres
options infree_resolution
usingprune_with_map
. Previously, using these optionsmight not return a minimal free resolution.
For using
prune_with_map
conveniently infree_resolution
, I would like add aminimal
keyword topresentation
, if this is set totrue
we would return a minimal presentation, computed from the output ofprune_with_map
.@wdecker Do we want a user-facing option to compute a minimal presentation? If not, then I will do this just internally.