feat(Algebra/Category/ModuleCat): the pseudofunctors which send a ring to its category of modules
In this PR, we construct the pseudofunctor ModuleCat.restrictScalarsPseudofunctor : Pseudofunctor (LocallyDiscrete RingCatᵒᵖ) Cat which sends a ring R to its category of modules: the contravariant functoriality is given
by the restriction of scalars functors. We also define ModuleCat.extendScalarsPseudofunctor : Pseudofunctor (LocallyDiscrete CommRingCat) Cat: the covariant functoriality is given by the extension of scalars functors.
- [x] depends on: #18201
PR summary 7e993308df
Import changes for modified files
No significant changes to the import graph
Import changes for all files
| Files | Import difference |
|---|---|
13 filesMathlib.Algebra.Category.ModuleCat.Differentials.Basic Mathlib.Algebra.Category.ModuleCat.ChangeOfRings Mathlib.Algebra.Category.ModuleCat.Presheaf.Limits Mathlib.Algebra.Category.ModuleCat.Differentials.Presheaf Mathlib.Algebra.Category.ModuleCat.EnoughInjectives Mathlib.Algebra.Category.ModuleCat.Presheaf.Colimits Mathlib.Algebra.Category.ModuleCat.Presheaf Mathlib.Algebra.Category.ModuleCat.Presheaf.EpiMono Mathlib.Algebra.Category.ModuleCat.Presheaf.Monoidal Mathlib.Algebra.Category.ModuleCat.Presheaf.Abelian Mathlib.Algebra.Category.ModuleCat.Presheaf.Pushforward Mathlib.Algebra.Category.ModuleCat.Presheaf.ChangeOfRings Mathlib.Algebra.Category.ModuleCat.Presheaf.Free |
1 |
Mathlib.Algebra.Category.ModuleCat.Pseudofunctor (new file) |
1258 |
Declarations diff
+ CommRingCat.moduleCatExtendScalarsPseudofunctor
+ CommRingCat.moduleCatRestrictScalarsPseudofunctor
+ RingCat.moduleCatRestrictScalarsPseudofunctor
+ extendRestrictScalarsAdj_homEquiv_apply
+ extendRestrictScalarsAdj_unit_app_apply
+ extendScalarsComp
+ extendScalarsComp_hom_app_one_tmul
+ extendScalarsId
+ extendScalarsId_hom_app_one_tmul
+ extendScalarsId_inv_app_apply
+ extendScalars_assoc
+ extendScalars_assoc'
+ extendScalars_comp_id
+ extendScalars_id_comp
+ homEquiv_extendScalarsComp
+ homEquiv_extendScalarsId
+ hom_ext
You can run this locally as follows
## summary with just the declaration names:
./scripts/declarations_diff.sh <optional_commit>
## more verbose report:
./scripts/declarations_diff.sh long <optional_commit>
The doc-module for script/declarations_diff.sh contains some details about this script.
Increase in tech debt: (relative, absolute) = (5.00, 0.00)
| Current number | Change | Type |
|---|---|---|
| 1508 | 5 | erw |
Current commit 7e993308df Reference commit 42764fbc0a
You can run this locally as
./scripts/technical-debt-metrics.sh pr_summary
- The
relativevalue is the weighted sum of the differences with weight given by the inverse of the current value of the statistic. - The
absolutevalue is therelativevalue divided by the total sum of the inverses of the current values (i.e. the weighted average of the differences).
This PR/issue depends on:
- ~~leanprover-community/mathlib4#18201~~ By Dependent Issues (🤖). Happy coding!
This all looks good to me, the only problem is that there are a lot of
erws. I looked into this (see zulip), and I think all but one of yourerws (thecomp_applyone) would not be necessary if there was adsimp%elaborator. Then, instead oferw [lemma]you would typerw [dsimp% lemma]. Making such an elaborator should be very easy (if it does not already exist), and I might have time to do this on Sunday if you can wait for that. But I am happy to have this merged also. I also left some small comments that are more like questions and do not need fixing.
Is this related to the feature I suggested at https://leanprover.zulipchat.com/#narrow/channel/287929-mathlib4/topic/attribute.20simp_NF_my_lemma.3F/near/443101462
This PR was included in a batch that was canceled, it will be automatically retried
probably causing the bors failure After the batch is merged, please merge master
bors r- bors d+
:v: joelriou can now approve this pull request. To approve and merge a pull request, simply reply with bors r+. More detailed instructions are available here.
Canceled.
Retrying...
bors merge