-
Notifications
You must be signed in to change notification settings - Fork 176
Add tropical prevarieties generated by intersecting tropical hypersurfaces #4703
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
546ad09
6d847ee
de2c946
7532567
d28a835
6f781a4
968d426
4544c87
6d80ed2
7598737
4bde2d8
d9e8de3
8bccb55
58929e0
dcac360
b573d19
7d2f397
29a7360
a3b4800
6b354e7
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -260,3 +260,72 @@ end | |||||||||||
| # @req has_attribute(TropH,:tropical_semiring_map) "no tropical semiring map cached" | ||||||||||||
| # return get_attribute(TropH,:tropical_semiring_map) | ||||||||||||
| # end | ||||||||||||
| # | ||||||||||||
|
|
||||||||||||
| @doc raw""" | ||||||||||||
| tropical_prevariety(F::Vector{MPolyRingElem},nu::TropicalSemiringMap) | ||||||||||||
|
|
||||||||||||
| Return the tropical prevariety generated by intersecting tropical hypersurfaces corresponding to elements of `F`. | ||||||||||||
|
|
||||||||||||
| If `F` is a finite collection of polynomials with coefficients from a given field, return the tropical prevariety obtained by tropicalizing elements of `F` with respect to a given tropicalization map `nu`. | ||||||||||||
|
|
||||||||||||
| If no `nu` is given, default to trivial valuation with `min` convention. | ||||||||||||
|
|
||||||||||||
| If `F` is a collection of tropical polynomials, the function computes and intersects the associated hypersurfaces. | ||||||||||||
| # Example | ||||||||||||
| We compute the Dressian $\text{Dr}(2,5)$ below. | ||||||||||||
| ```jldoctest | ||||||||||||
| julia> Gr25 = grassmann_pluecker_ideal(2,5) | ||||||||||||
| Ideal generated by | ||||||||||||
| x[[1, 2]]*x[[3, 4]] - x[[1, 3]]*x[[2, 4]] + x[[1, 4]]*x[[2, 3]] | ||||||||||||
| x[[1, 2]]*x[[3, 5]] - x[[1, 3]]*x[[2, 5]] + x[[1, 5]]*x[[2, 3]] | ||||||||||||
| x[[1, 2]]*x[[4, 5]] - x[[1, 4]]*x[[2, 5]] + x[[1, 5]]*x[[2, 4]] | ||||||||||||
| x[[1, 3]]*x[[4, 5]] - x[[1, 4]]*x[[3, 5]] + x[[1, 5]]*x[[3, 4]] | ||||||||||||
| x[[2, 3]]*x[[4, 5]] - x[[2, 4]]*x[[3, 5]] + x[[2, 5]]*x[[3, 4]] | ||||||||||||
|
|
||||||||||||
| #Compute Dressian without specified tropicalization map. | ||||||||||||
| julia> Dr25 = tropical_prevariety(gens(Gr25)) | ||||||||||||
|
Comment on lines
+286
to
+287
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||
| Polyhedral complex in ambient dimension 10 | ||||||||||||
|
|
||||||||||||
| julia> rays_modulo_lineality(Dr25)[1] | ||||||||||||
| 10-element SubObjectIterator{RayVector{QQFieldElem}}: | ||||||||||||
| [1, -1//3, -1//3, -1//3, -1//3, -1//3, -1//3, 1//3, 1//3, 1//3] | ||||||||||||
| [1, 1, -1, -1, 1, -1, -1, -1, -1, 3] | ||||||||||||
| [1, -1, 1, -1, -1, 1, -1, -1, 3, -1] | ||||||||||||
| [1, -1, -1, 1, -1, -1, 1, 3, -1, -1] | ||||||||||||
| [-1, 1, 1, -1, -1, -1, 3, 1, -1, -1] | ||||||||||||
| [-1, -1, -1, 3, 1, 1, -1, 1, -1, -1] | ||||||||||||
| [-1, 1, -1, 1, -1, 3, -1, -1, 1, -1] | ||||||||||||
| [-1, 3, -1, -1, -1, 1, 1, -1, -1, 1] | ||||||||||||
| [-1, -1, 3, -1, 1, -1, 1, -1, 1, -1] | ||||||||||||
| [-1, -1, 1, 1, 3, -1, -1, -1, -1, 1] | ||||||||||||
|
|
||||||||||||
| #Compute with respect to max convention | ||||||||||||
| julia> nu = tropical_semiring_map(QQ,max) | ||||||||||||
|
Comment on lines
+303
to
+304
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||
| Map into Max tropical semiring encoding the trivial valuation on Rational field | ||||||||||||
|
|
||||||||||||
| julia> Dr25max = tropical_prevariety(gens(Gr25),nu) | ||||||||||||
| Polyhedral complex in ambient dimension 10 | ||||||||||||
|
|
||||||||||||
| #Give input as tropical polynomials | ||||||||||||
| Dr25 = tropical_prevariety(tropical_polynomial.([f for f in gens(Gr25)])) | ||||||||||||
| Polyhedral complex in ambient dimension 10 | ||||||||||||
|
Comment on lines
+310
to
+312
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
There is a julia> some + code # some explanation |
||||||||||||
| ``` | ||||||||||||
| """ | ||||||||||||
|
benlorenz marked this conversation as resolved.
Outdated
|
||||||||||||
| #Input array of tropical polynomials | ||||||||||||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
This line needs to be removed for the docstring to work. The doctest is also not run currently. |
||||||||||||
| function tropical_prevariety(F::Vector{<:AbstractAlgebra.Generic.MPoly{TropicalSemiringElem{minmax}}}) where {minmax<:Union{typeof(min),typeof(max)}} | ||||||||||||
| length(F) > 0 || error("Empty array.") | ||||||||||||
| HTF = tropical_hypersurface.(F) | ||||||||||||
| return tropical_prevariety(HTF) | ||||||||||||
| end | ||||||||||||
|
|
||||||||||||
| function tropical_prevariety(F::Vector{<:MPolyRingElem}, nu::TropicalSemiringMap) | ||||||||||||
| return tropical_prevariety(tropical_polynomial.(F,Ref(nu))) | ||||||||||||
| end | ||||||||||||
|
|
||||||||||||
| #Default to min with trivial valuation | ||||||||||||
| tropical_prevariety(F::Vector{<:MPolyRingElem}) = tropical_prevariety(F, tropical_semiring_map(coefficient_ring(first(F)))) | ||||||||||||
|
|
||||||||||||
| tropical_prevariety(F::Vector{<:MPolyRingElem}, convention::minmax) where {minmax<:Union{typeof(min),typeof(max)}} = tropical_prevariety(F, tropical_semiring_map(coefficient_ring(first(F)), convention)) | ||||||||||||
|
|
||||||||||||
| tropical_prevariety(F::Vector{TropicalHypersurface{minmax, true}}) where {minmax<:Union{typeof(min),typeof(max)}} = reduce(common_refinement, [h.polyhedralComplex for h in F]) | ||||||||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This needs to be indented by 4 spaces.