Skip to content

refactor(RepresentationTheory/Induced): avoid unfolding resIndHomEquiv and resIndAdjunction - #44263

Open
JX-Mo wants to merge 2 commits into
leanprover-community:masterfrom
JX-Mo:Representation.InducedNew
Open

JX-Mo wants to merge 2 commits into
leanprover-community:masterfrom
JX-Mo:Representation.InducedNew

Conversation

@JX-Mo

@JX-Mo JX-Mo commented Sep 27, 2026 •

Copy link
Copy Markdown
Contributor

This is split from #41808. We descend core computation lemmas around resIndHomEquiv to unbundled Representation level, so that downstream proofs will not unfold resIndHomEquiv and resIndAdjunction anymore. Moreover, Radar shows an actual dramatic speed up without deprecation from #41808
✅ build/module/Mathlib.RepresentationTheory.Induced//instructions: -33.2G (-47.79%)

@github-actions github-actions Bot added the increases-technical-debt Automatically added label for PRs which increase "strong" technical debts label Sep 27, 2026
@github-actions

github-actions Bot commented Sep 27, 2026 •

Copy link
Copy Markdown

PR summary d9e5f5e5ed

Import changes for modified files

No significant changes to the import graph

Import changes for all files
Files Import difference

Declarations diff (regex)

+ IndV.inductionOn
+ IndV.lift
+ IndV.lift_apply_mk
+ IndV.mk_map_eq
+ IndV.mk_map_inv_eq
+ IndV.mk_map_inv_mul
+ IndV.mk_map_mul
+ coe_coindMap_apply
+ coe_coindMap_apply_apply
+ coe_coind_apply
+ coinvariantsTensorIndEquiv
+ coinvariantsTensorIndHom
+ coinvariantsTensorIndHom_apply_mk
+ coinvariantsTensorIndHom_inv
+ coinvariantsTensorIndInv
+ coinvariantsTensorIndInv_apply_mk
+ coinvariantsTensorIndInv_hom
+ coinvariantsTensorIndIso_hom
+ coinvariantsTensorIndIso_inv
+ coinvariantsTensorIndNatIso_hom_app
+ coinvariantsTensorIndNatIso_inv_app
+ ind.counit
+ ind.counit_apply_mk
+ ind.evalOne
+ ind.evalOne_apply
+ ind.hom_ext
+ ind.lift
+ ind.lift_apply_mk
+ ind.unit
+ ind.unit_apply
+ indMap_apply_mk
+ indResAdjunction_counit_app_hom
+ indResAdjunction_homEquiv
+ indResAdjunction_unit_app_hom
+ indResHomEquiv
+ indResHomEquiv_apply_hom
+ indResHomEquiv_symm_apply_hom
+ indToCoind_mk
+ ind_apply_mk
+ instance : AddCommGroup (IndV φ ρ) := by unfold IndV; infer_instance
+ instance : CoeFun (coindV φ σ) (fun _ => H → A) := ⟨Subtype.val⟩
+ instance : Module k (IndV φ ρ) := by unfold IndV; infer_instance
++- indMap

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

  • +49 new declarations
  • −2 removed declarations
+Rep.coinvariantsTensorIndIso_hom_hom
+Rep.coinvariantsTensorIndIso_inv_hom
+Rep.coinvariantsTensorIndNatIso_hom_app_hom
+Rep.coinvariantsTensorIndNatIso_inv_app_hom
+Rep.indResAdjunction_counit_app_hom
+Rep.indResAdjunction_homEquiv
+Rep.indResAdjunction_unit_app_hom
-Rep.indResHomEquiv_apply
+Rep.indResHomEquiv_apply_hom
-Rep.indResHomEquiv_symm_apply
+Rep.indResHomEquiv_symm_apply_hom
+Rep.indToCoind_mk
+Rep.resFunctor_map
+Rep.resFunctor_obj
+Representation.IndV.inductionOn
+Representation.IndV.lift
+Representation.IndV.lift.congr_simp
+Representation.IndV.lift_apply_mk
+Representation.IndV.mk_map_eq
+Representation.IndV.mk_map_inv_eq
+Representation.IndV.mk_map_inv_mul
+Representation.IndV.mk_map_mul
+Representation.coe_coindMap_apply
+Representation.coe_coindMap_apply_apply
+Representation.coe_coind_apply
+Representation.coinvariantsTensorIndEquiv
+Representation.coinvariantsTensorIndHom
+Representation.coinvariantsTensorIndHom_apply_mk
+Representation.coinvariantsTensorIndHom_inv
+Representation.coinvariantsTensorIndInv
+Representation.coinvariantsTensorIndInv_apply_mk
+Representation.coinvariantsTensorIndInv_hom
+Representation.ind.counit
+Representation.ind.counit_apply_mk
+Representation.ind.evalOne
+Representation.ind.evalOne_apply
+Representation.ind.hom_ext
+Representation.ind.hom_ext_iff
+Representation.ind.lift
+Representation.ind.lift_apply_mk
+Representation.ind.unit
+Representation.ind.unit_apply
+Representation.indMap
+Representation.indMap_apply_mk
+Representation.indResHomEquiv
+Representation.indResHomEquiv_apply
+Representation.indResHomEquiv_symm_apply
+Representation.ind_apply_mk
+Representation.instAddCommGroupIndV
+Representation.instCoeFunSubtypeForallMemSubmoduleCoindV
+Representation.instModuleIndV

Decrease in strong tech debt: (relative, absolute) = (8.57, 0.01)
Current number Change Type (strong)
4133 -6 backward.defeqAttrib.useBackward
2307 -10 backward.isDefEq.respectTransparency.types
No changes to weak technical debt.

Current commit d9e5f5e5ed
Reference commit b63f6e8a68

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-algebra Algebra (groups, rings, fields, etc) label Sep 27, 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 Sep 27, 2026
@mathlib-dependent-issues

Copy link
Copy Markdown

@JX-Mo

JX-Mo commented Sep 27, 2026

Copy link
Copy Markdown
Contributor Author

!radar

@leanprover-radar

leanprover-radar commented Sep 27, 2026 •

Copy link
Copy Markdown

Benchmark results for d9e5f5e against b63f6e8 are in. There are significant results. @JX-Mo

  • ✅ build//instructions: -44.6G (-0.03%)

Large changes (2✅)

  • ✅ build/module/Mathlib.RepresentationTheory.FiniteIndex//instructions: -9.8G (-22.83%)
  • ✅ build/module/Mathlib.RepresentationTheory.Induced//instructions: -29.7G (-42.80%)

Small changes (3✅)

  • ✅ build/module/Mathlib.RepresentationTheory.Homological.GroupCohomology.Functoriality//instructions: -1.5G (-2.34%)
  • ✅ build/module/Mathlib.RepresentationTheory.Homological.GroupCohomology.Shapiro//instructions: -1.1G (-8.94%)
  • ✅ build/module/Mathlib.RepresentationTheory.Homological.GroupHomology.Functoriality//instructions: -1.9G (-1.46%)

@github-actions github-actions Bot added tech debt Fixes cross-cutting technical debt, see the "technical debt counters" stream on zulip and removed increases-technical-debt Automatically added label for PRs which increase "strong" technical debts labels Sep 27, 2026

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

blocked-by-other-PR This PR depends on another PR (this label is automatically managed by a bot) t-algebra Algebra (groups, rings, fields, etc) 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