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

Commit 443c239

Browse files
committed
feat(data/polynomial/ring_division): mem_root_set_iff (#12963)
1 parent 162d83f commit 443c239

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

src/data/polynomial/ring_division.lean

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -612,6 +612,21 @@ lemma root_set_finite (p : T[X])
612612
(S : Type*) [comm_ring S] [is_domain S] [algebra T S] : (p.root_set S).finite :=
613613
⟨polynomial.root_set_fintype p S⟩
614614

615+
theorem mem_root_set_iff' {p : T[X]} {S : Type*} [comm_ring S] [is_domain S]
616+
[algebra T S] (hp : p.map (algebra_map T S) ≠ 0) (a : S) :
617+
a ∈ p.root_set S ↔ (p.map (algebra_map T S)).eval a = 0 :=
618+
by { change a ∈ multiset.to_finset _ ↔ _, rw [mem_to_finset, mem_roots hp], refl }
619+
620+
theorem mem_root_set_iff {p : T[X]} (hp : p ≠ 0) {S : Type*} [comm_ring S] [is_domain S]
621+
[algebra T S] [no_zero_smul_divisors T S] (a : S) : a ∈ p.root_set S ↔ aeval a p = 0 :=
622+
begin
623+
rw [mem_root_set_iff', ←eval₂_eq_eval_map],
624+
{ refl },
625+
intro h,
626+
rw ←map_zero (algebra_map T S) at h,
627+
exact hp (map_injective _ (no_zero_smul_divisors.algebra_map_injective T S) h)
628+
end
629+
615630
end roots
616631

617632
theorem is_unit_iff {f : R[X]} : is_unit f ↔ ∃ r : R, is_unit r ∧ C r = f :=

0 commit comments

Comments
 (0)