Documentation

CslibFrontier.Foundations.Data.Nat.TwoAdicInterval

Multiplicities of two in positive intervals #

An interval containing no multiple of 2 ^ (m + 1) is confined to one block between consecutive multiples. In that block the numbers of multiplicity k ≤ m have residue 2 ^ k modulo 2 ^ (k + 1). This gives the counting bound in [Hoza2026NLUL, Lemma 2.1] and uniqueness at the maximum.

Main results #

theorem Nat.card_filter_Icc_multiplicity_two_le {a b m k : ℕ} (ha : 0 < a) (hk : k ≤ m) (hm : ∀ x ∈ Finset.Icc a b, multiplicity 2 x ≤ m) :
{x ∈ Finset.Icc a b | multiplicity 2 x = k}.card ≤ 2 ^ (m - k)

A positive interval with multiplicity at most m contains at most 2 ^ (m - k) points of multiplicity k ≤ m.

theorem Nat.existsUnique_max_multiplicity_two_Icc {a b : ℕ} (ha : 0 < a) (hab : a ≤ b) :

The highest multiplicity of two in a nonempty interval of positive naturals occurs exactly once.

theorem Nat.two_mul_sum_six_pow_multiplicity_erase_le {a b j : ℕ} (ha : 0 < a) (hj : j ∈ Finset.Icc a b) (hmax : ∀ i ∈ Finset.Icc a b, multiplicity 2 i ≤ multiplicity 2 j) :
2 * ∑ i ∈ (Finset.Icc a b).erase j, 6 ^ multiplicity 2 i ≤ 6 ^ multiplicity 2 j

The nonmaximal layers together contribute at most half the maximal power of six. This is the finite geometric estimate used in [Hoza2026NLUL, Lemma 2.3].