-
Notifications
You must be signed in to change notification settings - Fork 120
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
document and clean up algebraic cycles #4137
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. Thank you for cleaning this up!
For now the mathematical description of the functions is spelled out in the documentation. We should, however, go through the literature and eventually adjust the notions and/or give references on the next appropriate occasion.
See [`trivializing_covering(C::EffectiveCartierDivisor)`](@ref) for how to | ||
The scheme $X$ is of type `CoveredSchemeType`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This sentence seems to have been cut off.
I "fixed" the tests by coherently passing on the |
Thank you. |
temp_dict=IdDict{AbsAffineScheme,Ideal}() | ||
temp_dict[U] = comp | ||
I_sheaf_temp = IdealSheaf(X, extend!(cov, temp_dict), check=false) | ||
I_sheaf_temp = PrimeIdealSheafFromChart(X, U, comp, check=false) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a non-trivial change.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have some doubts about this function irreducible_decomposition(::EffectiveCartierDivisor)
.
It seems to assume that this Cartier divisor is a Weyl divisor. Do we need to assume the ambient scheme
Also I wonder if we could return a Weyl divisor here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a non-trivial change.
This function was written long before we had PrimeIdealSheafFromChart
. The change makes sense.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also I wonder if we could return a Weyl divisor here.
Would make sense.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are several calls to the now deprecated in_linear_system
in /test/AlgebraicGeometry/Schemes/WeilDivisor.jl
which now need the extra is_
:
Oscar.jl/test/AlgebraicGeometry/Schemes/WeilDivisor.jl
Lines 126 to 130 in c35f32a
@test in_linear_system(KK(x[1]), D) | |
@test !in_linear_system(KK(x[1]^2), D) | |
@test in_linear_system(KK(x[1]^2), 2*D) | |
# Not running at the moment; work in progress | |
#@test !in_linear_system(KK(x[1], x[2]), D) |
(and further down as well)
@simonbrandhorst : Looks like we messed up our book tests again. Do you have an idea why? |
…s, move some stuff
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I leave you a few nitpicks -- mostly on the docstrings.
Return the `AlgebraicCycle` ``D = colength(I) ⋅ V(I)`` with coefficients | ||
in ``R`` for an equidimensional sheaf of ideals ``I``. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The colength(I)
here is confusing at first glance. Can you clarify by giving an appropriate example (doctest)?
D[I] = one(R) | ||
return D | ||
end | ||
|
||
@doc raw""" | ||
algebraic_cycle(I::AbsIdealSheaf, R::Ring) -> AlgebraicCycle | ||
Return the `AlgebraicCycle` ``D = 1 ⋅ V(I)`` with coefficients | ||
in ``R`` for a sheaf of prime ideals ``I``. | ||
Return the `AlgebraicCycle` defined by the equidimensional ideal sheaf `I`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This function is an alias for the other one, so it should be documented in the same way.
temp_dict=IdDict{AbsAffineScheme,Ideal}() | ||
temp_dict[U] = comp | ||
I_sheaf_temp = IdealSheaf(X, extend!(cov, temp_dict), check=false) | ||
I_sheaf_temp = PrimeIdealSheafFromChart(X, U, comp, check=false) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a non-trivial change.
This function was written long before we had PrimeIdealSheafFromChart
. The change makes sense.
temp_dict=IdDict{AbsAffineScheme,Ideal}() | ||
temp_dict[U] = comp | ||
I_sheaf_temp = IdealSheaf(X, extend!(cov, temp_dict), check=false) | ||
I_sheaf_temp = PrimeIdealSheafFromChart(X, U, comp, check=false) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also I wonder if we could return a Weyl divisor here.
Would make sense.
for D in keys(coefficients) | ||
is_equidimensional(D) || error("components of a divisor must be sheaves of equidimensional ideals") | ||
(is_equidimensional(D) && dim(D) == d) || error("components of a cycle must be sheaves of equidimensional ideals") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You want to state "equidimensional of the same dimension" to stay consistent with the beginning of the line.
@doc raw""" | ||
EffectiveCartierDivisor{CoveredSchemeType<:AbsCoveredScheme} | ||
An effective Cartier divisor on a scheme $X$ is a closed subscheme $D \subseteq S$ whose ideal sheaf $\mathcal{I}_D \subseteq \mathcal{O}_S$ is an invertible $\mathcal{O}_S$-module. In particular, $\mathcal{I}_D$ is locally principal. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did something go wrong with X and S here?
decomp = irreducible_decomposition(underlying_cycle(D)) | ||
return WeilDivisor(decomp, check=false) | ||
E = irreducible_decomposition(underlying_cycle(D)) | ||
return WeilDivisor(E; check=false) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do you change the name of the variable? If irreducible_decomposition would return a divisor, I would agree with E here. But it is a list and therefore I personally find E misleading.
@attr Bool function has_dimension_leq_zero(I::Ideal) | ||
is_one(I) && return true | ||
return dim(I) <= 0 | ||
end | ||
|
||
@attr Bool function has_dimension_leq_zero(I::MPolyLocalizedIdeal) | ||
R = base_ring(I) | ||
P = base_ring(R)::MPolyRing | ||
J = ideal(P, numerator.(gens(I))) | ||
has_dimension_leq_zero(J) && return true | ||
is_one(I) && return true | ||
return dim(I) <= 0 | ||
end | ||
|
||
@attr Bool function has_dimension_leq_zero(I::MPolyQuoLocalizedIdeal) | ||
R = base_ring(I) | ||
P = base_ring(R)::MPolyRing | ||
J = ideal(P, lifted_numerator.(gens(I))) | ||
has_dimension_leq_zero(J) && return true | ||
is_one(I) && return true | ||
return dim(I) <= 0 | ||
end |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A priori these functions do not have anything to do with IdealSheaves, they should rather find a place in src/Rings.
No description provided.