equal
deleted
inserted
replaced
777 lemma to_bl_of_bin: |
777 lemma to_bl_of_bin: |
778 "to_bl (word_of_int bin::'a::len0 word) = bin_to_bl (len_of TYPE('a)) bin" |
778 "to_bl (word_of_int bin::'a::len0 word) = bin_to_bl (len_of TYPE('a)) bin" |
779 unfolding uint_bl by (clarsimp simp add: word_ubin.eq_norm word_size) |
779 unfolding uint_bl by (clarsimp simp add: word_ubin.eq_norm word_size) |
780 |
780 |
781 lemma to_bl_no_bin [simp]: |
781 lemma to_bl_no_bin [simp]: |
782 "to_bl (number_of bin::'a::len0 word) = bin_to_bl (len_of TYPE('a)) bin" |
782 "to_bl (number_of bin::'a::len0 word) = bin_to_bl (len_of TYPE('a)) (number_of bin)" |
783 by (fact to_bl_of_bin [folded word_number_of_def]) |
783 unfolding word_number_of_alt by (rule to_bl_of_bin) |
784 |
784 |
785 lemma to_bl_to_bin [simp] : "bl_to_bin (to_bl w) = uint w" |
785 lemma to_bl_to_bin [simp] : "bl_to_bin (to_bl w) = uint w" |
786 unfolding uint_bl by (simp add : word_size) |
786 unfolding uint_bl by (simp add : word_size) |
787 |
787 |
788 lemma uint_bl_bin: |
788 lemma uint_bl_bin: |
3249 |
3249 |
3250 |
3250 |
3251 subsubsection "Slices" |
3251 subsubsection "Slices" |
3252 |
3252 |
3253 lemma slice1_no_bin [simp]: |
3253 lemma slice1_no_bin [simp]: |
3254 "slice1 n (number_of w :: 'b word) = of_bl (takefill False n (bin_to_bl (len_of TYPE('b :: len0)) w))" |
3254 "slice1 n (number_of w :: 'b word) = of_bl (takefill False n (bin_to_bl (len_of TYPE('b :: len0)) (number_of w)))" |
3255 by (simp add: slice1_def) |
3255 by (simp add: slice1_def) |
3256 |
3256 |
3257 lemma slice_no_bin [simp]: |
3257 lemma slice_no_bin [simp]: |
3258 "slice n (number_of w :: 'b word) = of_bl (takefill False (len_of TYPE('b :: len0) - n) |
3258 "slice n (number_of w :: 'b word) = of_bl (takefill False (len_of TYPE('b :: len0) - n) |
3259 (bin_to_bl (len_of TYPE('b :: len0)) w))" |
3259 (bin_to_bl (len_of TYPE('b :: len0)) (number_of w)))" |
3260 by (simp add: slice_def word_size) |
3260 by (simp add: slice_def word_size) |
3261 |
3261 |
3262 lemma slice1_0 [simp] : "slice1 n 0 = 0" |
3262 lemma slice1_0 [simp] : "slice1 n 0 = 0" |
3263 unfolding slice1_def by simp |
3263 unfolding slice1_def by simp |
3264 |
3264 |