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
eqCmod_addl_mule : {in Num.int, forall x y, x * e + y == y %[mod e]}%C. Proof. by move=> x Zx y; rewrite -{2}[y]add0r eqCmodDr eqCmodMl0. Qed.
Lemma
field
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrbool ssrfun ssrnat eqtype seq choice", "From mathcomp Require Import div fintype path bigop finset prime order ssralg", "From mathcomp Require Import poly polydiv mxpoly generic_quotient countalg", "From mathcomp Require Import ...
field/algC.v
eqCmod_addl_mul
eqCmodMe : {in Num.int & Num.int, forall x1 y2 x2 y1, x1 == x2 %[mod e] -> y1 == y2 %[mod e] -> x1 * y1 == x2 * y2 %[mod e]}%C. Proof. move=> x1 y2 Zx1 Zy2 x2 y1 eq_x /(eqCmodMl Zx1)/eqCmod_trans-> //. exact: eqCmodMr. Qed.
Lemma
field
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrbool ssrfun ssrnat eqtype seq choice", "From mathcomp Require Import div fintype path bigop finset prime order ssralg", "From mathcomp Require Import poly polydiv mxpoly generic_quotient countalg", "From mathcomp Require Import ...
field/algC.v
eqCmodM
ratCK: cancel QtoC CtoQ. Proof. by rewrite /getCrat; case: getCrat_subproof. Qed.
Lemma
field
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrbool ssrfun ssrnat eqtype seq choice", "From mathcomp Require Import div fintype path bigop finset prime order ssralg", "From mathcomp Require Import poly polydiv mxpoly generic_quotient countalg", "From mathcomp Require Import ...
field/algC.v
ratCK
getCratK: {in Crat, cancel CtoQ QtoC}. Proof. by move=> x /eqP. Qed.
Lemma
field
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrbool ssrfun ssrnat eqtype seq choice", "From mathcomp Require Import div fintype path bigop finset prime order ssralg", "From mathcomp Require Import poly polydiv mxpoly generic_quotient countalg", "From mathcomp Require Import ...
field/algC.v
getCratK
Crat_rat(a : rat) : QtoC a \in Crat. Proof. by rewrite unfold_in ratCK. Qed.
Lemma
field
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrbool ssrfun ssrnat eqtype seq choice", "From mathcomp Require Import div fintype path bigop finset prime order ssralg", "From mathcomp Require Import poly polydiv mxpoly generic_quotient countalg", "From mathcomp Require Import ...
field/algC.v
Crat_rat
CratPx : reflect (exists a, x = QtoC a) (x \in Crat). Proof. by apply: (iffP eqP) => [<- | [a ->]]; [exists (CtoQ x) | rewrite ratCK]. Qed.
Lemma
field
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrbool ssrfun ssrnat eqtype seq choice", "From mathcomp Require Import div fintype path bigop finset prime order ssralg", "From mathcomp Require Import poly polydiv mxpoly generic_quotient countalg", "From mathcomp Require Import ...
field/algC.v
CratP
Crat0: 0 \in Crat. Proof. by apply/CratP; exists 0; rewrite rmorph0. Qed.
Lemma
field
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrbool ssrfun ssrnat eqtype seq choice", "From mathcomp Require Import div fintype path bigop finset prime order ssralg", "From mathcomp Require Import poly polydiv mxpoly generic_quotient countalg", "From mathcomp Require Import ...
field/algC.v
Crat0
Crat1: 1 \in Crat. Proof. by apply/CratP; exists 1; rewrite rmorph1. Qed. #[local] Hint Resolve Crat0 Crat1 : core. Fact Crat_divring_closed : divring_closed Crat. Proof. split=> // _ _ /CratP[x ->] /CratP[y ->]. by rewrite -rmorphB Crat_rat. by rewrite -fmorph_div Crat_rat. Qed. HB.instance Definition _ := GRing.isDivringClosed.Build _ Crat Crat_divring_closed.
Lemma
field
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrbool ssrfun ssrnat eqtype seq choice", "From mathcomp Require Import div fintype path bigop finset prime order ssralg", "From mathcomp Require Import poly polydiv mxpoly generic_quotient countalg", "From mathcomp Require Import ...
field/algC.v
Crat1
rpred_Crat(S : divringClosed algC) : {subset Crat <= S}. Proof. by move=> _ /CratP[a ->]; apply: rpred_rat. Qed.
Lemma
field
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrbool ssrfun ssrnat eqtype seq choice", "From mathcomp Require Import div fintype path bigop finset prime order ssralg", "From mathcomp Require Import poly polydiv mxpoly generic_quotient countalg", "From mathcomp Require Import ...
field/algC.v
rpred_Crat
conj_Cratz : z \in Crat -> z^* = z. Proof. by move/getCratK <-; rewrite fmorph_div !rmorph_int. Qed.
Lemma
field
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrbool ssrfun ssrnat eqtype seq choice", "From mathcomp Require Import div fintype path bigop finset prime order ssralg", "From mathcomp Require Import poly polydiv mxpoly generic_quotient countalg", "From mathcomp Require Import ...
field/algC.v
conj_Crat
Creal_Crat: {subset Crat <= Creal}. Proof. by move=> x /conj_Crat/CrealP. Qed.
Lemma
field
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrbool ssrfun ssrnat eqtype seq choice", "From mathcomp Require Import div fintype path bigop finset prime order ssralg", "From mathcomp Require Import poly polydiv mxpoly generic_quotient countalg", "From mathcomp Require Import ...
field/algC.v
Creal_Crat
Cint_rata : (QtoC a \in Num.int) = (a \in Num.int). Proof. apply/idP/idP=> [Za | /numqK <-]; last by rewrite rmorph_int. apply/intrP; exists (Num.floor (QtoC a)); apply: (can_inj ratCK). by rewrite rmorph_int floorK. Qed.
Lemma
field
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrbool ssrfun ssrnat eqtype seq choice", "From mathcomp Require Import div fintype path bigop finset prime order ssralg", "From mathcomp Require Import poly polydiv mxpoly generic_quotient countalg", "From mathcomp Require Import ...
field/algC.v
Cint_rat
minCpolyPx : {p : {poly rat} | minCpoly x = pQtoC p /\ p \is monic & forall q, root (pQtoC q) x = (p %| q)%R}. Proof. by rewrite /minCpoly; case: (minCpoly_subproof x) => p; exists p. Qed.
Lemma
field
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrbool ssrfun ssrnat eqtype seq choice", "From mathcomp Require Import div fintype path bigop finset prime order ssralg", "From mathcomp Require Import poly polydiv mxpoly generic_quotient countalg", "From mathcomp Require Import ...
field/algC.v
minCpolyP
minCpoly_monicx : minCpoly x \is monic. Proof. by have [p [-> mon_p] _] := minCpolyP x; rewrite map_monic. Qed.
Lemma
field
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrbool ssrfun ssrnat eqtype seq choice", "From mathcomp Require Import div fintype path bigop finset prime order ssralg", "From mathcomp Require Import poly polydiv mxpoly generic_quotient countalg", "From mathcomp Require Import ...
field/algC.v
minCpoly_monic
minCpoly_eq0x : (minCpoly x == 0) = false. Proof. exact/negbTE/monic_neq0/minCpoly_monic. Qed.
Lemma
field
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrbool ssrfun ssrnat eqtype seq choice", "From mathcomp Require Import div fintype path bigop finset prime order ssralg", "From mathcomp Require Import poly polydiv mxpoly generic_quotient countalg", "From mathcomp Require Import ...
field/algC.v
minCpoly_eq0
root_minCpolyx : root (minCpoly x) x. Proof. by have [p [-> _] ->] := minCpolyP x. Qed.
Lemma
field
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrbool ssrfun ssrnat eqtype seq choice", "From mathcomp Require Import div fintype path bigop finset prime order ssralg", "From mathcomp Require Import poly polydiv mxpoly generic_quotient countalg", "From mathcomp Require Import ...
field/algC.v
root_minCpoly
size_minCpolyx : (1 < size (minCpoly x))%N. Proof. by apply: root_size_gt1 (root_minCpoly x); rewrite ?minCpoly_eq0. Qed.
Lemma
field
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrbool ssrfun ssrnat eqtype seq choice", "From mathcomp Require Import div fintype path bigop finset prime order ssralg", "From mathcomp Require Import poly polydiv mxpoly generic_quotient countalg", "From mathcomp Require Import ...
field/algC.v
size_minCpoly
aut_Cratnu : {in Crat, nu =1 id}. Proof. by move=> _ /CratP[a ->]; apply: fmorph_rat. Qed.
Lemma
field
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrbool ssrfun ssrnat eqtype seq choice", "From mathcomp Require Import div fintype path bigop finset prime order ssralg", "From mathcomp Require Import poly polydiv mxpoly generic_quotient countalg", "From mathcomp Require Import ...
field/algC.v
aut_Crat
Crat_autnu x : (nu x \in Crat) = (x \in Crat). Proof. apply/idP/idP=> /CratP[a] => [|->]; last by rewrite fmorph_rat Crat_rat. by rewrite -(fmorph_rat nu) => /fmorph_inj->; apply: Crat_rat. Qed.
Lemma
field
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrbool ssrfun ssrnat eqtype seq choice", "From mathcomp Require Import div fintype path bigop finset prime order ssralg", "From mathcomp Require Import poly polydiv mxpoly generic_quotient countalg", "From mathcomp Require Import ...
field/algC.v
Crat_aut
algC_invaut_subproofnu x : {y | nu y = x}. Proof. have [r Dp] := closed_field_poly_normal (minCpoly x). suffices /mapP/sig2_eqW[y _ ->]: x \in map nu r by exists y. rewrite -root_prod_XsubC; congr (root _ x): (root_minCpoly x). have [q [Dq _] _] := minCpolyP x; rewrite Dq -(eq_map_poly (fmorph_rat nu)). rewrite (map_poly_comp nu) -{q}Dq Dp (monicP (minCpoly_monic x)) scale1r. rewrite rmorph_prod big_map /=; apply: eq_bigr => z _. by rewrite rmorphB /= map_polyX map_polyC. Qed.
Lemma
field
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrbool ssrfun ssrnat eqtype seq choice", "From mathcomp Require Import div fintype path bigop finset prime order ssralg", "From mathcomp Require Import poly polydiv mxpoly generic_quotient countalg", "From mathcomp Require Import ...
field/algC.v
algC_invaut_subproof
algC_invautnu x := sval (algC_invaut_subproof nu x).
Definition
field
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrbool ssrfun ssrnat eqtype seq choice", "From mathcomp Require Import div fintype path bigop finset prime order ssralg", "From mathcomp Require Import poly polydiv mxpoly generic_quotient countalg", "From mathcomp Require Import ...
field/algC.v
algC_invaut
algC_invautKnu : cancel (algC_invaut nu) nu. Proof. by move=> x; rewrite /algC_invaut; case: algC_invaut_subproof. Qed.
Lemma
field
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrbool ssrfun ssrnat eqtype seq choice", "From mathcomp Require Import div fintype path bigop finset prime order ssralg", "From mathcomp Require Import poly polydiv mxpoly generic_quotient countalg", "From mathcomp Require Import ...
field/algC.v
algC_invautK
algC_autKnu : cancel nu (algC_invaut nu). Proof. exact: inj_can_sym (algC_invautK nu) (fmorph_inj nu). Qed. Fact algC_invaut_is_zmod_morphism nu : zmod_morphism (algC_invaut nu). Proof. exact: can2_zmod_morphism (algC_autK nu) (algC_invautK nu). Qed. #[warning="-deprecated-since-mathcomp-2.5.0", deprecated(since="mathcomp 2.5.0", note="use `algC_invaut_is_zmod_morphism` instead")]
Lemma
field
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrbool ssrfun ssrnat eqtype seq choice", "From mathcomp Require Import div fintype path bigop finset prime order ssralg", "From mathcomp Require Import poly polydiv mxpoly generic_quotient countalg", "From mathcomp Require Import ...
field/algC.v
algC_autK
algC_invaut_is_additive:= algC_invaut_is_zmod_morphism. Fact algC_invaut_is_monoid_morphism nu : monoid_morphism (algC_invaut nu). Proof. exact: can2_monoid_morphism (algC_autK nu) (algC_invautK nu). Qed. #[warning="-deprecated-since-mathcomp-2.5.0", deprecated(since="mathcomp 2.5.0", note="use `algC_invaut_is_monoid_morphism` instead")]
Definition
field
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrbool ssrfun ssrnat eqtype seq choice", "From mathcomp Require Import div fintype path bigop finset prime order ssralg", "From mathcomp Require Import poly polydiv mxpoly generic_quotient countalg", "From mathcomp Require Import ...
field/algC.v
algC_invaut_is_additive
algC_invaut_is_multiplicativenu := (fun g => (g.2,g.1)) (algC_invaut_is_monoid_morphism nu). HB.instance Definition _ (nu : {rmorphism algC -> algC}) := GRing.isZmodMorphism.Build algC algC (algC_invaut nu) (algC_invaut_is_zmod_morphism nu). HB.instance Definition _ (nu : {rmorphism algC -> algC}) := GRing.isMonoidMorphism.Build algC algC (algC_invaut nu) (algC_invaut_is_monoid_morphism nu).
Definition
field
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrbool ssrfun ssrnat eqtype seq choice", "From mathcomp Require Import div fintype path bigop finset prime order ssralg", "From mathcomp Require Import poly polydiv mxpoly generic_quotient countalg", "From mathcomp Require Import ...
field/algC.v
algC_invaut_is_multiplicative
minCpoly_autnu x : minCpoly (nu x) = minCpoly x. Proof. wlog suffices dvd_nu: nu x / (minCpoly x %| minCpoly (nu x))%R. apply/eqP; rewrite -eqp_monic ?minCpoly_monic //; apply/andP; split=> //. by rewrite -{2}(algC_autK nu x) dvd_nu. have [[q [Dq _] min_q] [q1 [Dq1 _] _]] := (minCpolyP x, minCpolyP (nu x)). rewrite Dq Dq1 dvdp_map -min_q -(fmorph_root nu) -map_poly_comp. by rewrite (eq_map_poly (fmorph_rat nu)) -Dq1 root_minCpoly. Qed.
Lemma
field
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrbool ssrfun ssrnat eqtype seq choice", "From mathcomp Require Import div fintype path bigop finset prime order ssralg", "From mathcomp Require Import poly polydiv mxpoly generic_quotient countalg", "From mathcomp Require Import ...
field/algC.v
minCpoly_aut
Cchar:= (Cpchar) (only parsing). #[global] Hint Resolve Crat0 Crat1 dvdC0 dvdC_refl eqCmod_refl eqCmodm0 : core. Local Notation "p ^^ f" := (map_poly f p) (at level 30, f at level 30, format "p ^^ f").
Notation
field
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrbool ssrfun ssrnat eqtype seq choice", "From mathcomp Require Import div fintype path bigop finset prime order ssralg", "From mathcomp Require Import poly polydiv mxpoly generic_quotient countalg", "From mathcomp Require Import ...
field/algC.v
Cchar
algR:= in_algR {algRval :> algC; algRvalP : algRval \is Creal}. HB.instance Definition _ := [isSub for algRval]. HB.instance Definition _ := [Countable of algR by <:]. HB.instance Definition _ := [SubChoice_isSubIntegralDomain of algR by <:]. HB.instance Definition _ := [SubIntegralDomain_isSubField of algR by <:]. HB.instance Definition _ : Order.isPOrder ring_display algR := Order.CancelPartial.Pcan _ valK.
Record
field
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrbool ssrfun ssrnat eqtype seq choice", "From mathcomp Require Import div fintype path bigop finset prime order ssralg", "From mathcomp Require Import poly polydiv mxpoly generic_quotient countalg", "From mathcomp Require Import ...
field/algC.v
algR
total_algR: total (<=%O : rel (algR : porderType _)). Proof. by move=> x y; apply/real_leVge/valP/valP. Qed. HB.instance Definition _ := Order.POrder_isTotal.Build _ algR total_algR.
Lemma
field
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrbool ssrfun ssrnat eqtype seq choice", "From mathcomp Require Import div fintype path bigop finset prime order ssralg", "From mathcomp Require Import poly polydiv mxpoly generic_quotient countalg", "From mathcomp Require Import ...
field/algC.v
total_algR
algRval_is_zmod_morphism: zmod_morphism algRval. Proof. by []. Qed. #[warning="-deprecated-since-mathcomp-2.5.0", deprecated(since="mathcomp 2.5.0", note="use `algRval_is_zmod_morphism` instead")]
Lemma
field
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrbool ssrfun ssrnat eqtype seq choice", "From mathcomp Require Import div fintype path bigop finset prime order ssralg", "From mathcomp Require Import poly polydiv mxpoly generic_quotient countalg", "From mathcomp Require Import ...
field/algC.v
algRval_is_zmod_morphism
algRval_is_additive:= algRval_is_zmod_morphism.
Definition
field
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrbool ssrfun ssrnat eqtype seq choice", "From mathcomp Require Import div fintype path bigop finset prime order ssralg", "From mathcomp Require Import poly polydiv mxpoly generic_quotient countalg", "From mathcomp Require Import ...
field/algC.v
algRval_is_additive
algRval_is_monoid_morphism: monoid_morphism algRval. Proof. by []. Qed. #[warning="-deprecated-since-mathcomp-2.5.0", deprecated(since="mathcomp 2.5.0", note="use `algRval_is_monoid_morphism` instead")]
Lemma
field
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrbool ssrfun ssrnat eqtype seq choice", "From mathcomp Require Import div fintype path bigop finset prime order ssralg", "From mathcomp Require Import poly polydiv mxpoly generic_quotient countalg", "From mathcomp Require Import ...
field/algC.v
algRval_is_monoid_morphism
algRval_is_multiplicative:= (fun g => (g.2,g.1)) algRval_is_monoid_morphism. HB.instance Definition _ := GRing.isZmodMorphism.Build algR algC algRval algRval_is_zmod_morphism. HB.instance Definition _ := GRing.isMonoidMorphism.Build algR algC algRval algRval_is_monoid_morphism.
Definition
field
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrbool ssrfun ssrnat eqtype seq choice", "From mathcomp Require Import div fintype path bigop finset prime order ssralg", "From mathcomp Require Import poly polydiv mxpoly generic_quotient countalg", "From mathcomp Require Import ...
field/algC.v
algRval_is_multiplicative
algR_norm(x : algR) : algR := in_algR (normr_real (val x)).
Definition
field
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrbool ssrfun ssrnat eqtype seq choice", "From mathcomp Require Import div fintype path bigop finset prime order ssralg", "From mathcomp Require Import poly polydiv mxpoly generic_quotient countalg", "From mathcomp Require Import ...
field/algC.v
algR_norm
algR_ler_normDx y : algR_norm (x + y) <= (algR_norm x + algR_norm y). Proof. exact: ler_normD. Qed.
Lemma
field
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrbool ssrfun ssrnat eqtype seq choice", "From mathcomp Require Import div fintype path bigop finset prime order ssralg", "From mathcomp Require Import poly polydiv mxpoly generic_quotient countalg", "From mathcomp Require Import ...
field/algC.v
algR_ler_normD
algR_normr0_eq0x : algR_norm x = 0 -> x = 0. Proof. by move=> /(congr1 val)/normr0_eq0 ?; apply/val_inj. Qed.
Lemma
field
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrbool ssrfun ssrnat eqtype seq choice", "From mathcomp Require Import div fintype path bigop finset prime order ssralg", "From mathcomp Require Import poly polydiv mxpoly generic_quotient countalg", "From mathcomp Require Import ...
field/algC.v
algR_normr0_eq0
algR_normrMnx n : algR_norm (x *+ n) = algR_norm x *+ n. Proof. by apply/val_inj; rewrite /= !rmorphMn/= normrMn. Qed.
Lemma
field
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrbool ssrfun ssrnat eqtype seq choice", "From mathcomp Require Import div fintype path bigop finset prime order ssralg", "From mathcomp Require Import poly polydiv mxpoly generic_quotient countalg", "From mathcomp Require Import ...
field/algC.v
algR_normrMn
algR_normrNx : algR_norm (- x) = algR_norm x. Proof. by apply/val_inj; apply: normrN. Qed.
Lemma
field
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrbool ssrfun ssrnat eqtype seq choice", "From mathcomp Require Import div fintype path bigop finset prime order ssralg", "From mathcomp Require Import poly polydiv mxpoly generic_quotient countalg", "From mathcomp Require Import ...
field/algC.v
algR_normrN
algR_addr_gt0(x y : algR) : z < x -> z < y -> z < x + y. Proof. exact: addr_gt0. Qed.
Lemma
field
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrbool ssrfun ssrnat eqtype seq choice", "From mathcomp Require Import div fintype path bigop finset prime order ssralg", "From mathcomp Require Import poly polydiv mxpoly generic_quotient countalg", "From mathcomp Require Import ...
field/algC.v
algR_addr_gt0
algR_ger_leVge(x y : algR) : z <= x -> z <= y -> (x <= y) || (y <= x). Proof. exact: ger_leVge. Qed.
Lemma
field
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrbool ssrfun ssrnat eqtype seq choice", "From mathcomp Require Import div fintype path bigop finset prime order ssralg", "From mathcomp Require Import poly polydiv mxpoly generic_quotient countalg", "From mathcomp Require Import ...
field/algC.v
algR_ger_leVge
algR_normrM: {morph algR_norm : x y / x * y}. Proof. by move=> *; apply/val_inj; apply: normrM. Qed.
Lemma
field
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrbool ssrfun ssrnat eqtype seq choice", "From mathcomp Require Import div fintype path bigop finset prime order ssralg", "From mathcomp Require Import poly polydiv mxpoly generic_quotient countalg", "From mathcomp Require Import ...
field/algC.v
algR_normrM
algR_ler_def(x y : algR) : (x <= y) = (algR_norm (y - x) == y - x). Proof. by apply: ler_def. Qed.
Lemma
field
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrbool ssrfun ssrnat eqtype seq choice", "From mathcomp Require Import div fintype path bigop finset prime order ssralg", "From mathcomp Require Import poly polydiv mxpoly generic_quotient countalg", "From mathcomp Require Import ...
field/algC.v
algR_ler_def
Definition_ := Num.Zmodule_isNormed.Build _ algR algR_ler_normD algR_normr0_eq0 algR_normrMn algR_normrN. HB.instance Definition _ := Num.isNumRing.Build algR algR_addr_gt0 algR_ger_leVge algR_normrM algR_ler_def.
HB.instance
field
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrbool ssrfun ssrnat eqtype seq choice", "From mathcomp Require Import div fintype path bigop finset prime order ssralg", "From mathcomp Require Import poly polydiv mxpoly generic_quotient countalg", "From mathcomp Require Import ...
field/algC.v
Definition
algR_archiFieldMixin: Num.archimedean_axiom algR. Proof. move=> /= x; have := real_floorD1_gt (valP `|x|). set n := Num.floor _ + 1 => x_lt. exists (`|(n + 1)%R|%N); apply: (lt_le_trans x_lt _). by rewrite /= rmorphMn/= pmulrn ler_int (le_trans _ (lez_abs _))// lerDl. Qed. HB.instance Definition _ := Num.NumDomain_bounded_isArchimedean.Build algR algR_archiFieldMixin.
Definition
field
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrbool ssrfun ssrnat eqtype seq choice", "From mathcomp Require Import div fintype path bigop finset prime order ssralg", "From mathcomp Require Import poly polydiv mxpoly generic_quotient countalg", "From mathcomp Require Import ...
field/algC.v
algR_archiFieldMixin
algR_pfactor(x : algC) : {poly algR} := if x \is Creal =P true is ReflectT xR then 'X - (in_algR xR)%:P else 'X^2 - (in_algR (Creal_Re x) *+ 2) *: 'X + ((in_algR (normr_real x))^+2)%:P.
Definition
field
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrbool ssrfun ssrnat eqtype seq choice", "From mathcomp Require Import div fintype path bigop finset prime order ssralg", "From mathcomp Require Import poly polydiv mxpoly generic_quotient countalg", "From mathcomp Require Import ...
field/algC.v
algR_pfactor
algC_pfactorx := (algR_pfactor x ^^ algRval).
Notation
field
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrbool ssrfun ssrnat eqtype seq choice", "From mathcomp Require Import div fintype path bigop finset prime order ssralg", "From mathcomp Require Import poly polydiv mxpoly generic_quotient countalg", "From mathcomp Require Import ...
field/algC.v
algC_pfactor
algR_pfactorRE(x : algC) (xR : x \is Creal) : algR_pfactor x = 'X - (in_algR xR)%:P. Proof. rewrite /algR_pfactor; case: eqP xR => //= p1 p2. by rewrite (bool_irrelevance p1 p2). Qed.
Lemma
field
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrbool ssrfun ssrnat eqtype seq choice", "From mathcomp Require Import div fintype path bigop finset prime order ssralg", "From mathcomp Require Import poly polydiv mxpoly generic_quotient countalg", "From mathcomp Require Import ...
field/algC.v
algR_pfactorRE
algC_pfactorRE(x : algC) : x \is Creal -> algC_pfactor x = 'X - x%:P. Proof. by move=> xR; rewrite algR_pfactorRE map_polyXsubC. Qed.
Lemma
field
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrbool ssrfun ssrnat eqtype seq choice", "From mathcomp Require Import div fintype path bigop finset prime order ssralg", "From mathcomp Require Import poly polydiv mxpoly generic_quotient countalg", "From mathcomp Require Import ...
field/algC.v
algC_pfactorRE
algR_pfactorCE(x : algC) : x \isn't Creal -> algR_pfactor x = 'X^2 - (in_algR (Creal_Re x) *+ 2) *: 'X + ((in_algR (normr_real x))^+2)%:P. Proof. by rewrite /algR_pfactor; case: eqP => // p; rewrite p. Qed.
Lemma
field
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrbool ssrfun ssrnat eqtype seq choice", "From mathcomp Require Import div fintype path bigop finset prime order ssralg", "From mathcomp Require Import poly polydiv mxpoly generic_quotient countalg", "From mathcomp Require Import ...
field/algC.v
algR_pfactorCE
algC_pfactorCE(x : algC) : x \isn't Creal -> algC_pfactor x = ('X - x%:P) * ('X - x^*%:P). Proof. move=> xNR; rewrite algR_pfactorCE//=. rewrite rmorphD /= rmorphB/= !map_polyZ !map_polyXn/= map_polyX. rewrite (map_polyC algRval)/=. rewrite mulrBl !mulrBr -!addrA; congr (_ + _). rewrite opprD addrA opprK -opprD -rmorphM/= -normCK; congr (- _ + _). rewrite mulrC !mul_polyC -scalerDl. rewrite [x in RHS]algCrect conjC_rect ?Creal_Re ?Creal_Im//. by rewrite addrACA addNr addr0. Qed.
Lemma
field
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrbool ssrfun ssrnat eqtype seq choice", "From mathcomp Require Import div fintype path bigop finset prime order ssralg", "From mathcomp Require Import poly polydiv mxpoly generic_quotient countalg", "From mathcomp Require Import ...
field/algC.v
algC_pfactorCE
algC_pfactorEx : algC_pfactor x = ('X - x%:P) * ('X - x^*%:P) ^+ (x \isn't Creal). Proof. by have [/algC_pfactorRE|/algC_pfactorCE] := boolP (_ \is _); rewrite ?mulr1. Qed.
Lemma
field
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrbool ssrfun ssrnat eqtype seq choice", "From mathcomp Require Import div fintype path bigop finset prime order ssralg", "From mathcomp Require Import poly polydiv mxpoly generic_quotient countalg", "From mathcomp Require Import ...
field/algC.v
algC_pfactorE
size_algC_pfactorx : size (algC_pfactor x) = (x \isn't Creal).+2. Proof. have [xR|xNR] := boolP (_ \is _); first by rewrite algC_pfactorRE// size_XsubC. by rewrite algC_pfactorCE// size_mul ?size_XsubC ?polyXsubC_eq0. Qed.
Lemma
field
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrbool ssrfun ssrnat eqtype seq choice", "From mathcomp Require Import div fintype path bigop finset prime order ssralg", "From mathcomp Require Import poly polydiv mxpoly generic_quotient countalg", "From mathcomp Require Import ...
field/algC.v
size_algC_pfactor
size_algR_pfactorx : size (algR_pfactor x) = (x \isn't Creal).+2. Proof. by have := size_algC_pfactor x; rewrite size_map_poly. Qed.
Lemma
field
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrbool ssrfun ssrnat eqtype seq choice", "From mathcomp Require Import div fintype path bigop finset prime order ssralg", "From mathcomp Require Import poly polydiv mxpoly generic_quotient countalg", "From mathcomp Require Import ...
field/algC.v
size_algR_pfactor
algC_pfactor_eq0x : (algC_pfactor x == 0) = false. Proof. by rewrite -size_poly_eq0 size_algC_pfactor. Qed.
Lemma
field
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrbool ssrfun ssrnat eqtype seq choice", "From mathcomp Require Import div fintype path bigop finset prime order ssralg", "From mathcomp Require Import poly polydiv mxpoly generic_quotient countalg", "From mathcomp Require Import ...
field/algC.v
algC_pfactor_eq0
algR_pfactor_eq0x : (algR_pfactor x == 0) = false. Proof. by rewrite -size_poly_eq0 size_algR_pfactor. Qed.
Lemma
field
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrbool ssrfun ssrnat eqtype seq choice", "From mathcomp Require Import div fintype path bigop finset prime order ssralg", "From mathcomp Require Import poly polydiv mxpoly generic_quotient countalg", "From mathcomp Require Import ...
field/algC.v
algR_pfactor_eq0
algC_pfactorCgt0x y : x \isn't Creal -> y \is Creal -> (algC_pfactor x).[y] > 0. Proof. move=> xNR yR; rewrite algC_pfactorCE// hornerM !hornerXsubC. rewrite [x]algCrect conjC_rect ?Creal_Re ?Creal_Im// !opprD !addrA opprK. rewrite -subr_sqr exprMn sqrCi mulN1r opprK ltr_wpDl//. - by rewrite real_exprn_even_ge0// ?rpredB// ?Creal_Re. by rewrite real_exprn_even_gt0 ?Creal_Im ?orTb//=; apply/eqP/Creal_ImP. Qed.
Lemma
field
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrbool ssrfun ssrnat eqtype seq choice", "From mathcomp Require Import div fintype path bigop finset prime order ssralg", "From mathcomp Require Import poly polydiv mxpoly generic_quotient countalg", "From mathcomp Require Import ...
field/algC.v
algC_pfactorCgt0
algR_pfactorR_mul_gt0(x a b : algC) : x \is Creal -> a \is Creal -> b \is Creal -> a <= b -> ((algC_pfactor x).[a] * (algC_pfactor x).[b] <= 0) = (a <= x <= b). Proof. move=> xR aR bR ab; rewrite !algC_pfactorRE// !hornerXsubC. have [lt_xa|lt_ax|->]/= := real_ltgtP xR aR; last first. - by rewrite subrr mul0r lexx ab. - by rewrite nmulr_rle0 ?subr_lt0 ?subr_ge0. rewrite pmulr_rle0 ?subr_gt0// subr_le0. by apply: negbTE; rewrite -real_ltNge// (lt_le_trans lt_xa). Qed.
Lemma
field
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrbool ssrfun ssrnat eqtype seq choice", "From mathcomp Require Import div fintype path bigop finset prime order ssralg", "From mathcomp Require Import poly polydiv mxpoly generic_quotient countalg", "From mathcomp Require Import ...
field/algC.v
algR_pfactorR_mul_gt0
monic_algC_pfactorx : algC_pfactor x \is monic. Proof. by rewrite algC_pfactorE rpredM ?rpredX ?monicXsubC. Qed.
Lemma
field
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrbool ssrfun ssrnat eqtype seq choice", "From mathcomp Require Import div fintype path bigop finset prime order ssralg", "From mathcomp Require Import poly polydiv mxpoly generic_quotient countalg", "From mathcomp Require Import ...
field/algC.v
monic_algC_pfactor
monic_algR_pfactorx : algR_pfactor x \is monic. Proof. by have := monic_algC_pfactor x; rewrite map_monic. Qed.
Lemma
field
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrbool ssrfun ssrnat eqtype seq choice", "From mathcomp Require Import div fintype path bigop finset prime order ssralg", "From mathcomp Require Import poly polydiv mxpoly generic_quotient countalg", "From mathcomp Require Import ...
field/algC.v
monic_algR_pfactor
poly_algR_pfactor(p : {poly algR}) : { r : seq algC | p ^^ algRval = val (lead_coef p) *: \prod_(z <- r) algC_pfactor z }. Proof. wlog p_monic : p / p \is monic => [hwlog|]. have [->|pN0] := eqVneq p 0. by exists [::]; rewrite lead_coef0/= rmorph0 scale0r. have [|r] := hwlog ((lead_coef p)^-1 *: p). by rewrite monicE lead_coefZ mulVf ?lead_coef_eq0//. rewrite !lead_coefZ mulVf ?lead_coef_eq0//= scale1r. rewrite map_polyZ/= => /(canRL (scalerKV _))->; first by exists r. by rewrite fmorph_eq0 lead_coef_eq0. suff: {r : seq algC | p ^^ algRval = \prod_(z <- r) algC_pfactor z}. by move=> [r rP]; exists r; rewrite rP (monicP _)// scale1r. have [/= r pr] := closed_field_poly_normal (p ^^ algRval). rewrite (monicP _) ?monic_map ?scale1r// {p_monic} in pr *. have [n] := ubnP (size r). elim: n r => // n IHn [|x r]/= in p pr *. by exists [::]; rewrite pr !big_nil. rewrite ltnS => r_lt. have xJxr : x^* \in x :: r. rewrite -root_prod_XsubC -pr. have /eq_map_poly-> : algRval =1 Num.conj \o algRval. by move=> a /=; rewrite (CrealP (algRvalP _)). by rewrite map_poly_comp mapf_root pr root_prod_XsubC mem_head. have xJr : (x \isn't Creal) ==> (x^* \in r) by rewrite implyNb CrealE. have pxdvdC : algC_pfactor x %| p ^^ algRval. rewrite pr algC_pfactorE big_cons/= dvdp_mul2l ?polyXsubC_eq0//. by case: (_ \is _) xJr; rewrite ?dvd1p// dvdp_XsubCl root_prod_XsubC. pose pr'x := p %/ algR_pfactor x. have [||r'] := IHn (if x \is Creal then r else rem x^* r) pr'x; last 2 first. - ...
Lemma
field
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrbool ssrfun ssrnat eqtype seq choice", "From mathcomp Require Import div fintype path bigop finset prime order ssralg", "From mathcomp Require Import poly polydiv mxpoly generic_quotient countalg", "From mathcomp Require Import ...
field/algC.v
poly_algR_pfactor
algR_rcfMixin: Num.real_closed_axiom algR. Proof. move=> p a b le_ab /andP[pa_le0 pb_ge0]/=. case: ltgtP pa_le0 => //= pa0 _; last first. by exists a; rewrite ?lexx// rootE pa0. case: ltgtP pb_ge0 => //= pb0 _; last first. by exists b; rewrite ?lexx ?andbT// rootE -pb0. have p_neq0 : p != 0 by apply: contraTneq pa0 => ->; rewrite horner0 ltxx. have {pa0 pb0} pab0 : p.[a] * p.[b] < 0 by rewrite pmulr_llt0. wlog p_monic : p p_neq0 pab0 / p \is monic => [hwlog|]. have [|||x axb] := hwlog ((lead_coef p)^-1 *: p). - by rewrite scaler_eq0 invr_eq0 lead_coef_eq0 (negPf p_neq0). - rewrite !hornerE/= -mulrA mulrACA -expr2 pmulr_rlt0//. by rewrite exprn_even_gt0//= invr_eq0 lead_coef_eq0. - by rewrite monicE lead_coefZ mulVf ?lead_coef_eq0 ?eqxx. by rewrite rootZ ?invr_eq0 ?lead_coef_eq0//; exists x. have /= [rs prs] := poly_algR_pfactor p. rewrite (monicP _) ?monic_map// scale1r {p_monic} in prs. pose ab := [pred x | val a <= x <= val b]. have abR : {subset ab <= Creal}. move=> x /andP[+ _]. by rewrite -subr_ge0 => /ger0_real; rewrite rpredBr// algRvalP. wlog : p pab0 {p_neq0 prs} / p ^^ algRval = \prod_(x <- rs | x \in ab) ('X - x%:P) => [hw|]. move: prs; rewrite -!rmorph_prod => /map_poly_inj. rewrite (bigID ab)/=; set q := (X in X * _); set u := (X in _ * X) => pqu. have [||] := hw q; last first. - by move=> x; exists x => //; rewrite pqu rootM q0. - by rewrite rmorph_prod/=; under eq_bigr do rewrite algC_pfactorRE ?abR//. have := pab0; rewrite pqu !hornerM ...
Definition
field
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrbool ssrfun ssrnat eqtype seq choice", "From mathcomp Require Import div fintype path bigop finset prime order ssralg", "From mathcomp Require Import poly polydiv mxpoly generic_quotient countalg", "From mathcomp Require Import ...
field/algC.v
algR_rcfMixin
rat_algebraic_archimedean(C : numFieldType) (QtoC : Qmorphism C) : integralRange QtoC -> Num.archimedean_axiom C. Proof. move=> algC x. without loss x_ge0: x / 0 <= x by rewrite -normr_id; apply. have [-> | nz_x] := eqVneq x 0; first by exists 1; rewrite normr0. have [p mon_p px0] := algC x; exists (\sum_(j < size p) `|numq p`_j|)%N. rewrite ger0_norm // real_ltNge ?rpred_nat ?ger0_real //. apply: contraL px0 => lb_x; rewrite rootE gt_eqF // horner_coef size_map_poly. have x_gt0 k: 0 < x ^+ k by rewrite exprn_gt0 // lt_def nz_x. move: lb_x; rewrite polySpred ?monic_neq0 // !big_ord_recr coef_map /=. rewrite -lead_coefE (monicP mon_p) natrD [QtoC _]rmorph1 mul1r => lb_x. case: _.-1 (lb_x) => [|n]; first by rewrite !big_ord0 !add0r ltr01. rewrite -ltrBlDl add0r -(ler_pM2r (x_gt0 n)) -exprS. apply: lt_le_trans; rewrite mulrDl mul1r ltr_pwDr // -sumrN. rewrite natr_sum mulr_suml ler_sum // => j _. rewrite coef_map /= fmorph_eq_rat (le_trans (real_ler_norm _)) //. by rewrite rpredN rpredM ?rpred_rat ?rpredX // ger0_real. rewrite normrN normrM ler_pM //. rewrite normf_div -!intr_norm -!abszE ler_piMr ?ler0n //. by rewrite invf_le1 ?ler1n ?ltr0n absz_gt0. rewrite normrX ger0_norm ?(ltrW x_gt0) // ler_weXn2l ?leq_ord //. by rewrite (le_trans _ lb_x) // natr1 ler1n. Qed.
Lemma
field
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrbool ssrfun ssrnat eqtype seq choice", "From mathcomp Require Import div fintype path tuple bigop finset prime order", "From mathcomp Require Import ssralg poly polydiv mxpoly countalg closed_field", "From mathcomp Require Impor...
field/algebraics_fundamentals.v
rat_algebraic_archimedean
decidable_embeddingsT T (f : sT -> T) := forall y, decidable (exists x, y = f x).
Definition
field
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrbool ssrfun ssrnat eqtype seq choice", "From mathcomp Require Import div fintype path tuple bigop finset prime order", "From mathcomp Require Import ssralg poly polydiv mxpoly countalg closed_field", "From mathcomp Require Impor...
field/algebraics_fundamentals.v
decidable_embedding
rat_algebraic_decidable(C : fieldType) (QtoC : Qmorphism C) : integralRange QtoC -> decidable_embedding QtoC. Proof. have QtoCinj: injective QtoC by apply: fmorph_inj. pose ZtoQ : int -> rat := intr; pose ZtoC : int -> C := intr. have ZtoQinj: injective ZtoQ by apply: intr_inj. have defZtoC: ZtoC =1 QtoC \o ZtoQ by move=> m; rewrite /= rmorph_int. move=> algC x; have /sig2_eqW[q mon_q qx0] := algC x; pose d := (size q).-1. have [n ub_n]: {n | forall y, root q y -> `|y| < n}. have [n1 ub_n1] := monic_Cauchy_bound mon_q. have /monic_Cauchy_bound[n2 ub_n2]: (-1) ^+ d *: (q \Po - 'X) \is monic. rewrite monicE lead_coefZ lead_coef_comp ?size_polyN ?size_polyX // -/d. by rewrite lead_coefN lead_coefX (monicP mon_q) (mulrC 1) signrMK. exists (Num.max n1 n2) => y; rewrite ltNge ler_normr !leUx rootE. apply: contraL => /orP[]/andP[] => [/ub_n1/gt_eqF->// | _ /ub_n2/gt_eqF]. by rewrite hornerZ horner_comp !hornerE opprK mulf_eq0 signr_eq0 => /= ->. have [p [a nz_a Dq]] := rat_poly_scale q; pose N := Num.bound `|n * a%:~R|. pose xa : seq rat := [seq (m%:R - N%:R) / a%:~R | m <- iota 0 N.*2]. have [/sig2_eqW[y _ ->] | xa'x] := @mapP _ _ QtoC xa x; first by left; exists y. right=> [[y Dx]]; case: xa'x; exists y => //. have{x Dx qx0} qy0: root q y by rewrite Dx fmorph_root in qx0. have /dvdzP[b Da]: (denq y %| a)%Z. have /Gauss_dvdzl <-: coprimez (denq y) (numq y ^+ d). by rewrite coprimez_sym coprimezXl //; apply: coprime_num_den. pose p1 : {poly int} := a *: 'X^d - p. have Dp1: p1 ...
Lemma
field
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrbool ssrfun ssrnat eqtype seq choice", "From mathcomp Require Import div fintype path tuple bigop finset prime order", "From mathcomp Require Import ssralg poly polydiv mxpoly countalg closed_field", "From mathcomp Require Impor...
field/algebraics_fundamentals.v
rat_algebraic_decidable
minPoly_decidable_closure(F : fieldType) (L : closedFieldType) (FtoL : {rmorphism F -> L}) x : decidable_embedding FtoL -> integralOver FtoL x -> {p | [/\ p \is monic, root (p ^ FtoL) x & irreducible_poly p]}. Proof. move=> isF /sig2W[p /monicP mon_p px0]. have [r Dp] := closed_field_poly_normal (p ^ FtoL); pose n := size r. rewrite lead_coef_map {}mon_p rmorph1 scale1r in Dp. pose Fpx q := (q \is a polyOver isF) && root q x. have FpxF q: Fpx (q ^ FtoL) = root (q ^ FtoL) x. by rewrite /Fpx polyOver_poly // => j _; apply/sumboolP; exists q`_j. pose p_ (I : {set 'I_n}) := \prod_(i <- enum I) ('X - (r`_i)%:P). have{px0 Dp} /ex_minset[I /minsetP[/andP[FpI pIx0] minI]]: exists I, Fpx (p_ I). exists setT; suffices ->: p_ setT = p ^ FtoL by rewrite FpxF. by rewrite Dp (big_nth 0) big_mkord /p_ big_enum; apply/eq_bigl => i /[1!inE]. have{p} [p DpI]: {p | p_ I = p ^ FtoL}. exists (p_ I ^ (fun y => if isF y is left Fy then sval (sig_eqW Fy) else 0)). rewrite -map_poly_comp map_poly_id // => y /(allP FpI) /=. by rewrite unfold_in; case: (isF y) => // Fy _; case: (sig_eqW _). have mon_pI: p_ I \is monic by apply: monic_prod_XsubC. have mon_p: p \is monic by rewrite -(map_monic FtoL) -DpI. exists p; rewrite -DpI; split=> //; split=> [|q nCq q_dv_p]. by rewrite -(size_map_poly FtoL) -DpI (root_size_gt1 _ pIx0) ?monic_neq0. rewrite -dvdp_size_eqp //; apply/eqP. without loss mon_q: q nCq q_dv_p / q \is monic. move=> IHq; pose a := lead_coef q; pose q1 := a^-1 *: q. have nz_a: a != 0 by rewrit ...
Lemma
field
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrbool ssrfun ssrnat eqtype seq choice", "From mathcomp Require Import div fintype path tuple bigop finset prime order", "From mathcomp Require Import ssralg poly polydiv mxpoly countalg closed_field", "From mathcomp Require Impor...
field/algebraics_fundamentals.v
minPoly_decidable_closure
alg_integral(F : fieldType) (L : fieldExtType F) : integralRange (in_alg L). Proof. move=> x; have [/polyOver1P[p Dp]] := (minPolyOver 1 x, monic_minPoly 1 x). by rewrite Dp map_monic; exists p; rewrite // -Dp root_minPoly. Qed. Prenex Implicits alg_integral. Arguments map_poly_inj {F R} f [p1 p2].
Lemma
field
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrbool ssrfun ssrnat eqtype seq choice", "From mathcomp Require Import div fintype path tuple bigop finset prime order", "From mathcomp Require Import ssralg poly polydiv mxpoly countalg closed_field", "From mathcomp Require Impor...
field/algebraics_fundamentals.v
alg_integral
Fundamental_Theorem_of_Algebraics: {L : closedFieldType & {conj : {rmorphism L -> L} | involutive conj & ~ conj =1 id}}. Proof. have maxn3 n1 n2 n3: {m | [/\ n1 <= m, n2 <= m & n3 <= m]%N}. by exists (maxn n1 (maxn n2 n3)); apply/and3P; rewrite -!geq_max. have [C [/= QtoC algC]] := countable_algebraic_closure rat. exists C; have [i Di2] := GRing.imaginary_exists C. pose Qfield := fieldExtType rat. pose Cmorph (L : Qfield) := {rmorphism L -> C}. have pcharQ (L : Qfield): [pchar L] =i pred0 := ftrans (pchar_lalg L) (pchar_num _). have sepQ (L : Qfield) (K E : {subfield L}): separable K E. by apply/separableP=> u _; apply: pcharf0_separable. pose genQfield z L := {LtoC : Cmorph L & {u | LtoC u = z & <<1; u>> = fullv}}. have /all_tag[Q /all_tag[ofQ genQz]] z: {Qz : Qfield & genQfield z Qz}. have [|p [/monic_neq0 nzp pz0 irr_p]] := minPoly_decidable_closure _ (algC z). exact: rat_algebraic_decidable. pose Qz := SubFieldExtType pz0 irr_p. pose QzC : {rmorphism _ -> _} := @subfx_inj _ _ QtoC z p. exists Qz, QzC, (subfx_root QtoC z p); first exact: subfx_inj_root. apply/vspaceP=> u; rewrite memvf; apply/Fadjoin1_polyP. by have [q] := subfxEroot pz0 nzp u; exists q. have pQof z p: p^@ ^ ofQ z = p ^ QtoC. by rewrite -map_poly_comp; apply: eq_map_poly => x; rewrite !fmorph_eq_rat. have pQof2 z p u: ofQ z p^@.[u] = (p ^ QtoC).[ofQ z u]. by rewrite -horner_map pQof. have PET_Qz z (E : {subfield Q z}): {u | <<1; u>> = E}. exists (separable_generator 1 E). by rewrite -eq_adjoin_separable ...
Theorem
field
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrbool ssrfun ssrnat eqtype seq choice", "From mathcomp Require Import div fintype path tuple bigop finset prime order", "From mathcomp Require Import ssralg poly polydiv mxpoly countalg closed_field", "From mathcomp Require Impor...
field/algebraics_fundamentals.v
Fundamental_Theorem_of_Algebraics
alg_num_field(Qz : fieldExtType rat) a : a%:A = ratr a :> Qz. Proof. by rewrite -in_algE fmorph_eq_rat. Qed.
Lemma
field
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq path", "From mathcomp Require Import div choice fintype tuple finfun bigop prime", "From mathcomp Require Import ssralg poly polydiv ssrnum ssrint archimedean rat", "From mathcomp Require Import fin...
field/algnum.v
alg_num_field
rmorphZ_num(Qz : fieldExtType rat) rR (f : {rmorphism Qz -> rR}) a x : f (a *: x) = ratr a * f x. Proof. by rewrite -mulr_algl rmorphM alg_num_field fmorph_rat. Qed.
Lemma
field
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq path", "From mathcomp Require Import div choice fintype tuple finfun bigop prime", "From mathcomp Require Import ssralg poly polydiv ssrnum ssrint archimedean rat", "From mathcomp Require Import fin...
field/algnum.v
rmorphZ_num
fmorph_numZ(Qz1 Qz2 : fieldExtType rat) (f : {rmorphism Qz1 -> Qz2}) : scalable f. Proof. by move=> a x; rewrite rmorphZ_num -alg_num_field mulr_algl. Qed.
Lemma
field
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq path", "From mathcomp Require Import div choice fintype tuple finfun bigop prime", "From mathcomp Require Import ssralg poly polydiv ssrnum ssrint archimedean rat", "From mathcomp Require Import fin...
field/algnum.v
fmorph_numZ
algC_PET(s : seq algC) : {z | exists a : nat ^ size s, z = \sum_(i < size s) s`_i *+ a i & exists ps, s = [seq (pQtoC p).[z] | p <- ps]}. Proof. elim: s => [|x s [z /sig_eqW[a Dz] /sig_eqW[ps Ds]]]. by exists 0; [exists [ffun _ => 2%N]; rewrite big_ord0 | exists nil]. have r_exists (y : algC): {r | r != 0 & root (pQtoC r) y}. have [r [_ mon_r] dv_r] := minCpolyP y. by exists r; rewrite ?monic_neq0 ?dv_r. suffices /sig_eqW[[n [|px [|pz []]]]// [Dpx Dpz]]: exists np, let zn := x *+ np.1 + z in [:: x; z] = [seq (pQtoC p).[zn] | p <- np.2]. - exists (x *+ n + z). exists [ffun i => oapp a n (unlift ord0 i)]. rewrite /= big_ord_recl ffunE unlift_none Dz; congr (_ + _). by apply: eq_bigr => i _; rewrite ffunE liftK. exists (px :: [seq p \Po pz | p <- ps]); rewrite /= -Dpx; congr (_ :: _). rewrite -map_comp Ds; apply: eq_map => p /=. by rewrite map_comp_poly horner_comp -Dpz. have [rx nz_rx rx0] := r_exists x. have [rz nz_rz rz0] := r_exists (- z). have pchar0_Q: [pchar rat] =i pred0 by apply: pchar_num. have [n [[pz Dpz] [px Dpx]]] := pchar0_PET nz_rz rz0 nz_rx rx0 pchar0_Q. by exists (n, [:: px; - pz]); rewrite /= !raddfN hornerN -[z]opprK Dpz Dpx. Qed.
Lemma
field
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq path", "From mathcomp Require Import div choice fintype tuple finfun bigop prime", "From mathcomp Require Import ssralg poly polydiv ssrnum ssrint archimedean rat", "From mathcomp Require Import fin...
field/algnum.v
algC_PET
num_field_exists(s : seq algC) : {Qs : fieldExtType rat & {QsC : {rmorphism Qs -> algC} & {s1 : seq Qs | map QsC s1 = s & <<1 & s1>>%VS = fullv}}}. Proof. have [z /sig_eqW[a Dz] /sig_eqW[ps Ds]] := algC_PET s. suffices [Qs [QsC [z1 z1C z1gen]]]: {Qs : fieldExtType rat & {QsC : {rmorphism Qs -> algC} & {z1 : Qs | QsC z1 = z & forall xx, exists p, fieldExt_horner z1 p = xx}}}. - set inQs := fieldExt_horner z1 in z1gen *; pose s1 := map inQs ps. have inQsK p: QsC (inQs p) = (pQtoC p).[z]. rewrite /= -horner_map z1C -map_poly_comp; congr _.[z]. by apply: eq_map_poly => b /=; rewrite alg_num_field fmorph_rat. exists Qs, QsC, s1; first by rewrite -map_comp Ds (eq_map inQsK). have sz_ps: size ps = size s by rewrite Ds size_map. apply/vspaceP=> x; rewrite memvf; have [p {x}<-] := z1gen x. elim/poly_ind: p => [|p b ApQs]; first by rewrite /inQs rmorph0 mem0v. rewrite /inQs rmorphD rmorphM /= fieldExt_hornerX fieldExt_hornerC -/inQs /=. suffices ->: z1 = \sum_(i < size s) s1`_i *+ a i. rewrite memvD ?memvZ ?mem1v ?memvM ?memv_suml // => i _. by rewrite rpredMn ?seqv_sub_adjoin ?mem_nth // size_map sz_ps. apply: (fmorph_inj QsC); rewrite z1C Dz rmorph_sum; apply: eq_bigr => i _. by rewrite rmorphMn {1}Ds !(nth_map 0) ?sz_ps //= inQsK. have [r [Dr /monic_neq0 nz_r] dv_r] := minCpolyP z. have rz0: root (pQtoC r) z by rewrite dv_r. have irr_r: irreducible_poly r. by apply/(subfx_irreducibleP rz0 nz_r)=> q qz0 nzq; rewrite dvdp_leq // -dv_r. exists (SubFieldE ...
Lemma
field
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq path", "From mathcomp Require Import div choice fintype tuple finfun bigop prime", "From mathcomp Require Import ssralg poly polydiv ssrnum ssrint archimedean rat", "From mathcomp Require Import fin...
field/algnum.v
num_field_exists
in_Crat_spans x := exists a : rat ^ size s, x = \sum_i QtoC (a i) * s`_i. Fact Crat_span_subproof s x : decidable (in_Crat_span s x). Proof. have [Qxs [QxsC [[|x1 s1] // [<- <-] {x s} _]]] := num_field_exists (x :: s). apply: decP (x1 \in <<in_tuple s1>>%VS) _; rewrite /in_Crat_span size_map. apply: (iffP idP) => [/coord_span-> | [a Dx]]. move: (coord _) => a; exists [ffun i => a i x1]; rewrite rmorph_sum /=. by apply: eq_bigr => i _; rewrite ffunE rmorphZ_num (nth_map 0). have{Dx} ->: x1 = \sum_i a i *: s1`_i. apply: (fmorph_inj QxsC); rewrite Dx rmorph_sum /=. by apply: eq_bigr => i _; rewrite rmorphZ_num (nth_map 0). by apply: memv_suml => i _; rewrite memvZ ?memv_span ?mem_nth. Qed.
Definition
field
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq path", "From mathcomp Require Import div choice fintype tuple finfun bigop prime", "From mathcomp Require Import ssralg poly polydiv ssrnum ssrint archimedean rat", "From mathcomp Require Import fin...
field/algnum.v
in_Crat_span
Crat_spans : pred algC := Crat_span_subproof s.
Definition
field
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq path", "From mathcomp Require Import div choice fintype tuple finfun bigop prime", "From mathcomp Require Import ssralg poly polydiv ssrnum ssrint archimedean rat", "From mathcomp Require Import fin...
field/algnum.v
Crat_span
Crat_spanPs x : reflect (in_Crat_span s x) (x \in Crat_span s). Proof. exact: sumboolP. Qed.
Lemma
field
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq path", "From mathcomp Require Import div choice fintype tuple finfun bigop prime", "From mathcomp Require Import ssralg poly polydiv ssrnum ssrint archimedean rat", "From mathcomp Require Import fin...
field/algnum.v
Crat_spanP
mem_Crat_spans : {subset s <= Crat_span s}. Proof. move=> _ /(nthP 0)[ix ltxs <-]; pose i0 := Ordinal ltxs. apply/Crat_spanP; exists [ffun i => (i == i0)%:R]. rewrite (bigD1_ord i0) //= ffunE eqxx // rmorph1 mul1r. by rewrite big1 ?addr0 // => i; rewrite ffunE rmorph_nat mulr_natl lift_eqF. Qed. Fact Crat_span_zmod_closed s : zmod_closed (Crat_span s). Proof. split=> [|_ _ /Crat_spanP[x ->] /Crat_spanP[y ->]]. apply/Crat_spanP; exists 0. by apply/esym/big1=> i _; rewrite ffunE rmorph0 mul0r. apply/Crat_spanP; exists (x - y); rewrite -sumrB; apply: eq_bigr => i _. by rewrite -mulrBl -rmorphB !ffunE. Qed. HB.instance Definition _ s := GRing.isZmodClosed.Build _ (Crat_span s) (Crat_span_zmod_closed s).
Lemma
field
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq path", "From mathcomp Require Import div choice fintype tuple finfun bigop prime", "From mathcomp Require Import ssralg poly polydiv ssrnum ssrint archimedean rat", "From mathcomp Require Import fin...
field/algnum.v
mem_Crat_span
Crat_spanZb a : {in Crat_span b, forall x, ratr a * x \in Crat_span b}. Proof. move=> _ /Crat_spanP[a1 ->]; apply/Crat_spanP; exists [ffun i => a * a1 i]. by rewrite mulr_sumr; apply: eq_bigr => i _; rewrite ffunE mulrA -rmorphM. Qed.
Lemma
field
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq path", "From mathcomp Require Import div choice fintype tuple finfun bigop prime", "From mathcomp Require Import ssralg poly polydiv ssrnum ssrint archimedean rat", "From mathcomp Require Import fin...
field/algnum.v
Crat_spanZ
Crat_spanMb : {in Crat & Crat_span b, forall a x, a * x \in Crat_span b}. Proof. by move=> _ x /CratP[a ->]; apply: Crat_spanZ. Qed.
Lemma
field
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq path", "From mathcomp Require Import div choice fintype tuple finfun bigop prime", "From mathcomp Require Import ssralg poly polydiv ssrnum ssrint archimedean rat", "From mathcomp Require Import fin...
field/algnum.v
Crat_spanM
num_field_proj: {CtoQn | CtoQn 0 = 0 & cancel QnC CtoQn}. Proof. pose b := vbasis {:Qn}. have Qn_bC (u : {x | x \in Crat_span (map QnC b)}): {y | QnC y = sval u}. case: u => _ /= /Crat_spanP/sig_eqW[a ->]. exists (\sum_i a i *: b`_i); rewrite rmorph_sum /=; apply: eq_bigr => i _. by rewrite rmorphZ_num (nth_map 0) // -(size_map QnC). pose CtoQn x := oapp (fun u => sval (Qn_bC u)) 0 (insub x). suffices QnCK: cancel QnC CtoQn by exists CtoQn; rewrite // -(rmorph0 QnC) /=. move=> x; rewrite /CtoQn insubT => /= [|Qn_x]; last first. by case: (Qn_bC _) => x1 /= /fmorph_inj. rewrite (coord_vbasis (memvf x)) rmorph_sum rpred_sum //= => i _. rewrite rmorphZ_num Crat_spanZ ?mem_Crat_span // -/b. by rewrite -tnth_nth -tnth_map mem_tnth. Qed.
Lemma
field
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq path", "From mathcomp Require Import div choice fintype tuple finfun bigop prime", "From mathcomp Require Import ssralg poly polydiv ssrnum ssrint archimedean rat", "From mathcomp Require Import fin...
field/algnum.v
num_field_proj
restrict_aut_to_num_field(nu : {rmorphism algC -> algC}) : (forall x, exists y, nu (QnC x) = QnC y) -> {nu0 : {lrmorphism Qn -> Qn} | {morph QnC : x / nu0 x >-> nu x}}. Proof. move=> Qn_nu; pose nu0 x := sval (sig_eqW (Qn_nu x)). have QnC_nu0: {morph QnC : x / nu0 x >-> nu x}. by rewrite /nu0 => x; case: (sig_eqW _). have nu0a : zmod_morphism nu0. by move=> x y; apply: (fmorph_inj QnC); rewrite !(QnC_nu0, rmorphB). have nu0m : monoid_morphism nu0. split=> [|x y]; apply: (fmorph_inj QnC); rewrite ?QnC_nu0 ?rmorph1 //. by rewrite !rmorphM /= !QnC_nu0. pose nu0aM := GRing.isZmodMorphism.Build Qn Qn nu0 nu0a. pose nu0mM := GRing.isMonoidMorphism.Build Qn Qn nu0 nu0m. pose nu0RM : {rmorphism _ -> _} := HB.pack nu0 nu0aM nu0mM. pose nu0lM := GRing.isScalable.Build rat Qn Qn *:%R nu0 (fmorph_numZ nu0RM). pose nu0LRM : {lrmorphism _ -> _} := HB.pack nu0 nu0aM nu0mM nu0lM. by exists nu0LRM. Qed.
Lemma
field
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq path", "From mathcomp Require Import div choice fintype tuple finfun bigop prime", "From mathcomp Require Import ssralg poly polydiv ssrnum ssrint archimedean rat", "From mathcomp Require Import fin...
field/algnum.v
restrict_aut_to_num_field
map_Qnum_poly(nu : {rmorphism algC -> algC}) p : p \in polyOver 1%VS -> map_poly (nu \o QnC) p = (map_poly QnC p). Proof. move=> Qp; apply/polyP=> i; rewrite /= !coef_map /=. have /vlineP[a ->]: p`_i \in 1%VS by apply: polyOverP. by rewrite alg_num_field !fmorph_rat. Qed.
Lemma
field
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq path", "From mathcomp Require Import div choice fintype tuple finfun bigop prime", "From mathcomp Require Import ssralg poly polydiv ssrnum ssrint archimedean rat", "From mathcomp Require Import fin...
field/algnum.v
map_Qnum_poly
restrict_aut_to_normal_num_field(Qn : splittingFieldType rat) (QnC : {rmorphism Qn -> algC})(nu : {rmorphism algC -> algC}) : {nu0 : {lrmorphism Qn -> Qn} | {morph QnC : x / nu0 x >-> nu x}}. Proof. apply: restrict_aut_to_num_field => x. case: (splitting_field_normal 1%AS x) => rs /eqP Hrs. have: root (map_poly (nu \o QnC) (minPoly 1%AS x)) (nu (QnC x)). by rewrite fmorph_root root_minPoly. rewrite map_Qnum_poly ?minPolyOver // Hrs. rewrite [map_poly _ _](_:_ = \prod_(y <- map QnC rs) ('X - y%:P)). by rewrite root_prod_XsubC; case/mapP => y _ ?; exists y. by rewrite big_map rmorph_prod /=; apply: eq_bigr => i _; rewrite map_polyXsubC. Qed.
Lemma
field
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq path", "From mathcomp Require Import div choice fintype tuple finfun bigop prime", "From mathcomp Require Import ssralg poly polydiv ssrnum ssrint archimedean rat", "From mathcomp Require Import fin...
field/algnum.v
restrict_aut_to_normal_num_field
dec_Cint_span(V : vectType algC) m (s : m.-tuple V) v : decidable (inIntSpan s v). Proof. have s_s (i : 'I_m): s`_i \in <<s>>%VS by rewrite memv_span ?memt_nth. have s_Zs a: \sum_(i < m) s`_i *~ a i \in <<s>>%VS. by rewrite memv_suml // => i _; rewrite -scaler_int memvZ. case s_v: (v \in <<s>>%VS); last by right=> [[a Dv]]; rewrite Dv s_Zs in s_v. pose IzT := {: 'I_m * 'I_(\dim <<s>>)}; pose Iz := 'I_#|IzT|. pose b := vbasis <<s>>. pose z_s := [seq coord b ij.2 (tnth s ij.1) | ij : IzT]. pose rank2 j i: Iz := enum_rank (i, j); pose val21 (p : Iz) := (enum_val p).1. pose inQzs w := [forall j, Crat_span z_s (coord b j w)]. have enum_pairK j: {in predT, cancel (rank2 j) val21}. by move=> i; rewrite /val21 enum_rankK. have Qz_Zs a: inQzs (\sum_(i < m) s`_i *~ a i). apply/forallP=> j; apply/Crat_spanP; rewrite /in_Crat_span size_map -cardE. exists [ffun ij => (a (val21 ij))%:Q *+ ((enum_val ij).2 == j)]. rewrite linear_sum {1}(reindex_onto _ _ (enum_pairK j)) big_mkcond /=. apply: eq_bigr => ij _ /=; rewrite nth_image (tnth_nth 0) ffunE /val21. rewrite raddfMz rmorphMn rmorph_int mulrnAl mulrzl /=. rewrite (can2_eq (@enum_rankK _) (@enum_valK _)). by case: (enum_val ij) => i j1; rewrite xpair_eqE eqxx; have [->|] := eqVneq. case Qz_v: (inQzs v); last by right=> [[a Dv]]; rewrite Dv Qz_Zs in Qz_v. have [Qz [QzC [z1s Dz_s _]]] := num_field_exists z_s. have sz_z1s: size z1s = #|IzT| by rewrite -(size_map QzC) Dz_s size_map cardE. have xv j: {x | coord b j v = QzC x}. apply: ...
Lemma
field
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq path", "From mathcomp Require Import div choice fintype tuple finfun bigop prime", "From mathcomp Require Import ssralg poly polydiv ssrnum ssrint archimedean rat", "From mathcomp Require Import fin...
field/algnum.v
dec_Cint_span
Cint_span(s : seq algC) : pred algC := fun x => dec_Cint_span (in_tuple [seq \row_(i < 1) y | y <- s]) (\row_i x).
Definition
field
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq path", "From mathcomp Require Import div choice fintype tuple finfun bigop prime", "From mathcomp Require Import ssralg poly polydiv ssrnum ssrint archimedean rat", "From mathcomp Require Import fin...
field/algnum.v
Cint_span
Cint_spanPn (s : n.-tuple algC) x : reflect (inIntSpan s x) (x \in Cint_span s). Proof. rewrite unfold_in; case: (dec_Cint_span _ _) => [Zs_x | Zs'x] /=. left; have{Zs_x} [] := Zs_x; rewrite /= size_map size_tuple => a /rowP/(_ 0). rewrite !mxE => ->; exists a; rewrite summxE; apply: eq_bigr => i _. by rewrite -scaler_int (nth_map 0) ?size_tuple // !mxE mulrzl. right=> [[a Dx]]; have{Zs'x} [] := Zs'x. rewrite /inIntSpan /= size_map size_tuple; exists a. apply/rowP=> i0; rewrite !mxE summxE Dx; apply: eq_bigr => i _. by rewrite -scaler_int mxE mulrzl (nth_map 0) ?size_tuple // !mxE. Qed.
Lemma
field
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq path", "From mathcomp Require Import div choice fintype tuple finfun bigop prime", "From mathcomp Require Import ssralg poly polydiv ssrnum ssrint archimedean rat", "From mathcomp Require Import fin...
field/algnum.v
Cint_spanP
mem_Cint_spans : {subset s <= Cint_span s}. Proof. move=> _ /(nthP 0)[ix ltxs <-]; apply/(Cint_spanP (in_tuple s)). exists [ffun i => i == Ordinal ltxs : int]. rewrite (bigD1 (Ordinal ltxs)) //= ffunE eqxx. by rewrite big1 ?addr0 // => i; rewrite ffunE => /negbTE->. Qed.
Lemma
field
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq path", "From mathcomp Require Import div choice fintype tuple finfun bigop prime", "From mathcomp Require Import ssralg poly polydiv ssrnum ssrint archimedean rat", "From mathcomp Require Import fin...
field/algnum.v
mem_Cint_span
Cint_span_zmod_closeds : zmod_closed (Cint_span s). Proof. have sP := Cint_spanP (in_tuple s); split=> [|_ _ /sP[x ->] /sP[y ->]]. by apply/sP; exists 0; rewrite big1 // => i; rewrite ffunE. apply/sP; exists (x - y); rewrite -sumrB; apply: eq_bigr => i _. by rewrite !ffunE raddfB. Qed. HB.instance Definition _ s := GRing.isZmodClosed.Build _ (Cint_span s) (Cint_span_zmod_closed s).
Lemma
field
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq path", "From mathcomp Require Import div choice fintype tuple finfun bigop prime", "From mathcomp Require Import ssralg poly polydiv ssrnum ssrint archimedean rat", "From mathcomp Require Import fin...
field/algnum.v
Cint_span_zmod_closed
extend_algC_subfield_aut(Qs : fieldExtType rat) (QsC : {rmorphism Qs -> algC}) (phi : {rmorphism Qs -> Qs}) : {nu : {rmorphism algC -> algC} | {morph QsC : x / phi x >-> nu x}}. Proof. pose numF_inj (Qr : fieldExtType rat) := {rmorphism Qr -> algC}. pose subAut := {Qr : _ & numF_inj Qr * {lrmorphism Qr -> Qr}}%type. pose SubAut := existT _ _ (_, _) : subAut. pose Sdom (mu : subAut) := projT1 mu. pose Sinj (mu : subAut) : {rmorphism Sdom mu -> algC} := (projT2 mu).1. pose Saut (mu : subAut) : {rmorphism Sdom mu -> Sdom mu} := (projT2 mu).2. have Sinj_poly Qr (QrC : numF_inj Qr) p: map_poly QrC (map_poly (in_alg Qr) p) = pQtoC p. - rewrite -map_poly_comp; apply: eq_map_poly => a. by rewrite /= rmorphZ_num rmorph1 mulr1. have ext1 mu0 x : {mu1 | exists y, x = Sinj mu1 y & exists2 in01 : {lrmorphism _ -> _}, Sinj mu0 =1 Sinj mu1 \o in01 & {morph in01: y / Saut mu0 y >-> Saut mu1 y}}. - pose b0 := vbasis {:Sdom mu0}. have [z _ /sig_eqW[[|px ps] // [Dx Ds]]] := algC_PET (x :: map (Sinj mu0) b0). have [p [_ mon_p] /(_ p) pz0] := minCpolyP z; rewrite dvdpp in pz0. have [r Dr] := closed_field_poly_normal (pQtoC p : {poly algC}). rewrite lead_coef_map {mon_p}(monicP mon_p) rmorph1 scale1r in Dr. have{pz0} rz: z \in r by rewrite -root_prod_XsubC -Dr. have [Qr [QrC [rr Drr genQr]]] := num_field_exists r. have{rz} [zz Dz]: {zz | QrC zz = z}. by move: rz; rewrite -Drr => /mapP/sig2_eqW[zz]; exists zz. have{ps Ds} [in01 Din01]: {in01 : {lrmorphism _ -> _} | Sinj mu0 =1 QrC \o ...
Lemma
field
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq path", "From mathcomp Require Import div choice fintype tuple finfun bigop prime", "From mathcomp Require Import ssralg poly polydiv ssrnum ssrint archimedean rat", "From mathcomp Require Import fin...
field/algnum.v
extend_algC_subfield_aut
Qn_aut_existsk n : coprime k n -> {u : {rmorphism algC -> algC} | forall z, z ^+ n = 1 -> u z = z ^+ k}. Proof. have [-> /eqnP | n_gt0 co_k_n] := posnP n. by rewrite gcdn0 => ->; exists idfun. have [z prim_z] := C_prim_root_exists n_gt0. have [Qn [QnC [[|zn []] // [Dz]]] genQn] := num_field_exists [:: z]. pose phi := kHomExtend 1 \1 zn (zn ^+ k). have homQn1: kHom 1 1 (\1%VF : 'End(Qn)) by rewrite kHom1. have pzn_zk0: root (map_poly \1%VF (minPoly 1 zn)) (zn ^+ k). rewrite -(fmorph_root QnC) rmorphXn /= Dz -map_poly_comp. rewrite (@eq_map_poly _ _ _ QnC) => [|a]; last by rewrite /= id_lfunE. set p1 := map_poly _ _. have [q1 Dp1]: exists q1, p1 = pQtoC q1. have aP i: (minPoly 1 zn)`_i \in 1%VS. by apply/polyOverP; apply: minPolyOver. have{aP} a_ i := sig_eqW (vlineP _ _ (aP i)). exists (\poly_(i < size (minPoly 1 zn)) sval (a_ i)). apply/polyP=> i; rewrite coef_poly coef_map coef_poly /=. case: ifP => _; rewrite ?rmorph0 //; case: (a_ i) => a /= ->. by rewrite alg_num_field fmorph_rat. have: root p1 z by rewrite -Dz fmorph_root root_minPoly. rewrite Dp1; have [q2 [Dq2 _] ->] := minCpolyP z. case/dvdpP=> r1 ->; rewrite rmorphM rootM /= -Dq2; apply/orP; right. rewrite (minCpoly_cyclotomic prim_z) /cyclotomic. rewrite (bigD1 (Ordinal (ltn_pmod k n_gt0))) ?coprime_modl //=. by rewrite rootM root_XsubC prim_expr_mod ?eqxx. have phim : monoid_morphism phi. by apply/kHom_monoid_morphism; rewrite -genQn span_seq1 /= kHomExtendP. pose phim ...
Lemma
field
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq path", "From mathcomp Require Import div choice fintype tuple finfun bigop prime", "From mathcomp Require Import ssralg poly polydiv ssrnum ssrint archimedean rat", "From mathcomp Require Import fin...
field/algnum.v
Qn_aut_exists
Aint: {pred algC} := fun x => minCpoly x \is a polyOver Num.int.
Definition
field
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq path", "From mathcomp Require Import div choice fintype tuple finfun bigop prime", "From mathcomp Require Import ssralg poly polydiv ssrnum ssrint archimedean rat", "From mathcomp Require Import fin...
field/algnum.v
Aint
root_monic_Aintp x : root p x -> p \is monic -> p \is a polyOver Num.int -> x \in Aint. Proof. have pZtoQtoC pz: pQtoC (pZtoQ pz) = pZtoC pz. by rewrite -map_poly_comp; apply: eq_map_poly => b; rewrite /= rmorph_int. move=> px0 mon_p /floorpP[pz Dp]; rewrite unfold_in. move: px0; rewrite Dp -pZtoQtoC; have [q [-> mon_q] ->] := minCpolyP x. case/dvdpP_rat_int=> qz [a nz_a Dq] [r]. move/(congr1 (fun q1 => lead_coef (a *: pZtoQ q1))). rewrite rmorphM scalerAl -Dq lead_coefZ lead_coefM /=. have /monicP->: pZtoQ pz \is monic by rewrite -(map_monic QtoC) pZtoQtoC -Dp. rewrite (monicP mon_q) mul1r mulr1 lead_coef_map_inj //; last exact: intr_inj. rewrite Dq => ->; apply/polyOverP=> i; rewrite !(coefZ, coef_map). by rewrite -rmorphM /= rmorph_int. Qed.
Lemma
field
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq path", "From mathcomp Require Import div choice fintype tuple finfun bigop prime", "From mathcomp Require Import ssralg poly polydiv ssrnum ssrint archimedean rat", "From mathcomp Require Import fin...
field/algnum.v
root_monic_Aint
Cint_rat_Aintz : z \in Crat -> z \in Aint -> z \in Num.int. Proof. case/CratP=> a ->{z} /polyOverP/(_ 0). have [p [Dp mon_p] dv_p] := minCpolyP (ratr a); rewrite Dp coef_map. suffices /eqP->: p == 'X - a%:P by rewrite polyseqXsubC /= rmorphN rpredN. rewrite -eqp_monic ?monicXsubC // irredp_XsubC //. by rewrite -(size_map_poly QtoC) -Dp neq_ltn size_minCpoly orbT. by rewrite -dv_p fmorph_root root_XsubC. Qed.
Lemma
field
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq path", "From mathcomp Require Import div choice fintype tuple finfun bigop prime", "From mathcomp Require Import ssralg poly polydiv ssrnum ssrint archimedean rat", "From mathcomp Require Import fin...
field/algnum.v
Cint_rat_Aint
Aint_Cint: {subset Num.int <= Aint}. Proof. move=> x; rewrite -polyOverXsubC. by apply: root_monic_Aint; rewrite ?monicXsubC ?root_XsubC. Qed.
Lemma
field
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq path", "From mathcomp Require Import div choice fintype tuple finfun bigop prime", "From mathcomp Require Import ssralg poly polydiv ssrnum ssrint archimedean rat", "From mathcomp Require Import fin...
field/algnum.v
Aint_Cint
Aint_intx : x%:~R \in Aint. Proof. by rewrite Aint_Cint. Qed.
Lemma
field
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq path", "From mathcomp Require Import div choice fintype tuple finfun bigop prime", "From mathcomp Require Import ssralg poly polydiv ssrnum ssrint archimedean rat", "From mathcomp Require Import fin...
field/algnum.v
Aint_int
Aint0: 0 \in Aint. Proof. exact: Aint_int 0. Qed.
Lemma
field
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq path", "From mathcomp Require Import div choice fintype tuple finfun bigop prime", "From mathcomp Require Import ssralg poly polydiv ssrnum ssrint archimedean rat", "From mathcomp Require Import fin...
field/algnum.v
Aint0
Aint1: 1 \in Aint. Proof. exact: Aint_int 1. Qed. #[global] Hint Resolve Aint0 Aint1 : core.
Lemma
field
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq path", "From mathcomp Require Import div choice fintype tuple finfun bigop prime", "From mathcomp Require Import ssralg poly polydiv ssrnum ssrint archimedean rat", "From mathcomp Require Import fin...
field/algnum.v
Aint1
Aint_unity_rootn x : (n > 0)%N -> n.-unity_root x -> x \in Aint. Proof. move=> n_gt0 xn1; apply: root_monic_Aint xn1 (monicXnsubC _ n_gt0) _. by apply/polyOverP=> i; rewrite coefB coefC -mulrb coefXn /= rpredB ?rpred_nat. Qed.
Lemma
field
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq path", "From mathcomp Require Import div choice fintype tuple finfun bigop prime", "From mathcomp Require Import ssralg poly polydiv ssrnum ssrint archimedean rat", "From mathcomp Require Import fin...
field/algnum.v
Aint_unity_root
Aint_prim_rootn z : n.-primitive_root z -> z \in Aint. Proof. move=> pr_z; apply/(Aint_unity_root (prim_order_gt0 pr_z))/unity_rootP. exact: prim_expr_order. Qed.
Lemma
field
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq path", "From mathcomp Require Import div choice fintype tuple finfun bigop prime", "From mathcomp Require Import ssralg poly polydiv ssrnum ssrint archimedean rat", "From mathcomp Require Import fin...
field/algnum.v
Aint_prim_root
Aint_Cnat: {subset Num.nat <= Aint}. Proof. by move=> z /intr_nat/Aint_Cint. Qed.
Lemma
field
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq path", "From mathcomp Require Import div choice fintype tuple finfun bigop prime", "From mathcomp Require Import ssralg poly polydiv ssrnum ssrint archimedean rat", "From mathcomp Require Import fin...
field/algnum.v
Aint_Cnat
Aint_subring_exists(X : seq algC) : {subset X <= Aint} -> {S : pred algC &
Lemma
field
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq path", "From mathcomp Require Import div choice fintype tuple finfun bigop prime", "From mathcomp Require Import ssralg poly polydiv ssrnum ssrint archimedean rat", "From mathcomp Require Import fin...
field/algnum.v
Aint_subring_exists