I'm stuck at a problem in Coq, would be great if anyone had any tips on how to break the problem down into smaller steps. The lemma is this:
Lemma gcd_prime : forall (a b : Z), a > 1 -> b > 1 ->
Z.gcd a b = 1 -> Zmod a b <> 0
That is, if a
and b
are coprime and higher than 1
, a mod b
is not 0
.
This is where I'm stuck:
p : positive
p0 : positive
H : Z.pos p > 1
H0 : Z.pos p0 > 1
H1 : Z.gcd (Z.pos p) (Z.pos p0) = 1
============================
Z.pos p mod Z.pos p0 <> 0
After doing the intros and induction and removed the obvious cases.
Maybe I must rephrase the mod
part into remainder
instead? Or should I replace H1
with something weaker, like p <> p0
?
Doing SearchAbout Zmod.
returns a lot of lemmas, but I'm not sure on how to adapt them.
Regards
Olle