64 clsarity). *) |
64 clsarity). *) |
65 fun is_only_type_information t = t aconv @{term True} |
65 fun is_only_type_information t = t aconv @{term True} |
66 |
66 |
67 fun is_same_inference (role, t) (_, role', t', _, _) = |
67 fun is_same_inference (role, t) (_, role', t', _, _) = |
68 (t |> role = Conjecture ? s_not) aconv (t' |> role' = Conjecture ? s_not) |
68 (t |> role = Conjecture ? s_not) aconv (t' |> role' = Conjecture ? s_not) |
|
69 |
|
70 fun is_False t = t aconv @{term False} orelse t aconv @{prop False} |
|
71 |
|
72 fun truncate_at_false [] = [] |
|
73 | truncate_at_false ((line as (_, role, t, _, _)) :: lines) = |
|
74 line :: (if role <> Conjecture andalso is_False t then [] else truncate_at_false lines) |
69 |
75 |
70 (* Discard facts; consolidate adjacent lines that prove the same formula, since |
76 (* Discard facts; consolidate adjacent lines that prove the same formula, since |
71 they differ only in type information.*) |
77 they differ only in type information.*) |
72 fun add_line (name as (_, ss), role, t, rule, []) lines = |
78 fun add_line (name as (_, ss), role, t, rule, []) lines = |
73 (* No dependencies: lemma (for Z3), fact, conjecture, or (for Vampire) |
79 (* No dependencies: lemma (for Z3), fact, conjecture, or (for Vampire) |