hilbert-modular-group 0.1.0__tar.gz → 0.1.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of hilbert-modular-group might be problematic. Click here for more details.
- {hilbert_modular_group-0.1.0 → hilbert_modular_group-0.1.2}/Dockerfile +2 -2
- {hilbert_modular_group-0.1.0 → hilbert_modular_group-0.1.2}/Makefile +8 -8
- hilbert_modular_group-0.1.2/PKG-INFO +193 -0
- {hilbert_modular_group-0.1.0 → hilbert_modular_group-0.1.2}/README.md +6 -1
- {hilbert_modular_group-0.1.0 → hilbert_modular_group-0.1.2}/entrypoint.sh +1 -1
- {hilbert_modular_group-0.1.0 → hilbert_modular_group-0.1.2}/examples/ExamplesK1.ipynb +6 -6
- {hilbert_modular_group-0.1.0 → hilbert_modular_group-0.1.2}/examples/ExamplesK2.ipynb +15 -14
- {hilbert_modular_group-0.1.0 → hilbert_modular_group-0.1.2}/examples/ExamplesK3.ipynb +2 -2
- {hilbert_modular_group-0.1.0 → hilbert_modular_group-0.1.2}/examples/ExamplesK4.ipynb +3 -3
- hilbert_modular_group-0.1.2/hilbert_modular_group.egg-info/PKG-INFO +193 -0
- {hilbert_modular_group-0.1.0 → hilbert_modular_group-0.1.2}/setup.py +22 -4
- {hilbert_modular_group-0.1.0 → hilbert_modular_group-0.1.2}/src/hilbert_modgroup/hilbert_modular_group_class.py +63 -58
- {hilbert_modular_group-0.1.0 → hilbert_modular_group-0.1.2}/src/hilbert_modgroup/pullback.py +95 -78
- {hilbert_modular_group-0.1.0 → hilbert_modular_group-0.1.2}/src/hilbert_modgroup/pullback_cython.pyx +1 -7
- {hilbert_modular_group-0.1.0 → hilbert_modular_group-0.1.2}/src/hilbert_modgroup/upper_half_plane.pyx +10 -11
- hilbert_modular_group-0.1.2/src/hilbert_modgroup/version.py +16 -0
- {hilbert_modular_group-0.1.0 → hilbert_modular_group-0.1.2}/tox.ini +13 -6
- hilbert_modular_group-0.1.0/PKG-INFO +0 -187
- hilbert_modular_group-0.1.0/hilbert_modular_group.egg-info/PKG-INFO +0 -187
- hilbert_modular_group-0.1.0/src/hilbert_modgroup/version.py +0 -5
- {hilbert_modular_group-0.1.0 → hilbert_modular_group-0.1.2}/.github/workflows/docker-image.yml +0 -0
- {hilbert_modular_group-0.1.0 → hilbert_modular_group-0.1.2}/.gitignore +0 -0
- {hilbert_modular_group-0.1.0 → hilbert_modular_group-0.1.2}/.relint.yaml +0 -0
- {hilbert_modular_group-0.1.0 → hilbert_modular_group-0.1.2}/CHANGELOG.md +0 -0
- {hilbert_modular_group-0.1.0 → hilbert_modular_group-0.1.2}/LICENSE +0 -0
- {hilbert_modular_group-0.1.0 → hilbert_modular_group-0.1.2}/MANIFEST.in +0 -0
- {hilbert_modular_group-0.1.0 → hilbert_modular_group-0.1.2}/examples/plot.py +0 -0
- {hilbert_modular_group-0.1.0 → hilbert_modular_group-0.1.2}/hilbert_modular_group.egg-info/SOURCES.txt +0 -0
- {hilbert_modular_group-0.1.0 → hilbert_modular_group-0.1.2}/hilbert_modular_group.egg-info/dependency_links.txt +0 -0
- {hilbert_modular_group-0.1.0 → hilbert_modular_group-0.1.2}/hilbert_modular_group.egg-info/top_level.txt +0 -0
- {hilbert_modular_group-0.1.0 → hilbert_modular_group-0.1.2}/pyproject.toml +0 -0
- {hilbert_modular_group-0.1.0 → hilbert_modular_group-0.1.2}/setup.cfg +0 -0
- {hilbert_modular_group-0.1.0 → hilbert_modular_group-0.1.2}/src/hilbert_modgroup/__init__.py +0 -0
- {hilbert_modular_group-0.1.0 → hilbert_modular_group-0.1.2}/src/hilbert_modgroup/all.py +0 -0
- {hilbert_modular_group-0.1.0 → hilbert_modular_group-0.1.2}/src/hilbert_modgroup/hilbert_modular_group_element.pyx +0 -0
- {hilbert_modular_group-0.1.0 → hilbert_modular_group-0.1.2}/src/hilbert_modgroup/upper_half_plane.pxd +0 -0
- {hilbert_modular_group-0.1.0 → hilbert_modular_group-0.1.2}/src/hilbert_modgroup/utils.py +0 -0
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
ARG REMOTE_SRC=1
|
|
2
2
|
ARG GIT_BRANCH=develop
|
|
3
3
|
|
|
4
|
-
FROM sagemath/sagemath:
|
|
4
|
+
FROM --platform=linux/amd64 sagemath/sagemath:10.3 as base
|
|
5
5
|
RUN sudo apt-get update
|
|
6
6
|
RUN sudo apt-get -y install git
|
|
7
7
|
|
|
8
8
|
FROM base as use-git-1
|
|
9
9
|
RUN git clone https://github.com/fredstro/hilbertmodgroup.git
|
|
10
10
|
WORKDIR "hilbertmodgroup"
|
|
11
|
-
RUN git config pull.rebase false && git checkout $GIT_BRANCH
|
|
11
|
+
RUN git config pull.rebase false && git checkout ${GIT_BRANCH}
|
|
12
12
|
|
|
13
13
|
FROM base as use-git-0
|
|
14
14
|
ARG GIT_BRANCH=''
|
|
@@ -45,29 +45,29 @@ examples:
|
|
|
45
45
|
--NotebookApp.browser=x-www-browser
|
|
46
46
|
|
|
47
47
|
tox:
|
|
48
|
-
sage -pip install tox
|
|
49
|
-
sage --python -m tox
|
|
48
|
+
sage -pip install tox meson
|
|
49
|
+
sage --python -m tox -c tox.ini -e $(TOX_ARGS)
|
|
50
50
|
|
|
51
51
|
docker:
|
|
52
52
|
docker build --build-arg GIT_BRANCH=$(GIT_BRANCH) --build-arg REMOTE_SRC=$(REMOTE_SRC) -t hilbertmodgroup-$(TAG) .
|
|
53
53
|
|
|
54
54
|
docker-rebuild:
|
|
55
|
-
docker build --build-arg GIT_BRANCH=$(GIT_BRANCH) --build-arg REMOTE_SRC=$(REMOTE_SRC) --no-cache -t hilbertmodgroup
|
|
55
|
+
docker build --build-arg GIT_BRANCH=$(GIT_BRANCH) --build-arg REMOTE_SRC=$(REMOTE_SRC) --no-cache -t hilbertmodgroup-$(TAG) .
|
|
56
56
|
|
|
57
57
|
docker-test: docker
|
|
58
|
-
docker run -it --init hilbertmodgroup-$(
|
|
58
|
+
docker run --platform linux/amd64 -it -e GIT_BRANCH=$(GIT_BRANCH) --init hilbertmodgroup-$(TAG) test
|
|
59
59
|
|
|
60
60
|
docker-examples: docker
|
|
61
|
-
docker run -p $(NBPORT):$(NBPORT) -it -e GIT_BRANCH=$(GIT_BRANCH) -e NBPORT=$(NBPORT) --init hilbertmodgroup-$(TAG) examples $(EXAMPLES_ARGS)
|
|
61
|
+
docker run --platform linux/amd64 -p $(NBPORT):$(NBPORT) -it -e GIT_BRANCH=$(GIT_BRANCH) -e NBPORT=$(NBPORT) --init hilbertmodgroup-$(TAG) examples $(EXAMPLES_ARGS)
|
|
62
62
|
|
|
63
63
|
docker-tox: docker
|
|
64
|
-
docker run -it -e GIT_BRANCH=$(GIT_BRANCH) -e TOX_ARGS=$(TOX_ARGS) --init hilbertmodgroup-$(TAG) tox
|
|
64
|
+
docker run --platform linux/amd64 -it -e GIT_BRANCH=$(GIT_BRANCH) -e TOX_ARGS=$(TOX_ARGS) --init hilbertmodgroup-$(TAG) tox
|
|
65
65
|
|
|
66
66
|
docker-shell: docker
|
|
67
|
-
docker run -it -e GIT_BRANCH=$(GIT_BRANCH) --init hilbertmodgroup-$(TAG) shell
|
|
67
|
+
docker run --platform linux/amd64 -it -e GIT_BRANCH=$(GIT_BRANCH) --init hilbertmodgroup-$(TAG) shell
|
|
68
68
|
|
|
69
69
|
docker-sage: docker
|
|
70
|
-
docker run -it -e GIT_BRANCH=$(GIT_BRANCH) --init hilbertmodgroup-$(TAG) run
|
|
70
|
+
docker run --platform linux/amd64 -it -e GIT_BRANCH=$(GIT_BRANCH) --init hilbertmodgroup-$(TAG) run
|
|
71
71
|
|
|
72
72
|
|
|
73
73
|
clean:
|
|
@@ -0,0 +1,193 @@
|
|
|
1
|
+
Metadata-Version: 2.1
|
|
2
|
+
Name: hilbert_modular_group
|
|
3
|
+
Version: 0.1.2
|
|
4
|
+
Summary: Algorithms for Hilbert modular groups
|
|
5
|
+
Home-page: https://github.com/fredstro/hilbertmodgroup
|
|
6
|
+
Author: Fredrik Stromberg
|
|
7
|
+
Author-email: fredrik314@gmail.com
|
|
8
|
+
License: GPL v3+
|
|
9
|
+
Project-URL: Bug Tracker, https://github.com/fredstro/hilbertmodgroup/issues
|
|
10
|
+
Project-URL: Source Code, https://github.com/fredstro/hilbertmodgroup/
|
|
11
|
+
Keywords: "hilbert modular groups,reduction algorithms"
|
|
12
|
+
Platform: any
|
|
13
|
+
Classifier: Development Status :: 4 - Beta
|
|
14
|
+
Classifier: Intended Audience :: Science/Research
|
|
15
|
+
Classifier: License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)
|
|
16
|
+
Classifier: Operating System :: OS Independent
|
|
17
|
+
Classifier: Programming Language :: C
|
|
18
|
+
Classifier: Programming Language :: C++
|
|
19
|
+
Classifier: Programming Language :: Python
|
|
20
|
+
Classifier: Programming Language :: Cython
|
|
21
|
+
Classifier: Topic :: Scientific/Engineering :: Mathematics
|
|
22
|
+
Description-Content-Type: text/markdown
|
|
23
|
+
License-File: LICENSE
|
|
24
|
+
|
|
25
|
+
# Hilbert Modular Groups
|
|
26
|
+
|
|
27
|
+
This repository contains a python package `hilbert_modgroup` that implements algorithms
|
|
28
|
+
for Hilbert modular groups, in particular a reduction algorithm. The implementation is written in Python
|
|
29
|
+
and is dependent on SageMath.
|
|
30
|
+
|
|
31
|
+
## Requirements
|
|
32
|
+
- SageMath v9.6+ (https://www.sagemath.org/)
|
|
33
|
+
(Tested on v9.6, v9.7, v10.0 and v10.2)
|
|
34
|
+
|
|
35
|
+
## Installation
|
|
36
|
+
### Using sage pip
|
|
37
|
+
This package needs to be installed in the virtual environment provided by SageMath, and it is therefore necessary
|
|
38
|
+
to run the following command
|
|
39
|
+
```console
|
|
40
|
+
$ sage -pip install --no-build-isolation hilbert-modular-group
|
|
41
|
+
```
|
|
42
|
+
**Note**: The `--no-build-isolation` is necessary as the compiler needs access
|
|
43
|
+
to certain library files from the sage installation and SageMath itself is
|
|
44
|
+
too large to be required as a build dependency.
|
|
45
|
+
As an alternative to this flag you can also specify the environment variable
|
|
46
|
+
SAGE_LIB explicitly.
|
|
47
|
+
|
|
48
|
+
### From git source
|
|
49
|
+
If the SageMath executable `sage` is in the current path you can install from source using the Makefile
|
|
50
|
+
|
|
51
|
+
```console
|
|
52
|
+
$ git clone https://github.com/fredstro/hilbertmodgroup.git
|
|
53
|
+
$ cd hilbertmodgrup
|
|
54
|
+
$ make install
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
### Docker
|
|
58
|
+
If you do not have SageMath installed, but you have docker you can use install this package
|
|
59
|
+
in a docker container built and executed using e.g. `make docker-sage` or `make docker-examples`
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
## Usage
|
|
63
|
+
The package can be imported and used as any other package.
|
|
64
|
+
For example, to find the reduction of the point given by [1+i,1+i] in H^2
|
|
65
|
+
with respect to the Hilbert modular group of Q joint by square-root of 5 write:
|
|
66
|
+
|
|
67
|
+
```
|
|
68
|
+
sage: from hilbert_modgroup.all import *
|
|
69
|
+
sage: H1=HilbertModularGroup(5)
|
|
70
|
+
sage: P1=HilbertPullback(H1)
|
|
71
|
+
sage: z = UpperHalfPlaneProductElement([1+I,1+I])
|
|
72
|
+
sage: P1.reduce(z)
|
|
73
|
+
[1.00000000000000*I, 1.00000000000000*I]
|
|
74
|
+
sage: z = UpperHalfPlaneProductElement([0.25+I/2,1+I])
|
|
75
|
+
sage: P1.reduce(z) # abs tol 1e-10
|
|
76
|
+
[0.694427190999916 + 0.611145618000168*I, -0.309016994374947 + 1.30901699437495*I]
|
|
77
|
+
sage: P1.reduce(z, return_map=True)[1]
|
|
78
|
+
[-1/2*a + 1/2 1/2*a + 1/2]
|
|
79
|
+
[-1/2*a + 1/2 0]
|
|
80
|
+
|
|
81
|
+
```
|
|
82
|
+
For more examples see the embedded doctests (search for `EXAMPLES`) as well as
|
|
83
|
+
the `/examples` directory which contains Jupyter notebook with more extensive
|
|
84
|
+
examples corresponding to the paper
|
|
85
|
+
"Reduction Algorithms for Hilbert Modular Groups" by F. Stromberg. (Reference to appear)
|
|
86
|
+
|
|
87
|
+
## Examples
|
|
88
|
+
|
|
89
|
+
The directory `/examples` contains Jupyter notebooks with example code to illustrate the interface and functionality of this package.
|
|
90
|
+
You can either open them manually from SageMath or run one of the following commands:
|
|
91
|
+
`make examples`
|
|
92
|
+
`make docker-examples`
|
|
93
|
+
which will start up a Jupyter notebook server from sagemath either locally or in a docker container.
|
|
94
|
+
|
|
95
|
+
## Community Guidelines
|
|
96
|
+
|
|
97
|
+
### How to Contribute?
|
|
98
|
+
- Open an issue on GitHub and create a pull / merge request against the `develop` branch.
|
|
99
|
+
### How to report an issue or a problem?
|
|
100
|
+
- First check if the issue is resolved in the `develop` branch. If not, open an issue on GitHub.
|
|
101
|
+
### How to seek help and support?
|
|
102
|
+
- Contact the maintainer, Fredrik Stromberg, at: fredrik314@gmail.com (alternatively at fredrik.stromberg@nottingham.ac.uk)
|
|
103
|
+
|
|
104
|
+
## Development and testing
|
|
105
|
+
|
|
106
|
+
The make file `Makefile` contains a number of useful commands that you can run using
|
|
107
|
+
```console
|
|
108
|
+
$ make <command>
|
|
109
|
+
```
|
|
110
|
+
The following commands are run in your local SagMath environment:
|
|
111
|
+
1. `build` -- builds the package in place (sometimes useful for development).
|
|
112
|
+
2. `sdist` -- create a source distribution in /sdist (can be installed using `sage -pip install sdist/<dist name>`)
|
|
113
|
+
3. `install` -- build and install the package in the currently active sage environment
|
|
114
|
+
4. `clean` -- remove all build and temporary files
|
|
115
|
+
5. `test` -- run sage's doctests (same as `sage -t src/*`)
|
|
116
|
+
6. `examples` -- run a Jupyter notebook with the SageMath kernel initialised at the `/examples` directory.
|
|
117
|
+
7. `tox` -- run `sage -tox` with all environments: `doctest`, `coverage`, `pycodestyle`, `relint`, `codespell`
|
|
118
|
+
Note: If your local SageMath installation does not contain tox this will run `sage -pip install tox`.
|
|
119
|
+
|
|
120
|
+
The following commands are run in an isolated docker container
|
|
121
|
+
and requires docker to be installed and running:
|
|
122
|
+
1. `docker` -- build a docker container with the tag `hilbertmodgroup-{GIT_BRANCH}`
|
|
123
|
+
2. `docker-rebuild` -- rebuild the docker container without cache
|
|
124
|
+
3. `docker-test` -- run SageMath's doctests in the docker container
|
|
125
|
+
4. `docker-examples` -- run a Jupyter notebook with the SageMath kernel initialised at the `/examples` directory
|
|
126
|
+
and exposing the notebook at http://127.0.0.1:8888. The port used can be modified by
|
|
127
|
+
5. `docker-tox` -- run tox with all environments: `doctest`, `coverage`, `pycodestyle`, `relint`, `codespell`.
|
|
128
|
+
6. `docker-shell` -- run a shell in a docker container
|
|
129
|
+
7. `docker-sage` -- run a sage interactive shell in a docker container
|
|
130
|
+
|
|
131
|
+
The following command-line parameters are available
|
|
132
|
+
- `NBPORT` -- set the port of the notebook for `examples` and `docker-examples` (default is 8888)
|
|
133
|
+
- `TOX_ARGS` -- can be used to select one or more of the tox environments (default is all)
|
|
134
|
+
- `REMOTE_SRC` -- set to 0 if you want to use the local source instead of pulling from gitHub (default 1)
|
|
135
|
+
- `GIT_BRANCH` -- the branch to pull from gitHub (used if REMOTE_SRC=1)
|
|
136
|
+
|
|
137
|
+
### Example usage
|
|
138
|
+
Run tox coverage on the branch `main` from gitHub:
|
|
139
|
+
|
|
140
|
+
`make docker-tox REMOTE_SRC=1 GIT_BRANCH=main TOX_ARGS=coverage`
|
|
141
|
+
|
|
142
|
+
Run doctests on the local source with local version of sage:
|
|
143
|
+
|
|
144
|
+
`make tox TOX_ARGS=doctest`
|
|
145
|
+
|
|
146
|
+
Run relint on the local source with docker version of sage:
|
|
147
|
+
|
|
148
|
+
`make docker-tox REMOTE_SRC=0 TOX_ARGS=relint`
|
|
149
|
+
|
|
150
|
+
## Development
|
|
151
|
+
|
|
152
|
+
### GitHub Workflow
|
|
153
|
+
|
|
154
|
+
- There are two long-lived branches `main` and `develop`.
|
|
155
|
+
- The `develop` branch is used for development and can contain new / experimental features.
|
|
156
|
+
- Pull-requests should be based on `develop`.
|
|
157
|
+
- Releases should be based on `main`.
|
|
158
|
+
- The `main` branch should always be as stable and functional as possible. In particular, merges should always happen from `develop` into `main`.
|
|
159
|
+
- Git-Flow is enabled (and encouraged) with feature branches based on `develop` and hotfixes based on `main`.
|
|
160
|
+
|
|
161
|
+
### GitHub Actions
|
|
162
|
+
|
|
163
|
+
Each commit is tested and checked using gitHub actions with tox running:
|
|
164
|
+
- `doctest` -- run all doctests
|
|
165
|
+
- `coverage` -- ensure that all functions and classes are documented
|
|
166
|
+
- `pycodestyle-minimal` -- ensure PEP8 style guide is followed (except we allow max line length 99)
|
|
167
|
+
- `relint` -- relint against some patterns taken from the SageMath source (config file .relint.yaml)
|
|
168
|
+
- `codespell` -- spellchecker
|
|
169
|
+
|
|
170
|
+
To make sure that your commit passes all tests you should `make tox` or `make docker-tox REMOTE_SRC=0` on the command line.
|
|
171
|
+
|
|
172
|
+
### Versions
|
|
173
|
+
|
|
174
|
+
Versioning of this project is managed by setuptools_scm.
|
|
175
|
+
To bump the version create a git tag `x.y.z` and the file
|
|
176
|
+
`src/hilbert_modgroup/version.py` will then be automatically updated to contain
|
|
177
|
+
```
|
|
178
|
+
version = 'x.y.z.???'
|
|
179
|
+
version_tuple = (x, y, z, '???')
|
|
180
|
+
```
|
|
181
|
+
where ??? depends on the state of the current directory.
|
|
182
|
+
If you are creating a new version to release the source directory should be clean.
|
|
183
|
+
|
|
184
|
+
### PyPi
|
|
185
|
+
|
|
186
|
+
To upload new versions to PyPi:
|
|
187
|
+
1. `make sdist` -- creates a source distribution `dist/hilbert_modular_group-x.y.z`
|
|
188
|
+
2. `twine check dist/hilbert_modular_group-x.y.z`
|
|
189
|
+
3. `twine upload --repository pypi dist/hilbert_modular_group-z.y.z`
|
|
190
|
+
|
|
191
|
+
## References:
|
|
192
|
+
|
|
193
|
+
- [](https://doi.org/10.21105/joss.03996)
|
|
@@ -5,7 +5,8 @@ for Hilbert modular groups, in particular a reduction algorithm. The implementat
|
|
|
5
5
|
and is dependent on SageMath.
|
|
6
6
|
|
|
7
7
|
## Requirements
|
|
8
|
-
- SageMath v9.
|
|
8
|
+
- SageMath v9.6+ (https://www.sagemath.org/)
|
|
9
|
+
(Tested on v9.6, v9.7, v10.0 and v10.2)
|
|
9
10
|
|
|
10
11
|
## Installation
|
|
11
12
|
### Using sage pip
|
|
@@ -162,3 +163,7 @@ To upload new versions to PyPi:
|
|
|
162
163
|
1. `make sdist` -- creates a source distribution `dist/hilbert_modular_group-x.y.z`
|
|
163
164
|
2. `twine check dist/hilbert_modular_group-x.y.z`
|
|
164
165
|
3. `twine upload --repository pypi dist/hilbert_modular_group-z.y.z`
|
|
166
|
+
|
|
167
|
+
## References:
|
|
168
|
+
|
|
169
|
+
- [](https://doi.org/10.21105/joss.03996)
|
|
@@ -20,7 +20,7 @@ case $1 in
|
|
|
20
20
|
tox)
|
|
21
21
|
echo "Docker container running tox with $TOX_ARGS"
|
|
22
22
|
sage -pip install tox
|
|
23
|
-
sage -python -m tox -c tox.ini
|
|
23
|
+
sage -python -m tox -c tox.ini -e $TOX_ARGS
|
|
24
24
|
;;
|
|
25
25
|
examples)
|
|
26
26
|
echo "Docker container with Jupyter Notebook interface to run example notebooks."
|
|
@@ -240,7 +240,7 @@
|
|
|
240
240
|
"metadata": {},
|
|
241
241
|
"outputs": [],
|
|
242
242
|
"source": [
|
|
243
|
-
"plot_polygon(p,K1.
|
|
243
|
+
"plot_polygon(p,K1.fractional_ideal(1).integral_basis(),action='show',**norm_args)"
|
|
244
244
|
]
|
|
245
245
|
},
|
|
246
246
|
{
|
|
@@ -256,7 +256,7 @@
|
|
|
256
256
|
"metadata": {},
|
|
257
257
|
"outputs": [],
|
|
258
258
|
"source": [
|
|
259
|
-
"plot_polygon(p,K1.
|
|
259
|
+
"plot_polygon(p,K1.fractional_ideal(1).integral_basis(),action='save',filename='K1.z1.domain1.pgf',**norm_args)"
|
|
260
260
|
]
|
|
261
261
|
},
|
|
262
262
|
{
|
|
@@ -461,7 +461,7 @@
|
|
|
461
461
|
"metadata": {},
|
|
462
462
|
"outputs": [],
|
|
463
463
|
"source": [
|
|
464
|
-
"basis=K1.
|
|
464
|
+
"basis=K1.fractional_ideal(1).integral_basis(); basis"
|
|
465
465
|
]
|
|
466
466
|
},
|
|
467
467
|
{
|
|
@@ -490,7 +490,7 @@
|
|
|
490
490
|
"metadata": {},
|
|
491
491
|
"outputs": [],
|
|
492
492
|
"source": [
|
|
493
|
-
"plot_polygon(p1,K1.
|
|
493
|
+
"plot_polygon(p1,K1.fractional_ideal(1).integral_basis(),action='save',filename='K1.z2.domain1.pgf',xmin=-3,xmax=3,ymin=-3,ymax=3,\n",
|
|
494
494
|
" ticks=[2,2],**norm_args)"
|
|
495
495
|
]
|
|
496
496
|
},
|
|
@@ -550,7 +550,7 @@
|
|
|
550
550
|
],
|
|
551
551
|
"metadata": {
|
|
552
552
|
"kernelspec": {
|
|
553
|
-
"display_name": "SageMath
|
|
553
|
+
"display_name": "SageMath 10.0",
|
|
554
554
|
"language": "sage",
|
|
555
555
|
"name": "sagemath"
|
|
556
556
|
},
|
|
@@ -564,7 +564,7 @@
|
|
|
564
564
|
"name": "python",
|
|
565
565
|
"nbconvert_exporter": "python",
|
|
566
566
|
"pygments_lexer": "ipython3",
|
|
567
|
-
"version": "3.
|
|
567
|
+
"version": "3.11.3"
|
|
568
568
|
}
|
|
569
569
|
},
|
|
570
570
|
"nbformat": 4,
|
|
@@ -252,7 +252,7 @@
|
|
|
252
252
|
"outputs": [],
|
|
253
253
|
"source": [
|
|
254
254
|
"p=P2._candidate_integers_sigma(z,domain='preimage',return_polyhedron=True)\n",
|
|
255
|
-
"plot_polygon(p,K2.
|
|
255
|
+
"plot_polygon(p,K2.fractional_ideal(1).integral_basis(),action='show',xmin=-5,xmax=5,ymin=-4.5,ymax=4.5,**norm_args)"
|
|
256
256
|
]
|
|
257
257
|
},
|
|
258
258
|
{
|
|
@@ -261,7 +261,7 @@
|
|
|
261
261
|
"metadata": {},
|
|
262
262
|
"outputs": [],
|
|
263
263
|
"source": [
|
|
264
|
-
"plot_polygon(p,K2.
|
|
264
|
+
"plot_polygon(p,K2.fractional_ideal(1).integral_basis(),action='save',xmin=-5,xmax=5,ymin=-4.5,ymax=4.5,filename='K2.z1.domain1.pgf',**norm_args)"
|
|
265
265
|
]
|
|
266
266
|
},
|
|
267
267
|
{
|
|
@@ -395,8 +395,8 @@
|
|
|
395
395
|
"outputs": [],
|
|
396
396
|
"source": [
|
|
397
397
|
"p=P2._candidate_integers_sigma(z,domain='preimage',return_polyhedron=True)\n",
|
|
398
|
-
"norm_args = {'norm_bound':P2._bound_for_sigma_norm(z,dist=0.5)}\n",
|
|
399
|
-
"plot_polygon(p,K2.
|
|
398
|
+
"norm_args = {'norm_bound':P2._bound_for_sigma_norm(z,dist=0.5),'xmin':-35,'xmax':35}\n",
|
|
399
|
+
"plot_polygon(p,K2.fractional_ideal(1).integral_basis(),action='show',**norm_args)"
|
|
400
400
|
]
|
|
401
401
|
},
|
|
402
402
|
{
|
|
@@ -405,7 +405,7 @@
|
|
|
405
405
|
"metadata": {},
|
|
406
406
|
"outputs": [],
|
|
407
407
|
"source": [
|
|
408
|
-
"plot_polygon(p,K2.
|
|
408
|
+
"plot_polygon(p,K2.fractional_ideal(1).integral_basis(),action='save',filename='K2.z2.domain1.png',**norm_args)"
|
|
409
409
|
]
|
|
410
410
|
},
|
|
411
411
|
{
|
|
@@ -415,8 +415,9 @@
|
|
|
415
415
|
"outputs": [],
|
|
416
416
|
"source": [
|
|
417
417
|
"p=P2._candidate_integers_sigma(z,domain='polytope',return_polyhedron=True)\n",
|
|
418
|
-
"norm_args = {'norm_bound':P2._bound_for_sigma_norm(z,dist=0.5),'curve_map':P2.basis_matrix_ideal().inverse()
|
|
419
|
-
"
|
|
418
|
+
"norm_args = {'norm_bound':P2._bound_for_sigma_norm(z,dist=0.5),'curve_map':P2.basis_matrix_ideal().inverse(),\n",
|
|
419
|
+
" 'norm_plot_factor':1.5,'ymin':-7,'ymax':7}\n",
|
|
420
|
+
"plot_polygon(p,[1,1],action='show',**norm_args)"
|
|
420
421
|
]
|
|
421
422
|
},
|
|
422
423
|
{
|
|
@@ -425,7 +426,7 @@
|
|
|
425
426
|
"metadata": {},
|
|
426
427
|
"outputs": [],
|
|
427
428
|
"source": [
|
|
428
|
-
"plot_polygon(p,[1,1],action='save',
|
|
429
|
+
"plot_polygon(p,[1,1],action='save',filename='K2.z2.domain2.png',**norm_args)"
|
|
429
430
|
]
|
|
430
431
|
},
|
|
431
432
|
{
|
|
@@ -550,7 +551,7 @@
|
|
|
550
551
|
"source": [
|
|
551
552
|
"p=P2._candidate_integers_sigma(z,domain='preimage',return_polyhedron=True)\n",
|
|
552
553
|
"norm_args = {'norm_bound':P2._bound_for_sigma_norm(z,dist=1.59731464318420)}\n",
|
|
553
|
-
"plot_polygon(p,K2.
|
|
554
|
+
"plot_polygon(p,K2.fractional_ideal(1).integral_basis(),action='show',ticks=[5,5],**norm_args)"
|
|
554
555
|
]
|
|
555
556
|
},
|
|
556
557
|
{
|
|
@@ -559,7 +560,7 @@
|
|
|
559
560
|
"metadata": {},
|
|
560
561
|
"outputs": [],
|
|
561
562
|
"source": [
|
|
562
|
-
"plot_polygon(p,K2.
|
|
563
|
+
"plot_polygon(p,K2.fractional_ideal(1).integral_basis(),action='save',ticks=[5,5],filename='K2.z3.domain1.pgf',**norm_args)"
|
|
563
564
|
]
|
|
564
565
|
},
|
|
565
566
|
{
|
|
@@ -659,7 +660,7 @@
|
|
|
659
660
|
"metadata": {},
|
|
660
661
|
"outputs": [],
|
|
661
662
|
"source": [
|
|
662
|
-
"c.is_Gamma0_equivalent(H2.cusps()[0],K2.
|
|
663
|
+
"c.is_Gamma0_equivalent(H2.cusps()[0],K2.fractional_ideal(1)) # Not equivalent to infinity"
|
|
663
664
|
]
|
|
664
665
|
},
|
|
665
666
|
{
|
|
@@ -668,7 +669,7 @@
|
|
|
668
669
|
"metadata": {},
|
|
669
670
|
"outputs": [],
|
|
670
671
|
"source": [
|
|
671
|
-
"c.is_Gamma0_equivalent(H2.cusps()[1],K2.
|
|
672
|
+
"c.is_Gamma0_equivalent(H2.cusps()[1],K2.fractional_ideal(1),True) #Is equivalent to the other cusp."
|
|
672
673
|
]
|
|
673
674
|
},
|
|
674
675
|
{
|
|
@@ -854,7 +855,7 @@
|
|
|
854
855
|
],
|
|
855
856
|
"metadata": {
|
|
856
857
|
"kernelspec": {
|
|
857
|
-
"display_name": "SageMath
|
|
858
|
+
"display_name": "SageMath 10.0",
|
|
858
859
|
"language": "sage",
|
|
859
860
|
"name": "sagemath"
|
|
860
861
|
},
|
|
@@ -868,7 +869,7 @@
|
|
|
868
869
|
"name": "python",
|
|
869
870
|
"nbconvert_exporter": "python",
|
|
870
871
|
"pygments_lexer": "ipython3",
|
|
871
|
-
"version": "3.
|
|
872
|
+
"version": "3.11.3"
|
|
872
873
|
}
|
|
873
874
|
},
|
|
874
875
|
"nbformat": 4,
|
|
@@ -490,7 +490,7 @@
|
|
|
490
490
|
],
|
|
491
491
|
"metadata": {
|
|
492
492
|
"kernelspec": {
|
|
493
|
-
"display_name": "SageMath
|
|
493
|
+
"display_name": "SageMath 10.0",
|
|
494
494
|
"language": "sage",
|
|
495
495
|
"name": "sagemath"
|
|
496
496
|
},
|
|
@@ -504,7 +504,7 @@
|
|
|
504
504
|
"name": "python",
|
|
505
505
|
"nbconvert_exporter": "python",
|
|
506
506
|
"pygments_lexer": "ipython3",
|
|
507
|
-
"version": "3.
|
|
507
|
+
"version": "3.11.3"
|
|
508
508
|
}
|
|
509
509
|
},
|
|
510
510
|
"nbformat": 4,
|
|
@@ -112,7 +112,7 @@
|
|
|
112
112
|
"metadata": {},
|
|
113
113
|
"outputs": [],
|
|
114
114
|
"source": [
|
|
115
|
-
"K4.
|
|
115
|
+
"K4.fractional_ideal(1).basis()"
|
|
116
116
|
]
|
|
117
117
|
},
|
|
118
118
|
{
|
|
@@ -230,7 +230,7 @@
|
|
|
230
230
|
],
|
|
231
231
|
"metadata": {
|
|
232
232
|
"kernelspec": {
|
|
233
|
-
"display_name": "SageMath
|
|
233
|
+
"display_name": "SageMath 10.0",
|
|
234
234
|
"language": "sage",
|
|
235
235
|
"name": "sagemath"
|
|
236
236
|
},
|
|
@@ -244,7 +244,7 @@
|
|
|
244
244
|
"name": "python",
|
|
245
245
|
"nbconvert_exporter": "python",
|
|
246
246
|
"pygments_lexer": "ipython3",
|
|
247
|
-
"version": "3.
|
|
247
|
+
"version": "3.11.3"
|
|
248
248
|
}
|
|
249
249
|
},
|
|
250
250
|
"nbformat": 4,
|