Skip to content

feat: add Sophie Germain theorem formalization#38035

Open
kellyzhao1231 wants to merge 1 commit intoleanprover-community:masterfrom
kellyzhao1231:sophie-germain
Open

feat: add Sophie Germain theorem formalization#38035
kellyzhao1231 wants to merge 1 commit intoleanprover-community:masterfrom
kellyzhao1231:sophie-germain

Conversation

@kellyzhao1231
Copy link
Copy Markdown

A Lean 4 + Mathlib formalization of Sophie Germain's classical theorem on Fermat's Last Theorem, translated from the Isabelle/HOL formalization by Benoît Ballenghien (Université Paris-Saclay, CNRS, ENS Paris-Saclay, LMF, 2026).

@github-actions github-actions bot added the new-contributor This PR was made by a contributor with at most 5 merged PRs. Welcome to the community! label Apr 14, 2026
@github-actions
Copy link
Copy Markdown

Welcome new contributor!

Thank you for contributing to Mathlib! If you haven't done so already, please review our contribution guidelines, as well as the style guide and naming conventions. In particular, we kindly remind contributors that we have guidelines regarding the use of AI when making pull requests.

We use a review queue to manage reviews. If your PR does not appear there, it is probably because it is not successfully building (i.e., it doesn't have a green checkmark), has the awaiting-author tag, or another reason described in the Lifecycle of a PR. The review dashboard has a dedicated webpage which shows whether your PR is on the review queue, and (if not), why.

If you haven't already done so, please come to https://leanprover.zulipchat.com/, introduce yourself, and mention your new PR.

Thank you again for joining our community.

@github-actions
Copy link
Copy Markdown

PR summary 044631201f

Import changes for modified files

No significant changes to the import graph

Import changes for all files
Files Import difference
Mathlib.NumberTheory.SophieGermain.SophieGermain (new file) 1

Declarations diff

+ Int.ModEq.finset_sum
+ Int.gcd_div_gcd_eq_one
+ Nat.eq_pow_of_coprime_mul_pow
+ SophieGermainPrime
+ SophieGermainSum
+ dvd_natAbs_of_natCast_dvd
+ eq_pow_or_neg_of_coprime_mul_pow
+ ge_three
+ int_dvd_gcd
+ int_gcd_dvd_left
+ int_gcd_dvd_right
+ natCast_dvd_of_dvd_natAbs
+ ne_zero
+ not_dvd_of_not_dvd_div
+ odd
+ p_not_congr_neg_one
+ p_not_congr_one
+ p_not_congr_zero
+ pairwise_coprime_of_fermat_eq
+ pos
+ pow_congr_one_or_neg_one
+ prime
+ prime_twop_succ
+ q_dvd_of_fermat_triple
+ sgSum_congr_mod
+ sgSum_mul_eq_pow_add_pow
+ sophie_germain_factorization
+ sophie_germain_theorem
+ sum_dvd_sgSum_sub_scalar

You can run this locally as follows
## summary with just the declaration names:
./scripts/pr_summary/declarations_diff.sh <optional_commit>

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

The doc-module for scripts/pr_summary/declarations_diff.sh contains some details about this script.


No changes to technical debt.

You can run this locally as

./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-number-theory Number theory (also use t-algebra or t-analysis to specialize) label Apr 14, 2026
@grunweg
Copy link
Copy Markdown
Contributor

grunweg commented Apr 14, 2026

Hello from the triage team! Per the AI guidelines linked above, can you clarify if/to what extent you used AI to write this code? (Also, you probably need to run lake exe mk_all to make sure your new file is picked up by Lean.) Thanks!

@grunweg grunweg added the awaiting-author A reviewer has asked the author a question or requested changes. label Apr 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

awaiting-author A reviewer has asked the author a question or requested changes. new-contributor This PR was made by a contributor with at most 5 merged PRs. Welcome to the community! t-number-theory Number theory (also use t-algebra or t-analysis to specialize)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants