author | webertj |
Tue, 26 Mar 2013 16:41:31 +0100 | |
changeset 3213 | a8724924a62e |
parent 2171 | 9697bbf713ec |
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 = |
2171 | 12 |
Local_Theory.note (thm_name, (flat thms)) lthy |> snd |
13 |
fun setup_proof (name_spec, (txt, _)) lthy = |
|
48 | 14 |
let |
15 |
val trm = ML_Context.evaluate lthy true ("r", r) txt |
|
16 |
in |
|
1949
0b692f37a771
changed theorem_i to theorem....requires new Isabelle
Christian Urban <urbanc@in.tum.de>
parents:
948
diff
changeset
|
17 |
Proof.theorem NONE (after_qed name_spec) [[(trm,[])]] lthy |
57 | 18 |
end |
6 | 19 |
|
2171 | 20 |
val parser = Parse_Spec.opt_thm_name ":" -- Parse.ML_source |
6 | 21 |
in |
2171 | 22 |
Outer_Syntax.local_theory_to_proof "prove" "proving a proposition" |
23 |
Keyword.thy_goal (parser >> setup_proof) |
|
6 | 24 |
end |
25 |
*} |
|
26 |
||
27 |
end |