Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(algebra/module/basic): remove dependency on finiteness (#17764)
Co-authored-by: Ruben Van de Velde <65514131+Ruben-VandeVelde@users.noreply.github.com>
- Loading branch information
1 parent
7080d59
commit 94825b2
Showing
11 changed files
with
44 additions
and
14 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,33 @@ | ||
/- | ||
Copyright (c) 2015 Nathaniel Thomas. All rights reserved. | ||
Released under Apache 2.0 license as described in the file LICENSE. | ||
Authors: Nathaniel Thomas, Jeremy Avigad, Johannes Hölzl, Mario Carneiro | ||
-/ | ||
|
||
import algebra.module.basic | ||
import algebra.big_operators.basic | ||
|
||
/-! | ||
# Finite sums over modules over a ring | ||
-/ | ||
|
||
open_locale big_operators | ||
|
||
universes u v | ||
variables {α R k S M M₂ M₃ ι : Type*} | ||
section add_comm_monoid | ||
variables [semiring R] [add_comm_monoid M] [module R M] (r s : R) (x y : M) | ||
variables {R M} | ||
lemma list.sum_smul {l : list R} {x : M} : l.sum • x = (l.map (λ r, r • x)).sum := | ||
((smul_add_hom R M).flip x).map_list_sum l | ||
|
||
lemma multiset.sum_smul {l : multiset R} {x : M} : l.sum • x = (l.map (λ r, r • x)).sum := | ||
((smul_add_hom R M).flip x).map_multiset_sum l | ||
|
||
lemma finset.sum_smul {f : ι → R} {s : finset ι} {x : M} : | ||
(∑ i in s, f i) • x = (∑ i in s, (f i) • x) := | ||
((smul_add_hom R M).flip x).map_sum f s | ||
end add_comm_monoid | ||
|
||
lemma finset.cast_card [comm_semiring R] (s : finset α) : (s.card : R) = ∑ a in s, 1 := | ||
by rw [finset.sum_const, nat.smul_one_eq_coe] |
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
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
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
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
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