src/HOL/Tools/meson.ML
changeset 19046 bc5c6c9b114e
parent 18817 ad8bc3e55aa3
child 19112 f81f8706cd37
equal deleted inserted replaced
19045:75786c2eb897 19046:bc5c6c9b114e
   418 
   418 
   419 
   419 
   420 (*Convert a list of clauses (disjunctions) to Horn clauses (contrapositives)*)
   420 (*Convert a list of clauses (disjunctions) to Horn clauses (contrapositives)*)
   421 fun make_horns ths =
   421 fun make_horns ths =
   422     name_thms "Horn#"
   422     name_thms "Horn#"
   423       (gen_distinct Drule.eq_thm_prop (foldr (add_contras clause_rules) [] ths));
   423       (distinct Drule.eq_thm_prop (foldr (add_contras clause_rules) [] ths));
   424 
   424 
   425 (*Could simply use nprems_of, which would count remaining subgoals -- no
   425 (*Could simply use nprems_of, which would count remaining subgoals -- no
   426   discrimination as to their size!  With BEST_FIRST, fails for problem 41.*)
   426   discrimination as to their size!  With BEST_FIRST, fails for problem 41.*)
   427 
   427 
   428 fun best_prolog_tac sizef horns =
   428 fun best_prolog_tac sizef horns =
   523 fun make_meta_clause th = 
   523 fun make_meta_clause th = 
   524     negated_asm_of_head (make_horn resolution_clause_rules (check_is_fol th));
   524     negated_asm_of_head (make_horn resolution_clause_rules (check_is_fol th));
   525 
   525 
   526 fun make_meta_clauses ths =
   526 fun make_meta_clauses ths =
   527     name_thms "MClause#"
   527     name_thms "MClause#"
   528       (gen_distinct Drule.eq_thm_prop (map make_meta_clause ths));
   528       (distinct Drule.eq_thm_prop (map make_meta_clause ths));
   529 
   529 
   530 (*Permute a rule's premises to move the i-th premise to the last position.*)
   530 (*Permute a rule's premises to move the i-th premise to the last position.*)
   531 fun make_last i th =
   531 fun make_last i th =
   532   let val n = nprems_of th 
   532   let val n = nprems_of th 
   533   in  if 1 <= i andalso i <= n 
   533   in  if 1 <= i andalso i <= n