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

Commit 524ded6

Browse files
committed
refactor(data/polynomial/{coeff,monomial}): move smul_eq_C_mul (#9287)
This moves `smul_eq_C_mul` from `monomial.lean` into `coeff.lean` so that the import on `monomial.lean` can be changed from `data.polynomial.coeff` to `data.polynomial.basic`. This should shave about 10 seconds off the [longest pole for parallelized mathlib compilation](https://leanprover.zulipchat.com/#narrow/stream/113488-general/topic/The.20long.20pole.20in.20mathlib/near/253932389).
1 parent 4cee743 commit 524ded6

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/data/polynomial/coeff.lean

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -206,6 +206,8 @@ lemma coeff_bit1_mul (P Q : polynomial R) (n : ℕ) :
206206
coeff (bit1 P * Q) n = 2 * coeff (P * Q) n + coeff Q n :=
207207
by simp [bit1, add_mul, coeff_bit0_mul]
208208

209+
lemma smul_eq_C_mul (a : R) : a • p = C a * p := by simp [ext_iff]
210+
209211
end coeff
210212

211213
section cast

src/data/polynomial/monomial.lean

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ Copyright (c) 2018 Chris Hughes. All rights reserved.
33
Released under Apache 2.0 license as described in the file LICENSE.
44
Authors: Chris Hughes, Johannes Hölzl, Scott Morrison, Jens Wagemaker
55
-/
6-
import data.polynomial.coeff
6+
import data.polynomial.basic
77

88
/-!
99
# Univariate monomials
@@ -23,8 +23,6 @@ lemma monomial_one_eq_iff [nontrivial R] {i j : ℕ} :
2323
(monomial i 1 : polynomial R) = monomial j 1 ↔ i = j :=
2424
by simp [monomial, monomial_fun, finsupp.single_eq_single_iff]
2525

26-
lemma smul_eq_C_mul (a : R) : a • p = C a * p := by simp [ext_iff]
27-
2826
instance [nontrivial R] : infinite (polynomial R) :=
2927
infinite.of_injective (λ i, monomial i 1) $
3028
λ m n h, by simpa [monomial_one_eq_iff] using h

0 commit comments

Comments
 (0)