src/HOL/Quotient.thy
changeset 35236 fd8231b16203
parent 35222 4f1fba00f66d
child 35294 0e1adc24722f
equal deleted inserted replaced
35235:7c7cfe69d7f6 35236:fd8231b16203
   268 
   268 
   269 text{*
   269 text{*
   270   In the following theorem R1 can be instantiated with anything,
   270   In the following theorem R1 can be instantiated with anything,
   271   but we know some of the types of the Rep and Abs functions;
   271   but we know some of the types of the Rep and Abs functions;
   272   so by solving Quotient assumptions we can get a unique R1 that
   272   so by solving Quotient assumptions we can get a unique R1 that
   273   will be provable; which is why we need to use apply_rsp and
   273   will be provable; which is why we need to use @{text apply_rsp} and
   274   not the primed version *}
   274   not the primed version *}
   275 
   275 
   276 lemma apply_rsp:
   276 lemma apply_rsp:
   277   fixes f g::"'a \<Rightarrow> 'c"
   277   fixes f g::"'a \<Rightarrow> 'c"
   278   assumes q: "Quotient R1 Abs1 Rep1"
   278   assumes q: "Quotient R1 Abs1 Rep1"
   463   assumes a: "Quotient R absf repf"
   463   assumes a: "Quotient R absf repf"
   464   shows "Bex (Respects R) ((absf ---> id) f) = Ex f"
   464   shows "Bex (Respects R) ((absf ---> id) f) = Ex f"
   465   using a unfolding Quotient_def Bex_def in_respects fun_map_def id_apply
   465   using a unfolding Quotient_def Bex_def in_respects fun_map_def id_apply
   466   by metis
   466   by metis
   467 
   467 
   468 section {* Bex1_rel quantifier *}
   468 section {* @{text Bex1_rel} quantifier *}
   469 
   469 
   470 definition
   470 definition
   471   Bex1_rel :: "('a \<Rightarrow> 'a \<Rightarrow> bool) \<Rightarrow> ('a \<Rightarrow> bool) \<Rightarrow> bool"
   471   Bex1_rel :: "('a \<Rightarrow> 'a \<Rightarrow> bool) \<Rightarrow> ('a \<Rightarrow> bool) \<Rightarrow> bool"
   472 where
   472 where
   473   "Bex1_rel R P \<longleftrightarrow> (\<exists>x \<in> Respects R. P x) \<and> (\<forall>x \<in> Respects R. \<forall>y \<in> Respects R. ((P x \<and> P y) \<longrightarrow> (R x y)))"
   473   "Bex1_rel R P \<longleftrightarrow> (\<exists>x \<in> Respects R. P x) \<and> (\<forall>x \<in> Respects R. \<forall>y \<in> Respects R. ((P x \<and> P y) \<longrightarrow> (R x y)))"