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
Ep/ Rename Spec to AffineScheme #3345 #3425
Ep/ Rename Spec to AffineScheme #3345 #3425
Conversation
Use `AffineScheme` only for the type, not the function.
As was recommended by Martin Bies and Wolfram Decker.
For biproducts, naming the output triple [obj], inj, pr seems to be common. Among the changes was changing "proj" to "pr" in the triples [obj], inj, proj
Also some other minor fixes
In particular, spec allows the argument to be a quotient ring or localized ring. Similarly for proj. Probably the tests would not have passed in the previous commit because of this
proj(Q::MPolyQuoRing{MPolyDecRingElem{T, PT}}) where {T, PT<:MPolyRingElem{T}} = ProjectiveScheme(Q)
@@ -1 +0,0 @@ | |||
../../../test/Serialization/setup_tests.jl |
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 file is actually a symbolic to ../../../test/Serialization/setup_tests.jl
. I assume it is a copy now because you used sed
. (At least that's what happened to me in the past.)
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.
Fixed. I don't know if there are other symbolic links ruined
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## master #3425 +/- ##
=======================================
Coverage 81.89% 81.90%
=======================================
Files 561 561
Lines 75125 75128 +3
=======================================
+ Hits 61523 61532 +9
+ Misses 13602 13596 -6
|
Remove commented question that I made earlier. Better to make an issue or ask someone than comment the code.
@@ -403,7 +403,7 @@ function canonical_projection(V::LieAlgebraModule, i::Int) | |||
@req fl "Module must be a direct sum" | |||
@req 1 <= i <= length(Vs) "Index out of bound" | |||
j = sum(dim(Vs[l]) for l in 1:(i - 1); init=0) | |||
proj = hom( | |||
projection = hom( |
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.
What is the purpose of this change and the similar ones in parts of the code that have nothing to do with schemes? I don't really see why they are necessary.
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 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 am with @thofma here: #3345 (comment)
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.
Variables can be called whatever the original author wants (unless of course it results now in a conflict). This should not be changed here.
I think this can be achieved by partially reverting cb13aad |
@thofma @lgoettgens. The changes in cb13aad are mostly about how to name the maps returned by direct sums and products. In algebraic geometry, naming the returned projection map In general, I believe there is value in having consistent naming for variables returned in direct sums and products, so I mostly went with OSCAR project leader Michael Joswig encouraged not using |
Do I understand correctly that you wish to revert the changes to variables named |
There is no reason that I can see why an internal variable change is warranted. |
@fieker Easier to maintain code, find errors in code, collaborate with others. The same reason why style guides exist in most programming languages, why linters and automatic code formatters exist. The same reason why all code, including internal functions and variables in local scope, are usually formatted according to the style guide. In this particular case, it is a common best practice not name a variable after functions or variables in global scope (see StackOverflow). It is something that linters warn against (I haven't found any currently maintained Julia linter, but here is an example from Pylint). |
Just to reiterate, I am happy to change the code as you suggest. I just want to make sure I understand what it is you wish to change, as it seems strange to me to use ´proj´ in algebraic geometry for projection morphisms where it can easily be confused with the homogeneous spectrum. It seems strange to me to go against standard best practices and to go against an OSCAR project leader's recommendation. This renaming issue has been going on for weeks, with different people having different points of view, going back and forth on what or how to rename and with me having to accommodate to these new decisions. I am happy to make the changes, I just hope that I don't need to undo these changes again. |
|
Thanks! Maybe @simonbrandhorst could give a quick glance and approve the changes here? |
@paemurru since you keep referring to "an OSCAR project leader's recommendation", let me point out that @fieker and @thofma also are OSCAR project leaders and as such I find it odd to draw that card against them... You can of course request that "the OSCAR leaders" sit together and give a final verdict before you change anything, so that you don't end up changing things back and forth (a quite reasonable request). |
src/AlgebraicGeometry/Schemes/ProjectiveSchemes/Objects/Attributes.jl
Outdated
Show resolved
Hide resolved
is_standard_graded(S) || error("ring must be standard graded") | ||
return ProjectiveScheme(S) |
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.
It seems to me that the better place for this input check would be the actual constructor
ProjectiveScheme
? (however this need not delay merging this pull request.)
# execute: sort < src/exports.jl > dummy ; mv dummy src/exports.jl | ||
# execute: LC_COLLATE=C sort < src/exports.jl > dummy ; mv dummy src/exports.jl |
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.
Good catch!
src/exports.jl
Outdated
export projective_scheme | ||
export projective_space |
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.
Please keep the support for projective_scheme
.
While proj
is the mathematically correct name for this construction in algebraic geometry.
Oscar is for a wider audience. The name projective_scheme
is more descriptive of what happens.
(construct a ProjectiveScheme
from a graded ring).
Therefore both proj
and projective_scheme
should be allowed.
Similarly we should have the constructors affine_scheme
and spec
.
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 are already some examples of how to achieve such an alias in Aliases.jl
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.
Maybe someone else wants to use the abbreviations
proj
or spec
in another context with a different meaning.
Therefore I think that a global alias proj = projective_scheme
is not justified here?
I merely added calls for projective_scheme
with the corresponding signatures.
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.
Thanks for the big effort Erik. I appreciate it!
@fingolfin I did not know that @thofma was among OSCAR project leaders, sorry about that. His name does not appear under OSCAR project leaders in the OSCAR website. Perhaps the page should be updated.
Yes, this is what I would have liked, as it seemed to me there was no consensus. But considering how everyone is very busy with the OSCAR book and OSCAR 1.0, I didn't think it would be appropriate for me to request this |
* Rename Spec -> AffineScheme Use `AffineScheme` only for the type, not the function. * Rename proj for toric divisors to projectivization As was recommended by Martin Bies and Wolfram Decker. * Function ProjectiveScheme to projective_scheme and proj * Fix: spec now extends the constructor AffineScheme In particular, spec allows the argument to be a quotient ring or localized ring. Similarly for proj. Probably the tests would not have passed in the previous commit because of this * add support for projective_scheme and affine_scheme --------- Co-authored-by: Simon Brandhorst <brandhorst@math.uni-sb.de> (cherry picked from commit b00d5e4)
Yes, the website should be updated. We'll get to it eventually. |
- 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
Resolves #3345