/
special_attributes.jl
59 lines (45 loc) · 1.88 KB
/
special_attributes.jl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
########################
# 1: Special attributes of toric varieties
########################
@doc Markdown.doc"""
structure_sheaf(v::AbstractNormalToricVariety)
Construct the structure sheaf of a normal toric variety.
For convenience, we also support `structure_sheaf(variety)`.
# Examples
```jldoctest
julia> v = projective_space(NormalToricVariety, 2)
A normal, non-affine, smooth, projective, gorenstein, fano, 2-dimensional toric variety without torusfactor
julia> structure_sheaf(v)
A toric line bundle on a normal toric variety
```
"""
@attr ToricLineBundle structure_sheaf(v::AbstractNormalToricVariety) = ToricLineBundle(v, zero(picard_group(v)))
export structure_sheaf
@doc Markdown.doc"""
anticanonical_bundle(v::AbstractNormalToricVariety)
Construct the anticanonical bundle of a normal toric variety.
For convenience, we also support `anticanonical_bundle(variety)`.
# Examples
```jldoctest
julia> v = projective_space(NormalToricVariety, 2)
A normal, non-affine, smooth, projective, gorenstein, fano, 2-dimensional toric variety without torusfactor
julia> anticanonical_bundle(v)
A toric line bundle on a normal toric variety
```
"""
@attr ToricLineBundle anticanonical_bundle(v::AbstractNormalToricVariety) = prod(ToricLineBundle(v, d) for d in torusinvariant_prime_divisors(v))
export anticanonical_bundle
@doc Markdown.doc"""
canonical_bundle(v::AbstractNormalToricVariety)
Construct the canonical bundle of a normal toric variety.
For convenience, we also support `canonical_bundle(variety)`.
# Examples
```jldoctest
julia> v = projective_space(NormalToricVariety, 2)
A normal, non-affine, smooth, projective, gorenstein, fano, 2-dimensional toric variety without torusfactor
julia> canonical_bundle(v)
A toric line bundle on a normal toric variety
```
"""
@attr ToricLineBundle canonical_bundle(v::AbstractNormalToricVariety) = inv(anticanonical_bundle(v))
export canonical_bundle