Documentation

AnalyticNumberTheory.Sieve.W1LemmaB

W1 lemma B: decomposing 3^{ω(q)} for squarefree q #

For squarefree q with prime factors {p₁, ..., p_k},

3^{ω(q)} = 3^k = ∏_{p|q} (1+2) = Σ_{S⊆primeFactors q} 2^{|S|} = Σ_{d|q, Squarefree d} 2^{ω(d)}.

Each subset S corresponds to the squarefree divisor d = ∏_{p∈S} p. WeightedPan.lean already supplies the natural-number version threeOmega_eq_sum_twoOmega_divisors. This module gives the real-valued version with a squarefree filter needed for W1, separating the combinatorial identity 3^k = Σ_{S⊆[k]} 2^{|S|} from the subset-divisor bijection.

Combinatorial identity: Σ_{u∈t.powerset} 2^{|u|} = 3^{|t|}. Expand (1+2)^{|t|} over subsets: each element is independently included with weight 2 or excluded with weight 1.

Every divisor of squarefree q is squarefree, so divisors.filter Squarefree removes no terms.

Subset-divisor bijection: for squarefree q, Σ_{S⊆primeFactors q} 2^{|S|} = Σ_{d|q, Squarefree d} 2^{ω(d)}. The bijection is S ↦ ∏_{p∈S} p, with inverse d ↦ d.primeFactors.

W1 lemma B: for squarefree q, 3^{ω(q)} = Σ_{d|q, Squarefree d} 2^{ω(d)}. Each prime factor contributes 3 = 1+2, according to whether it is excluded from or included in d; every squarefree divisor corresponds to exactly one subset of the prime-factor set.