Skip to content

Commit f71e842

Browse files
committed
TropicalGeometry: new positive tropicalizations
1 parent e36a504 commit f71e842

File tree

7 files changed

+111
-0
lines changed

7 files changed

+111
-0
lines changed

docs/doc.main

+1
Original file line numberDiff line numberDiff line change
@@ -246,6 +246,7 @@
246246
"TropicalGeometry/linear_space.md",
247247
"TropicalGeometry/groebner_theory.md",
248248
"TropicalGeometry/tropicalization.md",
249+
"TropicalGeometry/positive_variety.md",
249250
],
250251

251252
"Noncommutative Algebra" => [

docs/oscar_references.bib

+12
Original file line numberDiff line numberDiff line change
@@ -2290,6 +2290,18 @@ @Article{SV-D-V87
22902290
zbmath = {4069055}
22912291
}
22922292

2293+
@Article{SW05,
2294+
author = {Speyer, David and Williams, Lauren},
2295+
title = {The {{Tropical Totally Positive Grassmannian}}},
2296+
journal = {Journal of Algebraic Combinatorics},
2297+
volume = {22},
2298+
number = {2},
2299+
pages = {189--210},
2300+
year = {2005},
2301+
month = sep,
2302+
doi = {10.1007/s10801-005-2513-3}
2303+
}
2304+
22932305
@Article{SY96,
22942306
author = {Shimoyama, Takeshi and Yokoyama, Kazuhiro},
22952307
title = {Localization and primary decomposition of polynomial ideals},
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# Positive tropicalizations of linear ideals
2+
3+
## Introduction
4+
Positive tropial varieties (in OSCAR) are weighted polyhedral complexes and as per the definition in [SW05](@cite). They may arise as tropicalizations of polynomial ideals over an ordered field. Currently, the only ideals supported are linear ideals over rational numbers or rational function fields over rational numbers.
5+
6+
7+
```@docs
8+
positive_tropical_variety(::MPolyIdeal, ::TropicalSemiringMap)
9+
```

src/TropicalGeometry/TropicalGeometry.jl

+1
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,6 @@ include("hypersurface.jl")
1717
include("curve.jl")
1818
include("linear_space.jl")
1919
include("variety.jl")
20+
include("positive_variety.jl")
2021
include("intersection.jl")
2122
include("groebner_fan.jl")
+73
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
@doc raw"""
2+
positive_tropical_variety(I::MPolyIdeal,nu::TropicalSemiringMap)
3+
4+
Return the positive tropical variety of `I` as a `PolyhedralComplex` as per the definition in [SW05](@cite). Assumes that `I` is generated either by binomials or by linear polynomials and that `I` is defined either over
5+
(a) the rational numbers and that `nu` encodes the trivial valuation,
6+
(b) the rational function field over the rational numbers and that `nu` encodes the t-adic valuation.
7+
8+
# Examples
9+
```jldoctest
10+
julia> K,t = rational_function_field(QQ,"t")
11+
(Rational function field over QQ, t)
12+
13+
julia> C = matrix(K,[[-3*t,1*t,-1*t,-2*t,2*t],[-1*t,1*t,-1*t,-1*t,1*t]])
14+
[-3*t t -t -2*t 2*t]
15+
[ -t t -t -t t]
16+
17+
julia> R,x = polynomial_ring(K,ncols(C))
18+
(Multivariate polynomial ring in 5 variables over K, AbstractAlgebra.Generic.MPoly{AbstractAlgebra.Generic.RationalFunctionFieldElem{QQFieldElem, QQPolyRingElem}}[x1, x2, x3, x4, x5])
19+
20+
julia> nu = tropical_semiring_map(K,t)
21+
Map into Min tropical semiring encoding the t-adic valuation on Rational function field over QQ
22+
23+
julia> I = ideal(C*gens(R))
24+
Ideal generated by
25+
-3*t*x1 + t*x2 - t*x3 - 2*t*x4 + 2*t*x5
26+
-t*x1 + t*x2 - t*x3 - t*x4 + t*x5
27+
28+
julia> TropPlusI = positive_tropical_variety(I,nu)
29+
Min tropical variety
30+
31+
```
32+
"""
33+
function positive_tropical_variety(I::MPolyIdeal,nu::TropicalSemiringMap)
34+
if all(isequal(2),length.(gens(I)))
35+
if all(isequal(-1),[prod([sign(c) for c in coefficients(g)]) for g in gens(I)])
36+
# binomial ideal positive, return regular tropical variety
37+
return tropical_variety(I,nu)
38+
else
39+
# binomial ideal not positive, return empty polyhedral complex in the correct ambient dimension
40+
return polyhedral_complex(IncidenceMatrix(zeros(Int,0,0)),zero_matrix(QQ,0,ambient_dim(TropL)))
41+
end
42+
end
43+
44+
if all(isequal(1),total_degree.(gens(I)))
45+
# Construct the tropicalization of I
46+
TropL = tropical_linear_space(I,nu)
47+
48+
# find maximal polyhedra belonging to the positive part
49+
# we check containment in the positive part by testing the initial ideal w.r.t. a relative interior point
50+
positivePolyhedra = Polyhedron{QQFieldElem}[sigma for sigma in maximal_polyhedra(TropL) if is_initial_positive(I,nu,relative_interior_point(sigma))]
51+
52+
if isempty(positivePolyhedra)
53+
# if there are no positive polyhedra,
54+
# return empty polyhedral complex in the correct ambient dimension
55+
return polyhedral_complex(IncidenceMatrix(zeros(Int,0,0)),zero_matrix(QQ,0,ambient_dim(TropL)))
56+
end
57+
58+
Sigma = polyhedral_complex(positivePolyhedra)
59+
mult = ones(ZZRingElem, n_maximal_polyhedra(Sigma))
60+
minOrMax = convention(nu)
61+
return tropical_variety(Sigma,mult,minOrMax)
62+
end
63+
64+
error("input ideal not supported")
65+
end
66+
67+
function is_initial_positive(I::MPolyIdeal, nu::TropicalSemiringMap, w::AbstractVector)
68+
inI = initial(I,nu,w)
69+
G = groebner_basis(inI; complete_reduction=true)
70+
71+
# the Groebner basis is binomial, check binomials have alternating signs
72+
return all(isequal(-1),[prod([sign(c) for c in coefficients(g)]) for g in G])
73+
end

src/exports.jl

+1
Original file line numberDiff line numberDiff line change
@@ -1317,6 +1317,7 @@ export positive_coroots
13171317
export positive_hull
13181318
export positive_root
13191319
export positive_roots
1320+
export positive_tropical_variety
13201321
export possible_class_fusions
13211322
export power_sum
13221323
export powers_of_element
+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
@testset "src/TropicalGeometry/positive_variety.jl" begin
2+
3+
C = matrix(QQ,[[-3,1,-1,-2,2],[-1,1,-1,-1,1]])
4+
R,x = polynomial_ring(QQ,ncols(C))
5+
nu = tropical_semiring_map(QQ)
6+
I = ideal(C*gens(R))
7+
TropPlusI = positive_tropical_variety(I,nu)
8+
@test n_maximal_polyhedra(TropPlusI) == 5
9+
10+
I = ideal([x[1]^2-x[2]^2,x[3]^3-x[4]^3])
11+
TropPlusI = positive_tropical_variety(I,nu)
12+
@test n_maximal_polyhedra(TropPlusI) == 1
13+
14+
end

0 commit comments

Comments
 (0)