definition
len_signed [simp]: "len_of (x::'a::len0 signed itself) = LENGTH('a)"
instance ..
end
instance signed :: (len) len by (intro_classes, simp)
lemma scast_scast_id [simp]: "scast (scast x :: ('a::len) signed word) = (x :: 'a word)" "scast (scast y :: ('a::len) word) = (y :: 'a signed word)" by (auto simp: is_up scast_up_scast_id)
lemma ucast_scast_id [simp]: "ucast (scast (x :: 'a::len signed word) :: 'a word) = x" by transfer (simp add: take_bit_signed_take_bit)
lemma scast_of_nat [simp]: "scast (of_nat x :: 'a::len signed word) = (of_nat x :: 'a word)" by transfer (simp add: take_bit_signed_take_bit)
lemma scast_ucast_id [simp]: "scast (ucast (x :: 'a::len word) :: 'a signed word) = x" by transfer (simp add: take_bit_signed_take_bit)
lemma scast_eq_scast_id [simp]: "((scast (a :: 'a::len signed word) :: 'a word) = scast b) = (a = b)" by (metis ucast_scast_id)
lemma ucast_eq_ucast_id [simp]: "((ucast (a :: 'a::len word) :: 'a signed word) = ucast b) = (a = b)" by (metis scast_ucast_id)
lemma scast_ucast_norm [simp]: "(ucast (a :: 'a::len word) = (b :: 'a signed word)) = (a = scast b)" "((b :: 'a signed word) = ucast (a :: 'a::len word)) = (a = scast b)" by (metis scast_ucast_id ucast_scast_id)+
lemma scast_2_power [simp]: "scast ((2 :: 'a::len signed word) ^ x) = ((2 :: 'a word) ^ x)" by (rule bit_word_eqI) (auto simp add: bit_simps)
lemma ucast_nat_def': "of_nat (unat x) = (ucast :: 'a :: len word ==> ('b :: len) signed word) x" by (fact of_nat_unat)
lemma zero_sle_ucast_up: "¬ is_down (ucast :: 'a word ==> 'b signed word) ==> (0 <=s ((ucast (b::('a::len) word)) :: ('b::len) signed word))" by transfer (simp add: bit_simps)
lemma word_le_ucast_sless: "[ x ≤ y; y ≠ -1; LENGTH('a) < LENGTH('b) ]==> (ucast x :: ('b :: len) signed word) <s ucast (y + 1)" for x y :: ‹'a::len word› apply (cases ‹LENGTH('b)›) apply simp_all apply transfer apply (simp add: signed_take_bit_take_bit) apply (metis add.commute mask_eq_exp_minus_1 take_bit_incr_eq zle_add1_eq_le) done
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.