Skip to content

feat(RingTheory/MvFormalGroup): multivariate formal group definition - #44995

Open
WenrongZou wants to merge 21 commits into
leanprover-community:masterfrom
WenrongZou:MvFG_def
Open

WenrongZou wants to merge 21 commits into
leanprover-community:masterfrom
WenrongZou:MvFG_def

Conversation

@WenrongZou

@WenrongZou WenrongZou commented Oct 18, 2026 •

Copy link
Copy Markdown
Collaborator

This PR defines multivariate (including infinite dimensional) formal group laws over a commutative ring R.

Main definitions:

  • MvFormalGroup σ R: a family F = (F_i)_{i : σ} of power series in two sets of variables X, Y, with zero constant coefficient, linear term X_i + Y_i, and associativity F(F(X, Y), Z) = F(X, F(Y, Z)).
  • MvFormalGroup.IsComm: the commutativity condition F(X, Y) = F(Y, X).

Main results:

  • zero_add, add_zero: F(0, X) = X and F(X, 0) = X.

@github-actions github-actions Bot added the tech debt Fixes cross-cutting technical debt, see the "technical debt counters" stream on zulip label Oct 18, 2026
@github-actions

github-actions Bot commented Oct 18, 2026 •

Copy link
Copy Markdown

PR summary 91e2f427b7

Import changes for modified files

No significant changes to the import graph

Import changes for all files
Files Import difference
Mathlib.RingTheory.MvFormalGroup.Basic (new file) 1584

Declarations diff (regex)

+ IsComm
+ MvFormalGroup
+ Xzero
+ Xzero_eq_X
+ Xzero_subst_Xzero
+ add_zero
+ additive
+ assoc_subst
+ coeff_eq_of_degree_lt_two
+ coeff_single_one_eq_ite
+ coeff_single_zero_eq_ite
+ constantCoeff_Xzero
+ constantCoeff_zeroX
+ eq_X_of_idempotent
+ hasSubst
+ hasSubst_subst_pair
+ instance : (additive σ R).IsComm
+ subst_X_add_X
+ subst_pair_subst
+ truncTotal_two
+ two_le_order_subst_sub
+ zeroX
+ zeroX_eq_X
+ zeroX_subst_zeroX
+ zero_add

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 91e2f42).

  • +47 new declarations
  • −0 removed declarations
+MvFormalGroup
+MvFormalGroup.IsComm
+MvFormalGroup.IsComm.casesOn
+MvFormalGroup.IsComm.comm
+MvFormalGroup.IsComm.mk
+MvFormalGroup.IsComm.rec
+MvFormalGroup.IsComm.recOn
+MvFormalGroup.Xzero
+MvFormalGroup.Xzero_eq_X
+MvFormalGroup.Xzero_subst_Xzero
+MvFormalGroup.add_zero
+MvFormalGroup.additive
+MvFormalGroup.assoc
+MvFormalGroup.assoc_subst
+MvFormalGroup.casesOn
+MvFormalGroup.coeff_eq_of_degree_lt_two
+MvFormalGroup.coeff_single_one
+MvFormalGroup.coeff_single_one_eq_ite
+MvFormalGroup.coeff_single_zero
+MvFormalGroup.coeff_single_zero_eq_ite
+MvFormalGroup.constantCoeff_Xzero
+MvFormalGroup.constantCoeff_eq_zero
+MvFormalGroup.constantCoeff_zeroX
+MvFormalGroup.ctorIdx
+MvFormalGroup.ext
+MvFormalGroup.ext_iff
+MvFormalGroup.finite_ne_zero
+MvFormalGroup.hasSubst
+MvFormalGroup.hasSubst_subst_pair
+MvFormalGroup.instIsCommAdditive
+MvFormalGroup.mk
+MvFormalGroup.mk.inj
+MvFormalGroup.mk.injEq
+MvFormalGroup.mk.noConfusion
+MvFormalGroup.mk.sizeOf_spec
+MvFormalGroup.noConfusion
+MvFormalGroup.noConfusionType
+MvFormalGroup.rec
+MvFormalGroup.recOn
+MvFormalGroup.subst_pair_subst
+MvFormalGroup.toPowerSeries
+MvFormalGroup.truncTotal_two
+MvFormalGroup.two_le_order_subst_sub
+MvFormalGroup.zeroX
+MvFormalGroup.zeroX_eq_X
+MvFormalGroup.zeroX_subst_zeroX
+MvFormalGroup.zero_add

