Skip to content

[Merged by Bors] - chore: rename LinearMapClass.linearMap to LinearMap.ofClass - #43368

Closed
grunweg wants to merge 2 commits into
leanprover-community:masterfrom
grunweg:morphism-renames2
Closed

[Merged by Bors] - chore: rename LinearMapClass.linearMap to LinearMap.ofClass#43368
grunweg wants to merge 2 commits into
leanprover-community:masterfrom
grunweg:morphism-renames2

Conversation

@grunweg

@grunweg grunweg commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

A small part of #31365, step (2).


Open in Gitpod

@github-actions

github-actions Bot commented Sep 2, 2026

Copy link
Copy Markdown

PR summary 2ec00433b2

Import changes for modified files

No significant changes to the import graph

Import changes for all files
Files Import difference

Declarations diff (regex)

+ _root_.LinearMap.ofClass

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

  • +1 new declarations
  • −0 removed declarations
+LinearMap.ofClass

No changes to strong technical debt.
No changes to weak technical debt.

Current commit 2ec00433b2
Reference commit ecef8f87e0

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 2, 2026

@mcdoll mcdoll 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.

It seems that it is consensus that this is good (#36911 was merged). Could you add this PR in the issue?

Can you also do a follow-up PR for semilinearMap?

maintainer merge

@github-actions

github-actions Bot commented Sep 3, 2026

Copy link
Copy Markdown

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

@mathlib-triage mathlib-triage Bot added the maintainer-merge A reviewer has approved the changed; awaiting maintainer approval. label Sep 3, 2026
@grunweg

grunweg commented Sep 3, 2026

Copy link
Copy Markdown
Contributor Author

Thanks for the fast review! This PR is already referenced in the tracking issue #31365 --- that's what you meant, right?
Let me create a follow-up about semilinear maps next.

@grunweg

grunweg commented Sep 3, 2026

Copy link
Copy Markdown
Contributor Author

(By the way: #43367 does the analogous rename in a few more cases, and is also waiting for review.)

@mcdoll

mcdoll commented Sep 3, 2026

Copy link
Copy Markdown
Member

I meant as in putting it in a list in the issue under point (2), similar to the list for point (4).

@grunweg

grunweg commented Sep 3, 2026

Copy link
Copy Markdown
Contributor Author

Ah! Good idea; I started a list.

@riccardobrasca

Copy link
Copy Markdown
Member

Thanks!

bors merge

@mathlib-bors mathlib-bors Bot added the ready-to-merge This PR has been sent to bors. label Sep 3, 2026
@mathlib-triage mathlib-triage Bot removed the maintainer-merge A reviewer has approved the changed; awaiting maintainer approval. label Sep 3, 2026
mathlib-bors Bot pushed a commit that referenced this pull request Sep 3, 2026
@mathlib-bors mathlib-bors Bot added the bors-staging This PR is currently being built by bors on the staging branch. label Sep 3, 2026
@mathlib-bors

mathlib-bors Bot commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

@mathlib-bors mathlib-bors Bot changed the title chore: rename LinearMapClass.linearMap to LinearMap.ofClass [Merged by Bors] - chore: rename LinearMapClass.linearMap to LinearMap.ofClass Sep 3, 2026
@mathlib-bors mathlib-bors Bot closed this Sep 3, 2026
joelriou pushed a commit to joelriou/mathlib4 that referenced this pull request Sep 5, 2026
@grunweg
grunweg deleted the morphism-renames2 branch September 7, 2026 07:01
mathlib-bors Bot pushed a commit that referenced this pull request Sep 8, 2026
…43376)

This rename is a small part of #31365, step (2) and the analogue of #43368 for semi-linear maps.

In addition, this PR goes one step further by removing the existing `LinearMap.ofClass`: both definitions mean the same, so we only need one. Note that neither `LinearMap` nor `SemilinearMap` is a definition, and `LinearMapClass` is defined in terms of `SemilinearMapClass`.

Rename a few lemmas using `ofClass`, so their names match the naming convention.
And delete `LinearMap.coe_semilinearMap`, which would have been misnamed now, as an exact duplicate of the now-called `LinearMap.coe_ofClass`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bors-staging This PR is currently being built by bors on the staging branch. ready-to-merge This PR has been sent to bors. t-algebra Algebra (groups, rings, fields, etc)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants