Definition poly_unit : pred {poly R} :=
fun p => (size p == 1%N) && (p`_0 \in GRing.unit).
Definition poly_inv p := if p \in poly_unit then (p`_0)^-1%:P else p.
Fact poly_mulVp : {in poly_unit, left_inverse 1 poly_inv *%R}.
Fact poly_intro_unit p q : q * p = 1 -> p \in poly_unit.
Fact poly_inv_out : {in [predC poly_unit], poly_inv =1 id}.

Lemma size_prod_eq1 (I : finType) (P : pred I) (F : I -> {poly R}) :
reflect (forall i, P i -> size (F i) = 1%N)
(size (\prod_(i | P i) F i) == 1%N).