equal
deleted
inserted
replaced
8 imports Cardinality |
8 imports Cardinality |
9 begin |
9 begin |
10 |
10 |
11 subsection {* Numeral Types *} |
11 subsection {* Numeral Types *} |
12 |
12 |
13 typedef (open) num0 = "UNIV :: nat set" .. |
13 typedef num0 = "UNIV :: nat set" .. |
14 typedef (open) num1 = "UNIV :: unit set" .. |
14 typedef num1 = "UNIV :: unit set" .. |
15 |
15 |
16 typedef (open) 'a bit0 = "{0 ..< 2 * int CARD('a::finite)}" |
16 typedef 'a bit0 = "{0 ..< 2 * int CARD('a::finite)}" |
17 proof |
17 proof |
18 show "0 \<in> {0 ..< 2 * int CARD('a)}" |
18 show "0 \<in> {0 ..< 2 * int CARD('a)}" |
19 by simp |
19 by simp |
20 qed |
20 qed |
21 |
21 |
22 typedef (open) 'a bit1 = "{0 ..< 1 + 2 * int CARD('a::finite)}" |
22 typedef 'a bit1 = "{0 ..< 1 + 2 * int CARD('a::finite)}" |
23 proof |
23 proof |
24 show "0 \<in> {0 ..< 1 + 2 * int CARD('a)}" |
24 show "0 \<in> {0 ..< 1 + 2 * int CARD('a)}" |
25 by simp |
25 by simp |
26 qed |
26 qed |
27 |
27 |