This repository contains the implementation of the algorithms and the results of the computations described in the paper.
arXiv: 2503.03478
Authors: Chenfeng He, Gaurish Korpal, Ha Tran, and Christelle Vincent
This directory contains all the functions that can be called to run various experiments.
functions/
├── __init__.py
├── fp/
│ ├── __init__.py
│ ├── gross/
│ │ ├── __init__.py
│ │ ├── numeric.py
│ │ ├── symbolic.py
│ │ └── type.py
│ └── ibukiyama/
│ ├── __init__.py
│ └── maximal.py
└── fp2/
├── __init__.py
├── deuring/
│ ├── __init__.py
│ ├── correspondence.py
│ ├── cost.py
│ ├── klpt.py
│ └── xonly.py
└── eichler/
├── __init__.py
├── bounds.py
└── maximal.py
The __init__.py (empty) files are required to make Python treat directories containing the file as packages. The rest of the files in each subdirectory are described below.
Contains all functions that work only for supersingular elliptic curves with j-invariant lying in
-
gross: Contains the algorithms from our paper.-
numeric.pyandsymbolic.pycontain SageMath implementations of our algorithm that let one compute the Gram matrix of the minimal Gross lattice given the first successive minima$D_1$ value. -
type.pycontains a function to classify and extract parameters from the Gram matrix of the minimal Gross lattice into one of the four types described in the paper for the 13 CM curves over$\mathbb{Q}$ .
-
-
ibukiyama:maximal.pycontains a SageMath implementation of the algorithm from Li-Ouyang-Xu that lets us compute Ibukiyama's maximal orders$O(q,r)$ and$O'(q,r)$ . It also contains other helper functions to compute the Gross lattice and Gram matrix.
Contains all functions that work for all supersingular elliptic curves with j-invariant lying in
-
deuring: Contains a copy of the code by Eriksen-Panny-Sotáková-Veroni and the necessary intra-package references. This lets us find the j-invariant corresponding to a given maximal order in quaternion algebra$B_{p}$ . -
eichler: An add-on to SageMath's Quaternion Algebra functionality.-
maximal.pyutilizes SageMath's interface to Magma so that we can use the algorithm from Kirschmer-Voight to compute all the maximal orders of$B_{p}$ . -
bounds.pycontains an implementation of the bounds on the third successive minima$D_3$ of the Gross lattice.
-
This directory contains scripts that implement various experiments.
scripts/
├── CM_Gross/
│ ├── cm.sage
│ └── ref/
├── CM_Gross_finite_cases/
│ ├── cm_finite.sage
│ └── ref/
├── family_20/
│ ├── fam20.sage
│ └── ref/
├── family_20_2mod3/
│ ├── fam2mod3.sage
│ └── ref/
├── finite_cases/
│ ├── finite.sage
│ └── ref/
├── NE_values/
│ ├── NEvalue.sage
│ └── ref/
├── toy_Gross/
│ ├── csidh419gross.sage
│ └── ref/
├── toy_Ibukiyama/
│ ├── csidh419.sage
│ └── ref/
└── toy_Kaneko/
├── csidh419kaneko.sage
└── ref/
The subdirectory ref/ contains the reference outputs of these scripts. The rest of the files in each subdirectory are described below.
Contains the script that symbolically computes the Gram matrix of the minimal Gross lattice of all 13 CM curves over
- One can run the script by navigating to this directory and then executing
$ sage cm.sage <d>where<d>is the absolute value of the CM discriminant of one of the 13 CM curves over$\mathbb{Q}$ , namely${3,4,7,8,11,12,16,19,27,28,43,67,163}$ . - The
ref/directory contains outputs for all 13 values ofd. For example,$ sage cm.sage 163will generatecm_163.txtthat contains all 81 possible Gram matrices.
Note: Can ignore this. We got rid of dependency on 37.
Contains the script that computes the Eisenstein reduced Gram matrix of the Gross lattice for the CM curves over
- One can run the script by navigating to this directory and then executing
$ sage cm_finite.sage <d>where<d>is the absolute value of the CM discriminant of one of the 5 CM curves over$\mathbb{Q}$ , namely${3,4,7,8,11}$ . - The
ref/directory contains outputs for all 5 values ofd. For example,$ sage cm_finite.sage 8will generatecases_8.txtthat contains all 3 Gram matrices of interest.
Contains the script that computes Eisenstein reduced Gram matrices of all maximal orders with the first successive minima equal to 20 and lying in
- One can run the script by navigating to this directory and then executing
$ sage fam20.sage <c> <M> <N>where<c>is${1,3,5,\ldots,17,19}$ and$0<M<N$ . - The
ref/directory contains outputs for all 10 values ofc. For example,$ sage fam20.sage 19 1 500will generatefam20_19_1_500.txtthat contains all 10 Gram matrices of interest. In particular, fromfam20_11_1_500.txtandfam20_19_1_500.txt, one can observe that for the prime families like$p \equiv 11 \pmod{20}$ and$p \equiv 19 \pmod{20}$ , all curves lie over$\mathbb{F}_p$ and the Gram matrices are one of the four types.
Contains the script that computes the j-invariants of all maximal orders with the first successive minima equal to 20 and lying in
- One can run the script by navigating to this directory and then executing
$ sage fam2mod3.sage <c> <M> <N>where<c>is${13,17}$ and$0<M<N$ . - The
ref/directory contains outputs for all 10 values ofc. For example,$ sage fam2mod3.sage 13 20 1000will generatefam2mod3_13_20_1000.txtthat contains all 10 Gram matrices of interest.
Contains the script that computes Eisenstein reduced Gram matrices of all maximal orders with the first successive minima equal to
- One can run the script by navigating to this directory and then executing
$ sage finite.sage <M> <N>where$0<M<N$ . - The
ref/directory contains output for finite cases to verify$D_3$ bound. For example,$ sage finite.sage 1 100will generatecases_1_100.txtthat contains all Gram matrices of interest. In particular, fromcases_1_100.txtone can observe that for the primes up to 100,$D_3 \le \frac{3}{5}p+5$ for curves not defined over$\mathbb{F}_p$ ,$D_3 = \frac{4p+1}{3}$ for$j$ -invariant$=0$ , and$p \leq D_3 \le \frac{8}{7}p+\frac{7}{4}$ for other curves defined over$\mathbb{F}_p$ . Furthermore, observe that for$p = 19$ and$p=47$ , we get$D_3 = \lfloor \frac{8}{7}p+\frac{7}{4} \rfloor$ .
Contains the script to estimate
- One can run the script by navigating to this directory and then executing
$ sage NEvalue.sage <d>where<d>is the absolute value of the CM discriminant of one of the 13 CM curves over$\mathbb{Q}$ , namely${3,4,7,8,11,12,16,19,27,28,43,67,163}$ . - The
ref/directory contains outputs for all 13 values ofd. For example,$ sage NEvalue.sage 27will generateNE_27.txtthat contains the$N_E$ value.
Contains the script to numerically compute the Gram matrix of the minimal Gross lattice of all elliptic curves given toy_Ibukiyama/ and test if they belong to the isogeny graph of CSIDH for
- One can run the script by navigating to this directory and then executing
$ sage csidh419gross.sage. - The
ref/directory contains the outputcsidh419gross.txtwith all the Gram matrices. From this, one can observe that for the fixed prime$p=419$ , if the curve lies over$\mathbb{F}_p$ , then the Gram matrices are one of the four types.
Contains the script that computes Eisenstein reduced Gram matrices of all elliptic curves belonging to the isogeny graph of CSIDH for
- One can run the script by navigating to this directory and then executing
$ sage csidh419.sage. - The
ref/directory contains outputcsidh419.txtwith all the maximal orders and Gram matrices. From this, one can observe the$D_1$ values for all curves over$\mathbb{F}_p$ and with endomorphism ring of type$O(q,r)$ .
Contains the script to numerically compute the Gram matrix of the minimal Gross lattice of all elliptic curves given
- One can run the script by navigating to this directory and then executing
$ sage csidh419kaneko.sage. - The
ref/directory contains the outputcsidh419kaneko.txtwith all the Gram matrices. From this, one can observe that for the fixed prime$p=419$ , we get minimal Gross lattice for$D_1 \in {3, 4, 7, 12, 15, 16, 20, 23, 27, 28, 35, 36, 39, 43, 47}$ which matches with the$D_1$ values obtained fromtoy_Ibukiyama/, except for$43$ and$47$ .
The code was written and tested on a system with the following specifications:
CPU: 12th Gen Intel i7-12800HX (24)
Memory: 15843MiB
OS: Ubuntu 22.04.5 LTS on Windows 11 x86_64 (WSL)
Software: SageMath version 10.3 and Magma V2.28-8