Section ZpolyScale.
Definition zcontents p :=
sgz (lead_coef p) * \big[gcdn/0%N]_(i < size p) `|(p`_i)%R|%N.
Definition zprimitive p := map_poly (divz^~ (zcontents p)) p.
Local Notation pZtoQ := (map_poly (intr : int -> rat)).
End ZpolyScale.
(* Integral spans. *)
Definition inIntSpan (V : zmodType) m (s : m.-tuple V) v :=
exists a : int ^ m, v = \sum_(i < m) s`_i *~ a i.

Lemma dec_Qint_span (vT : vectType rat) m (s : m.-tuple vT) v :
decidable (inIntSpan s v).