sagemath / sage

Main repository of SageMath
https://www.sagemath.org
Other
1.33k stars 453 forks source link

Gluing of lattices #24564

Closed 1097c7af-5dad-420f-ba93-7f4848ba04d1 closed 6 years ago

1097c7af-5dad-420f-ba93-7f4848ba04d1 commented 6 years ago

Let L1,...,Ln n integer lattices and A_L1,..., A_Ln their discriminant groups. If G1,...,Gn are subgroups of the A_Li and v_i,1,...,v_i,k vectors of Gi, such that the span of (v_1,1+...+v_n,1,...,v_1,k+...+v_n,k) is isotropical then we can define the "gluing" L, an overlattice of L1 +...+ Ln

Depends on #24702

Component: quadratic forms

Keywords: IntegralLattice

Author: Paolo Menegatti

Branch/Commit: e4b326b

Reviewer: Simon Brandhorst

Issue created by migration from https://trac.sagemath.org/ticket/24564

simonbrandhorst commented 6 years ago

Changed keywords from lattices to IntegralLattice

simonbrandhorst commented 6 years ago

Description changed:

--- 
+++ 
@@ -1,2 +1,2 @@
-Let L1,L2 two integer lattices and A_L1, A_L2 their discriminant groups.
-If G1,G2 are subgroups of A_L1 and AL2 respectively and f:G1-->G2 an isomorphisme of group we could define the "gluing" L, a primitive extension of L1+L2-->L
+Let `L1`,`L2` two integer lattices and `A_L1`, `A_L2` their discriminant groups.
+If `G1`, `G2` are subgroups of `A_L1` and `A_L2` respectively and `f: G1 --> G2` an isomorphism of groups we can define the "gluing" `L`, a primitive extension of `L1 + L2 --> L`
1097c7af-5dad-420f-ba93-7f4848ba04d1 commented 6 years ago

Branch: u/pmenegat/primitive_extension_of_lattices

7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 6 years ago

Commit: e6cae6d

7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 6 years ago

Branch pushed to git repo; I updated commit sha1. New commits:

1097c7af-5dad-420f-ba93-7f4848ba04d1 commented 6 years ago

Dependencies: u/sbrandhorst/intersections_of_freequadraticmodules_have_the_wrong_ambient_module

simonbrandhorst commented 6 years ago

Changed dependencies from u/sbrandhorst/intersections_of_freequadraticmodules_have_the_wrong_ambient_module to #24702

7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 6 years ago

Changed commit from e6cae6d to 9506670

7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 6 years ago

Branch pushed to git repo; I updated commit sha1. New commits:

f341138Fix free_module.intersection
8759cb1Fix free_module.saturation
0dd7769Indentation
9506670Addes methods ``mul`` which return the lattice with the Gram matrix multiplied by en integer and ```PrimitiveExtension`` which return the primitive extension of a list of lattices, gluing them using elements of the discriminant groups
1097c7af-5dad-420f-ba93-7f4848ba04d1 commented 6 years ago

New commits:

f341138Fix free_module.intersection
8759cb1Fix free_module.saturation
0dd7769Indentation
9506670Addes methods ``mul`` which return the lattice with the Gram matrix multiplied by en integer and ```PrimitiveExtension`` which return the primitive extension of a list of lattices, gluing them using elements of the discriminant groups
1097c7af-5dad-420f-ba93-7f4848ba04d1 commented 6 years ago

Description changed:

--- 
+++ 
@@ -1,2 +1,2 @@
-Let `L1`,`L2` two integer lattices and `A_L1`, `A_L2` their discriminant groups.
-If `G1`, `G2` are subgroups of `A_L1` and `A_L2` respectively and `f: G1 --> G2` an isomorphism of groups we can define the "gluing" `L`, a primitive extension of `L1 + L2 --> L`
+Let `L1`,...,`Ln` `n` integer lattices and `A_L1`,..., `A_Ln` their discriminant groups.
+If `G1`,...,`Gn` are subgroups of the `A_Li` and `fi: Gi --> AL` `n` morphism of groups, we can define the "gluing" `L`, a primitive extension of `L1 +...+ Ln --> L`
simonbrandhorst commented 6 years ago
comment:8

