Skip to content
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

feat(data/finsupp/equiv_dfinsupp): add an equivalence between finsupp and dfinsupp #7217

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

eric-wieser
Copy link
Member

@eric-wieser eric-wieser commented Apr 16, 2021

Doing this for subgroup is slightly harder as some simp lemmas are missing - so I will leave that to a follow up.


Open in Gitpod

The missing simp lemma that would be needed for subgroups is in #7218

@eric-wieser eric-wieser changed the title feat(data/finsupp/equiv_dfinsupp): add an equivalence between finsupp… feat(data/finsupp/equiv_dfinsupp): add an equivalence between finsupp and dfinsupp Apr 16, 2021
@eric-wieser eric-wieser added the awaiting-review The author would like community review of the PR label Apr 16, 2021
Copy link
Member

@jcommelin jcommelin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for not reviewing this faster.

variables (M)

/-- The submonoid corresponding to the range of `finsupp.single`. -/
abbreviation single_submonoid [add_monoid M] (i : ι) : add_submonoid (ι →₀ M) :=
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does it make sense to call this single_mrange?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we do that we end up with a name conflict for linear_map.range and subgroup.range when I inevitably extend this to subgroups and submodules - both are after the coveted single_range name, but one will have to be prefixed. I suppose that's not too big a deal, but it's why I went for the easy option of just putting the type at the end.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I understand, but how about single_grange and single_lrange for those others? I think it's useful if the name mentions range. Now it sounds like you are putting a submonoid instance on something called single, or so...

Comment on lines +59 to +60
noncomputable def finsupp.equiv_dfinsupp_single_submonoid [decidable_eq ι] [add_comm_monoid M] :
(ι →₀ M) ≃+ (Π₀ i : ι, finsupp.single_submonoid M i) :=
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would expect the following statement

Suggested change
noncomputable def finsupp.equiv_dfinsupp_single_submonoid [decidable_eq ι] [add_comm_monoid M] :
(ι →₀ M) ≃+ (Π₀ i : ι, finsupp.single_submonoid M i) :=
noncomputable def finsupp.equiv_dfinsupp_single_submonoid [decidable_eq ι] [add_comm_monoid M] :
(ι →₀ M) ≃+ (Π₀ i : ι, M) :=

Is there a reason you picked your version?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's probably a good definition to have somewhere (i'm suspicious we already have it), but its not the one I'm interested in - the idea behind this equivalence is that it equates a polynomial with a direct sum of its monomials.

I suppose it would be possible / sensible to split this equivalence into (ι →₀ M) ≃+ (Π₀ i : ι, M) and (Π₀ i : ι, M) ≃+ (Π₀ i : ι, finsupp.single_submonoid M i), but I suspect the proofs would look the same anyway.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll have a go at doing the split.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, the equivalence you describe roughly exists as finsupp_lequiv_direct_sum

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've added the additive version in #7311

@jcommelin jcommelin added awaiting-author A reviewer has asked the author a question or requested changes and removed awaiting-review The author would like community review of the PR labels Apr 20, 2021
bors bot pushed a commit that referenced this pull request Apr 21, 2021
This adds the bundled homs:

* `dfinsupp.map_range.add_monoid_hom`
* `dfinsupp.map_range.add_equiv`
* `dfinsupp.map_range.linear_map`
* `dfinsupp.map_range.linear_equiv`

and lemmas

* `dfinsupp.map_range_zero`
* `dfinsupp.map_range_add`
* `dfinsupp.map_range_smul`

For which we already have identical lemmas for `finsupp`.

Split from #7217, since `map_range.add_equiv` can be used in conjunction with `submonoid.mrange_restrict`
@github-actions github-actions bot added the blocked-by-other-PR This PR depends on another PR which is still in the queue. A bot manages this label via PR comment. label Apr 21, 2021
bors bot pushed a commit that referenced this pull request Apr 29, 2021
…dfinsupp (#7311)

A rework of #7217, that adds a more elementary equivalence.
@github-actions github-actions bot removed the blocked-by-other-PR This PR depends on another PR which is still in the queue. A bot manages this label via PR comment. label Apr 29, 2021
@github-actions
Copy link

@semorrison semorrison added the too-late This PR was ready too late for inclusion in mathlib3 label Jul 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting-author A reviewer has asked the author a question or requested changes too-late This PR was ready too late for inclusion in mathlib3
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants