equal
deleted
inserted
replaced
121 SomeTerm (list_comb(Const (@{const_name HOL.eq}, HOLogic.typeT), terms_of (map tm_to_tt ts))) |
121 SomeTerm (list_comb(Const (@{const_name HOL.eq}, HOLogic.typeT), terms_of (map tm_to_tt ts))) |
122 | applic_to_tt (a,ts) = |
122 | applic_to_tt (a,ts) = |
123 case strip_prefix_and_unascii const_prefix a of |
123 case strip_prefix_and_unascii const_prefix a of |
124 SOME b => |
124 SOME b => |
125 let |
125 let |
126 val c = invert_const b |
126 val c = b |> invert_const |> unproxify_const |
127 val ntypes = num_type_args thy c |
127 val ntypes = num_type_args thy c |
128 val nterms = length ts - ntypes |
128 val nterms = length ts - ntypes |
129 val tts = map tm_to_tt ts |
129 val tts = map tm_to_tt ts |
130 val tys = types_of (List.take(tts,ntypes)) |
130 val tys = types_of (List.take(tts,ntypes)) |
131 val t = |
131 val t = |
166 (*Maps fully-typed metis terms to isabelle terms*) |
166 (*Maps fully-typed metis terms to isabelle terms*) |
167 fun hol_term_from_metis_FT ctxt fol_tm = |
167 fun hol_term_from_metis_FT ctxt fol_tm = |
168 let val _ = trace_msg ctxt (fn () => "hol_term_from_metis_FT: " ^ |
168 let val _ = trace_msg ctxt (fn () => "hol_term_from_metis_FT: " ^ |
169 Metis_Term.toString fol_tm) |
169 Metis_Term.toString fol_tm) |
170 fun do_const c = |
170 fun do_const c = |
171 let val c = c |> invert_const in |
171 let val c = c |> invert_const |> unproxify_const in |
172 if String.isPrefix new_skolem_const_prefix c then |
172 if String.isPrefix new_skolem_const_prefix c then |
173 Var ((new_skolem_var_name_from_const c, 1), dummyT) |
173 Var ((new_skolem_var_name_from_const c, 1), dummyT) |
174 else |
174 else |
175 Const (c, dummyT) |
175 Const (c, dummyT) |
176 end |
176 end |