Skip to content

Commit 56cbd91

Browse files
authored
Merge pull request #81 from SnarkBoojum/adapt_MC_PR_923
Adapt to hornerE respecting exponents - math-comp's PR #923
2 parents 1b5e247 + f7181aa commit 56cbd91

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

theories/abel.v

+6-3
Original file line numberDiff line numberDiff line change
@@ -416,7 +416,8 @@ move=> n_gt0; have [->|xN0] := eqVneq x 0.
416416
rewrite [LHS](@all_roots_prod_XsubC _ _ ws).
417417
- by rewrite (monicP _) ?monic_XnsubC// scale1r big_map big_enum.
418418
- by rewrite size_XnsubC// size_map size_enum_ord.
419-
- rewrite all_map; apply/allP => i _ /=; rewrite /root !hornerE hornerXn.
419+
- rewrite all_map; apply/allP => i _ /=; rewrite /root !hornerE ?hornerXn.
420+
(* FIXME: remove ?hornerXn when requiring MC >= 1.16.0 *)
420421
by rewrite exprMn exprAC [w ^+ _]prim_expr_order// expr1n mulr1 subrr.
421422
- by rewrite uniq_rootsE uniq_roots_Xn_sub_xn.
422423
Qed.
@@ -433,7 +434,8 @@ Lemma dvdp_minpoly_Xn_subn E :
433434
(x ^+ p)%R \in E -> minPoly E x %| ('X^p - (x ^+ p)%:P).
434435
Proof using.
435436
move=> xpE; have [->|p_gt0] := posnP p; first by rewrite !expr0 subrr dvdp0.
436-
by rewrite minPoly_dvdp /root ?poly_XnsubC_over// !hornerE hornerXn subrr.
437+
by rewrite minPoly_dvdp /root ?poly_XnsubC_over// !hornerE ?hornerXn subrr.
438+
(* FIXME: remove ?hornerXn when requiring MC >= 1.16.0 *)
437439
Qed.
438440

439441
Lemma galois_cyclo_radical E : (p > 0)%N -> x ^+ p \in E ->
@@ -1505,7 +1507,8 @@ have Cchar := Cchar => p_neq0; split.
15051507
move=> /radicalP[]; case: i => // i in epw * => _ uik.
15061508
pose v := i.+1.-root (iota (u ^+ i.+1)).
15071509
have : ('X ^+ i.+1 - (v ^+ i.+1)%:P).[iota u] == 0.
1508-
by rewrite !hornerE hornerXn rootCK// rmorphX subrr.
1510+
by rewrite !hornerE ?hornerXn rootCK// rmorphX subrr.
1511+
(* FIXME: remove ?hornerXn when requiring MC >= 1.16.0 *)
15091512
have /Xn_sub_xnE->// := prim1rootP (isT : 0 < i.+1)%N.
15101513
rewrite horner_prod prodf_seq_eq0/= => /hasP[/= l _].
15111514
rewrite hornerXsubC subr_eq0 => /eqP u_eq.

theories/xmathcomp/various.v

+2-1
Original file line numberDiff line numberDiff line change
@@ -432,7 +432,8 @@ have Xxn0 : ('X - y%:P) ^+ n != 0 by rewrite ?expf_neq0 ?polyXsubC_eq0.
432432
apply/eqP; rewrite eqn_leq mup_leq ?mup_geq//.
433433
have [->|Nxy] := eqVneq x y.
434434
by rewrite /= dvdpp ?dvdp_Pexp2l ?size_XsubC ?ltnn.
435-
by rewrite dvd1p dvdp_XsubCl /root horner_exp !hornerE expf_neq0// subr_eq0.
435+
by rewrite dvd1p dvdp_XsubCl /root !hornerE ?horner_exp ?hornerE expf_neq0// subr_eq0.
436+
(* FIXME: remove ?horner_exp ?hornerE when requiring MC >= 1.16.0 *)
436437
Qed.
437438

438439
Lemma mupNroot (x : L) q : ~~ root q x -> mup x q = 0%N.

0 commit comments

Comments
 (0)