Skip to content
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

Rename Spec to AffineScheme #3345

Closed
paemurru opened this issue Feb 9, 2024 · 21 comments · Fixed by #3425
Closed

Rename Spec to AffineScheme #3345

paemurru opened this issue Feb 9, 2024 · 21 comments · Fixed by #3425

Comments

@paemurru
Copy link
Contributor

paemurru commented Feb 9, 2024

We have the types Spec and ProjectiveScheme. To make the names consistent, we will change Spec into AffineScheme. The functions to construct affine and projective schemes will still be called spec and proj. This completes one bullet point in Schemes Meta Issue #3202.

For consistency, we need to also change many related types and functions like AbsSpec and SpecMor. See #3345 (comment) for the list of planned changes.

@lgoettgens lgoettgens mentioned this issue Feb 9, 2024
10 tasks
@fieker
Copy link
Contributor

fieker commented Feb 14, 2024

I don't have any (strong) opinion. Wha I would like you (all) to think about, is how someone who does not know what a scheme is can create and use the P^2(QQ), the projective space as introduced in many (classical) (basic) texts. How is this interaction going to be? Those will be the vast majority of users....

@simonbrandhorst
Copy link
Collaborator

simonbrandhorst commented Feb 14, 2024

The names of the underscore constructors won't change. So your question is tangential.
P = projective_space(QQ,2) will create projective space.
rational_points(P) should return the set of its rational points and P([0,0,1]) create the rational point [0:0:1] just like in a text book. We could consider P(QQ) to return the set of QQ rational points.
Further constructors could be
projective_space(ToricVariety, QQ, 2)
projective_space(Scheme, QQ, 2)
projective_space(Set, QQ, 2)
you name it.

@paemurru
Copy link
Contributor Author

paemurru commented Feb 17, 2024

In yesterday's OSCAR meeting it was decided with @micjoswig, @wdecker, @jankoboehm and others to:

  • keep the type ProjectiveScheme,
  • rename the type Spec to AffineScheme,
  • rename the function Spec to spec, and
  • introduce an alias affine_scheme of spec.

@wdecker
Copy link
Collaborator

wdecker commented Feb 17, 2024 via email

@wdecker
Copy link
Collaborator

wdecker commented Feb 17, 2024 via email

@paemurru
Copy link
Contributor Author

paemurru commented Feb 17, 2024

@wdecker The original issue was the inconsistency that currently we have the types Spec and ProjectiveScheme. For consistency, we would like to have either AffineScheme and ProjectiveScheme or Spec and Proj.

If we rename Spec to AffineScheme, then yes, we will keep ProjectiveScheme as it is.

@wdecker
Copy link
Collaborator

wdecker commented Feb 17, 2024 via email

@paemurru
Copy link
Contributor Author

Below are eleven functions containing Spec or spec.

  • Spec
  • SpecMor
  • SimplifiedSpec
  • SpecOpen
  • SpecOpenMor
  • SpecOpenRing
  • SpecOpenRingElem
  • _is_open_func_for_schemes_without_specopen
  • spec_open_ring_type
  • ambient_via_spec
  • standard_spec

If we rename the type Spec to AffineScheme, then the cleanest way is to rename all of the eleven functions above to using affine_scheme instead of spec. I suggest not having aliases for all the eleven functions above, perhaps only the alias spec for the function affine_scheme and proj for projective_scheme.

At the moment, there is a problem that proj is already defined in src/Rings/ReesAlgebra.jl and it is defined differently from projective_scheme in src/AlgebraicGeometry/Schemes/ProjectiveSchemes/Objects/Constructors.jl. Namely, proj checks that the ring is standard graded while projective_scheme does not. So I would prefer to first have a pull request which only does renaming and then have a separate pull request that creates aliases and fixes the above inconsistency between proj and projective_scheme.

Note that outside of algebraic geometry, the name proj suggests it is an abbreviation of projection. It is used in this meaning in local scope inside a function for group theory, src/Groups/sub.jl, unrelated to projective schemes.

@micjoswig
Copy link
Member

If we rename the type Spec to AffineScheme, then the cleanest way is to rename all of the eleven functions above to using affine_scheme instead of spec. I suggest not having aliases for all the eleven functions above, perhaps only the alias spec for the function affine_scheme and proj for projective_scheme.

