This repository has been archived by the owner on Jul 24, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 294
[Merged by Bors] - feat(ring_theory/polynomial): Vieta's formula in terms of polynomial.roots
#14908
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 tasks
2 tasks
1 task
urkud
reviewed
Jul 18, 2022
bors bot
pushed a commit
that referenced
this pull request
Aug 16, 2022
…m_esymm for multiset (#15008) This is a proof of Vieta's formula for `multiset`: ```lean lemma multiset.prod_X_add_C_eq_sum_esymm (s : multiset R) : (s.map (λ r, polynomial.X + polynomial.C r)).prod = ∑ j in finset.range (s.card + 1), (polynomial.C (s.esymm j) * polynomial.X ^ (s.card - j)) ``` where ```lean def multiset.esymm (s : multiset R) (n : ℕ) : R := ((s.powerset_len n).map multiset.prod).sum ``` From this, we deduce the proof of the formula for `mv_polynomial`: ```lean lemma prod_C_add_X_eq_sum_esymm : (∏ i : σ, (polynomial.X + polynomial.C (X i)) : polynomial (mv_polynomial σ R) )= ∑ j in range (card σ + 1), (polynomial.C (esymm σ R j) * polynomial.X ^ (card σ - j)) ``` with ```lean def mv_polynomial.esymm (n : ℕ) : mv_polynomial σ R := ∑ t in powerset_len n univ, ∏ i in t, X i ``` It is better to go in this direction since there does not seem to be a natural way to prove the `multiset` version from the `mv_polynomial` version due to the difficulty to enumerate the elements of a `multiset` with a `fintype`, see this [Zulip thread](https://leanprover.zulipchat.com/#narrow/stream/113489-new-members/topic/.E2.9C.94.20fintype.20enumerating.20a.20multiset) and the discussion from #14908. We prove, as suggested in [#14908](#14908 (comment)) , that `mv_polynomial.esymm` is obtained by specialising `multiset.esymm`. However, we do not refactor the results of `ring_theory/polynomial/symmetric` in terms of `multiset.esymm`. From flt-regular
eric-wieser
reviewed
Aug 16, 2022
With master merged and description updated, this PR is ready for another look! |
riccardobrasca
approved these changes
Aug 19, 2022
Thanks! bors d+ |
✌️ alreadydone can now approve this pull request. To approve and merge a pull request, simply reply with |
bors r+ |
bors bot
pushed a commit
that referenced
this pull request
Aug 20, 2022
….roots` (#14908) Specialize `multiset.prod_X_sub_C_coeff` to the root multiset of a split polynomial over an integral domain to derive the familiar Vieta's formula; update *undergrad.yaml*. Make various stylistic improvements to *polynomial/vieta.lean*: most notably, `open polynomial` to be able to omit the prefix in `polynomial.X` and `polynomial.C`. Instead, write `mv_polynomial.X` with the prefix because it's less frequent. Prove miscellaneous lemmas `list.prod_map_neg`, `multiset.prod_map_neg`, `list.map_nth_le` and `multiset.length_to_list`, which are remnants of a previous approach to prove `polynomial.vieta` superseded by #15008. See below/#14908 for the original motivation for introducing them.
Pull request successfully merged into master. Build succeeded: |
polynomial.roots
polynomial.roots
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Specialize
multiset.prod_X_sub_C_coeff
to the root multiset of a split polynomial over an integral domain to derive the familiar Vieta's formula; update undergrad.yaml.Make various stylistic improvements to polynomial/vieta.lean: most notably,
open polynomial
to be able to omit the prefix inpolynomial.X
andpolynomial.C
. Instead, writemv_polynomial.X
with the prefix because it's less frequent.Prove miscellaneous lemmas
list.prod_map_neg
,multiset.prod_map_neg
,list.map_nth_le
andmultiset.length_to_list
, which are remnants of a previous approach to provepolynomial.vieta
superseded by #15008. See below/#14908 for the original motivation for introducing them.Below is the PR description before #15008 was merged:
In order to derive the multiset version of
prod_C_add_X_coeff
from the existing fintype-indexed version, we need to index (with repetition) the elements of a multisets
using a functionf
from a fintypeα
, such that(@finset.univ α _).val.map f = s
, see Zulip.I originally opt to use
α = fin s.card
but finally switched to @kmill's multiset.has_coe_to_sort. The new lemmasmap_nth_le
in list/range.lean andlength_to_list
in multiset/basic.lean were needed originally but no longer now, but I think they're worth having.Add new big_operator lemma
list/multiset.prod_map_neg
to facilitate transition frommultiset.prod_C_add_X_coeff
tomultiset.prod_X_sub_C_coeff
.