equal
deleted
inserted
replaced
125 val ind_name = Thm.derivation_name induct; |
125 val ind_name = Thm.derivation_name induct; |
126 val vs = map (nth pnames) is; |
126 val vs = map (nth pnames) is; |
127 val (thm', thy') = thy |
127 val (thm', thy') = thy |
128 |> Sign.root_path |
128 |> Sign.root_path |
129 |> Global_Theory.store_thm |
129 |> Global_Theory.store_thm |
130 (Binding.qualified_name (space_implode "_" (ind_name :: vs @ ["correctness"])), thm) |
130 (Binding.qualified_name |
|
131 (space_implode "_" (Thm_Name.short ind_name :: vs @ ["correctness"])), thm) |
131 ||> Sign.restore_naming thy; |
132 ||> Sign.restore_naming thy; |
132 |
133 |
133 val ivs = rev (Term.add_vars (Logic.varify_global (Old_Datatype_Prop.make_ind [descr])) []); |
134 val ivs = rev (Term.add_vars (Logic.varify_global (Old_Datatype_Prop.make_ind [descr])) []); |
134 val rvs = rev (Thm.fold_terms {hyps = false} Term.add_vars thm' []); |
135 val rvs = rev (Thm.fold_terms {hyps = false} Term.add_vars thm' []); |
135 val ivs1 = map Var (filter_out (fn (_, T) => \<^type_name>\<open>bool\<close> = tname_of (body_type T)) ivs); |
136 val ivs1 = map Var (filter_out (fn (_, T) => \<^type_name>\<open>bool\<close> = tname_of (body_type T)) ivs); |
199 |> Drule.export_without_context; |
200 |> Drule.export_without_context; |
200 |
201 |
201 val exh_name = Thm.derivation_name exhaust; |
202 val exh_name = Thm.derivation_name exhaust; |
202 val (thm', thy') = thy |
203 val (thm', thy') = thy |
203 |> Sign.root_path |
204 |> Sign.root_path |
204 |> Global_Theory.store_thm (Binding.qualified_name (exh_name ^ "_P_correctness"), thm) |
205 |> Global_Theory.store_thm |
|
206 (Binding.qualified_name (Thm_Name.short exh_name ^ "_P_correctness"), thm) |
205 ||> Sign.restore_naming thy; |
207 ||> Sign.restore_naming thy; |
206 |
208 |
207 val P = Var (("P", 0), rT' --> HOLogic.boolT); |
209 val P = Var (("P", 0), rT' --> HOLogic.boolT); |
208 val prf = |
210 val prf = |
209 Extraction.abs_corr_shyps thy' exhaust ["P"] [y, P] |
211 Extraction.abs_corr_shyps thy' exhaust ["P"] [y, P] |