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

Add dummy hash for AbsIdealSheaf #4366

Merged
merged 2 commits into from
Dec 2, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions src/AlgebraicGeometry/Schemes/Sheaves/IdealSheaves.jl
Original file line number Diff line number Diff line change
Expand Up @@ -587,6 +587,11 @@
return true
end

function Base.hash(I::AbsIdealSheaf, h::UInt)
h = hash(scheme(I), h)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Just to be sure: You deliberately choose the hash-value of the scheme on which I is defined?

Copy link
Member Author

Choose a reason for hiding this comment

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

This was the suggestion of @HechtiDerLachs. I assumed that this is some property that all == AbsIdealSheaves have in common

Copy link
Collaborator

Choose a reason for hiding this comment

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

Indeed, if you were looking precisely for something that == AbsIdealSheaves have in common (and usually many more..), this is certainly the case. So the choice makes sense.

return h

Check warning on line 592 in src/AlgebraicGeometry/Schemes/Sheaves/IdealSheaves.jl

View check run for this annotation

Codecov / codecov/patch

src/AlgebraicGeometry/Schemes/Sheaves/IdealSheaves.jl#L590-L592

Added lines #L590 - L592 were not covered by tests
lgoettgens marked this conversation as resolved.
Show resolved Hide resolved
end

function is_subset(I::AbsIdealSheaf, J::AbsIdealSheaf)
X = space(I)
X === space(J) || return false
Expand Down
Loading