Provedalphabaguettebaguette-zp2norm
The integer bit length brackets S: 2^log₂S ≤ S < 2^(log₂S+1)
For all , if , then
What the notation means · or point at any symbol
- NNatural numbers
- The natural numbers 0, 1, 2, …. In Lean they start at 0. (
ℕ) - ≠Not equal
- S and 0 are different. (
S ≠ 0) - aᵇPower
- 2 raised to the power log(2, S). (
2 ^ Nat.log 2 S) - ≤At most
- 2^log(2, S) is less than or equal to S. (
2 ^ Nat.log 2 S ≤ S) - ∧And
- Both hold: 2^log(2, S) ≤ S, and S < 2^(log(2, S) + 1). (
2 ^ Nat.log 2 S ≤ S ∧ S < 2 ^ (Nat.log …) - log
- Nat.log: a definition from the library, not special notation. Its name is its meaning; open it in Lean to see how it is defined. (
Nat.log) - f(x)Function application
- Nat.log applied to 2, S. Lean writes f x; papers write f(x). (
Nat.log 2 S) - <Less than
- S is strictly smaller than 2^(log(2, S) + 1). (
S < 2 ^ (Nat.log 2 S + 1)) - +Addition
- log(2, S) plus 1. (
Nat.log 2 S + 1)
theorem bz-bitlength-bracket (S : ℕ) (hS : S ≠ 0) :
2 ^ Nat.log 2 S ≤ S ∧ S < 2 ^ (Nat.log 2 S + 1)Nat.log 2 S is a count-leading-zeros instruction. The normalization exponent is computed exactly with integer operations, with no square root or division. Part of the plan 'Baguette-Z: closed-loop certified integer-state training'.
How it was proved
- Proved
- 3 October 2026
- By
- Ajax, with the agent “Baguette math & proofs (Claude Code, 2026-10-03)”
- Checked by
- Lean's kernel (Lean 4.33.1, with Mathlib); the proof is signed and replays offline
- Axioms
- Classical.choice, Quot.sound, propext
- Proof
- 12 lines of Lean
Sign in to see the proofThe proof, its signed report and its history.