/- The stepped δ-coefficient for (H-sub-pow) — STATEMENTS ONLY. Q-hsubpow-K-0829n, job #175 (solveathome twin-primes, lane `formalize`), building on return #10's `hsubpow-stepped-sign.lean` (L1–L10); definitions repeated so this file stands alone. NOT COMPILED. No Lean toolchain or Mathlib build exists in the session that wrote this file, so nothing here has been type-checked and every proof is `sorry`. Expect the statements to need fitting to Mathlib's API (`Nat.findGreatest`, `Real.log` on small naturals). What it captures. `B(b,k) = lnln P(b^(k+1)) − lnln P(b^k) − lnln P(b)` is the δ-carrier of the stepped defect. Return #10 measured `sup B = 0.9381949` at `(2,2)`; `hsubpow-supB.md` proves it: sup_{b ≥ 2, k ≥ 1} B(b,k) = log (log 7 / (log 3 * log 2)), attained only at (2,2). Note `b = 2` must be allowed here (the argmax sits there); return #10's L7 split assumed `3 ≤ b`. -/ import Mathlib open Nat /-- `P n`: the largest prime `≤ n` (`0` if there is none). Same as return #10. -/ noncomputable def P (n : ℕ) : ℕ := Nat.findGreatest Nat.Prime n /-- **Nagura 1952**, as in return #10: not in Mathlib, so an explicit hypothesis. -/ def Nagura : Prop := ∀ n : ℕ, 25 ≤ n → ∃ p : ℕ, p.Prime ∧ n < p ∧ 5 * p < 6 * n /-- The δ-carrier. -/ noncomputable def B (b k : ℕ) : ℝ := Real.log (Real.log (P (b ^ (k + 1)))) - Real.log (Real.log (P (b ^ k))) - Real.log (Real.log (P b)) /-- The closed-form supremum. -/ noncomputable def Bsup : ℝ := Real.log (Real.log 7 / (Real.log 3 * Real.log 2)) /-- **(I2).** `P m > 5m/6` for `m ≥ 30`, from Nagura at `n = ⌊5m/6⌋`. -/ theorem P_gt_five_sixths (hN : Nagura) {m : ℕ} (hm : 30 ≤ m) : 5 * m < 6 * P m := sorry /-- **L11 (main).** `B(b,k) ≤ log (log 7 / (log 3 · log 2))` for all `b ≥ 2`, `k ≥ 1`. Proof (`hsubpow-supB.md`): `P(b^(k+1)) ≤ b^(k+1)`, return #10's L1 (`7m ≤ 10 P m`) on `P(b^k)` and `P(b)`, giving `B ≤ log((k+1)L / ((kL − c)(L − c)))` with `L = log b`, `c = log (10/7)`, decreasing in `L` and in `k`; cases `k = 1, b ≥ 5` (≤ 0.71833), `k ≥ 2, b ≥ 3` (≤ 0.88109); `b = 2, k ≥ 5` via `P_gt_five_sixths` (≤ 0.60288); six finite pairs by evaluation. -/ theorem B_sup (hN : Nagura) {b k : ℕ} (hb : 2 ≤ b) (hk : 1 ≤ k) : B b k ≤ Bsup := sorry /-- **L12.** Attained at `(2,2)`: `P 8 = 7`, `P 4 = 3`, `P 2 = 2`. -/ theorem B_sup_eq : B 2 2 = Bsup := sorry /-- **L13.** Strict away from `(2,2)`: the runner-up is `B 2 1 = log (log 3 / (log 2)^2)` `= 0.82707`, and every other pair is below `0.88109`. -/ theorem B_sup_strict (hN : Nagura) {b k : ℕ} (hb : 2 ≤ b) (hk : 1 ≤ k) (hne : ¬ (b = 2 ∧ k = 2)) : B b k < Bsup := sorry