No changes to strong technical debt.

Increase in weak tech debt: (relative, absolute) = (1.00, 0.00)
Current number Change Type (weak)
5152 1 exposed public sections

Current commit 91e2f427b7
Reference commit 527b85abc1

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.py 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-ring-theory Ring theory label Oct 18, 2026
@mathlib-dependent-issues mathlib-dependent-issues Bot added the blocked-by-other-PR This PR depends on another PR (this label is automatically managed by a bot) label Oct 18, 2026
@mathlib-merge-conflicts mathlib-merge-conflicts Bot added the merge-conflict The PR has a merge conflict with master, and needs manual merging. (this label is managed by a bot) label Oct 28, 2026
@mathlib-merge-conflicts

Copy link
Copy Markdown

This pull request has conflicts, please merge master and resolve them.

@mathlib-dependent-issues mathlib-dependent-issues Bot removed the blocked-by-other-PR This PR depends on another PR (this label is automatically managed by a bot) label Nov 13, 2026
@mathlib-dependent-issues

Copy link
Copy Markdown

@github-actions github-actions Bot removed the merge-conflict The PR has a merge conflict with master, and needs manual merging. (this label is managed by a bot) label Nov 13, 2026

@wwylele wwylele left a comment

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.

Could you add a "main declarations" section to the module doc string?

Comment on lines +36 to +43
/-- Every coordinate has zero constant term. -/
zero_constantCoeff i : constantCoeff (toPowerSeries i) = 0
/-- The coefficient of `Xⱼ` in `F(i)` is the Kronecker delta. -/
lin_coeff_X i j : coeff (single (0, j) 1) (toPowerSeries i) = (1 : Matrix σ σ R) j i
/-- The coefficient of `Yⱼ` in `F(i)` is the Kronecker delta. -/
lin_coeff_Y i j : coeff (single (1, j) 1) (toPowerSeries i) = (1 : Matrix σ σ R) j i
/-- Every monomial `XᵐYⁿ` occurs in only finitely many `F(i)`. -/
coeff_zero d : {i | coeff d (toPowerSeries i) ≠ 0}.Finite

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.

I think for statements in structure field we still generally follow the theorem naming convention, so

Suggested change
/-- Every coordinate has zero constant term. -/
zero_constantCoeff i : constantCoeff (toPowerSeries i) = 0
/-- The coefficient of `Xⱼ` in `F(i)` is the Kronecker delta. -/
lin_coeff_X i j : coeff (single (0, j) 1) (toPowerSeries i) = (1 : Matrix σ σ R) j i
/-- The coefficient of `Yⱼ` in `F(i)` is the Kronecker delta. -/
lin_coeff_Y i j : coeff (single (1, j) 1) (toPowerSeries i) = (1 : Matrix σ σ R) j i
/-- Every monomial `XᵐYⁿ` occurs in only finitely many `F(i)`. -/
coeff_zero d : {i | coeff d (toPowerSeries i) ≠ 0}.Finite
/-- Every coordinate has zero constant term. -/
constantCoeff_eq_zero i : constantCoeff (toPowerSeries i) = 0
/-- The coefficient of `Xⱼ` in `F(i)` is the Kronecker delta. -/
coeff_single_zero i j : coeff (single (0, j) 1) (toPowerSeries i) = (1 : Matrix σ σ R) j i
/-- The coefficient of `Yⱼ` in `F(i)` is the Kronecker delta. -/
coeff_single_one i j : coeff (single (1, j) 1) (toPowerSeries i) = (1 : Matrix σ σ R) j i
/-- Every monomial `XᵐYⁿ` occurs in only finitely many `F(i)`. -/
finite_ne_zero d : {i | coeff d (toPowerSeries i) ≠ 0}.Finite

unless a special name is well-established in the literature. I don't fell strongly about this

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.

I also don't fell strongly about this. I am happy with the names you suggested.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

t-ring-theory Ring theory tech debt Fixes cross-cutting technical debt, see the "technical debt counters" stream on zulip

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants