-
Notifications
You must be signed in to change notification settings - Fork 8
Adapt to hornerE respecting exponents - math-comp's PR #923 #81
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
805ea90
Adapt to hornerE respecting exponents - MC PR #923
7b015e2
Ensure compatibility with old & new hornerE version
c84a549
Fix the previous change: it worked with old hornerE and not the new a…
f7181aa
Document how to simplify proofs when requiring MC >= 1.16.0
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
Original file line number | Diff line number | Diff line change | ||||||
---|---|---|---|---|---|---|---|---|
|
@@ -416,7 +416,8 @@ move=> n_gt0; have [->|xN0] := eqVneq x 0. | |||||||
rewrite [LHS](@all_roots_prod_XsubC _ _ ws). | ||||||||
- by rewrite (monicP _) ?monic_XnsubC// scale1r big_map big_enum. | ||||||||
- by rewrite size_XnsubC// size_map size_enum_ord. | ||||||||
- rewrite all_map; apply/allP => i _ /=; rewrite /root !hornerE hornerXn. | ||||||||
- rewrite all_map; apply/allP => i _ /=; rewrite /root !hornerE ?hornerXn. | ||||||||
(* FIXME: remove ?hornerXn when requiring MC >= 1.16.0 *) | ||||||||
by rewrite exprMn exprAC [w ^+ _]prim_expr_order// expr1n mulr1 subrr. | ||||||||
- by rewrite uniq_rootsE uniq_roots_Xn_sub_xn. | ||||||||
Qed. | ||||||||
|
@@ -433,7 +434,8 @@ Lemma dvdp_minpoly_Xn_subn E : | |||||||
(x ^+ p)%R \in E -> minPoly E x %| ('X^p - (x ^+ p)%:P). | ||||||||
Proof using. | ||||||||
move=> xpE; have [->|p_gt0] := posnP p; first by rewrite !expr0 subrr dvdp0. | ||||||||
by rewrite minPoly_dvdp /root ?poly_XnsubC_over// !hornerE hornerXn subrr. | ||||||||
by rewrite minPoly_dvdp /root ?poly_XnsubC_over// !hornerE ?hornerXn subrr. | ||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||
(* FIXME: remove ?hornerXn when requiring MC >= 1.16.0 *) | ||||||||
Qed. | ||||||||
|
||||||||
Lemma galois_cyclo_radical E : (p > 0)%N -> x ^+ p \in E -> | ||||||||
|
@@ -1505,7 +1507,8 @@ have Cchar := Cchar => p_neq0; split. | |||||||
move=> /radicalP[]; case: i => // i in epw * => _ uik. | ||||||||
pose v := i.+1.-root (iota (u ^+ i.+1)). | ||||||||
have : ('X ^+ i.+1 - (v ^+ i.+1)%:P).[iota u] == 0. | ||||||||
by rewrite !hornerE hornerXn rootCK// rmorphX subrr. | ||||||||
by rewrite !hornerE ?hornerXn rootCK// rmorphX subrr. | ||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||
(* FIXME: remove ?hornerXn when requiring MC >= 1.16.0 *) | ||||||||
have /Xn_sub_xnE->// := prim1rootP (isT : 0 < i.+1)%N. | ||||||||
rewrite horner_prod prodf_seq_eq0/= => /hasP[/= l _]. | ||||||||
rewrite hornerXsubC subr_eq0 => /eqP u_eq. | ||||||||
|
This file contains hidden or 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
Original file line number | Diff line number | Diff line change | ||||||
---|---|---|---|---|---|---|---|---|
|
@@ -432,7 +432,8 @@ have Xxn0 : ('X - y%:P) ^+ n != 0 by rewrite ?expf_neq0 ?polyXsubC_eq0. | |||||||
apply/eqP; rewrite eqn_leq mup_leq ?mup_geq//. | ||||||||
have [->|Nxy] := eqVneq x y. | ||||||||
by rewrite /= dvdpp ?dvdp_Pexp2l ?size_XsubC ?ltnn. | ||||||||
by rewrite dvd1p dvdp_XsubCl /root horner_exp !hornerE expf_neq0// subr_eq0. | ||||||||
by rewrite dvd1p dvdp_XsubCl /root !hornerE ?horner_exp ?hornerE expf_neq0// subr_eq0. | ||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||
(* FIXME: remove ?horner_exp ?hornerE when requiring MC >= 1.16.0 *) | ||||||||
Qed. | ||||||||
|
||||||||
Lemma mupNroot (x : L) q : ~~ root q x -> mup x q = 0%N. | ||||||||
|
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.