equal
deleted
inserted
replaced
30 val hidden_polymorphism: term -> typ -> (indexname * sort) list |
30 val hidden_polymorphism: term -> typ -> (indexname * sort) list |
31 val add_binds: (indexname * term option) list -> Proof.context -> Proof.context |
31 val add_binds: (indexname * term option) list -> Proof.context -> Proof.context |
32 val expand_binds: Proof.context -> term -> term |
32 val expand_binds: Proof.context -> term -> term |
33 val add_fixes: string list -> Proof.context -> string list * Proof.context |
33 val add_fixes: string list -> Proof.context -> string list * Proof.context |
34 val add_fixes_direct: string list -> Proof.context -> Proof.context |
34 val add_fixes_direct: string list -> Proof.context -> Proof.context |
35 val fix_frees: term -> Proof.context -> Proof.context |
35 val auto_fixes: term -> Proof.context -> Proof.context |
36 val variant_fixes: string list -> Proof.context -> string list * Proof.context |
36 val variant_fixes: string list -> Proof.context -> string list * Proof.context |
37 val invent_types: sort list -> Proof.context -> (string * sort) list * Proof.context |
37 val invent_types: sort list -> Proof.context -> (string * sort) list * Proof.context |
38 val export_inst: Proof.context -> Proof.context -> string list * string list |
38 val export_inst: Proof.context -> Proof.context -> string list * string list |
39 val exportT_inst: Proof.context -> Proof.context -> string list |
39 val exportT_inst: Proof.context -> Proof.context -> string list |
40 val export_terms: Proof.context -> Proof.context -> term list -> term list |
40 val export_terms: Proof.context -> Proof.context -> term list -> term list |
293 |> restore_body ctxt; |
293 |> restore_body ctxt; |
294 |
294 |
295 fun fix_frees t ctxt = ctxt |
295 fun fix_frees t ctxt = ctxt |
296 |> add_fixes_direct |
296 |> add_fixes_direct |
297 (rev (fold_aterms (fn Free (x, _) => |
297 (rev (fold_aterms (fn Free (x, _) => |
298 if is_fixed ctxt x then I else insert (op =) x | _ => I) t [])) |
298 if is_fixed ctxt x then I else insert (op =) x | _ => I) t [])); |
|
299 |
|
300 fun auto_fixes t ctxt = |
|
301 (if is_body ctxt then ctxt else fix_frees t ctxt) |
299 |> declare_term t; |
302 |> declare_term t; |
300 |
303 |
301 fun invent_types Ss ctxt = |
304 fun invent_types Ss ctxt = |
302 let |
305 let |
303 val tfrees = Name.invents (names_of ctxt) "'a" (length Ss) ~~ Ss; |
306 val tfrees = Name.invents (names_of ctxt) "'a" (length Ss) ~~ Ss; |