equal
deleted
inserted
replaced
132 ( |
132 ( |
133 type T = inductive_info Symtab.table * thm list; |
133 type T = inductive_info Symtab.table * thm list; |
134 val empty = (Symtab.empty, []); |
134 val empty = (Symtab.empty, []); |
135 val extend = I; |
135 val extend = I; |
136 fun merge _ ((tab1, monos1), (tab2, monos2)) = |
136 fun merge _ ((tab1, monos1), (tab2, monos2)) = |
137 (Symtab.merge (K true) (tab1, tab2), Drule.merge_rules (monos1, monos2)); |
137 (Symtab.merge (K true) (tab1, tab2), Thm.merge_thms (monos1, monos2)); |
138 ); |
138 ); |
139 |
139 |
140 val get_inductives = InductiveData.get o Context.Proof; |
140 val get_inductives = InductiveData.get o Context.Proof; |
141 |
141 |
142 fun print_inductives ctxt = |
142 fun print_inductives ctxt = |
185 [dest_less_concl (Seq.hd (REPEAT (FIRSTGOAL |
185 [dest_less_concl (Seq.hd (REPEAT (FIRSTGOAL |
186 (resolve_tac [le_funI, le_boolI'])) thm))] |
186 (resolve_tac [le_funI, le_boolI'])) thm))] |
187 | _ => [thm] |
187 | _ => [thm] |
188 end handle THM _ => error ("Bad monotonicity theorem:\n" ^ string_of_thm thm); |
188 end handle THM _ => error ("Bad monotonicity theorem:\n" ^ string_of_thm thm); |
189 |
189 |
190 val mono_add = Thm.declaration_attribute (map_monos o fold Drule.add_rule o mk_mono); |
190 val mono_add = Thm.declaration_attribute (map_monos o fold Thm.add_thm o mk_mono); |
191 val mono_del = Thm.declaration_attribute (map_monos o fold Drule.del_rule o mk_mono); |
191 val mono_del = Thm.declaration_attribute (map_monos o fold Thm.del_thm o mk_mono); |
192 |
192 |
193 |
193 |
194 |
194 |
195 (** misc utilities **) |
195 (** misc utilities **) |
196 |
196 |