Opened 3 years ago

# Implement isomorphism testing for modular abelian varieties

Reported by: Owned by: klui major sage-9.7 modular forms modular abelian variety isomorphism testing was Kevin Lui N/A u/klui/better_is_isomorphism be26efc2b894db924917423e9fab96df437adaef

This ticket implements isomorphism testing for modular abelian varieties. This code was used for parts of my thesis.

# Algorithm

The algorithm used here is described in Algorithm 2.11 here: https://wstein.org/papers/current/modabvar/modabvar.pdf . This is the same algorithm that William Stein implemented in Magma.

# Bonus Tests

## Isomorphic to Dual?

This code determines which simple subvarieties of the new subvariety of `J0(N)` is isomorphic to its dual.

```# about 2 minutes on i5-8350U
from sage.all import J0

not_isomorphic_to_dual = []
for N in range(1, 100):
Jnew = J0(N).new_subvariety()
for A in Jnew:
buul, f, _ = A.is_isomorphic(Ad, both_maps=True)
if not buul:
not_isomorphic_to_dual.append((A.label(), A.dimension(),
A.hecke_operator(2).matrix().minpoly()))
else:
assert(f.matrix().determinant().abs() == 1)
print(not_isomorphic_to_dual)
```

which yields these 4 abelian varieties:

```[('69b(1,69)', 2, x^2 - 5), ('77d(1,77)', 2, x^2 - 5), ('81a(1,81)', 2, x^2 - 3), ('85c(1,85)', 2, x^2 - 3)]
```

The corresponding Magma should be:

```for N in [1..99] do
D := Decomposition(NewSubvariety(JZero(N)));
for A in D do
try
if not buul then
A, Dimension(A), MinimalPolynomial(HeckeOperator(A, 2));
end if;
catch e
print "The following yields an error!!!";
A, Dimension(A), MinimalPolynomial(HeckeOperator(A, 2));
end try;
end for;
end for;
```

which yields the same 4 abelian varieties:

```Modular abelian variety image(69B) of dimension 2, level 3*23 and conductor 3^2*23^2 over Q
2 x^2 - 5
Modular abelian variety image(77D) of dimension 2, level 7*11 and conductor 7^2*11^2 over Q
2 x^2 - 5
The following yields an error!!!
Modular abelian variety image(81A) of dimension 2, level 3^4 and conductor 3^8 over Q
2 x^2 - 3
The following yields an error!!!
Modular abelian variety image(85C) of dimension 2, level 5*17 and conductor 5^2*17^2 over Q
2 x^2 - 3
```

When this code claims `A` is not isomorphic to `A.dual()[0]`, Magma either agrees or gives a error with a traceback that looks like

```IsIsomorphic(
A: Modular abelian variety image(81A) of dimension 2, level 3^4...,
B: Modular abelian variety of dimension 2 and level 3^4 over Q
)
CanDetermineIsomorphism(
A: Modular abelian variety image(81A) of dimension 2, level 3^4...,
B: Modular abelian variety of dimension 2 and level 3^4 over Q
)
In file "/home/user/magma-2.18/package/Geometry/ModAbVar/modabvar.m", line 1072, column 23:
>>                 Append(~X, K!y);
^
Runtime error in 'Append': Bad argument types
Argument types given: *nothing ~, FldNumElt[FldRat]
```

## `A` is isomorphic to `(A/A.torsion_subgroup(3))[0]`

Here we check that `A` is isomorphic to `(A/A.torsion_subgroup(3))[0]`.

```# about 18 seconds on i5-8350U
from sage.all import J0

for N in range(1, 50):
Jnew = J0(N).new_subvariety()
for A in Jnew:
B = (A / A.torsion_subgroup(3))[0]
buul, f, _ = A.is_isomorphic(B, both_maps=True)
assert(f.matrix().determinant().abs() == 1)
```

### comment:1 Changed 3 years ago by klui

• Branch set to u/klui/better_is_isomorphism

### comment:2 Changed 3 years ago by klui

• Authors set to Kevin Lui
• Description modified (diff)
• Status changed from new to needs_review

Last 10 new commits:

 ​9bdbb74 `Add doctest showing ValueError` ​7150526 `Explain why we assume GRH` ​299406f `Fix bug in in_Hf` ​78bed9b `Add a nonisomorphic example` ​2dc0f79 `Add doctest showing non-maximal order` ​f36566b `Add a return_false function` ​ed1dfdc `Change a comment to better explain __contains__` ​11589bf `Remove isogeny option` ​4dbeb30 `Explain why we assume GRH better` ​00d4814 `Add doctest to _im_gens`

### comment:3 follow-up: ↓ 5 Changed 3 years ago by chapoton

doc does not build, because `hecke_eigenvalue_field` is not formatted properly.

EDIT: same problem in random_element

Last edited 3 years ago by chapoton (previous) (diff)

### comment:4 Changed 3 years ago by git

• Commit changed from 00d4814530222a39adca218247c22070601b650c to 6195fc4c12dc002e8c7d3e0528b544355757dbd8

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

 ​6195fc4 `Fix doc formatting`

### comment:5 in reply to: ↑ 3 Changed 3 years ago by klui

doc does not build, because `hecke_eigenvalue_field` is not formatted properly.

EDIT: same problem in random_element

Thanks! Hopefully this fixes it.

### comment:6 Changed 3 years ago by git

• Commit changed from 6195fc4c12dc002e8c7d3e0528b544355757dbd8 to 19bad569deb3a406b1f16d971d9690aa133acf15

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

 ​19bad56 `Remove unused matrix import`

### comment:7 follow-up: ↓ 9 Changed 3 years ago by chapoton

• please avoid using \$ signs, use backticks ``` instead
• missing `::` in the doc of `isomorphic_order`
• in `random_element` doc, wrong position and formatting for `OUTPUT:`, that should be before the examples.

### comment:8 Changed 3 years ago by git

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

 ​a65ff66 `Change \$ to `` ​be26efc `Fix docstring errors`

### comment:9 in reply to: ↑ 7 Changed 3 years ago by klui

• please avoid using \$ signs, use backticks ``` instead
• missing `::` in the doc of `isomorphic_order`
• in `random_element` doc, wrong position and formatting for `OUTPUT:`, that should be before the examples.

Opps. Thanks!

### comment:10 Changed 2 years ago by embray

• Milestone changed from sage-8.9 to sage-9.1

Ticket retargeted after milestone closed

### comment:11 Changed 2 years ago by mkoeppe

• Milestone changed from sage-9.1 to sage-9.2

Batch modifying tickets that will likely not be ready for 9.1, based on a review of the ticket title, branch/review status, and last modification date.

### comment:12 Changed 21 months ago by mkoeppe

• Milestone changed from sage-9.2 to sage-9.3

### comment:13 Changed 17 months ago by chapoton

• Status changed from needs_review to needs_work

red branch => needs work

### comment:14 Changed 16 months ago by mkoeppe

• Milestone changed from sage-9.3 to sage-9.4

Setting new milestone based on a cursory review of ticket status, priority, and last modification date.

### comment:15 Changed 10 months ago by mkoeppe

• Milestone changed from sage-9.4 to sage-9.5

Setting a new milestone for this ticket based on a cursory review.

### comment:16 Changed 5 months ago by mkoeppe

• Milestone changed from sage-9.5 to sage-9.6

### comment:17 Changed 8 weeks ago by mkoeppe

• Milestone changed from sage-9.6 to sage-9.7
Note: See TracTickets for help on using tickets.