Skip to content

chore: weaken commutativity assumptions for AdjoinRoot.lift and AdjoinRoot.liftHom - #43971

Draft
AntoineChambert-Loir wants to merge 20 commits into
leanprover-community:masterfrom
AntoineChambert-Loir:ACL/AdjoinRoot
Draft

AntoineChambert-Loir wants to merge 20 commits into
leanprover-community:masterfrom
AntoineChambert-Loir:ACL/AdjoinRoot

Conversation

@AntoineChambert-Loir

Copy link
Copy Markdown
Collaborator

This PR continues the work from #9564.

Original PR: #9564

@AntoineChambert-Loir

Copy link
Copy Markdown
Collaborator Author

Comments from Original PR #9564

This section contains 4 comment(s) from the original PR, excluding bot comments.


@AntoineChambert-Loir (2024-01-20 19:14 UTC):
The AdjoinRoot.lift function now allows that target to be noncommutative, it only needs a proof that the element that AdjoinRoot.root f maps to commutes with the image of the ring.
Thanks to a tactic commutativity provided by @jcommelin , this argument can be filled automatically.
In all subsequent rewriting lemmas, I made it ⦃hcomm : ∀ r, Commute (i r) a⦄, but the defect is that I couldn't really use exact tactics, or term-mode proofs, so that the proofs are now a bit ugly, using a lot of by simp […].


@Vierkantor (2024-01-25 15:38 UTC):
I pushed a commit which tags a few lemmas and replaces commutativity with a call to aesop. It's almost as good as original for the commutative case, if you ignore the parentheses :)


@joneugster (2026-09-19 13:46 UTC):
Mathlib has moved to PRs from forks. This PR is still from a branch of the main repository and will soon be closed! Please migrate the content to a fork and reopen a PR from there if you wish to do so. See Zulip topic for more instructions. Thank you for contributing to mathlib!


@mathlib-bors (2026-09-19 16:46 UTC):
This pull request is now in draft mode. No active bors state needed cleanup.

While this PR remains draft, bors will ignore commands on this PR. Mark it ready for review before using commands like bors r+ or bors try.

@github-actions

Copy link
Copy Markdown

PR summary 39c9e14390

Import changes for modified files

Dependency changes

File Base Count Head Count Change
Mathlib.Tactic 3044 3074 +30 (+0.99%)
Import changes for all files
Files Import difference
Mathlib.Tactic.Commutativity.Init (new file) 1
Mathlib.Tactic 30
Mathlib.Tactic.Commutativity (new file) 148

Declarations diff (regex)

+ _root_.RingHom.smulOneHom_eq_algebraMap
+ _root_.smul_algebraMap
+ algebraMap_eq_smul_one
+ algebraMap_eq_smul_one'
+ algebra_ext
+ coe_linearMap
+ commute_algebraMap_left
+ commute_algebraMap_right
+ commutes
+ id
+ instance (priority := 200) toModule : Module R A
+ instance _root_.IsScalarTower.right : IsScalarTower R A A
+ left_comm
+ liftHom
+ liftHom_eq_algHom
+ liftHom_mk
+ liftHom_of
+ liftHom_root
+ lift_comp_of'
+ lift_mk'
+ lift_of
+ lift_of'
+ lift_root
+ lift_root'
+ linearMap
+ linearMap_apply
+ map_eq_id
+ map_eq_self
+ mul_smul_comm
+ right_comm
+ smul_def
+ smul_eq_mul
+ smul_mul_assoc

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.


Increase in strong tech debt: (relative, absolute) = (2.00, 0.00)
Current number Change Type (strong)
porting notes 421 2
No changes to weak technical debt.

Current commit 39c9e14390
Reference commit c4e799365a

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

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants