Skip to content
This repository was archived by the owner on Jul 24, 2024. It is now read-only.

Commit 44667ba

Browse files
committed
feat(ring_theory/power_series): power series lemmas (#4171)
A couple of little lemmas for multiplication and coefficients
1 parent 9232032 commit 44667ba

File tree

1 file changed

+32
-2
lines changed

1 file changed

+32
-2
lines changed

src/ring_theory/power_series.lean

Lines changed: 32 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -318,7 +318,7 @@ lemma coeff_X_pow (m : σ →₀ ℕ) (s : σ) (n : ℕ) :
318318
by rw [X_pow_eq s n, coeff_monomial]
319319

320320
@[simp] lemma coeff_mul_C (n : σ →₀ ℕ) (φ : mv_power_series σ α) (a : α) :
321-
coeff α n (φ * (C σ α a)) = (coeff α n φ) * a :=
321+
coeff α n (φ * C σ α a) = coeff α n φ * a :=
322322
begin
323323
rw [coeff_mul n φ], rw [finset.sum_eq_single (n,(0 : σ →₀ ℕ))],
324324
{ rw [coeff_C, if_pos rfl] },
@@ -332,6 +332,23 @@ begin
332332
apply add_zero }
333333
end
334334

335+
@[simp] lemma coeff_C_mul (n : σ →₀ ℕ) (φ : mv_power_series σ α) (a : α) :
336+
coeff α n (C σ α a * φ) = a * coeff α n φ :=
337+
begin
338+
rw [coeff_mul n _ φ, finset.sum_eq_single ((0 : σ →₀ ℕ), _)],
339+
{ rw [coeff_C, if_pos rfl] },
340+
{ rintro ⟨i,j⟩ hij hne,
341+
rw finsupp.mem_antidiagonal_support at hij,
342+
by_cases hi : i = 0,
343+
{ subst hi, simp at *, contradiction },
344+
{ rw [coeff_C, if_neg hi, zero_mul] } },
345+
{ intro h,
346+
exfalso,
347+
apply h,
348+
rw finsupp.mem_antidiagonal_support,
349+
apply zero_add }
350+
end
351+
335352
lemma coeff_zero_mul_X (φ : mv_power_series σ α) (s : σ) :
336353
coeff α (0 : σ →₀ ℕ) (φ * X s) = 0 :=
337354
begin
@@ -382,6 +399,11 @@ instance : semimodule α (mv_power_series σ α) :=
382399
add_smul := λ a b φ, by simp only [ring_hom.map_add, add_mul],
383400
zero_smul := λ φ, by simp only [zero_mul, ring_hom.map_zero] }
384401

402+
@[simp]
403+
lemma coeff_smul (f : mv_power_series σ α) (n) (a : α) :
404+
coeff _ n (a • f) = a * coeff _ n f :=
405+
coeff_C_mul _ _ _
406+
385407
lemma X_inj [nontrivial α] {s t : σ} : (X s : mv_power_series σ α) = X t ↔ s = t :=
386408
begin
387409
intro h, replace h := congr_arg (coeff α (single s 1)) h, rw [coeff_X, if_pos rfl, coeff_X] at h,
@@ -914,9 +936,17 @@ begin
914936
end
915937

916938
@[simp] lemma coeff_mul_C (n : ℕ) (φ : power_series α) (a : α) :
917-
coeff α n (φ * (C α a)) = (coeff α n φ) * a :=
939+
coeff α n (φ * C α a) = coeff α n φ * a :=
918940
mv_power_series.coeff_mul_C _ φ a
919941

942+
@[simp] lemma coeff_C_mul (n : ℕ) (φ : power_series α) (a : α) :
943+
coeff α n (C α a * φ) = a * coeff α n φ :=
944+
mv_power_series.coeff_C_mul _ φ a
945+
946+
@[simp] lemma coeff_smul (n : ℕ) (φ : power_series α) (a : α) :
947+
coeff α n (a • φ) = a * coeff α n φ :=
948+
coeff_C_mul _ _ _
949+
920950
@[simp] lemma coeff_succ_mul_X (n : ℕ) (φ : power_series α) :
921951
coeff α (n+1) (φ * X) = coeff α n φ :=
922952
begin

0 commit comments

Comments
 (0)