Skip to content

[Merged by Bors] - chore(Algebra/Algebra/Defs): add an algebraMap field to Algebra instead of extending RingHom#20518

Closed
edegeltje wants to merge 14 commits intomasterfrom
blizzard_inc/fieldify_algebraMap
Closed

[Merged by Bors] - chore(Algebra/Algebra/Defs): add an algebraMap field to Algebra instead of extending RingHom#20518
edegeltje wants to merge 14 commits intomasterfrom
blizzard_inc/fieldify_algebraMap

Conversation

@edegeltje
Copy link
Copy Markdown
Collaborator

as proposed on zulip


Open in Gitpod

@edegeltje edegeltje added WIP Work in progress t-algebra Algebra (groups, rings, fields, etc) labels Jan 6, 2025
@github-actions
Copy link
Copy Markdown

github-actions bot commented Jan 6, 2025

PR summary 118b2fe326

Import changes for modified files

No significant changes to the import graph

Import changes for all files
Files Import difference

Declarations diff

-+-+ algebra'
-+-+-+ algebra

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.


Decrease in tech debt: (relative, absolute) = (1.00, 0.00)
Current number Change Type
4816 -1 porting notes

Current commit 118b2fe326
Reference commit 7466910ec3

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

@edegeltje edegeltje removed the WIP Work in progress label Jan 6, 2025
@kbuzzard
Copy link
Copy Markdown
Member

kbuzzard commented Jan 6, 2025

!bench

@leanprover-bot
Copy link
Copy Markdown
Collaborator

Here are the benchmark results for commit 2890b28.
The entire run failed.
Found no significant differences.

@kbuzzard
Copy link
Copy Markdown
Member

kbuzzard commented Jan 7, 2025

!bench

@leanprover-bot
Copy link
Copy Markdown
Collaborator

Here are the benchmark results for commit e85e968.
The entire run failed.
Found no significant differences.

@kbuzzard
Copy link
Copy Markdown
Member

kbuzzard commented Jan 7, 2025

!bench

@leanprover-bot
Copy link
Copy Markdown
Collaborator

Here are the benchmark results for commit 6fb5948.
The entire run failed.
Found no significant differences.

@kbuzzard
Copy link
Copy Markdown
Member

kbuzzard commented Jan 9, 2025

!bench

@leanprover-bot
Copy link
Copy Markdown
Collaborator

Here are the benchmark results for commit 6fb5948.
The entire run failed.
Found no significant differences.

@kbuzzard
Copy link
Copy Markdown
Member

kbuzzard commented Jan 9, 2025

I should say that I have no particular suspicion that mathlib will compile more quickly or more slowly, but I thought it was worth benchmarking giving that we're changing such a fundamental definition and that typeclass inference can sometimes be very delicate. I hadn't realised that there were problems with the benchmarking bot.

@kbuzzard kbuzzard mentioned this pull request Jan 9, 2025
@kbuzzard
Copy link
Copy Markdown
Member

!bench

@leanprover-bot
Copy link
Copy Markdown
Collaborator

Here are the benchmark results for commit 02cc50f.
There were no significant changes against commit 7466910.

@github-actions
Copy link
Copy Markdown

File Instructions %
build -4.214⬝10⁹ (+0.00%)
Mathlib.RingTheory.Kaehler.CotangentComplex +1.883⬝10⁹ (+0.67%)
Mathlib.RingTheory.Kaehler.JacobiZariski -2.397⬝10⁹ (-0.28%)
CI run

Copy link
Copy Markdown
Member

@kbuzzard kbuzzard left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maintainer delegate

I am not an expert in the finer parts of typeclass inference so I'd like another maintainer to sign off on this, but it's great to see that this change decreases build time a little and the diff looks fine to me (github is making much more of a meal of it than it could do).

Algebra R₀ P.Ring where
__ := Module.compHom P.Ring (algebraMap R₀ R)
__ := (algebraMap R P.Ring).comp (algebraMap R₀ R)
algebraMap := (algebraMap R P.Ring).comp (algebraMap R₀ R)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is the Module.compHom thing on line 66 still necessary?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe it is. There's Algebra.compHom that can replace the whole def now but this is probably not in scope of the PR.

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.

PR at #20708

@github-actions
Copy link
Copy Markdown

🚀 Pull request has been placed on the maintainer queue by kbuzzard.

@github-actions github-actions bot added the maintainer-merge A reviewer has approved the changed; awaiting maintainer approval. label Jan 12, 2025
Copy link
Copy Markdown
Contributor

@Vierkantor Vierkantor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

bors d+

@mathlib-bors
Copy link
Copy Markdown
Contributor

mathlib-bors bot commented Jan 13, 2025

✌️ edegeltje can now approve this pull request. To approve and merge a pull request, simply reply with bors r+. More detailed instructions are available here.

@ghost ghost added the delegated This pull request has been delegated to the PR author (or occasionally another non-maintainer). label Jan 13, 2025
@edegeltje
Copy link
Copy Markdown
Collaborator Author

bors r+

@edegeltje
Copy link
Copy Markdown
Collaborator Author

bors r+

@mathlib-bors
Copy link
Copy Markdown
Contributor

mathlib-bors bot commented Jan 13, 2025

Already running a review

@mathlib-bors
Copy link
Copy Markdown
Contributor

mathlib-bors bot commented Jan 13, 2025

Pull request successfully merged into master.

Build succeeded:

@mathlib-bors mathlib-bors bot changed the title chore(Algebra/Algebra/Defs): add an algebraMap field to Algebra instead of extending RingHom [Merged by Bors] - chore(Algebra/Algebra/Defs): add an algebraMap field to Algebra instead of extending RingHom Jan 13, 2025
@mathlib-bors mathlib-bors bot closed this Jan 13, 2025
@mathlib-bors mathlib-bors bot deleted the blizzard_inc/fieldify_algebraMap branch January 13, 2025 13:56
mathlib-bors bot pushed a commit that referenced this pull request Jan 13, 2025
…20708)

As suggested in the conversation around #20518 , the algebra instance has been subsumed by a definition, and this PR makes the replacement.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

delegated This pull request has been delegated to the PR author (or occasionally another non-maintainer). maintainer-merge A reviewer has approved the changed; awaiting maintainer approval. t-algebra Algebra (groups, rings, fields, etc)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants