src/HOL/Tools/BNF/bnf_lfp_size.ML
changeset 72450 24bd1316eaae
parent 72154 2b41b710f6ef
child 74561 8e6c973003c8
equal deleted inserted replaced
72449:e1ee4a9902bd 72450:24bd1316eaae
   206 
   206 
   207       val nested_size_gen_o_maps_complete = forall (not o null) nested_size_gen_o_mapss;
   207       val nested_size_gen_o_maps_complete = forall (not o null) nested_size_gen_o_mapss;
   208       val nested_size_gen_o_maps = fold (union Thm.eq_thm_prop) nested_size_gen_o_mapss [];
   208       val nested_size_gen_o_maps = fold (union Thm.eq_thm_prop) nested_size_gen_o_mapss [];
   209 
   209 
   210       val ((raw_size_consts, raw_size_defs), (lthy1, lthy1_old)) = lthy0
   210       val ((raw_size_consts, raw_size_defs), (lthy1, lthy1_old)) = lthy0
   211         |> Local_Theory.open_target
   211         |> (snd o Local_Theory.begin_nested)
   212         |> apfst split_list o @{fold_map 2} (fn b => fn rhs =>
   212         |> apfst split_list o @{fold_map 2} (fn b => fn rhs =>
   213             Local_Theory.define ((b, NoSyn), ((maybe_conceal_def_binding b, []), rhs))
   213             Local_Theory.define ((b, NoSyn), ((maybe_conceal_def_binding b, []), rhs))
   214             #>> apsnd snd)
   214             #>> apsnd snd)
   215           size_bs size_rhss
   215           size_bs size_rhss
   216         ||> `Local_Theory.close_target;
   216         ||> `Local_Theory.end_nested;
   217 
   217 
   218       val phi = Proof_Context.export_morphism lthy1_old lthy1;
   218       val phi = Proof_Context.export_morphism lthy1_old lthy1;
   219 
   219 
   220       val size_defs = map (Morphism.thm phi) raw_size_defs;
   220       val size_defs = map (Morphism.thm phi) raw_size_defs;
   221 
   221