src/HOL/Number_Theory/Residues.thy
 changeset 66304 cde6ceffcbc7 parent 65899 ab7d8c999531 child 66305 7454317f883c
```--- a/src/HOL/Number_Theory/Residues.thy	Tue Aug 01 17:30:02 2017 +0200
+++ b/src/HOL/Number_Theory/Residues.thy	Tue Aug 01 17:33:04 2017 +0200
@@ -378,9 +378,9 @@
by (metis residues_prime.wilson_theorem1 residues_prime.intro le_eq_less_or_eq)
qed

-text {*
+text \<open>
This result can be transferred to the multiplicative group of
-  \$\mathbb{Z}/p\mathbb{Z}\$ for \$p\$ prime. *}
+  \$\mathbb{Z}/p\mathbb{Z}\$ for \$p\$ prime.\<close>

lemma mod_nat_int_pow_eq:
fixes n :: nat and p a :: int
@@ -409,22 +409,22 @@
have **:"nat ` {1 .. int p - 1} = {1 .. p - 1}" (is "?L = ?R")
proof
{ fix n assume n: "n \<in> ?L"
-      then have "n \<in> ?R" using `p\<ge>2` by force
+      then have "n \<in> ?R" using \<open>p\<ge>2\<close> by force
} thus "?L \<subseteq> ?R" by blast
{ fix n assume n: "n \<in> ?R"
-      then have "n \<in> ?L" using `p\<ge>2` Set_Interval.transfer_nat_int_set_functions(2) by fastforce
+      then have "n \<in> ?L" using \<open>p\<ge>2\<close> Set_Interval.transfer_nat_int_set_functions(2) by fastforce
} thus "?R \<subseteq> ?L" by blast
qed
have "nat ` {a^i mod (int p) | i::nat. i \<in> UNIV} = {nat a^i mod p | i . i \<in> UNIV}" (is "?L = ?R")
proof
{ fix x assume x: "x \<in> ?L"
then obtain i where i:"x = nat (a^i mod (int p))" by blast
-      hence "x = nat a ^ i mod p" using mod_nat_int_pow_eq[of a "int p" i] a `p\<ge>2` by auto
+      hence "x = nat a ^ i mod p" using mod_nat_int_pow_eq[of a "int p" i] a \<open>p\<ge>2\<close> by auto
hence "x \<in> ?R" using i by blast
} thus "?L \<subseteq> ?R" by blast
{ fix x assume x: "x \<in> ?R"
then obtain i where i:"x = nat a^i mod p" by blast
-      hence "x \<in> ?L" using mod_nat_int_pow_eq[of a "int p" i] a `p\<ge>2` by auto
+      hence "x \<in> ?L" using mod_nat_int_pow_eq[of a "int p" i] a \<open>p\<ge>2\<close> by auto
} thus "?R \<subseteq> ?L" by blast
qed
hence "{1 .. p - 1} = {nat a^i mod p | i. i \<in> UNIV}"```