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

refactor(algebra/monoid_algebra): remove simp from of_apply #13791

Closed
wants to merge 1 commit into from

Conversation

semorrison
Copy link
Collaborator

I felt that this was unhelpfully "breaking the API" by dropping us down to stuff about finsupp. On the other hand, the line between monoid_algebra and finsupp remains very murky, so it's not clear this is really an improvement.

I'm proposing just this change for now as it would have been helpful for me in other recent work.


Open in Gitpod

@semorrison semorrison added awaiting-review The author would like community review of the PR awaiting-CI The author would like to see what CI has to say before doing more work. labels Apr 29, 2022
@@ -1542,11 +1542,11 @@ lemma lift_unique' (F : add_monoid_algebra k G →ₐ[k] A) :
/-- Decomposition of a `k`-algebra homomorphism from `monoid_algebra k G` by
its values on `F (single a 1)`. -/
lemma lift_unique (F : add_monoid_algebra k G →ₐ[k] A) (f : monoid_algebra k G) :
F f = f.sum (λ a b, b • F (single a 1)) :=
by conv_lhs { rw lift_unique' F, simp [lift_apply] }
F f = f.sum (λ a b, b • F (of k G a)) :=
Copy link
Member

Choose a reason for hiding this comment

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

This isn't type correct any more, it needs to be either

Suggested change
F f = f.sum (λ a b, b • F (of k G a)) :=
F f = f.sum (λ a b, b • F (of k G (multiplicative.of_add a))) :=

or

Suggested change
F f = f.sum (λ a b, b • F (of k G a)) :=
F f = f.sum (λ a b, b • F (of' k G a)) :=


lemma alg_hom_ext_iff {φ₁ φ₂ : add_monoid_algebra k G →ₐ[k] A} :
(∀ x, φ₁ (finsupp.single x 1) = φ₂ (finsupp.single x 1)) ↔ φ₁ = φ₂ :=
(∀ x, φ₁ (of k G x) = φ₂ (of k G x)) ↔ φ₁ = φ₂ :=
Copy link
Member

Choose a reason for hiding this comment

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

This feel slike it will be irritating, because it introduces x : multiplicative G instead of x : G like it used to. Changing from of to of' would fix this.

Copy link
Member

@eric-wieser eric-wieser left a comment

Choose a reason for hiding this comment

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

If you remove these simps, then we should:

  • add back [simp] to the lemmas about of that were previously rejected by the linter
  • copy the simp lemmas below about single into versions about of

Maybe the second one can wait till a follow-up PR, but I think we should do the first change in this PR.

@github-actions github-actions bot removed the awaiting-CI The author would like to see what CI has to say before doing more work. label Apr 29, 2022
@semorrison semorrison added help-wanted The author needs attention to resolve issues and removed awaiting-review The author would like community review of the PR labels Apr 30, 2022
@semorrison
Copy link
Collaborator Author

If you remove these simps, then we should:

  • add back [simp] to the lemmas about of that were previously rejected by the linter
  • copy the simp lemmas below about single into versions about of

Maybe the second one can wait till a follow-up PR, but I think we should do the first change in this PR.

I agree, but I may not get to this soon, so I'll leave this PR as help-wanted, in case anyone wants to take over. :-)

@eric-wieser eric-wieser added the awaiting-author A reviewer has asked the author a question or requested changes label May 23, 2022
@semorrison semorrison added please-adopt This PR/issue may have been abandoned by the original contributor. You are welcome to take it over. and removed awaiting-author A reviewer has asked the author a question or requested changes labels May 23, 2022
@semorrison semorrison closed this Mar 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help-wanted The author needs attention to resolve issues please-adopt This PR/issue may have been abandoned by the original contributor. You are welcome to take it over.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants