src/HOL/Tools/inductive.ML
changeset 32091 30e2ffbba718
parent 32035 8e77b6a250d5
child 32149 ef59550a55d3
equal deleted inserted replaced
32090:39acf19e9f3a 32091:30e2ffbba718
   138   let
   138   let
   139     val (tab, monos) = get_inductives ctxt;
   139     val (tab, monos) = get_inductives ctxt;
   140     val space = Consts.space_of (ProofContext.consts_of ctxt);
   140     val space = Consts.space_of (ProofContext.consts_of ctxt);
   141   in
   141   in
   142     [Pretty.strs ("(co)inductives:" :: map #1 (NameSpace.extern_table (space, tab))),
   142     [Pretty.strs ("(co)inductives:" :: map #1 (NameSpace.extern_table (space, tab))),
   143      Pretty.big_list "monotonicity rules:" (map (ProofContext.pretty_thm ctxt) monos)]
   143      Pretty.big_list "monotonicity rules:" (map (Display.pretty_thm ctxt) monos)]
   144     |> Pretty.chunks |> Pretty.writeln
   144     |> Pretty.chunks |> Pretty.writeln
   145   end;
   145   end;
   146 
   146 
   147 
   147 
   148 (* get and put data *)
   148 (* get and put data *)
   177     | _ $ (Const ("op =", _) $ _ $ _) => eq2mono thm
   177     | _ $ (Const ("op =", _) $ _ $ _) => eq2mono thm
   178     | _ $ (Const ("HOL.ord_class.less_eq", _) $ _ $ _) =>
   178     | _ $ (Const ("HOL.ord_class.less_eq", _) $ _ $ _) =>
   179       [dest_less_concl (Seq.hd (REPEAT (FIRSTGOAL
   179       [dest_less_concl (Seq.hd (REPEAT (FIRSTGOAL
   180          (resolve_tac [le_funI, le_boolI'])) thm))]
   180          (resolve_tac [le_funI, le_boolI'])) thm))]
   181     | _ => [thm]
   181     | _ => [thm]
   182   end handle THM _ => error ("Bad monotonicity theorem:\n" ^ Display.string_of_thm thm);
   182   end handle THM _ =>
       
   183     error ("Bad monotonicity theorem:\n" ^ Display.string_of_thm_without_context thm);
   183 
   184 
   184 val mono_add = Thm.declaration_attribute (map_monos o fold Thm.add_thm o mk_mono);
   185 val mono_add = Thm.declaration_attribute (map_monos o fold Thm.add_thm o mk_mono);
   185 val mono_del = Thm.declaration_attribute (map_monos o fold Thm.del_thm o mk_mono);
   186 val mono_del = Thm.declaration_attribute (map_monos o fold Thm.del_thm o mk_mono);
   186 
   187 
   187 
   188