891 |
891 |
892 val (fields, (_, more)) = split_last (strip_fields t); |
892 val (fields, (_, more)) = split_last (strip_fields t); |
893 val _ = null fields andalso raise Match; |
893 val _ = null fields andalso raise Match; |
894 val u = foldr1 fields_tr' (map field_tr' fields); |
894 val u = foldr1 fields_tr' (map field_tr' fields); |
895 in |
895 in |
896 case more of |
896 (case more of |
897 Const (@{const_syntax Unity}, _) => Syntax.const @{syntax_const "_record"} $ u |
897 Const (@{const_syntax Unity}, _) => Syntax.const @{syntax_const "_record"} $ u |
898 | _ => Syntax.const @{syntax_const "_record_scheme"} $ u $ more |
898 | _ => Syntax.const @{syntax_const "_record_scheme"} $ u $ more) |
899 end; |
899 end; |
900 |
900 |
901 in |
901 in |
902 |
902 |
903 fun record_ext_tr' name = |
903 fun record_ext_tr' name = |
947 |
947 |
948 |
948 |
949 |
949 |
950 (** record simprocs **) |
950 (** record simprocs **) |
951 |
951 |
952 fun future_forward_prf_standard thy prf prop = |
952 fun future_forward_prf thy prf prop = |
953 let val thm = |
953 let val thm = |
954 if ! quick_and_dirty then Skip_Proof.make_thm thy prop |
954 if ! quick_and_dirty then Skip_Proof.make_thm thy prop |
955 else if Goal.future_enabled () then |
955 else if Goal.future_enabled () then |
956 Goal.future_result (Proof_Context.init_global thy) (Goal.fork prf) prop |
956 Goal.future_result (Proof_Context.init_global thy) (Goal.fork prf) prop |
957 else prf () |
957 else prf () |
958 in Drule.export_without_context thm end; |
958 in Drule.export_without_context thm end; |
959 |
|
960 fun prove_common immediate stndrd thy asms prop tac = |
|
961 let |
|
962 val prv = |
|
963 if ! quick_and_dirty then Skip_Proof.prove |
|
964 else if immediate orelse not (Goal.future_enabled ()) then Goal.prove |
|
965 else Goal.prove_future; |
|
966 val prf = prv (Proof_Context.init_global thy) [] asms prop tac; |
|
967 in if stndrd then Drule.export_without_context prf else prf end; |
|
968 |
|
969 val prove_future_global = prove_common false; |
|
970 val prove_global = prove_common true; |
|
971 |
959 |
972 fun is_sel_upd_pair thy (Const (s, _)) (Const (u, t')) = |
960 fun is_sel_upd_pair thy (Const (s, _)) (Const (u, t')) = |
973 (case get_updates thy u of |
961 (case get_updates thy u of |
974 SOME u_name => u_name = s |
962 SOME u_name => u_name = s |
975 | NONE => raise TERM ("is_sel_upd_pair: not update", [Const (u, t')])); |
963 | NONE => raise TERM ("is_sel_upd_pair: not update", [Const (u, t')])); |
1342 val ex_sel_eq_simproc = |
1330 val ex_sel_eq_simproc = |
1343 Simplifier.simproc_global @{theory HOL} "ex_sel_eq_simproc" ["Ex t"] |
1331 Simplifier.simproc_global @{theory HOL} "ex_sel_eq_simproc" ["Ex t"] |
1344 (fn thy => fn ss => fn t => |
1332 (fn thy => fn ss => fn t => |
1345 let |
1333 let |
1346 fun prove prop = |
1334 fun prove prop = |
1347 prove_global true thy [] prop |
1335 Skip_Proof.prove_global thy [] [] prop |
1348 (fn _ => simp_tac (Simplifier.inherit_context ss (get_simpset thy) |
1336 (fn _ => simp_tac (Simplifier.inherit_context ss (get_simpset thy) |
1349 addsimps @{thms simp_thms} addsimprocs [split_simproc (K ~1)]) 1); |
1337 addsimps @{thms simp_thms} addsimprocs [split_simproc (K ~1)]) 1); |
1350 |
1338 |
1351 fun mkeq (lr, Teq, (sel, Tsel), x) i = |
1339 fun mkeq (lr, Teq, (sel, Tsel), x) i = |
1352 if is_selector thy sel then |
1340 if is_selector thy sel then |
1617 let val P = Free (singleton (Name.variant_list variants) "P", extT --> Term.propT) in |
1605 let val P = Free (singleton (Name.variant_list variants) "P", extT --> Term.propT) in |
1618 Logic.mk_equals |
1606 Logic.mk_equals |
1619 (All [dest_Free s] (P $ s), All (map dest_Free vars_more) (P $ ext)) |
1607 (All [dest_Free s] (P $ s), All (map dest_Free vars_more) (P $ ext)) |
1620 end; |
1608 end; |
1621 |
1609 |
1622 val prove_standard = prove_future_global true defs_thy; |
1610 val prove = Skip_Proof.prove_global defs_thy; |
1623 |
1611 |
1624 val inject = timeit_msg ctxt "record extension inject proof:" (fn () => |
1612 val inject = timeit_msg ctxt "record extension inject proof:" (fn () => |
1625 simplify HOL_ss |
1613 simplify HOL_ss |
1626 (prove_standard [] inject_prop |
1614 (prove [] [] inject_prop |
1627 (fn _ => |
1615 (fn _ => |
1628 simp_tac (HOL_basic_ss addsimps [ext_def]) 1 THEN |
1616 simp_tac (HOL_basic_ss addsimps [ext_def]) 1 THEN |
1629 REPEAT_DETERM |
1617 REPEAT_DETERM |
1630 (rtac @{thm refl_conj_eq} 1 ORELSE |
1618 (rtac @{thm refl_conj_eq} 1 ORELSE |
1631 Iso_Tuple_Support.iso_tuple_intros_tac 1 ORELSE |
1619 Iso_Tuple_Support.iso_tuple_intros_tac 1 ORELSE |
1653 surject |
1641 surject |
1654 end); |
1642 end); |
1655 |
1643 |
1656 |
1644 |
1657 val split_meta = timeit_msg ctxt "record extension split_meta proof:" (fn () => |
1645 val split_meta = timeit_msg ctxt "record extension split_meta proof:" (fn () => |
1658 prove_standard [] split_meta_prop |
1646 prove [] [] split_meta_prop |
1659 (fn _ => |
1647 (fn _ => |
1660 EVERY1 |
1648 EVERY1 |
1661 [rtac equal_intr_rule, Goal.norm_hhf_tac, |
1649 [rtac equal_intr_rule, Goal.norm_hhf_tac, |
1662 etac @{thm meta_allE}, atac, |
1650 etac @{thm meta_allE}, atac, |
1663 rtac (@{thm prop_subst} OF [surject]), |
1651 rtac (@{thm prop_subst} OF [surject]), |
1664 REPEAT o etac @{thm meta_allE}, atac])); |
1652 REPEAT o etac @{thm meta_allE}, atac])); |
1665 |
1653 |
1666 val induct = timeit_msg ctxt "record extension induct proof:" (fn () => |
1654 val induct = timeit_msg ctxt "record extension induct proof:" (fn () => |
1667 let val (assm, concl) = induct_prop in |
1655 let val (assm, concl) = induct_prop in |
1668 prove_standard [assm] concl |
1656 prove [] [assm] concl |
1669 (fn {prems, ...} => |
1657 (fn {prems, ...} => |
1670 cut_rules_tac [split_meta RS Drule.equal_elim_rule2] 1 THEN |
1658 cut_rules_tac [split_meta RS Drule.equal_elim_rule2] 1 THEN |
1671 resolve_tac prems 2 THEN |
1659 resolve_tac prems 2 THEN |
1672 asm_simp_tac HOL_ss 1) |
1660 asm_simp_tac HOL_ss 1) |
1673 end); |
1661 end); |
2137 in All (map dest_Free [r0, s']) (Logic.list_implies (seleqs, r0 === s')) end; |
2125 in All (map dest_Free [r0, s']) (Logic.list_implies (seleqs, r0 === s')) end; |
2138 |
2126 |
2139 |
2127 |
2140 (* 3rd stage: thms_thy *) |
2128 (* 3rd stage: thms_thy *) |
2141 |
2129 |
2142 fun prove stndrd = prove_future_global stndrd defs_thy; |
2130 val prove = Skip_Proof.prove_global defs_thy; |
2143 val prove_standard = prove_future_global true defs_thy; |
2131 |
2144 val future_forward_prf = future_forward_prf_standard defs_thy; |
2132 fun prove_simp ss simps = |
2145 |
|
2146 fun prove_simp stndrd ss simps = |
|
2147 let val tac = simp_all_tac ss simps |
2133 let val tac = simp_all_tac ss simps |
2148 in fn prop => prove stndrd [] prop (K tac) end; |
2134 in fn prop => prove [] [] prop (K tac) end; |
2149 |
2135 |
2150 val ss = get_simpset defs_thy; |
2136 val ss = get_simpset defs_thy; |
2151 |
2137 |
2152 val sel_convs = timeit_msg ctxt "record sel_convs proof:" (fn () => |
2138 val sel_convs = timeit_msg ctxt "record sel_convs proof:" (fn () => |
2153 map (prove_simp false ss (sel_defs @ accessor_thms)) sel_conv_props); |
2139 map (prove_simp ss (sel_defs @ accessor_thms)) sel_conv_props); |
2154 |
|
2155 val sel_convs_standard = timeit_msg ctxt "record sel_convs_standard proof:" (fn () => |
|
2156 map Drule.export_without_context sel_convs); |
|
2157 |
2140 |
2158 val upd_convs = timeit_msg ctxt "record upd_convs proof:" (fn () => |
2141 val upd_convs = timeit_msg ctxt "record upd_convs proof:" (fn () => |
2159 map (prove_simp false ss (upd_defs @ updator_thms)) upd_conv_props); |
2142 map (prove_simp ss (upd_defs @ updator_thms)) upd_conv_props); |
2160 |
|
2161 val upd_convs_standard = |
|
2162 timeit_msg ctxt "record upd_convs_standard proof:" (fn () => |
|
2163 map Drule.export_without_context upd_convs); |
|
2164 |
2143 |
2165 val (fold_congs, unfold_congs) = timeit_msg ctxt "record upd fold/unfold congs:" (fn () => |
2144 val (fold_congs, unfold_congs) = timeit_msg ctxt "record upd fold/unfold congs:" (fn () => |
2166 let |
2145 let |
2167 val symdefs = map Thm.symmetric (sel_defs @ upd_defs); |
2146 val symdefs = map Thm.symmetric (sel_defs @ upd_defs); |
2168 val fold_ss = HOL_basic_ss addsimps symdefs; |
2147 val fold_ss = HOL_basic_ss addsimps symdefs; |
2170 in (ua_congs RL [updacc_foldE], ua_congs RL [updacc_unfoldE]) end); |
2149 in (ua_congs RL [updacc_foldE], ua_congs RL [updacc_unfoldE]) end); |
2171 |
2150 |
2172 val parent_induct = Option.map #induct_scheme (try List.last parents); |
2151 val parent_induct = Option.map #induct_scheme (try List.last parents); |
2173 |
2152 |
2174 val induct_scheme = timeit_msg ctxt "record induct_scheme proof:" (fn () => |
2153 val induct_scheme = timeit_msg ctxt "record induct_scheme proof:" (fn () => |
2175 prove_standard [] induct_scheme_prop |
2154 prove [] [] induct_scheme_prop |
2176 (fn _ => |
2155 (fn _ => |
2177 EVERY |
2156 EVERY |
2178 [case parent_induct of NONE => all_tac | SOME ind => try_param_tac rN ind 1, |
2157 [case parent_induct of NONE => all_tac | SOME ind => try_param_tac rN ind 1, |
2179 try_param_tac rN ext_induct 1, |
2158 try_param_tac rN ext_induct 1, |
2180 asm_simp_tac HOL_basic_ss 1])); |
2159 asm_simp_tac HOL_basic_ss 1])); |
2181 |
2160 |
2182 val induct = timeit_msg ctxt "record induct proof:" (fn () => |
2161 val induct = timeit_msg ctxt "record induct proof:" (fn () => |
2183 let val (assm, concl) = induct_prop in |
2162 let val (assm, concl) = induct_prop in |
2184 prove_standard [assm] concl (fn {prems, ...} => |
2163 prove [] [assm] concl (fn {prems, ...} => |
2185 try_param_tac rN induct_scheme 1 |
2164 try_param_tac rN induct_scheme 1 |
2186 THEN try_param_tac "more" @{thm unit.induct} 1 |
2165 THEN try_param_tac "more" @{thm unit.induct} 1 |
2187 THEN resolve_tac prems 1) |
2166 THEN resolve_tac prems 1) |
2188 end); |
2167 end); |
2189 |
2168 |
2196 (lambda w (HOLogic.imp $ HOLogic.mk_eq (r0, w) $ C)))] |
2175 (lambda w (HOLogic.imp $ HOLogic.mk_eq (r0, w) $ C)))] |
2197 induct_scheme; |
2176 induct_scheme; |
2198 in Object_Logic.rulify (mp OF [ind, refl]) end; |
2177 in Object_Logic.rulify (mp OF [ind, refl]) end; |
2199 |
2178 |
2200 val cases_scheme = timeit_msg ctxt "record cases_scheme proof:" (fn () => |
2179 val cases_scheme = timeit_msg ctxt "record cases_scheme proof:" (fn () => |
2201 future_forward_prf cases_scheme_prf cases_scheme_prop); |
2180 future_forward_prf defs_thy cases_scheme_prf cases_scheme_prop); |
2202 |
2181 |
2203 val cases = timeit_msg ctxt "record cases proof:" (fn () => |
2182 val cases = timeit_msg ctxt "record cases proof:" (fn () => |
2204 prove_standard [] cases_prop |
2183 prove [] [] cases_prop |
2205 (fn _ => |
2184 (fn _ => |
2206 try_param_tac rN cases_scheme 1 THEN |
2185 try_param_tac rN cases_scheme 1 THEN |
2207 simp_all_tac HOL_basic_ss [@{thm unit_all_eq1}])); |
2186 simp_all_tac HOL_basic_ss [@{thm unit_all_eq1}])); |
2208 |
2187 |
2209 val surjective = timeit_msg ctxt "record surjective proof:" (fn () => |
2188 val surjective = timeit_msg ctxt "record surjective proof:" (fn () => |
2210 let |
2189 let |
2211 val leaf_ss = |
2190 val leaf_ss = |
2212 get_sel_upd_defs defs_thy addsimps (sel_defs @ @{thms o_assoc id_apply id_o o_id}); |
2191 get_sel_upd_defs defs_thy addsimps (sel_defs @ @{thms o_assoc id_apply id_o o_id}); |
2213 val init_ss = HOL_basic_ss addsimps ext_defs; |
2192 val init_ss = HOL_basic_ss addsimps ext_defs; |
2214 in |
2193 in |
2215 prove_standard [] surjective_prop |
2194 prove [] [] surjective_prop |
2216 (fn _ => |
2195 (fn _ => |
2217 EVERY |
2196 EVERY |
2218 [rtac surject_assist_idE 1, |
2197 [rtac surject_assist_idE 1, |
2219 simp_tac init_ss 1, |
2198 simp_tac init_ss 1, |
2220 REPEAT |
2199 REPEAT |
2221 (Iso_Tuple_Support.iso_tuple_intros_tac 1 ORELSE |
2200 (Iso_Tuple_Support.iso_tuple_intros_tac 1 ORELSE |
2222 (rtac surject_assistI 1 THEN simp_tac leaf_ss 1))]) |
2201 (rtac surject_assistI 1 THEN simp_tac leaf_ss 1))]) |
2223 end); |
2202 end); |
2224 |
2203 |
2225 val split_meta = timeit_msg ctxt "record split_meta proof:" (fn () => |
2204 val split_meta = timeit_msg ctxt "record split_meta proof:" (fn () => |
2226 prove false [] split_meta_prop |
2205 prove [] [] split_meta_prop |
2227 (fn _ => |
2206 (fn _ => |
2228 EVERY1 |
2207 EVERY1 |
2229 [rtac equal_intr_rule, Goal.norm_hhf_tac, |
2208 [rtac equal_intr_rule, Goal.norm_hhf_tac, |
2230 etac @{thm meta_allE}, atac, |
2209 etac @{thm meta_allE}, atac, |
2231 rtac (@{thm prop_subst} OF [surjective]), |
2210 rtac (@{thm prop_subst} OF [surjective]), |
2232 REPEAT o etac @{thm meta_allE}, atac])); |
2211 REPEAT o etac @{thm meta_allE}, atac])); |
2233 |
2212 |
2234 val split_meta_standard = timeit_msg ctxt "record split_meta standard:" (fn () => |
|
2235 Drule.export_without_context split_meta); |
|
2236 |
|
2237 fun split_object_prf () = |
2213 fun split_object_prf () = |
2238 let |
2214 let |
2239 val cPI= cterm_of defs_thy (lambda r0 (Trueprop (P $ r0))); |
2215 val cPI = cterm_of defs_thy (lambda r0 (Trueprop (P $ r0))); |
2240 val _ $ Abs (_, _, P $ _) = fst (Logic.dest_equals (concl_of split_meta_standard)); |
2216 val _ $ Abs (_, _, P $ _) = fst (Logic.dest_equals (concl_of split_meta)); |
2241 val cP = cterm_of defs_thy P; |
2217 val cP = cterm_of defs_thy P; |
2242 val split_meta' = cterm_instantiate [(cP, cPI)] split_meta_standard; |
2218 val split_meta' = cterm_instantiate [(cP, cPI)] split_meta; |
2243 val (l, r) = HOLogic.dest_eq (HOLogic.dest_Trueprop split_object_prop); |
2219 val (l, r) = HOLogic.dest_eq (HOLogic.dest_Trueprop split_object_prop); |
2244 val cl = cterm_of defs_thy (HOLogic.mk_Trueprop l); |
2220 val cl = cterm_of defs_thy (HOLogic.mk_Trueprop l); |
2245 val cr = cterm_of defs_thy (HOLogic.mk_Trueprop r); |
2221 val cr = cterm_of defs_thy (HOLogic.mk_Trueprop r); |
2246 val thl = |
2222 val thl = |
2247 Thm.assume cl (*All r. P r*) (* 1 *) |
2223 Thm.assume cl (*All r. P r*) (* 1 *) |
2256 |> meta_to_obj_all (*All r. P r*) |
2232 |> meta_to_obj_all (*All r. P r*) |
2257 |> Thm.implies_intr cr (* 2 ==> 1 *) |
2233 |> Thm.implies_intr cr (* 2 ==> 1 *) |
2258 in thr COMP (thl COMP iffI) end; |
2234 in thr COMP (thl COMP iffI) end; |
2259 |
2235 |
2260 val split_object = timeit_msg ctxt "record split_object proof:" (fn () => |
2236 val split_object = timeit_msg ctxt "record split_object proof:" (fn () => |
2261 future_forward_prf split_object_prf split_object_prop); |
2237 future_forward_prf defs_thy split_object_prf split_object_prop); |
2262 |
2238 |
2263 val split_ex = timeit_msg ctxt "record split_ex proof:" (fn () => |
2239 val split_ex = timeit_msg ctxt "record split_ex proof:" (fn () => |
2264 let |
2240 let |
2265 val ss = HOL_basic_ss addsimps @{thms not_ex [symmetric] Not_eq_iff}; |
2241 val ss = HOL_basic_ss addsimps @{thms not_ex [symmetric] Not_eq_iff}; |
2266 val P_nm = fst (dest_Free P); |
2242 val P_nm = fst (dest_Free P); |
2267 val not_P = cterm_of defs_thy (lambda r0 (HOLogic.mk_not (P $ r0))); |
2243 val not_P = cterm_of defs_thy (lambda r0 (HOLogic.mk_not (P $ r0))); |
2268 val so' = named_cterm_instantiate ([(P_nm, not_P)]) split_object; |
2244 val so' = named_cterm_instantiate ([(P_nm, not_P)]) split_object; |
2269 val so'' = simplify ss so'; |
2245 val so'' = simplify ss so'; |
2270 in |
2246 in prove [] [] split_ex_prop (fn _ => resolve_tac [so''] 1) end); |
2271 prove_standard [] split_ex_prop (fn _ => resolve_tac [so''] 1) |
|
2272 end); |
|
2273 |
2247 |
2274 fun equality_tac thms = |
2248 fun equality_tac thms = |
2275 let |
2249 let |
2276 val s' :: s :: eqs = rev thms; |
2250 val s' :: s :: eqs = rev thms; |
2277 val ss' = ss addsimps (s' :: s :: sel_convs_standard); |
2251 val ss' = ss addsimps (s' :: s :: sel_convs); |
2278 val eqs' = map (simplify ss') eqs; |
2252 val eqs' = map (simplify ss') eqs; |
2279 in simp_tac (HOL_basic_ss addsimps (s' :: s :: eqs')) 1 end; |
2253 in simp_tac (HOL_basic_ss addsimps (s' :: s :: eqs')) 1 end; |
2280 |
2254 |
2281 val equality = timeit_msg ctxt "record equality proof:" (fn () => |
2255 val equality = timeit_msg ctxt "record equality proof:" (fn () => |
2282 prove_standard [] equality_prop (fn {context, ...} => |
2256 prove [] [] equality_prop (fn {context, ...} => |
2283 fn st => |
2257 fn st => |
2284 let val [s, s'] = map #1 (rev (Tactic.innermost_params 1 st)) in |
2258 let val [s, s'] = map #1 (rev (Tactic.innermost_params 1 st)) in |
2285 st |> (res_inst_tac context [((rN, 0), s)] cases_scheme 1 THEN |
2259 st |> (res_inst_tac context [((rN, 0), s)] cases_scheme 1 THEN |
2286 res_inst_tac context [((rN, 0), s')] cases_scheme 1 THEN |
2260 res_inst_tac context [((rN, 0), s')] cases_scheme 1 THEN |
2287 Subgoal.FOCUS (fn {prems, ...} => equality_tac prems) context 1) |
2261 Subgoal.FOCUS (fn {prems, ...} => equality_tac prems) context 1) |
2293 splits' as [split_meta', split_object', split_ex'], derived_defs'], |
2267 splits' as [split_meta', split_object', split_ex'], derived_defs'], |
2294 [surjective', equality']), |
2268 [surjective', equality']), |
2295 [induct_scheme', induct', cases_scheme', cases']), thms_thy) = |
2269 [induct_scheme', induct', cases_scheme', cases']), thms_thy) = |
2296 defs_thy |
2270 defs_thy |
2297 |> (Global_Theory.add_thmss o map (Thm.no_attributes o apfst Binding.name)) |
2271 |> (Global_Theory.add_thmss o map (Thm.no_attributes o apfst Binding.name)) |
2298 [("select_convs", sel_convs_standard), |
2272 [("select_convs", sel_convs), |
2299 ("update_convs", upd_convs_standard), |
2273 ("update_convs", upd_convs), |
2300 ("select_defs", sel_defs), |
2274 ("select_defs", sel_defs), |
2301 ("update_defs", upd_defs), |
2275 ("update_defs", upd_defs), |
2302 ("fold_congs", fold_congs), |
2276 ("fold_congs", fold_congs), |
2303 ("unfold_congs", unfold_congs), |
2277 ("unfold_congs", unfold_congs), |
2304 ("splits", [split_meta_standard, split_object, split_ex]), |
2278 ("splits", [split_meta, split_object, split_ex]), |
2305 ("defs", derived_defs)] |
2279 ("defs", derived_defs)] |
2306 ||>> (Global_Theory.add_thms o map (Thm.no_attributes o apfst Binding.name)) |
2280 ||>> (Global_Theory.add_thms o map (Thm.no_attributes o apfst Binding.name)) |
2307 [("surjective", surjective), |
2281 [("surjective", surjective), |
2308 ("equality", equality)] |
2282 ("equality", equality)] |
2309 ||>> (Global_Theory.add_thms o (map o apfst o apfst) Binding.name) |
2283 ||>> (Global_Theory.add_thms o (map o apfst o apfst) Binding.name) |
2312 (("cases_scheme", cases_scheme), cases_type_global (suffix schemeN name)), |
2286 (("cases_scheme", cases_scheme), cases_type_global (suffix schemeN name)), |
2313 (("cases", cases), cases_type_global name)]; |
2287 (("cases", cases), cases_type_global name)]; |
2314 |
2288 |
2315 val sel_upd_simps = sel_convs' @ upd_convs'; |
2289 val sel_upd_simps = sel_convs' @ upd_convs'; |
2316 val sel_upd_defs = sel_defs' @ upd_defs'; |
2290 val sel_upd_defs = sel_defs' @ upd_defs'; |
2317 val iffs = [ext_inject] |
|
2318 val depth = parent_len + 1; |
2291 val depth = parent_len + 1; |
2319 |
2292 |
2320 val ([simps', iffs'], thms_thy') = |
2293 val ([simps', iffs'], thms_thy') = |
2321 thms_thy |
2294 thms_thy |
2322 |> Global_Theory.add_thmss |
2295 |> Global_Theory.add_thmss |
2323 [((Binding.name "simps", sel_upd_simps), [Simplifier.simp_add]), |
2296 [((Binding.name "simps", sel_upd_simps), [Simplifier.simp_add]), |
2324 ((Binding.name "iffs", iffs), [iff_add])]; |
2297 ((Binding.name "iffs", [ext_inject]), [iff_add])]; |
2325 |
2298 |
2326 val info = |
2299 val info = |
2327 make_info alphas parent fields extension |
2300 make_info alphas parent fields extension |
2328 ext_induct ext_inject ext_surjective ext_split ext_def |
2301 ext_induct ext_inject ext_surjective ext_split ext_def |
2329 sel_convs' upd_convs' sel_defs' upd_defs' fold_congs' unfold_congs' splits' derived_defs' |
2302 sel_convs' upd_convs' sel_defs' upd_defs' fold_congs' unfold_congs' splits' derived_defs' |