#9504: Add support for toric sublattices
----------------------------------+-----------------------------------------
   Reporter:  novoselt            |       Owner:  mhampton  
       Type:  enhancement         |      Status:  needs_work
   Priority:  major               |   Milestone:  sage-4.5.2
  Component:  geometry            |    Keywords:            
     Author:  Andrey Novoseltsev  |    Upstream:  N/A       
   Reviewer:                      |      Merged:            
Work_issues:  quotient lattices   |  
----------------------------------+-----------------------------------------
Changes (by novoselt):

 * cc: vbraun (added)
  * work_issues:  documentation and quotients => quotient lattices


Comment:

 Hi Volker,

 The new version of the patch is completely documented, does not brake
 anything in existing modules anymore, and in general, I think, provides
 quite satisfactory support for toric sublattices, with the exception of
 `dual` which requires quotient lattices and I need some input on them.

 For sublattices, as before, I have followed `ZZ^n` behaviour with minimal
 interference and it seems to work just fine. For quotients it is probably
 not the way to go, since we are considering a special case of quotients
 without torsion. Look at the following example:
 {{{
 sage: N = ToricLattice(3)
 sage: Ns = N.submodule_with_basis([N(1,2,3)])
 sage: Ns
 Free module of degree 3 and rank 1 over Integer Ring
 User basis matrix:
 [1 2 3]
 sage: Ns.basis()
 [
 N(1, 2, 3)
 ]
 sage: Ns(N(1,2,3))
 N(1, 2, 3)
 sage: N.dual().gen(0) * Ns.gen(0)
 1
 sage: Q = N/Ns
 sage: Q
 Finitely generated module V/W over Integer Ring with invariants (0, 0)
 sage: Q.gens()
 ((1, 0), (0, 1))
 sage: Q.gen(0).lift()
 N(0, 0, 1)
 sage: Q(N(3,2,1))
 (-8, -4)
 sage: N.dual().gen(0) * Q.gen(0)
 ...
 TypeError: unsupported operand parent(s) for '*':
 '3-d lattice M' and 'Finitely generated module V/W
 over Integer Ring with invariants (0, 0)'
 }}}
 Elements of `N` and its sublattice are actually represented by elements of
 `N` (although elements of `Ns` know internally that they belong to `Ns`,
 i.e. their `parent` is `Ns`). Elements of `Q`, on the other hand, are
 represented by their coordinates in some basis. The natural dual of `Q` is
 some sublattice of `N.dual()`, so in this notation we will have as a legal
 operation something like `Q(1,2) * M(3,0,-1)` which does not look nice to
 me. Plus, `Q` here cannot be a toric lattice in the same sense as `N`
 since `N` is unique but it may have different 2-dimensional quotient
 lattices with different coercion maps.

  * What do you think about representing elements of `Q` by elements of `N`
 as well? `Q(N(e))` can either be "the same" as `e`, or we can convert any
 input to its "canonical" representative with respect to the fixed lift. I
 think the second choice is probably better. Of course, it still will be
 possible to get coordinates of elements in a basis of the quotient.
  * Should we somehow distinguish these quotient elements in
 printing/latexing? In LaTeX it makes sense just to draw a bar over the
 whole representative, printing is a bit trickier. Maybe `N/(1,2,3)` or
 `N-(1,2,3)`? These do look like arithmetic operations, but since they
 should not appear in expressions, it should not be too confusing,
 especially the first form with "quotient by a vector".
  * Do we care about the choice of the basis for the quotient? I.e. should
 there be a possibility to specify it? If not, I think the best way is to
 take the same one as is generated by the standard quotient method. (If
 yes, we can also choose the basis of dual quotient/sublattice as dual to
 the basis of the original sublattice/quotient.)

 Let me know what you think,

 Andrey

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/9504#comment:3>
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.

Reply via email to