diff -r 9e71155e3666 -r 0135a0c77b64 src/HOL/Number_Theory/Residue_Primitive_Roots.thy --- a/src/HOL/Number_Theory/Residue_Primitive_Roots.thy Fri Sep 24 13:40:14 2021 +0200 +++ b/src/HOL/Number_Theory/Residue_Primitive_Roots.thy Fri Sep 24 22:23:26 2021 +0200 @@ -755,7 +755,15 @@ from assms have "n \ 0" by auto from False have "\p\prime_factors n. p \ 2" using assms Ex_other_prime_factor[of n 2] by auto - from divide_out_primepow_ex[OF \n \ 0\ this] guess p k n' . note p = this + from divide_out_primepow_ex[OF \n \ 0\ this] + obtain p k n' + where p: + "p \ 2" + "prime p" + "p dvd n" + "\ p dvd n'" + "0 < k" + "n = p ^ k * n'" . from p have coprime: "coprime (p ^ k) n'" using p prime_imp_coprime by auto have "odd p"