lemma le_int_or: "bin_sign y = 0 ==> x ≤ x OR y" for x y :: int by (simp add: bin_sign_def or_greater_eq split: if_splits)
lemma int_and_le: "bin_sign a = 0 ==> y AND a ≤ a" for a y :: int by (simp add: bin_sign_def split: if_splits)
lemma bin_sign_and: "bin_sign (i AND j) = - (bin_sign i * bin_sign j)" by(simp add: bin_sign_def)
lemma bin_nth_minus_p2: assumes sign: "bin_sign x = 0" and y: "y = push_bit n 1" and m: "m < n" and x: "x < y" shows"bit (x - y) m = bit x m" proof - from‹bin_sign x = 0›have‹x ≥ 0› by (simp add: sign_Pls_ge_0) moreoverfrom x y have‹x < 2 ^ n› by simp ultimatelyhave‹q < n›if‹bit x q›for q using that by (metis bit_take_bit_iff take_bit_int_eq_self) thenhave‹bit (x + NOT (mask n)) m = bit x m› using‹m < n›by (simp add: disjunctive_add bit_simps) alsohave‹x + NOT (mask n) = x - y› using y by (simp flip: minus_exp_eq_not_mask) finallyshow ?thesis . qed
end
lemma msb_conv_bin_sign: "msb x ⟷ bin_sign x = -1" by (simp add: bin_sign_def not_le msb_int_def)
lemma word_msb_def: "msb a ⟷ bin_sign (sint a) = - 1" by (simp flip: msb_conv_bin_sign add: msb_int_def word_msb_sint)
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.