Skip to content

Commit 22246af

Browse files
committed
chore: make two arguments of Finsupp.total implicit (#16221)
See discussion at https://leanprover.zulipchat.com/#narrow/stream/287929-mathlib4/topic/Finsupp.2Etotal.
1 parent f5292c8 commit 22246af

File tree

29 files changed

+152
-151
lines changed

29 files changed

+152
-151
lines changed

Mathlib/Algebra/Algebra/Subalgebra/Operations.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ theorem mem_of_finset_sum_eq_one_of_pow_smul_mem
6767
exact ⟨⟨_, hn i⟩, rfl⟩
6868

6969
theorem mem_of_span_eq_top_of_smul_pow_mem
70-
(s : Set S) (l : s →₀ S) (hs : Finsupp.total s S S (↑) l = 1)
70+
(s : Set S) (l : s →₀ S) (hs : Finsupp.total S ((↑) : s → S) l = 1)
7171
(hs' : s ⊆ S') (hl : ∀ i, l i ∈ S') (x : S) (H : ∀ r : s, ∃ n : ℕ, (r : S) ^ n • x ∈ S') :
7272
x ∈ S' :=
7373
mem_of_finset_sum_eq_one_of_pow_smul_mem S' l.support (↑) l hs (fun x => hs' x.2) hl x H

Mathlib/Algebra/Module/FinitePresentation.lean

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ and the kernel of the presentation `Rˢ → M` is also finitely generated.
5757
-/
5858
class Module.FinitePresentation : Prop where
5959
out : ∃ (s : Finset M), Submodule.span R (s : Set M) = ⊤ ∧
60-
(LinearMap.ker (Finsupp.total s M R Subtype.val)).FG
60+
(LinearMap.ker (Finsupp.total R ((↑) : s → M))).FG
6161

