diff --git a/experimental/IntersectionTheory/docs/src/BottFormulas.md b/experimental/IntersectionTheory/docs/src/BottFormulas.md index 4cde59d2c1d9..9222326f06ee 100644 --- a/experimental/IntersectionTheory/docs/src/BottFormulas.md +++ b/experimental/IntersectionTheory/docs/src/BottFormulas.md @@ -3,9 +3,48 @@ CurrentModule = Oscar DocTestSetup = Oscar.doctestsetup() ``` -# Bott's Formula +# Localization and Bott's Formula -## Abstract Varieties With a Torus Action +Recall that our focus in this chapter is on abstract intersection theory: We discuss computations which manipulate collections of data +referred to as abstract varieties, and we interprete the results as applying to all (smooth projective complex) varieties sharing the data. +The tools presented in this section allow for more efficient computations in the case of varieties with a (split) torus action whose +fixed point set is finite. They are based on localization and a version of Bott's formula which is formulated in the language of +equivariant intersection theory. See [Dan14](@cite) and the references cited there. + +Using Bott's formula in enumerative geometry goes back to [ES02](@cite). We quote from that paper: + +> Many parameter spaces carry natural actions of algebraic tori, in particular those coming from projective enumerative problems. In 1967, Bott gave a residue formula that allows one to express the degree of certain zero-cycles on a smooth complete variety with an action of an algebraic torus in terms of local contributions supported on the components of the fixpoint set. These components tend to have much simpler structure than the whole space; indeed, in many interesting cases, including all the examples of the present paper, the fixpoints are actually isolated. + +We represent an *abstract variety with a torus action* by specifying its dimension together with the fixed points of the action and, possibly, further data. + +!!! note + In order to work with a version of Bott's formula for orbifolds, it is allowed to specify multiplicities at the fixed points. See the section on Kontsevich moduli spaces. + +An *abstract equivariant vector bundle under a torus action* is represented by its rank and its base variety, together with its localizations at the fixed points. + +!!! note + Recall that an equivariant vector bundle over a point is a representation of the group under consideration (in our case, a torus). + + +## Torus Representations + +### Types + +For our purposes here, we offer the type `TnRep`. + +### Constructors + +```@docs +tn_representation(w::Vector{<:IntegerUnion}) +``` + +## Operations on Torus Representations + +```@docs +dual(F::TnRep) +``` + +## Varieties With a Torus Action ### Types @@ -48,33 +87,107 @@ tautological_bundles(X::TnVariety) ### Further Data Associated to an Abstract Variety With a Torus Action -`trivial_line_bundle(X::TnVariety)` -`cotangent_bundle(X::TnVariety)` -`euler_number(X::TnVariety)` - -!!! note - If `X` is of type `TnVariety`, entering `total_chern_class(X)` returns the total Chern class of the tangent bundle of `X`. - Similarly for entering `chern_class(X, k)`. +As for the type `AbstractVariety`, we have the methods `trivial_line_bundle(X::TnVariety)` (alternatively, `OO(X::TnVariety)`), +`cotangent_bundle(X::TnVariety)`, and `euler_number(X::TnVariety)`. Morever, if `X` is of type `TnVariety`, entering `total_chern_class(X)` +returns the total Chern class of the tangent bundle of `X`. Similarly for entering `chern_class(X, k)`. -## Equivariant Abstract Bundles Under a Torus Action +## Abstract Equivariant Vector Bundles Under a Torus Action ### Types +The OSCAR type for an abstract equivariant vector bundle under a torus action is `TnBundle`. + ### Constructors -### Specialized Constructors +```@docs +tn_bundle(X::TnVariety, r::Int, f::Function) +``` + +### Underlying Data of an Equivariant Bundle + +If `F` is of type `TnBundle`, then `rank(F)` and `parent(F)` return the rank and the +underlying variety of `F`, respectively. Moreover, we have: + +```@docs +localization(F::TnBundle) +``` + +### Operations on Abstract Equivariant Vector Bundles -### Underlying Data of an Equivariant Abstract Bundle +```@docs +dual(F::TnBundle) +``` + +## Chern Classes and Their Integration -### Further Data Associated to an Equivariant Abstract Bundle +In contrast to the varieties of type `AbstractVariety`, there are no associated Chow rings for the varieties of type `TnVariety`. +In order to work with polynomial expressions in the Chern classes of an abstract equivariant vector bundle, Oscar +internally creates an appropriate polynomial ring. We illustrate this in the examples below. + +### Types -## Integrating ... +To work with with polynomial expressions in Chern classes, we offer the type `TnBundleChern`. + +### Constructors + +```@docs +chern_class(F::TnBundle, f::RingElem) +``` +```@docs +total_chern_class(F::TnBundle) +``` +### Underlying Data of Chern Classes -## Example: Linear Subspaces on Hypersurfaces +```@docs +tn_bundle(c::TnBundleChern) +``` + +```@docs +polynomial(c::TnBundleChern) +``` + +### Operations on Chern Classes + +The usual arithmetic operations are available. + +###### Examples + +```jldoctest +julia> G = tn_grassmannian(1, 3); + +julia> T = tangent_bundle(G) +TnBundle of rank 2 on TnVariety of dim 2 with 3 fixed points + +julia> c1 = chern_class(T, 1) +Chern class c[1] of TnBundle of rank 2 on TnVariety of dim 2 with 3 fixed points + +julia> c2 = chern_class(T, 2) +Chern class c[2] of TnBundle of rank 2 on TnVariety of dim 2 with 3 fixed points + +julia> c = c1^2-3*c2 +Chern class c[1]^2 - 3*c[2] of TnBundle of rank 2 on TnVariety of dim 2 with 3 fixed points + +julia> typeof(c) +TnBundleChern + +``` + +### Integration + +```@docs +integral(c::TnBundleChern) +``` + +## Examples: Linear Subspaces on Hypersurfaces ```@docs linear_subspaces_on_hypersurface(k::Int, d::Int; bott::Bool = true) ``` + +## Kontsevich Moduli Spaces + +## Examples: Rational Curves on Complete Intersections + diff --git a/experimental/IntersectionTheory/src/Bott.jl b/experimental/IntersectionTheory/src/Bott.jl index 09cbd7a67805..9c8aa3a182cd 100644 --- a/experimental/IntersectionTheory/src/Bott.jl +++ b/experimental/IntersectionTheory/src/Bott.jl @@ -4,7 +4,6 @@ # @doc raw""" TnRep(w::Vector) - The type of a representation of a torus, specified by its weights. """ struct TnRep @@ -16,10 +15,33 @@ struct TnRep new(length(w), w) end end + +@doc raw""" + dual(F::TnRep) + det(F::TnRep) + +(F::TnRep, G::TnRep) + *(F::TnRep, G::TnRep) + +Return the dual of `F`, the determinant of `F`, the sum `F` $+$ `G`, and the tensor product of `F` and `G`, respectively. + +# Examples +```jldoctest +julia> F = tn_representation([1, 2, 3]) +TnRep(3, ZZRingElem[1, 2, 3]) + +julia> G = tn_representation([1, 1, 1]) +TnRep(3, ZZRingElem[1, 1, 1]) + +julia> F*G +TnRep(9, ZZRingElem[2, 2, 2, 3, 3, 3, 4, 4, 4]) + +``` +""" dual(F::TnRep) = TnRep(-F.w) +det(F::TnRep) = TnRep([sum(F.w)]) +(F::TnRep, G::TnRep) = TnRep(vcat(F.w, G.w)) *(F::TnRep, G::TnRep) = TnRep([a+b for a in F.w for b in G.w]) -det(F::TnRep) = TnRep([sum(F.w)]) + top_chern_class(F::TnRep) = prod(F.w) function chern_class(F::TnRep, n::Int) sum(prod(F.w[i] for i in c) for c in combinations(F.n, n)) @@ -29,6 +51,21 @@ function _sym(k::Int, n::Int) vcat([[push!(c, i) for c in _sym(k-1,i)] for i in 1:n]...) end +@doc raw""" + tn_representation(w::Vector{<:IntegerUnion}) + +Return the representation of a (split) torus of rank `length(w)` specified by the weights `w`. + +# Examples +```jldoctest +julia> tn_representation([1, 2, 3]) +TnRep(3, ZZRingElem[1, 2, 3]) + +``` +""" +tn_representation(w::Vector{<:IntegerUnion}) = TnRep(w) + + ############################################################################### # # TnBundle, TnVariety - varieties with a torus action and equivariant bundles @@ -64,10 +101,50 @@ fixed points of the base abstract_variety. end end + +@doc raw""" + localization(F::TnBundle) + +Return the localization of `F` at the fixed points of the given torus action. + +# Examples +```jldoctest +julia> G = tn_grassmannian(1, 3); + +julia> T = tangent_bundle(G) +TnBundle of rank 2 on TnVariety of dim 2 with 3 fixed points + +julia> V = fixed_points(G) +3-element Vector{Pair{Vector{Int64}, Int64}}: + [1] => 1 + [2] => 1 + [3] => 1 + +julia> f = localization(T); + +julia> P1 = V[1][1]; + +julia> f(P1) +TnRep(2, ZZRingElem[1, 2]) + +julia> P2 = V[2][1]; + +julia> f(P2) +TnRep(2, ZZRingElem[-1, 1]) + +julia> P3 = V[3][1]; + +julia> f(P3) +TnRep(2, ZZRingElem[-2, -1]) + +``` +""" +localization(F::TnBundle) = F.loc + @doc raw""" TnVariety(n::Int, points) -The type of a abstract_variety with a torus action, represented by the fixed points. +The type of an abstract variety with a (split) torus action, represented by its dimension `n` and a `Vector` determining the fixed points of the action together with their multiplicities. """ @attributes mutable struct TnVariety{P} <: TnVarietyT{P} dim::Int @@ -80,10 +157,23 @@ The type of a abstract_variety with a torus action, represented by the fixed poi end end +Base.show(io::IO, X::TnVariety) = print(io, + "TnVariety of dim ", X.dim, " with ", length(X.points), " fixed points") + +@doc raw""" + tn_bundle(X::TnVariety, r::Int, f::Function) + +Return an abstract equivariant vector bundle on `X` by specifying its rank together with a function which gives the localization of the vector bundle at each fixed point of the torus action on `X`. +""" +tn_bundle(X::TnVariety, r::Int, f::Function) = TnBundle(X, r, f) + @doc raw""" tn_variety(n::Int, points::Vector{Pair{P, Int}}) where P -Return an abstract_variety with a torus action, represented by the fixed points. +Return an abstract variety with a (split) torus action, represented by its dimension `n` and a `Vector` specifying the fixed points of the action together with their multiplicities. + +!!! note + Specifying multiplicities at the fixed points allows one to work with a version of Bott's formula for orbifolds. See the section on Kontsevich moduli spaces in the documentation. """ tn_variety(n::Int, points::Vector{Pair{P, Int}}) where P = TnVariety(n::Int, points::Vector{Pair{P, Int}}) @@ -106,13 +196,16 @@ dim(X::TnVariety) = X.dim @doc raw""" fixed_points(X::TnVariety) -Return the fixed points representing `X`. +Return the fixed points representing `X` and their multiplicities. + +!!! note + Specifying multiplicities at the fixed points allows one to work with a version of Bott's formula for orbifolds. See the section of the documentation on Kontsevich moduli spaces. # Examples ```jldoctest julia> G = tn_grassmannian(2, 5); -julia> fixed_points(G) +julia> V = fixed_points(G) 10-element Vector{Pair{Vector{Int64}, Int64}}: [1, 2] => 1 [1, 3] => 1 @@ -125,6 +218,11 @@ julia> fixed_points(G) [3, 5] => 1 [4, 5] => 1 +julia> P = V[10][1] +2-element Vector{Int64}: + 4 + 5 + ``` """ fixed_points(X::TnVariety) = X.points @@ -136,10 +234,33 @@ Return the tangent bundle of `X`. # Examples ```jldoctest -julia> G = tn_grassmannian(2, 5); +julia> G = tn_grassmannian(1, 3); + +julia> T = tangent_bundle(G) +TnBundle of rank 2 on TnVariety of dim 2 with 3 fixed points + +julia> V = fixed_points(G) +3-element Vector{Pair{Vector{Int64}, Int64}}: + [1] => 1 + [2] => 1 + [3] => 1 + +julia> f = localization(T); + +julia> P1 = V[1][1]; + +julia> f(P1) +TnRep(2, ZZRingElem[1, 2]) + +julia> P2 = V[2][1]; + +julia> f(P2) +TnRep(2, ZZRingElem[-1, 1]) -julia> tangent_bundle(G) -TnBundle of rank 6 on TnVariety of dim 6 +julia> P3 = V[3][1]; + +julia> f(P3) +TnRep(2, ZZRingElem[-2, -1]) ``` """ @@ -156,21 +277,32 @@ julia> G = tn_grassmannian(2, 5); julia> tautological_bundles(G) 2-element Vector{TnBundle}: - TnBundle of rank 2 on TnVariety of dim 6 - TnBundle of rank 3 on TnVariety of dim 6 + TnBundle of rank 2 on TnVariety of dim 6 with 10 fixed points + TnBundle of rank 3 on TnVariety of dim 6 with 10 fixed points ``` """ tautological_bundles(X::TnVariety) = X.bundles ### CHECK bundles( --> tautological_bundles( -euler(X::TnVariety) = sum(1//ZZ(e) for (p,e) in X.points) # special case of Bott's formula +euler_number(X::TnVariety) = sum(1//ZZ(e) for (p,e) in X.points) # special case of Bott's formula cotangent_bundle(X::TnVariety) = dual(X.T) trivial_line_bundle(X::TnVariety) = TnBundle(X, 1, p -> TnRep([0])) +(OO)(X::TnVariety) = trivial_line_bundle(X) +@doc raw""" + dual(F::TnBundle) + symmetric_power(F::TnBundle, k::Int) + exterior_power(F::TnBundle, k::Int) + det(F::TnBundle) + +(F::TnBundle, G::TnBundle) + *(F::TnBundle, G::TnBundle) + +Return the dual of `F`, the `k`-th symmetric power of `F`, the `k`-th exterior power of `F`, the determinant of `F`, the sum `F` $+$ `G`, and the tensor product of `F` and `G`, respectively. +""" dual(F::TnBundle) = TnBundle(F.parent, F.rank, p -> dual(F.loc(p))) +det(F::TnBundle) = TnBundle(F.parent, 1, p -> det(F.loc(p))) +(F::TnBundle, G::TnBundle) = TnBundle(F.parent, F.rank + G.rank, p -> F.loc(p) + G.loc(p)) *(F::TnBundle, G::TnBundle) = TnBundle(F.parent, F.rank * G.rank, p -> F.loc(p) * G.loc(p)) -det(F::TnBundle) = TnBundle(F.parent, 1, p -> det(F.loc(p))) # avoid computing `_sym` for each F.loc(p) function symmetric_power(F::TnBundle, k::Int) @@ -213,17 +345,119 @@ function _get_ring(F::TnBundle) get_attribute(F, :R) end +@doc raw""" + total_chern_class(F::TnBundle) + chern_class(F::TnBundle, k::Int) + top_chern_class(F::TnBundle) + +Return the total Chern class, the `k`-th Chern class, and the top Chern class of `F`, respectively. + +# Examples + +```jldoctest +julia> G = tn_grassmannian(1, 3); + +julia> T = tangent_bundle(G) +TnBundle of rank 2 on TnVariety of dim 2 with 3 fixed points + +julia> total_chern_class(T::TnBundle) +Chern class c[1] + c[2] + 1 of TnBundle of rank 2 on TnVariety of dim 2 with 3 fixed points + +``` +""" total_chern_class(F::TnBundle) = TnBundleChern(F, 1+sum(gens(_get_ring(F)))) -total_chern_class(X::TnVariety) = total_chern_class(X.T) chern_class(F::TnBundle, k::Int) = TnBundleChern(F, total_chern_class(F).c[k]) -chern_class(X::TnVariety, k::Int) = chern_class(X.T, k) top_chern_class(F::TnBundle) = chern_class(F, F.rank) + +@doc raw""" + chern_class(F::TnBundle, f::RingElem) + +Return the evaluation of `f` in the Chern classes of `F`. + +# Examples + +```jldoctest +julia> G = tn_grassmannian(1, 3); + +julia> T = tangent_bundle(G) +TnBundle of rank 2 on TnVariety of dim 2 with 3 fixed points + +julia> R, (x, y) = polynomial_ring(QQ, [:x, :y]) +(Multivariate polynomial ring in 2 variables over QQ, QQMPolyRingElem[x, y]) + +julia> f = x*y^2 +x*y^2 + +julia> c = chern_class(T, f) +Chern class c[1]*c[2]^2 of TnBundle of rank 2 on TnVariety of dim 2 with 3 fixed points + +julia> parent(polynomial(c)) +Multivariate polynomial ring in 2 variables over QQ graded by + c[1] -> [1] + c[2] -> [2] + +``` +""" chern_class(F::TnBundle, x::RingElem) = begin R = _get_ring(F) @assert length(gens(R)) == length(gens(parent(x))) TnBundleChern(F, evaluate(x, gens(R))) end +@doc raw""" + tn_bundle(c::TnBundleChern) + +Return the `tn_bundle` to which `c` belongs. +""" +tn_bundle(c::TnBundleChern) = c.F + +@doc raw""" + polynomial(c::TnBundleChern) + +Return the polynomial representing `c`. + +# Examples +```jldoctest +julia> G = tn_grassmannian(1, 3); + +julia> T = tangent_bundle(G) +TnBundle of rank 2 on TnVariety of dim 2 with 3 fixed points + +julia> f = polynomial(total_chern_class(T)) +c[1] + c[2] + 1 + +julia> parent(f) +Multivariate polynomial ring in 2 variables over QQ graded by + c[1] -> [1] + c[2] -> [2] + +``` +""" +polynomial(c::TnBundleChern) = c.c + +total_chern_class(X::TnVariety) = total_chern_class(X.T) +chern_class(X::TnVariety, k::Int) = chern_class(X.T, k) + +@doc raw""" + integral(c::TnBundleChern) + +Return the integral of `c`. + +# Examples +```jldoctest +julia> G = tn_grassmannian(2, 4) +TnVariety of dim 4 with 6 fixed points + +julia> Q = tautological_bundles(G)[2]; + +julia> E = symmetric_power(Q, 3) +TnBundle of rank 4 on TnVariety of dim 4 with 6 fixed points + +julia> integral(top_chern_class(E)) +27 + +``` +""" function integral(c::TnBundleChern) F, R = c.F, parent(c.c) X = F.parent @@ -259,7 +493,38 @@ end @doc raw""" tn_grassmannian(k::Int, n::Int; weights = :int) -Return a Grassmannian with a torus action, ... . +Return the Grassmannian $\mathrm{G}(k, n)$ of `k`-dimensional subspaces of an +`n`-dimensional standard vector space as a `TnVariety`, where the action is induced by +the diagonal action with `weights` on the standard vector space. + +!!! note + The fixed points correspond to the ${n}\choose{k}$ coordinate subspaces of dimension $k$ in the standard vector space. + +# Examples +```jldoctest +julia> G = tn_grassmannian(3,5) # all weights are 1 +TnVariety of dim 6 with 10 fixed points + +julia> V = fixed_points(G) +10-element Vector{Pair{Vector{Int64}, Int64}}: + [1, 2, 3] => 1 + [1, 2, 4] => 1 + [1, 3, 4] => 1 + [2, 3, 4] => 1 + [1, 2, 5] => 1 + [1, 3, 5] => 1 + [2, 3, 5] => 1 + [1, 4, 5] => 1 + [2, 4, 5] => 1 + [3, 4, 5] => 1 + +julia> P = V[10][1] +3-element Vector{Int64}: + 3 + 4 + 5 + +``` """ function tn_grassmannian(k::Int, n::Int; weights = :int) @assert k < n @@ -278,7 +543,32 @@ end @doc raw""" tn_flag_variety(dims::Int...; weights = :int) -Return a flag variety with a torus action, ... . +Given integers, say, $d_1, \dots, d_{k}, n$ with $0 < d_1 < \dots < d_{k} < n$, +return the abstract flag variety $\mathrm{F}(d_1, \dots, d_{k}; n)$ of nested sequences of subspaces of +dimensions $d_1, \dots, d_{k}$ of an $n$-dimensional standard vector space as a `TnVariety`, where the +action is induced by the diagonal action with `weights` on the standard vector space. + +# Examples +```jldoctest +julia> F = tn_flag_variety(1,3,4) # all weights are 1 +TnVariety of dim 5 with 12 fixed points + +julia> fixed_points(F) +12-element Vector{Pair{Vector{Vector{Int64}}, Int64}}: + [[1], [2, 3], [4]] => 1 + [[1], [2, 4], [3]] => 1 + [[1], [3, 4], [2]] => 1 + [[2], [1, 3], [4]] => 1 + [[2], [1, 4], [3]] => 1 + [[2], [3, 4], [1]] => 1 + [[3], [1, 2], [4]] => 1 + [[3], [1, 4], [2]] => 1 + [[3], [2, 4], [1]] => 1 + [[4], [1, 2], [3]] => 1 + [[4], [1, 3], [2]] => 1 + [[4], [2, 3], [1]] => 1 + +``` """ function tn_flag_variety(dims::Int...; weights = :int) return tn_flag_variety(collect(dims), weights = weights) diff --git a/experimental/IntersectionTheory/src/IntersectionTheory.jl b/experimental/IntersectionTheory/src/IntersectionTheory.jl index 667e3ea6429c..8fedf0c158ce 100644 --- a/experimental/IntersectionTheory/src/IntersectionTheory.jl +++ b/experimental/IntersectionTheory/src/IntersectionTheory.jl @@ -11,6 +11,9 @@ import ..Oscar: trivial_line_bundle import ..Oscar: intersection_matrix import ..Oscar: chern_class import ..Oscar: IntegerUnion +import ..Oscar: localization +import ..AbstractAlgebra: polynomial + export a_hat_genus export abstract_bundle @@ -37,6 +40,8 @@ export complete_intersection export compose export cotangent_bundle export degeneracy_locus +export det +export dual export dual_basis export euler_number export euler_pairing @@ -50,9 +55,12 @@ export l_genus export lines_on_hypersurface export linear_subspaces_on_hypersurface export line_bundle +export localization export map export OO export point_class +### export r_polynomial +export polynomial export pontryagin_class export product export pullback @@ -65,8 +73,10 @@ export segre_class export structure_map export tangent_bundle export tautological_bundles +export tn_bundle export tn_flag_variety export tn_grassmannian +export tn_representation export tn_variety export todd_class export top_chern_class @@ -80,8 +90,10 @@ export AbstractVariety export AbstractVarietyMap export AbstractBundle export TnBundle +export TnBundleChern +export TnRep export TnVariety -export TnVarietyT + include("Types.jl") include("Misc.jl") @@ -123,6 +135,8 @@ export complete_intersection export compose export cotangent_bundle export degeneracy_locus +export det +export dual export dual_basis export euler_number export euler_pairing @@ -137,10 +151,12 @@ export l_genus export lines_on_hypersurface export linear_subspaces_on_hypersurface export line_bundle +export localization export map export OO export point_class -export points +### export r_polynomial +export polynomial export pontryagin_class export product export pullback @@ -153,8 +169,10 @@ export segre_class export structure_map export tangent_bundle export tautological_bundles +export tn_bundle export tn_flag_variety export tn_grassmannian +export tn_representation export tn_variety export todd_class export top_chern_class @@ -168,5 +186,8 @@ export AbstractVariety export AbstractVarietyMap export AbstractBundle export TnBundle +export TnBundleChern +export TnRep export TnVariety -export TnVarietyT + +