equal
deleted
inserted
replaced
31 val transform_ctxt: morphism -> context_i -> context_i |
31 val transform_ctxt: morphism -> context_i -> context_i |
32 val pretty_stmt: Proof.context -> statement_i -> Pretty.T list |
32 val pretty_stmt: Proof.context -> statement_i -> Pretty.T list |
33 val pretty_ctxt: Proof.context -> context_i -> Pretty.T list |
33 val pretty_ctxt: Proof.context -> context_i -> Pretty.T list |
34 val pretty_ctxt_no_attribs: Proof.context -> context_i -> Pretty.T list |
34 val pretty_ctxt_no_attribs: Proof.context -> context_i -> Pretty.T list |
35 val pretty_statement: Proof.context -> string -> thm -> Pretty.T |
35 val pretty_statement: Proof.context -> string -> thm -> Pretty.T |
36 val close_form: Proof.context -> (string -> string option) -> (string -> typ option) -> |
|
37 term -> term |
|
38 type witness |
36 type witness |
39 val prove_witness: Proof.context -> term -> tactic -> witness |
37 val prove_witness: Proof.context -> term -> tactic -> witness |
40 val witness_proof: (witness list list -> Proof.context -> Proof.context) -> |
38 val witness_proof: (witness list list -> Proof.context -> Proof.context) -> |
41 term list list -> Proof.context -> Proof.state |
39 term list list -> Proof.context -> Proof.state |
42 val witness_proof_eqs: (witness list list -> thm list -> Proof.context -> Proof.context) -> |
40 val witness_proof_eqs: (witness list list -> thm list -> Proof.context -> Proof.context) -> |
248 end |> thm_name kind raw_th; |
246 end |> thm_name kind raw_th; |
249 |
247 |
250 end; |
248 end; |
251 |
249 |
252 |
250 |
253 (** abstract syntax operations: before type-inference **) |
|
254 |
|
255 fun close_form ctxt default_name default_type A = |
|
256 let |
|
257 fun abs_body lev y (Abs (x, T, b)) = Abs (x, T, abs_body (lev + 1) y b) |
|
258 | abs_body lev y (t $ u) = abs_body lev y t $ abs_body lev y u |
|
259 | abs_body lev y (t as Free (x, T)) = |
|
260 if x = y then |
|
261 Type.constraint (the_default dummyT (default_type x)) |
|
262 (Type.constraint T (Bound lev)) |
|
263 else t |
|
264 | abs_body _ _ a = a; |
|
265 fun close y B = |
|
266 let |
|
267 val y' = perhaps default_name y; |
|
268 val B' = abs_body 0 y (Term.incr_boundvars 1 B); |
|
269 in if Term.is_dependent B' then Logic.all_const dummyT $ Abs (y', dummyT, B') else B end; |
|
270 in fold close (Variable.add_free_names ctxt A []) A end; |
|
271 |
|
272 |
|
273 |
251 |
274 (** logical operations **) |
252 (** logical operations **) |
275 |
253 |
276 (* witnesses -- hypotheses as protected facts *) |
254 (* witnesses -- hypotheses as protected facts *) |
277 |
255 |