/
attributes.jl
77 lines (56 loc) · 1.97 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
############################
# Attributes
############################
@doc raw"""
toric_variety(c::ClosedSubvarietyOfToricVariety)
When constructing a closed subvariety, a toric variety
must be provided in which the closed subvariety is contained.
This method returns this initially provided toric supervariety.
Note however that perse, a closed subvariety can be contained
in different non-isomorphic toric varieties.
# Examples
```jldoctest
julia> f2 = hirzebruch_surface(NormalToricVariety, 2);
julia> (t1, x1, t2, x2) = gens(cox_ring(f2));
julia> c = closed_subvariety_of_toric_variety(f2, [t1])
Closed subvariety of a normal toric variety
julia> toric_variety(c) == f2
true
```
"""
@attr NormalToricVarietyType toric_variety(c::ClosedSubvarietyOfToricVariety) = c.toric_variety
@doc raw"""
defining_ideal(c::ClosedSubvarietyOfToricVariety)
When constructing a closed subvariety, an ideal in the
Cox ring of a normal toric variety must be provided.
This method returns this initially provided ideal.
# Examples
```jldoctest
julia> f2 = hirzebruch_surface(NormalToricVariety, 2);
julia> (t1, x1, t2, x2) = gens(cox_ring(f2));
julia> c = closed_subvariety_of_toric_variety(f2, [t1])
Closed subvariety of a normal toric variety
julia> defining_ideal(c) == ideal([t1])
true
```
"""
@attr MPolyIdeal defining_ideal(c::ClosedSubvarietyOfToricVariety) = c.defining_ideal
@doc raw"""
radical(c::ClosedSubvarietyOfToricVariety)
When constructing a closed subvariety, an ideal in the
Cox ring of a normal toric variety must be provided.
This method returns the radical of this initially provided
ideal.
# Examples
```jldoctest
julia> f2 = hirzebruch_surface(NormalToricVariety, 2);
julia> (t1, x1, t2, x2) = gens(cox_ring(f2));
julia> c = closed_subvariety_of_toric_variety(f2, [t1])
Closed subvariety of a normal toric variety
julia> radical(c) == ideal([t1])
true
```
"""
@attr MPolyIdeal function radical(c::ClosedSubvarietyOfToricVariety)
return radical(defining_ideal(c))
end