src/CCL/CCL.thy
changeset 42480 f4f011d1bf0b
parent 42156 df219e736a5d
child 42814 5af15f1e2ef6
equal deleted inserted replaced
42479:b7c9f09d4d88 42480:f4f011d1bf0b
   243   fun mk_thm_str thy a b = "~ " ^ (saturate thy a "a") ^ " = " ^ (saturate thy b "b")
   243   fun mk_thm_str thy a b = "~ " ^ (saturate thy a "a") ^ " = " ^ (saturate thy b "b")
   244 
   244 
   245   val lemma = @{thm lem};
   245   val lemma = @{thm lem};
   246   val eq_lemma = @{thm eq_lemma};
   246   val eq_lemma = @{thm eq_lemma};
   247   val distinctness = @{thm distinctness};
   247   val distinctness = @{thm distinctness};
   248   fun mk_lemma (ra,rb) = [lemma] RL [ra RS (rb RS eq_lemma)] RL
   248   fun mk_lemma (ra,rb) =
   249                            [distinctness RS notE, @{thm sym} RS (distinctness RS notE)]
   249     [lemma] RL [ra RS (rb RS eq_lemma)] RL
       
   250     [distinctness RS @{thm notE}, @{thm sym} RS (distinctness RS @{thm notE})]
   250 in
   251 in
   251   fun mk_lemmas rls = maps mk_lemma (mk_combs pair rls)
   252   fun mk_lemmas rls = maps mk_lemma (mk_combs pair rls)
   252   fun mk_dstnct_rls thy xs = mk_combs (mk_thm_str thy) xs
   253   fun mk_dstnct_rls thy xs = mk_combs (mk_thm_str thy) xs
   253 end
   254 end
   254 
   255 
   277 
   278 
   278 fun mkall_dstnct_thms thy defs i_rls xss = maps (mk_dstnct_thms thy defs i_rls) xss
   279 fun mkall_dstnct_thms thy defs i_rls xss = maps (mk_dstnct_thms thy defs i_rls) xss
   279 
   280 
   280 (*** Rewriting and Proving ***)
   281 (*** Rewriting and Proving ***)
   281 
   282 
   282 fun XH_to_I rl = rl RS iffD2
   283 fun XH_to_I rl = rl RS @{thm iffD2}
   283 fun XH_to_D rl = rl RS iffD1
   284 fun XH_to_D rl = rl RS @{thm iffD1}
   284 val XH_to_E = make_elim o XH_to_D
   285 val XH_to_E = make_elim o XH_to_D
   285 val XH_to_Is = map XH_to_I
   286 val XH_to_Is = map XH_to_I
   286 val XH_to_Ds = map XH_to_D
   287 val XH_to_Ds = map XH_to_D
   287 val XH_to_Es = map XH_to_E;
   288 val XH_to_Es = map XH_to_E;
   288 
   289 
   289 bind_thms ("ccl_rews", @{thms caseBs} @ @{thms ccl_injs} @ ccl_dstncts);
   290 bind_thms ("ccl_rews", @{thms caseBs} @ @{thms ccl_injs} @ ccl_dstncts);
   290 bind_thms ("ccl_dstnctsEs", ccl_dstncts RL [notE]);
   291 bind_thms ("ccl_dstnctsEs", ccl_dstncts RL [@{thm notE}]);
   291 bind_thms ("ccl_injDs", XH_to_Ds @{thms ccl_injs});
   292 bind_thms ("ccl_injDs", XH_to_Ds @{thms ccl_injs});
   292 *}
   293 *}
   293 
   294 
   294 lemmas [simp] = ccl_rews
   295 lemmas [simp] = ccl_rews
   295   and [elim!] = pair_inject ccl_dstnctsEs
   296   and [elim!] = pair_inject ccl_dstnctsEs