The mul function is a good idea. But please make it a separate ticket.

What you define is an extension - but it is not primitive. For this consider your first example

    sage: from sage.modules.free_quadratic_module_integer_symmetric import PrimitiveExtension
    sage: L1 = IntegralLattice(matrix([[4]]))
    sage: g1 = L1.discriminant_group().gens()[0]
    sage: glue = [[2*g1]]
    sage: PrimitiveExtension([L1],glue)
    Lattice of degree 1 and rank 1 over Integer Ring
    Basis matrix:
    [1]
    Inner product matrix:
    [1]
    ....

A single lattice does not have any primitive extensions.

Your code breaks if the lattices have a given basis different from the standard one. It is not enough to just consider the gram matrices.:

sage: from sage.modules.free_quadratic_module_integer_symmetric import PrimitiveExtension
sage: A = IntegralLattice(matrix.identity(2),basis=[(2,2)])
sage: g = A.discriminant_group().gens()
sage: PrimitiveExtension([A,A],[g,g])
.....
TypeError: unsupported operand parent(s) for *: 'Full MatrixSpace of 2 by 1 dense matrices over Integer Ring' and 'Free module of degree 2 and rank 1 over Integer Ring
Echelon basis matrix:
[1/4 1/4]'

Let L1, L2 be two lattices. Then a primitive extension is an overlattice L L1 + L2 -- > L such that L1 * QQ intersected with L is L1 and likewise for L2. Then Nikulin proved: A primitive extension is the same as giving a homomorphism phi: AL1 -- > AL2 on the discriminant groups reversing the sign of the discriminant form: q(x) = -q(phi(x)).

Then my suggestion is to define a method.

def primitive_extension(self, L2, phi):

   1. check that phi is a homomorphism reversing the sign
   2. take the direct sum of L1 and L2
   3. take the graph Gamma of phi inside A_L1 + A_L2
   4. return (L1.direct_sum(L2)).overlattice(Gamma)

And maybe the morphisms defining the embeddings.

1097c7af-5dad-420f-ba93-7f4848ba04d1 commented 6 years ago

Description changed:

--- 
+++ 
@@ -1,2 +1,2 @@
 Let `L1`,...,`Ln` `n` integer lattices and `A_L1`,..., `A_Ln` their discriminant groups.
-If `G1`,...,`Gn` are subgroups of the `A_Li` and `fi: Gi --> AL` `n` morphism of groups, we can define the "gluing" `L`, a primitive extension of `L1 +...+ Ln --> L`
+If `G1`,...,`Gn` are subgroups of the `A_Li` and `v_i,1`,...,`v_i,k` vectors of `Gi`, such that the span of `(v_1,1+...+v_n,1,...,v_1,k+...+v_n,k)' is isotropical then we can define the "gluing" `L`, an overlattice of `L1 +...+ Ln`
1097c7af-5dad-420f-ba93-7f4848ba04d1 commented 6 years ago

Description changed:

--- 
+++ 
@@ -1,2 +1,2 @@
 Let `L1`,...,`Ln` `n` integer lattices and `A_L1`,..., `A_Ln` their discriminant groups.
-If `G1`,...,`Gn` are subgroups of the `A_Li` and `v_i,1`,...,`v_i,k` vectors of `Gi`, such that the span of `(v_1,1+...+v_n,1,...,v_1,k+...+v_n,k)' is isotropical then we can define the "gluing" `L`, an overlattice of `L1 +...+ Ln`
+If `G1`,...,`Gn` are subgroups of the `A_Li` and `v_i,1`,...,`v_i,k` vectors of `Gi`, such that the span of `(v_1,1+...+v_n,1,...,v_1,k+...+v_n,k)` is isotropical then we can define the "gluing" `L`, an overlattice of `L1 +...+ Ln`
7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 6 years ago

