Skip to content

Commit c38ebf0

Browse files
committed
feat(Algebra/Polynomial/Roots): Add ofMultiset_injective (leanprover-community#32533)
This shows that the product of roots (as a multiset) is injective.
1 parent d0f6447 commit c38ebf0

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

Mathlib/Algebra/Polynomial/Roots.lean

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -278,6 +278,17 @@ theorem roots_multiset_prod_X_sub_C (s : Multiset R) : (s.map fun a => X - C a).
278278
rintro ⟨a, -, h⟩
279279
exact X_sub_C_ne_zero a h
280280

281+
theorem roots_ofMultiset (s : Multiset R) : (ofMultiset s).roots = s := by
282+
simp
283+
284+
variable (R) in
285+
theorem rightInverse_ofMultiset_roots : Function.RightInverse (α := R[X]) ofMultiset roots :=
286+
roots_ofMultiset
287+
288+
variable (R) in
289+
theorem ofMultiset_injective : Function.Injective (ofMultiset (R := R)) :=
290+
rightInverse_ofMultiset_roots R |>.injective
291+
281292
theorem card_roots_X_pow_sub_C {n : ℕ} (hn : 0 < n) (a : R) :
282293
Multiset.card (roots ((X : R[X]) ^ n - C a)) ≤ n :=
283294
WithBot.coe_le_coe.1 <|

0 commit comments

Comments
 (0)