Skip to content

feat(NumberTheory): use IsApply for ModularForm etc#41561

Open
mcdoll wants to merge 2 commits into
leanprover-community:masterfrom
mcdoll:IsApplySlashForm
Open

feat(NumberTheory): use IsApply for ModularForm etc#41561
mcdoll wants to merge 2 commits into
leanprover-community:masterfrom
mcdoll:IsApplySlashForm

Conversation

@mcdoll

@mcdoll mcdoll commented Jul 10, 2026

Copy link
Copy Markdown
Member

We use IsApply classes for SlashInvariantForm, ModularForm and CuspForm at the same time to avoid temporary name clashes and since they are not used as widely as LinearMap and ContinuousLinearMap for example.


Open in Gitpod

@github-actions github-actions Bot added the t-number-theory Number theory (also use t-algebra or t-analysis to specialize) label Jul 10, 2026
@github-actions

github-actions Bot commented Jul 10, 2026

Copy link
Copy Markdown

PR summary 318cc4212e

Import changes for modified files

No significant changes to the import graph

Import changes for all files
Files Import difference

Declarations diff (regex)

+ IsGLPos.instSMulApply
+ coeHom_apply
+ instIsSMulApplyℂ
+ instIsSMulApplyℝ
+ instSMulApply
+ instance : AddCommGroup (CuspForm Γ k) := fast_instance% FunLike.addCommGroup
+ instance : AddCommGroup (ModularForm Γ k) := fast_instance% FunLike.addCommGroup
+ instance : AddCommGroup (SlashInvariantForm Γ k) := fast_instance% FunLike.addCommGroup
+ instance : IsAddApply (CuspForm Γ k) ℍ ℂ
+ instance : IsAddApply (ModularForm Γ k) ℍ ℂ
+ instance : IsAddApply (SlashInvariantForm Γ k) ℍ ℂ
+ instance : IsNegApply (CuspForm Γ k) ℍ ℂ
+ instance : IsNegApply (ModularForm Γ k) ℍ ℂ
+ instance : IsNegApply (SlashInvariantForm Γ k) ℍ ℂ
+ instance : IsSubApply (CuspForm Γ k) ℍ ℂ
+ instance : IsSubApply (ModularForm Γ k) ℍ ℂ
+ instance : IsSubApply (SlashInvariantForm Γ k) ℍ ℂ
+ instance : IsZeroApply (CuspForm Γ k) ℍ ℂ
+ instance : IsZeroApply (ModularForm Γ k) ℍ ℂ
+ instance : IsZeroApply (SlashInvariantForm Γ k) ℍ ℂ
+ instance : Module ℝ (CuspForm Γ k) := fast_instance% FunLike.module
+ instance : Module ℝ (ModularForm Γ k) := fast_instance% FunLike.module
+ instance [Γ.HasDetOne] : Module ℂ (CuspForm Γ k) := fast_instance% FunLike.module
+ instance [Γ.HasDetOne] : Module ℂ (ModularForm Γ k) := fast_instance% FunLike.module
++ instance : IsSMulApply α (SlashInvariantForm Γ k) ℍ ℂ
+++--- add_apply
+++--- coeHom
+++--- coe_add
+++--- coe_neg
+++--- coe_smul
+++--- coe_sub
+++--- coe_zero
+++--- neg_apply
+++--- smul_apply
+++--- sub_apply
++-- IsGLPos.coe_smul
++-- IsGLPos.smul_apply
++-- zero_apply
- instance : AddCommGroup (CuspForm Γ k)
- instance : AddCommGroup (ModularForm Γ k)
- instance : AddCommGroup (SlashInvariantForm Γ k)
- instance : Module ℝ (CuspForm Γ k)
- instance : Module ℝ (ModularForm Γ k)
- instance [Γ.HasDetOne] : Module ℂ (CuspForm Γ k)
- instance [Γ.HasDetOne] : Module ℂ (ModularForm Γ k)

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 318cc42).

  • +18 new declarations
  • −1 removed declarations
+CuspForm.IsGLPos.instSMulApply
+CuspForm.instIsAddApplyUpperHalfPlaneComplex
+CuspForm.instIsNegApplyUpperHalfPlaneComplex
+CuspForm.instIsSubApplyUpperHalfPlaneComplex
+CuspForm.instIsZeroApplyUpperHalfPlaneComplex
+CuspForm.instSMulApply
-ModularForm.coeHom_apply
+ModularForm.instIsAddApplyUpperHalfPlaneComplex
+ModularForm.instIsNegApplyUpperHalfPlaneComplex
+ModularForm.instIsSMulApplyℂ
+ModularForm.instIsSMulApplyℝ
+ModularForm.instIsSubApplyUpperHalfPlaneComplex
+ModularForm.instIsZeroApplyUpperHalfPlaneComplex
+SlashInvariantForm.instIsAddApplyUpperHalfPlaneComplex
+SlashInvariantForm.instIsNegApplyUpperHalfPlaneComplex
+SlashInvariantForm.instIsSMulApplyUpperHalfPlaneComplex
+SlashInvariantForm.instIsSMulApplyUpperHalfPlaneComplex_1
+SlashInvariantForm.instIsSubApplyUpperHalfPlaneComplex
+SlashInvariantForm.instIsZeroApplyUpperHalfPlaneComplex

No changes to strong technical debt.

No changes to weak technical debt.

Current commit 318cc4212e
Reference commit 1a783458e3

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

@mcdoll mcdoll marked this pull request as ready for review July 10, 2026 05:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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.

1 participant