-
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
Adjust to renaming of rank(A::FinGenAbGroup)
to torsion_free_rank(A::FinGenAbGroup)
#3457
Conversation
(I am also going to run the test suite on my computer to find more issues and will push updates here as I encounter and fix them) |
As it turns out, the toric varieties code uses @HereAround are these groups generally torsion free (so the two kinds of rank coincide), or not? |
... to torsion_free_rank(A::FinGenAbGroup), see also <thofma/Hecke.jl#1224>.
3e83fda
to
f83e591
Compare
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## master #3457 +/- ##
==========================================
+ Coverage 81.91% 81.94% +0.03%
==========================================
Files 562 563 +1
Lines 75522 75536 +14
==========================================
+ Hits 61861 61897 +36
+ Misses 13661 13639 -22
|
I think it makes sense to backport this and we will try to do so but we need it really soon, what is the current approach (and timeline) for this? Check that this runs in the OscarCI for Hecke, do a breaking Hecke release, adapt the version and merge this PR? I will try to run this (together with the Hecke PR) for the book examples now. |
Yes, that would be the plan. I could do a Hecke breaking release as soon as the OSCAR CI (with the matching branches) in thofma/Hecke.jl#1224 shows green. Can you report back about the book examples as soon as you have the result? |
No new errors in the booktests and no unexpected output changes, running with thofma/Hecke.jl@ |
experimental/GModule/Cohomology.jl
Outdated
@@ -474,7 +474,7 @@ export action, cohomology_group, extension, pc_group_with_isomorphism | |||
export induce, is_consistent, istwo_cocycle, all_extensions | |||
export split_extension, extension_with_abelian_kernel | |||
|
|||
Oscar.dim(C::GModule) = rank(C.M) | |||
Oscar.dim(C::GModule) = torsion_free_rank(C.M) |
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.
Oscar.dim(C::GModule) = torsion_free_rank(C.M) | |
Oscar.dim(C::GModule) = rank(C.M) |
This delegates to the module and not the group. So the change here is wrong
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'm not sure this is true. C.M
is "the module", but there are some signatures with C::GModule{..., FinGenAbGroup}
and the second type parameter is for C.M
as far as I can see. Somebody who knows about the code should have a look.
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.
The CI in Hecke agrees that here we have a "module". See https://github.com/thofma/Hecke.jl/actions/runs/8094631614/job/22124040318#step:7:1375
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.
Oh, I think it can be both here. So we would need something like
Oscar.dim(C::GModule{..., FinGenAbGroup}) = torsion_free_rank(C.M)
Oscar.dim(C:GModule) = rank(C.M)
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.
Yes, exactly. This is an example from the tests:
julia> k, a = cyclotomic_field(5)
(Cyclotomic field of order 5, z_5)
julia> zk = maximal_order(k)
Maximal order of Cyclotomic field of order 5
with basis AbsSimpleNumFieldElem[1, z_5, z_5^2, z_5^3]
julia> U, mU = unit_group_fac_elem(zk)
(Z/10 x Z, UnitGroup map of Factored elements over Cyclotomic field of order 5
)
julia> A, mA = automorphism_group(PermGroup, k)
(Permutation group of degree 4, Map: permutation group of degree 4 -> generic group of order 4 with multiplication table -> set of automorphisms of Cyclotomic field of order 5)
julia> C = gmodule(A, mU)
G-module for A acting on U
julia> typeof(C.M)
FinGenAbGroup
@@ -1912,7 +1912,7 @@ function shrink(C::GModule{PermGroup, FinGenAbGroup}, attempts::Int = 10) | |||
o = Oscar.orbit(q, rand(gens(q.M))) | |||
if length(o) == order(group(q)) | |||
s, ms = sub(q.M, collect(o), false) | |||
if rank(s) == length(o) | |||
if torsion_free_rank(s) == length(o) |
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 another place where we need to be careful about the type of s
I think.
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.
If I remember the idea correctly, the change should be correct. But @fieker should confirm.
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.
Looks good
experimental/GModule/Cohomology.jl
Outdated
@@ -474,7 +474,7 @@ export action, cohomology_group, extension, pc_group_with_isomorphism | |||
export induce, is_consistent, istwo_cocycle, all_extensions | |||
export split_extension, extension_with_abelian_kernel | |||
|
|||
Oscar.dim(C::GModule) = torsion_free_rank(C.M) | |||
Oscar.dim(C::GModule) = rank(C.M) |
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.
There is no rank(::FinGenAbGroup
anymore in conjunction with thofma/Hecke.jl#1224.
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 the discussion above. C.M
can also be a FreeModule
(or something).
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 find this dim
function rather problematic to start with, there is a reason we use rank
for modules in general... but that's besides the point right now
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'll push a fix
OK thofma/Hecke.jl#1224 is looking good. I'll tag 0.30.0 later today. |
rank(A::FinGenAbGroup)
to torsion_free_rank(A::FinGenAbGroup)
rank(A::FinGenAbGroup)
to torsion_free_rank(A::FinGenAbGroup)
OK, later today means now. |
Someone needs to approve and squash this. |
As a comment: there are almost no requirements for the 2nd type. It needs to be a mathematical module, not a module type |
…A::FinGenAbGroup)` (#3457) * Prepare for renaming of rank(A::FinGenAbGroup) ... to torsion_free_rank(A::FinGenAbGroup), see also <thofma/Hecke.jl#1224>. * Use is_z_graded in _regularity_bound * more rank -> torsion_free_rank * more * more more * Update experimental/GModule/Cohomology.jl * more more more * bump Hecke --------- Co-authored-by: Tommy Hofmann <[email protected]> Co-authored-by: Lars Göttgens <[email protected]> (cherry picked from commit 8b863ed)
- Add QQBar docs to the manual #3423 - do not show the OscarInterface banner #3422 - fix bugs in all_OD_infos #3419 - Ep/ Rename Spec to AffineScheme #3345 #3425 - Remove two mentions of Arb_jll #3431 - Tweak epimorphism_from_free_group #3430 - CI: re-enable nightly #3435 - support gen(G::GAPGroup, 0) #3332 - Align all_*_groups methods some more #3433 - Add all_perfect_groups #3434 - Add all_primitive_groups and all_transitive_groups variants taking a single int or int range #3404 - fix a docstring #3436 - Fixes multivariate division #3396 - Docu invariants tori #3428 - Improve docstrings for is_conjugate/is_conjugate_with_data. #3384 - Fix ambient_module(M::SubquoModule) #3448 - Bugfix for printing of affine schemes #3437 - Bugfix for bugfix for printing of affine schemes #3445 - Update OSCAR banner #3410 - Docu invariants lin. red. groups (Lakshmi Ramesh and Wolfram Decker) #3443 - add od_from_atlas_group, od_from_p_subgroup, and helpers #3444 - Unexport normalise #3453 - support group properties for character tables #3449 - add docstrings for acting_group and action_function #3432 (exports are used in new groups code for the book) - Adjust to renaming of rank(A::FinGenAbGroup) to torsion_free_rank(A::FinGenAbGroup) #3457 - Ensure fp_group(G) transfers group attributes #3464 - Added comment on convention #3467 - Export weierstrass_chart_on_minimal_model and patch transform_to_weierstrass #3458 - Fix a doc signature #3466 - Grading + caching for affine algebra of torus invariants #3469
In general they are not torsion free, but for my applications they always are. In any case, torsion-free rank should be the correct replacement/extension. |
The renaming would be done on the Hecke side thofma/Hecke.jl#1224.
This is a breaking change, as code that currently uses
rank(A::FinGenAbGroup)
would either run into an error (current state of that PR), or even get "wrong" (well, "unexpected" perhaps) results.This PR tries to get ahead of it by changing all uses of
rank
that really want a "torsion free rank" to use that. (Actually: in all those places the groups in question are free, and then both "ranks" coincide; so this change here is not so much about making sure the code stays correct as about allowing us to ensure via OscarCI test that we caught all places that callrank(A::FinGenAbGroup)
(or at least all that are actually being tested...).The big question then is this: I think we have more or less consensus that we want this change, at least eventually. The big question is: can we still get it into 1.0?
I am not aware of any consequences of this PR for the book (which of course is not saying there are none...), but since it is a really very breaking change, if we don't have it in 1.0 we'd have to wait for 2.0. And if we do that, then perhaps we shouldn't merge this here either before we have a clear time line for 2.0, otherwise the difference between master and 1.x is too painful.
So while I'd love this PR and the one in Hecke to land and be backported to 1.0, ultimately the release managers (@benlorenz @aaruni96) should decide. (I've added the backports label as a kind of request, of course it can and should be removed if it is decided that it is not suitable)