# HG changeset patch # User haftmann # Date 1632898599 0 # Node ID 930047942f468df22ed0c1016ae21d440d9000ec # Parent 23db3493478fb1cb429a808c1e2179417e60d263 repaired slip diff -r 23db3493478f -r 930047942f46 src/HOL/Bit_Operations.thy --- a/src/HOL/Bit_Operations.thy Wed Sep 29 09:58:19 2021 +0200 +++ b/src/HOL/Bit_Operations.thy Wed Sep 29 06:56:39 2021 +0000 @@ -3509,7 +3509,7 @@ \ no_notation - not (\NOT"\) + not (\NOT\) and "and" (infixr \AND\ 64) and or (infixr \OR\ 59) and xor (infixr \XOR\ 59) @@ -3518,7 +3518,7 @@ begin notation - not (\NOT"\) + not (\NOT\) and "and" (infixr \AND\ 64) and or (infixr \OR\ 59) and xor (infixr \XOR\ 59) diff -r 23db3493478f -r 930047942f46 src/HOL/Library/Word.thy --- a/src/HOL/Library/Word.thy Wed Sep 29 09:58:19 2021 +0200 +++ b/src/HOL/Library/Word.thy Wed Sep 29 06:56:39 2021 +0000 @@ -1014,15 +1014,15 @@ \push_bit n 1 = (2 :: 'a::len word) ^ n\ by (fact push_bit_of_1) +context + includes bit_operations_syntax +begin + lemma [code]: \NOT w = Word.of_int (NOT (Word.the_int w))\ for w :: \'a::len word\ by transfer (simp add: take_bit_not_take_bit) -context - includes bit_operations_syntax -begin - lemma [code]: \Word.the_int (v AND w) = Word.the_int v AND Word.the_int w\ by transfer simp @@ -1244,16 +1244,16 @@ by (transfer fixing: take_bit; cases \LENGTH('b)\) (auto simp add: Bit_Operations.signed_take_bit_take_bit Bit_Operations.take_bit_signed_take_bit take_bit_of_int min_def less_Suc_eq) +context + includes bit_operations_syntax +begin + lemma signed_not_eq: \signed (NOT w) = signed_take_bit LENGTH('b) (NOT (signed w))\ for w :: \'b::len word\ by (simp add: bit_eq_iff bit_simps possible_bit_min possible_bit_less_imp min_less_iff_disj) (auto simp: min_def) -context - includes bit_operations_syntax -begin - lemma signed_and_eq: \signed (v AND w) = signed v AND signed w\ for v w :: \'b::len word\ diff -r 23db3493478f -r 930047942f46 src/HOL/SPARK/SPARK.thy --- a/src/HOL/SPARK/SPARK.thy Wed Sep 29 09:58:19 2021 +0200 +++ b/src/HOL/SPARK/SPARK.thy Wed Sep 29 06:56:39 2021 +0000 @@ -37,7 +37,7 @@ XOR_upper [of _ 64, simplified] lemma bit_not_spark_eq: - "NOT (word_of_int x :: ('a::len) word) = + "Bit_Operations.not (word_of_int x :: ('a::len) word) = word_of_int (2 ^ LENGTH('a) - 1 - x)" by (simp flip: mask_eq_exp_minus_1 add: of_int_mask_eq not_eq_complement)