2052 |
2052 |
2053 val def_rhs = mk_corec_fun_def_rhs lthy7 arg_Ts corecUU0 corecUU_arg; |
2053 val def_rhs = mk_corec_fun_def_rhs lthy7 arg_Ts corecUU0 corecUU_arg; |
2054 val def = ((b, mx), ((Binding.concealed (Thm.def_binding b), []), def_rhs)); |
2054 val def = ((b, mx), ((Binding.concealed (Thm.def_binding b), []), def_rhs)); |
2055 |
2055 |
2056 val ((fun_lhs0, (_, fun_def0)), (lthy9, lthy8')) = lthy7 |
2056 val ((fun_lhs0, (_, fun_def0)), (lthy9, lthy8')) = lthy7 |
2057 |> Local_Theory.open_target |
2057 |> (snd o Local_Theory.begin_nested) |
2058 |> Local_Theory.define def |
2058 |> Local_Theory.define def |
2059 |> tap (fn (def, lthy') => print_def_consts int [def] lthy') |
2059 |> tap (fn (def, lthy') => print_def_consts int [def] lthy') |
2060 ||> `Local_Theory.close_target; |
2060 ||> `Local_Theory.end_nested; |
2061 |
2061 |
2062 val parsed_eq = parse_corec_equation lthy9 [fun_free] eq; |
2062 val parsed_eq = parse_corec_equation lthy9 [fun_free] eq; |
2063 val views0 = generate_views lthy9 eq fun_free parsed_eq; |
2063 val views0 = generate_views lthy9 eq fun_free parsed_eq; |
2064 |
2064 |
2065 val lthy9' = lthy9 |> fold Variable.declare_typ (res_T :: arg_Ts); |
2065 val lthy9' = lthy9 |> fold Variable.declare_typ (res_T :: arg_Ts); |