11 val unlift_term: term list -> term -> term |
11 val unlift_term: term list -> term -> term |
12 val postprocess_step_conclusion: term -> theory -> thm list -> term list -> term |
12 val postprocess_step_conclusion: term -> theory -> thm list -> term list -> term |
13 val normalizing_prems : Proof.context -> term -> (string * string list) list |
13 val normalizing_prems : Proof.context -> term -> (string * string list) list |
14 val distinguish_conjecture_and_hypothesis : ''a list -> ''b -> ''b -> ''b list -> |
14 val distinguish_conjecture_and_hypothesis : ''a list -> ''b -> ''b -> ''b list -> |
15 (''a * 'c) list -> 'c list -> 'c -> 'c -> ATP_Problem.atp_formula_role * 'c |
15 (''a * 'c) list -> 'c list -> 'c -> 'c -> ATP_Problem.atp_formula_role * 'c |
|
16 val unskolemize_names: term -> term |
16 end; |
17 end; |
17 |
18 |
18 structure SMTLIB2_Isar: SMTLIB2_ISAR = |
19 structure SMTLIB2_Isar: SMTLIB2_ISAR = |
19 struct |
20 struct |
20 |
21 |
61 | NONE => t) |
62 | NONE => t) |
62 | un_free t = t |
63 | un_free t = t |
63 and un_term t = map_aterms un_free t |
64 and un_term t = map_aterms un_free t |
64 in un_term end |
65 in un_term end |
65 |
66 |
|
67 (* It is not entirely clear if this is necessary for abstractions variables. *) |
|
68 val unskolemize_names = |
|
69 Term.map_abs_vars (perhaps (try Name.dest_skolem)) |
|
70 #> Term.map_aterms (perhaps (try (fn Free (s, T) => Free (Name.dest_skolem s, T)))) |
|
71 |
66 fun postprocess_step_conclusion concl thy rewrite_rules ll_defs = |
72 fun postprocess_step_conclusion concl thy rewrite_rules ll_defs = |
67 concl |
73 concl |
68 |> Raw_Simplifier.rewrite_term thy rewrite_rules [] |
74 |> Raw_Simplifier.rewrite_term thy rewrite_rules [] |
69 |> Object_Logic.atomize_term thy |
75 |> Object_Logic.atomize_term thy |
70 |> simplify_bool |
76 |> simplify_bool |
71 |> not (null ll_defs) ? unlift_term ll_defs |
77 |> not (null ll_defs) ? unlift_term ll_defs |
72 |> unskolemize_names |
78 |> unskolemize_names |
73 |> push_skolem_all_under_iff |
79 |> push_skolem_all_under_iff |
74 |> HOLogic.mk_Trueprop |
80 |> HOLogic.mk_Trueprop |
|
81 |> unskolemize_names |
75 |
82 |
76 fun normalizing_prems ctxt concl0 = |
83 fun normalizing_prems ctxt concl0 = |
77 SMT2_Normalize.case_bool_entry :: SMT2_Normalize.special_quant_table @ |
84 SMT2_Normalize.case_bool_entry :: SMT2_Normalize.special_quant_table @ |
78 SMT2_Normalize.abs_min_max_table |
85 SMT2_Normalize.abs_min_max_table |
79 |> map_filter (fn (c, th) => |
86 |> map_filter (fn (c, th) => |