At the moment, there is a problem that proj is already defined in src/Rings/ReesAlgebra.jl and it is defined differently from projective_scheme in src/AlgebraicGeometry/Schemes/ProjectiveSchemes/Objects/Constructors.jl. Namely, proj checks that the ring is standard graded while projective_scheme does not. So I would prefer to first have a pull request which only does renaming and then have a separate pull request that creates aliases and fixes the above inconsistency between proj and projective_scheme.

Fine with me.

@fieker what do you think?

Note that outside of algebraic geometry, the name proj suggests it is an abbreviation of projection. It is used in this meaning in local scope inside a function for group theory, src/Groups/sub.jl, unrelated to projective schemes.

It is difficult to be globally consistent. After all, notation is not uniform across all of mathematics. I would encourage to use projection instead of projoutside of the algebraic geometry sections. But that should be decided by @fingolfin

@thofma
Copy link
Collaborator

thofma commented Feb 17, 2024

Note that outside of algebraic geometry, the name proj suggests it is an abbreviation of projection. It is used in this meaning in local scope inside a function for group theory, src/Groups/sub.jl, unrelated to projective schemes.

It is difficult to be globally consistent. After all, notation is not uniform across all of mathematics. I would encourage to use projection instead of projoutside of the algebraic geometry sections. But that should be decided by @fingolfin

Our style guide says nothing about how one should name variables inside a function, so I don't think this is relevant here.

@wdecker
Copy link
Collaborator

wdecker commented Feb 17, 2024 via email

@afkafkafk13
Copy link
Collaborator

As I see it, most of these eleven identifiers are internal DataTypes or internal functions. The whole SpecOpen stuff is of technical relevance (and needed!), but by far to complicated to be user facing.

From my point of view, the relevant ones for the renaming are: Spec and SpecMor, which then become AffineScheme and AffineSchemeMorphism by renaming the respective data types and functions. Using this naming, we have to keep in mind a subtle difference: our affine_schemes are always the Spec of a ring, while the mathematical definition merely states that an affine scheme is isomorphic to the Spec of some ring. This is not meant as an argument against the renaming, but this detail needs to be stated as a sideremark in the documentation of the AffineScheme and AffineSchemeMorphism.

@simonbrandhorst
Copy link
Collaborator

simonbrandhorst commented Feb 23, 2024

@benlorenz @paemurru is working on a PR about this right now and running the test. Could we please backport that?
It is a rather big change of the interface that I would like to have in 1.0.
Edit: Hopefully the PR will be ready today.

@micjoswig
Copy link
Member

Could we please backport that? It is a rather big change of the interface that I would like to have in 1.0. Edit: Hopefully the PR will be ready today.

What's the impact on the book?

@fieker

@benlorenz
Copy link
Member

@benlorenz @paemurru is working on a PR about this right now and running the test. Could we please backport that? It is a rather big change of the interface that I would like to have in 1.0. Edit: Hopefully the PR will be ready today.

I will continue with the rc as planned for today, and we can decide later (maybe in the meeting today) if we can still merge this after the release candidate. (depending on the impact and further testing)

@wdecker
Copy link
Collaborator

wdecker commented Feb 23, 2024 via email

@simonbrandhorst
Copy link
Collaborator

simonbrandhorst commented Feb 23, 2024

Running a git grep -r "Spec" on the book I do not see any reference to Spec in the code. Thus my expectation is that there is no/little impact.

@paemurru
Copy link
Contributor Author

@wdecker Yes, I am distinguishing between types and user-facing constructors. The types will be in CamelCase and the functions in snake_case.

The type Spec becomes AffineScheme. I am doing this change by hand because Spec is also used as an abbreviation for Spectrum in comments and strings. The type ProjectiveScheme stays how it is.

@wdecker By recommendation of @simonbrandhorst, I am renaming SpecOpen to AffineSchemeOpenSubscheme. It should now be clear from the type name what this type is for.

Apart from Spec, the other types and functions are easy to change. The list is below. The script is a modified version of the one from The Big Renaming.

Most of the changes below are either comments, types or internal functions that contain the type previously called Spec, now called AffineScheme. There are many local functions that are not exported but for consistency I change them also. Some changes are type names in comments containing a plural form.

#!/bin/sh
#

# some settings that avoid weirdness in sed when it tries to
# adapt to your locale (e.g. if your system uses German as system language)
export LANG=C
export LC_CTYPE=C
export LC_ALL=C

# Files to modify (default uses all files known to git,
# but obviously you can modify it)
FILES=$(git ls-files)

# on macOS, you may need to change the following
SED_I="sed -i"
#SED_I="gsed -i"
#SED_I="sed -i ''"

# Spec to AffineScheme
$SED_I \
-e "s;\bAbsSpec\b;AbsAffineScheme;g" \
-e "s;\bSpecMor\b;AffineSchemeMor;g" \
-e "s;\bAbsSpecMor\b;AbsAffineSchemeMor;g" \
-e "s;\bSimplifiedSpec\b;SimplifiedAffineScheme;g" \
-e "s;\bSpecOpen\b;AffineSchemeOpenSubscheme;g" \
-e "s;\bSpecOpenMor\b;AffineSchemeOpenSubschemeMor;g" \
-e "s;\bSpecOpenRing\b;AffineSchemeOpenSubschemeRing;g" \
-e "s;\bSpecOpenRingElem\b;AffineSchemeOpenSubschemeRingElem;g" \
-e "s;\bSpecSubset\b;AffineSchemeSubset;g" \
-e "s;\bStdSpec\b;StdAffineScheme;g" \
-e "s;\bSpecType\b;AffineSchemeType;g" \
-e "s;\bSpecOpenType\b;AffineSchemeOpenSubschemeType;g" \
-e "s;\bLeftSpecType\b;LeftAffineSchemeType;g" \
-e "s;\bRightSpecType\b;RightAffineSchemeType;g" \
-e "s;\bSpecOpenRingType\b;AffineSchemeOpenSubschemeRingType;g" \
-e "s;\bSpecMorType\b;AffineSchemeMorType;g" \
-e "s;\bSpecType1\b;AffineSchemeType1;g" \
-e "s;\bSpecType2\b;AffineSchemeType2;g" \
-e "s;\bMySpec\b;MyAffineScheme;g" \
-e "s;\bMySpecMor\b;MyAffineSchemeMor;g" \
-e "s;\bSpecOpen_1\b;AffineSchemeOpenSubscheme1;g" \
-e "s;\bSpecOpen_2\b;AffineSchemeOpenSubscheme2;g" \
-e "s;\bSpecOpen_3\b;AffineSchemeOpenSubscheme3;g" \
-e "s;\bSpecOpen_4\b;AffineSchemeOpenSubscheme4;g" \
-e "s;\bSpecL\b;AffineSchemeL;g" \
-e "s;\bSpecs\b;AffineSchemes;g" \
-e "s;\bSpecOpens\b;AffineSchemeOpenSubschemes;g" \
-e "s;\bSpecOpenRings\b;AffineSchemeOpenSubschemeRings;g" \
-e "s;\bSpecOpenMors\b;AffineSchemeOpenSubschemeMors;g" \
-e "s;\bSpecMors\b;AffineSchemeMors;g" \
-e "s;\bAbsSpecs\b;AbsAffineSchemes;g" \
-e "s;\b_is_open_func_for_schemes_without_specopen\b;_is_open_func_for_schemes_without_affine_scheme_open_subscheme;g" \
-e "s;\bspec_open_ring_type\b;affine_scheme_open_subscheme_ring_type;g" \
$FILES

@HereAround
Copy link
Member

HereAround commented Feb 23, 2024

Sorry for the late notice (relative to the OSCAR book/version 1.0). I just realized that there might be one more place to adjust/consider for the renaming (unless already done):

https://docs.oscar-system.org/dev/AlgebraicGeometry/ToricVarieties/NormalToricVarieties/#proj-Tuple%7BVararg%7BToricLineBundle%7D%7D

@micjoswig
Copy link
Member

Sorry for the late notice (relative to the OSCAR book/version 1.0). I just realized that there might be one more place to adjust/consider for the renaming (unless already done):

https://docs.oscar-system.org/dev/AlgebraicGeometry/ToricVarieties/NormalToricVarieties/#proj-Tuple%7BVararg%7BToricLineBundle%7D%7D

Should the toric guy be renamed to projectivization then?

@lkastner

@HereAround
Copy link
Member

I just briefly checked with @wdecker - Wolfram and I would both be happy with projectivization.

@lgoettgens lgoettgens changed the title Renaming ProjectiveScheme to Proj Renaming Spec to AffineScheme Feb 23, 2024
@paemurru paemurru changed the title Renaming Spec to AffineScheme Rename Spec to AffineScheme Feb 23, 2024
@benlorenz benlorenz mentioned this issue Feb 26, 2024
31 tasks
simonbrandhorst added a commit that referenced this issue Feb 26, 2024
* 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>
benlorenz pushed a commit that referenced this issue Feb 26, 2024
* 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)
benlorenz added a commit that referenced this issue Feb 29, 2024
- 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

9 participants