The binary digits of 2^m · s, for s ≠ 0: m zeros then those of s
ProvedNat.bits_two_pow_mulA statement of the module MIPRE.Foundations.Repeat.Prims of the MIP* = RE formalization (commit 70cbf1c of vidick/MIPRE-formalization). Primitives of the repeated sampler and decider. Three loops of the ambient model that the programs of thm:parallel-repetition share (planning/repetition-verifier.md, R3(a)–(b)): * powBody: on the state (e, bl, bn, acc) — e a unary counter, bl and bn the bit lists of λ and n, acc a list — prepend |bl| + |bn| copies of nil to acc, e times (powLoop_runs). With acc = [] the result is the unary numeral e · (|λ| + |n|); with acc the numeral 1 it is the binary numeral 2^{e(|λ| + |n|)}, the repetition count k(n) and the parse length B(n) of…
The binary digits of 2^m · s, for s ≠ 0: m zeros then those of s.
Formal statement. In Lean, with the scope shown:
open Nat
open MIPRE.Cost.Data
theorem Nat.bits_two_pow_mul (m : ℕ) {s : ℕ} (hs : s ≠ 0) :
(2 ^ m * s).bits = List.replicate m false ++ s.bits
Formalization Note Nat.bits_two_pow_mul is declared in MIPRE/Foundations/Repeat/Prims.lean, lines 208–216. The binders, hypotheses and conclusion are exactly those of the Lean statement above; the uploaded statement elaborates to the same type as the declaration in the repository. The definitions it mentions are those of the published definition bundles of the module's import closure.
import Mathlib.Algebra.Polynomial.Eval.Defs import Mathlib.Algebra.Polynomial.Eval.Degree import Mathlib.Computability.Primrec.List import Mathlib.Data.List.Basic import Mathlib.Data.Nat.Bits import Mathlib.Data.Nat.Notation import Mathlib.Data.Nat.Size import Mathlib.Logic.Denumerable import Mathlib.Tactic.Linarith import Mathlib.Tactic.Ring import Definitions.Def_MIPRE_Foundations_Cost_Basic_B import Definitions.Def_MIPRE_Foundations_Cost_Encoding_B import Definitions.Def_MIPRE_Foundations_Cost_PolyTime import Definitions.Def_MIPRE_Foundations_Cost_Closure import Definitions.Def_MIPRE_Foundations_Cost_Loops_B import Definitions.Def_MIPRE_Foundations_Cost_Codable_B import Definitions.Def_MIPRE_Foundations_Halting_Descriptions import Definitions.Def_MIPRE_Foundations_Cost_Unary import Definitions.Def_MIPRE_Foundations_Cost_Numeric_B import Definitions.Def_MIPRE_Foundations_Halting_Lists import Definitions.Def_MIPRE_Foundations_Halting_Lists_B import Definitions.Def_MIPRE_Foundations_Cost_Growth import Definitions.Def_MIPRE_Foundations_Halting_Arith import Definitions.Def_MIPRE_Foundations_Repeat_Prims open Nat open MIPRE.Cost.Data
theorem Nat.bits_two_pow_mul (m : ℕ) {s : ℕ} (hs : s ≠ 0) :
(2 ^ m * s).bits = List.replicate m false ++ s.bits := by sorry