6
|
1 |
theory Prove
|
|
2 |
imports Main
|
|
3 |
begin
|
|
4 |
|
|
5 |
ML {*
|
|
6 |
val r = ref (NONE:(unit -> term) option)
|
|
7 |
*}
|
46
|
8 |
|
6
|
9 |
ML {*
|
|
10 |
let
|
|
11 |
fun setup_proof (txt, pos) lthy =
|
|
12 |
let
|
|
13 |
val trm = ML_Context.evaluate lthy true ("r", r) txt
|
|
14 |
in
|
|
15 |
Proof.theorem_i NONE (K I) [[(trm,[])]] lthy
|
|
16 |
end;
|
|
17 |
|
|
18 |
val setup_proof_parser = OuterParse.ML_source >> setup_proof
|
|
19 |
|
|
20 |
val kind = OuterKeyword.thy_goal
|
|
21 |
in
|
46
|
22 |
OuterSyntax.local_theory_to_proof "prove" "proving a proposition"
|
6
|
23 |
kind setup_proof_parser
|
|
24 |
end
|
|
25 |
*}
|
|
26 |
|
46
|
27 |
|
|
28 |
|
6
|
29 |
end
|