src/HOLCF/Pcpo.thy
changeset 31024 0fdf666e08bf
parent 29634 2baf1b2f6655
child 31071 845a6acd3bf3
equal deleted inserted replaced
31023:d027411c9a38 31024:0fdf666e08bf
   191 done
   191 done
   192 
   192 
   193 lemma minimal [iff]: "\<bottom> \<sqsubseteq> x"
   193 lemma minimal [iff]: "\<bottom> \<sqsubseteq> x"
   194 by (rule UU_least [THEN spec])
   194 by (rule UU_least [THEN spec])
   195 
   195 
   196 lemma UU_reorient: "(\<bottom> = x) = (x = \<bottom>)"
   196 text {* Simproc to rewrite @{term "\<bottom> = x"} to @{term "x = \<bottom>"}. *}
   197 by auto
   197 
   198 
   198 setup {*
   199 ML {*
   199   ReorientProc.add
   200 local
   200     (fn Const(@{const_name UU}, _) => true | _ => false)
   201   val meta_UU_reorient = thm "UU_reorient" RS eq_reflection;
       
   202   fun reorient_proc sg _ (_ $ t $ u) =
       
   203     case u of
       
   204         Const("Pcpo.UU",_) => NONE
       
   205       | Const("HOL.zero", _) => NONE
       
   206       | Const("HOL.one", _) => NONE
       
   207       | Const("Numeral.number_of", _) $ _ => NONE
       
   208       | _ => SOME meta_UU_reorient;
       
   209 in
       
   210   val UU_reorient_simproc = 
       
   211     Simplifier.simproc (the_context ()) "UU_reorient_simproc" ["UU=x"] reorient_proc
       
   212 end;
       
   213 
       
   214 Addsimprocs [UU_reorient_simproc];
       
   215 *}
   201 *}
       
   202 
       
   203 simproc_setup reorient_bottom ("\<bottom> = x") = ReorientProc.proc
   216 
   204 
   217 text {* useful lemmas about @{term \<bottom>} *}
   205 text {* useful lemmas about @{term \<bottom>} *}
   218 
   206 
   219 lemma less_UU_iff [simp]: "(x \<sqsubseteq> \<bottom>) = (x = \<bottom>)"
   207 lemma less_UU_iff [simp]: "(x \<sqsubseteq> \<bottom>) = (x = \<bottom>)"
   220 by (simp add: po_eq_conv)
   208 by (simp add: po_eq_conv)