equal
deleted
inserted
replaced
234 [Pretty.block |
234 [Pretty.block |
235 (Pretty.breaks |
235 (Pretty.breaks |
236 (Pretty.str "(co)inductives:" :: |
236 (Pretty.str "(co)inductives:" :: |
237 map (Pretty.mark_str o #1) |
237 map (Pretty.mark_str o #1) |
238 (Name_Space.markup_entries verbose ctxt space (Symtab.dest infos)))), |
238 (Name_Space.markup_entries verbose ctxt space (Symtab.dest infos)))), |
239 Pretty.big_list "monotonicity rules:" (map (Display.pretty_thm_item ctxt) monos)] |
239 Pretty.big_list "monotonicity rules:" (map (Thm.pretty_thm_item ctxt) monos)] |
240 end |> Pretty.writeln_chunks; |
240 end |> Pretty.writeln_chunks; |
241 |
241 |
242 |
242 |
243 (* inductive info *) |
243 (* inductive info *) |
244 |
244 |
267 | _ $ (Const (@{const_name HOL.eq}, _) $ _ $ _) => eq_to_mono thm |
267 | _ $ (Const (@{const_name HOL.eq}, _) $ _ $ _) => eq_to_mono thm |
268 | _ $ (Const (@{const_name Orderings.less_eq}, _) $ _ $ _) => |
268 | _ $ (Const (@{const_name Orderings.less_eq}, _) $ _ $ _) => |
269 dest_less_concl (Seq.hd (REPEAT (FIRSTGOAL |
269 dest_less_concl (Seq.hd (REPEAT (FIRSTGOAL |
270 (resolve_tac ctxt [@{thm le_funI}, @{thm le_boolI'}])) thm)) |
270 (resolve_tac ctxt [@{thm le_funI}, @{thm le_boolI'}])) thm)) |
271 | _ => thm) |
271 | _ => thm) |
272 end handle THM _ => error ("Bad monotonicity theorem:\n" ^ Display.string_of_thm ctxt thm); |
272 end handle THM _ => error ("Bad monotonicity theorem:\n" ^ Thm.string_of_thm ctxt thm); |
273 |
273 |
274 val mono_add = |
274 val mono_add = |
275 Thm.declaration_attribute (fn thm => fn context => |
275 Thm.declaration_attribute (fn thm => fn context => |
276 map_data (fn (infos, monos, equations) => |
276 map_data (fn (infos, monos, equations) => |
277 (infos, Thm.add_thm (mk_mono (Context.proof_of context) thm) monos, equations)) context); |
277 (infos, Thm.add_thm (mk_mono (Context.proof_of context) thm) monos, equations)) context); |