/
attributes.jl
89 lines (67 loc) · 2.3 KB
/
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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
@doc raw"""
polyhedron(td::ToricDivisor)
Construct the polyhedron $P_D$ of a torus invariant divisor $D:=td$ as in 4.3.2
of [CLS11](@cite). The lattice points of this polyhedron correspond to the
global sections of the divisor.
# Examples
The polyhedron of the divisor with all coefficients equal to zero is a point,
if the ambient variety is complete. Changing the coefficients corresponds to
moving hyperplanes. One direction moves the hyperplane away from the origin,
the other moves it across. In the latter case there are no global sections
anymore and the polyhedron becomes empty.
```jldoctest
julia> F4 = hirzebruch_surface(NormalToricVariety, 4)
Normal toric variety
julia> td0 = toric_divisor(F4, [0,0,0,0])
Torus-invariant, non-prime divisor on a normal toric variety
julia> is_feasible(polyhedron(td0))
true
julia> dim(polyhedron(td0))
0
julia> td1 = toric_divisor(F4, [1,0,0,0])
Torus-invariant, prime divisor on a normal toric variety
julia> is_feasible(polyhedron(td1))
true
julia> td2 = toric_divisor(F4, [-1,0,0,0])
Torus-invariant, non-prime divisor on a normal toric variety
julia> is_feasible(polyhedron(td2))
false
```
"""
@attr Polyhedron polyhedron(td::ToricDivisor) = polyhedron(pm_object(td).SECTION_POLYTOPE)
@doc raw"""
coefficients(td::ToricDivisor)
Identify the coefficients of a toric divisor in the group of torus invariant Weil divisors.
# Examples
```jldoctest
julia> F4 = hirzebruch_surface(NormalToricVariety, 4)
Normal toric variety
julia> D = toric_divisor(F4, [1, 2, 3, 4])
Torus-invariant, non-prime divisor on a normal toric variety
julia> coefficients(D)
4-element Vector{ZZRingElem}:
1
2
3
4
```
"""
coefficients(td::ToricDivisor) = td.coeffs
@doc raw"""
toric_variety(td::ToricDivisor)
Return the toric variety of a torus-invariant Weil divisor.
# Examples
```jldoctest
julia> F4 = hirzebruch_surface(NormalToricVariety, 4);
julia> D = toric_divisor(F4, [1, 2, 3, 4]);
julia> toric_variety(D)
Normal toric variety
```
"""
toric_variety(td::ToricDivisor) = td.toric_variety
########################################################################
# Implement the interface for AbsAlgebraicCycle and Divisors
#
# Implementation still experimental; see
# experimental/Schemes/WeilDivisor.jl.
########################################################################