lemma has_zero_byte: "~~ (((((v::word32) && 0x7f7f7f7f) + 0x7f7f7f7f) || v) || 0x7f7f7f7f) ≠ 0 ==> v && 0xff000000 = 0 ∨ v && 0xff0000 = 0 ∨ v && 0xff00 = 0 ∨ v && 0xff = 0" by word_bitwise auto
lemma mask_step_down_32: ‹∃x. mask x = b›if‹b && 1 = 1› and‹∃x. x < 32 ∧ mask x = b >> 1›for b :: ‹32word› proof - from‹b && 1 = 1›have‹odd b› by (auto simp add: mod_2_eq_odd and_one_eq) thenhave‹b mod 2 = 1› using odd_iff_mod_2_eq_one by blast from‹∃x. x < 32 ∧ mask x = b >> 1›obtain x where‹x < 32›‹mask x = b >> 1›by blast thenhave‹mask x = b div 2› using shiftr1_is_div_2 [of b] by simp with‹b mod 2 = 1›have‹2 * mask x + 1 = 2 * (b div 2) + b mod 2› by (simp only:) alsohave‹… = b› by (simp add: mult_div_mod_eq) finallyhave‹2 * mask x + 1 = b› . moreoverhave‹mask (Suc x) = 2 * mask x + (1 :: 'a::len word)› by (simp add: mask_Suc_rec) ultimatelyshow ?thesis by auto qed
(* Helper for packing then unpacking a 64-bit variable. *) lemma cast_chunk_assemble_id_64[simp]: "(((ucast ((ucast (x::64 word))::32 word))::64 word) || (((ucast ((ucast (x >> 32))::32 word))::64 word) << 32)) = x" by (simp add:cast_chunk_assemble_id)
(* Another variant of packing and unpacking a 64-bit variable. *) lemma cast_chunk_assemble_id_64'[simp]: "(((ucast ((scast (x::64 word))::32 word))::64 word) || (((ucast ((scast (x >> 32))::32 word))::64 word) << 32)) = x" by (simp add:cast_chunk_scast_assemble_id)
(* Specialisations of down_cast_same for adding to local simpsets. *) lemma cast_down_u64: "(scast::64 word ==> 32 word) = (ucast::64 word ==> 32 word)" by (subst down_cast_same[symmetric]; simp add:is_down)+
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.