Documentation

CslibFrontier.Foundations.Data.Nat.OddMulMod

Quotient Fiber Bound for Odd Multiples Modulo Powers of Two #

For any positive multiplier Δ > 0, exponent M : ℕ, and target residue r : ℕ, at most Δ indices s : Fin (2 ^ (M - 1)) satisfy (Δ * (2 * s.val + 1)) % 2 ^ M = r. For M ≥ 1, every s : Fin (2 ^ (M - 1)) satisfies 2 * s.val + 1 < 2 ^ M, so the Euclidean quotient (Δ * (2 * s.val + 1)) / 2 ^ M lies in Finset.range Δ and injects on the residue fiber.

Main results #

theorem Nat.card_odd_mul_mod_eq_le (M Δ r : ℕ) (hΔ : 0 < Δ) :
{s : Fin (2 ^ (M - 1)) | Δ * (2 * ↑s + 1) % 2 ^ M = r}.card ≤ Δ

Quotient fiber bound for odd multiples modulo 2 ^ M: for any 0 < Δ, at most Δ elements s : Fin (2 ^ (M - 1)) satisfy (Δ * (2 * s.val + 1)) % 2 ^ M = r.