diff -r b5574e88092b -r 042ae6ca2c40 src/HOL/Algebra/Group.thy --- a/src/HOL/Algebra/Group.thy Tue Apr 02 14:01:52 2019 +0100 +++ b/src/HOL/Algebra/Group.thy Tue Apr 02 15:23:12 2019 +0100 @@ -550,6 +550,22 @@ by (metis eq inv_mult_group local.nat_pow_Suc nat_pow_closed pow_mult_distrib xy) qed +lemma (in group) pow_eq_div2: + fixes m n :: nat + assumes x_car: "x \ carrier G" + assumes pow_eq: "x [^] m = x [^] n" + shows "x [^] (m - n) = \" +proof (cases "m < n") + case False + have "\ \ x [^] m = x [^] m" by (simp add: x_car) + also have "\ = x [^] (m - n) \ x [^] n" + using False by (simp add: nat_pow_mult x_car) + also have "\ = x [^] (m - n) \ x [^] m" + by (simp add: pow_eq) + finally show ?thesis + by (metis nat_pow_closed one_closed right_cancel x_car) +qed simp + subsection \Submonoids\ locale submonoid = \<^marker>\contributor \Martin Baillon\\ @@ -1520,12 +1536,9 @@ then show "\I. greatest ?L I (Lower ?L A)" .. qed -subsection\Jeremy Avigad's \More_Group\ material\ +subsection\The units in any monoid give rise to a group\ -text \ - Show that the units in any monoid give rise to a group. - - The file Residues.thy provides some infrastructure to use +text \Thanks to Jeremy Avigad. The file Residues.thy provides some infrastructure to use facts about the unit group within the ring locale. \