equal
deleted
inserted
replaced
64 val get_type: theory -> string |
64 val get_type: theory -> string |
65 -> ((string * sort) list * (string * ((string * sort) list * typ list)) list) * bool |
65 -> ((string * sort) list * (string * ((string * sort) list * typ list)) list) * bool |
66 val get_type_of_constr_or_abstr: theory -> string -> (string * bool) option |
66 val get_type_of_constr_or_abstr: theory -> string -> (string * bool) option |
67 val is_constr: theory -> string -> bool |
67 val is_constr: theory -> string -> bool |
68 val is_abstr: theory -> string -> bool |
68 val is_abstr: theory -> string -> bool |
69 val get_cert: theory -> { functrans: ((thm * bool) list -> (thm * bool) list option) list, |
69 val get_cert: Proof.context -> ((thm * bool) list -> (thm * bool) list option) list |
70 ss: simpset } -> string -> cert |
70 -> string -> cert |
71 val get_case_scheme: theory -> string -> (int * (int * string option list)) option |
71 val get_case_scheme: theory -> string -> (int * (int * string option list)) option |
72 val get_case_cong: theory -> string -> thm option |
72 val get_case_cong: theory -> string -> thm option |
73 val undefineds: theory -> string list |
73 val undefineds: theory -> string list |
74 val print_codesetup: theory -> unit |
74 val print_codesetup: theory -> unit |
75 end; |
75 end; |
920 fun cert_of_eqns_preprocess ctxt functrans c = |
920 fun cert_of_eqns_preprocess ctxt functrans c = |
921 perhaps (perhaps_loop (perhaps_apply functrans)) |
921 perhaps (perhaps_loop (perhaps_apply functrans)) |
922 #> (map o apfst) (preprocess eqn_conv ctxt) |
922 #> (map o apfst) (preprocess eqn_conv ctxt) |
923 #> cert_of_eqns ctxt c; |
923 #> cert_of_eqns ctxt c; |
924 |
924 |
925 fun get_cert thy { functrans, ss } c = |
925 fun get_cert ctxt functrans c = |
926 let |
926 let |
927 val ctxt = thy |> Proof_Context.init_global |> put_simpset ss; |
927 val thy = Proof_Context.theory_of ctxt; |
928 in |
928 in |
929 case retrieve_raw thy c of |
929 case retrieve_raw thy c of |
930 Default (_, eqns_lazy) => Lazy.force eqns_lazy |
930 Default (_, eqns_lazy) => Lazy.force eqns_lazy |
931 |> cert_of_eqns_preprocess ctxt functrans c |
931 |> cert_of_eqns_preprocess ctxt functrans c |
932 | Eqns eqns => eqns |
932 | Eqns eqns => eqns |