src/HOLCF/Tools/Domain/domain_take_proofs.ML
changeset 35573 bd8b50e76e94
parent 35572 44eeda8cb708
child 35594 47d68e33ca29
equal deleted inserted replaced
35572:44eeda8cb708 35573:bd8b50e76e94
   186     |> Sign.add_path path
   186     |> Sign.add_path path
   187     |> yield_singleton PureThy.add_thms
   187     |> yield_singleton PureThy.add_thms
   188         (Thm.no_attributes (Binding.name name, thm))
   188         (Thm.no_attributes (Binding.name name, thm))
   189     ||> Sign.parent_path;
   189     ||> Sign.parent_path;
   190 
   190 
       
   191 fun add_qualified_simp_thm name (path, thm) thy =
       
   192     thy
       
   193     |> Sign.add_path path
       
   194     |> yield_singleton PureThy.add_thms
       
   195         ((Binding.name name, thm), [Simplifier.simp_add])
       
   196     ||> Sign.parent_path;
       
   197 
   191 (******************************************************************************)
   198 (******************************************************************************)
   192 (************************** defining take functions ***************************)
   199 (************************** defining take functions ***************************)
   193 (******************************************************************************)
   200 (******************************************************************************)
   194 
   201 
   195 fun define_take_functions
   202 fun define_take_functions
   262         val goal = mk_trp (mk_chain take_const);
   269         val goal = mk_trp (mk_chain take_const);
   263         val rules = take_defs @ @{thms chain_iterate ch2ch_fst ch2ch_snd};
   270         val rules = take_defs @ @{thms chain_iterate ch2ch_fst ch2ch_snd};
   264         val tac = simp_tac (HOL_basic_ss addsimps rules) 1;
   271         val tac = simp_tac (HOL_basic_ss addsimps rules) 1;
   265         val thm = Goal.prove_global thy [] [] goal (K tac);
   272         val thm = Goal.prove_global thy [] [] goal (K tac);
   266       in
   273       in
   267         thy
   274         add_qualified_simp_thm "chain_take" (dname, thm) thy
   268           |> Sign.add_path dname
       
   269           |> yield_singleton PureThy.add_thms
       
   270               ((Binding.name "chain_take", thm), [Simplifier.simp_add])
       
   271           ||> Sign.parent_path
       
   272       end;
   275       end;
   273     val (chain_take_thms, thy) =
   276     val (chain_take_thms, thy) =
   274       fold_map prove_chain_take (take_consts ~~ dnames) thy;
   277       fold_map prove_chain_take (take_consts ~~ dnames) thy;
   275 
   278 
   276     (* prove take_0 lemmas *)
   279     (* prove take_0 lemmas *)