Skip to content

feat(LinearAlgebra/Determinant): endomorphisms of a free module of rank one - #46317

Open
xroblot wants to merge 2 commits into
leanprover-community:masterfrom
xroblot:det-finrank-eq-one
Open

xroblot wants to merge 2 commits into
leanprover-community:masterfrom
xroblot:det-finrank-eq-one

Conversation

@xroblot

@xroblot xroblot commented Nov 21, 2026 •

Copy link
Copy Markdown
Collaborator

This PR shows that an endomorphism of a free module of rank one is the scalar multiple of the identity by its determinant, and deduces that it has determinant 1 if and only if it is the identity. This is used to shorten the proof of SpecialLinearGroup.subsingleton_of_finrank_eq_one.

🤖 This result is used in the proof of the Kronecker-Weber theorem in my SKW project, from which Claude extracted it.


@xroblot xroblot added t-algebra Algebra (groups, rings, fields, etc) WIP Work in progress labels Nov 21, 2026
@github-actions

github-actions Bot commented Nov 21, 2026 •

Copy link
Copy Markdown

PR summary 179a2b1650

Import changes for modified files

No significant changes to the import graph

Import changes for all files
Files Import difference

Declarations diff (regex)

+ apply_eq_det_smul_of_finrank_eq_one
+ det_eq_one_iff_eq_id_of_finrank_eq_one
+ eq_det_smul_id_of_finrank_eq_one
+ smul_id_of_finrank_eq_one_symm_apply

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

  • +4 new declarations
  • −0 removed declarations
+LinearEquiv.smul_id_of_finrank_eq_one_symm_apply
+LinearMap.apply_eq_det_smul_of_finrank_eq_one
+LinearMap.det_eq_one_iff_eq_id_of_finrank_eq_one
+LinearMap.eq_det_smul_id_of_finrank_eq_one

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

Current commit 179a2b1650
Reference commit a495318fed

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

@[simp]
theorem smul_id_of_finrank_eq_one_symm_apply [StrongRankCondition R] [Module.Free R M]
(h : Module.finrank R M = 1) (f : M →ₗ[R] M) :
(smul_id_of_finrank_eq_one h).symm f = LinearMap.det f :=

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.

This looks misnamed to me; fixed in #46319.

I think we should change the definition to be explicitly in terms of det, rather than using choice?

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.

Thanks! I'll rename the lemma after #46319 is merged.

Also, I think redefining it in terms of det would require moving the definition and probably also restrict to CommRings and AddCommGroups...

@mathlib-dependent-issues mathlib-dependent-issues Bot added the blocked-by-other-PR This PR depends on another PR (this label is automatically managed by a bot) label Nov 21, 2026
@mathlib-dependent-issues

Copy link
Copy Markdown

This PR/issue depends on:

determinant. -/
theorem apply_eq_det_smul_of_finrank_eq_one [Module.Free A M] (h : Module.finrank A M = 1)
(f : M →ₗ[A] M) (x : M) : f x = f.det • x :=
LinearMap.congr_fun (eq_det_smul_id_of_finrank_eq_one h f) x

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 did you change from congr($..) to this?

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.

Well, I find it easier to parse and it's not longer so why not

@mathlib-merge-conflicts mathlib-merge-conflicts Bot added the merge-conflict The PR has a merge conflict with master, and needs manual merging. (this label is managed by a bot) label Nov 24, 2026
@mathlib-merge-conflicts

Copy link
Copy Markdown

This pull request has conflicts, please merge master and resolve them.

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

blocked-by-other-PR This PR depends on another PR (this label is automatically managed by a bot) merge-conflict The PR has a merge conflict with master, and needs manual merging. (this label is managed by a bot) t-algebra Algebra (groups, rings, fields, etc)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants