(** Proof that Sqrt(2) cannot be rational *)
Ltac mysimpl := simplify_eq; repeat rewrite Pmult_xO_permute_r.
Coercion inject_Z : Z >-> Q.
(** Ok, I admit, the proof above is a hack, since we exploit the binary nature of positive numbers in Coq. For comparison, let's do the same for an arbitrary prime number. *)
Open Scope Z_scope.

Theorem main_thm_gen : forall p:Z, prime p ->
forall a b:Z, 0<a -> 0<b -> a*a <> p*b*b.