Skip to main content

lemma_u32_clearbit_bit_unchanged

Function lemma_u32_clearbit_bit_unchanged 

Source
pub broadcast proof fn lemma_u32_clearbit_bit_unchanged(word: u32, b: int, b2: int)
Expand description
requires
0 <= b < 32,
0 <= b2 < 32,
b != b2,
ensures
u32_bit_is_set(word & (!(1u32 << (b as usize))), b2) == u32_bit_is_set(word, b2),

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