This repository was archived by the owner on Jul 24, 2024. It is now read-only.
[Merged by Bors] - feat(data/list/basic): list products - #10184
Closed
stuart-presnell wants to merge 5 commits into
Closed
[Merged by Bors] - feat(data/list/basic): list products#10184stuart-presnell wants to merge 5 commits into
stuart-presnell wants to merge 5 commits into
Conversation
fpvandoorn
reviewed
Nov 5, 2021
Member
|
Thanks for submitting your first PR! Please add the |
Member
|
This will conflict with #10164, which I expect we will want to merge soon. |
Co-authored-by: Floris van Doorn <fpvdoorn@gmail.com>
Collaborator
Author
|
So would it be better to wait until #10164 is merged and then re-submit? |
Member
|
We can keep this PR open. Whenever you push to this branch this PR will be automatically updated. |
Member
|
I saw some more issues, mostly in the lemmas around the new lemmas, so I went in and changed some things myself:
|
Member
|
bors merge |
bors Bot
pushed a commit
that referenced
this pull request
Nov 6, 2021
Adding a couple of lemmas about list products. The first is a simpler variant of `head_mul_tail_prod'` in the case where the list is not empty. The other is a variant of `list.prod_ne_zero` for `list ℕ`. Co-authored-by: Floris van Doorn <fpvdoorn@gmail.com>
Collaborator
Author
|
Great, thanks very much |
|
Pull request successfully merged into master. Build succeeded: |
ericrbg
pushed a commit
that referenced
this pull request
Nov 9, 2021
Adding a couple of lemmas about list products. The first is a simpler variant of `head_mul_tail_prod'` in the case where the list is not empty. The other is a variant of `list.prod_ne_zero` for `list ℕ`. Co-authored-by: Floris van Doorn <fpvdoorn@gmail.com>
mathlib-bors Bot
pushed a commit
to leanprover-community/mathlib4
that referenced
this pull request
Apr 5, 2024
Take the content of * some of `Algebra.BigOperators.List.Basic` * some of `Algebra.BigOperators.List.Lemmas` * some of `Algebra.BigOperators.Multiset.Basic` * some of `Algebra.BigOperators.Multiset.Lemmas` * `Algebra.BigOperators.Multiset.Order` * `Algebra.BigOperators.Order` and sort it into six files: * `Algebra.Order.BigOperators.Group.List`. I credit Yakov for leanprover-community/mathlib3#8543. * `Algebra.Order.BigOperators.Group.Multiset`. Copyright inherited from `Algebra.BigOperators.Multiset.Order`. * `Algebra.Order.BigOperators.Group.Finset`. Copyright inherited from `Algebra.BigOperators.Order`. * `Algebra.Order.BigOperators.Ring.List`. I credit Stuart for leanprover-community/mathlib3#10184. * `Algebra.Order.BigOperators.Ring.Multiset`. I credit Ruben for leanprover-community/mathlib3#8787. * `Algebra.Order.BigOperators.Ring.Finset`. I credit Floris for leanprover-community/mathlib3#1294. Here are the design decisions at play: * Pure algebra and big operators algebra shouldn't import (algebraic) order theory. This PR makes that better, but not perfect because we still import `Data.Nat.Order.Basic` in a few `List` files. * It's `Algebra.Order.BigOperators` instead of `Algebra.BigOperators.Order` because algebraic order theory is more of a theory than big operators algebra. Another reason is that algebraic order theory is the only way to mix pure order and pure algebra, while there are more ways to mix pure finiteness and pure algebra than just big operators. * There are separate files for group/monoid lemmas vs ring lemmas. Groups/monoids are the natural setup for big operators, so their lemmas shouldn't be mixed with ring lemmas that involves both addition and multiplication. As a result, everything under `Algebra.Order.BigOperators.Group` should be additivisable (except a few `Nat`- or `Int`-specific lemmas). In contrast, things under `Algebra.Order.BigOperators.Ring` are more prone to having heavy imports. * Lemmas are separated according to `List` vs `Multiset` vs `Finset`. This is not strictly necessary, and can be relaxed in cases where there aren't that many lemmas to be had. As an example, I could split out the `AbsoluteValue` lemmas from `Algebra.Order.BigOperators.Ring.Finset` to a file `Algebra.Order.BigOperators.Ring.AbsoluteValue` and it could stay this way until too many lemmas are in this file (or a split is needed for import reasons), in which case we would need files `Algebra.Order.BigOperators.Ring.AbsoluteValue.Finset`, `Algebra.Order.BigOperators.Ring.AbsoluteValue.Multiset`, etc... * `Finsupp` big operator and `finprod`/`finsum` order lemmas also belong in `Algebra.Order.BigOperators`. I haven't done so in this PR because the diff is big enough like that.
xgenereux
pushed a commit
to leanprover-community/mathlib4
that referenced
this pull request
Apr 15, 2024
Take the content of * some of `Algebra.BigOperators.List.Basic` * some of `Algebra.BigOperators.List.Lemmas` * some of `Algebra.BigOperators.Multiset.Basic` * some of `Algebra.BigOperators.Multiset.Lemmas` * `Algebra.BigOperators.Multiset.Order` * `Algebra.BigOperators.Order` and sort it into six files: * `Algebra.Order.BigOperators.Group.List`. I credit Yakov for leanprover-community/mathlib3#8543. * `Algebra.Order.BigOperators.Group.Multiset`. Copyright inherited from `Algebra.BigOperators.Multiset.Order`. * `Algebra.Order.BigOperators.Group.Finset`. Copyright inherited from `Algebra.BigOperators.Order`. * `Algebra.Order.BigOperators.Ring.List`. I credit Stuart for leanprover-community/mathlib3#10184. * `Algebra.Order.BigOperators.Ring.Multiset`. I credit Ruben for leanprover-community/mathlib3#8787. * `Algebra.Order.BigOperators.Ring.Finset`. I credit Floris for leanprover-community/mathlib3#1294. Here are the design decisions at play: * Pure algebra and big operators algebra shouldn't import (algebraic) order theory. This PR makes that better, but not perfect because we still import `Data.Nat.Order.Basic` in a few `List` files. * It's `Algebra.Order.BigOperators` instead of `Algebra.BigOperators.Order` because algebraic order theory is more of a theory than big operators algebra. Another reason is that algebraic order theory is the only way to mix pure order and pure algebra, while there are more ways to mix pure finiteness and pure algebra than just big operators. * There are separate files for group/monoid lemmas vs ring lemmas. Groups/monoids are the natural setup for big operators, so their lemmas shouldn't be mixed with ring lemmas that involves both addition and multiplication. As a result, everything under `Algebra.Order.BigOperators.Group` should be additivisable (except a few `Nat`- or `Int`-specific lemmas). In contrast, things under `Algebra.Order.BigOperators.Ring` are more prone to having heavy imports. * Lemmas are separated according to `List` vs `Multiset` vs `Finset`. This is not strictly necessary, and can be relaxed in cases where there aren't that many lemmas to be had. As an example, I could split out the `AbsoluteValue` lemmas from `Algebra.Order.BigOperators.Ring.Finset` to a file `Algebra.Order.BigOperators.Ring.AbsoluteValue` and it could stay this way until too many lemmas are in this file (or a split is needed for import reasons), in which case we would need files `Algebra.Order.BigOperators.Ring.AbsoluteValue.Finset`, `Algebra.Order.BigOperators.Ring.AbsoluteValue.Multiset`, etc... * `Finsupp` big operator and `finprod`/`finsum` order lemmas also belong in `Algebra.Order.BigOperators`. I haven't done so in this PR because the diff is big enough like that.
atarnoam
pushed a commit
to leanprover-community/mathlib4
that referenced
this pull request
Apr 16, 2024
Take the content of * some of `Algebra.BigOperators.List.Basic` * some of `Algebra.BigOperators.List.Lemmas` * some of `Algebra.BigOperators.Multiset.Basic` * some of `Algebra.BigOperators.Multiset.Lemmas` * `Algebra.BigOperators.Multiset.Order` * `Algebra.BigOperators.Order` and sort it into six files: * `Algebra.Order.BigOperators.Group.List`. I credit Yakov for leanprover-community/mathlib3#8543. * `Algebra.Order.BigOperators.Group.Multiset`. Copyright inherited from `Algebra.BigOperators.Multiset.Order`. * `Algebra.Order.BigOperators.Group.Finset`. Copyright inherited from `Algebra.BigOperators.Order`. * `Algebra.Order.BigOperators.Ring.List`. I credit Stuart for leanprover-community/mathlib3#10184. * `Algebra.Order.BigOperators.Ring.Multiset`. I credit Ruben for leanprover-community/mathlib3#8787. * `Algebra.Order.BigOperators.Ring.Finset`. I credit Floris for leanprover-community/mathlib3#1294. Here are the design decisions at play: * Pure algebra and big operators algebra shouldn't import (algebraic) order theory. This PR makes that better, but not perfect because we still import `Data.Nat.Order.Basic` in a few `List` files. * It's `Algebra.Order.BigOperators` instead of `Algebra.BigOperators.Order` because algebraic order theory is more of a theory than big operators algebra. Another reason is that algebraic order theory is the only way to mix pure order and pure algebra, while there are more ways to mix pure finiteness and pure algebra than just big operators. * There are separate files for group/monoid lemmas vs ring lemmas. Groups/monoids are the natural setup for big operators, so their lemmas shouldn't be mixed with ring lemmas that involves both addition and multiplication. As a result, everything under `Algebra.Order.BigOperators.Group` should be additivisable (except a few `Nat`- or `Int`-specific lemmas). In contrast, things under `Algebra.Order.BigOperators.Ring` are more prone to having heavy imports. * Lemmas are separated according to `List` vs `Multiset` vs `Finset`. This is not strictly necessary, and can be relaxed in cases where there aren't that many lemmas to be had. As an example, I could split out the `AbsoluteValue` lemmas from `Algebra.Order.BigOperators.Ring.Finset` to a file `Algebra.Order.BigOperators.Ring.AbsoluteValue` and it could stay this way until too many lemmas are in this file (or a split is needed for import reasons), in which case we would need files `Algebra.Order.BigOperators.Ring.AbsoluteValue.Finset`, `Algebra.Order.BigOperators.Ring.AbsoluteValue.Multiset`, etc... * `Finsupp` big operator and `finprod`/`finsum` order lemmas also belong in `Algebra.Order.BigOperators`. I haven't done so in this PR because the diff is big enough like that.
uniwuni
pushed a commit
to leanprover-community/mathlib4
that referenced
this pull request
Apr 19, 2024
Take the content of * some of `Algebra.BigOperators.List.Basic` * some of `Algebra.BigOperators.List.Lemmas` * some of `Algebra.BigOperators.Multiset.Basic` * some of `Algebra.BigOperators.Multiset.Lemmas` * `Algebra.BigOperators.Multiset.Order` * `Algebra.BigOperators.Order` and sort it into six files: * `Algebra.Order.BigOperators.Group.List`. I credit Yakov for leanprover-community/mathlib3#8543. * `Algebra.Order.BigOperators.Group.Multiset`. Copyright inherited from `Algebra.BigOperators.Multiset.Order`. * `Algebra.Order.BigOperators.Group.Finset`. Copyright inherited from `Algebra.BigOperators.Order`. * `Algebra.Order.BigOperators.Ring.List`. I credit Stuart for leanprover-community/mathlib3#10184. * `Algebra.Order.BigOperators.Ring.Multiset`. I credit Ruben for leanprover-community/mathlib3#8787. * `Algebra.Order.BigOperators.Ring.Finset`. I credit Floris for leanprover-community/mathlib3#1294. Here are the design decisions at play: * Pure algebra and big operators algebra shouldn't import (algebraic) order theory. This PR makes that better, but not perfect because we still import `Data.Nat.Order.Basic` in a few `List` files. * It's `Algebra.Order.BigOperators` instead of `Algebra.BigOperators.Order` because algebraic order theory is more of a theory than big operators algebra. Another reason is that algebraic order theory is the only way to mix pure order and pure algebra, while there are more ways to mix pure finiteness and pure algebra than just big operators. * There are separate files for group/monoid lemmas vs ring lemmas. Groups/monoids are the natural setup for big operators, so their lemmas shouldn't be mixed with ring lemmas that involves both addition and multiplication. As a result, everything under `Algebra.Order.BigOperators.Group` should be additivisable (except a few `Nat`- or `Int`-specific lemmas). In contrast, things under `Algebra.Order.BigOperators.Ring` are more prone to having heavy imports. * Lemmas are separated according to `List` vs `Multiset` vs `Finset`. This is not strictly necessary, and can be relaxed in cases where there aren't that many lemmas to be had. As an example, I could split out the `AbsoluteValue` lemmas from `Algebra.Order.BigOperators.Ring.Finset` to a file `Algebra.Order.BigOperators.Ring.AbsoluteValue` and it could stay this way until too many lemmas are in this file (or a split is needed for import reasons), in which case we would need files `Algebra.Order.BigOperators.Ring.AbsoluteValue.Finset`, `Algebra.Order.BigOperators.Ring.AbsoluteValue.Multiset`, etc... * `Finsupp` big operator and `finprod`/`finsum` order lemmas also belong in `Algebra.Order.BigOperators`. I haven't done so in this PR because the diff is big enough like that.
callesonne
pushed a commit
to leanprover-community/mathlib4
that referenced
this pull request
Apr 22, 2024
Take the content of * some of `Algebra.BigOperators.List.Basic` * some of `Algebra.BigOperators.List.Lemmas` * some of `Algebra.BigOperators.Multiset.Basic` * some of `Algebra.BigOperators.Multiset.Lemmas` * `Algebra.BigOperators.Multiset.Order` * `Algebra.BigOperators.Order` and sort it into six files: * `Algebra.Order.BigOperators.Group.List`. I credit Yakov for leanprover-community/mathlib3#8543. * `Algebra.Order.BigOperators.Group.Multiset`. Copyright inherited from `Algebra.BigOperators.Multiset.Order`. * `Algebra.Order.BigOperators.Group.Finset`. Copyright inherited from `Algebra.BigOperators.Order`. * `Algebra.Order.BigOperators.Ring.List`. I credit Stuart for leanprover-community/mathlib3#10184. * `Algebra.Order.BigOperators.Ring.Multiset`. I credit Ruben for leanprover-community/mathlib3#8787. * `Algebra.Order.BigOperators.Ring.Finset`. I credit Floris for leanprover-community/mathlib3#1294. Here are the design decisions at play: * Pure algebra and big operators algebra shouldn't import (algebraic) order theory. This PR makes that better, but not perfect because we still import `Data.Nat.Order.Basic` in a few `List` files. * It's `Algebra.Order.BigOperators` instead of `Algebra.BigOperators.Order` because algebraic order theory is more of a theory than big operators algebra. Another reason is that algebraic order theory is the only way to mix pure order and pure algebra, while there are more ways to mix pure finiteness and pure algebra than just big operators. * There are separate files for group/monoid lemmas vs ring lemmas. Groups/monoids are the natural setup for big operators, so their lemmas shouldn't be mixed with ring lemmas that involves both addition and multiplication. As a result, everything under `Algebra.Order.BigOperators.Group` should be additivisable (except a few `Nat`- or `Int`-specific lemmas). In contrast, things under `Algebra.Order.BigOperators.Ring` are more prone to having heavy imports. * Lemmas are separated according to `List` vs `Multiset` vs `Finset`. This is not strictly necessary, and can be relaxed in cases where there aren't that many lemmas to be had. As an example, I could split out the `AbsoluteValue` lemmas from `Algebra.Order.BigOperators.Ring.Finset` to a file `Algebra.Order.BigOperators.Ring.AbsoluteValue` and it could stay this way until too many lemmas are in this file (or a split is needed for import reasons), in which case we would need files `Algebra.Order.BigOperators.Ring.AbsoluteValue.Finset`, `Algebra.Order.BigOperators.Ring.AbsoluteValue.Multiset`, etc... * `Finsupp` big operator and `finprod`/`finsum` order lemmas also belong in `Algebra.Order.BigOperators`. I haven't done so in this PR because the diff is big enough like that.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adding a couple of lemmas about list products. The first is a simpler variant of
head_mul_tail_prod'in the case where the list is not empty. The other is a variant oflist.prod_ne_zeroforlist ℕ.