H2 for Thakur's hypotheses on power sums #
The e-th base-q digit of x (returns 0 for positions beyond the
representation, matching the convention x_e = 0 for large e).
Equations
- ZetaH123.H2.qdigit q x e = (q.digits x).getD e 0
Instances For
A finite list of nonnegative integers xs adds without carries in base q
if at every digit position e the base-q digits sum to at most q - 1. This is
exactly the carry-free condition of Definition 2.
Equations
- ZetaH123.H2.AddNoCarry q xs = ∀ (e : ℕ), (List.map (fun (x : ℕ) => ZetaH123.H2.qdigit q x e) xs).sum ≤ q - 1
Instances For
The function s_d(k) = d*k + min over T_{d,k-1}of∑ (i+1) * m i. The minimum over the nonempty set of objective values is realised as the infimum (sInf`) of that set of naturals.
Equations
Instances For
The objective F(j) = s_{d-1}(s_1(k) + j) + s_1(k) + j.
Equations
- ZetaH123.H2.F q d k j = ZetaH123.H2.s q (d - 1) (ZetaH123.H2.s q 1 k + j) + ZetaH123.H2.s q 1 k + j
Instances For
The objective value set for TSet q d (k - 1) is nonempty: an explicit witness
places each coordinate at a distinct high power (q - 1)·q ^ (k+i), which is positive,
divisible by q-1, and carry-free with k-1 (the powers are distinct and exceed
log_q (k - 1)). This generalises the Fin 1 nonemptiness in main_zero_mem.
Easy direction of the composition identity:
s_d(k) ≤ s_{d-1}(s_1(k)) + s_1(k). Constructive: combine a minimizer μ₁ for
s_1 (placed at top weight d) with a minimizer of s_{d-1} at argument
s_1(k); the combined tuple lies in TSet q d (k - 1).
The list of available base-q digit slots of k1, truncated to positions
< L, listed in INCREASING order of value: position e contributes
(q - 1) - qdigit q k1 e copies of q ^ e. Sorted ascending since q ^ e is
increasing in e.
Equations
- ZetaH123.H2.slotList q k1 L = List.flatMap (fun (e : ℕ) => List.replicate (q - 1 - ZetaH123.H2.qdigit q k1 e) (q ^ e)) (List.range L)
Instances For
The sum of the r-th block of n = q-1 smallest slots (1-indexed block r):
the slots at list positions [(r-1)*n, r*n).
Equations
- ZetaH123.H2.blockSum q k1 L r = (List.take (q - 1) (List.drop ((r - 1) * (q - 1)) (ZetaH123.H2.slotList q k1 L))).sum
Instances For
The block functional Φ_d(M) = d·β₁ + (d-1)·β₂ + ⋯ + 1·β_d
(β_r = blockSum … r).
Equations
- ZetaH123.H2.Phi q k1 d L = ∑ r ∈ Finset.range d, (d - r) * ZetaH123.H2.blockSum q k1 L (r + 1)
Instances For
Bridge: the value of the smallest m slots of M(k - 1) is at most any N
that adds to k-1 without carry and whose total slot count (digit sum) is ≥ m.
The greedy/exchange argument in closed arithmetic form.
Optimality lower bound (the ≥ half of the slot formula): every tuple in
TSet q d (k - 1) has objective at least Φ_d(M) (informal.tex Lem. H2-block-min).
Proof idea: reindex the objective by weight levels and bound each level by the
greedy bound slot_value_le.
The reciprocal slot formula s_d(k) = d·k + Φ_d(M). Assembled by
antisymmetry from slot_lower_bound (every value ≥ Φ_d, hence sInf ≥ Φ_d)
and slot_upper_bound (sInf ≤ Φ_d).
(L2, slot subtraction) The slot list of k1 + β₁, where β₁ is the sum of
the q-1 smallest slots of k1, equals the slot list of k1 with its first
block removed: M(k1 + β₁) = M(k1) \ B₁. Adding β₁ is carry-free and "spends"
exactly the digit positions occupied by the q-1 smallest slots.
(L2)+(L3) Layer-cake identity linking Φ_d(M) at argument k to
Φ_{d-1} at argument s_1(k) (whose slot set is M \ B₁):
d·k + Φ_d(M(k - 1)) = (d-1)·s_1(k) + Φ_{d-1}(M(s_1(k)-1)) + s_1(k).
Combines (L1) s_1(k)=k+β₁, (L2) slot subtraction M(s_1(k)-1)=M\B₁, and
(L3) Φ_d(M)=d·β₁+Φ_{d-1}(M\B₁); pure block-reindexing algebra.
Hard direction of the composition identity:
s_{d-1}(s_1(k)) + s_1(k) ≤ s_d(k). Assembled from the slot formula on s_d
and s_{d-1} plus the layer_cake reindexing.
Removal bound: with u adding to k1 carry-free (so M' = slotList q (k1+u)
is M = slotList q k1 with a size-m submultiset U of total value u removed),
the value of the smallest t+m slots of M is at most the value of the smallest
t slots of M' plus u.
Converse Kummer/Lucas: if k+(n - k) has a carry in base q at some
position (q ^ i ≤ k%q ^ i + (n - k)%q ^ i), then q ∣ C(n,k). Proved via
Nat.factorization_choose.
Carry-free correspondence from admissibility. For j ∈ Jset q k set
β = blockSum q (k - 1) (slotLen q 1 k) 1 and u = β + j. Then u adds to k-1
carry-free in base q, i.e. per position the digit sum is ≤ q-1. Uses
s_one_eq (so s q 1 k - 1 = (k - 1) + β, hence s q 1 k + j - 1 = (k - 1) + u),
the admissibility ¬ q ∣ C((k - 1)+u, k-1), and dvd_choose_of_carry.
The core extraction inequality. Let u add to k1 = k-1 carry-free with
(q - 1) ∣ u and u > β₁ where β₁ = blockSum q k1 L₀ 1. Then for truncations
L₁, L₂ large enough to contain the relevant blocks,
Φ_d(M) < d·u + Φ_{d-1}(M\U), i.e. Phi q k1 d L₁ < d*u + Phi q (k1+u) (d-1) L₂.
Proof idea: expand both Phis into prefix sums, bound each prefix sum of M\U
below via removal_bound, and use u > β₁ for strictness.
Pillar 2, the extraction inequality in strict form: for admissible j > 0,
s_d(k) < F(j) (informal.tex Lem. lem:H2-extraction). With u = β₁ + j,
admissibility makes u carry-free with k-1; the slot formula reduces the goal
to extraction_core, strict since j > 0 gives u > β₁.
F attains its minimum over J uniquely at j = 0: for every admissible
j ∈ J with j > 0 we have F(0) < F(j).
Assembled from composition_identity (F(0) = s_d(k)) and extraction_strict
(s_d(k) < F(j) for admissible j > 0).