Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(Algebra/BigOperators): reduce imports for
Multiset.prod
(#10987)
I noticed that `BigOperators/Multiset/Basic.lean` transitively imports a lot of files, and it sits on the longest pole. If we move one lemma to another file, we can severely restrict the amount of imports required. Looks like the extra imports that `shake` didn't notice were due to instances being filled in that we didn't actually need. Co-authored-by: Anne Baanen <Vierkantor@users.noreply.github.com> Co-authored-by: Jeremy Tan Jie Rui <reddeloostw@gmail.com> Co-authored-by: Parcly Taxel <reddeloostw@gmail.com>
- Loading branch information
1 parent
d67e175
commit ae9f685
Showing
3 changed files
with
31 additions
and
9 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
/- | ||
Copyright (c) 2015 Microsoft Corporation. All rights reserved. | ||
Released under Apache 2.0 license as described in the file LICENSE. | ||
Authors: Johannes Hölzl, Rob Lewis | ||
-/ | ||
import Mathlib.Algebra.BigOperators.Multiset.Basic | ||
import Mathlib.Algebra.Order.Group.Abs | ||
|
||
#align_import algebra.big_operators.multiset.basic from "leanprover-community/mathlib"@"6c5f73fd6f6cc83122788a80a27cdd54663609f4" | ||
|
||
/-! | ||
# Absolute values and sums/products over multisets | ||
This file contains lemmas on the relation between `Multiset.prod`/`Multiset.sum` and `abs`. | ||
## Main declarations | ||
* `Multiset.abs_sum_le_sum_abs`: the multiset version of the triangle inequality. | ||
-/ | ||
|
||
namespace Multiset | ||
|
||
variable {α : Type*} | ||
|
||
theorem abs_sum_le_sum_abs [LinearOrderedAddCommGroup α] {s : Multiset α} : | ||
abs s.sum ≤ (s.map abs).sum := | ||
le_sum_of_subadditive _ abs_zero abs_add s | ||
#align multiset.abs_sum_le_sum_abs Multiset.abs_sum_le_sum_abs | ||
|
||
end Multiset |
This file contains 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