Skip to content

feat: add formula for the j-invariant of an elliptic curve#41504

Open
Paul-Lez wants to merge 3 commits into
leanprover-community:masterfrom
Paul-Lez:discr-formula
Open

feat: add formula for the j-invariant of an elliptic curve#41504
Paul-Lez wants to merge 3 commits into
leanprover-community:masterfrom
Paul-Lez:discr-formula

Conversation

@Paul-Lez

@Paul-Lez Paul-Lez commented Jul 8, 2026

Copy link
Copy Markdown
Collaborator

This doesn't seem to be in Mathlib yet (?).


Open in Gitpod

@Paul-Lez Paul-Lez requested a review from Multramate July 8, 2026 15:52
@github-actions

github-actions Bot commented Jul 8, 2026

Copy link
Copy Markdown

PR summary ce9a86929f

Import changes for modified files

No significant changes to the import graph

Import changes for all files
Files Import difference

Declarations diff (regex)

+ j_eq

You can run this locally as follows
## from your `mathlib4` directory:
git clone https://github.com/leanprover-community/mathlib-ci.git ../mathlib-ci

## summary with just the declaration names:
../mathlib-ci/scripts/pr_summary/declarations_diff.sh <optional_commit>

## more verbose report:
../mathlib-ci/scripts/pr_summary/declarations_diff.sh long <optional_commit>

The doc-module for scripts/pr_summary/declarations_diff.sh in the mathlib-ci repository contains some details about this script.

Declarations diff (Lean)

Lean-aware diff — post-build, computed from the Lean environment (commit ce9a869).

  • +1 new declarations
  • −0 removed declarations
+WeierstrassCurve.j_eq

No changes to strong technical debt.

No changes to weak technical debt.

Current commit ce9a86929f
Reference commit 6f60478685

This script lives in the mathlib-ci repository. To run it locally, from your mathlib4 directory:

git clone https://github.com/leanprover-community/mathlib-ci.git ../mathlib-ci
../mathlib-ci/scripts/reporting/technical-debt-metrics.sh pr_summary
  • The relative value is the weighted sum of the differences with weight given by the inverse of the current value of the statistic.
  • The absolute value is the relative value divided by the total sum of the inverses of the current values (i.e. the weighted average of the differences).

@github-actions github-actions Bot added the t-algebraic-geometry Algebraic geometry label Jul 8, 2026
lemma j_eq_zero_iff [IsReduced R] : W.j = 0 ↔ W.c₄ = 0 := by
rw [j_eq_zero_iff', pow_eq_zero_iff three_ne_zero]

theorem j_eq {K : Type*} [Field K] (W : WeierstrassCurve K) [W.IsElliptic] :

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Make this a lemma. Surely K and W are already defined elsewhere. Can you also move this up to right below the definition?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

K and W are defined elsewhere (R instead of K, but as a CommRing so can't be used directly).

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah gotcha, this is one of the few stupid files where we don't have W' for R and W for K...

@Multramate Multramate self-assigned this Jul 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

t-algebraic-geometry Algebraic geometry

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants