equal
deleted
inserted
replaced
115 |
115 |
116 lemmas unat_eq_0 = unat_0_iff |
116 lemmas unat_eq_0 = unat_0_iff |
117 lemmas unat_eq_zero = unat_0_iff |
117 lemmas unat_eq_zero = unat_0_iff |
118 |
118 |
119 lemma unat_gt_0: "(0 < unat x) = (x ~= 0)" |
119 lemma unat_gt_0: "(0 < unat x) = (x ~= 0)" |
120 by (simp add : unat_0_iff [symmetric]) |
120 by (simp add : neq0_conv unat_0_iff [symmetric]) |
121 |
121 |
122 lemma ucast_0 [simp] : "ucast 0 = 0" |
122 lemma ucast_0 [simp] : "ucast 0 = 0" |
123 unfolding ucast_def |
123 unfolding ucast_def |
124 by simp (simp add: word_0_wi) |
124 by simp (simp add: word_0_wi) |
125 |
125 |
1243 |
1243 |
1244 lemma finite_word_UNIV: "finite (UNIV :: 'a :: len word set)" |
1244 lemma finite_word_UNIV: "finite (UNIV :: 'a :: len word set)" |
1245 apply (rule contrapos_np) |
1245 apply (rule contrapos_np) |
1246 prefer 2 |
1246 prefer 2 |
1247 apply (erule card_infinite) |
1247 apply (erule card_infinite) |
1248 apply (simp add : card_word) |
1248 apply (simp add : card_word neq0_conv) |
1249 done |
1249 done |
1250 |
1250 |
1251 lemma card_word_size: |
1251 lemma card_word_size: |
1252 "card (UNIV :: 'a :: len word set) = (2 ^ size (x :: 'a word))" |
1252 "card (UNIV :: 'a :: len word set) = (2 ^ size (x :: 'a word))" |
1253 unfolding word_size by (rule card_word) |
1253 unfolding word_size by (rule card_word) |