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 into
masterfrom
blizzard_inc/fieldify_algebraMap
Closed

edegeltje wants to merge 14 commits into
masterfrom
blizzard_inc/fieldify_algebraMap

Conversation

@edegeltje

Copy link
Copy Markdown
Contributor

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

github-actions Bot commented Jan 6, 2025 •

Copy link
Copy Markdown

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

kbuzzard commented Jan 6, 2025

Copy link
Copy Markdown
Member

!bench

Comment thread Mathlib/Algebra/Algebra/Defs.lean Resolved
Comment thread Mathlib/Algebra/Quaternion.lean Resolved
Comment thread Mathlib/Algebra/RingQuot.lean Resolved
@leanprover-bot

Copy link
Copy Markdown

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

@kbuzzard

kbuzzard commented Jan 7, 2025

Copy link
Copy Markdown
Member

!bench

@leanprover-bot

Copy link
Copy Markdown

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

Comment thread Mathlib/Algebra/Algebra/Defs.lean Resolved
@kbuzzard

kbuzzard commented Jan 7, 2025

Copy link
Copy Markdown
Member

!bench

@leanprover-bot

Copy link
Copy Markdown

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

@kbuzzard

kbuzzard commented Jan 9, 2025

Copy link
Copy Markdown
Member

!bench

@leanprover-bot

Copy link
Copy Markdown

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

@kbuzzard

kbuzzard commented Jan 9, 2025

Copy link
Copy Markdown
Member

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

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

@kbuzzard kbuzzard left a comment

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.

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
Contributor 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

@Vierkantor Vierkantor left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

bors d+

@mathlib-bors

mathlib-bors Bot commented Jan 13, 2025

Copy link
Copy Markdown
Contributor

✌️ 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
Contributor Author

bors r+

@edegeltje

Copy link
Copy Markdown
Contributor Author

bors r+

@mathlib-bors

mathlib-bors Bot commented Jan 13, 2025

Copy link
Copy Markdown
Contributor

Already running a review

@mathlib-bors

mathlib-bors Bot commented Jan 13, 2025

Copy link
Copy Markdown
Contributor

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