author | Cezary Kaliszyk <kaliszyk@in.tum.de> |
Wed, 03 Mar 2010 17:47:29 +0100 | |
changeset 1334 | 80441e27dfd6 |
parent 948 | 25c4223635f4 |
child 1949 | 0b692f37a771 |
permissions | -rw-r--r-- |
6 | 1 |
theory Prove |
549
f178958d3d81
not yet quite functional treatment of constants
Christian Urban <urbanc@in.tum.de>
parents:
319
diff
changeset
|
2 |
imports Plain |
6 | 3 |
begin |
4 |
||
5 |
ML {* |
|
183
6acf9e001038
proved the two lemmas in QuotScript (reformulated them without leading forall)
Christian Urban <urbanc@in.tum.de>
parents:
83
diff
changeset
|
6 |
val r = Unsynchronized.ref (NONE:(unit -> term) option) |
6 | 7 |
*} |
46 | 8 |
|
6 | 9 |
ML {* |
10 |
let |
|
48 | 11 |
fun after_qed thm_name thms lthy = |
319 | 12 |
Local_Theory.note (thm_name, (flat thms)) lthy |> snd |
48 | 13 |
|
14 |
fun setup_proof (name_spec, (txt, pos)) lthy = |
|
15 |
let |
|
16 |
val trm = ML_Context.evaluate lthy true ("r", r) txt |
|
17 |
in |
|
18 |
Proof.theorem_i NONE (after_qed name_spec) [[(trm,[])]] lthy |
|
57 | 19 |
end |
6 | 20 |
|
48 | 21 |
val parser = SpecParse.opt_thm_name ":" -- OuterParse.ML_source |
6 | 22 |
in |
46 | 23 |
OuterSyntax.local_theory_to_proof "prove" "proving a proposition" |
48 | 24 |
OuterKeyword.thy_goal (parser >> setup_proof) |
6 | 25 |
end |
26 |
*} |
|
27 |
||
28 |
end |