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

Commit e00d6e0

Browse files
committed
feat(data/polynomial/*): Specific root sets (#7510)
Adds lemmas for the root sets of a couple specific polynomials.
1 parent 6f27ef7 commit e00d6e0

File tree

2 files changed

+21
-0
lines changed

2 files changed

+21
-0
lines changed

src/data/polynomial/field_division.lean

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -280,6 +280,24 @@ lemma mem_root_set [field k] [algebra R k] {x : k} (hp : p ≠ 0) :
280280
x ∈ p.root_set k ↔ aeval x p = 0 :=
281281
iff.trans multiset.mem_to_finset (mem_roots_map hp)
282282

283+
lemma root_set_C_mul_X_pow {R S : Type*} [field R] [field S] [algebra R S]
284+
{n : ℕ} (hn : n ≠ 0) {a : R} (ha : a ≠ 0) : (C a * X ^ n).root_set S = {0} :=
285+
begin
286+
ext x,
287+
rw [set.mem_singleton_iff, mem_root_set, aeval_mul, aeval_C, aeval_X_pow, mul_eq_zero],
288+
{ simp_rw [ring_hom.map_eq_zero, pow_eq_zero_iff (nat.pos_of_ne_zero hn), or_iff_right_iff_imp],
289+
exact λ ha', (ha ha').elim },
290+
{ exact mul_ne_zero (mt C_eq_zero.mp ha) (pow_ne_zero n X_ne_zero) },
291+
end
292+
293+
lemma root_set_monomial {R S : Type*} [field R] [field S] [algebra R S]
294+
{n : ℕ} (hn : n ≠ 0) {a : R} (ha : a ≠ 0) : (monomial n a).root_set S = {0} :=
295+
by rw [←C_mul_X_pow_eq_monomial, root_set_C_mul_X_pow hn ha]
296+
297+
lemma root_set_X_pow {R S : Type*} [field R] [field S] [algebra R S]
298+
{n : ℕ} (hn : n ≠ 0) : (X ^ n : polynomial R).root_set S = {0} :=
299+
by { rw [←one_mul (X ^ n : polynomial R), ←C_1, root_set_C_mul_X_pow hn], exact one_ne_zero }
300+
283301
lemma exists_root_of_degree_eq_one (h : degree p = 1) : ∃ x, is_root p x :=
284302
⟨-(p.coeff 0 / p.coeff 1),
285303
have p.coeff 10,

src/data/polynomial/ring_division.lean

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -534,6 +534,9 @@ rfl
534534
(0 : polynomial R).root_set S = ∅ :=
535535
by rw [root_set_def, polynomial.map_zero, roots_zero, to_finset_zero, finset.coe_empty]
536536

537+
@[simp] lemma root_set_C [integral_domain S] [algebra R S] (a : R) : (C a).root_set S = ∅ :=
538+
by rw [root_set_def, map_C, roots_C, multiset.to_finset_zero, finset.coe_empty]
539+
537540
instance root_set_fintype {R : Type*} [integral_domain R] (p : polynomial R) (S : Type*)
538541
[integral_domain S] [algebra R S] : fintype (p.root_set S) :=
539542
finset_coe.fintype _

0 commit comments

Comments
 (0)