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 |
|---|---|---|---|---|---|---|
type: Type. | Parameter | 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 | type | |
conjMixin: Num.ClosedField type. | Parameter | 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 | conjMixin | |
isCountable: Countable type. | Parameter | 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 | isCountable | |
archimedean: Num.archimedean_axiom (Num.ClosedField.Pack conjMixin). | Axiom | 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 | archimedean | |
algebraic: integralRange (@ratr (Num.ClosedField.Pack conjMixin)). | Axiom | 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 | algebraic | |
L:= tag Fundamental_Theorem_of_Algebraics. | 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 | L | |
conjL: {rmorphism L -> L} :=
s2val (tagged Fundamental_Theorem_of_Algebraics).
Fact conjL_K : involutive conjL.
Proof. exact: s2valP (tagged Fundamental_Theorem_of_Algebraics). Qed.
Fact conjL_nt : ~ conjL =1 id.
Proof. exact: s2valP' (tagged Fundamental_Theorem_of_Algebraics). Qed. | 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 | conjL | |
L': Type := eta L.
HB.instance Definition _ := GRing.ClosedField.on L'.
HB.instance Definition _ := isComplex.Build L' conjL_K conjL_nt. | 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 | L' | |
cfType:= (L' : closedFieldType). | 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 | cfType | |
QtoL: {rmorphism _ -> _} := @ratr cfType. | 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 | QtoL | |
pQtoL:= (map_poly QtoL). | 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 | pQtoL | |
rootQtoLp_j :=
if p_j.1 == 0 then 0 else
(sval (closed_field_poly_normal (pQtoL p_j.1)))`_p_j.2. | 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 | rootQtoL | |
eq_rootp_j q_k := rootQtoL p_j == rootQtoL q_k.
Fact eq_root_is_equiv : equiv_class_of eq_root.
Proof. by rewrite /eq_root; split=> [ ? | ? ? | ? ? ? ] // /eqP->. Qed. | 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 | eq_root | |
eq_root_equiv:= EquivRelPack eq_root_is_equiv. | Canonical | 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 | eq_root_equiv | |
type: Type := {eq_quot eq_root}%qT.
HB.instance Definition _ : EqQuotient _ eq_root type := EqQuotient.on type.
HB.instance Definition _ := Choice.on type.
HB.instance Definition _ := isCountable.Build type
(pcan_pickleK (can_pcan reprK)). | 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 | type | |
CtoL(u : type) := rootQtoL (repr u).
Fact CtoL_inj : injective CtoL.
Proof. by move=> u v /eqP eq_uv; rewrite -[u]reprK -[v]reprK; apply/eqmodP. Qed.
Fact CtoL_P u : integralOver QtoL (CtoL u).
Proof.
rewrite /CtoL /rootQtoL; case: (repr u) => p j /=.
case: (closed_field_poly_normal _) => r Dp /=.
case: ifPn => [_ | nz_p]; first exact: integral0.
have [/(nth_default 0)-> | lt_j_r] := leqP (size r) j; first exact: integral0.
apply/integral_algebraic; exists p; rewrite // Dp -mul_polyC rootM orbC.
by rewrite root_prod_XsubC mem_nth.
Qed.
Fact LtoC_subproof z : integralOver QtoL z -> {u | CtoL u = z}.
Proof.
case/sig2_eqW=> p mon_p pz0; rewrite /CtoL.
pose j := index z (sval (closed_field_poly_normal (pQtoL p))).
pose u := \pi_type%qT (p, j); exists u; have /eqmodP/eqP-> := reprK u.
rewrite /rootQtoL -if_neg monic_neq0 //; apply: nth_index => /=.
case: (closed_field_poly_normal _) => r /= Dp.
by rewrite Dp (monicP _) ?(monic_map QtoL) // scale1r root_prod_XsubC in pz0.
Qed. | 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 | CtoL | |
LtoCz Az := sval (@LtoC_subproof z Az).
Fact LtoC_K z Az : CtoL (@LtoC z Az) = z.
Proof. exact: (svalP (LtoC_subproof Az)). Qed.
Fact CtoL_K u : LtoC (CtoL_P u) = u.
Proof. by apply: CtoL_inj; rewrite LtoC_K. Qed. | 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 | LtoC | |
zero:= LtoC (integral0 _). | 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 | zero | |
addu v := LtoC (integral_add (CtoL_P u) (CtoL_P v)). | 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 | add | |
oppu := LtoC (integral_opp (CtoL_P u)).
Fact addA : associative add.
Proof. by move=> u v w; apply: CtoL_inj; rewrite !LtoC_K addrA. Qed.
Fact addC : commutative add.
Proof. by move=> u v; apply: CtoL_inj; rewrite !LtoC_K addrC. Qed.
Fact add0 : left_id zero add.
Proof. by move=> u; apply: CtoL_inj; rewrite !LtoC_K add0r. Qed.
Fact addN : left_inverse zero opp add.
Proof. by move=> u; apply: CtoL_inj; rewrite !LtoC_K addNr. Qed.
HB.instance Definition _ := GRing.isZmodule.Build type addA addC add0 addN.
Fact CtoL_is_zmod_morphism : zmod_morphism CtoL.
Proof. by move=> u v; rewrite !LtoC_K. Qed.
#[warning="-deprecated-since-mathcomp-2.5.0", deprecated(since="mathcomp 2.5.0",
note="use `CtoL_inj_is_zmod_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 | opp | |
CtoL_is_additive:= CtoL_is_zmod_morphism.
HB.instance Definition _ := GRing.isZmodMorphism.Build type L' CtoL
CtoL_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 | CtoL_is_additive | |
one:= LtoC (integral1 _). | 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 | one | |
mulu v := LtoC (integral_mul (CtoL_P u) (CtoL_P v)). | 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 | mul | |
invu := LtoC (integral_inv (CtoL_P u)).
Fact mulA : associative mul.
Proof. by move=> u v w; apply: CtoL_inj; rewrite !LtoC_K mulrA. Qed.
Fact mulC : commutative mul.
Proof. by move=> u v; apply: CtoL_inj; rewrite !LtoC_K mulrC. Qed.
Fact mul1 : left_id one mul.
Proof. by move=> u; apply: CtoL_inj; rewrite !LtoC_K mul1r. Qed.
Fact mulD : left_distributive mul +%R.
Proof. by move=> u v w; apply: CtoL_inj; rewrite !LtoC_K mulrDl. Qed.
Fact one_nz : one != 0 :> type.
Proof. by rewrite -(inj_eq CtoL_inj) !LtoC_K oner_eq0. Qed.
HB.instance Definition _ :=
GRing.Zmodule_isComNzRing.Build type mulA mulC mul1 mulD one_nz.
Fact CtoL_is_monoid_morphism : monoid_morphism CtoL.
Proof. by split=> [|u v]; rewrite !LtoC_K. Qed.
#[warning="-deprecated-since-mathcomp-2.5.0", deprecated(since="mathcomp 2.5.0",
note="use `CtoL_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 | inv | |
CtoL_is_multiplicative:=
(fun g => (g.2,g.1)) CtoL_is_monoid_morphism.
HB.instance Definition _ := GRing.isMonoidMorphism.Build type L' CtoL
CtoL_is_monoid_morphism.
Fact mulVf u : u != 0 -> inv u * u = 1.
Proof.
rewrite -(inj_eq CtoL_inj) rmorph0 => nz_u.
by apply: CtoL_inj; rewrite !LtoC_K mulVf.
Qed.
Fact inv0 : inv 0 = 0. Proof. by apply: CtoL_inj; rewrite !LtoC_K invr0. Qed.
HB.instance Definition _ := GRing.ComNzRing_isField.Build type mulVf inv0.
Fact closedFieldAxiom : GRing.closed_field_axiom type.
Proof.
move=> n a n_gt0; pose p := 'X^n - \poly_(i < n) CtoL (a i).
have Ap : {in p : seq L, integralRange QtoL}.
move=> _ /(nthP 0)[j _ <-]; rewrite coefB coefXn coef_poly.
apply: integral_sub; first exact: integral_nat.
by case: ifP => _; [apply: CtoL_P | apply: integral0].
have sz_p : size p = n.+1.
by rewrite size_polyDl size_polyXn // size_polyN ltnS size_poly.
have [z pz0] : exists z, root p z by apply/closed_rootP; rewrite sz_p eqSS -lt0n.
have Az: integralOver ratr z.
by apply: integral_root Ap; rewrite // -size_poly_gt0 sz_p.
exists (LtoC Az); apply/CtoL_inj; rewrite -[CtoL _]subr0 -(rootP pz0).
rewrite rmorphXn /= LtoC_K hornerD hornerXn hornerN opprD addNKr opprK.
rewrite horner_poly rmorph_sum; apply: eq_bigr => k _.
by rewrite rmorphM rmorphXn /= LtoC_K.
Qed.
HB.instance Definition _ := Field_isAlgClosed.Build type closedFieldAxiom.
Fact conj_subproof u : integralOver QtoL (conjL (CtoL u)).
Proof.
have [p mon_p pu0] := CtoL_P u; exists p => //.
rewrite -(fmorph_root
... | 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 | CtoL_is_multiplicative | |
conj_is_semi_additive:= conj_is_nmod_morphism.
Fact conj_is_zmod_morphism : {morph (fun u => LtoC (conj_subproof u)) : x / - x}.
Proof. by move=> u; apply: CtoL_inj; rewrite LtoC_K !raddfN /= LtoC_K. Qed.
#[warning="-deprecated-since-mathcomp-2.5.0", deprecated(since="mathcomp 2.5.0",
note="use `CtoL_inj_is_zmod_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 | conj_is_semi_additive | |
conj_is_additive:= conj_is_zmod_morphism.
Fact conj_is_monoid_morphism : monoid_morphism (fun u => LtoC (conj_subproof u)).
Proof.
split=> [|u v]; apply: CtoL_inj; first by rewrite !LtoC_K rmorph1.
by rewrite LtoC_K 3!{1}rmorphM /= !LtoC_K.
Qed.
#[warning="-deprecated-since-mathcomp-2.5.0", deprecated(since="mathcomp 2.5.0",
note="use `conj_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 | conj_is_additive | |
conj_is_multiplicative:=
(fun g => (g.2,g.1)) conj_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 | conj_is_multiplicative | |
conj: {rmorphism type -> type} :=
GRing.RMorphism.Pack
(GRing.RMorphism.Class
(GRing.isNmodMorphism.Build _ _ _ conj_is_nmod_morphism)
(GRing.isMonoidMorphism.Build _ _ _ conj_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 | conj | |
conjK: involutive conj.
Proof. by move=> u; apply: CtoL_inj; rewrite !LtoC_K conjL_K. Qed.
Fact conj_nt : ~ conj =1 id.
Proof.
have [i i2]: exists i : type, i ^+ 2 = -1.
have [i] := @solve_monicpoly _ 2%N (nth 0 [:: -1 : type]) isT.
by rewrite !big_ord_recl big_ord0 /= mul0r mulr1 !addr0; exists i.
move/(_ i)/(congr1 CtoL); rewrite LtoC_K => iL_J.
have/lt_geF/idP[] := @ltr01 cfType.
rewrite -oppr_ge0 -(rmorphN1 CtoL).
by rewrite -i2 rmorphXn /= expr2 -{2}iL_J -normCK exprn_ge0.
Qed.
HB.instance Definition _ := isComplex.Build type conjK conj_nt. | 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 | conjK | |
conjMixin:= Num.ClosedField.on type. | 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 | conjMixin | |
algebraic: integralRange (@ratr type).
Proof.
move=> u; have [p mon_p pu0] := CtoL_P u; exists p => {mon_p}//.
rewrite -(fmorph_root CtoL) -map_poly_comp; congr (root _ _):pu0.
by apply/esym/eq_map_poly; apply: fmorph_eq_rat.
Qed.
Fact archimedean : Num.archimedean_axiom type.
Proof. exact: rat_algebraic_archimedean algebraic. 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 | algebraic | |
isCountable:= Countable.on type. | 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 | isCountable | |
divisor:= Implementation.type.
#[export] HB.instance Definition _ := Implementation.conjMixin.
#[export] HB.instance Definition _ :=
Num.NumDomain_bounded_isArchimedean.Build Implementation.type
Implementation.archimedean.
#[export] HB.instance Definition _ := Implementation.isCountable. | 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 | divisor | |
getCrat_spec: Type := GetCrat_spec CtoQ of cancel QtoC CtoQ.
Fact getCrat_subproof : getCrat_spec.
Proof.
have isQ := rat_algebraic_decidable algebraic.
exists (fun z => if isQ z is left Qz then sval (sig_eqW Qz) else 0) => a.
case: (isQ _) => [Qa | []]; last by exists a.
by case: (sig_eqW _) => b /= /fmorph_inj.
Qed.
Fact minCpoly_subproof (x : algC) :
{p : {poly rat} | p \is monic & forall q, root (pQtoC q) x = (p %| q)%R}.
Proof.
have isQ := rat_algebraic_decidable algebraic.
have [p [mon_p px0 irr_p]] := minPoly_decidable_closure isQ (algebraic x).
exists p => // q; apply/idP/idP=> [qx0 | /dvdpP[r ->]]; last first.
by rewrite rmorphM rootM px0 orbT.
suffices /eqp_dvdl <-: gcdp p q %= p by apply: dvdp_gcdr.
rewrite irr_p ?dvdp_gcdl ?gtn_eqF // -(size_map_poly QtoC) gcdp_map /=.
rewrite (@root_size_gt1 _ x) ?root_gcd ?px0 //.
by rewrite gcdp_eq0 negb_and map_poly_eq0 monic_neq0.
Qed. | Variant | 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 | getCrat_spec | |
algC_divisor(x : algC) := x : divisor. | 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_divisor | |
int_divisorm := m%:~R : divisor. | 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 | int_divisor | |
nat_divisorn := n%:R : divisor. | 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 | nat_divisor | |
algC:= type.
Delimit Scope C_scope with C.
Delimit Scope C_core_scope with Cc.
Delimit Scope C_expanded_scope with Cx.
Open Scope C_core_scope. | 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 | |
algCeq:= (type : eqType). | 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 | algCeq | |
algCzmod:= (type : zmodType). | 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 | algCzmod | |
algCnzRing:= (type : nzRingType).
#[deprecated(since="mathcomp 2.4.0",
note="Use algCnzRing instead.")] | 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 | algCnzRing | |
algCring:= (type : nzRingType). | 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 | algCring | |
algCuring:= (type : unitRingType). | 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 | algCuring | |
algCnum:= (type : numDomainType). | 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 | algCnum | |
algCfield:= (type : fieldType). | 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 | algCfield | |
algCnumField:= (type : numFieldType). | 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 | algCnumField | |
algCnumClosedField:= (type : numClosedFieldType). | 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 | algCnumClosedField | |
Creal:= (@Num.real algCnum). | 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 | Creal | |
getCrat:= let: GetCrat_spec CtoQ _ := getCrat_subproof in CtoQ. | 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 | getCrat | |
Crat: {pred algC} := fun x => ratr (getCrat x) == 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 | Crat | |
minCpolyx : {poly algC} :=
let: exist2 p _ _ := minCpoly_subproof x in map_poly ratr 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 | minCpoly | |
nat_divisor: nat >-> divisor. | Coercion | 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 | nat_divisor | |
int_divisor: int >-> divisor. | Coercion | 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 | int_divisor | |
algC_divisor: algC >-> divisor. | Coercion | 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_divisor | |
nCdivE(p : nat) : p = p%:R :> divisor. Proof. by []. 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 | nCdivE | |
zCdivE(p : int) : p = p%:~R :> divisor. Proof. by []. 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 | zCdivE | |
CdivE:= (nCdivE, zCdivE). | 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 | CdivE | |
dvdC(x : divisor) : {pred algC} :=
fun y => if x == 0 then y == 0 else y / x \in Num.int. | 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 | dvdC | |
eqCmod(e x y : divisor) := (e %| x - y)%C. | 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 | eqCmod | |
eqC_natn p : (n%:R == p%:R :> algC) = (n == p) := eqr_nat _ n 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 | eqC_nat | |
leC_natn p : (n%:R <= p%:R :> algC) = (n <= p)%N := ler_nat _ n 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 | leC_nat | |
ltC_natn p : (n%:R < p%:R :> algC) = (n < p)%N := ltr_nat _ n 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 | ltC_nat | |
Cpchar: [pchar algC] =i pred0 := @pchar_num _. | 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 | Cpchar | |
CratrE:=
let CnF : numClosedFieldType := algC in
let QtoCm : {rmorphism _ -> _} := @ratr CnF in
((rmorph0 QtoCm, rmorph1 QtoCm, rmorphMn QtoCm, rmorphN QtoCm, rmorphD QtoCm),
(rmorphM QtoCm, rmorphXn QtoCm, fmorphV QtoCm),
(rmorphMz QtoCm, rmorphXz QtoCm, @ratr_norm CnF, @ratr_sg CnF),
=^~ (@ler_rat CnF, @ltr_rat CnF, (inj_eq (fmorph_inj QtoCm)))). | 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 | CratrE | |
CintrE:=
let CnF : numClosedFieldType := algC in
let ZtoCm : {rmorphism _ -> _} := *~%R (1 : CnF) in
((rmorph0 ZtoCm, rmorph1 ZtoCm, rmorphMn ZtoCm, rmorphN ZtoCm, rmorphD ZtoCm),
(rmorphM ZtoCm, rmorphXn ZtoCm),
(rmorphMz ZtoCm, @intr_norm CnF, @intr_sg CnF),
=^~ (@ler_int CnF, @ltr_int CnF, (inj_eq (@intr_inj CnF)))).
Let nz2 : 2 != 0 :> algC.
Proof. by rewrite pnatr_eq0. Qed. | 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 | CintrE | |
algC_algebraicx := Algebraics.Implementation.algebraic 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_algebraic | |
algCrectx : x = 'Re x + 'i * 'Im x.
Proof. by rewrite [LHS]Crect. 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 | algCrect | |
algCreal_Rex : 'Re x \is Creal.
Proof. by rewrite Creal_Re. 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 | algCreal_Re | |
algCreal_Imx : 'Im x \is Creal.
Proof. by rewrite Creal_Im. Qed.
Hint Resolve algCreal_Re algCreal_Im : core. | 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 | algCreal_Im | |
dvdCPx y : reflect (exists2 z, z \in Num.int & y = z * x) (x %| y)%C.
Proof.
rewrite unfold_in; have [-> | nz_x] := eqVneq.
by apply: (iffP eqP) => [-> | [z _ ->]]; first exists 0; rewrite ?mulr0.
apply: (iffP idP) => [Zyx | [z Zz ->]]; last by rewrite mulfK.
by exists (y / x); rewrite ?divfK.
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 | dvdCP | |
dvdCP_natx y : 0 <= x -> 0 <= y -> (x %| y)%C -> {n | y = n%:R * x}.
Proof.
move=> x_ge0 y_ge0 x_dv_y; apply: sig_eqW.
case/dvdCP: x_dv_y => z Zz -> in y_ge0 *; move: x_ge0 y_ge0 Zz.
rewrite le_eqVlt => /predU1P[<- | ]; first by exists 22%N; rewrite !mulr0.
by move=> /pmulr_lge0-> /intrEge0-> /natrP[n ->]; exists n.
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 | dvdCP_nat | |
dvdC0x : (x %| 0)%C.
Proof. by apply/dvdCP; exists 0; rewrite ?mul0r. 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 | dvdC0 | |
dvd0Cx : (0 %| x)%C = (x == 0).
Proof. by rewrite unfold_in eqxx. 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 | dvd0C | |
dvdC_mullx y z : y \in Num.int -> (x %| z)%C -> (x %| y * z)%C.
Proof.
move=> Zy /dvdCP[m Zm ->]; apply/dvdCP.
by exists (y * m); rewrite ?mulrA ?rpredM.
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 | dvdC_mull | |
dvdC_mulrx y z : y \in Num.int -> (x %| z)%C -> (x %| z * y)%C.
Proof. by rewrite mulrC; apply: dvdC_mull. 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 | dvdC_mulr | |
dvdC_mul2rx y z : y != 0 -> (x * y %| z * y)%C = (x %| z)%C.
Proof.
move=> nz_y; rewrite !unfold_in !(mulIr_eq0 _ (mulIf nz_y)).
by rewrite mulrAC invfM mulrA divfK.
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 | dvdC_mul2r | |
dvdC_mul2lx y z : y != 0 -> (y * x %| y * z)%C = (x %| z)%C.
Proof. by rewrite !(mulrC y); apply: dvdC_mul2r. 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 | dvdC_mul2l | |
dvdC_transx y z : (x %| y)%C -> (y %| z)%C -> (x %| z)%C.
Proof. by move=> x_dv_y /dvdCP[m Zm ->]; apply: dvdC_mull. 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 | dvdC_trans | |
dvdC_reflx : (x %| x)%C.
Proof. by apply/dvdCP; exists 1; rewrite ?mul1r. Qed.
Hint Resolve dvdC_refl : core. | 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 | dvdC_refl | |
dvdC_zmodx : zmod_closed (dvdC x).
Proof.
split=> [| _ _ /dvdCP[y Zy ->] /dvdCP[z Zz ->]]; first exact: dvdC0.
by rewrite -mulrBl dvdC_mull ?rpredB.
Qed.
HB.instance Definition _ x := GRing.isZmodClosed.Build _ (dvdC x) (dvdC_zmod x). | 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 | dvdC_zmod | |
dvdC_nat(p n : nat) : (p %| n)%C = (p %| n)%N.
Proof.
rewrite unfold_in intrEge0 ?divr_ge0 ?invr_ge0 ?ler0n // !pnatr_eq0.
have [-> | nz_p] := eqVneq; first by rewrite dvd0n.
apply/natrP/dvdnP=> [[q def_q] | [q ->]]; exists q.
by apply/eqP; rewrite -eqC_nat natrM -def_q divfK ?pnatr_eq0.
by rewrite [num in num / _]natrM mulfK ?pnatr_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 | dvdC_nat | |
dvdC_int(p : nat) x :
x \in Num.int -> (p %| x)%C = (p %| `|Num.floor x|)%N.
Proof.
move=> Zx; rewrite -{1}(floorK Zx) {1}[Num.floor x]intEsign.
by rewrite rmorphMsign rpredMsign dvdC_nat.
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 | dvdC_int | |
eqCmod_refle x : (x == x %[mod e])%C.
Proof. by rewrite /eqCmod subrr rpred0. 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_refl | |
eqCmodm0e : (e == 0 %[mod e])%C. Proof. by rewrite /eqCmod subr0. Qed.
Hint Resolve eqCmod_refl eqCmodm0 : core. | 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 | eqCmodm0 | |
eqCmod0e x : (x == 0 %[mod e])%C = (e %| x)%C.
Proof. by rewrite /eqCmod subr0. 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 | eqCmod0 | |
eqCmod_syme x y : ((x == y %[mod e]) = (y == x %[mod e]))%C.
Proof. by rewrite /eqCmod -opprB rpredN. 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_sym | |
eqCmod_transe y x z :
(x == y %[mod e] -> y == z %[mod e] -> x == z %[mod e])%C.
Proof.
by move=> Exy Eyz; rewrite /eqCmod -[x](subrK y) -[_ - z]addrA rpredD.
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_trans | |
eqCmod_transle x y z :
(x == y %[mod e])%C -> (x == z %[mod e])%C = (y == z %[mod e])%C.
Proof. by move/(sym_left_transitive (eqCmod_sym e) (@eqCmod_trans e)). 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_transl | |
eqCmod_transre x y z :
(x == y %[mod e])%C -> (z == x %[mod e])%C = (z == y %[mod e])%C.
Proof. by move/(sym_right_transitive (eqCmod_sym e) (@eqCmod_trans e)). 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_transr | |
eqCmodNe x y : (- x == y %[mod e])%C = (x == - y %[mod e])%C.
Proof. by rewrite eqCmod_sym /eqCmod !opprK addrC. 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 | eqCmodN | |
eqCmodDre x y z : (y + x == z + x %[mod e])%C = (y == z %[mod e])%C.
Proof. by rewrite /eqCmod addrAC opprD !addrA subrK. 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 | eqCmodDr | |
eqCmodDle x y z : (x + y == x + z %[mod e])%C = (y == z %[mod e])%C.
Proof. by rewrite !(addrC x) eqCmodDr. 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 | eqCmodDl | |
eqCmodDe x1 x2 y1 y2 :
(x1 == x2 %[mod e] -> y1 == y2 %[mod e] -> x1 + y1 == x2 + y2 %[mod e])%C.
Proof.
by rewrite -(eqCmodDl e x2 y1) -(eqCmodDr e y1); apply: eqCmod_trans.
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 | eqCmodD | |
eqCmod_nat(e m n : nat) : (m == n %[mod e])%C = (m == n %[mod e]).
Proof.
without loss lenm: m n / (n <= m)%N.
by move=> IH; case/orP: (leq_total m n) => /IH //; rewrite eqCmod_sym eq_sym.
by rewrite /eqCmod -natrB // dvdC_nat eqn_mod_dvd.
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_nat | |
eqCmod0_nat(e m : nat) : (m == 0 %[mod e])%C = (e %| m)%N.
Proof. by rewrite eqCmod0 dvdC_nat. 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 | eqCmod0_nat | |
eqCmodMre :
{in Num.int, forall z x y, x == y %[mod e] -> x * z == y * z %[mod e]}%C.
Proof. by move=> z Zz x y; rewrite /eqCmod -mulrBl => /dvdC_mulr->. 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 | eqCmodMr | |
eqCmodMle :
{in Num.int, forall z x y, x == y %[mod e] -> z * x == z * y %[mod e]}%C.
Proof. by move=> z Zz x y Exy; rewrite !(mulrC z) 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 | eqCmodMl | |
eqCmodMl0e : {in Num.int, forall x, x * e == 0 %[mod e]}%C.
Proof. by move=> x Zx; rewrite -(mulr0 x) eqCmodMl. 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 | eqCmodMl0 | |
eqCmodMr0e : {in Num.int, forall x, e * x == 0 %[mod e]}%C.
Proof. by move=> x Zx; rewrite /= mulrC 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 | eqCmodMr0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.