6262
instance (priority := 100) [h : Module.FinitePresentation R M] : Module.Finite R M := by
6363
obtain ⟨s, hs₁, _⟩ := h
@@ -78,7 +78,7 @@ theorem Module.FinitePresentation.equiv_quotient [fp : Module.FinitePresentation
7878
Module.Free R L ∧ Module.Finite R L ∧ K.FG := by
7979
obtain ⟨ι, ⟨hι₁, hι₂⟩⟩ := fp
8080
use ι →₀ R, inferInstance, inferInstance
81-
use LinearMap.ker (Finsupp.total { x // x ∈ ι } M R Subtype.val)
81+
use LinearMap.ker (Finsupp.total R Subtype.val)
8282
refine ⟨(LinearMap.quotKerEquivOfSurjective _ ?_).symm, inferInstance, inferInstance, hι₂⟩
8383
apply LinearMap.range_eq_top.mp
8484
simpa only [Finsupp.range_total, Subtype.range_coe_subtype, Finset.setOf_mem]
@@ -145,12 +145,12 @@ lemma Module.finitePresentation_of_surjective [h : Module.FinitePresentation R M
145145
classical
146146
obtain ⟨s, hs, hs'⟩ := h
147147
obtain ⟨t, ht⟩ := hl'
148-
have H : Function.Surjective (Finsupp.total s M R Subtype.val) :=
148+
have H : Function.Surjective (Finsupp.total R ((↑) : s → M)) :=
149149
LinearMap.range_eq_top.mp (by rw [Finsupp.range_total, Subtype.range_val, ← hs]; rfl)
150-
apply Module.finitePresentation_of_free_of_surjective (l ∘ₗ Finsupp.total s M R Subtype.val)
150+
apply Module.finitePresentation_of_free_of_surjective (l ∘ₗ Finsupp.total R Subtype.val)
151151
(hl.comp H)
152152
choose σ hσ using (show _ from H)
153-
have : Finsupp.total s M R Subtype.val '' (σ '' t) = t := by
153+
have : Finsupp.total R Subtype.val '' (σ '' t) = t := by
154154
simp only [Set.image_image, hσ, Set.image_id']
155155
rw [LinearMap.ker_comp, ← ht, ← this, ← Submodule.map_span, Submodule.comap_map_eq,
156156
← Finset.coe_image]
@@ -161,11 +161,11 @@ lemma Module.FinitePresentation.fg_ker [Module.Finite R M]
161161
(LinearMap.ker l).FG := by
162162
classical
163163
obtain ⟨s, hs, hs'⟩ := h
164-
have H : Function.Surjective (Finsupp.total s N R Subtype.val) :=
164+
have H : Function.Surjective (Finsupp.total R ((↑) : s → N)) :=
165165
LinearMap.range_eq_top.mp (by rw [Finsupp.range_total, Subtype.range_val, ← hs]; rfl)
166-
obtain ⟨f, hf⟩ : ∃ f : (s →₀ R) →ₗ[R] M, l ∘ₗ f = (Finsupp.total s N R Subtype.val) := by
166+
obtain ⟨f, hf⟩ : ∃ f : (s →₀ R) →ₗ[R] M, l ∘ₗ f = (Finsupp.total R Subtype.val) := by
167167
choose f hf using show _ from hl
168-
exact ⟨Finsupp.total s M R (fun i ↦ f i), by ext; simp [hf]⟩
168+
exact ⟨Finsupp.total R (fun i ↦ f i), by ext; simp [hf]⟩
169169
have : (LinearMap.ker l).map (LinearMap.range f).mkQ = ⊤ := by
170170
rw [← top_le_iff]
171171
rintro x -
@@ -192,7 +192,7 @@ lemma Module.finitePresentation_of_ker [Module.FinitePresentation R N]
192192
· rw [Submodule.map_top, LinearMap.range_eq_top.mpr hl]; exact Module.Finite.out
193193
· rw [top_inf_eq, ← Submodule.fg_top]; exact Module.Finite.out
194194
refine ⟨s, hs, ?_⟩
195-
let π := Finsupp.total s M R Subtype.val
195+
let π := Finsupp.total R ((↑) : s → M)
196196
have H : Function.Surjective π :=
197197
LinearMap.range_eq_top.mp (by rw [Finsupp.range_total, Subtype.range_val, ← hs]; rfl)
198198
have inst : Module.Finite R (LinearMap.ker (l ∘ₗ π)) := by
@@ -227,23 +227,23 @@ lemma Module.FinitePresentation.exists_lift_of_isLocalizedModule
227227
[h : Module.FinitePresentation R M] (g : M →ₗ[R] N') :
228228
∃ (h : M →ₗ[R] N) (s : S), f ∘ₗ h = s • g := by
229229
obtain ⟨σ, hσ, τ, hτ⟩ := h
230-
let π := Finsupp.total σ M R Subtype.val
230+
let π := Finsupp.total R ((↑) : σ → M)
231231
have hπ : Function.Surjective π :=
232232
LinearMap.range_eq_top.mp (by rw [Finsupp.range_total, Subtype.range_val, ← hσ]; rfl)
233233
classical
234234
choose s hs using IsLocalizedModule.surj S f
235235
let i : σ → N :=
236236
fun x ↦ (∏ j ∈ σ.erase x.1, (s (g j)).2) • (s (g x)).1
237237
let s₀ := ∏ j ∈ σ, (s (g j)).2
238-
have hi : f ∘ₗ Finsupp.total σ N R i = (s₀ • g) ∘ₗ π := by
238+
have hi : f ∘ₗ Finsupp.total R i = (s₀ • g) ∘ₗ π := by
239239
ext j
240240
simp only [LinearMap.coe_comp, Function.comp_apply, Finsupp.lsingle_apply, Finsupp.total_single,
241241
one_smul, LinearMap.map_smul_of_tower, ← hs, LinearMap.smul_apply, i, s₀, π]
242242
rw [← mul_smul, Finset.prod_erase_mul]
243243
exact j.prop
244-
have : ∀ x : τ, ∃ s : S, s • (Finsupp.total σ N R i x) = 0 := by
244+
have : ∀ x : τ, ∃ s : S, s • (Finsupp.total R i x) = 0 := by
245245
intros x
246-
convert_to ∃ s : S, s • (Finsupp.total σ N R i x) = s • 0
246+
convert_to ∃ s : S, s • (Finsupp.total R i x) = s • 0
247247
· simp only [smul_zero]
248248
apply IsLocalizedModule.exists_of_eq (S := S) (f := f)
249249
rw [← LinearMap.comp_apply, map_zero, hi, LinearMap.comp_apply]
@@ -252,7 +252,7 @@ lemma Module.FinitePresentation.exists_lift_of_isLocalizedModule
252252
exact Submodule.subset_span x.prop
253253
choose s' hs' using this
254254
let s₁ := ∏ i : τ, s' i
255-
have : LinearMap.ker π ≤ LinearMap.ker (s₁ • Finsupp.total σ N R i) := by
255+
have : LinearMap.ker π ≤ LinearMap.ker (s₁ • Finsupp.total R i) := by
256256
rw [← hτ, Submodule.span_le]
257257
intro x hxσ
258258
simp only [s₁]

Mathlib/Algebra/Module/Projective.lean

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ open Finsupp
7272
definitions. -/
7373
class Module.Projective (R : Type*) [Semiring R] (P : Type*) [AddCommMonoid P] [Module R P] :
7474
Prop where
75-
out : ∃ s : P →ₗ[R] P →₀ R, Function.LeftInverse (Finsupp.total P P R id) s
75+
out : ∃ s : P →ₗ[R] P →₀ R, Function.LeftInverse (Finsupp.total R id) s
7676

7777
namespace Module
7878

@@ -82,11 +82,11 @@ variable {R : Type*} [Semiring R] {P : Type*} [AddCommMonoid P] [Module R P] {M
8282
[AddCommMonoid M] [Module R M] {N : Type*} [AddCommMonoid N] [Module R N]
8383

8484
theorem projective_def :
85-
Projective R P ↔ ∃ s : P →ₗ[R] P →₀ R, Function.LeftInverse (Finsupp.total P P R id) s :=
85+
Projective R P ↔ ∃ s : P →ₗ[R] P →₀ R, Function.LeftInverse (Finsupp.total R id) s :=
8686
fun h => h.1, fun h => ⟨h⟩⟩
8787

8888
theorem projective_def' :
89-
Projective R P ↔ ∃ s : P →ₗ[R] P →₀ R, Finsupp.total P P R id ∘ₗ s = .id := by
89+
Projective R P ↔ ∃ s : P →ₗ[R] P →₀ R, Finsupp.total R id ∘ₗ s = .id := by
9090
simp_rw [projective_def, DFunLike.ext_iff, Function.LeftInverse, comp_apply, id_apply]
9191

9292
/-- A projective R-module has the property that maps from it lift along surjections. -/
@@ -101,7 +101,7 @@ theorem projective_lifting_property [h : Projective R P] (f : M →ₗ[R] N) (g
101101
`P →ₗ N` and a random splitting of the surjection `M →ₗ N`, and we get
102102
a map `φ : (P →₀ R) →ₗ M`.
103103
-/
104-
let φ : (P →₀ R) →ₗ[R] M := Finsupp.total _ _ _ fun p => Function.surjInv hf (g p)
104+
let φ : (P →₀ R) →ₗ[R] M := Finsupp.total _ fun p => Function.surjInv hf (g p)
105105
-- By projectivity we have a map `P →ₗ (P →₀ R)`;
106106
cases' h.out with s hs
107107
-- Compose to get `P →ₗ M`. This works.
@@ -117,7 +117,7 @@ theorem Projective.of_lifting_property'' {R : Type u} [Semiring R] {P : Type v}
117117
[Module R P] (huniv : ∀ (f : (P →₀ R) →ₗ[R] P), Function.Surjective f →
118118
∃ h : P →ₗ[R] (P →₀ R), f.comp h = .id) :
119119
Projective R P :=
120-
projective_def'.2 <| huniv (Finsupp.total P P R (id : P → P))
120+
projective_def'.2 <| huniv (Finsupp.total R (id : P → P))
121121
(total_surjective _ Function.surjective_id)
122122

123123
variable {Q : Type*} [AddCommMonoid Q] [Module R Q]
@@ -164,7 +164,7 @@ variable [IsScalarTower R₀ R M] [AddCommGroup N] [Module R₀ N]
164164

165165
theorem Projective.of_split [Module.Projective R M]
166166
(i : P →ₗ[R] M) (s : M →ₗ[R] P) (H : s.comp i = LinearMap.id) : Module.Projective R P := by
167-
obtain ⟨g, hg⟩ := projective_lifting_property (Finsupp.total P P R id) s
167+
obtain ⟨g, hg⟩ := projective_lifting_property (Finsupp.total R id) s
168168
(fun x ↦ ⟨Finsupp.single x 1, by simp⟩)
169169
refine ⟨g.comp i, fun x ↦ ?_⟩
170170
rw [LinearMap.comp_apply, ← LinearMap.comp_apply, hg,
@@ -178,7 +178,7 @@ theorem Projective.of_equiv [Module.Projective R M]
178178
theorem Projective.iff_split : Module.Projective R P ↔
179179
∃ (M : Type max u v) (_ : AddCommGroup M) (_ : Module R M) (_ : Module.Free R M)
180180
(i : P →ₗ[R] M) (s : M →ₗ[R] P), s.comp i = LinearMap.id :=
181-
fun ⟨i, hi⟩ ↦ ⟨P →₀ R, _, _, inferInstance, i, Finsupp.total P P R id, LinearMap.ext hi⟩,
181+
fun ⟨i, hi⟩ ↦ ⟨P →₀ R, _, _, inferInstance, i, Finsupp.total R id, LinearMap.ext hi⟩,
182182
fun ⟨_, _, _, _, i, s, H⟩ ↦ Projective.of_split i s H⟩
183183

184184
/-- A quotient of a projective module is projective iff it is a direct summand. -/
@@ -197,11 +197,11 @@ instance Projective.tensorProduct [hM : Module.Projective R M] [hN : Module.Proj
197197
fapply Projective.of_split (R := R) (M := ((M →₀ R) ⊗[R₀] (N →₀ R₀)))
198198
· exact (AlgebraTensorModule.map sM (LinearMap.id (R := R₀) (M := N →₀ R₀)))
199199
· exact (AlgebraTensorModule.map
200-
(Finsupp.total M M R id) (LinearMap.id (R := R₀) (M := N →₀ R₀)))
200+
(Finsupp.total R id) (LinearMap.id (R := R₀) (M := N →₀ R₀)))
201201
· ext; simp [hsM _]
202202
fapply Projective.of_split (R := R) (M := (M ⊗[R₀] (N →₀ R₀)))
203203
· exact (AlgebraTensorModule.map (LinearMap.id (R := R) (M := M)) sN)
204-
· exact (AlgebraTensorModule.map (LinearMap.id (R := R) (M := M)) (Finsupp.total N N R₀ id))
204+
· exact (AlgebraTensorModule.map (LinearMap.id (R := R) (M := M)) (Finsupp.total R₀ id))
205205
· ext; simp [hsN _]
206206

207207
end Ring

Mathlib/Analysis/InnerProductSpace/Basic.lean

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -829,7 +829,7 @@ theorem orthonormal_subtype_iff_ite [DecidableEq E] {s : Set E} :
829829
/-- The inner product of a linear combination of a set of orthonormal vectors with one of those
830830
vectors picks out the coefficient of that vector. -/
831831
theorem Orthonormal.inner_right_finsupp {v : ι → E} (hv : Orthonormal 𝕜 v) (l : ι →₀ 𝕜) (i : ι) :
832-
⟪v i, Finsupp.total ι E 𝕜 v l⟫ = l i := by
832+
⟪v i, Finsupp.total 𝕜 v l⟫ = l i := by
833833
classical
834834
simpa [Finsupp.total_apply, Finsupp.inner_sum, orthonormal_iff_ite.mp hv] using Eq.symm
835835

@@ -849,7 +849,7 @@ theorem Orthonormal.inner_right_fintype [Fintype ι] {v : ι → E} (hv : Orthon
849849
/-- The inner product of a linear combination of a set of orthonormal vectors with one of those
850850
vectors picks out the coefficient of that vector. -/
851851
theorem Orthonormal.inner_left_finsupp {v : ι → E} (hv : Orthonormal 𝕜 v) (l : ι →₀ 𝕜) (i : ι) :
852-
⟪Finsupp.total ι E 𝕜 v l, v i⟫ = conj (l i) := by rw [← inner_conj_symm, hv.inner_right_finsupp]
852+
⟪Finsupp.total 𝕜 v l, v i⟫ = conj (l i) := by rw [← inner_conj_symm, hv.inner_right_finsupp]
853853

854854
/-- The inner product of a linear combination of a set of orthonormal vectors with one of those
855855
vectors picks out the coefficient of that vector. -/
@@ -868,13 +868,13 @@ theorem Orthonormal.inner_left_fintype [Fintype ι] {v : ι → E} (hv : Orthono
868868
/-- The inner product of two linear combinations of a set of orthonormal vectors, expressed as
869869
a sum over the first `Finsupp`. -/
870870
theorem Orthonormal.inner_finsupp_eq_sum_left {v : ι → E} (hv : Orthonormal 𝕜 v) (l₁ l₂ : ι →₀ 𝕜) :
871-
⟪Finsupp.total ι E 𝕜 v l₁, Finsupp.total ι E 𝕜 v l₂⟫ = l₁.sum fun i y => conj y * l₂ i := by
871+
⟪Finsupp.total 𝕜 v l₁, Finsupp.total 𝕜 v l₂⟫ = l₁.sum fun i y => conj y * l₂ i := by
872872
simp only [l₁.total_apply _, Finsupp.sum_inner, hv.inner_right_finsupp, smul_eq_mul]
873873

874874
/-- The inner product of two linear combinations of a set of orthonormal vectors, expressed as
875875
a sum over the second `Finsupp`. -/
876876
theorem Orthonormal.inner_finsupp_eq_sum_right {v : ι → E} (hv : Orthonormal 𝕜 v) (l₁ l₂ : ι →₀ 𝕜) :
877-
⟪Finsupp.total ι E 𝕜 v l₁, Finsupp.total ι E 𝕜 v l₂⟫ = l₂.sum fun i y => conj (l₁ i) * y := by
877+
⟪Finsupp.total 𝕜 v l₁, Finsupp.total 𝕜 v l₂⟫ = l₂.sum fun i y => conj (l₁ i) * y := by
878878
simp only [l₂.total_apply _, Finsupp.inner_sum, hv.inner_left_finsupp, mul_comm, smul_eq_mul]
879879

880880
/-- The inner product of two linear combinations of a set of orthonormal vectors, expressed as
@@ -900,7 +900,7 @@ theorem Orthonormal.linearIndependent {v : ι → E} (hv : Orthonormal 𝕜 v) :
900900
rw [linearIndependent_iff]
901901
intro l hl
902902
ext i
903-
have key : ⟪v i, Finsupp.total ι E 𝕜 v l⟫ = ⟪v i, 0⟫ := by rw [hl]
903+
have key : ⟪v i, Finsupp.total 𝕜 v l⟫ = ⟪v i, 0⟫ := by rw [hl]
904904
simpa only [hv.inner_right_finsupp, inner_zero_right] using key
905905

906906
/-- A subfamily of an orthonormal family (i.e., a composition with an injective map) is an
@@ -932,7 +932,7 @@ theorem Orthonormal.toSubtypeRange {v : ι → E} (hv : Orthonormal 𝕜 v) :
932932
set. -/
933933
theorem Orthonormal.inner_finsupp_eq_zero {v : ι → E} (hv : Orthonormal 𝕜 v) {s : Set ι} {i : ι}
934934
(hi : i ∉ s) {l : ι →₀ 𝕜} (hl : l ∈ Finsupp.supported 𝕜 𝕜 s) :
935-
⟪Finsupp.total ι E 𝕜 v l, v i⟫ = 0 := by
935+
⟪Finsupp.total 𝕜 v l, v i⟫ = 0 := by
936936
rw [Finsupp.mem_supported'] at hl
937937
simp only [hv.inner_left_finsupp, hl i hi, map_zero]
938938

Mathlib/Analysis/InnerProductSpace/Projection.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1329,7 +1329,7 @@ theorem maximal_orthonormal_iff_orthogonalComplement_eq_bot (hv : Orthonormal
13291329
intro hxv y hy
13301330
have hxv' : (⟨x, hxu⟩ : u) ∉ ((↑) ⁻¹' v : Set u) := by simp [huv, hxv]
13311331
obtain ⟨l, hl, rfl⟩ :
1332-
∃ l ∈ Finsupp.supported 𝕜 𝕜 ((↑) ⁻¹' v : Set u), (Finsupp.total (↥u) E 𝕜 (↑)) l = y := by
1332+
∃ l ∈ Finsupp.supported 𝕜 𝕜 ((↑) ⁻¹' v : Set u), (Finsupp.total 𝕜 ((↑) : u → E)) l = y := by
13331333
rw [← Finsupp.mem_span_image_iff_total]
13341334
simp [huv, inter_eq_self_of_subset_right, hy]
13351335
exact hu.inner_finsupp_eq_zero hxv' hl

Mathlib/Data/Finsupp/Weight.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ variable [AddCommMonoid M]
7272
/-- The `weight` of the finitely supported function `f : σ →₀ ℕ`
7373
with respect to `w : σ → M` is the sum `∑(f i)•(w i)`. -/
7474
noncomputable def weight : (σ →₀ ℕ) →+ M :=
75-
(Finsupp.total σ M ℕ w).toAddMonoidHom
75+
(Finsupp.total ℕ w).toAddMonoidHom
7676

7777
@[deprecated weight (since := "2024-07-20")]
7878
alias _root_.MvPolynomial.weightedDegree := weight

Mathlib/LinearAlgebra/Basis/Basic.lean

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ end Coord
5151
protected theorem linearIndependent : LinearIndependent R b :=
5252
linearIndependent_iff.mpr fun l hl =>
5353
calc
54-
l = b.repr (Finsupp.total _ _ _ b l) := (b.repr_total l).symm
54+
l = b.repr (Finsupp.total _ b l) := (b.repr_total l).symm
5555
_ = 0 := by rw [hl, LinearEquiv.map_zero]
5656

5757
protected theorem ne_zero [Nontrivial R] (i) : b i ≠ 0 :=
@@ -227,7 +227,7 @@ variable (hli : LinearIndependent R v) (hsp : ⊤ ≤ span R (range v))
227227
protected noncomputable def mk : Basis ι R M :=
228228
.ofRepr
229229
{ hli.repr.comp (LinearMap.id.codRestrict _ fun _ => hsp Submodule.mem_top) with
230-
invFun := Finsupp.total _ _ _ v
230+
invFun := Finsupp.total _ v
231231
left_inv := fun x => hli.total_repr ⟨x, _⟩
232232
right_inv := fun _ => hli.repr_eq rfl }
233233

@@ -236,7 +236,7 @@ theorem mk_repr : (Basis.mk hli hsp).repr x = hli.repr ⟨x, hsp Submodule.mem_t
236236
rfl
237237

238238
theorem mk_apply (i : ι) : Basis.mk hli hsp i = v i :=
239-
show Finsupp.total _ _ _ v _ = v i by simp
239+
show Finsupp.total _ v _ = v i by simp
240240

241241
@[simp]
242242
theorem coe_mk : ⇑(Basis.mk hli hsp) = v :=

Mathlib/LinearAlgebra/Basis/Cardinality.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ theorem union_support_maximal_linearIndependent_eq_range_basis {ι : Type w} (b
103103
intro l z
104104
rw [Finsupp.total_option] at z
105105
simp only [v', Option.elim'] at z
106-
change _ + Finsupp.total κ M R v l.some = 0 at z
106+
change _ + Finsupp.total R v l.some = 0 at z
107107
-- We have some linear combination of `b b'` and the `v i`, which we want to show is trivial.
108108
-- We'll first show the coefficient of `b b'` is zero,
109109
-- by expressing the `v i` in the basis `b`, and using that the `v i` have no `b b'` term.

Mathlib/LinearAlgebra/Basis/Defs.lean

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -134,23 +134,23 @@ theorem repr_self_apply (j) [Decidable (i = j)] : b.repr (b i) j = if i = j then
134134
rw [repr_self, Finsupp.single_apply]
135135

136136
@[simp]
137-
theorem repr_symm_apply (v) : b.repr.symm v = Finsupp.total ι M R b v :=
137+
theorem repr_symm_apply (v) : b.repr.symm v = Finsupp.total R b v :=
138138
calc
139139
b.repr.symm v = b.repr.symm (v.sum Finsupp.single) := by simp
140140
_ = v.sum fun i vi => b.repr.symm (Finsupp.single i vi) := map_finsupp_sum ..
141-
_ = Finsupp.total ι M R b v := by simp only [repr_symm_single, Finsupp.total_apply]
141+
_ = Finsupp.total R b v := by simp only [repr_symm_single, Finsupp.total_apply]
142142

143143
@[simp]
144-
theorem coe_repr_symm : ↑b.repr.symm = Finsupp.total ι M R b :=
144+
theorem coe_repr_symm : ↑b.repr.symm = Finsupp.total R b :=
145145
LinearMap.ext fun v => b.repr_symm_apply v
146146

147147
@[simp]
148-
theorem repr_total (v) : b.repr (Finsupp.total _ _ _ b v) = v := by
148+
theorem repr_total (v) : b.repr (Finsupp.total _ b v) = v := by
149149
rw [← b.coe_repr_symm]
150150
exact b.repr.apply_symm_apply v
151151

152152
@[simp]
153-
theorem total_repr : Finsupp.total _ _ _ b (b.repr x) = x := by
153+
theorem total_repr : Finsupp.total _ b (b.repr x) = x := by
154154
rw [← b.coe_repr_symm]
155155
exact b.repr.symm_apply_apply x
156156

@@ -551,7 +551,7 @@ you can recover an `AddEquiv` by setting `S := ℕ`.
551551
See library note [bundled maps over different rings].
552552
-/
553553
def constr : (ι → M') ≃ₗ[S] M →ₗ[R] M' where
554-
toFun f := (Finsupp.total M' M' R id).comp <| Finsupp.lmapDomain R R f ∘ₗ ↑b.repr
554+
toFun f := (Finsupp.total R id).comp <| Finsupp.lmapDomain R R f ∘ₗ ↑b.repr
555555
invFun f i := f (b i)
556556
left_inv f := by
557557
ext
@@ -567,7 +567,7 @@ def constr : (ι → M') ≃ₗ[S] M →ₗ[R] M' where
567567
simp
568568

569569
theorem constr_def (f : ι → M') :
570-
constr (M' := M') b S f = Finsupp.total M' M' R id ∘ₗ Finsupp.lmapDomain R R f ∘ₗ ↑b.repr :=
570+
constr (M' := M') b S f = Finsupp.total R id ∘ₗ Finsupp.lmapDomain R R f ∘ₗ ↑b.repr :=
571571
rfl
572572

573573
theorem constr_apply (f : ι → M') (x : M) :

Mathlib/LinearAlgebra/DFinsupp.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -429,7 +429,7 @@ theorem lsum_comp_mapRange_toSpanSingleton [∀ m : R, Decidable (m ≠ 0)] (p :
429429
((mapRange.linearMap fun i => LinearMap.toSpanSingleton R (↥(p i)) ⟨v i, hv i⟩ :
430430
_ →ₗ[R] _).comp
431431
(finsuppLequivDFinsupp R : (ι →₀ R) ≃ₗ[R] _).toLinearMap) =
432-
Finsupp.total ι N R v := by
432+
Finsupp.total R v := by
433433
ext
434434
simp
435435

0 commit comments

Comments
 (0)