Skip to main content

lemma_u128_clearbit_bit_unchanged

Function lemma_u128_clearbit_bit_unchanged 

Source
pub broadcast proof fn lemma_u128_clearbit_bit_unchanged(word: u128, b: int, b2: int)
Expand description
requires
0 <= b < 128,
0 <= b2 < 128,
b != b2,
ensures
u128_bit_is_set(word & (!(1u128 << (b as usize))), b2) == u128_bit_is_set(word, b2),

Clearing bit b leaves a different in-range bit b2 unchanged.