#9296: Add lattice computations for convex polyhedral cones
----------------------------------+-----------------------------------------
Reporter: vbraun | Owner: mhampton
Type: enhancement | Status: needs_info
Priority: major | Milestone: sage-4.5
Component: geometry | Keywords:
Author: Volker Braun | Upstream: N/A
Reviewer: Andrey Novoseltsev | Merged:
Work_issues: |
----------------------------------+-----------------------------------------
Comment(by novoselt):
Actually, I have just tried the following:
{{{
sage: N = ToricLattice(3)
sage: Ns = N.submodule([(1,1,0), (-1,1,0)])
sage: Ns
Free module of degree 3 and rank 2 over Integer Ring
Echelon basis matrix:
[1 1 0]
[0 2 0]
sage: Ns.ambient_module()
3-d lattice N
sage: Ns.ambient_vector_space()
Vector space of dimension 3 over Rational Field
sage: Ns.basis()
[
(1, 1, 0),
(0, 2, 0)
]
sage: N.basis()
[
N(1, 0, 0),
N(0, 1, 0),
N(0, 0, 1)
]
sage: Ns.basis_matrix()
[1 1 0]
[0 2 0]
sage: type(Ns)
<class 'sage.modules.free_module.FreeModule_submodule_pid_with_category'>
sage: Ns.coordinates((2,4,0))
[2, 1]
sage: Ns.linear_combination_of_basis([2,1])
(2, 4, 0)
}}}
So it seems to me that submodules already work quite good for the purposes
of `N_\sigma` and `N(\sigma)`, the only things that have to be addressed
are `_repr_` and using toric lattice elements instead of generic vectors.
It is also possible to construct submodules of submodules, so there is no
problem there.
For quotients more care is necessary since in general they are not
lattices. Perhaps a derived class can intercept the quotient method,
construct a toric lattice if it is possible, and use the general framework
otherwise, leaving toric category. There is no good defaul way to name the
quotient lattice, so there should be a way to give this name somehow, but
I think that is should be fixed once given. Maybe something like this
should work:
{{{
sage: cone = ...
sage: Q = cone.sublattice_quotient("Q")
sage: Q = cone.sublattice_quotient("R")
...
ValueError: cannot rename the quotient by sublattice complement!
sage: Q.projection()
}}}
where Q is constructed as
`cone.lattice().quotient(cone.sublattice_complement(), name="Q")`.
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/9296#comment:16>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/sage-trac?hl=en.