Skip to main content

lemma_u8_setbit_bit_unchanged

Function lemma_u8_setbit_bit_unchanged 

Source
pub broadcast proof fn lemma_u8_setbit_bit_unchanged(word: u8, b: int, b2: int)
Expand description
requires
0 <= b < 8,
0 <= b2 < 8,
b != b2,
ensures
u8_bit_is_set(word | (1u8 << (b as usize)), b2) == u8_bit_is_set(word, b2),

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