Open a1031e5c-5e2c-4c90-8ba4-91be67e304df opened 10 years ago
Description changed:
---
+++
@@ -5,12 +5,12 @@
sage: N = ToricLattice(3) sage: S = N.submodule([(1,0,0), (0, 1, 0)]) +sage: B = S.basis() sage: cones = [Cone([B[0], B[1]]), Cone([B[1], -B[0]-B[1]]), Cone([-B[0]-B[1], B[0]])] sage: f = Fan(cones) sage: X = ToricVariety(f) sage: X.is_complete() True -The empty polyhedron in QQ^3 sage: (-X.K()).polyhedron() A 3-dimensional polyhedron in QQ^3 defined as the convex hull of 3 vertices and 1 line
Alright, here's a short patch that fixes the problem. I don't know whether it's the best way of working around this, but it's simple and does the trick.
Volker, could you have a look? :)
Description changed:
---
+++
@@ -20,5 +20,3 @@
sage: (-toric_varieties.P(2).K()).polyhedron()
A 2-dimensional polyhedron in QQ^2 defined as the convex hull of 3 vertices
- -I'll attach a branch with a fix soon.
Author: Jan Keitel
Commit: d26cadf
Changed branch from u/jkeitel/toric_divisor_sublattice to u/jkeitel/toric_divisors_sublattice
New commits:
d26cadf | Fix polyhedron method for toric divisors in sublattices. |
I am confused - the polyhedron of the toric variety whose fan is in the lattice N lives in the dual lattice M, why is it intersected with the sublattice where the fan lives?
Branch pushed to git repo; I updated commit sha1. New commits:
886225d | Use the correct lattice and adjust doctest. |
Hi Andrey,
thanks for having a look at this. You're of course right. I've changed the code and am now using a doctest that would give an incorrect result for the previous patch.
Best, Jan
Looks good to me... Andrey, any further thoughts?
Reviewer: Andrey Novoseltsev, Volker Braun
I think this polyhedron should live in the fan.dual_lattice()
, so instead of lifting the generators and taking the intersection with their span (which is something pretty random), the correct approach is to push previously used inequalities into this dual lattice (which is a quotient, so has smaller dimension).
Okay, if I understand you correctly, that's actually quite easy to realise. I have a patch that does this and I'll push it tomorrow when I'm back at the institute.
Sorry, it took a bit longer because something else came up. The newest change tries to do what you just suggested, but since polyhedra corresponding to divisors do not necessarily have to be lattice polytopes, it looks a bit clumsy. Could you have a look and check whether there's a nicer way of doing it?
Best, Jan
Unfortunately, the diff on trac seems to be broken. Something else has come up and I'm not sure what to do about it.
Consider the following:
sage: N = ToricLattice(4)
sage: S = N.submodule([(1,0,0,0), (0,1,0,0)])
sage: B = S.basis()
sage: S.dual()
2-d lattice, quotient of 4-d lattice M by Sublattice <M(0, 0, 1, 0), M(0, 0, 0, 1)>
sage: S.dual().gens()
(M[0, 1, 0, 0], M[1, 0, 0, 0])
sage: S.gens()
(N(1, 0, 0, 0), N(0, 1, 0, 0))
Usually, we have that i
th generator of a lattice is 'dual' (don't know whether that's the right adjective) to the i
th generator of the dual lattice. Here, however, there is an additional reordering going on.
As a consequence, we have the following behavior:
sage: cones = [Cone([B[0], B[1]]), Cone([B[1], -3*B[0]-2*B[1]]), Cone([-3*B[0]-2*B[1], B[0]])]
sage: X = ToricVariety(Fan(cones))
sage: p = (-X.K()).polyhedron(); p
A 2-dimensional polyhedron in QQ^2 defined as the convex hull of 3 vertices
sage: p.integral_points()
((-1, -1), (-1, 0), (-1, 1), (-1, 2), (0, -1), (0, 0), (1, -1))
sage: (-X.K()).sections()
(M[-1, -1, 0, 0],
M[0, -1, 0, 0],
M[1, -1, 0, 0],
M[2, -1, 0, 0],
M[-1, 0, 0, 0],
M[0, 0, 0, 0],
M[-1, 1, 0, 0])
which leads directly to this (obviously incorrect, see the z1^-3
) output:
sage: (-X.K()).sections_monomials()
(z1^6, z0*z1^3, z0^2, z0^3/z1^3, z1^4*z2, z0*z1*z2, z1^2*z2^2)
What should be changed? Finding the generators of a dual of a lattice? The polyhedron method of the divisor? The monomial method of the divisor?
Just reordering may not be sufficient in more complicated examples.
I think the assumption is that pairing between dual lattices is the "usual dot product", i.e. sum of products of corresponding components. If this is not the case for a particular representation, then everything will go wrong. Solutions are to either set generators of the dual upon construction correctly or set the pairing properly. Given that is natural for pairing, it may be a bit counterintuitive to have `M(1,0) N(0,1) == 1`, so forcing a correct basis seems like a better option.
Work Issues: fix inner product between N and M
Stopgaps: wrongAnswerMarker
Currently, there's a problem with toric divisors of toric varieties created from fans that live in a sublattice.
The following examples illustrates that:
However, the real polyhedron should be a two-dimensional compact polygon:
CC: @vbraun @novoselt @sagetrac-jakobkroeker
Component: algebraic geometry
Keywords: toric
Stopgaps: wrongAnswerMarker
Work Issues: fix inner product between N and M
Author: Jan Keitel
Branch/Commit: u/jkeitel/toric_divisors_sublattice @
108339b
Reviewer: Andrey Novoseltsev, Volker Braun
Issue created by migration from https://trac.sagemath.org/ticket/16334