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
[Merged by Bors] - feat(AddMonoidAlgebra*): add notation R[A]
for addMonoidAlgebra R A
#7203
Conversation
|
If wanted/possible, we could introduce the two notations |
I just checked: scoped[AddMonoidAlgebra] notation :9000 R "[" A "+]" => AddMonoidAlgebra R A
scoped[MonoidAlgebra] notation :9000 R "[" A "*]" => MonoidAlgebra R A
variable {R A} [Semiring R] [Field A]
open AddMonoidAlgebra MonoidAlgebra
variable (f : R[A+]) (g : R[A*])
#check f -- f : R[A+]
#check g -- g : R[A*] seems to work, if it is wanted. Personally, I am not too convinced. Maybe, once we end up using |
implementation detail, but it can be useful to transfer results from `Finsupp` to polynomials. -/ | ||
@[simps!] | ||
def toFinsuppIsoAlg : R[X] ≃ₐ[R] AddMonoidAlgebra R ℕ := | ||
def toFinsuppIsoAlg : R[X] ≃ₐ[R] R[ℕ] := |
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.
Interesting that this works and Lean doesn't try to find (X : Type*)
.
I think it's probably safe to use the same notation for AddMonoidAlgebra
and MonoidAlgebra
, as long as they're scoped in different locales(=namespaces now?), since it's not common that we open both (and other conflicts will appear if we do). I imagine if we do any Kaplansky's conjecture stuff in mathlib we'd be using MonoidAlgebra
rather than AddMonoidAlgebra
(we have to make a choice to avoid duplication unless we make to_additive work), although existing works seem to use hand-rolled computable versions of group algebra.
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.
LGTM
maintainer merge
🚀 Pull request has been placed on the maintainer queue by alreadydone. |
Thanks 🎉 bors merge |
…A` (#7203) Introduce the notation `R[A]` for `AddMonoidAlgebra R A`. This is to align `Mathlib`s notation with the standard notation for [group ring](https://en.wikipedia.org/wiki/Group_ring). The notation is scoped in `AddMonoidAlgebra` and there is *no* analogous notation for `MonoidAlgebra`. I only used the notation for single-character `R` and `A`s and only in the range `[a-zA-Z]`. The extra lines are all in `Mathlib/Algebra/MonoidAlgebra/Basic.lean`. They are accounted for by extra text in the doc-module and the actual notation. Affected files: ```bash Counterexamples/ZeroDivisorsInAddMonoidAlgebras Algebra/AlgebraicCard Algebra/MonoidAlgebra/Basic Algebra/MonoidAlgebra/Degree Algebra/MonoidAlgebra/Division Algebra/MonoidAlgebra/Grading Algebra/MonoidAlgebra/NoZeroDivisors Algebra/MonoidAlgebra/Support Data/Polynomial/AlgebraMap Data/Polynomial/Basic Data/Polynomial/Eval Data/Polynomial/Laurent RingTheory/FiniteType ```
Pull request successfully merged into master. Build succeeded! The publicly hosted instance of bors-ng is deprecated and will go away soon. If you want to self-host your own instance, instructions are here. If you want to switch to GitHub's built-in merge queue, visit their help page. |
R[A]
for addMonoidAlgebra R A
R[A]
for addMonoidAlgebra R A
…A` (#7203) Introduce the notation `R[A]` for `AddMonoidAlgebra R A`. This is to align `Mathlib`s notation with the standard notation for [group ring](https://en.wikipedia.org/wiki/Group_ring). The notation is scoped in `AddMonoidAlgebra` and there is *no* analogous notation for `MonoidAlgebra`. I only used the notation for single-character `R` and `A`s and only in the range `[a-zA-Z]`. The extra lines are all in `Mathlib/Algebra/MonoidAlgebra/Basic.lean`. They are accounted for by extra text in the doc-module and the actual notation. Affected files: ```bash Counterexamples/ZeroDivisorsInAddMonoidAlgebras Algebra/AlgebraicCard Algebra/MonoidAlgebra/Basic Algebra/MonoidAlgebra/Degree Algebra/MonoidAlgebra/Division Algebra/MonoidAlgebra/Grading Algebra/MonoidAlgebra/NoZeroDivisors Algebra/MonoidAlgebra/Support Data/Polynomial/AlgebraMap Data/Polynomial/Basic Data/Polynomial/Eval Data/Polynomial/Laurent RingTheory/FiniteType ```
Introduce the notation
R[A]
forAddMonoidAlgebra R A
. This is to alignMathlib
s notation with the standard notation for group ring.The notation is scoped in
AddMonoidAlgebra
and there is no analogous notation forMonoidAlgebra
.I only used the notation for single-character
R
andA
s and only in the range[a-zA-Z]
.The extra lines are all in
Mathlib/Algebra/MonoidAlgebra/Basic.lean
. They are accounted for by extra text in the doc-module and the actual notation.Affected files:
On line 105 of Counterexamples/ZeroDivisorsInAddMonoidAlgebras.lean, the notation does not work when used as a direct call to an implicit argument: