Definition prod : forall (n : nat) (x : nat -> nat), nat.
intros.
induction n as [| n Hrecn].
exact 1.
exact (x n * Hrecn).
Defined.
Definition factorial (n : nat) : nat := prod n S.

Lemma divProd :
forall (n : nat) (x : nat -> nat) (i : nat),
i < n -> Divides (x i) (prod n x).