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(algebra/ring/basic): define non-unital, non-associative rings #6786
Conversation
They key changes here are the introduction of the following: * `non_unital_non_assoc_semiring` * `non_unital_semiring` * `non_assoc_semiring` The goal is to use these to support a non-unital, non-associative algebras.
I decided to make one last attempt at this. Let's see if it builds.
I _pray_ that this doesn't send me down another rabbit hole of failed builds.
bors merge |
CI looks happy now - I'll look over this once more tomorrow, but i think it's ready to go |
This isn't a complete generalization of all lemmas, but at least puts the instances in place
# Conflicts: # src/data/finsupp/pointwise.lean
src/ring_theory/hahn_series.lean
Outdated
section domain | ||
variables {Γ' : Type*} [partial_order Γ'] | ||
|
||
lemma emb_domain_add (f : Γ ↪o Γ') (x y : hahn_series Γ R) : | ||
emb_domain f (x + y) = emb_domain f x + emb_domain f y := | ||
begin | ||
ext g, | ||
by_cases hg : g ∈ set.range f, | ||
{ obtain ⟨a, rfl⟩ := hg, | ||
simp }, | ||
{ simp [emb_domain_notin_range, hg] } | ||
end | ||
|
||
end domain | ||
|
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.
This change is #7802, which is probably worth merging first just to keep the history manageable
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.
CI needs to run again, but I think I cleaned up all the distrib
instances that can now be non_unital_non_assoc_semiring
instances.
… non_unital_assoc_rings
@@ -77,7 +77,9 @@ begin | |||
refine s.induction_on _ _, | |||
{ simp }, | |||
{ assume a s ih, | |||
simp [ih, add_mul, mul_comm, mul_left_comm, mul_assoc, sum_map_mul_left.symm], | |||
have := @sum_map_mul_left α β _, |
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.
have := @sum_map_mul_left α β _, |
Great accomplishment! Thanks 🎉 bors merge |
…6786) This introduces the following typeclasses beneath `semiring`: * `non_unital_non_assoc_semiring` * `non_unital_semiring` * `non_assoc_semiring` The goal is to use these to support a non-unital, non-associative algebras. The typeclass requirements of `subring`, `subsemiring`, and `ring_hom` are relaxed from `semiring` to `non_assoc_semiring`. Instances of these new typeclasses are added for: * alias types: * `opposite` * `ulift` * convolutive types: * `(add_)monoid_algebra` * `direct_sum` * `set_semiring` * `hahn_series` * elementwise types: * `locally_constant` * `pi` * `prod` * `finsupp` Co-authored-by: Gabriel Ebner <gebner@gebner.org> Co-authored-by: Scott Morrison <scott.morrison@gmail.com> Co-authored-by: Eric Wieser <wieser.eric@gmail.com>
Build failed (retrying...): |
…6786) This introduces the following typeclasses beneath `semiring`: * `non_unital_non_assoc_semiring` * `non_unital_semiring` * `non_assoc_semiring` The goal is to use these to support a non-unital, non-associative algebras. The typeclass requirements of `subring`, `subsemiring`, and `ring_hom` are relaxed from `semiring` to `non_assoc_semiring`. Instances of these new typeclasses are added for: * alias types: * `opposite` * `ulift` * convolutive types: * `(add_)monoid_algebra` * `direct_sum` * `set_semiring` * `hahn_series` * elementwise types: * `locally_constant` * `pi` * `prod` * `finsupp` Co-authored-by: Gabriel Ebner <gebner@gebner.org> Co-authored-by: Scott Morrison <scott.morrison@gmail.com> Co-authored-by: Eric Wieser <wieser.eric@gmail.com>
If this fails again it will probably do so in half an hour - we should punt this off the queue at that point, since the likelihood of it being the cause is high. |
Pull request successfully merged into master. Build succeeded: |
This introduces the following typeclasses beneath
semiring
:non_unital_non_assoc_semiring
non_unital_semiring
non_assoc_semiring
The goal is to use these to support a non-unital, non-associative
algebras.
The typeclass requirements of
subring
,subsemiring
, andring_hom
are relaxed fromsemiring
tonon_assoc_semiring
.Instances of these new typeclasses are added for:
opposite
ulift
(add_)monoid_algebra
direct_sum
set_semiring
hahn_series
locally_constant
pi
prod
finsupp
The changes here aim to be the uncontroversial part of #6591
mul_one_class
andadd_zero_class
for non-associative monoids #6865monoid_with_zero
instance #7339semigroup_with_zero
)