equal
deleted
inserted
replaced
3 Author: Lawrence C Paulson, Cambridge University Computer Laboratory |
3 Author: Lawrence C Paulson, Cambridge University Computer Laboratory |
4 Copyright 1993 University of Cambridge |
4 Copyright 1993 University of Cambridge |
5 |
5 |
6 Example of a BIG enumeration type |
6 Example of a BIG enumeration type |
7 |
7 |
8 Can go up to at least 100 constructors, but it takes over 10 minutes... |
8 Can go up to at least 100 constructors, but it takes nearly 7 minutes... |
9 *) |
9 *) |
10 |
10 |
11 |
11 |
12 (*An enumeration type with 60 contructors! -- takes about 214 seconds!*) |
12 (*An enumeration type with 60 contructors! -- takes about 150 seconds!*) |
13 fun mk_ids a 0 = [] |
13 fun mk_ids a 0 = [] |
14 | mk_ids a n = a :: mk_ids (bump_string a) (n-1); |
14 | mk_ids a n = a :: mk_ids (bump_string a) (n-1); |
15 |
15 |
16 val consts = mk_ids "con1" 60; |
16 val consts = mk_ids "con1" 60; |
17 |
17 |
26 val monos = []; |
26 val monos = []; |
27 val type_intrs = data_typechecks |
27 val type_intrs = data_typechecks |
28 val type_elims = []); |
28 val type_elims = []); |
29 |
29 |
30 goal Enum.thy "con59 ~= con60"; |
30 goal Enum.thy "con59 ~= con60"; |
31 by (simp_tac (ZF_ss addsimps Enum.free_iffs) 1); (*2.3 secs*) |
31 by (simp_tac (ZF_ss addsimps Enum.free_iffs) 1); |
32 result(); |
32 result(); |
33 |
33 |