# HG changeset patch # User desharna # Date 1632926947 -7200 # Node ID 162e63564e5aa7b208d9a417e01f3b0b50d8ef55 # Parent 776b74a9944930b2295f5392bfccf1d4dae69560# Parent b9331caf92c3346d42802028c70aa155cdebca9b merged diff -r 776b74a99449 -r 162e63564e5a NEWS --- a/NEWS Tue Sep 28 17:14:21 2021 +0200 +++ b/NEWS Wed Sep 29 16:49:07 2021 +0200 @@ -298,11 +298,11 @@ val natT = \<^Type>\nat\; fun mk_funT (A, B) = \<^Type>\fun A B\; - val dest_funT = fn \<^Type>\fun A B\ => (A, B); + val dest_funT = \<^Type_fn>\fun A B => \(A, B)\\; fun mk_conj (A, B) = \<^Const>\conj for A B\; - val dest_conj = fn \<^Const_>\conj for A B\ => (A, B); + val dest_conj = \<^Const_fn>\conj for A B => \(A, B)\\; fun mk_eq T (t, u) = \<^Const>\HOL.eq T for t u\; - val dest_eq = fn \<^Const_>\HOL.eq T for t u\ => (T, (t, u)); + val dest_eq = \<^Const_fn>\HOL.eq T for t u => \(T, (t, u))\\; * The "build" combinators of various data structures help to build content from bottom-up, by applying an "add" function the "empty" value. diff -r 776b74a99449 -r 162e63564e5a src/HOL/Bit_Operations.thy --- a/src/HOL/Bit_Operations.thy Tue Sep 28 17:14:21 2021 +0200 +++ b/src/HOL/Bit_Operations.thy Wed Sep 29 16:49:07 2021 +0200 @@ -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 776b74a99449 -r 162e63564e5a src/HOL/Library/Word.thy --- a/src/HOL/Library/Word.thy Tue Sep 28 17:14:21 2021 +0200 +++ b/src/HOL/Library/Word.thy Wed Sep 29 16:49:07 2021 +0200 @@ -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 776b74a99449 -r 162e63564e5a src/HOL/SPARK/SPARK.thy --- a/src/HOL/SPARK/SPARK.thy Tue Sep 28 17:14:21 2021 +0200 +++ b/src/HOL/SPARK/SPARK.thy Wed Sep 29 16:49:07 2021 +0200 @@ -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)