Attic/Prove.thy
author Cezary Kaliszyk <kaliszyk@in.tum.de>
Thu, 16 Jun 2011 20:56:30 +0900
changeset 2861 5635a968fd3f
parent 2171 9697bbf713ec
permissions -rw-r--r--
Added the CPS translation experiments. CPS1 comes with all the proofs, CPS2,3 just have the function and need eqvt_rhs to finish the obligations.

theory Prove
imports Plain 
begin

ML {*
val r = Unsynchronized.ref (NONE:(unit -> term) option)
*}

ML {*
let
  fun after_qed thm_name thms lthy =
    Local_Theory.note (thm_name, (flat thms)) lthy |> snd
  fun setup_proof (name_spec, (txt, _)) lthy =
  let
    val trm = ML_Context.evaluate lthy true ("r", r) txt
  in
    Proof.theorem NONE (after_qed name_spec) [[(trm,[])]] lthy
  end

  val parser = Parse_Spec.opt_thm_name ":" -- Parse.ML_source
in
  Outer_Syntax.local_theory_to_proof "prove" "proving a proposition" 
    Keyword.thy_goal (parser >> setup_proof)
end
*}

end