src/HOL/Tools/res_clause.ML
changeset 20418 7c1aa7872266
parent 20038 73231d03a2ac
child 20422 35a6a4c863f1
equal deleted inserted replaced
20417:c611b1412056 20418:7c1aa7872266
   438   | get_tvar_strs ((FOLTVar indx,s)::tss) = 
   438   | get_tvar_strs ((FOLTVar indx,s)::tss) = 
   439       (make_schematic_type_var indx) ins (get_tvar_strs tss)
   439       (make_schematic_type_var indx) ins (get_tvar_strs tss)
   440   | get_tvar_strs((FOLTFree x,s)::tss) = get_tvar_strs tss
   440   | get_tvar_strs((FOLTFree x,s)::tss) = get_tvar_strs tss
   441 
   441 
   442 (* check if a clause is first-order before making a conjecture clause*)
   442 (* check if a clause is first-order before making a conjecture clause*)
   443 fun make_conjecture_clause n thm =
   443 fun make_conjecture_clause n th =
   444     let val t = prop_of thm
   444   if Meson.is_fol_term (prop_of th) then make_clause(n, "conjecture", th, Conjecture)
   445 	val _ = check_is_fol_term t
   445   else raise CLAUSE("Goal is not FOL", prop_of th);
   446 	    handle TERM("check_is_fol_term",_) => raise CLAUSE("Goal is not FOL",t)
   446   
   447     in
       
   448 	make_clause(n, "conjecture", thm, Conjecture)
       
   449     end;
       
   450     
       
   451 fun make_conjecture_clauses_aux _ [] = []
   447 fun make_conjecture_clauses_aux _ [] = []
   452   | make_conjecture_clauses_aux n (t::ts) =
   448   | make_conjecture_clauses_aux n (t::ts) =
   453       make_conjecture_clause n t :: make_conjecture_clauses_aux (n+1) ts
   449       make_conjecture_clause n t :: make_conjecture_clauses_aux (n+1) ts
   454 
   450 
   455 val make_conjecture_clauses = make_conjecture_clauses_aux 0
   451 val make_conjecture_clauses = make_conjecture_clauses_aux 0