Changed commit from 9506670 to 26bacb9

7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 6 years ago

Branch pushed to git repo; I updated commit sha1. New commits:

e8f6bcedeleted mul method
7599c77Added `mul` method
42a790aMerge branch 'u/pmenegat/multiplication_of_the_gram_matrix' of git://trac.sagemath.org/sage into t/24564/primitive_extension_of_lattices
26bacb9`mul` method deleted
7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 6 years ago

Changed commit from 26bacb9 to 930bc87

7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 6 years ago

Branch pushed to git repo; I updated commit sha1. New commits:

46a5c45`mul` method improved
930bc87Merge branch 'u/pmenegat/multiplication_of_the_gram_matrix' of git://trac.sagemath.org/sage into t/24564/primitive_extension_of_lattices
7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 6 years ago

Branch pushed to git repo; I updated commit sha1. New commits:

6c5310ffunction primitive extension moved
adaf3f2minor modifications
7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 6 years ago

Changed commit from 930bc87 to adaf3f2

7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 6 years ago

Changed commit from adaf3f2 to 1f7e304

7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 6 years ago

Branch pushed to git repo; I updated commit sha1. New commits:

6f42b0bRevert "deleted mul method"
699d0c2minor changes
1f7e304merge conflit resolved (?)
7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 6 years ago

Branch pushed to git repo; I updated commit sha1. New commits:

0c15a66Added compatibility for lattice with basis
c85d4absintax modification
7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 6 years ago

Changed commit from 1f7e304 to c85d4ab

1097c7af-5dad-420f-ba93-7f4848ba04d1 commented 6 years ago

Author: Paolo Menegatti

simonbrandhorst commented 6 years ago
comment:18

I think that the ambient spaces should be preserved. If the user has given the lattice a specific basis/ambient space, she probably had a good reason and wants to keep it. As a general rule: We should not forget any information - unless the user explicitly requests it.

Hence, the overlattice (=glued lattice) should live in the direct sum of the respective ambient spaces. I do like that you provide the embeddings. That is a good feature. As a suggestion:

1097c7af-5dad-420f-ba93-7f4848ba04d1 commented 6 years ago

Changed commit from c85d4ab to 9bf9f05

1097c7af-5dad-420f-ba93-7f4848ba04d1 commented 6 years ago

Changed branch from u/pmenegat/primitive_extension_of_lattices to u/pmenegat/gluings

7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 6 years ago

Changed commit from 9bf9f05 to 5499ecb

7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 6 years ago

Branch pushed to git repo; I updated commit sha1. New commits:

5499ecbAdded ``DirectSumLattices`` and ``GlueLattices``
7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 6 years ago

Branch pushed to git repo; I updated commit sha1. New commits:

3e46f37Added documentation for ``LatticeDirectSum``
7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 6 years ago

Changed commit from 5499ecb to 3e46f37

7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 6 years ago

Branch pushed to git repo; I updated commit sha1. New commits:

a04c889Added documentation
7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 6 years ago

Changed commit from 3e46f37 to a04c889

7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 6 years ago

Changed commit from a04c889 to d086e54

7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 6 years ago

Branch pushed to git repo; I updated commit sha1. New commits:

d086e54Input check added
simonbrandhorst commented 6 years ago

Changed branch from u/pmenegat/gluings to u/sbrandhorst/gluings

simonbrandhorst commented 6 years ago
comment:26

you can give it a positive review if you are happy with my changes.


New commits:

e4b326bCleanup
simonbrandhorst commented 6 years ago

Changed commit from d086e54 to e4b326b

1097c7af-5dad-420f-ba93-7f4848ba04d1 commented 6 years ago

Reviewer: Simon Brandhorst

vbraun commented 6 years ago

Changed branch from u/sbrandhorst/gluings to e4b326b