chore: weaken commutativity assumptions for AdjoinRoot.lift and AdjoinRoot.liftHom - #43971
AntoineChambert-Loir wants to merge 20 commits into
Conversation
This allows us to restore quite a few uses of `lift` to the original. The only drawback in the commutative case is we have to write `(lift i a h) x` instead of `lift i a h x` (since the autoparam comes after the `h`). Also, `simp` doesn't discharge autoparams automatically, so I added an extra set of lemmas that use implicits instead of autoparams, to be filled by unification.
Comments from Original PR #9564This section contains 4 comment(s) from the original PR, excluding bot comments. @AntoineChambert-Loir (2024-01-20 19:14 UTC): @Vierkantor (2024-01-25 15:38 UTC): @joneugster (2026-09-19 13:46 UTC): @mathlib-bors (2026-09-19 16:46 UTC): While this PR remains draft, bors will ignore commands on this PR. Mark it ready for review before using commands like |
PR summary 39c9e14390
|
| 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 |
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
relativevalue is the weighted sum of the differences with weight given by the inverse of the current value of the statistic. - The
absolutevalue is therelativevalue divided by the total sum of the inverses of the current values (i.e. the weighted average of the differences).
This PR continues the work from #9564.
Original PR: #9564