Skip to content

Conversation

@mmcloughlin
Copy link
Contributor

@mmcloughlin mmcloughlin commented Aug 6, 2025

Provide lemmas lemma_uN_one_shl_is_pow2 that 1 << n is equal to pow2(n). Basic fact come up in crypto proofs and general bit manipulation.

By submitting this pull request, I confirm that my contribution is made under the terms of the MIT license.

@parno
Copy link
Collaborator

parno commented Aug 8, 2025

Should we generalize this to something that says x << n is x * pow2(n)? I guess overflow gets a bit messier in that case.

@rikosellic
Copy link
Contributor

lemma_uN_mul_pow2_le_max_iff_max_shr may be helpful in the generalized case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants