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

Tweak vector_space(K, polynomials) a bit more #3727

Merged
merged 3 commits into from
May 17, 2024

Conversation

joschmitt
Copy link
Member

As discussed in #3717 (comment). Let's see whether something breaks. I have the impression this function is only called at one place in the code base.

@joschmitt joschmitt marked this pull request as draft May 14, 2024 15:09
@joschmitt joschmitt marked this pull request as ready for review May 14, 2024 19:22
@joschmitt joschmitt requested a review from fingolfin May 14, 2024 20:11
Copy link
Member

@fingolfin fingolfin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fine by me :-)

@fingolfin fingolfin requested a review from fieker May 14, 2024 22:06
@fingolfin
Copy link
Member

@fieker is this OK with you (you wrote the function originally I think)

Copy link

codecov bot commented May 15, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 81.37%. Comparing base (93a0292) to head (b14072d).
Report is 3 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #3727      +/-   ##
==========================================
+ Coverage   81.35%   81.37%   +0.01%     
==========================================
  Files         577      579       +2     
  Lines       78651    78750      +99     
==========================================
+ Hits        63990    64084      +94     
- Misses      14661    14666       +5     
Files Coverage Δ
src/Rings/mpoly-graded.jl 89.23% <100.00%> (-2.14%) ⬇️

... and 16 files with indirect coverage changes

@joschmitt joschmitt removed the triage label May 15, 2024
Return a `K`-vector space `V` and an epimorphism from `V` onto the `K`-vector
Return a `K`-vector space `V` and an isomorphism from `V` to the `K`-vector
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Caution: You should not change the (user-visible) behaviour of vector_space(Field, Polys) without looking at the other functions vector_space(Field, something), like vector_space(Field, MPolyQuoLocRing).
This needs to be consistent in behaviour!!! You are only tweaking one function here.

The main application is to pass from a zero-dimensional quotient ring R/I or slice of a graded ring R_d, which of course happens to carry the structure of a finite dimensional vector space, to an object of type vector space by using a monomial basis of the vector space. However, if this family of functions is provided to the user, it must be consistent in all instances.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P.S.: I am not against the change per se.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm sorry, but I don't understand what should change here.
This is editing the doc string of the function vector_space(::Field, ::Vector{<:MPolyRingElem}). The other vector_space functions that seem related are:

vector_space(K::Field, Q::MPolyQuoRing)
vector_space(kk::Field, W::Oscar.MPolyQuoLocRing{<:Field, <:FieldElem, <:MPolyRing, <:MPolyRingElem, <:Oscar.MPolyComplementOfKPointIdeal}; ordering) 
vector_space(kk::Field, W::Oscar.MPolyQuoLocRing; ordering)

Neither of them is documented. Looking at the implementation, I assume that all of them return an isomorphic vector space and not just one that maps surjectively onto the quotient ring. If this assumption is correct, then this pull request will actually increase consistency.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, I abused "changes requested" to buy the time for checking myself that everything is consistent. I should have sent an e-mail instead.
I am now convinced that this does not break anything and does not cause anything inconsistent.

Return a `K`-vector space `V` and an epimorphism from `V` onto the `K`-vector
Return a `K`-vector space `V` and an isomorphism from `V` to the `K`-vector
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, I abused "changes requested" to buy the time for checking myself that everything is consistent. I should have sent an e-mail instead.
I am now convinced that this does not break anything and does not cause anything inconsistent.

@joschmitt joschmitt merged commit 46fcbba into oscar-system:master May 17, 2024
29 checks passed
@joschmitt
Copy link
Member Author

It seems I levelled up and gained the power to merge to master :)

@joschmitt joschmitt deleted the js/vectorspace branch May 17, 2024 14:43
@joschmitt joschmitt added the backport 1.0.x Should be backported to the release 1.0 branch label May 24, 2024
@joschmitt
Copy link
Member Author

Backport requires #3717.

benlorenz pushed a commit that referenced this pull request May 27, 2024
Adjust output dimension in `vector_space(field, polynomials)`

(cherry picked from commit 46fcbba)
@benlorenz benlorenz mentioned this pull request May 27, 2024
19 tasks
benlorenz added a commit that referenced this pull request May 27, 2024
followup to the backport of #3717 and #3727
to adjust the printing to the old style on the release branch
@benlorenz benlorenz removed the backport 1.0.x Should be backported to the release 1.0 branch label May 30, 2024
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 this pull request may close these issues.

4 participants