src/HOL/Tools/record.ML
changeset 74538 45c09620f726
parent 74537 44e4f09b1cc4
child 74561 8e6c973003c8
equal deleted inserted replaced
74537:44e4f09b1cc4 74538:45c09620f726
  1353                Logic.list_all ([("r", T)],
  1353                Logic.list_all ([("r", T)],
  1354                  Logic.mk_equals
  1354                  Logic.mk_equals
  1355                   (Const (\<^const_name>\<open>Ex\<close>, Tex) $ Abs (s, T, eq), \<^term>\<open>True\<close>));
  1355                   (Const (\<^const_name>\<open>Ex\<close>, Tex) $ Abs (s, T, eq), \<^term>\<open>True\<close>));
  1356             in
  1356             in
  1357               SOME (Goal.prove_sorry_global thy [] [] prop
  1357               SOME (Goal.prove_sorry_global thy [] [] prop
  1358                 (fn _ => simp_tac (put_simpset (get_simpset thy) ctxt
  1358                 (fn {context = ctxt', ...} =>
       
  1359                   simp_tac (put_simpset (get_simpset thy) ctxt'
  1359                     addsimps @{thms simp_thms} addsimprocs [split_simproc (K ~1)]) 1))
  1360                     addsimps @{thms simp_thms} addsimprocs [split_simproc (K ~1)]) 1))
  1360             end handle TERM _ => NONE)
  1361             end handle TERM _ => NONE)
  1361         | _ => NONE)
  1362         | _ => NONE)
  1362       end};
  1363       end};
  1363 
  1364 
  2116 
  2117 
  2117 
  2118 
  2118     (* 3rd stage: thms_thy *)
  2119     (* 3rd stage: thms_thy *)
  2119 
  2120 
  2120     val record_ss = get_simpset defs_thy;
  2121     val record_ss = get_simpset defs_thy;
  2121     val sel_upd_ctxt =
  2122     fun sel_upd_ctxt ctxt' =
  2122       put_simpset record_ss defs_ctxt
  2123       put_simpset record_ss ctxt'
  2123         addsimps (sel_defs @ accessor_thms @ upd_defs @ updator_thms);
  2124         addsimps (sel_defs @ accessor_thms @ upd_defs @ updator_thms);
  2124 
  2125 
  2125     val (sel_convs, upd_convs) =
  2126     val (sel_convs, upd_convs) =
  2126       timeit_msg defs_ctxt "record sel_convs/upd_convs proof:" (fn () =>
  2127       timeit_msg defs_ctxt "record sel_convs/upd_convs proof:" (fn () =>
  2127         grouped 10 Par_List.map (fn prop =>
  2128         grouped 10 Par_List.map (fn prop =>
  2128             Goal.prove_sorry_global defs_thy [] [] prop
  2129             Goal.prove_sorry_global defs_thy [] [] prop
  2129               (fn _ => ALLGOALS (asm_full_simp_tac sel_upd_ctxt)))
  2130               (fn {context = ctxt', ...} =>
       
  2131                 ALLGOALS (asm_full_simp_tac (sel_upd_ctxt ctxt'))))
  2130           (sel_conv_props @ upd_conv_props))
  2132           (sel_conv_props @ upd_conv_props))
  2131       |> chop (length sel_conv_props);
  2133       |> chop (length sel_conv_props);
  2132 
  2134 
  2133     val (fold_congs, unfold_congs) = timeit_msg defs_ctxt "record upd fold/unfold congs:" (fn () =>
  2135     val (fold_congs, unfold_congs) = timeit_msg defs_ctxt "record upd fold/unfold congs:" (fn () =>
  2134       let
  2136       let