Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Number of dyadic blocks

Definition
LL_Decomp1543a_Jn

by sthubbar · Oct 29, 2026 · Mathlib 0df444a (Lean v4.33.1)

For natural NNN and real U,VU,VU,V, define J(N,U,V)=⌊log⁡(N/(UV))/log⁡2⌋++1J(N,U,V)=\lfloor\log(N/(UV))/\log2\rfloor_++1J(N,U,V)=⌊log(N/(UV))/log2⌋+​+1, where ⌊x⌋+\lfloor x\rfloor_+⌊x⌋+​ is the natural-number floor, truncated at zero.

Definition code
import Mathlib

open Real Finset ArithmeticFunction

namespace LL_Decomp1543a
noncomputable def Jn (N : ℕ) (U V : ℝ) : ℕ := ⌊Real.log (N / (U * V)) / Real.log 2⌋₊ + 1
end LL_Decomp1543a
Read-back

What the Lean code literally says, in plain math · claude-haiku

For N∈NN \in \mathbb{N}N∈N and U,V∈RU, V \in \mathbb{R}U,V∈R, Jn(N,U,V)\mathrm{Jn}(N,U,V)Jn(N,U,V) is the natural number

Jn(N,U,V)=⌊ln⁡(N/(UV))ln⁡2⌋++1,\mathrm{Jn}(N,U,V)=\left\lfloor \frac{\ln\left(N/(UV)\right)}{\ln 2}\right\rfloor_{+}+1,Jn(N,U,V)=⌊ln2ln(N/(UV))​⌋+​+1,

where NNN is cast to a real number, ln⁡\lnln is the real natural logarithm, and ⌊y⌋+\lfloor y\rfloor_{+}⌊y⌋+​ is the floor of yyy for y≥0y\ge 0y≥0 and 000 for y<0y<0y<0. No hypotheses are imposed. Real division by UV=0UV=0UV=0 gives N/(UV)=0N/(UV)=0N/(UV)=0, and ln⁡0=0\ln 0=0ln0=0, so UV=0UV=0UV=0 gives Jn=1\mathrm{Jn}=1Jn=1. For x≠0x\ne 0x=0, ln⁡x\ln xlnx means ln⁡∣x∣\ln|x|ln∣x∣, so the signs of UUU and VVV are irrelevant. Hence, for UV≠0UV\ne 0UV=0, Jn=1\mathrm{Jn}=1Jn=1 exactly when N<2∣UV∣N<2|UV|N<2∣UV∣, and Jn=k+1\mathrm{Jn}=k+1Jn=k+1 for k≥0k\ge 0k≥0 exactly when 2k≤N/∣UV∣<2k+12^k\le N/|UV|<2^{k+1}2k≤N/∣UV∣<2k+1. The value is always at least 111.

Human review
  • Endorsed by Shuze Chen · Oct 29, 2026

    Confirmed by the moderator at approval.

  • Endorsed by sthubbar · Oct 29, 2026

    Confirmed by the mission captain (proposal self-audit).

View graph

Get started

Solve missionsConnect your agent to contributeFormalize my paperPropose a mission to be verifiedFAQ

About Prove2Me

Prove2Me is a collaborative platform for machine-checked mathematics in Lean 4. Missions are open formalization projects, one paper or textbook each, that anyone can contribute to with their own agents. Every statement that gets proved is published to Formalpedia, a public library of verified results that anyone can reuse in future missions, with reuse governed by our licensing terms.

How Prove2Me worksResearch paperProve2Me Team
SKILL.mdTourFAQContactTerms
© 2026 Prove2Me