src/HOL/HOLCF/Cpo.thy
changeset 83547 db80ee4abed1
parent 83546 777c39896f31
equal deleted inserted replaced
83546:777c39896f31 83547:db80ee4abed1
  1107 simproc_setup apply_cont (\<open>cont (\<lambda>f. E f)\<close>) = \<open>
  1107 simproc_setup apply_cont (\<open>cont (\<lambda>f. E f)\<close>) = \<open>
  1108   fn _ => fn ctxt => fn lhs =>
  1108   fn _ => fn ctxt => fn lhs =>
  1109     (case Thm.term_of lhs of
  1109     (case Thm.term_of lhs of
  1110       \<^Const_>\<open>cont _ _ for \<open>Abs (_, _, expr)\<close>\<close> =>
  1110       \<^Const_>\<open>cont _ _ for \<open>Abs (_, _, expr)\<close>\<close> =>
  1111         if case strip_comb expr of (f, args) =>
  1111         if case strip_comb expr of (f, args) =>
  1112               f = Bound 0 andalso not (exists (fn t => loose_bvar1 (t,0)) args)
  1112               f = Bound 0 andalso not (exists Term.is_dependent args)
  1113         (* since \<open>\<lambda>f. E f\<close> is too permissive, we ensure here that the term
  1113         (* since \<open>\<lambda>f. E f\<close> is too permissive, we ensure here that the term
  1114            is of the form \<open>\<lambda>f. f \<dots>\<close>, with \<open>f\<close> no longer appearing in \<open>\<dots>\<close> *)
  1114            is of the form \<open>\<lambda>f. f \<dots>\<close>, with \<open>f\<close> no longer appearing in \<open>\<dots>\<close> *)
  1115         then
  1115         then
  1116           let
  1116           let
  1117             val tac = Metis_Tactic.metis_tac ["no_types"] "combs" ctxt @{thms cont2cont_fun cont_id}
  1117             val tac = Metis_Tactic.metis_tac ["no_types"] "combs" ctxt @{thms cont2cont_fun cont_id}