aboutsummaryrefslogtreecommitdiff
path: root/mathcomp/algebra/poly.v
diff options
context:
space:
mode:
Diffstat (limited to 'mathcomp/algebra/poly.v')
-rw-r--r--mathcomp/algebra/poly.v32
1 files changed, 31 insertions, 1 deletions
diff --git a/mathcomp/algebra/poly.v b/mathcomp/algebra/poly.v
index 0f97bb0..040b3a8 100644
--- a/mathcomp/algebra/poly.v
+++ b/mathcomp/algebra/poly.v
@@ -4,7 +4,7 @@ Require Import mathcomp.ssreflect.ssreflect.
From mathcomp
Require Import ssrbool ssrfun eqtype ssrnat seq div choice fintype.
From mathcomp
-Require Import bigop ssralg binomial tuple.
+Require Import bigop ssralg countalg binomial tuple.
(******************************************************************************)
(* This file provides a library for univariate polynomials over ring *)
@@ -152,6 +152,11 @@ Arguments coefp_head _ _ _%N _%R.
Notation "{ 'poly' T }" := (poly_of (Phant T)).
Notation coefp i := (coefp_head tt i).
+Definition poly_countMixin (R : countRingType) :=
+ [countMixin of polynomial R by <:].
+Canonical polynomial_countType R := CountType _ (poly_countMixin R).
+Canonical poly_countType (R : countRingType) := [countType of {poly R}].
+
Section PolynomialTheory.
Variable R : ringType.
@@ -1690,6 +1695,13 @@ Arguments rootPt [R p x].
Arguments unity_rootP [R n z].
Arguments polyOverP {R S0 addS kS p}.
+Canonical polynomial_countZmodType (R : countRingType) :=
+ [countZmodType of polynomial R].
+Canonical poly_countZmodType (R : countRingType) := [countZmodType of {poly R}].
+Canonical polynomial_countRingType (R : countRingType) :=
+ [countRingType of polynomial R].
+Canonical poly_countRingType (R : countRingType) := [countRingType of {poly R}].
+
(* Container morphism. *)
Section MapPoly.
@@ -2116,6 +2128,11 @@ Definition derivCE := (derivE, deriv_exp).
End PolynomialComRing.
+Canonical polynomial_countComRingType (R : countComRingType) :=
+ [countComRingType of polynomial R].
+Canonical poly_countComRingType (R : countComRingType) :=
+ [countComRingType of {poly R}].
+
Section PolynomialIdomain.
(* Integral domain structure on poly *)
@@ -2353,6 +2370,19 @@ Proof. by move=> ??; apply: contraTeq => ?; rewrite leqNgt max_poly_roots. Qed.
End PolynomialIdomain.
+Canonical polynomial_countUnitRingType (R : countIdomainType) :=
+ [countUnitRingType of polynomial R].
+Canonical poly_countUnitRingType (R : countIdomainType) :=
+ [countUnitRingType of {poly R}].
+Canonical polynomial_countComUnitRingType (R : countIdomainType) :=
+ [countComUnitRingType of polynomial R].
+Canonical poly_countComUnitRingType (R : countIdomainType) :=
+ [countComUnitRingType of {poly R}].
+Canonical polynomial_countIdomainType (R : countIdomainType) :=
+ [countIdomainType of polynomial R].
+Canonical poly_countIdomainType (R : countIdomainType) :=
+ [countIdomainType of {poly R}].
+
Section MapFieldPoly.
Variables (F : fieldType) (R : ringType) (f : {rmorphism F -> R}).