src/ZF/ind_syntax.ML
changeset 231 cb6a24451544
parent 202 4e68398cdc06
child 435 ca5356bd315a
equal deleted inserted replaced
230:ec8a2b6aa8a7 231:cb6a24451544
    91 fun mk_tprop P = Trueprop $ P;
    91 fun mk_tprop P = Trueprop $ P;
    92 fun dest_tprop (Const("Trueprop",_) $ P) = P;
    92 fun dest_tprop (Const("Trueprop",_) $ P) = P;
    93 
    93 
    94 (*Prove a goal stated as a term, with exception handling*)
    94 (*Prove a goal stated as a term, with exception handling*)
    95 fun prove_term sign defs (P,tacsf) = 
    95 fun prove_term sign defs (P,tacsf) = 
    96     let val ct = Sign.cterm_of sign P
    96     let val ct = cterm_of sign P
    97     in  prove_goalw_cterm defs ct tacsf
    97     in  prove_goalw_cterm defs ct tacsf
    98 	handle e => (writeln ("Exception in proof of\n" ^
    98 	handle e => (writeln ("Exception in proof of\n" ^
    99 			       Sign.string_of_cterm ct); 
    99 			       string_of_cterm ct); 
   100 		     raise e)
   100 		     raise e)
   101     end;
   101     end;
   102 
   102 
   103 (*Read an assumption in the given theory*)
   103 (*Read an assumption in the given theory*)
   104 fun assume_read thy a = assume (Sign.read_cterm (sign_of thy) (a,propT));
   104 fun assume_read thy a = assume (read_cterm (sign_of thy) (a,propT));
   105 
   105 
   106 (*Make distinct individual variables a1, a2, a3, ..., an. *)
   106 (*Make distinct individual variables a1, a2, a3, ..., an. *)
   107 fun mk_frees a [] = []
   107 fun mk_frees a [] = []
   108   | mk_frees a (T::Ts) = Free(a,T) :: mk_frees (bump_string a) Ts;
   108   | mk_frees a (T::Ts) = Free(a,T) :: mk_frees (bump_string a) Ts;
   109 
   109