src/HOL/Algebra/Group.thy
changeset 63167 0909deb8059b
parent 61628 8dd2bd4fe30b
child 65099 30d0b2f1df76
equal deleted inserted replaced
63166:143f58bb34f9 63167:0909deb8059b
    24   m_inv :: "('a, 'b) monoid_scheme => 'a => 'a" ("inv\<index> _" [81] 80)
    24   m_inv :: "('a, 'b) monoid_scheme => 'a => 'a" ("inv\<index> _" [81] 80)
    25   where "inv\<^bsub>G\<^esub> x = (THE y. y \<in> carrier G & x \<otimes>\<^bsub>G\<^esub> y = \<one>\<^bsub>G\<^esub> & y \<otimes>\<^bsub>G\<^esub> x = \<one>\<^bsub>G\<^esub>)"
    25   where "inv\<^bsub>G\<^esub> x = (THE y. y \<in> carrier G & x \<otimes>\<^bsub>G\<^esub> y = \<one>\<^bsub>G\<^esub> & y \<otimes>\<^bsub>G\<^esub> x = \<one>\<^bsub>G\<^esub>)"
    26 
    26 
    27 definition
    27 definition
    28   Units :: "_ => 'a set"
    28   Units :: "_ => 'a set"
    29   --\<open>The set of invertible elements\<close>
    29   \<comment>\<open>The set of invertible elements\<close>
    30   where "Units G = {y. y \<in> carrier G & (\<exists>x \<in> carrier G. x \<otimes>\<^bsub>G\<^esub> y = \<one>\<^bsub>G\<^esub> & y \<otimes>\<^bsub>G\<^esub> x = \<one>\<^bsub>G\<^esub>)}"
    30   where "Units G = {y. y \<in> carrier G & (\<exists>x \<in> carrier G. x \<otimes>\<^bsub>G\<^esub> y = \<one>\<^bsub>G\<^esub> & y \<otimes>\<^bsub>G\<^esub> x = \<one>\<^bsub>G\<^esub>)}"
    31 
    31 
    32 consts
    32 consts
    33   pow :: "[('a, 'm) monoid_scheme, 'a, 'b::semiring_1] => 'a"  (infixr "'(^')\<index>" 75)
    33   pow :: "[('a, 'm) monoid_scheme, 'a, 'b::semiring_1] => 'a"  (infixr "'(^')\<index>" 75)
    34 
    34 
    96     unfolding Units_def by fast
    96     unfolding Units_def by fast
    97   from x y xinv yinv have "y' \<otimes> (x' \<otimes> x) \<otimes> y = \<one>" by simp
    97   from x y xinv yinv have "y' \<otimes> (x' \<otimes> x) \<otimes> y = \<one>" by simp
    98   moreover from x y xinv yinv have "x \<otimes> (y \<otimes> y') \<otimes> x' = \<one>" by simp
    98   moreover from x y xinv yinv have "x \<otimes> (y \<otimes> y') \<otimes> x' = \<one>" by simp
    99   moreover note x y
    99   moreover note x y
   100   ultimately show ?thesis unfolding Units_def
   100   ultimately show ?thesis unfolding Units_def
   101     -- "Must avoid premature use of @{text hyp_subst_tac}."
   101     \<comment> "Must avoid premature use of \<open>hyp_subst_tac\<close>."
   102     apply (rule_tac CollectI)
   102     apply (rule_tac CollectI)
   103     apply (rule)
   103     apply (rule)
   104     apply (fast)
   104     apply (fast)
   105     apply (rule bexI [where x = "y' \<otimes> x'"])
   105     apply (rule bexI [where x = "y' \<otimes> x'"])
   106     apply (auto simp: m_assoc)
   106     apply (auto simp: m_assoc)
   484     done
   484     done
   485 qed
   485 qed
   486 
   486 
   487 text \<open>
   487 text \<open>
   488   Since @{term H} is nonempty, it contains some element @{term x}.  Since
   488   Since @{term H} is nonempty, it contains some element @{term x}.  Since
   489   it is closed under inverse, it contains @{text "inv x"}.  Since
   489   it is closed under inverse, it contains \<open>inv x\<close>.  Since
   490   it is closed under product, it contains @{text "x \<otimes> inv x = \<one>"}.
   490   it is closed under product, it contains \<open>x \<otimes> inv x = \<one>\<close>.
   491 \<close>
   491 \<close>
   492 
   492 
   493 lemma (in group) one_in_subset:
   493 lemma (in group) one_in_subset:
   494   "[| H \<subseteq> carrier G; H \<noteq> {}; \<forall>a \<in> H. inv a \<in> H; \<forall>a\<in>H. \<forall>b\<in>H. a \<otimes> b \<in> H |]
   494   "[| H \<subseteq> carrier G; H \<noteq> {}; \<forall>a \<in> H. inv a \<in> H; \<forall>a\<in>H. \<forall>b\<in>H. a \<otimes> b \<in> H |]
   495    ==> \<one> \<in> H"
   495    ==> \<one> \<in> H"