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

Durham preliminary cleanup #4345

Open
wants to merge 42 commits into
base: master
Choose a base branch
from

Conversation

HechtiDerLachs
Copy link
Collaborator

This is a preliminary wrap-up of the things achieved in Durham. I would still like to keep the old branch #4314 since this is the one we started working on together and we would like to continue, eventually. In the meantime, I would like to get some changes in already so that this is not unnecessarily postponed.

HechtiDerLachs and others added 30 commits November 14, 2024 13:21
Add functionality for canonical divisor.
self intersection via adjunction
@@ -454,7 +454,31 @@ Return a cycle ``E`` equal to ``D`` but as a formal sum ``E = ∑ₖ aₖ ⋅ I
where the `components` ``Iₖ`` of ``E`` are all sheaves of prime ideals.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Do we want to require that the I_k are all distinct? I would say yes.
The new code assures this, but does not because we work with IdDicts:

julia> P2 = projective_space(QQ,2);

julia> (s1,s2,s3) = homogeneous_coordinates(P2);

julia> J = ideal([s1]);

julia> J1 = ideal_sheaf(P2,J);

julia> J2 = ideal_sheaf(P2,J);

julia> D1 = algebraic_cycle(J1)
Effective algebraic cycle
  on scheme over QQ covered with 3 patches
with coefficients in integer ring
given as the formal sum of
  1 * sheaf of ideals

julia> D2 = algebraic_cycle(J2)
Effective algebraic cycle
  on scheme over QQ covered with 3 patches
with coefficients in integer ring
given as the formal sum of
  1 * sheaf of ideals

julia> D1 == D2
true

julia> irreducible_decomposition(D1+D2)
Effective algebraic cycle
  on scheme over QQ covered with 3 patches
with coefficients in integer ring
given as the formal sum of
  1 * sheaf of prime ideals
  1 * sheaf of prime ideals

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Thanks for the catch. Indeed this is not the intended behaviour.

@@ -534,6 +558,25 @@ function integral(W::AbsAlgebraicCycle; check::Bool=true)
return result
end

# Getters for the components as honest algebraic cycles, not ideal sheaves.
function components(::Type{T}, D::AbsAlgebraicCycle) where {T <: AbsAlgebraicCycle}
Copy link
Collaborator

Choose a reason for hiding this comment

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

It seems to me the signature is lying a bit, since we do not get back an object of type T.
But for usability reasons I can live with it. How do other parts of Oscar handle this?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I think, this is the only feasible way. It should be legitimate to specify a non-concrete type as input for the first argument. Maybe we can add some type assertion?

Comment on lines +690 to +695
# If this component was already seen in another patch, skip it.
new_comp = PrimeIdealSheafFromChart(X, U, P)
@vprint :Divisors 4 " $(any(new_comp == PP for PP in keys(ideal_dict)) ? "already found" : "new component")\n"
any(new_comp == PP for PP in keys(ideal_dict)) && continue
c = _colength_in_localization(num_ideal, P)
@vprint :Divisors 4 " multiplicity $c\n"
Copy link
Collaborator

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 we could use the decomposition info here?

Copy link
Collaborator Author

@HechtiDerLachs HechtiDerLachs Nov 25, 2024

Choose a reason for hiding this comment

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

We can. I added a preliminary version of how to use this.

Comment on lines 730 to 732
Given an `AbsWeilDivisor` `D` on a scheme `X`, create a principal divisor
`div(f)` for some rational function, so that `D - div(f)` is supported
away from the original support of `D`.
Copy link
Collaborator

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 this may be impossible to achieve? |D| may have a base locus (even with a divisorial part)

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I agree that "away" is a bit ambiguous here. What I had in mind were non-closed scheme-theoretic points which would then be different.


function is_zero(D::AbsAlgebraicCycle)
all(is_zero(c) || is_one(I) for (I, c) in coefficient_dict(D)) && return true
return all(is_zero(c) || is_one(I) for (I, c) in coefficient_dict(irreducible_decomposition(D))) && return true
Copy link
Collaborator

Choose a reason for hiding this comment

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

