equal
deleted
inserted
replaced
25 val eq_thm: thm * thm -> bool |
25 val eq_thm: thm * thm -> bool |
26 val eq_thms: thm list * thm list -> bool |
26 val eq_thms: thm list * thm list -> bool |
27 val eq_thm_thy: thm * thm -> bool |
27 val eq_thm_thy: thm * thm -> bool |
28 val eq_thm_prop: thm * thm -> bool |
28 val eq_thm_prop: thm * thm -> bool |
29 val equiv_thm: thm * thm -> bool |
29 val equiv_thm: thm * thm -> bool |
|
30 val check_shyps: sort list -> thm -> thm |
30 val is_dummy: thm -> bool |
31 val is_dummy: thm -> bool |
31 val plain_prop_of: thm -> term |
32 val plain_prop_of: thm -> term |
32 val fold_terms: (term -> 'a -> 'a) -> thm -> 'a -> 'a |
33 val fold_terms: (term -> 'a -> 'a) -> thm -> 'a -> 'a |
33 val add_thm: thm -> thm list -> thm list |
34 val add_thm: thm -> thm list -> thm list |
34 val del_thm: thm -> thm list -> thm list |
35 val del_thm: thm -> thm list -> thm list |
158 |
159 |
159 fun equiv_thm ths = |
160 fun equiv_thm ths = |
160 Pattern.equiv (Theory.merge (pairself Thm.theory_of_thm ths)) (pairself Thm.full_prop_of ths); |
161 Pattern.equiv (Theory.merge (pairself Thm.theory_of_thm ths)) (pairself Thm.full_prop_of ths); |
161 |
162 |
162 |
163 |
|
164 (* sort hypotheses *) |
|
165 |
|
166 fun check_shyps sorts raw_th = |
|
167 let |
|
168 val th = Thm.strip_shyps raw_th; |
|
169 val prt_sort = Syntax.pretty_sort_global (Thm.theory_of_thm th); |
|
170 val pending = Sorts.subtract sorts (Thm.extra_shyps th); |
|
171 in |
|
172 if null pending then th |
|
173 else error (Pretty.string_of (Pretty.block (Pretty.str "Pending sort hypotheses:" :: |
|
174 Pretty.brk 1 :: Pretty.commas (map prt_sort pending)))) |
|
175 end; |
|
176 |
|
177 |
163 (* misc operations *) |
178 (* misc operations *) |
164 |
179 |
165 fun is_dummy thm = |
180 fun is_dummy thm = |
166 (case try Logic.dest_term (Thm.concl_of thm) of |
181 (case try Logic.dest_term (Thm.concl_of thm) of |
167 NONE => false |
182 NONE => false |