Function vstd::bits::lemma_u8_shl_is_mul

source ·
pub broadcast proof fn lemma_u8_shl_is_mul(x: u8, shift: u8)
Expand description
requires
0 <= shift < <u8>::BITS,
x * pow2(shift as nat) <= <u8>::MAX,
ensures
#[trigger] (x << shift) == x * pow2(shift as nat),

Proof that for x and n of type u8 , shifting x left by n is equivalent to multiplication of x by 2^n (provided no overflow).