Given my comment about the irreducible decomposition above this will lead to bugs.
But the fallback zero(D) == D works already. So what is the benefit here?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

For some reason which I don't recall in detail, this did not work in an example we tried. Either way, this gives a shortcut which is potentially cheaper than comparing with the zero cycle.

else
result = result + a*AlgebraicCycle(X, R,
IdDict{AbsIdealSheaf, elem_type(R)}(
[P + ideal_sheaf(E)=>one(R)]); check=false)
Copy link
Collaborator

Choose a reason for hiding this comment

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

One because the computation is kind of lazy?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

No. One because it is really only the component we want to have. The coefficient a is multiplied up front.

Copy link
Collaborator

Choose a reason for hiding this comment

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

What if the intersection is not transversal?

@HechtiDerLachs
Copy link
Collaborator Author

Tests are failing, but I do not see why. Are any of these failures known?

@benlorenz benlorenz closed this Nov 26, 2024
@benlorenz benlorenz reopened this Nov 26, 2024
Copy link

codecov bot commented Nov 26, 2024

Codecov Report

Attention: Patch coverage is 81.52174% with 34 lines in your changes missing coverage. Please review.

Project coverage is 84.49%. Comparing base (3e670f7) to head (17048b3).
Report is 3 commits behind head on master.

Files with missing lines Patch % Lines
.../AlgebraicGeometry/Schemes/Divisors/WeilDivisor.jl 90.07% 13 Missing ⚠️
...ebraicGeometry/Schemes/Divisors/AlgebraicCycles.jl 69.23% 12 Missing ⚠️
experimental/Schemes/src/Auxiliary.jl 0.00% 4 Missing ⚠️
...gebraicGeometry/Schemes/Divisors/CartierDivisor.jl 33.33% 2 Missing ⚠️
.../AlgebraicGeometry/Schemes/Sheaves/IdealSheaves.jl 60.00% 2 Missing ⚠️
...icGeometry/Schemes/FunctionField/FunctionFields.jl 50.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #4345      +/-   ##
==========================================
- Coverage   84.52%   84.49%   -0.03%     
==========================================
  Files         645      646       +1     
  Lines       85706    86027     +321     
==========================================
+ Hits        72440    72691     +251     
- Misses      13266    13336      +70     
Files with missing lines Coverage Δ
...icGeometry/Schemes/FunctionField/FunctionFields.jl 76.67% <50.00%> (-0.22%) ⬇️
...gebraicGeometry/Schemes/Divisors/CartierDivisor.jl 63.77% <33.33%> (-0.49%) ⬇️
.../AlgebraicGeometry/Schemes/Sheaves/IdealSheaves.jl 80.32% <60.00%> (-0.10%) ⬇️
experimental/Schemes/src/Auxiliary.jl 94.57% <0.00%> (+0.36%) ⬆️
...ebraicGeometry/Schemes/Divisors/AlgebraicCycles.jl 76.10% <69.23%> (+1.10%) ⬆️
.../AlgebraicGeometry/Schemes/Divisors/WeilDivisor.jl 77.92% <90.07%> (+4.94%) ⬆️

... and 11 files with indirect coverage changes

@thofma
Copy link
Collaborator

thofma commented Nov 26, 2024

you are using deprecated functions

@@ -455,32 +455,12 @@ where the `components` ``Iₖ`` of ``E`` are all sheaves of prime ideals.
"""
Copy link
Collaborator

Choose a reason for hiding this comment

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

Please adapt the docstring accordingly:

where the components Iₖ of E are pairwise distinct sheaves of prime ideals.

Comment on lines 735 to 737
Given an `AbsWeilDivisor` `D` on a scheme `X`, create a principal divisor
`div(f)` for some rational function, so that `D - div(f)` is supported
away from the original support of `D`.
in (non-closed) scheme-theoretic points which are different from those of `D`.
Copy link
Collaborator

@simonbrandhorst simonbrandhorst Nov 26, 2024

Choose a reason for hiding this comment

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

I still do not understand. The quantors are missing. Are the supports disjoint? Or just not equal or ...?

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