src/HOL/Quotient.thy
changeset 38702 72fd257f4343
parent 38317 cb8e2ac6397b
child 38859 053c69cb4a0e
equal deleted inserted replaced
38701:20ff5600bd15 38702:72fd257f4343
   569 apply rule+
   569 apply rule+
   570 using a unfolding Quotient_def in_respects
   570 using a unfolding Quotient_def in_respects
   571 apply metis
   571 apply metis
   572 done
   572 done
   573 
   573 
   574 lemma bex1_bexeq_reg: "(\<exists>!x\<in>Respects R. P x) \<longrightarrow> (Bex1_rel R (\<lambda>x. P x))"
   574 lemma bex1_bexeq_reg:
       
   575   shows "(\<exists>!x\<in>Respects R. P x) \<longrightarrow> (Bex1_rel R (\<lambda>x. P x))"
   575   apply (simp add: Ex1_def Bex1_rel_def in_respects)
   576   apply (simp add: Ex1_def Bex1_rel_def in_respects)
   576   apply clarify
   577   apply clarify
   577   apply auto
   578   apply auto
   578   apply (rule bexI)
   579   apply (rule bexI)
   579   apply assumption
   580   apply assumption
   580   apply (simp add: in_respects)
   581   apply (simp add: in_respects)
   581   apply (simp add: in_respects)
   582   apply (simp add: in_respects)
   582   apply auto
   583   apply auto
       
   584   done
       
   585 
       
   586 lemma bex1_bexeq_reg_eqv:
       
   587   assumes a: "equivp R"
       
   588   shows "(\<exists>!x. P x) \<longrightarrow> Bex1_rel R P"
       
   589   using equivp_reflp[OF a]
       
   590   apply (intro impI)
       
   591   apply (elim ex1E)
       
   592   apply (rule mp[OF bex1_bexeq_reg])
       
   593   apply (rule_tac a="x" in ex1I)
       
   594   apply (subst in_respects)
       
   595   apply (rule conjI)
       
   596   apply assumption
       
   597   apply assumption
       
   598   apply clarify
       
   599   apply (erule_tac x="xa" in allE)
       
   600   apply simp
   583   done
   601   done
   584 
   602 
   585 subsection {* Various respects and preserve lemmas *}
   603 subsection {* Various respects and preserve lemmas *}
   586 
   604 
   587 lemma quot_rel_rsp:
   605 lemma quot_rel_rsp: