Recovering the packed cells by division and remainder
ProvedWilliamsonShmoys.unpack_low_cells_arithLet and , and let . Then
This is the decoding counterpart of the cell-packing fragment ram_pack_low_cells.
Preamble
import Mathlib set_option autoImplicit false
Formal statement
theorem WilliamsonShmoys.unpack_low_cells_arith (k b2 b3 b4 b5 b6 b7 : ℕ)
(h2 : b2 ≤ 1) (h3 : b3 ≤ 1) (h4 : b4 ≤ 1) (h5 : b5 ≤ 1) (h6 : b6 ≤ 1) (h7 : b7 ≤ 1) :
let P := 64 * k + 32 * b2 + 16 * b3 + 8 * b4 + 4 * b5 + 2 * b6 + b7
P / 64 = k ∧ P % 64 / 32 = b2 ∧ P % 32 / 16 = b3 ∧ P % 16 / 8 = b4 ∧
P % 8 / 4 = b5 ∧ P % 4 / 2 = b6 ∧ P % 2 = b7 := by sorry