Quotient Package / lemma for regularization of bex1_rel for equivalence relations
--- a/src/HOL/Quotient.thy Tue Aug 24 20:09:30 2010 +0200
+++ b/src/HOL/Quotient.thy Wed Aug 25 11:17:33 2010 +0900
@@ -571,7 +571,8 @@
apply metis
done
-lemma bex1_bexeq_reg: "(\<exists>!x\<in>Respects R. P x) \<longrightarrow> (Bex1_rel R (\<lambda>x. P x))"
+lemma bex1_bexeq_reg:
+ shows "(\<exists>!x\<in>Respects R. P x) \<longrightarrow> (Bex1_rel R (\<lambda>x. P x))"
apply (simp add: Ex1_def Bex1_rel_def in_respects)
apply clarify
apply auto
@@ -582,6 +583,23 @@
apply auto
done
+lemma bex1_bexeq_reg_eqv:
+ assumes a: "equivp R"
+ shows "(\<exists>!x. P x) \<longrightarrow> Bex1_rel R P"
+ using equivp_reflp[OF a]
+ apply (intro impI)
+ apply (elim ex1E)
+ apply (rule mp[OF bex1_bexeq_reg])
+ apply (rule_tac a="x" in ex1I)
+ apply (subst in_respects)
+ apply (rule conjI)
+ apply assumption
+ apply assumption
+ apply clarify
+ apply (erule_tac x="xa" in allE)
+ apply simp
+ done
+
subsection {* Various respects and preserve lemmas *}
lemma quot_rel_rsp: