Skip to content

feat(Algebra/Category/Ring): replace HasForget with ConcreteCategory - #20826

Closed
Vierkantor wants to merge 1 commit into
masterfrom
concrete-CommRingCat-without-hom-ofHom
Closed

feat(Algebra/Category/Ring): replace HasForget with ConcreteCategory#20826
Vierkantor wants to merge 1 commit into
masterfrom
concrete-CommRingCat-without-hom-ofHom

Conversation

@Vierkantor

Copy link
Copy Markdown
Contributor

This changes nothing about the definition of ring categories except upgrading the HasForget instance to ConcreteCategory. This PR is intended mostly as an experiment to contrast with #20815 and figure out why that one has a disappointing benchmark outcome.


Open in Gitpod

This changes nothing about the definition of ring categories except upgrading the `HasForget` instance to `ConcreteCategory`. This PR is intended mostly as an experiment to contrast with #20815 and figure out why that one has a disappointing benchmark outcome.
@Vierkantor Vierkantor added WIP Work in progress t-category-theory Category theory t-algebra Algebra (groups, rings, fields, etc) awaiting-bench This PR needs to be benchmarked before merging labels Jan 18, 2025
@github-actions

Copy link
Copy Markdown

PR summary 99bae9437f

Import changes for modified files

No significant changes to the import graph

Import changes for all files
Files Import difference

Declarations diff

+ instance : ConcreteCategory.{u} CommRingCat (fun R S => R →+* S)
+ instance : ConcreteCategory.{u} CommSemiRingCat (fun R S => R →+* S)
+ instance : ConcreteCategory.{u} RingCat (fun R S => R →+* S)
+ instance : ConcreteCategory.{u} SemiRingCat (fun R S => R →+* S)
- instance : HasForget.{u} CommRingCat
- instance : HasForget.{u} CommSemiRingCat
- instance : HasForget.{u} RingCat
- instance : HasForget.{u} SemiRingCat

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.


No changes to technical debt.

You can run this locally as

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

@Vierkantor

Copy link
Copy Markdown
Contributor Author

!bench

@leanprover-bot

Copy link
Copy Markdown
Collaborator

Here are the benchmark results for commit 99bae94.
There were significant changes against commit 7365868:

  Benchmark                                                    Metric         Change
  ==================================================================================
- ~Mathlib.Algebra.Category.ModuleCat.Differentials.Presheaf   instructions    64.5%
- ~Mathlib.Algebra.Category.ModuleCat.Presheaf.Monoidal        instructions    24.6%
- ~Mathlib.Algebra.Category.Ring.Limits                        instructions    41.4%
+ ~Mathlib.AlgebraicGeometry.AffineScheme                      instructions   -12.5%
- ~Mathlib.AlgebraicGeometry.Modules.Tilde                     instructions     6.6%
+ ~Mathlib.AlgebraicGeometry.OpenImmersion                     instructions   -41.7%
+ ~Mathlib.AlgebraicGeometry.Spec                              instructions   -23.4%
+ ~Mathlib.AlgebraicGeometry.StructureSheaf                    instructions   -32.6%
+ ~Mathlib.Geometry.Manifold.Sheaf.Smooth                      instructions   -43.2%
+ ~Mathlib.Geometry.RingedSpace.OpenImmersion                  instructions   -10.8%

@github-actions

Copy link
Copy Markdown
File Instructions %
build -175.431⬝10⁹ (-0.11%)
lint +4.655⬝10⁹ (+0.06%)
Mathlib.Algebra.Category.ModuleCat.Differentials.Presheaf +46.518⬝10⁹ (+64.51%)
Mathlib.Algebra.Category.Ring.Limits +39.801⬝10⁹ (+41.43%)
Mathlib.Algebra.Category.ModuleCat.Presheaf.Monoidal +18.294⬝10⁹ (+24.55%)
Mathlib.AlgebraicGeometry.Modules.Tilde +11.11⬝10⁹ (+6.56%)
Mathlib.AlgebraicGeometry.Morphisms.QuasiSeparated +8.344⬝10⁹ (+7.37%)
Mathlib.Algebra.Category.Ring.FilteredColimits +4.896⬝10⁹ (+13.73%)
2 files, Instructions +2.0⬝10⁹
File Instructions %
Mathlib.Algebra.Category.Ring.Basic +2.534⬝10⁹ (+5.98%)
Mathlib.Algebra.Category.Ring.Adjunctions +2.295⬝10⁹ (+16.94%)
6 files, Instructions +1.0⬝10⁹
File Instructions %
Mathlib.Algebra.Category.ModuleCat.Presheaf.Sheafify +1.880⬝10⁹ (+2.66%)
Mathlib.AlgebraicGeometry.ProjectiveSpectrum.StructureSheaf +1.382⬝10⁹ (+1.74%)
Mathlib.Data.Array.Lemmas +1.376⬝10⁹ (+45.57%)
Mathlib.Algebra.Category.AlgebraCat.Limits +1.343⬝10⁹ (+2.22%)
Mathlib.RingTheory.Etale.Field +1.299⬝10⁹ (+1.83%)
Mathlib.Geometry.RingedSpace.LocallyRingedSpace.HasColimits +1.49⬝10⁹ (+2.41%)
File Instructions %
Mathlib.AlgebraicGeometry.AffineScheme -29.910⬝10⁹ (-12.52%)
2 files, Instructions -31.0⬝10⁹
File Instructions %
Mathlib.AlgebraicGeometry.Spec -30.58⬝10⁹ (-23.44%)
Mathlib.Geometry.RingedSpace.OpenImmersion -30.569⬝10⁹ (-10.77%)
File Instructions %
Mathlib.AlgebraicGeometry.OpenImmersion -51.514⬝10⁹ (-41.70%)
Mathlib.Geometry.Manifold.Sheaf.Smooth -81.159⬝10⁹ (-43.24%)
Mathlib.AlgebraicGeometry.StructureSheaf -83.823⬝10⁹ (-32.57%)
CI run

@Vierkantor Vierkantor closed this Jan 27, 2025
@YaelDillies
YaelDillies deleted the concrete-CommRingCat-without-hom-ofHom branch August 15, 2025 16:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

awaiting-bench This PR needs to be benchmarked before merging t-algebra Algebra (groups, rings, fields, etc) t-category-theory Category theory WIP Work in progress

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants