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

Some serialization of schemes #4110

Draft
wants to merge 20 commits into
base: master
Choose a base branch
from

Conversation

HechtiDerLachs
Copy link
Collaborator

Intermediate state of the art of our joint effort with @antonydellavecchia this week.

Copy link

codecov bot commented Sep 18, 2024

Codecov Report

Attention: Patch coverage is 95.55556% with 10 lines in your changes missing coverage. Please review.

Project coverage is 84.71%. Comparing base (9575e9a) to head (7ac8e7d).

Files with missing lines Patch % Lines
...metry/Schemes/PrincipalOpenSubset/Objects/Types.jl 30.00% 7 Missing ⚠️
src/Serialization/MPolyMap.jl 66.66% 2 Missing ⚠️
...braicGeometry/Schemes/Gluing/LazyGluing/Methods.jl 80.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #4110      +/-   ##
==========================================
+ Coverage   84.67%   84.71%   +0.03%     
==========================================
  Files         626      627       +1     
  Lines       83980    84176     +196     
==========================================
+ Hits        71108    71306     +198     
+ Misses      12872    12870       -2     
Files with missing lines Coverage Δ
experimental/Schemes/src/Auxiliary.jl 94.20% <100.00%> (ø)
...perimental/Schemes/src/CoveredProjectiveSchemes.jl 88.30% <100.00%> (ø)
...y/Schemes/CoveredSchemes/Morphisms/Constructors.jl 95.45% <100.00%> (ø)
...Geometry/Schemes/CoveredSchemes/Objects/Methods.jl 94.70% <100.00%> (ø)
...raicGeometry/Schemes/Covering/Morphisms/Methods.jl 98.64% <100.00%> (ø)
...ebraicGeometry/Schemes/Covering/Objects/Methods.jl 81.19% <100.00%> (+0.08%) ⬆️
...gebraicGeometry/Schemes/Gluing/LazyGluing/Types.jl 100.00% <100.00%> (ø)
src/AlgebraicGeometry/Schemes/Gluing/Methods.jl 95.52% <100.00%> (ø)
.../AlgebraicGeometry/Schemes/Sheaves/IdealSheaves.jl 80.49% <100.00%> (ø)
...Geometry/ToricVarieties/ToricSchemes/attributes.jl 67.39% <100.00%> (ø)
... and 6 more

Comment on lines 36 to 41
@check begin
d = prod(length(f) > 0 ? f : one(OO(X)))
U = spec(R)
U == hypersurface_complement(X, d)
end
return new{base_ring_type(X), ring_type(U), typeof(X)}(X, U, lifted_numerator.(f))
Copy link
Collaborator

@simonbrandhorst simonbrandhorst Sep 19, 2024

Choose a reason for hiding this comment

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

this looks fishy to me. U is not defined if check=false

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

You're right. I'll look into this.

Comment on lines 30 to 48
@testset "parallel smoothness test for schemes" begin
channels = Oscar.params_channels(Union{AffineScheme, Ring})

IP2 = projective_space(QQ, [:x, :y, :z])
S = homogeneous_coordinate_ring(IP2)
(x, y, z) = gens(S)

I = ideal(S, y^2*z + x^3 + x^2*z)

X, _ = sub(IP2, I)
X_cov = covered_scheme(X)
U = affine_charts(X_cov)
for a in U
Oscar.put_params(channels, ambient_coordinate_ring(a))
Oscar.put_params(channels, OO(a))
end
results = pmap(is_smooth, U)
@test results == [1, 1, 0]
end
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@afkafkafk13
Copy link
Collaborator

Can we merge #4121 first and then get a better view on what's going on here? It seems that this is built on top of the other.

@HechtiDerLachs
Copy link
Collaborator Author

@antonydellavecchia : I did another implementation which broadcasts all rings to all workers using put_params. That seems to work. With the new smoothness test implementation we verify smoothness of @wdecker's surface in roughly 35 seconds on my machine with three workers.

Comment on lines +1 to +8
@testset "_is_smooth" begin
R, (x, y, z) = QQ[:x, :y, :z]

I1 = ideal(R, x*y)
IA3 = spec(R)
X1, _ = sub(IA3, I1)
@test !Oscar._is_smooth(X1)
@test !Oscar._is_smooth(X1; jacobian_cut_off=0)
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@afkafkafk13 : I think I have now implemented a truly generic smoothness test here which can also handle non-reduced, non-equidimensional, and non-connected cases. I'm still a bit skeptic, since all the classical implementations seem to solve this via some primary/equidimensional decomposition which I seem to be able to fully avoid. If you have the time: Could you have a look and tell me what you think? Maybe you have some further exotic example in mind for which my implementation fails. If so, it would be good to know about it.

@HechtiDerLachs
Copy link
Collaborator Author

HechtiDerLachs commented Sep 27, 2024

ping @danteluber : Check out this PR and try the following.

using Distributed
process_ids = addprocs(4)
@everywhere using Oscar

That starts the workers. Then you can do

Oscar._is_smooth_parallel(realization_space(fano_matroid(); ground_ring=QQ))

Replace fano_matroid() by anything more fancy which you want to tackle.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants