Skip to main content

MCLF

A Sage toolbox for computing with Models of Curves over Local Fields

This is still a rather immature version of our toolbox. Nevertheless, you can use it to compute, for a large class of curves over the rationals, the stable reduction at primes of bad reduction.

Let Y be a smooth projective curve over a field K and let vK be a discrete valuation on K. The principal goal is to compute the semistable reduction of Y with respect to vK. This means that we want to know

  • a finite Galois extension L/K,
  • an extension vL of vK to L,
  • the special fiber of an integral semistable model of Y over the valuation ring of vL, and
  • the action of the decomposition group of vL on that special fiber.

At the moment we can do this only in certain special cases, which should nevertheless be useful.

If you have at least Sage 10 you can install the latest version of this package with

sage -pip install git+https://github.com/MCLF/mclf

The package can be loaded with

sage: from mclf import *

We create a Picard curve over the rational number field.

sage: R.<x> = QQ[]
sage: Y = SuperellipticCurve(x^4-1, 3)
sage: Y
superelliptic curve y^3 = x^4 - 1 over Rational Field

In general, the class SuperellipticCurve allows you to create a superelliptic curve of the form yn = f(x), for a polynomial f over an arbitrary field K. But you can also define any smooth projective curve Y with given function field.

We define the 2-adic valuation on the rational field. Then we are able to create an object of the class SemistableModel which represents a semistable model of the curve Y with respect to the 2-adic valuation.

sage: v_2 = QQ.valuation(2)
sage: Y2 = SemistableModel(Y, v_2)
sage: Y2.is_semistable() # this may take a while
True

The stable reduction of Y at p=2 has four components, one of genus 0 and three of genus 1.

sage: [Z.genus() for Z in Y2.components()]
[0, 1, 1, 1]
sage: Y2.components_of_positive_genus()
[the smooth projective curve with Function field in y defined by y^3 + x^4 + x^2,
 the smooth projective curve with Function field in y defined by y^3 + x^2 + x,
 the smooth projective curve with Function field in y defined by y^3 + x^2 + x + 1]

We can also extract some arithmetic information on the curve Y from the stable reduction. For instance, we can compute the conductor exponent of Y at p=2:

sage: Y2.conductor_exponent()
6

Now let us compute the semistable reduction of Y at p=3:

sage: v_3 = QQ.valuation(3)
sage: Y3 = SemistableModel(Y, v_3)
sage: Y3.is_semistable()
True
sage: Y3.components_of_positive_genus()
[the smooth projective curve with Function field in y defined by y^3 + y + 2*x^4]

We see that Y has potentially good reduction at p=3. The conductor exponent is:

sage: Y3.conductor_exponent()
6

For more details on the functionality and the restrictions of the toolbox, see the Documentation. For the mathematical background see

Known bugs and issues

See our issues list, and tell us of any bugs or omissions that are not covered there.

Development workflow

We recommend that you install pixi to provide all the dependencies for developing mclf. Once pixi is installed, clone this repository and use commands such as

pixi run sage                    # run SageMath with mclf installed
pixi run doctest-long            # run doctests against the latest SageMath
pixi run -e sagemath-100 doctest-long  # run doctests against SageMath 10.0
pixi run readthedocs             # validate the Read the Docs build

Most development happens on feature branches against the master branch. The test workflow runs against SageMath 10.0 through 10.7 on Ubuntu, and also tests SageMath 10.7 on Intel macOS and Apple Silicon macOS. Publishing to PyPI is triggered from a GitHub release.

Metadata

Release files for mclf 1.0.7

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for mclf 1.0.7
File Size Uploaded
mclf-1.0.7.tar.gz 237.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for mclf 1.0.7
File Interpreter ABI Platform
mclf-1.0.7-py3-none-any.whl Python 3 none any Details

Total release size: 378.8 kB

Release files / mclf-1.0.7.tar.gz

Download URL mclf-1.0.7.tar.gz
Size 237.9 kB
Tags Source
SHA-256 checksum
How to use checksums
e5cdd255030f2dcd8e324445c6675593f60685b68b36d242944f9de2c7f9d778
BLAKE2b-256 checksum
How to use checksums
94773094a238b8f72d59bd9f9b0dd2d446264e527ce49394f2781e26adecd0d2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Apr 3, 2026.

Transparency log

Release files / mclf-1.0.7-py3-none-any.whl

Download URL mclf-1.0.7-py3-none-any.whl
Size 140.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c60a873c11ff09422332586683c711fde530f953f1598118143fdf68ddfae474
BLAKE2b-256 checksum
How to use checksums
671eadf20c056795b14400fa8e41ce80e9926e6d83dc6ff879014d6e935a0d7a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Apr 3, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

1.0.7 This release

2 release files

1.0.4

2 release files

1.0.3

3 release files

1.0.2

3 release files

1.0.1

3 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page