Skip to content

Commit

Permalink
lib: add lemmas relating the maxium word and -1
Browse files Browse the repository at this point in the history
Signed-off-by: Michael McInerney <michael.mcinerney@proofcraft.systems>
  • Loading branch information
michaelmcinerney committed Oct 2, 2024
1 parent 83a161d commit 1eb4955
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/Word_Lib/Word_32.thy
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,10 @@ lemma word32_and_max_simp:
using word_and_full_mask_simp [of x]
by (simp add: numeral_eq_Suc mask_Suc_exp)

lemma max_minus_one_word32:
"(0xFFFFFFFF :: word32) = - 1"
by (simp add: maxBound_word)

end

end
4 changes: 4 additions & 0 deletions lib/Word_Lib/Word_64.thy
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,10 @@ lemma word64_and_max_simp:
using word_and_full_mask_simp [of x]
by (simp add: numeral_eq_Suc mask_Suc_exp)

lemma max_minus_one_word64:
"(0xFFFFFFFFFFFFFFFF :: word64) = - 1"
by (simp add: maxBound_word)

end

end

0 comments on commit 1eb4955

Please sign in to comment.