intro.
generalize (gcd_is_gcd a b);intro.
generalize (quo_is_quo a (gcd a b) (gcd_div_l (gcd a b) a b H5));intro.
generalize (quo_is_quo b (gcd a b) (gcd_div_r (gcd a b) a b H5));intro.
assert ((power a n)=(power (gcd a b * quo a (gcd a b) (gcd_div_l (gcd a b) a b H5)) n));try (rewrite <- H6;trivial).
assert ((power b n)=(power (gcd a b * quo b (gcd a b) (gcd_div_r (gcd a b) a b H5)) n));try (rewrite <- H7;trivial).
rewrite power_mult_lemma1 in H8;rewrite H8 in H4.
rewrite power_mult_lemma1 in H9;rewrite H9 in H4.
rewrite mult_lemma7 in H4.
assert ((power (gcd a b) n)<>O).
intro.
generalize (power_zero n (gcd a b) H10);intro.
apply (gcd_non_zero (gcd a b) a b);trivial.
generalize (mult_lemma6 (power p r * k * power (quo b (gcd a b) (gcd_div_r (gcd a b) a b H5)) n) (power (quo a (gcd a b) (gcd_div_l (gcd a b) a b H5)) n) (power (gcd a b) n) H10 H4).
fold ((power p r * k * power (quo b (gcd a b) (gcd_div_r (gcd a b) a b H5)) n)<>(power (quo a (gcd a b) (gcd_div_l (gcd a b) a b H5)) n)).
apply nth_root_irrat_aux;trivial.
apply gcd_rel_prime;apply (gcd_non_zero (gcd a b) a b);trivial.
Qed.

(** Generalization of the previous theorem *)
Theorem nth_root_irrational : forall (p k a b n q r:nat),(is_prime p)->(rel_prime p k)->(0<r)->(r<n)->(b<>0)->((power p (q*n+r))*k*(power b n) <> (power a n)).
intros.