fact stringlengths 8 1.54k | type stringclasses 19 values | library stringclasses 8 values | imports listlengths 1 10 | filename stringclasses 98 values | symbolic_name stringlengths 1 42 | docstring stringclasses 1 value |
|---|---|---|---|---|---|---|
Definition_ := Finite.on {poly %/ h}.
Hypothesis hI : monic_irreducible_poly h.
HB.instance Definition _ := Finite.on {poly %/ h with hI}. | HB.instance | field | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq choice",
"From mathcomp Require Import fintype tuple div bigop binomial finset finfun",
"From mathcomp Require Import ssralg countalg finalg poly polydiv qpoly perm",
"From mathcomp Require Import fingroup falgebra fieldext finfield galois",
"From mathcomp Require Import finalg zmodp matrix vector"
] | field/qfpoly.v | Definition | |
card_qfpoly: #|{poly %/ h with hI}| = #|R| ^ (size h).-1.
Proof. by rewrite card_monic_qpoly ?hI. Qed. | Lemma | field | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq choice",
"From mathcomp Require Import fintype tuple div bigop binomial finset finfun",
"From mathcomp Require Import ssralg countalg finalg poly polydiv qpoly perm",
"From mathcomp Require Import fingroup falgebra fieldext finfield galois",
"From mathcomp Require Import finalg zmodp matrix vector"
] | field/qfpoly.v | card_qfpoly | |
card_qfpoly_gt1: 1 < #|{poly %/ h with hI}|.
Proof. by have := card_finNzRing_gt1 {poly %/ h with hI}. Qed. | Lemma | field | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq choice",
"From mathcomp Require Import fintype tuple div bigop binomial finset finfun",
"From mathcomp Require Import ssralg countalg finalg poly polydiv qpoly perm",
"From mathcomp Require Import fingroup falgebra fieldext finfield galois",
"From mathcomp Require Import finalg zmodp matrix vector"
] | field/qfpoly.v | card_qfpoly_gt1 | |
in_qpoly_comp_horner(p q : {poly R}) :
in_qpoly h (p \Po q) =
(map_poly (qpolyC h) p).[in_qpoly h q].
Proof.
have hQM := monic_mk_monic h.
rewrite comp_polyE /map_poly poly_def horner_sum /=.
apply: val_inj.
rewrite /= rmodp_sum // poly_of_qpoly_sum.
apply: eq_bigr => i _.
rewrite !hornerE /in_qpoly /=.
rewrite mul_polyC // !rmodpZ //=.
by rewrite poly_of_qpolyX /= rmodp_id // rmodpX // rmodp_id.
Qed. | Lemma | field | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq choice",
"From mathcomp Require Import fintype tuple div bigop binomial finset finfun",
"From mathcomp Require Import ssralg countalg finalg poly polydiv qpoly perm",
"From mathcomp Require Import fingroup falgebra fieldext finfield galois",
"From mathcomp Require Import finalg zmodp matrix vector"
] | field/qfpoly.v | in_qpoly_comp_horner | |
map_poly_div_inj: injective (map_poly (qpolyC h)).
Proof.
apply: map_inj_poly => [x y /val_eqP /eqP /polyC_inj //|].
by rewrite qpolyC0.
Qed. | Lemma | field | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq choice",
"From mathcomp Require Import fintype tuple div bigop binomial finset finfun",
"From mathcomp Require Import ssralg countalg finalg poly polydiv qpoly perm",
"From mathcomp Require Import fingroup falgebra fieldext finfield galois",
"From mathcomp Require Import finalg zmodp matrix vector"
] | field/qfpoly.v | map_poly_div_inj | |
qfpoly_const(R : idomainType) (h : {poly R})
(hMI : monic_irreducible_poly h) : R -> {poly %/ h with hMI} :=
qpolyC h. | Definition | field | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq choice",
"From mathcomp Require Import fintype tuple div bigop binomial finset finfun",
"From mathcomp Require Import ssralg countalg finalg poly polydiv qpoly perm",
"From mathcomp Require Import fingroup falgebra fieldext finfield galois",
"From mathcomp Require Import finalg zmodp matrix vector"
] | field/qfpoly.v | qfpoly_const | |
map_fpoly_div_inj(R : idomainType) (h : {poly R})
(hMI : monic_irreducible_poly h) :
injective (map_poly (qfpoly_const hMI)).
Proof. by apply: (@map_poly_div_inj R h). Qed. | Lemma | field | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq choice",
"From mathcomp Require Import fintype tuple div bigop binomial finset finfun",
"From mathcomp Require Import ssralg countalg finalg poly polydiv qpoly perm",
"From mathcomp Require Import fingroup falgebra fieldext finfield galois",
"From mathcomp Require Import finalg zmodp matrix vector"
] | field/qfpoly.v | map_fpoly_div_inj | |
qfpoly_splitting_field_type:=
FinSplittingFieldType F {poly %/ h with hI}. | Definition | field | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq choice",
"From mathcomp Require Import fintype tuple div bigop binomial finset finfun",
"From mathcomp Require Import ssralg countalg finalg poly polydiv qpoly perm",
"From mathcomp Require Import fingroup falgebra fieldext finfield galois",
"From mathcomp Require Import finalg zmodp matrix vector"
] | field/qfpoly.v | qfpoly_splitting_field_type | |
primitive_poly(p: {poly F}) :=
let v := #|{poly %/ p}|.-1 in
[&& p \is monic,
irreducibleb p,
p %| 'X^v - 1 &
[forall n : 'I_v, (p %| 'X^n - 1) ==> (n == 0%N :> nat)]]. | Definition | field | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq choice",
"From mathcomp Require Import fintype tuple div bigop binomial finset finfun",
"From mathcomp Require Import ssralg countalg finalg poly polydiv qpoly perm",
"From mathcomp Require Import fingroup falgebra fieldext finfield galois",
"From mathcomp Require Import finalg zmodp matrix vector"
] | field/qfpoly.v | primitive_poly | |
primitive_polyP(p : {poly F}) :
reflect
(let v := #|{poly %/ p}|.-1 in
[/\ monic_irreducible_poly p,
p %| 'X^v - 1 &
forall n, 0 < n < v -> ~~ (p %| 'X^n - 1)])
(primitive_poly p).
Proof.
apply: (iffP and4P) => [[H1 H2 H3 /forallP H4] v|[[H1 H2] H3 H4]]; split => //.
- by split => //; apply/irreducibleP.
- move=> n /andP[n_gt0 nLv]; apply/negP => /(implyP (H4 (Ordinal nLv))) /=.
by rewrite eqn0Ngt n_gt0.
- by apply/irreducibleP.
apply/forallP=> [] [[|n] Hn] /=; apply/implyP => pDX //.
by case/negP: (H4 n.+1 Hn).
Qed.
Hypothesis Hh : primitive_poly h. | Lemma | field | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq choice",
"From mathcomp Require Import fintype tuple div bigop binomial finset finfun",
"From mathcomp Require Import ssralg countalg finalg poly polydiv qpoly perm",
"From mathcomp Require Import fingroup falgebra fieldext finfield galois",
"From mathcomp Require Import finalg zmodp matrix vector"
] | field/qfpoly.v | primitive_polyP | |
primitive_mi: monic_irreducible_poly h.
Proof. by case/primitive_polyP: Hh. Qed. | Lemma | field | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq choice",
"From mathcomp Require Import fintype tuple div bigop binomial finset finfun",
"From mathcomp Require Import ssralg countalg finalg poly polydiv qpoly perm",
"From mathcomp Require Import fingroup falgebra fieldext finfield galois",
"From mathcomp Require Import finalg zmodp matrix vector"
] | field/qfpoly.v | primitive_mi | |
primitive_poly_in_qpoly_eq0p : (in_qpoly h p == 0) = (h %| p).
Proof.
have hM : h \is monic by case/and4P:Hh.
have hMi : monic_irreducible_poly h by apply: primitive_mi.
apply/eqP/idP => [/val_eqP /= | hDp].
by rewrite -Pdiv.IdomainMonic.modpE mk_monicE.
by apply/val_eqP; rewrite /= -Pdiv.IdomainMonic.modpE mk_monicE.
Qed.
Local Notation qT := {poly %/ h with primitive_mi}. | Lemma | field | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq choice",
"From mathcomp Require Import fintype tuple div bigop binomial finset finfun",
"From mathcomp Require Import ssralg countalg finalg poly polydiv qpoly perm",
"From mathcomp Require Import fingroup falgebra fieldext finfield galois",
"From mathcomp Require Import finalg zmodp matrix vector"
] | field/qfpoly.v | primitive_poly_in_qpoly_eq0 | |
card_primitive_qpoly: #|{poly %/ h}|= #|F| ^ (size h).-1.
Proof. by rewrite card_monic_qpoly ?primitive_mi. Qed. | Lemma | field | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq choice",
"From mathcomp Require Import fintype tuple div bigop binomial finset finfun",
"From mathcomp Require Import ssralg countalg finalg poly polydiv qpoly perm",
"From mathcomp Require Import fingroup falgebra fieldext finfield galois",
"From mathcomp Require Import finalg zmodp matrix vector"
] | field/qfpoly.v | card_primitive_qpoly | |
qX_neq0: 'qX != 0 :> qT.
Proof.
apply/eqP => /val_eqP/=.
by rewrite [rmodp _ _]qpolyXE ?polyX_eq0 //; case: primitive_mi.
Qed. | Lemma | field | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq choice",
"From mathcomp Require Import fintype tuple div bigop binomial finset finfun",
"From mathcomp Require Import ssralg countalg finalg poly polydiv qpoly perm",
"From mathcomp Require Import fingroup falgebra fieldext finfield galois",
"From mathcomp Require Import finalg zmodp matrix vector"
] | field/qfpoly.v | qX_neq0 | |
qX_in_unit: ('qX : qT) \in GRing.unit.
Proof. by rewrite unitfE /= qX_neq0. Qed. | Lemma | field | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq choice",
"From mathcomp Require Import fintype tuple div bigop binomial finset finfun",
"From mathcomp Require Import ssralg countalg finalg poly polydiv qpoly perm",
"From mathcomp Require Import fingroup falgebra fieldext finfield galois",
"From mathcomp Require Import finalg zmodp matrix vector"
] | field/qfpoly.v | qX_in_unit | |
gX: {unit qT} := FinRing.unit _ qX_in_unit. | Definition | field | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq choice",
"From mathcomp Require Import fintype tuple div bigop binomial finset finfun",
"From mathcomp Require Import ssralg countalg finalg poly polydiv qpoly perm",
"From mathcomp Require Import fingroup falgebra fieldext finfield galois",
"From mathcomp Require Import finalg zmodp matrix vector"
] | field/qfpoly.v | gX | |
dvdp_ordern : (h %| 'X^n - 1) = (gX ^+ n == 1)%g.
Proof.
have [hM hI] := primitive_mi.
have eqr_add2r (r : nzRingType) (a b c : r) : (a + c == b + c) = (a == b).
by apply/eqP/eqP => [H|->//]; rewrite -(addrK c a) H addrK.
rewrite -val_eqE /= val_unitX /= -val_eqE /=.
rewrite (poly_of_qpolyX) qpolyXE // mk_monicE //.
rewrite -[in RHS](subrK 1 'X^n) rmodpD //.
rewrite [rmodp 1 h]rmodp_small ?size_poly1 //.
rewrite -[1%:P]add0r polyC1 /= eqr_add2r.
by rewrite dvdpE /=; apply/rmodp_eq0P/eqP.
Qed. | Lemma | field | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq choice",
"From mathcomp Require Import fintype tuple div bigop binomial finset finfun",
"From mathcomp Require Import ssralg countalg finalg poly polydiv qpoly perm",
"From mathcomp Require Import fingroup falgebra fieldext finfield galois",
"From mathcomp Require Import finalg zmodp matrix vector"
] | field/qfpoly.v | dvdp_order | |
gX_order: #[gX]%g = (#|qT|).-1.
Proof.
have /primitive_polyP[Hp1 Hp2 Hp3] := Hh.
set n := _.-1 in Hp2 Hp3 *.
have n_gt0 : 0 < n by rewrite ltn_predRL card_qfpoly_gt1.
have [hM hI] := primitive_mi.
have gX_neq1 : gX != 1%g.
apply/eqP/val_eqP/eqP/val_eqP=> /=.
rewrite [X in X != _]qpolyXE /= //.
by apply/eqP=> Hx1; have := @size_polyX F; rewrite Hx1 size_poly1.
have Hx : (gX ^+ n)%g = 1%g by apply/eqP; rewrite -dvdp_order.
have Hf i : 0 < i < n -> (gX ^+ i != 1)%g by rewrite -dvdp_order => /Hp3.
have o_gt0 : 0 < #[gX]%g by rewrite order_gt0.
have : n <= #[gX]%g.
rewrite leqNgt; apply/negP=> oLx.
have /Hf/eqP[] : 0 < #[gX]%g < n by rewrite o_gt0.
by rewrite expg_order.
case: ltngtP => nLo _ //.
have: uniq (path.traject (mul gX) 1%g #[gX]%g).
by apply/card_uniqP; rewrite path.size_traject -(eq_card (cycle_traject gX)).
case: #[gX]%g o_gt0 nLo => //= n1 _ nLn1 /andP[/negP[]].
apply/path.trajectP; exists n.-1; first by rewrite prednK.
rewrite -iterSr prednK // -[LHS]Hx.
by elim: (n) => //= n2 <-; rewrite expgS.
Qed. | Lemma | field | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq choice",
"From mathcomp Require Import fintype tuple div bigop binomial finset finfun",
"From mathcomp Require Import ssralg countalg finalg poly polydiv qpoly perm",
"From mathcomp Require Import fingroup falgebra fieldext finfield galois",
"From mathcomp Require Import finalg zmodp matrix vector"
] | field/qfpoly.v | gX_order | |
gX_all: <[gX]>%g = [set: {unit qT}]%G.
Proof.
apply/eqP; rewrite eqEcard; apply/andP; split.
by apply/subsetP=> i; rewrite inE.
rewrite leq_eqVlt; apply/orP; left; apply/eqP.
rewrite -orderE gX_order card_qfpoly -[in RHS](mk_monicE primitive_mi).
rewrite -card_qpoly -(cardC1 (0 : {poly %/ h with primitive_mi})).
rewrite cardsT card_sub.
by apply: eq_card => x; rewrite [LHS]unitfE.
Qed.
Let pred_card_qT_gt0 : 0 < #|qT|.-1.
Proof. by rewrite ltn_predRL card_qfpoly_gt1. Qed. | Lemma | field | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq choice",
"From mathcomp Require Import fintype tuple div bigop binomial finset finfun",
"From mathcomp Require Import ssralg countalg finalg poly polydiv qpoly perm",
"From mathcomp Require Import fingroup falgebra fieldext finfield galois",
"From mathcomp Require Import finalg zmodp matrix vector"
] | field/qfpoly.v | gX_all | |
qlogp(p : qT) : nat :=
odflt (Ordinal pred_card_qT_gt0) (pick [pred i in 'I_ _ | ('qX ^+ i == p)]). | Definition | field | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq choice",
"From mathcomp Require Import fintype tuple div bigop binomial finset finfun",
"From mathcomp Require Import ssralg countalg finalg poly polydiv qpoly perm",
"From mathcomp Require Import fingroup falgebra fieldext finfield galois",
"From mathcomp Require Import finalg zmodp matrix vector"
] | field/qfpoly.v | qlogp | |
qlogp_ltp : qlogp p < #|qT|.-1.
Proof. by rewrite /qlogp; case: pickP. Qed. | Lemma | field | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq choice",
"From mathcomp Require Import fintype tuple div bigop binomial finset finfun",
"From mathcomp Require Import ssralg countalg finalg poly polydiv qpoly perm",
"From mathcomp Require Import fingroup falgebra fieldext finfield galois",
"From mathcomp Require Import finalg zmodp matrix vector"
] | field/qfpoly.v | qlogp_lt | |
qlogp_qX(p : qT) : p != 0 -> 'qX ^+ (qlogp p) = p.
Proof.
move=> p_neq0.
have Up : p \in GRing.unit by rewrite unitfE.
pose gp : {unit qT}:= FinRing.unit _ Up.
have /cyclePmin[i iLc iX] : gp \in <[gX]>%g by rewrite gX_all inE.
rewrite gX_order in iLc.
rewrite /qlogp; case: pickP => [j /eqP//|/(_ (Ordinal iLc))] /eqP[].
by have /val_eqP/eqP/= := iX; rewrite FinRing.val_unitX.
Qed. | Lemma | field | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq choice",
"From mathcomp Require Import fintype tuple div bigop binomial finset finfun",
"From mathcomp Require Import ssralg countalg finalg poly polydiv qpoly perm",
"From mathcomp Require Import fingroup falgebra fieldext finfield galois",
"From mathcomp Require Import finalg zmodp matrix vector"
] | field/qfpoly.v | qlogp_qX | |
qX_order_card: 'qX ^+ (#|qT|).-1 = 1 :> qT.
Proof.
have /primitive_polyP [_ Hd _] := Hh.
rewrite dvdp_order in Hd.
have -> : 1 = val (1%g : {unit qT}) by [].
by rewrite -(eqP Hd) val_unitX.
Qed. | Lemma | field | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq choice",
"From mathcomp Require Import fintype tuple div bigop binomial finset finfun",
"From mathcomp Require Import ssralg countalg finalg poly polydiv qpoly perm",
"From mathcomp Require Import fingroup falgebra fieldext finfield galois",
"From mathcomp Require Import finalg zmodp matrix vector"
] | field/qfpoly.v | qX_order_card | |
qX_order_dvd(i : nat) : 'qX ^+ i = 1 :> qT -> (#|qT|.-1 %| i)%N.
Proof.
rewrite -gX_order cyclic.order_dvdn => Hd.
by apply/eqP/val_inj; rewrite /= -Hd val_unitX.
Qed. | Lemma | field | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq choice",
"From mathcomp Require Import fintype tuple div bigop binomial finset finfun",
"From mathcomp Require Import ssralg countalg finalg poly polydiv qpoly perm",
"From mathcomp Require Import fingroup falgebra fieldext finfield galois",
"From mathcomp Require Import finalg zmodp matrix vector"
] | field/qfpoly.v | qX_order_dvd | |
qlogp0: qlogp 0 = 0%N.
Proof.
rewrite /qlogp; case: pickP => //= x.
by rewrite (expf_eq0 ('qX : qT)) (negPf qX_neq0) andbF.
Qed. | Lemma | field | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq choice",
"From mathcomp Require Import fintype tuple div bigop binomial finset finfun",
"From mathcomp Require Import ssralg countalg finalg poly polydiv qpoly perm",
"From mathcomp Require Import fingroup falgebra fieldext finfield galois",
"From mathcomp Require Import finalg zmodp matrix vector"
] | field/qfpoly.v | qlogp0 | |
qlogp1: qlogp 1 = 0%N.
Proof.
case: (qlogp 1 =P 0%N) => // /eqP log1_neq0.
have := qlogp_lt 1; rewrite ltnNge => /negP[].
apply: dvdn_leq; first by rewrite lt0n.
by rewrite qX_order_dvd // qlogp_qX ?oner_eq0.
Qed. | Lemma | field | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq choice",
"From mathcomp Require Import fintype tuple div bigop binomial finset finfun",
"From mathcomp Require Import ssralg countalg finalg poly polydiv qpoly perm",
"From mathcomp Require Import fingroup falgebra fieldext finfield galois",
"From mathcomp Require Import finalg zmodp matrix vector"
] | field/qfpoly.v | qlogp1 | |
qlogp_eq0(q : qT) : (qlogp q == 0%N) = (q == 0) || (q == 1).
Proof.
case: (q =P 0) => [->|/eqP q_neq0]/=; first by rewrite qlogp0.
case: (q =P 1) => [->|/eqP q_neq1]/=; first by rewrite qlogp1.
rewrite /qlogp; case: pickP => [x|/(_ (Ordinal (qlogp_lt q)))] /=.
by case: ((x : nat) =P 0%N) => // ->; rewrite expr0 eq_sym (negPf q_neq1).
by rewrite qlogp_qX // eqxx.
Qed. | Lemma | field | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq choice",
"From mathcomp Require Import fintype tuple div bigop binomial finset finfun",
"From mathcomp Require Import ssralg countalg finalg poly polydiv qpoly perm",
"From mathcomp Require Import fingroup falgebra fieldext finfield galois",
"From mathcomp Require Import finalg zmodp matrix vector"
] | field/qfpoly.v | qlogp_eq0 | |
qX_exp_neq0i : 'qX ^+ i != 0 :> qT.
Proof. by rewrite expf_eq0 negb_and qX_neq0 orbT. Qed. | Lemma | field | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq choice",
"From mathcomp Require Import fintype tuple div bigop binomial finset finfun",
"From mathcomp Require Import ssralg countalg finalg poly polydiv qpoly perm",
"From mathcomp Require Import fingroup falgebra fieldext finfield galois",
"From mathcomp Require Import finalg zmodp matrix vector"
] | field/qfpoly.v | qX_exp_neq0 | |
qX_exp_inji j :
i < #|qT|.-1 -> j < #|qT|.-1 -> 'qX ^+ i = 'qX ^+ j :> qT -> i = j.
Proof.
wlog iLj : i j / (i <= j)%N => [Hw|] iL jL Hqx.
case: (ltngtP i j)=> // /ltnW iLj; first by apply: Hw.
by apply/sym_equal/Hw.
suff ji_eq0 : (j - i = 0)%N by rewrite -(subnK iLj) ji_eq0.
case: ((j - i)%N =P 0%N) => // /eqP ji_neq0.
have : j - i < #|qT|.-1 by apply: leq_ltn_trans (leq_subr _ _) jL.
rewrite ltnNge => /negP[].
apply: dvdn_leq; first by rewrite lt0n.
have HqXi : 'qX ^+ i != 0 :> qT by rewrite expf_eq0 (negPf qX_neq0) andbF.
by apply/qX_order_dvd/(mulIf HqXi); rewrite mul1r -exprD subnK.
Qed. | Lemma | field | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq choice",
"From mathcomp Require Import fintype tuple div bigop binomial finset finfun",
"From mathcomp Require Import ssralg countalg finalg poly polydiv qpoly perm",
"From mathcomp Require Import fingroup falgebra fieldext finfield galois",
"From mathcomp Require Import finalg zmodp matrix vector"
] | field/qfpoly.v | qX_exp_inj | |
powX_eq_modi j : i = j %[mod #|qT|.-1] -> 'qX ^+ i = 'qX ^+ j :> qT.
Proof.
set n := _.-1 => iEj.
rewrite [i](divn_eq i n) [j](divn_eq j n) !exprD ![(_ * n)%N]mulnC.
by rewrite !exprM !qX_order_card !expr1n !mul1r iEj.
Qed. | Lemma | field | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq choice",
"From mathcomp Require Import fintype tuple div bigop binomial finset finfun",
"From mathcomp Require Import ssralg countalg finalg poly polydiv qpoly perm",
"From mathcomp Require Import fingroup falgebra fieldext finfield galois",
"From mathcomp Require Import finalg zmodp matrix vector"
] | field/qfpoly.v | powX_eq_mod | |
qX_expKi : i < #|qT|.-1 -> qlogp ('qX ^+ i) = i.
Proof.
move=> iLF; apply: qX_exp_inj => //; first by apply: qlogp_lt.
by rewrite qlogp_qX // expf_eq0 (negPf qX_neq0) andbF.
Qed. | Lemma | field | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq choice",
"From mathcomp Require Import fintype tuple div bigop binomial finset finfun",
"From mathcomp Require Import ssralg countalg finalg poly polydiv qpoly perm",
"From mathcomp Require Import fingroup falgebra fieldext finfield galois",
"From mathcomp Require Import finalg zmodp matrix vector"
] | field/qfpoly.v | qX_expK | |
qlogpD(q1 q2 : qT) :
q1 != 0 -> q2 != 0 ->qlogp (q1 * q2) = ((qlogp q1 + qlogp q2) %% #|qT|.-1)%N.
Proof.
move=> q1_neq0 q2_neq0.
apply: qX_exp_inj; [apply: qlogp_lt => // | rewrite ltn_mod // |].
rewrite -[RHS]mul1r -(expr1n _ ((qlogp q1 + qlogp q2) %/ #|qT|.-1)).
rewrite -qX_order_card -exprM mulnC -exprD -divn_eq exprD !qlogp_qX //.
by rewrite mulf_eq0 negb_or q1_neq0.
Qed. | Lemma | field | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq choice",
"From mathcomp Require Import fintype tuple div bigop binomial finset finfun",
"From mathcomp Require Import ssralg countalg finalg poly polydiv qpoly perm",
"From mathcomp Require Import fingroup falgebra fieldext finfield galois",
"From mathcomp Require Import finalg zmodp matrix vector"
] | field/qfpoly.v | qlogpD | |
plogp(p q : {poly F}) :=
if boolP (primitive_poly p) is AltTrue Hh then
qlogp ((in_qpoly p q) : {poly %/ p with primitive_mi Hh})
else 0%N. | Definition | field | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq choice",
"From mathcomp Require Import fintype tuple div bigop binomial finset finfun",
"From mathcomp Require Import ssralg countalg finalg poly polydiv qpoly perm",
"From mathcomp Require Import fingroup falgebra fieldext finfield galois",
"From mathcomp Require Import finalg zmodp matrix vector"
] | field/qfpoly.v | plogp | |
plogp_lt(p q : {poly F}) : 2 < size p -> plogp p q < #|{poly %/ p}|.-1.
Proof.
move=> /ltnW size_gt1.
rewrite /plogp.
case (boolP (primitive_poly p)) => // Hh; first by apply: qlogp_lt.
by rewrite ltn_predRL (card_finNzRing_gt1 {poly %/ p}).
Qed. | Lemma | field | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq choice",
"From mathcomp Require Import fintype tuple div bigop binomial finset finfun",
"From mathcomp Require Import ssralg countalg finalg poly polydiv qpoly perm",
"From mathcomp Require Import fingroup falgebra fieldext finfield galois",
"From mathcomp Require Import finalg zmodp matrix vector"
] | field/qfpoly.v | plogp_lt | |
plogp_X(p q : {poly F}) :
2 < size p -> primitive_poly p -> ~~ (p %| q) -> p %| q - 'X ^+ plogp p q.
Proof.
move=> sp_gt2 Hh pNDq.
rewrite /plogp.
case (boolP (primitive_poly p)) => // Hh'; last by case/negP: Hh'.
have pM : p \is monic by case/and4P: Hh'.
have pMi : monic_irreducible_poly p by apply: primitive_mi.
set q' : {poly %/ p with primitive_mi Hh'} := in_qpoly p q.
apply/modp_eq0P; rewrite modpD modpN; apply/eqP; rewrite subr_eq0; apply/eqP.
rewrite !Pdiv.IdomainMonic.modpE //=.
suff /val_eqP/eqP/= : 'qX ^+ qlogp q' = q'.
rewrite /= [X in rmodp _ X]mk_monicE // => <-.
by rewrite poly_of_qpolyX /= mk_monicE // [rmodp 'X p]rmodp_small ?size_polyX.
apply: qlogp_qX => //.
apply/eqP=> /val_eqP/eqP.
rewrite /= mk_monicE // => /rmodp_eq0P; rewrite -dvdpE => pDq.
by case/negP: pNDq.
Qed. | Lemma | field | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq choice",
"From mathcomp Require Import fintype tuple div bigop binomial finset finfun",
"From mathcomp Require Import ssralg countalg finalg poly polydiv qpoly perm",
"From mathcomp Require Import fingroup falgebra fieldext finfield galois",
"From mathcomp Require Import finalg zmodp matrix vector"
] | field/qfpoly.v | plogp_X | |
plogp0(p : {poly F}) : 2 < size p -> plogp p 0 = 0%N.
Proof.
move=> sp_gt2; rewrite /plogp; case (boolP (primitive_poly p)) => // i.
by rewrite in_qpoly0 qlogp0.
Qed. | Lemma | field | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq choice",
"From mathcomp Require Import fintype tuple div bigop binomial finset finfun",
"From mathcomp Require Import ssralg countalg finalg poly polydiv qpoly perm",
"From mathcomp Require Import fingroup falgebra fieldext finfield galois",
"From mathcomp Require Import finalg zmodp matrix vector"
] | field/qfpoly.v | plogp0 | |
plogp1(p : {poly F}) : 2 < size p -> plogp p 1 = 0%N.
Proof.
move=> sp_gt2; rewrite /plogp; case (boolP (primitive_poly p)) => // i.
suff->: in_qpoly p 1 = 1 by apply: qlogp1.
apply/val_eqP/eqP; apply: in_qpoly_small.
rewrite mk_monicE ?size_poly1 ?(leq_trans _ sp_gt2) //.
by apply: primitive_mi.
Qed. | Lemma | field | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq choice",
"From mathcomp Require Import fintype tuple div bigop binomial finset finfun",
"From mathcomp Require Import ssralg countalg finalg poly polydiv qpoly perm",
"From mathcomp Require Import fingroup falgebra fieldext finfield galois",
"From mathcomp Require Import finalg zmodp matrix vector"
] | field/qfpoly.v | plogp1 | |
plogp_div_eq0(p q : {poly F}) :
2 < size p -> (p %| q) -> plogp p q = 0%N.
Proof.
move=> sp_gt2; rewrite /plogp; case (boolP (primitive_poly p)) => // i pDq.
suff-> : in_qpoly p q = 0 by apply: qlogp0.
by apply/eqP; rewrite primitive_poly_in_qpoly_eq0.
Qed. | Lemma | field | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq choice",
"From mathcomp Require Import fintype tuple div bigop binomial finset finfun",
"From mathcomp Require Import ssralg countalg finalg poly polydiv qpoly perm",
"From mathcomp Require Import fingroup falgebra fieldext finfield galois",
"From mathcomp Require Import finalg zmodp matrix vector"
] | field/qfpoly.v | plogp_div_eq0 | |
plogpD(p q1 q2 : {poly F}) :
2 < size p -> primitive_poly p -> ~~ (p %| q1) -> ~~ (p %| q2) ->
plogp p (q1 * q2) = ((plogp p q1 + plogp p q2) %% #|{poly %/ p}|.-1)%N.
Proof.
move=> sp_gt2 Pp pNDq1 pNDq2.
rewrite /plogp; case (boolP (primitive_poly p)) => [|/negP//] i /=.
have pmi := primitive_mi i.
by rewrite rmorphM qlogpD //= primitive_poly_in_qpoly_eq0.
Qed. | Lemma | field | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq choice",
"From mathcomp Require Import fintype tuple div bigop binomial finset finfun",
"From mathcomp Require Import ssralg countalg finalg poly polydiv qpoly perm",
"From mathcomp Require Import fingroup falgebra fieldext finfield galois",
"From mathcomp Require Import finalg zmodp matrix vector"
] | field/qfpoly.v | plogpD | |
separable_poly{R : idomainType} (p : {poly R}) := coprimep p p^`(). | Definition | field | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq div",
"From mathcomp Require Import choice fintype tuple finfun bigop finset prime",
"From mathcomp Require Import binomial ssralg poly polydiv fingroup perm",
"From mathcomp Require Import morphism quotient gproduct finalg zmodp cyclic",
"From mathcomp Require Import matrix mxalgebra mxpoly polyXY vector falgebra",
"From mathcomp Require Import fieldext"
] | field/separable.v | separable_poly | |
separable_poly_unlockable:= Unlockable separable_poly.unlock. | Canonical | field | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq div",
"From mathcomp Require Import choice fintype tuple finfun bigop finset prime",
"From mathcomp Require Import binomial ssralg poly polydiv fingroup perm",
"From mathcomp Require Import morphism quotient gproduct finalg zmodp cyclic",
"From mathcomp Require Import matrix mxalgebra mxpoly polyXY vector falgebra",
"From mathcomp Require Import fieldext"
] | field/separable.v | separable_poly_unlockable | |
separable_poly_neq0p : separable p -> p != 0.
Proof.
by apply: contraTneq => ->; rewrite unlock deriv0 coprime0p eqp01.
Qed. | Lemma | field | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq div",
"From mathcomp Require Import choice fintype tuple finfun bigop finset prime",
"From mathcomp Require Import binomial ssralg poly polydiv fingroup perm",
"From mathcomp Require Import morphism quotient gproduct finalg zmodp cyclic",
"From mathcomp Require Import matrix mxalgebra mxpoly polyXY vector falgebra",
"From mathcomp Require Import fieldext"
] | field/separable.v | separable_poly_neq0 | |
poly_square_freePp :
(forall u v, u * v %| p -> coprimep u v)
<-> (forall u, size u != 1 -> ~~ (u ^+ 2 %| p)).
Proof.
split=> [sq'p u | sq'p u v dvd_uv_p].
by apply: contra => /sq'p; rewrite coprimepp.
rewrite coprimep_def (contraLR (sq'p _)) // (dvdp_trans _ dvd_uv_p) //.
by rewrite dvdp_mul ?dvdp_gcdl ?dvdp_gcdr.
Qed. | Lemma | field | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq div",
"From mathcomp Require Import choice fintype tuple finfun bigop finset prime",
"From mathcomp Require Import binomial ssralg poly polydiv fingroup perm",
"From mathcomp Require Import morphism quotient gproduct finalg zmodp cyclic",
"From mathcomp Require Import matrix mxalgebra mxpoly polyXY vector falgebra",
"From mathcomp Require Import fieldext"
] | field/separable.v | poly_square_freeP | |
separable_polyP{p} :
reflect [/\ forall u v, u * v %| p -> coprimep u v
& forall u, u %| p -> 1 < size u -> u^`() != 0]
(separable p).
Proof.
apply: (iffP idP) => [sep_p | [sq'p nz_der1p]].
split=> [u v | u u_dv_p]; last first.
apply: contraTneq => u'0; rewrite unlock in sep_p; rewrite -leqNgt -(eqnP sep_p).
rewrite dvdp_leq -?size_poly_eq0 ?(eqnP sep_p) // dvdp_gcd u_dv_p.
have /dvdpZr <-: lead_coef u ^+ scalp p u != 0 by rewrite lcn_neq0.
by rewrite -derivZ -Pdiv.Idomain.divpK //= derivM u'0 mulr0 addr0 dvdp_mull.
rewrite Pdiv.Idomain.dvdp_eq mulrCA mulrA; set c := _ ^+ _ => /eqP Dcp.
have nz_c: c != 0 by rewrite lcn_neq0.
move: sep_p; rewrite coprimep_sym unlock -(coprimepZl _ _ nz_c).
rewrite -(coprimepZr _ _ nz_c) -derivZ Dcp derivM coprimepMl.
by rewrite coprimep_addl_mul !coprimepMr -andbA => /and4P[].
rewrite unlock coprimep_def eqn_leq size_poly_gt0; set g := gcdp _ _.
have nz_g: g != 0.
rewrite -dvd0p dvdp_gcd -(mulr0 0); apply/nandP; left.
by have /poly_square_freeP-> := sq'p; rewrite ?size_poly0.
have [g_p]: g %| p /\ g %| p^`() by rewrite dvdp_gcdr ?dvdp_gcdl.
pose c := lead_coef g ^+ scalp p g; have nz_c: c != 0 by rewrite lcn_neq0.
have Dcp: c *: p = p %/ g * g by rewrite Pdiv.Idomain.divpK.
rewrite nz_g andbT leqNgt -(dvdpZr _ _ nz_c) -derivZ Dcp derivM.
rewrite dvdp_addr; last by rewrite dvdp_mull.
rewrite Gauss_dvdpr; last by rewrite sq'p // mulrC -Dcp dvdpZl.
by apply: contraL => /nz_der1p nz_g'; rewrite gtNdvdp ?nz_
... | Lemma | field | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq div",
"From mathcomp Require Import choice fintype tuple finfun bigop finset prime",
"From mathcomp Require Import binomial ssralg poly polydiv fingroup perm",
"From mathcomp Require Import morphism quotient gproduct finalg zmodp cyclic",
"From mathcomp Require Import matrix mxalgebra mxpoly polyXY vector falgebra",
"From mathcomp Require Import fieldext"
] | field/separable.v | separable_polyP | |
separable_coprimep u v : separable p -> u * v %| p -> coprimep u v.
Proof. by move=> /separable_polyP[sq'p _] /sq'p. Qed. | Lemma | field | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq div",
"From mathcomp Require Import choice fintype tuple finfun bigop finset prime",
"From mathcomp Require Import binomial ssralg poly polydiv fingroup perm",
"From mathcomp Require Import morphism quotient gproduct finalg zmodp cyclic",
"From mathcomp Require Import matrix mxalgebra mxpoly polyXY vector falgebra",
"From mathcomp Require Import fieldext"
] | field/separable.v | separable_coprime | |
separable_nosquarep u k :
separable p -> 1 < k -> size u != 1 -> (u ^+ k %| p) = false.
Proof.
move=> /separable_polyP[/poly_square_freeP sq'p _] /subnKC <- /sq'p.
by apply: contraNF; apply: dvdp_trans; rewrite exprD dvdp_mulr.
Qed. | Lemma | field | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq div",
"From mathcomp Require Import choice fintype tuple finfun bigop finset prime",
"From mathcomp Require Import binomial ssralg poly polydiv fingroup perm",
"From mathcomp Require Import morphism quotient gproduct finalg zmodp cyclic",
"From mathcomp Require Import matrix mxalgebra mxpoly polyXY vector falgebra",
"From mathcomp Require Import fieldext"
] | field/separable.v | separable_nosquare | |
separable_deriv_eq0p u :
separable p -> u %| p -> 1 < size u -> (u^`() == 0) = false.
Proof. by move=> /separable_polyP[_ nz_der1p] u_p /nz_der1p/negPf->. Qed. | Lemma | field | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq div",
"From mathcomp Require Import choice fintype tuple finfun bigop finset prime",
"From mathcomp Require Import binomial ssralg poly polydiv fingroup perm",
"From mathcomp Require Import morphism quotient gproduct finalg zmodp cyclic",
"From mathcomp Require Import matrix mxalgebra mxpoly polyXY vector falgebra",
"From mathcomp Require Import fieldext"
] | field/separable.v | separable_deriv_eq0 | |
dvdp_separablep q : q %| p -> separable p -> separable q.
Proof.
move=> /(dvdp_trans _)q_dv_p /separable_polyP[sq'p nz_der1p].
by apply/separable_polyP; split=> [u v /q_dv_p/sq'p | u /q_dv_p/nz_der1p].
Qed. | Lemma | field | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq div",
"From mathcomp Require Import choice fintype tuple finfun bigop finset prime",
"From mathcomp Require Import binomial ssralg poly polydiv fingroup perm",
"From mathcomp Require Import morphism quotient gproduct finalg zmodp cyclic",
"From mathcomp Require Import matrix mxalgebra mxpoly polyXY vector falgebra",
"From mathcomp Require Import fieldext"
] | field/separable.v | dvdp_separable | |
separable_mulp q :
separable (p * q) = [&& separable p, separable q & coprimep p q].
Proof.
apply/idP/and3P => [sep_pq | [sep_p sep_q co_pq]].
rewrite !(dvdp_separable _ sep_pq) ?dvdp_mulIr ?dvdp_mulIl //.
by rewrite (separable_coprime sep_pq).
rewrite unlock in sep_p sep_q *.
rewrite derivM coprimepMl {1}addrC mulrC !coprimep_addl_mul.
by rewrite !coprimepMr (coprimep_sym q p) co_pq !andbT; apply/andP.
Qed. | Lemma | field | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq div",
"From mathcomp Require Import choice fintype tuple finfun bigop finset prime",
"From mathcomp Require Import binomial ssralg poly polydiv fingroup perm",
"From mathcomp Require Import morphism quotient gproduct finalg zmodp cyclic",
"From mathcomp Require Import matrix mxalgebra mxpoly polyXY vector falgebra",
"From mathcomp Require Import fieldext"
] | field/separable.v | separable_mul | |
eqp_separablep q : p %= q -> separable p = separable q.
Proof. by case/andP=> p_q q_p; apply/idP/idP=> /dvdp_separable->. Qed. | Lemma | field | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq div",
"From mathcomp Require Import choice fintype tuple finfun bigop finset prime",
"From mathcomp Require Import binomial ssralg poly polydiv fingroup perm",
"From mathcomp Require Import morphism quotient gproduct finalg zmodp cyclic",
"From mathcomp Require Import matrix mxalgebra mxpoly polyXY vector falgebra",
"From mathcomp Require Import fieldext"
] | field/separable.v | eqp_separable | |
separable_rootp x :
separable (p * ('X - x%:P)) = separable p && ~~ root p x.
Proof.
rewrite separable_mul; apply: andb_id2l => seq_p.
by rewrite unlock derivXsubC coprimep1 coprimep_XsubC.
Qed. | Lemma | field | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq div",
"From mathcomp Require Import choice fintype tuple finfun bigop finset prime",
"From mathcomp Require Import binomial ssralg poly polydiv fingroup perm",
"From mathcomp Require Import morphism quotient gproduct finalg zmodp cyclic",
"From mathcomp Require Import matrix mxalgebra mxpoly polyXY vector falgebra",
"From mathcomp Require Import fieldext"
] | field/separable.v | separable_root | |
separable_prod_XsubC(r : seq R) :
separable (\prod_(x <- r) ('X - x%:P)) = uniq r.
Proof.
elim: r => [|x r IH]; first by rewrite big_nil unlock /separable_poly coprime1p.
by rewrite big_cons mulrC separable_root IH root_prod_XsubC andbC.
Qed. | Lemma | field | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq div",
"From mathcomp Require Import choice fintype tuple finfun bigop finset prime",
"From mathcomp Require Import binomial ssralg poly polydiv fingroup perm",
"From mathcomp Require Import morphism quotient gproduct finalg zmodp cyclic",
"From mathcomp Require Import matrix mxalgebra mxpoly polyXY vector falgebra",
"From mathcomp Require Import fieldext"
] | field/separable.v | separable_prod_XsubC | |
make_separablep : p != 0 -> separable (p %/ gcdp p p^`()).
Proof.
set g := gcdp p p^`() => nz_p; apply/separable_polyP.
have max_dvd_u (u : {poly R}): 1 < size u -> exists k, ~~ (u ^+ k %| p).
move=> u_gt1; exists (size p); rewrite gtNdvdp // polySpred //.
by rewrite -(ltn_subRL 1) subn1 size_exp leq_pmull // -(subnKC u_gt1).
split=> [|u u_pg u_gt1]; last first.
apply/eqP=> u'0 /=; have [k /negP[]] := max_dvd_u u u_gt1.
elim: k => [|k IHk]; first by rewrite dvd1p.
suffices: u ^+ k.+1 %| (p %/ g) * g.
by rewrite Pdiv.Idomain.divpK ?dvdp_gcdl // dvdpZr ?lcn_neq0.
rewrite exprS dvdp_mul // dvdp_gcd IHk //=.
suffices: u ^+ k %| (p %/ u ^+ k * u ^+ k)^`().
by rewrite Pdiv.Idomain.divpK // derivZ dvdpZr ?lcn_neq0.
by rewrite !derivCE u'0 mul0r mul0rn mulr0 addr0 dvdp_mull.
have pg_dv_p: p %/ g %| p by rewrite divp_dvd ?dvdp_gcdl.
apply/poly_square_freeP=> u; rewrite neq_ltn ltnS leqn0 size_poly_eq0.
case/predU1P=> [-> | /max_dvd_u[k]].
by apply: contra nz_p; rewrite expr0n -dvd0p => /dvdp_trans->.
apply: contra => u2_dv_pg; case: k; [by rewrite dvd1p | elim=> [|n IHn]].
exact: dvdp_trans (dvdp_mulr _ _) (dvdp_trans u2_dv_pg pg_dv_p).
suff: u ^+ n.+2 %| (p %/ g) * g.
by rewrite Pdiv.Idomain.divpK ?dvdp_gcdl // dvdpZr ?lcn_neq0.
rewrite -add2n exprD dvdp_mul // dvdp_gcd.
rewrite (dvdp_trans _ IHn) ?exprS ?dvdp_mull //=.
suff: u ^+ n %| ((p %/ u ^+ n.+1) * u ^+ n.+1)^`().
by rewrite Pdiv.Idomain.divpK // derivZ dvdpZr ?lcn_neq0.
by rewrite !derivCE dvdp_add // -1?mul
... | Lemma | field | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq div",
"From mathcomp Require Import choice fintype tuple finfun bigop finset prime",
"From mathcomp Require Import binomial ssralg poly polydiv fingroup perm",
"From mathcomp Require Import morphism quotient gproduct finalg zmodp cyclic",
"From mathcomp Require Import matrix mxalgebra mxpoly polyXY vector falgebra",
"From mathcomp Require Import fieldext"
] | field/separable.v | make_separable | |
separable_map(F : fieldType) (R : idomainType)
(f : {rmorphism F -> R}) (p : {poly F}) :
separable_poly (map_poly f p) = separable_poly p.
Proof.
by rewrite unlock deriv_map /coprimep -gcdp_map size_map_poly.
Qed. | Lemma | field | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq div",
"From mathcomp Require Import choice fintype tuple finfun bigop finset prime",
"From mathcomp Require Import binomial ssralg poly polydiv fingroup perm",
"From mathcomp Require Import morphism quotient gproduct finalg zmodp cyclic",
"From mathcomp Require Import matrix mxalgebra mxpoly polyXY vector falgebra",
"From mathcomp Require Import fieldext"
] | field/separable.v | separable_map | |
large_field_PETq :
root (q ^ iota) y -> separable_poly q ->
exists2 r, r != 0
& forall t (z := iota t * y - x), ~~ root r (iota t) -> inFz z x /\ inFz z y.
Proof.
move=> qy_0 sep_q; have nz_q := separable_poly_neq0 sep_q.
have /factor_theorem[q0 Dq] := qy_0.
set p1 := p ^ iota \Po ('X + x%:P); set q1 := q0 \Po ('X + y%:P).
have nz_p1: p1 != 0.
apply: contraNneq nz_p => /(canRL (fun r => comp_polyXaddC_K r _))/eqP.
by rewrite comp_poly0 map_poly_eq0.
have{sep_q} nz_q10: q1.[0] != 0.
move: sep_q; rewrite -(separable_map iota) Dq separable_root => /andP[_].
by rewrite horner_comp !hornerE.
have nz_q1: q1 != 0 by apply: contraNneq nz_q10 => ->; rewrite horner0.
pose p2 := p1 ^ polyC \Po ('X * 'Y); pose q2 := q1 ^ polyC.
have /Bezout_coprimepP[[u v]]: coprimep p2 q2.
rewrite coprimep_def eqn_leq leqNgt andbC size_poly_gt0 gcdp_eq0 poly_XmY_eq0.
by rewrite map_polyC_eq0 (negPf nz_p1) -resultant_eq0 div_annihilant_neq0.
rewrite -size_poly_eq1 => /size_poly1P[r nzr Dr]; exists r => {nzr}// t z nz_rt.
have [r1 nz_r1 r1z_0]: algebraicOver iota z.
apply/algebraic_sub; last by exists p.
by apply: algebraic_mul; [apply: algebraic_id | exists q].
pose Fz := subFExtend iota z r1; pose kappa : Fz -> L := subfx_inj.
pose kappa' := inj_subfx iota z r1.
have /eq_map_poly Diota: kappa \o kappa' =1 iota.
by move=> w; rewrite /kappa /= subfx_inj_eval // map_polyC hornerC.
suffices [y3]: exists y3, y = kappa y3.
have [q3 ->] := subfxE y3; rewrite /kappa subfx_inj_eval // => Dy.
split
... | Lemma | field | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq div",
"From mathcomp Require Import choice fintype tuple finfun bigop finset prime",
"From mathcomp Require Import binomial ssralg poly polydiv fingroup perm",
"From mathcomp Require Import morphism quotient gproduct finalg zmodp cyclic",
"From mathcomp Require Import matrix mxalgebra mxpoly polyXY vector falgebra",
"From mathcomp Require Import fieldext"
] | field/separable.v | large_field_PET | |
pchar0_PET(q : {poly F}) :
q != 0 -> root (q ^ iota) y -> [pchar F] =i pred0 ->
exists n, let z := y *+ n - x in inFz z x /\ inFz z y.
Proof.
move=> nz_q qy_0 /pcharf0P pcharF0.
without loss{nz_q} sep_q: q qy_0 / separable_poly q.
move=> IHq; apply: IHq (make_separable nz_q).
have /dvdpP[q1 Dq] := dvdp_gcdl q q^`().
rewrite {1}Dq mulpK ?gcdp_eq0; last by apply/nandP; left.
have [n [r nz_ry Dr]] := multiplicity_XsubC (q ^ iota) y.
rewrite map_poly_eq0 nz_q /= in nz_ry.
case: n => [|n] in Dr; first by rewrite Dr mulr1 (negPf nz_ry) in qy_0.
have: ('X - y%:P) ^+ n.+1 %| q ^ iota by rewrite Dr dvdp_mulIr.
rewrite Dq rmorphM /= gcdp_map -(eqp_dvdr _ (gcdp_mul2l _ _ _)) -deriv_map Dr.
rewrite dvdp_gcd derivM deriv_exp derivXsubC mul1r !mulrA dvdp_mulIr /=.
rewrite mulrDr mulrA dvdp_addr ?dvdp_mulIr // exprS -scaler_nat -!scalerAr.
rewrite dvdpZr -?(rmorph_nat iota) ?fmorph_eq0 ?pcharF0 //.
rewrite mulrA dvdp_mul2r ?expf_neq0 ?polyXsubC_eq0 //.
by rewrite Gauss_dvdpl ?dvdp_XsubCl // coprimep_sym coprimep_XsubC.
have [r nz_r PETxy] := large_field_PET qy_0 sep_q.
pose ts := mkseq (fun n => iota n%:R) (size r).
have /(max_ring_poly_roots nz_r)/=/implyP: uniq_roots ts.
rewrite uniq_rootsE mkseq_uniq // => m n eq_mn; apply/eqP; rewrite eqn_leq.
wlog suffices: m n eq_mn / m <= n by move=> IHmn; rewrite !IHmn.
move/fmorph_inj/eqP: eq_mn; rewrite -subr_eq0 leqNgt; apply: contraL => lt_mn.
by rewrite -natrB ?(ltnW lt_mn) // pcharF0 -lt0n subn_gt0.
rewrite size_m
... | Lemma | field | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq div",
"From mathcomp Require Import choice fintype tuple finfun bigop finset prime",
"From mathcomp Require Import binomial ssralg poly polydiv fingroup perm",
"From mathcomp Require Import morphism quotient gproduct finalg zmodp cyclic",
"From mathcomp Require Import matrix mxalgebra mxpoly polyXY vector falgebra",
"From mathcomp Require Import fieldext"
] | field/separable.v | pchar0_PET | |
char0_PET:= (pchar0_PET) (only parsing). | Notation | field | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq div",
"From mathcomp Require Import choice fintype tuple finfun bigop finset prime",
"From mathcomp Require Import binomial ssralg poly polydiv fingroup perm",
"From mathcomp Require Import morphism quotient gproduct finalg zmodp cyclic",
"From mathcomp Require Import matrix mxalgebra mxpoly polyXY vector falgebra",
"From mathcomp Require Import fieldext"
] | field/separable.v | char0_PET | |
Derivation: bool :=
all2rel (fun u v => D (u * v) == D u * v + u * D v) (vbasis K).
Hypothesis derD : Derivation. | Definition | field | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq div",
"From mathcomp Require Import choice fintype tuple finfun bigop finset prime",
"From mathcomp Require Import binomial ssralg poly polydiv fingroup perm",
"From mathcomp Require Import morphism quotient gproduct finalg zmodp cyclic",
"From mathcomp Require Import matrix mxalgebra mxpoly polyXY vector falgebra",
"From mathcomp Require Import fieldext"
] | field/separable.v | Derivation | |
Derivation_mul: {in K &, forall u v, D (u * v) = D u * v + u * D v}.
Proof.
move=> u v /coord_vbasis-> /coord_vbasis->.
rewrite !(mulr_sumr, linear_sum) -big_split; apply: eq_bigr => /= j _.
rewrite !mulr_suml linear_sum -big_split; apply: eq_bigr => /= i _.
rewrite !(=^~ scalerAl, linearZZ) -!scalerAr linearZZ -!scalerDr !scalerA /=.
by congr (_ *: _); apply/eqP/(allrelP derD); exact: memt_nth.
Qed. | Lemma | field | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq div",
"From mathcomp Require Import choice fintype tuple finfun bigop finset prime",
"From mathcomp Require Import binomial ssralg poly polydiv fingroup perm",
"From mathcomp Require Import morphism quotient gproduct finalg zmodp cyclic",
"From mathcomp Require Import matrix mxalgebra mxpoly polyXY vector falgebra",
"From mathcomp Require Import fieldext"
] | field/separable.v | Derivation_mul | |
Derivation_mul_poly(Dp := map_poly D) :
{in polyOver K &, forall p q, Dp (p * q) = Dp p * q + p * Dp q}.
Proof.
move=> p q Kp Kq; apply/polyP=> i; rewrite {}/Dp coefD coef_map /= !coefM.
rewrite linear_sum -big_split; apply: eq_bigr => /= j _.
by rewrite !{1}coef_map Derivation_mul ?(polyOverP _).
Qed. | Lemma | field | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq div",
"From mathcomp Require Import choice fintype tuple finfun bigop finset prime",
"From mathcomp Require Import binomial ssralg poly polydiv fingroup perm",
"From mathcomp Require Import morphism quotient gproduct finalg zmodp cyclic",
"From mathcomp Require Import matrix mxalgebra mxpoly polyXY vector falgebra",
"From mathcomp Require Import fieldext"
] | field/separable.v | Derivation_mul_poly | |
DerivationSE K D : (K <= E)%VS -> Derivation E D -> Derivation K D.
Proof.
move/subvP=> sKE derD; apply/allrelP=> x y Kx Ky; apply/eqP.
by rewrite (Derivation_mul derD) ?sKE // vbasis_mem.
Qed. | Lemma | field | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq div",
"From mathcomp Require Import choice fintype tuple finfun bigop finset prime",
"From mathcomp Require Import binomial ssralg poly polydiv fingroup perm",
"From mathcomp Require Import morphism quotient gproduct finalg zmodp cyclic",
"From mathcomp Require Import matrix mxalgebra mxpoly polyXY vector falgebra",
"From mathcomp Require Import fieldext"
] | field/separable.v | DerivationS | |
Derivation1: D 1 = 0.
Proof.
apply: (addIr (D (1 * 1))); rewrite add0r {1}mul1r.
by rewrite (Derivation_mul derD) ?mem1v // mulr1 mul1r.
Qed. | Lemma | field | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq div",
"From mathcomp Require Import choice fintype tuple finfun bigop finset prime",
"From mathcomp Require Import binomial ssralg poly polydiv fingroup perm",
"From mathcomp Require Import morphism quotient gproduct finalg zmodp cyclic",
"From mathcomp Require Import matrix mxalgebra mxpoly polyXY vector falgebra",
"From mathcomp Require Import fieldext"
] | field/separable.v | Derivation1 | |
Derivation_scalarx : x \in 1%VS -> D x = 0.
Proof. by case/vlineP=> y ->; rewrite linearZ /= Derivation1 scaler0. Qed. | Lemma | field | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq div",
"From mathcomp Require Import choice fintype tuple finfun bigop finset prime",
"From mathcomp Require Import binomial ssralg poly polydiv fingroup perm",
"From mathcomp Require Import morphism quotient gproduct finalg zmodp cyclic",
"From mathcomp Require Import matrix mxalgebra mxpoly polyXY vector falgebra",
"From mathcomp Require Import fieldext"
] | field/separable.v | Derivation_scalar | |
Derivation_expx m : x \in E -> D (x ^+ m) = x ^+ m.-1 *+ m * D x.
Proof.
move=> Ex; case: m; first by rewrite expr0 mulr0n mul0r Derivation1.
elim=> [|m IHm]; first by rewrite mul1r.
rewrite exprS (Derivation_mul derD) //; last by apply: rpredX.
by rewrite mulrC IHm mulrA mulrnAr -exprS -mulrDl.
Qed. | Lemma | field | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq div",
"From mathcomp Require Import choice fintype tuple finfun bigop finset prime",
"From mathcomp Require Import binomial ssralg poly polydiv fingroup perm",
"From mathcomp Require Import morphism quotient gproduct finalg zmodp cyclic",
"From mathcomp Require Import matrix mxalgebra mxpoly polyXY vector falgebra",
"From mathcomp Require Import fieldext"
] | field/separable.v | Derivation_exp | |
Derivation_hornerp x :
p \is a polyOver E -> x \in E ->
D p.[x] = (map_poly D p).[x] + p^`().[x] * D x.
Proof.
move=> Ep Ex; elim/poly_ind: p Ep => [|p c IHp] /polyOverP EpXc.
by rewrite !(raddf0, horner0) mul0r add0r.
have Ep: p \is a polyOver E.
by apply/polyOverP=> i; have:= EpXc i.+1; rewrite coefD coefMX coefC addr0.
have->: map_poly D (p * 'X + c%:P) = map_poly D p * 'X + (D c)%:P.
apply/polyP=> i; rewrite !(coefD, coefMX, coef_map) /= linearD /= !coefC.
by rewrite !(fun_if D) linear0.
rewrite derivMXaddC !hornerE mulrDl mulrAC addrAC linearD /=; congr (_ + _).
by rewrite addrCA -mulrDl -IHp // addrC (Derivation_mul derD) ?rpred_horner.
Qed. | Lemma | field | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq div",
"From mathcomp Require Import choice fintype tuple finfun bigop finset prime",
"From mathcomp Require Import binomial ssralg poly polydiv fingroup perm",
"From mathcomp Require Import morphism quotient gproduct finalg zmodp cyclic",
"From mathcomp Require Import matrix mxalgebra mxpoly polyXY vector falgebra",
"From mathcomp Require Import fieldext"
] | field/separable.v | Derivation_horner | |
separable_elementU x := separable_poly (minPoly U x). | Definition | field | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq div",
"From mathcomp Require Import choice fintype tuple finfun bigop finset prime",
"From mathcomp Require Import binomial ssralg poly polydiv fingroup perm",
"From mathcomp Require Import morphism quotient gproduct finalg zmodp cyclic",
"From mathcomp Require Import matrix mxalgebra mxpoly polyXY vector falgebra",
"From mathcomp Require Import fieldext"
] | field/separable.v | separable_element | |
separable_elementP:
reflect (exists f, [/\ f \is a polyOver K, root f x & separable_poly f])
(separable_element K x).
Proof.
apply: (iffP idP) => [sep_x | [f [Kf /(minPoly_dvdp Kf)/dvdpP[g ->]]]].
by exists (minPoly K x); rewrite minPolyOver root_minPoly.
by rewrite separable_mul => /and3P[].
Qed. | Lemma | field | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq div",
"From mathcomp Require Import choice fintype tuple finfun bigop finset prime",
"From mathcomp Require Import binomial ssralg poly polydiv fingroup perm",
"From mathcomp Require Import morphism quotient gproduct finalg zmodp cyclic",
"From mathcomp Require Import matrix mxalgebra mxpoly polyXY vector falgebra",
"From mathcomp Require Import fieldext"
] | field/separable.v | separable_elementP | |
base_separable: x \in K -> separable_element K x.
Proof.
move=> Kx; apply/separable_elementP; exists ('X - x%:P).
by rewrite polyOverXsubC root_XsubC unlock !derivCE coprimep1.
Qed. | Lemma | field | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq div",
"From mathcomp Require Import choice fintype tuple finfun bigop finset prime",
"From mathcomp Require Import binomial ssralg poly polydiv fingroup perm",
"From mathcomp Require Import morphism quotient gproduct finalg zmodp cyclic",
"From mathcomp Require Import matrix mxalgebra mxpoly polyXY vector falgebra",
"From mathcomp Require Import fieldext"
] | field/separable.v | base_separable | |
separable_nz_der: separable_element K x = ((minPoly K x)^`() != 0).
Proof.
rewrite /separable_element unlock.
apply/idP/idP=> [|nzPx'].
by apply: contraTneq => ->; rewrite coprimep0 -size_poly_eq1 size_minPoly.
have gcdK : gcdp (minPoly K x) (minPoly K x)^`() \in polyOver K.
by rewrite gcdp_polyOver ?polyOver_deriv // minPolyOver.
rewrite -gcdp_eqp1 -size_poly_eq1 -dvdp1.
have /orP[/andP[_]|/andP[]//] := minPoly_irr gcdK (dvdp_gcdl _ _).
rewrite dvdp_gcd dvdpp /= => /(dvdp_leq nzPx')/leq_trans/(_ (size_poly _ _)).
by rewrite size_minPoly ltnn.
Qed. | Lemma | field | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq div",
"From mathcomp Require Import choice fintype tuple finfun bigop finset prime",
"From mathcomp Require Import binomial ssralg poly polydiv fingroup perm",
"From mathcomp Require Import morphism quotient gproduct finalg zmodp cyclic",
"From mathcomp Require Import matrix mxalgebra mxpoly polyXY vector falgebra",
"From mathcomp Require Import fieldext"
] | field/separable.v | separable_nz_der | |
separablePn_pchar:
reflect (exists2 p, p \in [pchar L] &
exists2 g, g \is a polyOver K & minPoly K x = g \Po 'X^p)
(~~ separable_element K x).
Proof.
rewrite separable_nz_der negbK; set f := minPoly K x.
apply: (iffP eqP) => [f'0 | [p Hp [g _ ->]]]; last first.
by rewrite deriv_comp derivXn -scaler_nat (pcharf0 Hp) scale0r mulr0.
pose n := adjoin_degree K x; have sz_f: size f = n.+1 := size_minPoly K x.
have fn1: f`_n = 1 by rewrite -(monicP (monic_minPoly K x)) lead_coefE sz_f.
have dimKx: (adjoin_degree K x)%:R == 0 :> L.
by rewrite -(coef0 _ n.-1) -f'0 coef_deriv fn1.
have /natf0_pchar[// | p pcharLp] := dimKx.
have /dvdnP[r Dn]: (p %| n)%N by rewrite (dvdn_pcharf pcharLp).
exists p => //; exists (\poly_(i < r.+1) f`_(i * p)).
by apply: polyOver_poly => i _; rewrite (polyOverP _) ?minPolyOver.
rewrite comp_polyE size_poly_eq -?Dn ?fn1 ?oner_eq0 //.
have pr_p := pcharf_prime pcharLp; have p_gt0 := prime_gt0 pr_p.
apply/polyP=> i; rewrite coef_sum.
have [[{}i ->] | p'i] := altP (@dvdnP p i); last first.
rewrite big1 => [|j _]; last first.
rewrite coefZ -exprM coefXn [_ == _](contraNF _ p'i) ?mulr0 // => /eqP->.
by rewrite dvdn_mulr.
rewrite (dvdn_pcharf pcharLp) in p'i; apply: mulfI p'i _ _ _.
by rewrite mulr0 mulr_natl; case: i => // i; rewrite -coef_deriv f'0 coef0.
have [ltri | leir] := leqP r.+1 i.
rewrite nth_default ?sz_f ?Dn ?ltn_pmul2r ?big1 // => j _.
rewrite coefZ -exprM coefXn mulnC gtn_eqF ?mulr0 //.
by rewrite ltn_pmul2l ?(leq_tr
... | Lemma | field | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq div",
"From mathcomp Require Import choice fintype tuple finfun bigop finset prime",
"From mathcomp Require Import binomial ssralg poly polydiv fingroup perm",
"From mathcomp Require Import morphism quotient gproduct finalg zmodp cyclic",
"From mathcomp Require Import matrix mxalgebra mxpoly polyXY vector falgebra",
"From mathcomp Require Import fieldext"
] | field/separable.v | separablePn_pchar | |
separable_root_der: separable_element K x (+) root (minPoly K x)^`() x.
Proof.
have KpKx': _^`() \is a polyOver K := polyOver_deriv (minPolyOver K x).
rewrite separable_nz_der addNb (root_small_adjoin_poly KpKx') ?addbb //.
by rewrite (leq_trans (size_poly _ _)) ?size_minPoly.
Qed. | Lemma | field | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq div",
"From mathcomp Require Import choice fintype tuple finfun bigop finset prime",
"From mathcomp Require Import binomial ssralg poly polydiv fingroup perm",
"From mathcomp Require Import morphism quotient gproduct finalg zmodp cyclic",
"From mathcomp Require Import matrix mxalgebra mxpoly polyXY vector falgebra",
"From mathcomp Require Import fieldext"
] | field/separable.v | separable_root_der | |
Derivation_separableD :
Derivation <<K; x>> D -> separable_element K x ->
D x = - (map_poly D (minPoly K x)).[x] / (minPoly K x)^`().[x].
Proof.
move=> derD sepKx; have:= separable_root_der; rewrite {}sepKx -sub0r => nzKx'x.
apply: canRL (mulfK nzKx'x) (canRL (addrK _) _); rewrite mulrC addrC.
rewrite -(Derivation_horner derD) ?minPolyxx ?linear0 //.
exact: polyOverSv sKxK _ (minPolyOver _ _).
Qed. | Lemma | field | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq div",
"From mathcomp Require Import choice fintype tuple finfun bigop finset prime",
"From mathcomp Require Import binomial ssralg poly polydiv fingroup perm",
"From mathcomp Require Import morphism quotient gproduct finalg zmodp cyclic",
"From mathcomp Require Import matrix mxalgebra mxpoly polyXY vector falgebra",
"From mathcomp Require Import fieldext"
] | field/separable.v | Derivation_separable | |
Definition_ := @GRing.isZmodMorphism.Build _ _ body
(extendDerivation_zmod_morphism_subproof E).
HB.instance Definition _ := @GRing.isScalable.Build _ _ _ _ body
(extendDerivation_scalable_subproof E).
Let extendDerivationLinear := Eval hnf in (body : {linear _ -> _}). | HB.instance | field | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq div",
"From mathcomp Require Import choice fintype tuple finfun bigop finset prime",
"From mathcomp Require Import binomial ssralg poly polydiv fingroup perm",
"From mathcomp Require Import morphism quotient gproduct finalg zmodp cyclic",
"From mathcomp Require Import matrix mxalgebra mxpoly polyXY vector falgebra",
"From mathcomp Require Import fieldext"
] | field/separable.v | Definition | |
extendDerivation: 'End(L) := linfun extendDerivationLinear. | Definition | field | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq div",
"From mathcomp Require Import choice fintype tuple finfun bigop finset prime",
"From mathcomp Require Import binomial ssralg poly polydiv fingroup perm",
"From mathcomp Require Import morphism quotient gproduct finalg zmodp cyclic",
"From mathcomp Require Import matrix mxalgebra mxpoly polyXY vector falgebra",
"From mathcomp Require Import fieldext"
] | field/separable.v | extendDerivation | |
extendDerivation_idy : y \in K -> extendDerivation K y = D y.
Proof.
move=> yK; rewrite lfunE /= Fadjoin_polyC // derivC map_polyC hornerC.
by rewrite horner0 mul0r addr0.
Qed. | Lemma | field | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq div",
"From mathcomp Require Import choice fintype tuple finfun bigop finset prime",
"From mathcomp Require Import binomial ssralg poly polydiv fingroup perm",
"From mathcomp Require Import morphism quotient gproduct finalg zmodp cyclic",
"From mathcomp Require Import matrix mxalgebra mxpoly polyXY vector falgebra",
"From mathcomp Require Import fieldext"
] | field/separable.v | extendDerivation_id | |
extendDerivation_hornerp :
p \is a polyOver K -> separable_element K x ->
extendDerivation K p.[x] = (map_poly D p).[x] + p^`().[x] * Dx K.
Proof.
move=> Kp sepKx; have:= separable_root_der; rewrite {}sepKx /= => nz_pKx'x.
rewrite [in RHS](divp_eq p (minPoly K x)) lfunE /= Fadjoin_poly_mod ?raddfD //=.
rewrite (Derivation_mul_poly derD) ?divp_polyOver ?minPolyOver //.
rewrite derivM !{1}hornerD !{1}hornerM minPolyxx !{1}mulr0 !{1}add0r.
rewrite mulrDl addrA [_ + (_ * _ * _)]addrC {2}/Dx -mulrA -/Dx.
by rewrite [_ / _]mulrC (mulVKf nz_pKx'x) mulrN addKr.
Qed. | Lemma | field | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq div",
"From mathcomp Require Import choice fintype tuple finfun bigop finset prime",
"From mathcomp Require Import binomial ssralg poly polydiv fingroup perm",
"From mathcomp Require Import morphism quotient gproduct finalg zmodp cyclic",
"From mathcomp Require Import matrix mxalgebra mxpoly polyXY vector falgebra",
"From mathcomp Require Import fieldext"
] | field/separable.v | extendDerivation_horner | |
extendDerivationP:
separable_element K x -> Derivation <<K; x>> (extendDerivation K).
Proof.
move=> sep; apply/allrelP=> u v /vbasis_mem Hu /vbasis_mem Hv; apply/eqP.
rewrite -(Fadjoin_poly_eq Hu) -(Fadjoin_poly_eq Hv) -hornerM.
rewrite !{1}extendDerivation_horner ?{1}rpredM ?Fadjoin_polyOver //.
rewrite (Derivation_mul_poly derD) ?Fadjoin_polyOver //.
rewrite derivM !{1}hornerD !{1}hornerM !{1}mulrDl !{1}mulrDr -!addrA.
congr (_ + _); rewrite [Dx K]lock -!{1}mulrA !{1}addrA; congr (_ + _).
by rewrite addrC; congr (_ * _ + _); rewrite mulrC.
Qed. | Lemma | field | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq div",
"From mathcomp Require Import choice fintype tuple finfun bigop finset prime",
"From mathcomp Require Import binomial ssralg poly polydiv fingroup perm",
"From mathcomp Require Import morphism quotient gproduct finalg zmodp cyclic",
"From mathcomp Require Import matrix mxalgebra mxpoly polyXY vector falgebra",
"From mathcomp Require Import fieldext"
] | field/separable.v | extendDerivationP | |
Derivation_separableP:
reflect
(forall D, Derivation <<K; x>> D -> K <= lker D -> <<K; x>> <= lker D)%VS
(separable_element K x).
Proof.
apply: (iffP idP) => [sepKx D derD /subvP DK_0 | derKx_0].
have{} DK_0 q: q \is a polyOver K -> map_poly D q = 0.
move=> /polyOverP Kq; apply/polyP=> i; apply/eqP.
by rewrite coef0 coef_map -memv_ker DK_0.
apply/subvP=> _ /Fadjoin_polyP[p Kp ->]; rewrite memv_ker.
rewrite (Derivation_horner derD) ?(polyOverSv sKxK) //.
rewrite (Derivation_separable derD sepKx) !DK_0 ?minPolyOver //.
by rewrite horner0 oppr0 mul0r mulr0 addr0.
apply: wlog_neg; rewrite {1}separable_nz_der negbK => /eqP pKx'_0.
pose Df := fun y => (Fadjoin_poly K x y)^`().[x].
have Dlin: linear Df.
move=> a u v; rewrite /Df linearP /= -mul_polyC derivD derivM derivC.
by rewrite mul0r add0r hornerD hornerM hornerC -scalerAl mul1r.
pose DlinM := GRing.isLinear.Build _ _ _ _ Df Dlin.
pose DL : {linear _ -> _} := HB.pack Df DlinM.
pose D := linfun DL; apply: base_separable.
have DK_0: (K <= lker D)%VS.
apply/subvP=> v Kv; rewrite memv_ker lfunE /= /Df Fadjoin_polyC //.
by rewrite derivC horner0.
have Dder: Derivation <<K; x>> D.
apply/allrelP=> u v /vbasis_mem Kx_u /vbasis_mem Kx_v; apply/eqP.
rewrite !lfunE /= /Df; set Px := Fadjoin_poly K x.
set Px_u := Px u; rewrite -(Fadjoin_poly_eq Kx_u) -/Px -/Px_u.
set Px_v := Px v; rewrite -(Fadjoin_poly_eq Kx_v) -/Px -/Px_v.
rewrite -!hornerM -hornerD -derivM.
rewrite /Px Fadjoin_poly_mod ?rpredM ?Fadjoin_polyOve
... | Lemma | field | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq div",
"From mathcomp Require Import choice fintype tuple finfun bigop finset prime",
"From mathcomp Require Import binomial ssralg poly polydiv fingroup perm",
"From mathcomp Require Import morphism quotient gproduct finalg zmodp cyclic",
"From mathcomp Require Import matrix mxalgebra mxpoly polyXY vector falgebra",
"From mathcomp Require Import fieldext"
] | field/separable.v | Derivation_separableP | |
separablePn:= (separablePn_pchar) (only parsing).
Arguments separable_elementP {K x}. | Notation | field | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq div",
"From mathcomp Require Import choice fintype tuple finfun bigop finset prime",
"From mathcomp Require Import binomial ssralg poly polydiv fingroup perm",
"From mathcomp Require Import morphism quotient gproduct finalg zmodp cyclic",
"From mathcomp Require Import matrix mxalgebra mxpoly polyXY vector falgebra",
"From mathcomp Require Import fieldext"
] | field/separable.v | separablePn | |
separable_elementSK E x :
(K <= E)%VS -> separable_element K x -> separable_element E x.
Proof.
move=> sKE /separable_elementP[f [fK rootf sepf]]; apply/separable_elementP.
by exists f; rewrite (polyOverSv sKE).
Qed. | Lemma | field | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq div",
"From mathcomp Require Import choice fintype tuple finfun bigop finset prime",
"From mathcomp Require Import binomial ssralg poly polydiv fingroup perm",
"From mathcomp Require Import morphism quotient gproduct finalg zmodp cyclic",
"From mathcomp Require Import matrix mxalgebra mxpoly polyXY vector falgebra",
"From mathcomp Require Import fieldext"
] | field/separable.v | separable_elementS | |
adjoin_separableP{K x} :
reflect (forall y, y \in <<K; x>>%VS -> separable_element K y)
(separable_element K x).
Proof.
apply: (iffP idP) => [sepKx | -> //]; last exact: memv_adjoin.
move=> _ /Fadjoin_polyP[q Kq ->]; apply/Derivation_separableP=> D derD DK_0.
apply/subvP=> _ /Fadjoin_polyP[p Kp ->].
rewrite memv_ker -(extendDerivation_id x D (mempx_Fadjoin _ Kp)).
have sepFyx: (separable_element <<K; q.[x]>> x).
by apply: (separable_elementS (subv_adjoin _ _)).
have KyxEqKx: (<< <<K; q.[x]>>; x>> = <<K; x>>)%VS.
apply/eqP; rewrite eqEsubv andbC adjoinSl ?subv_adjoin //=.
apply/FadjoinP/andP; rewrite memv_adjoin andbT.
by apply/FadjoinP/andP; rewrite subv_adjoin mempx_Fadjoin.
have /[!KyxEqKx] derDx := extendDerivationP derD sepFyx.
rewrite -horner_comp (Derivation_horner derDx) ?memv_adjoin //; last first.
by apply: (polyOverSv (subv_adjoin _ _)); apply: polyOver_comp.
set Dx_p := map_poly _; have Dx_p_0 t: t \is a polyOver K -> (Dx_p t).[x] = 0.
move/polyOverP=> Kt; congr (_.[x] = 0): (horner0 x); apply/esym/polyP => i.
have /eqP Dti_0: D t`_i == 0 by rewrite -memv_ker (subvP DK_0) ?Kt.
by rewrite coef0 coef_map /= {1}extendDerivation_id ?subvP_adjoin.
rewrite (Derivation_separable derDx sepKx) -/Dx_p Dx_p_0 ?polyOver_comp //.
by rewrite add0r mulrCA Dx_p_0 ?minPolyOver ?oppr0 ?mul0r.
Qed. | Lemma | field | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq div",
"From mathcomp Require Import choice fintype tuple finfun bigop finset prime",
"From mathcomp Require Import binomial ssralg poly polydiv fingroup perm",
"From mathcomp Require Import morphism quotient gproduct finalg zmodp cyclic",
"From mathcomp Require Import matrix mxalgebra mxpoly polyXY vector falgebra",
"From mathcomp Require Import fieldext"
] | field/separable.v | adjoin_separableP | |
separable_exponent_pcharK x :
exists n, [pchar L].-nat n && separable_element K (x ^+ n).
Proof.
pose d := adjoin_degree K x; move: {2}d.+1 (ltnSn d) => n.
elim: n => // n IHn in x @d *; rewrite ltnS => le_d_n.
have [[p pcharLp]|] := altP (separablePn_pchar K x); last by rewrite negbK; exists 1.
case=> g Kg defKx; have p_pr := pcharf_prime pcharLp.
suffices /IHn[m /andP[pcharLm sepKxpm]]: adjoin_degree K (x ^+ p) < n.
by exists (p * m)%N; rewrite pnatM pnatE // pcharLp pcharLm exprM.
apply: leq_trans le_d_n; rewrite -ltnS -!size_minPoly.
have nzKx: minPoly K x != 0 by rewrite monic_neq0 ?monic_minPoly.
have nzg: g != 0 by apply: contra_eqN defKx => /eqP->; rewrite comp_poly0.
apply: leq_ltn_trans (dvdp_leq nzg _) _.
by rewrite minPoly_dvdp // rootE -hornerXn -horner_comp -defKx minPolyxx.
rewrite (polySpred nzKx) ltnS defKx size_comp_poly size_polyXn /=.
suffices g_gt1: 1 < size g by rewrite -(subnKC g_gt1) ltn_Pmulr ?prime_gt1.
apply: contra_eqT (size_minPoly K x); rewrite defKx -leqNgt => /size1_polyC->.
by rewrite comp_polyC size_polyC; case: (_ != 0).
Qed.
#[deprecated(since="mathcomp 2.4.0", note="Use separable_exponent_pchar instead.")] | Lemma | field | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq div",
"From mathcomp Require Import choice fintype tuple finfun bigop finset prime",
"From mathcomp Require Import binomial ssralg poly polydiv fingroup perm",
"From mathcomp Require Import morphism quotient gproduct finalg zmodp cyclic",
"From mathcomp Require Import matrix mxalgebra mxpoly polyXY vector falgebra",
"From mathcomp Require Import fieldext"
] | field/separable.v | separable_exponent_pchar | |
separable_exponent:= (separable_exponent_pchar) (only parsing). | Notation | field | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq div",
"From mathcomp Require Import choice fintype tuple finfun bigop finset prime",
"From mathcomp Require Import binomial ssralg poly polydiv fingroup perm",
"From mathcomp Require Import morphism quotient gproduct finalg zmodp cyclic",
"From mathcomp Require Import matrix mxalgebra mxpoly polyXY vector falgebra",
"From mathcomp Require Import fieldext"
] | field/separable.v | separable_exponent | |
pcharf0_separableK : [pchar L] =i pred0 -> forall x, separable_element K x.
Proof.
move=> pcharL0 x; have [n /andP[pcharLn]] := separable_exponent_pchar K x.
by rewrite (pnat_1 pcharLn (sub_in_pnat _ pcharLn)) // => p _; rewrite pcharL0.
Qed.
#[deprecated(since="mathcomp 2.4.0", note="Use pcharf0_separable instead.")] | Lemma | field | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq div",
"From mathcomp Require Import choice fintype tuple finfun bigop finset prime",
"From mathcomp Require Import binomial ssralg poly polydiv fingroup perm",
"From mathcomp Require Import morphism quotient gproduct finalg zmodp cyclic",
"From mathcomp Require Import matrix mxalgebra mxpoly polyXY vector falgebra",
"From mathcomp Require Import fieldext"
] | field/separable.v | pcharf0_separable | |
charf0_separable:= (pcharf0_separable) (only parsing). | Notation | field | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq div",
"From mathcomp Require Import choice fintype tuple finfun bigop finset prime",
"From mathcomp Require Import binomial ssralg poly polydiv fingroup perm",
"From mathcomp Require Import morphism quotient gproduct finalg zmodp cyclic",
"From mathcomp Require Import matrix mxalgebra mxpoly polyXY vector falgebra",
"From mathcomp Require Import fieldext"
] | field/separable.v | charf0_separable | |
pcharf_p_separableK x e p :
p \in [pchar L] -> separable_element K x = (x \in <<K; x ^+ (p ^ e.+1)>>%VS).
Proof.
move=> pcharLp; apply/idP/idP=> [sepKx | /Fadjoin_poly_eq]; last first.
set m := p ^ _; set f := Fadjoin_poly K _ x => Dx; apply/separable_elementP.
have mL0: m%:R = 0 :> L by apply/eqP; rewrite -(dvdn_pcharf pcharLp) dvdn_exp.
exists ('X - (f \Po 'X^m)); split.
- by rewrite rpredB ?polyOver_comp ?rpredX ?polyOverX ?Fadjoin_polyOver.
- by rewrite rootE !hornerE horner_comp hornerXn Dx subrr.
rewrite unlock !(derivE, deriv_comp) -mulr_natr -rmorphMn /= mL0.
by rewrite !mulr0 subr0 coprimep1.
without loss{e} ->: e x sepKx / e = 0.
move=> IH; elim: {e}e.+1 => [|e]; [exact: memv_adjoin | apply: subvP].
apply/FadjoinP/andP; rewrite subv_adjoin expnSr exprM (IH 0) //.
by have /adjoin_separableP-> := sepKx; rewrite ?rpredX ?memv_adjoin.
set K' := <<K; x ^+ p>>%VS; have sKK': (K <= K')%VS := subv_adjoin _ _.
pose q := minPoly K' x; pose g := 'X^p - (x ^+ p)%:P.
have [K'g]: g \is a polyOver K' /\ q \is a polyOver K'.
by rewrite minPolyOver rpredB ?rpredX ?polyOverX // polyOverC memv_adjoin.
have /dvdpP[c Dq]: 'X - x%:P %| q by rewrite dvdp_XsubCl root_minPoly.
have co_c_g: coprimep c g.
have pcharPp: p \in [pchar {poly L}] := rmorph_pchar polyC pcharLp.
rewrite /g polyC_exp -!(pFrobenius_autE pcharPp) -rmorphB coprimep_expr //.
have: separable_poly q := separable_elementS sKK' sepKx.
by rewrite Dq separable_mul => /and3P[].
have{g K'g co_c_g} /size_poly1P[a nz
... | Lemma | field | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq div",
"From mathcomp Require Import choice fintype tuple finfun bigop finset prime",
"From mathcomp Require Import binomial ssralg poly polydiv fingroup perm",
"From mathcomp Require Import morphism quotient gproduct finalg zmodp cyclic",
"From mathcomp Require Import matrix mxalgebra mxpoly polyXY vector falgebra",
"From mathcomp Require Import fieldext"
] | field/separable.v | pcharf_p_separable | |
charf_p_separable:= (pcharf_p_separable) (only parsing). | Notation | field | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq div",
"From mathcomp Require Import choice fintype tuple finfun bigop finset prime",
"From mathcomp Require Import binomial ssralg poly polydiv fingroup perm",
"From mathcomp Require Import morphism quotient gproduct finalg zmodp cyclic",
"From mathcomp Require Import matrix mxalgebra mxpoly polyXY vector falgebra",
"From mathcomp Require Import fieldext"
] | field/separable.v | charf_p_separable | |
pcharf_n_separableK x n :
[pchar L].-nat n -> 1 < n -> separable_element K x = (x \in <<K; x ^+ n>>%VS).
Proof.
rewrite -pi_pdiv; set p := pdiv n => pcharLn pi_n_p.
have pcharLp: p \in [pchar L] := pnatPpi pcharLn pi_n_p.
have <-: (n`_p)%N = n by rewrite -(eq_partn n (pcharf_eq pcharLp)) part_pnat_id.
by rewrite p_part lognE -mem_primes pi_n_p -pcharf_p_separable.
Qed.
#[deprecated(since="mathcomp 2.4.0", note="Use pcharf_n_separable instead.")] | Lemma | field | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq div",
"From mathcomp Require Import choice fintype tuple finfun bigop finset prime",
"From mathcomp Require Import binomial ssralg poly polydiv fingroup perm",
"From mathcomp Require Import morphism quotient gproduct finalg zmodp cyclic",
"From mathcomp Require Import matrix mxalgebra mxpoly polyXY vector falgebra",
"From mathcomp Require Import fieldext"
] | field/separable.v | pcharf_n_separable | |
charf_n_separable:= (pcharf_n_separable) (only parsing). | Notation | field | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq div",
"From mathcomp Require Import choice fintype tuple finfun bigop finset prime",
"From mathcomp Require Import binomial ssralg poly polydiv fingroup perm",
"From mathcomp Require Import morphism quotient gproduct finalg zmodp cyclic",
"From mathcomp Require Import matrix mxalgebra mxpoly polyXY vector falgebra",
"From mathcomp Require Import fieldext"
] | field/separable.v | charf_n_separable | |
purely_inseparable_elementU x :=
x ^+ ex_minn (separable_exponent_pchar <<U>> x) \in U. | Definition | field | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq div",
"From mathcomp Require Import choice fintype tuple finfun bigop finset prime",
"From mathcomp Require Import binomial ssralg poly polydiv fingroup perm",
"From mathcomp Require Import morphism quotient gproduct finalg zmodp cyclic",
"From mathcomp Require Import matrix mxalgebra mxpoly polyXY vector falgebra",
"From mathcomp Require Import fieldext"
] | field/separable.v | purely_inseparable_element | |
purely_inseparable_elementP_pchar{K x} :
reflect (exists2 n, [pchar L].-nat n & x ^+ n \in K)
(purely_inseparable_element K x).
Proof.
rewrite /purely_inseparable_element.
case: ex_minnP => n /andP[pcharLn /=]; rewrite subfield_closed => sepKxn min_xn.
apply: (iffP idP) => [Kxn | [m pcharLm Kxm]]; first by exists n.
have{min_xn}: n <= m by rewrite min_xn ?pcharLm ?base_separable.
rewrite leq_eqVlt => /predU1P[-> // | ltnm]; pose p := pdiv m.
have m_gt1: 1 < m by have [/leq_ltn_trans->] := andP pcharLn.
have pcharLp: p \in [pchar L] by rewrite (pnatPpi pcharLm) ?pi_pdiv.
have [/p_natP[em Dm] /p_natP[en Dn]]: p.-nat m /\ p.-nat n.
by rewrite -!(eq_pnat _ (pcharf_eq pcharLp)).
rewrite Dn Dm ltn_exp2l ?prime_gt1 ?pdiv_prime // in ltnm.
rewrite -(Fadjoin_idP Kxm) Dm -(subnKC ltnm) addSnnS expnD exprM -Dn.
by rewrite -pcharf_p_separable.
Qed.
#[deprecated(since="mathcomp 2.4.0", note="Use purely_inseparable_elementP_pchar instead.")] | Lemma | field | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq div",
"From mathcomp Require Import choice fintype tuple finfun bigop finset prime",
"From mathcomp Require Import binomial ssralg poly polydiv fingroup perm",
"From mathcomp Require Import morphism quotient gproduct finalg zmodp cyclic",
"From mathcomp Require Import matrix mxalgebra mxpoly polyXY vector falgebra",
"From mathcomp Require Import fieldext"
] | field/separable.v | purely_inseparable_elementP_pchar | |
purely_inseparable_elementP:= (purely_inseparable_elementP_pchar) (only parsing). | Notation | field | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq div",
"From mathcomp Require Import choice fintype tuple finfun bigop finset prime",
"From mathcomp Require Import binomial ssralg poly polydiv fingroup perm",
"From mathcomp Require Import morphism quotient gproduct finalg zmodp cyclic",
"From mathcomp Require Import matrix mxalgebra mxpoly polyXY vector falgebra",
"From mathcomp Require Import fieldext"
] | field/separable.v | purely_inseparable_elementP | |
separable_inseparable_elementK x :
separable_element K x && purely_inseparable_element K x = (x \in K).
Proof.
rewrite /purely_inseparable_element; case: ex_minnP => [[|m]] //=.
rewrite subfield_closed; case: m => /= [-> //| m _ /(_ 1)/implyP/= insepKx].
by rewrite (negPf insepKx) (contraNF (@base_separable K x) insepKx).
Qed. | Lemma | field | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq div",
"From mathcomp Require Import choice fintype tuple finfun bigop finset prime",
"From mathcomp Require Import binomial ssralg poly polydiv fingroup perm",
"From mathcomp Require Import morphism quotient gproduct finalg zmodp cyclic",
"From mathcomp Require Import matrix mxalgebra mxpoly polyXY vector falgebra",
"From mathcomp Require Import fieldext"
] | field/separable.v | separable_inseparable_element | |
base_inseparableK x : x \in K -> purely_inseparable_element K x.
Proof. by rewrite -separable_inseparable_element => /andP[]. Qed. | Lemma | field | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq div",
"From mathcomp Require Import choice fintype tuple finfun bigop finset prime",
"From mathcomp Require Import binomial ssralg poly polydiv fingroup perm",
"From mathcomp Require Import morphism quotient gproduct finalg zmodp cyclic",
"From mathcomp Require Import matrix mxalgebra mxpoly polyXY vector falgebra",
"From mathcomp Require Import fieldext"
] | field/separable.v | base_inseparable | |
sub_inseparableK E x :
(K <= E)%VS -> purely_inseparable_element K x ->
purely_inseparable_element E x.
Proof.
move/subvP=> sKE /purely_inseparable_elementP_pchar[n pcharLn /sKE Exn].
by apply/purely_inseparable_elementP_pchar; exists n.
Qed. | Lemma | field | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq div",
"From mathcomp Require Import choice fintype tuple finfun bigop finset prime",
"From mathcomp Require Import binomial ssralg poly polydiv fingroup perm",
"From mathcomp Require Import morphism quotient gproduct finalg zmodp cyclic",
"From mathcomp Require Import matrix mxalgebra mxpoly polyXY vector falgebra",
"From mathcomp Require Import fieldext"
] | field/separable.v | sub_inseparable | |
finite_PET: K_is_large \/ exists z, (<< <<K; y>>; x>> = <<K; z>>)%VS.
Proof.
have [-> | /cyclic_or_large[|[a Dxa]]] := eqVneq x 0; first 2 [by left].
by rewrite addv0 subfield_closed; right; exists y.
have [-> | /cyclic_or_large[|[b Dyb]]] := eqVneq y 0; first 2 [by left].
by rewrite addv0 subfield_closed; right; exists x.
pose h0 (ij : 'I_a.+1 * 'I_b.+1) := x ^+ ij.1 * y ^+ ij.2.
pose H := <<[set ij | h0 ij == 1%R]>>%G; pose h (u : coset_of H) := h0 (repr u).
have h0M: {morph h0: ij1 ij2 / (ij1 * ij2)%g >-> ij1 * ij2}.
by rewrite /h0 => [] [i1 j1] [i2 j2] /=; rewrite mulrACA -!exprD !expr_mod.
have memH ij: (ij \in H) = (h0 ij == 1).
rewrite /= gen_set_id ?inE //; apply/group_setP; rewrite inE [h0 _]mulr1.
by split=> // ? ? /[!(inE, h0M)] /eqP-> /eqP->; rewrite mulr1.
have nH ij: ij \in 'N(H)%g.
by apply/(subsetP (cent_sub _))/centP=> ij1 _; congr (_, _); rewrite Zp_mulgC.
have hE ij: h (coset H ij) = h0 ij.
rewrite /h val_coset //; case: repr_rcosetP => ij1.
by rewrite memH h0M => /eqP->; rewrite mul1r.
have h1: h 1%g = 1 by rewrite /h repr_coset1 [h0 _]mulr1.
have hM: {morph h: u v / (u * v)%g >-> u * v}.
by do 2![move=> u; have{u} [? _ ->] := cosetP u]; rewrite -morphM // !hE h0M.
have /cyclicP[w defW]: cyclic [set: coset_of H].
apply: field_mul_group_cyclic (in2W hM) _ => u _; have [ij _ ->] := cosetP u.
by split=> [/eqP | -> //]; rewrite hE -memH => /coset_id.
have Kw_h ij t: h0 ij = t -> t \in <<K; h w>>%VS.
have /cycleP[k Dk]: coset H ij \in <[w]>%g by r
... | Lemma | field | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq div",
"From mathcomp Require Import choice fintype tuple finfun bigop finset prime",
"From mathcomp Require Import binomial ssralg poly polydiv fingroup perm",
"From mathcomp Require Import morphism quotient gproduct finalg zmodp cyclic",
"From mathcomp Require Import matrix mxalgebra mxpoly polyXY vector falgebra",
"From mathcomp Require Import fieldext"
] | field/separable.v | finite_PET | |
Primitive_Element_Theorem: exists z, (<< <<K; y>>; x>> = <<K; z>>)%VS.
Proof.
have /polyOver_subvs[p Dp]: minPoly K x \is a polyOver K := minPolyOver K x.
have nz_pKx: minPoly K x != 0 by rewrite monic_neq0 ?monic_minPoly.
have{nz_pKx} nz_p: p != 0 by rewrite Dp map_poly_eq0 in nz_pKx.
have{Dp} px0: root (map_poly vsval p) x by rewrite -Dp root_minPoly.
have [q0 [Kq0 q0y0 sepKq0]] := separable_elementP sepKy.
have /polyOver_subvs[q Dq]: minPoly K y \is a polyOver K := minPolyOver K y.
have qy0: root (map_poly vsval q) y by rewrite -Dq root_minPoly.
have sep_pKy: separable_poly (minPoly K y).
by rewrite (dvdp_separable _ sepKq0) ?minPoly_dvdp.
have{sep_pKy} sep_q: separable_poly q by rewrite Dq separable_map in sep_pKy.
have [r nz_r PETr] := large_field_PET nz_p px0 qy0 sep_q.
have [[s [Us Ks /ltnW leNs]] | //] := finite_PET (size r).
have{s Us leNs} /allPn[t {}/Ks Kt nz_rt]: ~~ all (root r) s.
by apply: contraTN leNs; rewrite -ltnNge => /max_poly_roots->.
have{PETr} [/= [p1 Dx] [q1 Dy]] := PETr (Subvs Kt) nz_rt.
set z := t * y - x in Dx Dy; exists z; apply/eqP.
rewrite eqEsubv !(sameP FadjoinP andP) subv_adjoin.
have Kz_p1z (r1 : {poly subvs_of K}): (map_poly vsval r1).[z] \in <<K; z>>%VS.
rewrite rpred_horner ?memv_adjoin ?(polyOverSv (subv_adjoin K z)) //.
by apply/polyOver_subvs; exists r1.
rewrite -{1}Dx -{1}Dy !{Dx Dy}Kz_p1z /=.
rewrite (subv_trans (subv_adjoin K y)) ?subv_adjoin // rpredB ?memv_adjoin //.
by rewrite subvP_adjoin // rpredM ?memv_adjoin ?subvP_adjoin.
Qed. | Lemma | field | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq div",
"From mathcomp Require Import choice fintype tuple finfun bigop finset prime",
"From mathcomp Require Import binomial ssralg poly polydiv fingroup perm",
"From mathcomp Require Import morphism quotient gproduct finalg zmodp cyclic",
"From mathcomp Require Import matrix mxalgebra mxpoly polyXY vector falgebra",
"From mathcomp Require Import fieldext"
] | field/separable.v | Primitive_Element_Theorem | |
adjoin_separable: separable_element <<K; y>> x -> separable_element K x.
Proof.
have /Derivation_separableP derKy := sepKy => /Derivation_separableP derKy_x.
have [z defKz] := Primitive_Element_Theorem.
suffices /adjoin_separableP: separable_element K z.
by apply; rewrite -defKz memv_adjoin.
apply/Derivation_separableP=> D; rewrite -defKz => derKxyD DK_0.
suffices derKyD: Derivation <<K; y>>%VS D by rewrite derKy_x // derKy.
by apply: DerivationS derKxyD; apply: subv_adjoin.
Qed. | Lemma | field | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq div",
"From mathcomp Require Import choice fintype tuple finfun bigop finset prime",
"From mathcomp Require Import binomial ssralg poly polydiv fingroup perm",
"From mathcomp Require Import morphism quotient gproduct finalg zmodp cyclic",
"From mathcomp Require Import matrix mxalgebra mxpoly polyXY vector falgebra",
"From mathcomp Require Import fieldext"
] | field/separable.v | adjoin_separable | |
strong_Primitive_Element_TheoremK x y :
separable_element <<K; x>> y ->
exists2 z : L, (<< <<K; y>>; x>> = <<K; z>>)%VS
& separable_element K x -> separable_element K y.
Proof.
move=> sepKx_y; have [n /andP[pcharLn sepKyn]] := separable_exponent_pchar K y.
have adjK_C z t: (<<<<K; z>>; t>> = <<<<K; t>>; z>>)%VS.
by rewrite !agenv_add_id -!addvA (addvC <[_]>%VS).
have [z defKz] := Primitive_Element_Theorem x sepKyn.
exists z => [|/adjoin_separable->]; rewrite ?sepKx_y // -defKz.
have [|n_gt1|-> //] := ltngtP n 1; first by case: (n) pcharLn.
apply/eqP; rewrite !(adjK_C _ x) eqEsubv; apply/andP.
split; apply/FadjoinP/andP; rewrite subv_adjoin ?rpredX ?memv_adjoin //=.
by rewrite -pcharf_n_separable ?sepKx_y.
Qed. | Lemma | field | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq div",
"From mathcomp Require Import choice fintype tuple finfun bigop finset prime",
"From mathcomp Require Import binomial ssralg poly polydiv fingroup perm",
"From mathcomp Require Import morphism quotient gproduct finalg zmodp cyclic",
"From mathcomp Require Import matrix mxalgebra mxpoly polyXY vector falgebra",
"From mathcomp Require Import fieldext"
] | field/separable.v | strong_Primitive_Element_Theorem | |
separableU W : bool :=
all (separable_element U) (vbasis W). | Definition | field | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq div",
"From mathcomp Require Import choice fintype tuple finfun bigop finset prime",
"From mathcomp Require Import binomial ssralg poly polydiv fingroup perm",
"From mathcomp Require Import morphism quotient gproduct finalg zmodp cyclic",
"From mathcomp Require Import matrix mxalgebra mxpoly polyXY vector falgebra",
"From mathcomp Require Import fieldext"
] | field/separable.v | separable |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.