Skip to content

feat: rename and strengthen LinearEquiv.smul_id_of_finrank_eq_one - #46319

Open
eric-wieser wants to merge 1 commit into
leanprover-community:masterfrom
eric-wieser:smul_id_of_finrank_eq_one
Open

eric-wieser wants to merge 1 commit into
leanprover-community:masterfrom
eric-wieser:smul_id_of_finrank_eq_one

Conversation

@eric-wieser

Copy link
Copy Markdown
Member

This is a def so is misnamed.
This replaces it with the stronger Algebra.lsmulEquivOfFinrankEqOne, which is an AlgEquiv.


This is a def so is misnamed.
This replaces it with the stronger `Algebra.lsmulEquivOfFinrankEqOne`,
which is an `AlgEquiv`.
@github-actions

Copy link
Copy Markdown

PR summary 33c37e30b5

Import changes for modified files

No significant changes to the import graph

Import changes for all files
Files Import difference

Declarations diff (regex)

+ _root_.Algebra.lsmulEquivOfFinrankEqOne

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

Computed after the build finishes.


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

Current commit 33c37e30b5
Reference commit 31ce06eaad

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 Nov 21, 2026
Comment on lines 417 to +419
map_add' c d := by ext; simp [add_smul]
map_smul' c d := by ext; simp [mul_smul]
map_mul' c d := by ext; simp [← mul_smul, mul_comm]
commutes' c := by ext; simp

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.

why not replace this with __ := Algebra.lsmul R R M

Comment on lines 417 to 423
map_add' c d := by ext; simp [add_smul]
map_smul' c d := by ext; simp [mul_smul]
map_mul' c d := by ext; simp [← mul_smul, mul_comm]
commutes' c := by ext; simp
invFun u := (u.existsUnique_eq_smul_id_of_finrank_eq_one d1).choose
left_inv c := by
simp [← (LinearMap.existsUnique_eq_smul_id_of_finrank_eq_one d1 _).choose_spec.2 c]
right_inv u := ((u.existsUnique_eq_smul_id_of_finrank_eq_one d1).choose_spec.1).symm

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.

or replace all this with

  __ := AlgEquiv.ofBijective (Algebra.ofId R _) (bijective_algebraMap_moduleEnd_of_finrank_eq_one d1)

where

lemma bijective_algebraMap_moduleEnd_of_finrank_eq_one
    (d1 : Module.finrank R M = 1) :
    Function.Bijective (algebraMap R (Module.End R M)) := by
  simp [bijective_iff_existsUnique, eq_comm, Module.algebraMap_end_eq_smul_id,
    LinearMap.existsUnique_eq_smul_id_of_finrank_eq_one d1]

@themathqueen themathqueen added the awaiting-author Reply -awaiting-author to remove the label on your PR once you have addressed all comments. label Nov 23, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

awaiting-author Reply -awaiting-author to remove the label on your PR once you have addressed all comments. t-algebra Algebra (groups, rings, fields, etc)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants