Skip to content

Commit

Permalink
chore(data/mv_polynomial/basic): add coeff_smul to match coeff_add etc (
Browse files Browse the repository at this point in the history
  • Loading branch information
eric-wieser committed Mar 17, 2021
1 parent 30b3455 commit 804b0ed
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/data/mv_polynomial/basic.lean
Expand Up @@ -369,6 +369,10 @@ lemma ext_iff (p q : mv_polynomial σ R) :
@[simp] lemma coeff_add (m : σ →₀ ℕ) (p q : mv_polynomial σ R) :
coeff m (p + q) = coeff m p + coeff m q := add_apply p q m

@[simp] lemma coeff_smul {S₁ : Type*} [semiring S₁] [semimodule S₁ R]
(m : σ →₀ ℕ) (c : S₁) (p : mv_polynomial σ R) :
coeff m (c • p) = c • coeff m p := smul_apply c p m

@[simp] lemma coeff_zero (m : σ →₀ ℕ) :
coeff m (0 : mv_polynomial σ R) = 0 := rfl

Expand Down

0 comments on commit 804b0ed

Please sign in to comment.