Skip to content

Commit

Permalink
Elliptic fibrations and pushforward of Weil Divisors (#3609)
Browse files Browse the repository at this point in the history
* Reroute computation of dimensions for localized ideals at rational points.

* Add some type stability.

* Avoid expensive is_subset computation.

* Customize kernel computations.

* Work on pushforward of divisors
* Remove deprecated simplify method for ideal sheaves.

* Rework the fibration projections.

* Rework simplify_light for powers of elements and move types to an extra file.

* Switch to use of simplify_light for hypersurface complements.

* Some cleanup.

* Deprecate morphism_of_projective_schemes.

* Add some hasserts.

* Introduce keyword for small_generating_set.

---------

Co-authored-by: Simon Brandhorst <[email protected]>
Co-authored-by: Johannes Schmitt <[email protected]>
  • Loading branch information
3 people authored Apr 17, 2024
1 parent 0c9ef3a commit 183cbe6
Show file tree
Hide file tree
Showing 50 changed files with 2,253 additions and 824 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ out.

## Constructors
```@docs
morphism_of_projective_schemes(P::AbsProjectiveScheme, Q::AbsProjectiveScheme, f::Map; check::Bool=true )
morphism_of_projective_schemes(P::AbsProjectiveScheme, Q::AbsProjectiveScheme, f::Map, h::SchemeMor; check::Bool=true )
morphism_of_projective_schemes(X::AbsProjectiveScheme, Y::AbsProjectiveScheme, a::Vector{<:RingElem})
morphism(P::AbsProjectiveScheme, Q::AbsProjectiveScheme, f::Map; check::Bool=true )
morphism(P::AbsProjectiveScheme, Q::AbsProjectiveScheme, f::Map, h::SchemeMor; check::Bool=true )
morphism(X::AbsProjectiveScheme, Y::AbsProjectiveScheme, a::Vector{<:RingElem})
```
## Attributes
As every instance of `Map`, a morphism of projective schemes can be asked for its (co-)domain:
Expand All @@ -41,6 +41,6 @@ Moreover, we provide getters for the associated morphisms of rings:
```
## Methods
```@docs
covered_scheme_morphism(f::ProjectiveSchemeMor)
covered_scheme_morphism(f::AbsProjectiveSchemeMorphism)
```

2 changes: 1 addition & 1 deletion docs/src/CommutativeAlgebra/affine_algebras.md
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,7 @@ the type of both `R` and `S` is a subtype of `Union{MPolyRing{T}, MPolyQuoRing{
### Data Associated to Homomorphisms of Affine Algebras

```@docs
preimage(F::AffAlgHom, I::MPolyIdeal)
preimage(F::MPolyAnyMap, I::Ideal)
kernel(F::AffAlgHom)
```

Expand Down
1 change: 0 additions & 1 deletion experimental/Experimental.jl
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ for pkg in exppkgs
include(joinpath(expdir, pkg, "src", "$pkg.jl"))
end


# Force some structure for `oldexppkgs`
for pkg in oldexppkgs
if !isfile(joinpath(expdir, pkg, "$pkg.jl"))
Expand Down
10 changes: 5 additions & 5 deletions experimental/Schemes/CoveredProjectiveSchemes.jl
Original file line number Diff line number Diff line change
Expand Up @@ -144,8 +144,8 @@ mutable struct ProjectiveGluing{
(fb, gb) = gluing_morphisms(G)
(PX, QY) = (codomain(incP), codomain(incQ))
(PU, QV) = (domain(incP), domain(incQ))
(base_scheme(PX) == X && base_scheme(QY) == Y) || error("base gluing is incompatible with the projective schemes")
domain(f) == codomain(g) == PU && domain(g) == codomain(f) == QV || error("maps are not compatible")
(base_scheme(PX) === X && base_scheme(QY) === Y) || error("base gluing is incompatible with the projective schemes")
domain(f) === codomain(g) === PU && domain(g) === codomain(f) === QV || error("maps are not compatible")
SPU = homogeneous_coordinate_ring(domain(f))
SQV = homogeneous_coordinate_ring(codomain(f))
@check begin
Expand Down Expand Up @@ -290,10 +290,10 @@ function Base.show(io::IO, ::MIME"text/plain", CPS::CoveredProjectiveScheme)
print(io, Dedent(), "covered with ", ItemQuantity(n, "projective patch"))
print(io, Indent())
l = ndigits(n)
for i in 1:n
for (i, ppp) in enumerate(pp)
li = ndigits(i)
println(io)
print(io, " "^(l-li)*"$(i): ", Lowercase(), CPS[patches(base_covering(CPS))[i]])
print(io, " "^(l-li)*"$(i): ", Lowercase(), ppp)
end
print(io, Dedent())
end
Expand Down Expand Up @@ -1000,7 +1000,7 @@ end
covered_scheme(P)
end
covering_pr = get_attribute(P, :covering_projection_to_base)::CoveringMorphism
return CoveredSchemeMorphism(covered_scheme(P), base_scheme(P), covering_pr)
return CoveredSchemeMorphism(covered_scheme(P), base_scheme(P), covering_pr; check=false)
end


Expand Down
2 changes: 1 addition & 1 deletion experimental/Schemes/CoveredScheme.jl
Original file line number Diff line number Diff line change
Expand Up @@ -507,7 +507,7 @@ _compose_along_path(X::CoveredScheme, p::Vector{Int}) = _compose_along_path(X, [
MorphismType<:ClosedEmbedding,
BaseMorType
}
ff = CoveredSchemeMorphism(X, Y, f)
ff = CoveredSchemeMorphism(X, Y, f; check)
if has_decomposition_info(codomain(f))
for U in patches(domain(f))
floc = f[U]
Expand Down
11 changes: 9 additions & 2 deletions experimental/Schemes/FunctionFields.jl
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,11 @@ represented by
patch 1: 1
```
"""
@attr VarietyFunctionField function_field(X::AbsCoveredScheme) = VarietyFunctionField(X)
function function_field(X::AbsCoveredScheme; check::Bool=true)
return get_attribute!(X, :function_field) do
VarietyFunctionField(X, check=check)
end
end

########################################################################
# Methods for VarietyFunctionFieldElem #
Expand Down Expand Up @@ -272,13 +276,16 @@ function move_representative(
iszero(pbb) && error("pullback of denominator is zero")
# in the next line, A is either a AffineSchemeOpenSubscheme or a PrincipalOpenSubset
h_generic = generic_fraction(pba, A)//generic_fraction(pbb, A)
return h_generic

# It turned out that the following is too expensive in general
if domain(f) isa PrincipalOpenSubset
fac = factor(lifted_numerator(complement_equation(domain(f))))
p = OO(U)(numerator(h_generic))
q = OO(U)(denominator(h_generic))
for (a, e) in fac
aa = OO(U)(a)
k_num, _ = _minimal_power_such_that(aa, x->divides(p, x)[1])
k_num, _ = _minimal_power_such_that(aa, x->divides(p, x)[1]) # This division takes ages for big polynomials.
k_den, _ = _minimal_power_such_that(aa, x->divides(q, x)[1])
k = minimum([k_num, k_den])
aa = aa^k
Expand Down
Loading

0 comments on commit 183cbe6

Please sign in to comment.