Skip to content

Commit

Permalink
feat(ring_theory/power_series): coeff multiplication lemmas (#6462)
Browse files Browse the repository at this point in the history
Some lemmas used in combinatorics, from #4259.
  • Loading branch information
b-mehta committed Feb 28, 2021
1 parent 11f1801 commit 5b18369
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions src/ring_theory/power_series/basic.lean
Expand Up @@ -1560,6 +1560,38 @@ lemma order_monomial_of_ne_zero (n : ℕ) (a : R) (h : a ≠ 0) :
order (monomial R n a) = n :=
by rw [order_monomial, if_neg h]

/-- If `n` is strictly smaller than the order of `ψ`, then the `n`th coefficient of its product
with any other power series is `0`. -/
lemma coeff_mul_of_lt_order {φ ψ : power_series R} {n : ℕ} (h : ↑n < ψ.order) :
coeff R n (φ * ψ) = 0 :=
begin
suffices : coeff R n (φ * ψ) = ∑ p in finset.nat.antidiagonal n, 0,
rw [this, finset.sum_const_zero],
rw [coeff_mul],
apply finset.sum_congr rfl (λ x hx, _),
refine mul_eq_zero_of_right (coeff R x.fst φ) (ψ.coeff_of_lt_order x.snd (lt_of_le_of_lt _ h)),
rw finset.nat.mem_antidiagonal at hx,
norm_cast,
linarith,
end

lemma coeff_mul_one_sub_of_lt_order {R : Type*} [comm_ring R] {φ ψ : power_series R}
(n : ℕ) (h : ↑n < ψ.order) :
coeff R n (φ * (1 - ψ)) = coeff R n φ :=
by simp [coeff_mul_of_lt_order h, mul_sub]

lemma coeff_mul_prod_one_sub_of_lt_order {R ι : Type*} [comm_ring R] (k : ℕ) (s : finset ι)
(φ : power_series R) (f : ι → power_series R) :
(∀ i ∈ s, ↑k < (f i).order) → coeff R k (φ * ∏ i in s, (1 - f i)) = coeff R k φ :=
begin
apply finset.induction_on s,
{ simp },
{ intros a s ha ih t,
simp only [finset.mem_insert, forall_eq_or_imp] at t,
rw [finset.prod_insert ha, ← mul_assoc, mul_right_comm, coeff_mul_one_sub_of_lt_order _ t.1],
exact ih t.2 },
end

end order_basic

section order_zero_ne_one
Expand Down

0 comments on commit 5b18369

Please sign in to comment.