366 SOME s' => |
366 SOME s' => |
367 let val s' = s' |> unprefix_fact_number |> unascii_of in |
367 let val s' = s' |> unprefix_fact_number |> unascii_of in |
368 s' |> find_first_in_list_vector fact_names |> Option.map (pair s') |
368 s' |> find_first_in_list_vector fact_names |> Option.map (pair s') |
369 end |
369 end |
370 | NONE => NONE |
370 | NONE => NONE |
|
371 |
371 fun resolve_fact fact_names = map_filter (resolve_one_named_fact fact_names) |
372 fun resolve_fact fact_names = map_filter (resolve_one_named_fact fact_names) |
372 fun is_fact fact_names = not o null o resolve_fact fact_names |
|
373 |
373 |
374 fun resolve_one_named_conjecture s = |
374 fun resolve_one_named_conjecture s = |
375 case try (unprefix conjecture_prefix) s of |
375 case try (unprefix conjecture_prefix) s of |
376 SOME s' => Int.fromString s' |
376 SOME s' => Int.fromString s' |
377 | NONE => NONE |
377 | NONE => NONE |
378 |
378 |
379 val resolve_conjecture = map_filter resolve_one_named_conjecture |
379 val resolve_conjecture = map_filter resolve_one_named_conjecture |
380 val is_conjecture = not o null o resolve_conjecture |
|
381 |
380 |
382 fun is_axiom_used_in_proof pred = |
381 fun is_axiom_used_in_proof pred = |
383 exists (fn ((_, ss), _, _, _, []) => exists pred ss | _ => false) |
382 exists (fn ((_, ss), _, _, _, []) => exists pred ss | _ => false) |
384 |
383 |
385 fun add_non_rec_defs fact_names accum = |
384 fun add_non_rec_defs fact_names accum = |
426 |
425 |
427 fun used_facts_in_unsound_atp_proof _ _ [] = NONE |
426 fun used_facts_in_unsound_atp_proof _ _ [] = NONE |
428 | used_facts_in_unsound_atp_proof ctxt fact_names atp_proof = |
427 | used_facts_in_unsound_atp_proof ctxt fact_names atp_proof = |
429 let val used_facts = used_facts_in_atp_proof ctxt fact_names atp_proof in |
428 let val used_facts = used_facts_in_atp_proof ctxt fact_names atp_proof in |
430 if forall (fn (_, (sc, _)) => sc = Global) used_facts andalso |
429 if forall (fn (_, (sc, _)) => sc = Global) used_facts andalso |
431 not (is_axiom_used_in_proof (is_conjecture o single) atp_proof) then |
430 not (is_axiom_used_in_proof (not o null o resolve_conjecture o single) atp_proof) then |
432 SOME (map fst used_facts) |
431 SOME (map fst used_facts) |
433 else |
432 else |
434 NONE |
433 NONE |
435 end |
434 end |
436 |
435 |