-
Notifications
You must be signed in to change notification settings - Fork 1.5k
chore(Data/Finsupp): make mapDomain_congr congr
#39575
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -199,7 +199,7 @@ theorem repr_reindex_apply (i' : ι') : (b.reindex e).repr x i' = b.repr x (e.sy | |
| show (Finsupp.domLCongr e : _ ≃ₗ[R] _) (b.repr x) i' = _ by simp | ||
|
|
||
| @[simp] | ||
| theorem repr_reindex : (b.reindex e).repr x = (b.repr x).mapDomain e := | ||
| theorem repr_reindex : (b.reindex e).repr x = (b.repr x).equivMapDomain e := | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What motivated this?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This makes the simp set more confluent. Otherwise simp fails to prove |
||
| DFunLike.ext _ _ <| by simp [repr_reindex_apply] | ||
|
|
||
| @[simp] | ||
|
|
@@ -479,8 +479,7 @@ theorem reindexFinsetRange_repr_self (i : ι) : | |
| b.reindexFinsetRange.repr (b i) = | ||
| Finsupp.single ⟨b i, Finset.mem_image_of_mem b (Finset.mem_univ i)⟩ 1 := by | ||
| ext ⟨bi, hbi⟩ | ||
| rw [reindexFinsetRange, repr_reindex, Finsupp.mapDomain_equiv_apply, reindexRange_repr_self] | ||
| simp [Finsupp.single_apply] | ||
| simp [reindexFinsetRange, reindexRange_repr_self] | ||
|
|
||
| @[simp] | ||
| theorem reindexFinsetRange_repr (x : M) (i : ι) | ||
|
|
@@ -710,8 +709,7 @@ variable (e : ι ≃ ι') | |
| @[simp] | ||
| theorem sumCoords_reindex : (b.reindex e).sumCoords = b.sumCoords := by | ||
| ext x | ||
| simp only [coe_sumCoords, repr_reindex] | ||
| exact Finsupp.sum_mapDomain_index (fun _ => rfl) fun _ _ _ => rfl | ||
| simp [Function.id_def] | ||
|
|
||
| variable (S : Type*) [Semiring S] [Module S M'] | ||
| variable [SMulCommClass R S M'] | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why isn't this true? It looks to me like the congr lemma would eta-expand
id, which leads to that chain.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(I wonder if
simp highwould be more appropriate to silence the linter)Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I already tried
simp highandsimp\da while ago and neither worked to silence the linter.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you elaborate on "this isn't true (at least within most of mathlib)"?
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
but if I do it with
import Mathlib, then it complains. I tried bisecting quickly and I seem to be able to import most of mathlib without complaining