src/Tools/Code/code_runtime.ML
changeset 59621 291934bac95e
parent 59155 a9a5ddfc2aad
child 59633 a372513af1e2
equal deleted inserted replaced
59620:92d7d8e4f1bf 59621:291934bac95e
   175     val thy = Proof_Context.theory_of ctxt;
   175     val thy = Proof_Context.theory_of ctxt;
   176     val t = Thm.term_of ct;
   176     val t = Thm.term_of ct;
   177     val _ = if fastype_of t <> propT
   177     val _ = if fastype_of t <> propT
   178       then error ("Not a proposition: " ^ Syntax.string_of_term_global thy t)
   178       then error ("Not a proposition: " ^ Syntax.string_of_term_global thy t)
   179       else ();
   179       else ();
   180     val iff = Thm.cterm_of thy (Term.Const (@{const_name Pure.eq}, propT --> propT --> propT));
   180     val iff = Thm.global_cterm_of thy (Term.Const (@{const_name Pure.eq}, propT --> propT --> propT));
   181     val result = case partiality_as_none (evaluation truth_cookie ctxt evaluator vs_t [])
   181     val result = case partiality_as_none (evaluation truth_cookie ctxt evaluator vs_t [])
   182      of SOME Holds => true
   182      of SOME Holds => true
   183       | _ => false;
   183       | _ => false;
   184   in
   184   in
   185     Thm.mk_binop iff ct (if result then @{cprop "PROP Code_Generator.holds"} else ct)
   185     Thm.mk_binop iff ct (if result then @{cprop "PROP Code_Generator.holds"} else ct)