@@ -6,6 +6,7 @@ Authors: Johannes Hölzl, Scott Morrison
6
6
import algebra.group.pi
7
7
import algebra.big_operators.order
8
8
import algebra.module.basic
9
+ import algebra.module.pi
9
10
import group_theory.submonoid.basic
10
11
import data.fintype.card
11
12
import data.finset.preimage
@@ -639,7 +640,7 @@ variables [add_monoid M]
639
640
instance : has_add (α →₀ M) := ⟨zip_with (+) (add_zero 0 )⟩
640
641
641
642
@[simp] lemma coe_add (f g : α →₀ M) : ⇑(f + g) = f + g := rfl
642
- lemma add_apply { g₁ g₂ : α →₀ M} { a : α} : (g₁ + g₂) a = g₁ a + g₂ a := rfl
643
+ lemma add_apply ( g₁ g₂ : α →₀ M) ( a : α) : (g₁ + g₂) a = g₁ a + g₂ a := rfl
643
644
644
645
lemma support_add {g₁ g₂ : α →₀ M} : (g₁ + g₂).support ⊆ g₁.support ∪ g₂.support :=
645
646
support_zip_with
@@ -682,7 +683,7 @@ See `finsupp.lsingle` for the stronger version as a linear map.
682
683
683
684
See `finsupp.lapply` for the stronger version as a linear map. -/
684
685
@[simps apply]
685
- def apply_add_hom (a : α) : (α →₀ M) →+ M := ⟨λ g, g a, zero_apply, λ _ _, add_apply⟩
686
+ def apply_add_hom (a : α) : (α →₀ M) →+ M := ⟨λ g, g a, zero_apply, λ _ _, add_apply _ _ _ ⟩
686
687
687
688
lemma single_add_erase (a : α) (f : α →₀ M) : single a (f a) + f.erase a = f :=
688
689
ext $ λ a',
@@ -822,9 +823,8 @@ namespace finsupp
822
823
section nat_sub
823
824
instance nat_sub : has_sub (α →₀ ℕ) := ⟨zip_with (λ m n, m - n) (nat.sub_zero 0 )⟩
824
825
825
- @[simp] lemma nat_sub_apply {g₁ g₂ : α →₀ ℕ} {a : α} :
826
- (g₁ - g₂) a = g₁ a - g₂ a :=
827
- rfl
826
+ @[simp] lemma coe_nat_sub (g₁ g₂ : α →₀ ℕ) : ⇑(g₁ - g₂) = g₁ - g₂ := rfl
827
+ lemma nat_sub_apply (g₁ g₂ : α →₀ ℕ) (a : α) : (g₁ - g₂) a = g₁ a - g₂ a := rfl
828
828
829
829
@[simp] lemma single_sub {a : α} {n₁ n₂ : ℕ} : single a (n₁ - n₂) = single a n₁ - single a n₂ :=
830
830
begin
@@ -901,11 +901,11 @@ lemma prod_neg_index [add_group G] [comm_monoid M] {g : α →₀ G} {h : α →
901
901
(-g).prod h = g.prod (λa b, h a (- b)) :=
902
902
prod_map_range_index h0
903
903
904
- @[simp] lemma neg_apply [add_group G] { g : α →₀ G} {a : α} : (- g) a = - g a :=
905
- rfl
904
+ @[simp] lemma coe_neg [add_group G] ( g : α →₀ G) : ⇑(- g) = -g := rfl
905
+ lemma neg_apply [add_group G] (g : α →₀ G) (a : α) : (- g) a = - g a := rfl
906
906
907
- @[simp] lemma sub_apply [add_group G] { g₁ g₂ : α →₀ G} {a : α} : (g₁ - g₂) a = g₁ a - g₂ a :=
908
- rfl
907
+ @[simp] lemma coe_sub [add_group G] ( g₁ g₂ : α →₀ G) : ⇑ (g₁ - g₂) = g₁ - g₂ := rfl
908
+ lemma sub_apply [add_group G] (g₁ g₂ : α →₀ G) (a : α) : (g₁ - g₂) a = g₁ a - g₂ a := rfl
909
909
910
910
@[simp] lemma support_neg [add_group G] {f : α →₀ G} : support (-f) = support f :=
911
911
finset.subset.antisymm
@@ -1664,16 +1664,17 @@ section
1664
1664
instance [semiring R] [add_comm_monoid M] [semimodule R M] : has_scalar R (α →₀ M) :=
1665
1665
⟨λa v, v.map_range ((•) a) (smul_zero _)⟩
1666
1666
1667
- variables (α M)
1668
-
1669
1667
/-!
1670
1668
Throughout this section, some `semiring` arguments are specified with `{}` instead of `[]`.
1671
1669
See note [implicit instance arguments].
1672
1670
-/
1673
1671
1674
- @[simp] lemma smul_apply' {_:semiring R} [add_comm_monoid M] [semimodule R M]
1675
- {a : α} {b : R} {v : α →₀ M} : (b • v) a = b • (v a) :=
1676
- rfl
1672
+ @[simp] lemma coe_smul {_ : semiring R} [add_comm_monoid M] [semimodule R M]
1673
+ (b : R) (v : α →₀ M) : ⇑(b • v) = b • v := rfl
1674
+ lemma smul_apply {_ : semiring R} [add_comm_monoid M] [semimodule R M]
1675
+ (b : R) (v : α →₀ M) (a : α) : (b • v) a = b • (v a) := rfl
1676
+
1677
+ variables (α M)
1677
1678
1678
1679
instance [semiring R] [add_comm_monoid M] [semimodule R M] : semimodule R (α →₀ M) :=
1679
1680
{ smul := (•),
@@ -1688,7 +1689,7 @@ variables {α M} {R}
1688
1689
1689
1690
lemma support_smul {_ : semiring R} [add_comm_monoid M] [semimodule R M] {b : R} {g : α →₀ M} :
1690
1691
(b • g).support ⊆ g.support :=
1691
- λ a, by simp only [smul_apply' , mem_support_iff, ne.def]; exact mt (λ h, h.symm ▸ smul_zero _)
1692
+ λ a, by simp only [smul_apply, mem_support_iff, ne.def]; exact mt (λ h, h.symm ▸ smul_zero _)
1692
1693
1693
1694
section
1694
1695
@@ -1724,10 +1725,6 @@ by rw [smul_single, smul_eq_mul, mul_one]
1724
1725
1725
1726
end
1726
1727
1727
- @[simp] lemma smul_apply [semiring R] {a : α} {b : R} {v : α →₀ R} :
1728
- (b • v) a = b • (v a) :=
1729
- rfl
1730
-
1731
1728
lemma sum_smul_index [semiring R] [add_comm_monoid M] {g : α →₀ R} {b : R} {h : α → R → M}
1732
1729
(h0 : ∀i, h i 0 = 0 ) : (b • g).sum h = g.sum (λi a, h i (b * a)) :=
1733
1730
finsupp.sum_map_range_index h0
0 commit comments