Skip to content

Commit bc9496d

Browse files
YueRenlgoettgens
andauthored
TropicalGeometry: new positive tropicalizations (#4447)
* TropicalGeometry: new positive tropicalizations * TropicalGeometry: make positive_tropical_variety work with old tropicalization * Update docs/oscar_references.bib Co-authored-by: Lars Göttgens <[email protected]> * Update src/TropicalGeometry/positive_variety.jl Co-authored-by: Lars Göttgens <[email protected]> * Update src/TropicalGeometry/positive_variety.jl Co-authored-by: Lars Göttgens <[email protected]> * Update src/TropicalGeometry/positive_variety.jl Co-authored-by: Lars Göttgens <[email protected]> --------- Co-authored-by: Lars Göttgens <[email protected]>
1 parent 19d4882 commit bc9496d

File tree

7 files changed

+113
-0
lines changed

7 files changed

+113
-0
lines changed

docs/doc.main

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -253,6 +253,7 @@
253253
"TropicalGeometry/linear_space.md",
254254
"TropicalGeometry/groebner_theory.md",
255255
"TropicalGeometry/tropicalization.md",
256+
"TropicalGeometry/positive_variety.md",
256257
],
257258

258259
"Noncommutative Algebra" => [

docs/oscar_references.bib

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2467,6 +2467,18 @@ @Article{SV-D-V87
24672467
zbmath = {4069055}
24682468
}
24692469

2470+
@Article{SW05,
2471+
author = {Speyer, David and Williams, Lauren},
2472+
title = {The Tropical Totally Positive Grassmannian},
2473+
journal = {Journal of Algebraic Combinatorics},
2474+
volume = {22},
2475+
number = {2},
2476+
pages = {189--210},
2477+
year = {2005},
2478+
month = sep,
2479+
doi = {10.1007/s10801-005-2513-3}
2480+
}
2481+
24702482
@Article{SY96,
24712483
author = {Shimoyama, Takeshi and Yokoyama, Kazuhiro},
24722484
title = {Localization and primary decomposition of polynomial ideals},
Lines changed: 9 additions & 0 deletions
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

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

src/exports.jl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1348,6 +1348,7 @@ export positive_coroots
13481348
export positive_hull
13491349
export positive_root
13501350
export positive_roots
1351+
export positive_tropical_variety
13511352
export possible_class_fusions
13521353
export power_map
13531354
export power_sum
Lines changed: 14 additions & 0 deletions
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)