Definition CoPrime (a b : nat) := gcd (Z_of_nat a) (Z_of_nat b) 1.
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.
intro a.
apply (lt_wf_ind a).
clear a.
intros.
induction (primedec n).
exists n.
split.
assumption.
exists 1.
symmetry  in |- *.
apply mult_1_r.
induction (nonprime_witness _ H0 H1).
induction H2 as (H2, H3).
induction H3 as (H3, H4).
induction (H _ H3 H2).
exists x0.
induction H5 as (H5, H6).
split.
assumption.
eapply div_trans.
apply H6.
assumption.
Qed.

Lemma coPrimeSeqHelp :
forall c i j n : nat,
Divides (factorial n) c ->
i < j -> i <= n -> j <= n -> CoPrime (S (c * S i)) (S (c * S j)).