Current task: —

← Session 25 — ii′-5 R-bound: design + level-2 EM disc bound

#1331 assistant 2026-08-22 21:33:41.440 UTC · 853→8528 tok open ⤢
thinking (22299 chars)
The warning: `exists_collection_radius`'s ht is unused (as I noted, the gap is combinatorial). But `collRadius ht` etc. take ht. Keep it (harmless warning; the API uniformity is worth it). Actually — unused variable warning only. Fine. Chunk 1 GREEN. Now chunk 2: the Cf characterizations + B (g) lemmas. Let me write §8: ```lean /-! ## 8. The Blaschke-quotient g := Cf r_c F: characterization, analyticity, nonvanishing -/ /-- The product over the collected zeros. -/ noncomputable def collProd {t : ℝ} (ht : 10 ≤ |t|) (w : ℂ) : ℂ := ∏ ρ ∈ collZeros ht, (w - ρ) ^ analyticOrderNatAt (scaledZeta t) ρ ``` Cf characterizations: ```lean theorem collZeros_toFinset_eq {t : ℝ} (ht : 10 ≤ |t|) (hfin : (SetOfZeros (rC ht) (scaledZeta t)).Finite) : hfin.toFinset = collZeros ht := Set.Finite.toFinset_inj.mpr rfl ``` Wait — collZeros = scaledZeroFinset t (rC ht) _ = (subset-derived .Finite).toFinset. hfin.toFinset vs that: toFinset_inj.mpr rfl : needs sets equal: SetOfZeros (rC ht) F = SetOfZeros (rC ht) F ✓ rfl. And toFinset_inj : hs.toFinset = ht.toFinset ↔ s = t where hs : s.Finite — hs := hfin : (SetOfZeros (rC ht) F).Finite; ht' := subset-derived : (SetOfZeros (rC ht) F).Finite ✓ rfl ✓. ```lean theorem Cf_eq_div_collProd {t : ℝ} (ht : 10 ≤ |t|) {w : ℂ} (hw : w ∉ SetOfZeros (rC ht) (scaledZeta t)) : Cf (rC ht) (scaledZeta t) w = scaledZeta t w / collProd ht w := by classical have hfin : (SetOfZeros (rC ht) (scaledZeta t)).Finite := scaledZeta_zeros_finite.subset (t := SetOfZeros (rC ht) (scaledZeta t)) fun x hx => by obtain ⟨h1, h2⟩ := hx exact ⟨h1.trans (rC_lt_one ht).le, h2⟩ unfold Cf collProd simp only [hfin, ↓reduceDIte, hw, if_false] congr 2 exact collZeros_toFinset_eq ht hfin ``` Hmm — after unfold Cf: the term is `if finite_zeros_mono : ... then if w ∈ ... then ... else scaledZeta t w / ∏ ρ ∈ finite_zeros_mono.toFinset, ... else 1`. simp only [hfin, ↓reduceDIte] reduces outer dite; then `hw` : w ∉ SetOfZeros — the inner if's condition is `w ∈ SetOfZeros (rC ht) (scaledZeta t)` — simp only [hw]? hw is a ¬p; simp only [hw] uses ¬p to close if_neg? Use `if_neg hw`... The inner if: `if _ : w ∈ SetOfZeros r f then ... else f w / ∏ ...` — also a dite (binder _). simp only with ↓reduceDIte needs a proof of ¬(w ∈ ...) — that's hw ✓. So `simp only [hfin, hw, ↓reduceDIte]`? ↓reduceDIte fires when the condition is decided by an instance... hmm — in Zeta23's proofs: `simp only [finite_zeros_mono, ↓reduceDIte]` where finite_zeros_mono : (SetOfZeros r f).Finite (a POSITIVE fact) — reduces dite with the proof. For the negative: hw : w ∉ ... = ¬(w ∈ ...) = (w ∈ ... → False). simp only [hw] rewrites the proposition w ∈ ... to False? simp can use ¬p as p ↔ False ✓. Then ↓reduceDIte with decidability... Let me follow the pattern from CfAnalytic's proof: they did `by_cases w_in_zeros : w ∈ SetOfZeros r f; · simp only [finite_zeros_mono, ↓reduceDIte]` — wait they had both dites... their simp only [finite_zeros_mono, ↓reduceDIte] then inside the case they `rw [dif_pos w_in_zeros]` / `rw [dif_neg z_not_in]`. So the pattern: simp only [hfin, ↓reduceDIte] for the outer, then `rw [dif_neg hw]` for the inner? But the inner if's instance: it's `if _ : z ∈ SetOfZeros r f then ... else ...` — a dite. rw [dif_neg hw]: dif_neg needs the dite's decidability instance to match — dif_neg (h : ¬c) : dite c a b = b (hmm for dite it's `dif_neg : ¬c → dite c (λ h => a) (λ h => b) = b h`...). In Lean4 Mathlib: `dif_neg (h : ¬c) : (if h : c then a h else b h) = b h` ✓ should work with any instance (instance appears in both sides uniformly). So: ```lean unfold Cf simp only [hfin, ↓reduceDIte] rw [dif_neg hw] ``` then goal: scaledZeta t w / ∏ ρ ∈ hfin.toFinset, (w − ρ) ^ analyticOrderNatAt (scaledZeta t) ρ = scaledZeta t w / collProd ht w. collProd := ∏ ρ ∈ collZeros ht, ...: congr 1 (div args): prod arg: hfin.toFinset = collZeros ht (collZeros_toFinset_eq) — rw [collZeros_toFinset_eq ht hfin]?? direction: goal has hfin.toFinset; collZeros_toFinset_eq : hfin.toFinset = collZeros ht: rw [collZeros_toFinset_eq ht hfin] makes it collZeros ht; then collProd ht w unfolds to exactly ∏ ρ ∈ collZeros ht, ... — rfl after unfold collProd. So: ```lean rw [collZeros_toFinset_eq ht hfin] rfl -- or unfold collProd ``` Hmm — the ∏ binder form might differ: ∏ ρ ∈ s, (w − ρ) ^ analyticOrderNatAt (scaledZeta t) ρ on both sides ✓ syntactically identical after the finset rewrite (collProd unfolds definitionally — rfl should work since collProd ht w ≡ ∏ ρ ∈ collZeros ht, (w − ρ) ^ ... ✓ delta+beta). Wait — but there's the `classical` need: Cf's dites use Classical.propDecidable instance baked in. dif_neg hw works for any decidable instance ✓. And the zero-case: ```lean theorem Cf_eq_zeroFactor_div {t : ℝ} (ht : 10 ≤ |t|) {w : ℂ} (hw : w ∈ SetOfZeros (rC ht) (scaledZeta t)) : Cf (rC ht) (scaledZeta t) w = ZeroFactor (scaledZeta t) w / ∏ ρ ∈ collZeros ht \ {w}, (w - ρ) ^ analyticOrderNatAt (scaledZeta t) ρ := by classical have hfin : ... := ... unfold Cf simp only [hfin, ↓reduceDIte] rw [dif_pos hw, collZeros_toFinset_eq ht hfin] ``` ✓. Now — SetOfZeros membership vs collZeros membership: w ∈ SetOfZeros (rC ht) F ⟺ ‖w‖ ≤ rC ht ∧ F w = 0 (defeq) ⟺ w ∈ collZeros ht (mem_collZeros — but that goes through toFinset of the SUBSET-derived proof; the set is SetOfZeros (rC ht) F so membership in the set is direct). So `hw : w ∈ SetOfZeros (rC ht) (scaledZeta t)` directly gives ⟨hw.1, hw.2⟩? membership in a setOf-def set is the predicate — need whnf: use `have ⟨h1, h2⟩ := hw` (anonymous constructor dest unfolds ✓). B analyticity: ```lean theorem Cf_collZeros_analytic {t : ℝ} (ht : 10 ≤ |t|) : AnalyticOnNhd ℂ (Cf (rC ht) (scaledZeta t)) (Metric.closedBall 0 ((1 + rC ht) / 2)) := by apply CfAnalytic · -- r_c < (1 + r_c)/2 have h1 := rC_lt_one ht linarith [rC_pos ht] · -- (1 + r_c)/2 < 1 have h1 := rC_lt_one ht linarith · exact scaledZeta_analytic ht · rw [scaledZeta_zero]; exact one_ne_zero ``` CfAnalytic (r_lt_R : r < R) (R_lt_one : R < 1) (hfAnalytic : AnalyticOnNhd ℂ f (closedBall 0 1)) (hf_neq_zero_at_zero : f 0 ≠ 0) : AnalyticOnNhd ℂ (Cf r f) (closedBall 0 R). Implicit r, R, f. apply should unify. ✓ B nonvanishing: ```lean theorem Cf_collZeros_ne_zero {t : ℝ} (ht : 10 ≤ |t|) {w : ℂ} (hw : w ∈ Metric.closedBall 0 (rC ht)) : Cf (rC ht) (scaledZeta t) w ≠ 0 := by rw [Metric.mem_closedBall, dist_zero_right] at hw by_cases h0 : scaledZeta t w = 0 · -- w is a collected zero: ZeroFactor / product-of-others have hwS : w ∈ SetOfZeros (rC ht) (scaledZeta t) := ⟨hw, h0⟩ rw [Cf_eq_zeroFactor_div ht hwS] apply div_ne_zero · -- ZeroFactor ≠ 0 obtain ⟨h_w, h_w_an, h_w_ne, hZF, _⟩ := ZeroFactorization (rC_lt_one ht) (scaledZeta_analytic ht) (by rw [scaledZeta_zero]; exact one_ne_zero) hwS rw [hZF] -- ZeroFactor F w = h_w w exact h_w_ne · -- product over ZW \ {w} ≠ 0 apply Finset.prod_ne_zero_iff.mpr intro ρ hρ have hρne : ρ ≠ w := fun h => (Finset.mem_sdiff.mp hρ).2 (Finset.mem_singleton.mpr h) exact pow_ne_zero _ (sub_ne_zero.mpr (fun h => hρne h.symm)) · -- else-branch: F w / product have hwS : w ∉ SetOfZeros (rC ht) (scaledZeta t) := fun h => h0 h.2 rw [Cf_eq_div_collProd ht hwS] apply div_ne_zero h0 unfold collProd apply Finset.prod_ne_zero_iff.mpr intro ρ hρ have hρ0 : scaledZeta t ρ = 0 := ((mem_collZeros ht).mp hρ).2 exact pow_ne_zero _ (sub_ne_zero.mpr (fun h => h0 (h ▸ hρ0))) ``` Wait — ZeroFactorization signature: {R : ℝ} {f} {ρ} (RleOne : R < 1) (hfAnalytic : AnalyticOnNhd ℂ f (closedBall 0 1)) (hf_neq_zero_at_zero : f 0 ≠ 0) (hρ : ρ ∈ SetOfZeros R f) : ∃ h_ρ, AnalyticAt ℂ h_ρ ρ ∧ h_ρ ρ ≠ 0 ∧ ZeroFactor f ρ = h_ρ ρ ∧ f =ᶠ[nhds ρ] fun z ↦ (z − ρ) ^ analyticOrderNatAt f ρ * h_ρ z. With R := rC ht: RleOne : rC ht < 1 ✓. Implicit R unified by hρ ✓. obtain ⟨h_w, h_w_an, h_w_ne, hZF, hfact⟩. ✓ Hmm — `fun h => hρne h.symm`: sub_ne_zero.mpr : w − ρ ≠ 0 from w ≠ ρ: sub_ne_zero.mpr (h : a ≠ b) : a − b ≠ 0 — a := w, b := ρ: need w ≠ ρ: hρne : ρ ≠ w ⟹ w ≠ ρ := hρne.symm? Ne.symm : ρ ≠ w → w ≠ ρ ✓ so `sub_ne_zero.mpr hρne.symm`... I wrote fun h => hρne h.symm — h : w = ρ ⟹ h.symm : ρ = w ⟹ hρne h.symm : False ✓ equivalent. Use `sub_ne_zero.mpr hρne.symm` cleaner — hmm Ne.symm hρne. `hρne.symm` : Ne is symmetric via Ne.symm — dot notation hρne.symm works (Ne.symm). ✓ Let me use that. For the last: h : w = ρ ⟹ scaledZeta t w = scaledZeta t ρ = 0: `fun h => h0 (h ▸ hρ0)` — h ▸ hρ0 : rewrites w to ρ... h : w = ρ; hρ0 : scaledZeta t ρ = 0; h ▸ hρ0 rewrites ρ → w in hρ0? ▸ direction: h : w = ρ, h ▸ hρ0 rewrites w by ρ in... ugh. Clearer: `fun h => h0 (by rw [h]; exact hρ0)`. ✓ B center: ```lean theorem Cf_collZeros_zero : Cf (rC ht) (scaledZeta t) 0 = 1 / ∏ ρ ∈ collZeros ht, (0 - ρ) ^ ... ``` Actually I need log‖B 0‖ ≥ 0. B 0 = F 0/prod = 1/prod since 0 ∉ zeros (F 0 = 1 ≠ 0). ```lean theorem Cf_collZeros_log_norm_zero_nonneg {t : ℝ} (ht : 10 ≤ |t|) : 0 ≤ Real.log ‖Cf (rC ht) (scaledZeta t) 0‖ := by have h0S : (0:ℂ) ∉ SetOfZeros (rC ht) (scaledZeta t) := by intro h have h2 := h.2 rw [scaledZeta_zero] at h2 exact one_ne_zero h2 rw [Cf_eq_div_collProd ht h0S, scaledZeta_zero] -- ‖1 / ∏ (0 − ρ)^m‖ = 1 / ∏ ‖ρ‖^m; log ≥ 0 since ∏ ‖ρ‖^m ≤ 1 have hprod_norm : ‖collProd ht 0‖ = ∏ ρ ∈ collZeros ht, ‖ρ‖ ^ analyticOrderNatAt (scaledZeta t) ρ := by unfold collProd rw [norm_prod] apply Finset.prod_congr rfl intro ρ hρ rw [norm_pow, norm_zero_sub... ] -- ‖0 − ρ‖ = ‖ρ‖: norm_neg? 0 − ρ = −ρ: zero_sub, norm_neg rw [zero_sub, norm_neg] rw [hprod_norm, norm_div, norm_one] -- log (1 / ∏‖ρ‖^m) ≥ 0 ⟸ ∏‖ρ‖^m ≤ 1 ⟸ each ‖ρ‖ ≤ rC − δw < 1... actually ≤ rC ≤ 24/25 < 1 have hprod_le : ∏ ρ ∈ collZeros ht, ‖ρ‖ ^ analyticOrderNatAt (scaledZeta t) ρ ≤ 1 := by apply Finset.prod_le_one ... -- each factor ≤ 1 (‖ρ‖ ≤ rC ≤ 24/25 < 1, pow_le_one₀), each ≥ 0 have hprod_pos : 0 < ∏ ... := by apply Finset.prod_pos intro ρ hρ exact pow_pos (norm_pos_iff.mpr (fun h0 => ...)) _ -- ρ ≠ 0 since F ρ = 0 but F 0 = 1 rw [Real.log_div] ... -- log (1/x) = log 1 − log x = −log x ≥ 0 ⟸ log x ≤ 0 ⟸ x ≤ 1, x ≥ 0 ``` Hmm — Real.log_div : log (x/y) = log x − log y (needs y ≠ 0: Real.log_div (hy : y ≠ 0)? signature: Real.log_div (hx : x ≠ 0) (hy : y ≠ 0)? hmm — for reals log (x/y) = log x − log y needs x,y ≠ 0. `Real.log_div (hx : x ≠ 0) (hy : y ≠ 0)` ✓. Then log 1 − log(prod) = −log(prod) ≥ 0 ⟸ log(prod) ≤ 0 ⟸ 0 ≤ prod ≤ 1: Real.log_nonpos (hx : 0 ≤ x) (h : x ≤ 1) : log x ≤ 0 ✓. Wait — careful: ‖B 0‖ = ‖1/prod‖ = 1/‖prod‖ — the target is 0 ≤ log(1/‖prod‖). Let me restructure: 0 ≤ log(1/x) ⟺ log x ≤ 0 (x > 0). ✓ as above. Finset.prod_le_one: `Finset.prod_le_one (h0 : ∀ i ∈ s, 0 ≤ f i) (h1 : ∀ i ∈ s, f i ≤ 1) : ∏ i ∈ s, f i ≤ 1` ✓ (ordered comm monoid... ℝ ✓). Each factor ‖ρ‖^m ≤ 1: ‖ρ‖ ≤ rC ≤ 24/25 ≤ 1: pow_le_one₀ (norm_nonneg) (h : ‖ρ‖ ≤ 1) ✓. ρ ≠ 0 for ρ ∈ collZeros: F ρ = 0; if ρ = 0 then F 0 = 1 ≠ 0 contradiction: `fun h0 => by rw [← h0] at ... ` careful: h0 : ρ = 0; mem gives F ρ = 0; subst or rw h0 at it: scaledZeta t 0 = 0 vs scaledZeta_zero : = 1 ⟹ one_ne_zero. ✓ B sphere bound: ```lean theorem Cf_collZeros_norm_le_sphere {t : ℝ} (ht : 10 ≤ |t|) {w : ℂ} (hw : ‖w‖ = rC ht) : ‖Cf (rC ht) (scaledZeta t) w‖ ≤ (9 / 4) * |t| ^ 2 * (50 * ((card96 t : ℝ) + 1)) ^ collMultSum ht := by -- no zeros on the sphere have hwS : w ∉ SetOfZeros (rC ht) (scaledZeta t) := by intro hmem have hmemZ : w ∈ collZeros ht := (mem_collZeros ht).mpr ⟨hmem.1, hmem.2⟩ have hle := collZeros_norm_le ht hmemZ rw [hw] at hle -- rC ≤ rC − δw with δw > 0: contradiction have hδ : (0:ℝ) < 1 / (50 * ((card96 t : ℝ) + 1)) := by apply div_pos (by norm_num) unfold card96 exact mul_pos (by norm_num) (add_pos_of_nonneg_of_pos (Nat.cast_nonneg _) one_pos) linarith rw [Cf_eq_div_collProd ht hwS, norm_div] -- ‖F w‖ ≤ (9/4)|t|² have hF : ‖scaledZeta t w‖ ≤ (9 / 4) * |t| ^ 2 := norm_scaledZeta_le ht (hw ▸ (rC_le ht).trans (by norm_num)) -- ‖P w‖ ≥ δw^{M_c} ... ``` Hmm wait — collZeros_norm_le gives ‖w‖ ≤ rC − 1/(50*((card96... hold on — collZeros_norm_le's statement uses the explicit card expression ((scaledZeroFinset t (24/25) (by norm_num)).card : ℝ), and card96 t is DEFINED as that card. The δw in collZeros_norm_le: `1 / (50 * (((scaledZeroFinset t (24 / 25) (by norm_num)).card : ℝ) + 1))`. And card96 t unfolds to that card — `(card96 t : ℝ) = (((scaledZeroFinset ...).card : ℝ))` by unfold card96; push_cast/rfl. So in hδ I unfold card96 to match. Let me add a bridge lemma: ```lean theorem card96_cast (t : ℝ) : (card96 t : ℝ) = ((scaledZeroFinset t (24 / 25) (by norm_num : (24/25:ℝ) ≤ 1)).card : ℝ) := rfl ``` rfl should work (card96 is a def; cast of card). Then use it to convert hgap/collZeros_norm_le forms into card96 form. In collZeros_norm_le I could just state with card96 t directly and do the conversion inside its proof via card96_cast. Cleaner! Let me restate collZeros_norm_le with card96 t and convert: ```lean theorem collZeros_norm_le {t : ℝ} (ht : 10 ≤ |t|) {w : ℂ} (hw : w ∈ collZeros ht) : ‖w‖ ≤ rC ht - 1 / (50 * ((card96 t : ℝ) + 1)) := by have hmem := (mem_collZeros ht).mp hw have hw96 : w ∈ scaledZeroFinset t (24 / 25) (by norm_num) := scaledZeroFinset_subset (hr₂ := by norm_num) (rC_le ht) hw have hgap := rC_gap ht hw96 -- explicit card form have hle : ‖w‖ ≤ rC ht := hmem.1 have hX : ‖w‖ - rC ht ≤ 0 := sub_nonpos.mpr hle rw [abs_of_nonpos hX] at hgap -- hgap : 1/(50*(↑(card of 24/25 finset) + 1)) ≤ −(‖w‖ − rC ht) have hcast : (card96 t : ℝ) = ... := rfl linarith [hgap] -- needs the atom match: ↑(card96 t) vs ↑(explicit card): linarith sees them as different atoms! ``` linarith matches atoms syntactically — ↑(card96 t) ≠ ↑((scaledZeroFinset ...).card) syntactically. So rw [card96] at ... no. Add: `have hcast : ((scaledZeroFinset t (24/25) (by norm_num : (24/25:ℝ) ≤ 1)).card : ℝ) = (card96 t : ℝ) := rfl; rw [hcast] at hgap`. Then linarith with matching atoms ✓. Let me restructure collZeros_norm_le that way. And rC_gap could ALSO be restated with card96... but rC_gap's proof goes through collRadius_gap whose statement is fixed with the explicit form — do the same hcast-rw trick there. Hmm — simpler: define card96 FIRST (before exists_collection_radius) and state everything with card96, converting at the boundaries where exists_avoiding_midpoint's k = Z96.card — in exists_collection_radius the statement uses the explicit card; I could restate with card96 t... but card96 t := (scaledZeroFinset t (24/25) (by norm_num)).card — the explicit form in exists_collection_radius IS (scaledZeroFinset t (24/25) (by norm_num)).card — syntactically same! (by norm_num proofs are proof-irrelevant-equal ✓ syntactic match of terms: (by norm_num) vs (by norm_num) — same tactic text, same elaborated term? by norm_num elaborates to some proof term — two separate elaborations might produce different proof terms?? Both prove (24/25:ℝ) ≤ 1 — norm_num produces a term like `of_reduceBool...`? could differ? They're both proofs of a Prop — for the FINSET equality scaledZeroFinset t (24/25) h1 = scaledZeroFinset t (24/25) h2: proof irrelevance gives defeq, but SYNTACTIC atom-matching (linarith) needs syntactic equality of atoms — the atoms are ↑(Finset.card (scaledZeroFinset t (24/25) ⋯)) — pretty printer shows ⋯ for the proof — the underlying terms: if elaborated differently they'd be different atoms syntactically BUT linarith compares atoms up to reducible defeq? linarith uses syntactic comparison up to instances... risky. SAFEST: use card96 everywhere and ONE conversion lemma. Let me restructure: - Define card96 right after scaledZeroFinset (+ mem). - State exists_collection_radius with (card96 t : ℝ) in the clearance — inside the proof, Z96 := scaledZeroFinset t (24/25) _; the pigeonhole gives clearance 1/(2*(Z96.card+1)); and Z96.card = card96 t by rfl (Z96 is `set`-bound — set replaces occurrences... hmm set with hZ96 rewrites goal occurrences. If the statement has card96 t, then after `set Z96 := scaledZeroFinset ...` the goal's card96 t is NOT syntactically scaledZeroFinset... — set only abstracts the given pattern. So statement-with-card96 + proof-with-Z96 needs unfolding card96. `unfold card96` at proof start? The goal would become the explicit form ✓. OK. Plan: keep exists_collection_radius statement with explicit card (as now — it compiled!), and card96 defined after with `card96_cast : (card96 t : ℝ) = ↑((scaledZeroFinset t (24/25) (by norm_num)).card) := rfl`, and use hcast rewrites at use sites. Actually collZeros_norm_le's statement: I want card96 form for downstream (Bbound uses card96). Do the hcast trick inside. Fine — implement. Actually, hmm, wait: is `(card96 t : ℝ) = ((scaledZeroFinset t (24/25) (by norm_num)).card : ℝ)` really `rfl`? card96 t := (scaledZeroFinset t (24/25) (by norm_num)).card — the (by norm_num) in the DEF is elaborated once; the one in the lemma statement elaborated separately — same tactic, same goal ⟹ same proof term (deterministic elaboration) ⟹ rfl ✓ almost surely (norm_num is deterministic). And even if proof terms differed, proof irrelevance makes them defeq so `rfl` still works (rfl checks defeq up to proof irrelevance ✓). So card96_cast := rfl is safe. Then collZeros_norm_le with card96: inside, `rw [← card96_cast]`?? hgap comes in explicit form; convert hgap to card96 form by rw [← card96_cast] at hgap (replaces explicit cast with card96 cast). ✓ Then linarith. Let me also double check the FINAL Bbound form: (9/4)*|t|^2 * (50*((card96 t : ℝ)+1))^(collMultSum ht). The exponent: collMultSum ht : ℕ = Σ orders over collZeros. For the sphere bound's product estimate: ∏_{ρ ∈ ZW} ‖w−ρ‖^{m_ρ} ≥ ∏ (δw)^{m_ρ} = δw^{Σ m} (Finset.prod_pow_eq_pow_sum reversed: ∏ δw^{m} = δw^{Σ m} via Finset.prod_pow_eq_pow_sum : ∏ a^f = a^(Σ f) ✓). Each ‖w−ρ‖ ≥ δw: ‖w‖ = rC, ‖ρ‖ ≤ rC − δw ⟹ ‖w−ρ‖ ≥ ‖w‖ − ‖ρ‖ ≥ rC − (rC − δw) = δw (norm_sub_norm_le... ‖w‖ − ‖ρ‖ ≤ ‖w−ρ‖: norm_sub_norm_le w ρ : ‖w‖ − ‖ρ‖ ≤ ‖w − ρ‖? `norm_sub_norm_le : ‖a‖ − ‖b‖ ≤ ‖a − b‖` ✓). pow_le_pow_left₀ (δw ≥ 0) (δw ≤ ‖w−ρ‖) m ✓. And each factor positive for the div: ‖w−ρ‖ > 0 since ≥ δw > 0 ✓ — need δw > 0: 1/(50(k+1)) > 0 ✓. Then ‖B w‖ = ‖F w‖/‖P w‖ ≤ ((9/4)|t|²)/δw^{M_c}: div_le_div (hF : ‖F‖ ≤ (9/4)|t|²) (hP : δw^M ≤ ‖P‖) (pow_pos δw>0) (norm_nonneg): the 4-arg div_le_div : a/d ≤ b/c?? order: `div_le_div (h₁ : a ≤ b) (h₂ : c ≤ d) (h₃ : 0 < c) (h₄ : 0 ≤ a) : a / d ≤ b / c` — so a := ‖F‖, b := (9/4)|t|², c := δw^M, d := ‖P‖: gives ‖F‖/‖P‖ ≤ (9/4)|t|²/δw^M ✓ with h₁ := hF, h₂ := hP, h₃ := pow_pos, h₄ := norm_nonneg. Then (9/4)|t|²/δw^M = (9/4)|t|² · (1/δw)^M: 1/δw = 50(k+1): δw = 1/(50(k+1)): (1/(50(k+1)))^{-...}... δw^M in denominator: X/δw^M = X·(δw^M)⁻¹ = X·(δw⁻¹)^M (inv_pow) and δw⁻¹ = 50(k+1): δw = 1/(50(k+1)) ⟹ δw⁻¹ = 50(k+1) (one_div, inv_inv... inv (1/y) = y via div_one/inv... (1/y)⁻¹ = y: `inv_inv`? hmm δw as written is `1 / (50 * (k+1))` — its inverse: (1/y)⁻¹ = y: inv_inv? no: (x⁻¹)⁻¹ = x is inv_inv; 1/y = y⁻¹ via one_div... (1/y)⁻¹ = y⁻¹⁻¹ = y: rw [one_div, inv_inv]). So X/δw^M = X·(50(k+1))^M: div_eq_mul_inv, inv_pow, one_div (δw = 1/E so δw^M = 1/E^M...). Let me just compute: δw^M = (1/E)^M = 1/E^M (one_pow_div... `div_pow`? (1/E)^M = 1^M/E^M = 1/E^M: one_div_pow? there's `one_div_pow : (1/a)^n = 1/a^n`? or div_pow + one_pow). Then X/(1/E^M) = X·E^M (div_one... X/(1/y) = X·y: `div_one_div`? X/(1/y) = X*y: field_simp or `div_div_cancel'`... simplest: `div_one_div_eq_mul`? Let me just use field_simp at the end with E ≠ 0. Or avoid: state the sphere bound as ‖B w‖ ≤ (9/4)*|t|² / δw^(M_c) and let the BALL bound (and M_bound) use the /δw^M form, converting to the (50(k+1))^M form only in the log computation... For log: log(X/δw^M) = log X + M·log(1/δw)... Real.log_div (X≠0) (δw^M≠0): log X − log(δw^M) = log X − M·log δw; log δw = log(1/E) = −log E (Real.log_one_div? `Real.log_div` with 1: log(1/E) = log 1 − log E = −log E); so −M·log δw = M·log E ✓. And log X = log(9/4)+2L ✓. So M_bound := log((9/4)|t|²) + M_c·log(50(k+1)) and ‖B w‖ ≤ X/δw^M ⟹ log‖B w‖ ≤ log X + M·log E — via Real.log_le_log (‖B w‖ > 0? need B w ≠ 0 ✓ from nonvanishing... on the sphere/closed ball ✓) then the log identities. OK — keep Bbound := (9/4)*|t|^2 / δw^(M_c) with δw := 1/(50*(card96 t + 1)) — hmm δw as a def? Let me define: ```lean /-- The gap scale δw = 1/(50(k+1)). -/ noncomputable def δw (t : ℝ) : ℝ := 1 / (50 * ((card96 t : ℝ) + 1)) ``` Greek letter names are fine in Lean but the project's convention... LiSkeleton uses C0hat etc. Let me name it `gapδ`? or `dwGap`. I'll use `gapD (t : ℝ) : ℝ := 1 / (50 * ((card96 t : ℝ) + 1))`. Noncomputable not needed (pure real expr) but fine as plain def. Positivity lemma: gapD_pos. And collZeros_norm_le becomes: ‖w‖ ≤ rC ht − gapD t. rC_gap becomes: gapD t ≤ |‖w‖ − rC ht|. Cleaner. But rC_gap's proof concludes the explicit form — convert via card96_cast inside (gapD t unfolds to explicit after unfold gapD + card96_cast rw). Hmm, wait — gapD def uses card96 which needs the explicit finset — all fine (defs after card96). Let me restructure the order: 1. scaledZeroFinset + mem + subset + 24_25_eq + sum_order_le + card_le_sum (§6, as now). 2. card96 def + card96_cast + card96_pos-ish. 3. gapD def + gapD_pos. 4. exists_collection_radius (explicit form — keep), collRadius bundle, rC bundle, rC_gap (state with gapD; prove by converting collRadius_gap's explicit form), collZeros + mem + collZeros_norm_le (gapD form), collMultSum. 5. collProd, Cf characterizations, Cf_analytic, Cf_ne_zero, Cf log-norm-center ≥ 0, Cf sphere bound, Cf ball bound (max-modulus). 6. J_B + BC + main theorem. Let me now rewrite the tail (from rC_gap on) to use gapD, and add card96/gapD defs after card_le_sum. I'll edit the file: replace from "/-! ## 7." to the end with the restructured version, and add card96+gapD into §6. Actually §6 currently ends with scaledZeroFinset_card_le_sum; §7 starts with exists_collection_radius (no card96). Let me just append card96/gapD defs at the start of §7 and rewrite rC_gap/collZeros_norm_le statements in gapD form.
Chunk 1 compiles. Now restructuring §7 to route everything through named `card96`/`gapD` (avoids syntactic-atom mismatches downstream), then §8 (the Cf/g machinery).
tool: Edit
input
{
  "file_path": "D:\\Python\\Quantum\\research\\lean\\NguyenRH1\\NguyenRH1\\LiDisc.lean",
  "old_string": "/-! ## 7. The R-gap selection (\u00d710 rescale of the midpoint pigeonhole) -/\n\n/-- **The collection radius**: R_c \u2208 [2.3, 2.4] at distance \u2265 1/(20(k+1))",
  "new_string": "/-! ## 7. The R-gap selection (\u00d710 rescale of the midpoint pigeonhole) -/\n\n/-- The cardinality of the 24/25-finset. -/\nnoncomputable def card96 (t : \u211d) : \u2115 :=\n  (scaledZeroFinset t (24 / 25) (by norm_num)).card\n\ntheorem card96_cast (t : \u211d) :\n    (card96 t : \u211d) = ((scaledZeroFinset t (24 / 25)\n      (by norm_num : (24/25:\u211d) \u2264 1)).card : \u211d) := rfl\n\n/-- The gap scale \u03b4w = 1/(50(k+1)), k = card96. -/\nnoncomputable def gapD (t : \u211d) : \u211d := 1 / (50 * ((card96 t : \u211d) + 1))\n\ntheorem gapD_pos (t : \u211d) : 0 < gapD t := by\n  unfold gapD\n  apply div_pos (by norm_num)\n  exact mul_pos (by norm_num) (add_pos_of_nonneg_of_pos (Nat.cast_nonneg _) one_pos)\n\ntheorem gapD_le (t : \u211d) : gapD t \u2264 1 / 50 := by\n  unfold gapD\n  apply (div_le_div_iff_of_pos_left (by norm_num) (by norm_num : (0:\u211d) < 50 * 1)\n    (mul_pos (by norm_num : (0:\u211d) < 50)\n      (add_pos_of_nonneg_of_pos (Nat.cast_nonneg _) one_pos))).mpr\n  rw [mul_one]\n  exact mul_le_mul_of_nonneg_left (by linarith [Nat.cast_nonneg (card96 t)]) (by norm_num)\n\n/-- **The collection radius**: R_c \u2208 [2.3, 2.4] at distance \u2265 1/(20(k+1))"
}
raw content_json (database row)
[{"type":"thinking","thinking":"The warning: `exists_collection_radius`'s ht is unused (as I noted, the gap is combinatorial). But `collRadius ht` etc. take ht. Keep it (harmless warning; the API uniformity is worth it). Actually — unused variable warning only. Fine.\n\nChunk 1 GREEN. Now chunk 2: the Cf characterizations + B (g) lemmas. Let me write §8:\n\n```lean\n/-! ## 8. The Blaschke-quotient g := Cf r_c F: characterization, analyticity, nonvanishing -/\n\n/-- The product over the collected zeros. -/\nnoncomputable def collProd {t : ℝ} (ht : 10 ≤ |t|) (w : ℂ) : ℂ :=\n  ∏ ρ ∈ collZeros ht, (w - ρ) ^ analyticOrderNatAt (scaledZeta t) ρ\n```\n\nCf characterizations:\n\n```lean\ntheorem collZeros_toFinset_eq {t : ℝ} (ht : 10 ≤ |t|)\n    (hfin : (SetOfZeros (rC ht) (scaledZeta t)).Finite) :\n    hfin.toFinset = collZeros ht :=\n  Set.Finite.toFinset_inj.mpr rfl\n```\nWait — collZeros = scaledZeroFinset t (rC ht) _ = (subset-derived .Finite).toFinset. hfin.toFinset vs that: toFinset_inj.mpr rfl : needs sets equal: SetOfZeros (rC ht) F = SetOfZeros (rC ht) F ✓ rfl. And toFinset_inj : hs.toFinset = ht.toFinset ↔ s = t where hs : s.Finite — hs := hfin : (SetOfZeros (rC ht) F).Finite; ht' := subset-derived : (SetOfZeros (rC ht) F).Finite ✓ rfl ✓.\n\n```lean\ntheorem Cf_eq_div_collProd {t : ℝ} (ht : 10 ≤ |t|) {w : ℂ}\n    (hw : w ∉ SetOfZeros (rC ht) (scaledZeta t)) :\n    Cf (rC ht) (scaledZeta t) w = scaledZeta t w / collProd ht w := by\n  classical\n  have hfin : (SetOfZeros (rC ht) (scaledZeta t)).Finite :=\n    scaledZeta_zeros_finite.subset (t := SetOfZeros (rC ht) (scaledZeta t)) fun x hx => by\n      obtain ⟨h1, h2⟩ := hx\n      exact ⟨h1.trans (rC_lt_one ht).le, h2⟩\n  unfold Cf collProd\n  simp only [hfin, ↓reduceDIte, hw, if_false]\n  congr 2\n  exact collZeros_toFinset_eq ht hfin\n```\nHmm — after unfold Cf: the term is `if finite_zeros_mono : ... then if w ∈ ... then ... else scaledZeta t w / ∏ ρ ∈ finite_zeros_mono.toFinset, ... else 1`. simp only [hfin, ↓reduceDIte] reduces outer dite; then `hw` : w ∉ SetOfZeros — the inner if's condition is `w ∈ SetOfZeros (rC ht) (scaledZeta t)` — simp only [hw]? hw is a ¬p; simp only [hw] uses ¬p to close if_neg? Use `if_neg hw`... The inner if: `if _ : w ∈ SetOfZeros r f then ... else f w / ∏ ...` — also a dite (binder _). simp only with ↓reduceDIte needs a proof of ¬(w ∈ ...) — that's hw ✓. So `simp only [hfin, hw, ↓reduceDIte]`? ↓reduceDIte fires when the condition is decided by an instance... hmm — in Zeta23's proofs: `simp only [finite_zeros_mono, ↓reduceDIte]` where finite_zeros_mono : (SetOfZeros r f).Finite (a POSITIVE fact) — reduces dite with the proof. For the negative: hw : w ∉ ... = ¬(w ∈ ...) = (w ∈ ... → False). simp only [hw] rewrites the proposition w ∈ ... to False? simp can use ¬p as p ↔ False ✓. Then ↓reduceDIte with decidability... Let me follow the pattern from CfAnalytic's proof: they did `by_cases w_in_zeros : w ∈ SetOfZeros r f; · simp only [finite_zeros_mono, ↓reduceDIte]` — wait they had both dites... their simp only [finite_zeros_mono, ↓reduceDIte] then inside the case they `rw [dif_pos w_in_zeros]` / `rw [dif_neg z_not_in]`. So the pattern: simp only [hfin, ↓reduceDIte] for the outer, then `rw [dif_neg hw]` for the inner? But the inner if's instance: it's `if _ : z ∈ SetOfZeros r f then ... else ...` — a dite. rw [dif_neg hw]: dif_neg needs the dite's decidability instance to match — dif_neg (h : ¬c) : dite c a b = b (hmm for dite it's `dif_neg : ¬c → dite c (λ h => a) (λ h => b) = b h`...). In Lean4 Mathlib: `dif_neg (h : ¬c) : (if h : c then a h else b h) = b h` ✓ should work with any instance (instance appears in both sides uniformly).\n\nSo:\n```lean\n  unfold Cf\n  simp only [hfin, ↓reduceDIte]\n  rw [dif_neg hw]\n```\nthen goal: scaledZeta t w / ∏ ρ ∈ hfin.toFinset, (w − ρ) ^ analyticOrderNatAt (scaledZeta t) ρ = scaledZeta t w / collProd ht w. collProd := ∏ ρ ∈ collZeros ht, ...: congr 1 (div args): prod arg: hfin.toFinset = collZeros ht (collZeros_toFinset_eq) — rw [collZeros_toFinset_eq ht hfin]?? direction: goal has hfin.toFinset; collZeros_toFinset_eq : hfin.toFinset = collZeros ht: rw [collZeros_toFinset_eq ht hfin] makes it collZeros ht; then collProd ht w unfolds to exactly ∏ ρ ∈ collZeros ht, ... — rfl after unfold collProd. So:\n```lean\n  rw [collZeros_toFinset_eq ht hfin]\n  rfl  -- or unfold collProd\n```\nHmm — the ∏ binder form might differ: ∏ ρ ∈ s, (w − ρ) ^ analyticOrderNatAt (scaledZeta t) ρ on both sides ✓ syntactically identical after the finset rewrite (collProd unfolds definitionally — rfl should work since collProd ht w ≡ ∏ ρ ∈ collZeros ht, (w − ρ) ^ ... ✓ delta+beta).\n\nWait — but there's the `classical` need: Cf's dites use Classical.propDecidable instance baked in. dif_neg hw works for any decidable instance ✓.\n\nAnd the zero-case:\n```lean\ntheorem Cf_eq_zeroFactor_div {t : ℝ} (ht : 10 ≤ |t|) {w : ℂ}\n    (hw : w ∈ SetOfZeros (rC ht) (scaledZeta t)) :\n    Cf (rC ht) (scaledZeta t) w = ZeroFactor (scaledZeta t) w /\n      ∏ ρ ∈ collZeros ht \\ {w}, (w - ρ) ^ analyticOrderNatAt (scaledZeta t) ρ := by\n  classical\n  have hfin : ... := ...\n  unfold Cf\n  simp only [hfin, ↓reduceDIte]\n  rw [dif_pos hw, collZeros_toFinset_eq ht hfin]\n```\n✓.\n\nNow — SetOfZeros membership vs collZeros membership: w ∈ SetOfZeros (rC ht) F ⟺ ‖w‖ ≤ rC ht ∧ F w = 0 (defeq) ⟺ w ∈ collZeros ht (mem_collZeros — but that goes through toFinset of the SUBSET-derived proof; the set is SetOfZeros (rC ht) F so membership in the set is direct). So `hw : w ∈ SetOfZeros (rC ht) (scaledZeta t)` directly gives ⟨hw.1, hw.2⟩? membership in a setOf-def set is the predicate — need whnf: use `have ⟨h1, h2⟩ := hw` (anonymous constructor dest unfolds ✓).\n\nB analyticity:\n```lean\ntheorem Cf_collZeros_analytic {t : ℝ} (ht : 10 ≤ |t|) :\n    AnalyticOnNhd ℂ (Cf (rC ht) (scaledZeta t)) (Metric.closedBall 0 ((1 + rC ht) / 2)) := by\n  apply CfAnalytic\n  · -- r_c < (1 + r_c)/2\n    have h1 := rC_lt_one ht\n    linarith [rC_pos ht]\n  · -- (1 + r_c)/2 < 1\n    have h1 := rC_lt_one ht\n    linarith\n  · exact scaledZeta_analytic ht\n  · rw [scaledZeta_zero]; exact one_ne_zero\n```\nCfAnalytic (r_lt_R : r < R) (R_lt_one : R < 1) (hfAnalytic : AnalyticOnNhd ℂ f (closedBall 0 1)) (hf_neq_zero_at_zero : f 0 ≠ 0) : AnalyticOnNhd ℂ (Cf r f) (closedBall 0 R). Implicit r, R, f. apply should unify. ✓\n\nB nonvanishing:\n```lean\ntheorem Cf_collZeros_ne_zero {t : ℝ} (ht : 10 ≤ |t|) {w : ℂ}\n    (hw : w ∈ Metric.closedBall 0 (rC ht)) :\n    Cf (rC ht) (scaledZeta t) w ≠ 0 := by\n  rw [Metric.mem_closedBall, dist_zero_right] at hw\n  by_cases h0 : scaledZeta t w = 0\n  · -- w is a collected zero: ZeroFactor / product-of-others\n    have hwS : w ∈ SetOfZeros (rC ht) (scaledZeta t) := ⟨hw, h0⟩\n    rw [Cf_eq_zeroFactor_div ht hwS]\n    apply div_ne_zero\n    · -- ZeroFactor ≠ 0\n      obtain ⟨h_w, h_w_an, h_w_ne, hZF, _⟩ := ZeroFactorization (rC_lt_one ht)\n        (scaledZeta_analytic ht) (by rw [scaledZeta_zero]; exact one_ne_zero) hwS\n      rw [hZF]  -- ZeroFactor F w = h_w w\n      exact h_w_ne\n    · -- product over ZW \\ {w} ≠ 0\n      apply Finset.prod_ne_zero_iff.mpr\n      intro ρ hρ\n      have hρne : ρ ≠ w := fun h => (Finset.mem_sdiff.mp hρ).2 (Finset.mem_singleton.mpr h)\n      exact pow_ne_zero _ (sub_ne_zero.mpr (fun h => hρne h.symm))\n  · -- else-branch: F w / product\n    have hwS : w ∉ SetOfZeros (rC ht) (scaledZeta t) := fun h => h0 h.2\n    rw [Cf_eq_div_collProd ht hwS]\n    apply div_ne_zero h0\n    unfold collProd\n    apply Finset.prod_ne_zero_iff.mpr\n    intro ρ hρ\n    have hρ0 : scaledZeta t ρ = 0 := ((mem_collZeros ht).mp hρ).2\n    exact pow_ne_zero _ (sub_ne_zero.mpr (fun h => h0 (h ▸ hρ0)))\n```\nWait — ZeroFactorization signature: {R : ℝ} {f} {ρ} (RleOne : R < 1) (hfAnalytic : AnalyticOnNhd ℂ f (closedBall 0 1)) (hf_neq_zero_at_zero : f 0 ≠ 0) (hρ : ρ ∈ SetOfZeros R f) : ∃ h_ρ, AnalyticAt ℂ h_ρ ρ ∧ h_ρ ρ ≠ 0 ∧ ZeroFactor f ρ = h_ρ ρ ∧ f =ᶠ[nhds ρ] fun z ↦ (z − ρ) ^ analyticOrderNatAt f ρ * h_ρ z. With R := rC ht: RleOne : rC ht < 1 ✓. Implicit R unified by hρ ✓. obtain ⟨h_w, h_w_an, h_w_ne, hZF, hfact⟩. ✓\n\nHmm — `fun h => hρne h.symm`: sub_ne_zero.mpr : w − ρ ≠ 0 from w ≠ ρ: sub_ne_zero.mpr (h : a ≠ b) : a − b ≠ 0 — a := w, b := ρ: need w ≠ ρ: hρne : ρ ≠ w ⟹ w ≠ ρ := hρne.symm? Ne.symm : ρ ≠ w → w ≠ ρ ✓ so `sub_ne_zero.mpr hρne.symm`... I wrote fun h => hρne h.symm — h : w = ρ ⟹ h.symm : ρ = w ⟹ hρne h.symm : False ✓ equivalent. Use `sub_ne_zero.mpr hρne.symm` cleaner — hmm Ne.symm hρne. `hρne.symm` : Ne is symmetric via Ne.symm — dot notation hρne.symm works (Ne.symm). ✓ Let me use that.\n\nFor the last: h : w = ρ ⟹ scaledZeta t w = scaledZeta t ρ = 0: `fun h => h0 (h ▸ hρ0)` — h ▸ hρ0 : rewrites w to ρ... h : w = ρ; hρ0 : scaledZeta t ρ = 0; h ▸ hρ0 rewrites ρ → w in hρ0? ▸ direction: h : w = ρ, h ▸ hρ0 rewrites w by ρ in... ugh. Clearer: `fun h => h0 (by rw [h]; exact hρ0)`. ✓\n\nB center:\n```lean\ntheorem Cf_collZeros_zero : Cf (rC ht) (scaledZeta t) 0 = 1 / ∏ ρ ∈ collZeros ht, (0 - ρ) ^ ... \n```\nActually I need log‖B 0‖ ≥ 0. B 0 = F 0/prod = 1/prod since 0 ∉ zeros (F 0 = 1 ≠ 0). \n```lean\ntheorem Cf_collZeros_log_norm_zero_nonneg {t : ℝ} (ht : 10 ≤ |t|) :\n    0 ≤ Real.log ‖Cf (rC ht) (scaledZeta t) 0‖ := by\n  have h0S : (0:ℂ) ∉ SetOfZeros (rC ht) (scaledZeta t) := by\n    intro h\n    have h2 := h.2\n    rw [scaledZeta_zero] at h2\n    exact one_ne_zero h2\n  rw [Cf_eq_div_collProd ht h0S, scaledZeta_zero]\n  -- ‖1 / ∏ (0 − ρ)^m‖ = 1 / ∏ ‖ρ‖^m; log ≥ 0 since ∏ ‖ρ‖^m ≤ 1\n  have hprod_norm : ‖collProd ht 0‖ = ∏ ρ ∈ collZeros ht, ‖ρ‖ ^ analyticOrderNatAt (scaledZeta t) ρ := by\n    unfold collProd\n    rw [norm_prod]\n    apply Finset.prod_congr rfl\n    intro ρ hρ\n    rw [norm_pow, norm_zero_sub... ]  -- ‖0 − ρ‖ = ‖ρ‖: norm_neg? 0 − ρ = −ρ: zero_sub, norm_neg\n    rw [zero_sub, norm_neg]\n  rw [hprod_norm, norm_div, norm_one]\n  -- log (1 / ∏‖ρ‖^m) ≥ 0 ⟸ ∏‖ρ‖^m ≤ 1 ⟸ each ‖ρ‖ ≤ rC − δw < 1... actually ≤ rC ≤ 24/25 < 1\n  have hprod_le : ∏ ρ ∈ collZeros ht, ‖ρ‖ ^ analyticOrderNatAt (scaledZeta t) ρ ≤ 1 := by\n    apply Finset.prod_le_one ... -- each factor ≤ 1 (‖ρ‖ ≤ rC ≤ 24/25 < 1, pow_le_one₀), each ≥ 0\n  have hprod_pos : 0 < ∏ ... := by\n    apply Finset.prod_pos\n    intro ρ hρ\n    exact pow_pos (norm_pos_iff.mpr (fun h0 => ...)) _  -- ρ ≠ 0 since F ρ = 0 but F 0 = 1\n  rw [Real.log_div] ... -- log (1/x) = log 1 − log x = −log x ≥ 0 ⟸ log x ≤ 0 ⟸ x ≤ 1, x ≥ 0\n```\nHmm — Real.log_div : log (x/y) = log x − log y (needs y ≠ 0: Real.log_div (hy : y ≠ 0)? signature: Real.log_div (hx : x ≠ 0) (hy : y ≠ 0)? hmm — for reals log (x/y) = log x − log y needs x,y ≠ 0. `Real.log_div (hx : x ≠ 0) (hy : y ≠ 0)` ✓. Then log 1 − log(prod) = −log(prod) ≥ 0 ⟸ log(prod) ≤ 0 ⟸ 0 ≤ prod ≤ 1: Real.log_nonpos (hx : 0 ≤ x) (h : x ≤ 1) : log x ≤ 0 ✓.\n\nWait — careful: ‖B 0‖ = ‖1/prod‖ = 1/‖prod‖ — the target is 0 ≤ log(1/‖prod‖). Let me restructure: 0 ≤ log(1/x) ⟺ log x ≤ 0 (x > 0). ✓ as above.\n\nFinset.prod_le_one: `Finset.prod_le_one (h0 : ∀ i ∈ s, 0 ≤ f i) (h1 : ∀ i ∈ s, f i ≤ 1) : ∏ i ∈ s, f i ≤ 1` ✓ (ordered comm monoid... ℝ ✓). Each factor ‖ρ‖^m ≤ 1: ‖ρ‖ ≤ rC ≤ 24/25 ≤ 1: pow_le_one₀ (norm_nonneg) (h : ‖ρ‖ ≤ 1) ✓.\n\nρ ≠ 0 for ρ ∈ collZeros: F ρ = 0; if ρ = 0 then F 0 = 1 ≠ 0 contradiction: `fun h0 => by rw [← h0] at ... ` careful: h0 : ρ = 0; mem gives F ρ = 0; subst or rw h0 at it: scaledZeta t 0 = 0 vs scaledZeta_zero : = 1 ⟹ one_ne_zero. ✓\n\nB sphere bound:\n```lean\ntheorem Cf_collZeros_norm_le_sphere {t : ℝ} (ht : 10 ≤ |t|) {w : ℂ}\n    (hw : ‖w‖ = rC ht) :\n    ‖Cf (rC ht) (scaledZeta t) w‖ ≤ (9 / 4) * |t| ^ 2 *\n      (50 * ((card96 t : ℝ) + 1)) ^ collMultSum ht := by\n  -- no zeros on the sphere\n  have hwS : w ∉ SetOfZeros (rC ht) (scaledZeta t) := by\n    intro hmem\n    have hmemZ : w ∈ collZeros ht := (mem_collZeros ht).mpr ⟨hmem.1, hmem.2⟩\n    have hle := collZeros_norm_le ht hmemZ\n    rw [hw] at hle\n    -- rC ≤ rC − δw with δw > 0: contradiction\n    have hδ : (0:ℝ) < 1 / (50 * ((card96 t : ℝ) + 1)) := by\n      apply div_pos (by norm_num)\n      unfold card96\n      exact mul_pos (by norm_num) (add_pos_of_nonneg_of_pos (Nat.cast_nonneg _) one_pos)\n    linarith\n  rw [Cf_eq_div_collProd ht hwS, norm_div]\n  -- ‖F w‖ ≤ (9/4)|t|²\n  have hF : ‖scaledZeta t w‖ ≤ (9 / 4) * |t| ^ 2 :=\n    norm_scaledZeta_le ht (hw ▸ (rC_le ht).trans (by norm_num))\n  -- ‖P w‖ ≥ δw^{M_c}\n  ...\n```\nHmm wait — collZeros_norm_le gives ‖w‖ ≤ rC − 1/(50*((card96... hold on — collZeros_norm_le's statement uses the explicit card expression ((scaledZeroFinset t (24/25) (by norm_num)).card : ℝ), and card96 t is DEFINED as that card. The δw in collZeros_norm_le: `1 / (50 * (((scaledZeroFinset t (24 / 25) (by norm_num)).card : ℝ) + 1))`. And card96 t unfolds to that card — `(card96 t : ℝ) = (((scaledZeroFinset ...).card : ℝ))` by unfold card96; push_cast/rfl. So in hδ I unfold card96 to match. Let me add a bridge lemma:\n```lean\ntheorem card96_cast (t : ℝ) : (card96 t : ℝ) =\n    ((scaledZeroFinset t (24 / 25) (by norm_num : (24/25:ℝ) ≤ 1)).card : ℝ) := rfl\n```\nrfl should work (card96 is a def; cast of card). Then use it to convert hgap/collZeros_norm_le forms into card96 form. In collZeros_norm_le I could just state with card96 t directly and do the conversion inside its proof via card96_cast. Cleaner! Let me restate collZeros_norm_le with card96 t and convert:\n\n```lean\ntheorem collZeros_norm_le {t : ℝ} (ht : 10 ≤ |t|) {w : ℂ} (hw : w ∈ collZeros ht) :\n    ‖w‖ ≤ rC ht - 1 / (50 * ((card96 t : ℝ) + 1)) := by\n  have hmem := (mem_collZeros ht).mp hw\n  have hw96 : w ∈ scaledZeroFinset t (24 / 25) (by norm_num) :=\n    scaledZeroFinset_subset (hr₂ := by norm_num) (rC_le ht) hw\n  have hgap := rC_gap ht hw96  -- explicit card form\n  have hle : ‖w‖ ≤ rC ht := hmem.1\n  have hX : ‖w‖ - rC ht ≤ 0 := sub_nonpos.mpr hle\n  rw [abs_of_nonpos hX] at hgap\n  -- hgap : 1/(50*(↑(card of 24/25 finset) + 1)) ≤ −(‖w‖ − rC ht)\n  have hcast : (card96 t : ℝ) = ... := rfl\n  linarith [hgap]  -- needs the atom match: ↑(card96 t) vs ↑(explicit card): linarith sees them as different atoms!\n```\nlinarith matches atoms syntactically — ↑(card96 t) ≠ ↑((scaledZeroFinset ...).card) syntactically. So rw [card96] at ... no. Add: `have hcast : ((scaledZeroFinset t (24/25) (by norm_num : (24/25:ℝ) ≤ 1)).card : ℝ) = (card96 t : ℝ) := rfl; rw [hcast] at hgap`. Then linarith with matching atoms ✓. Let me restructure collZeros_norm_le that way. And rC_gap could ALSO be restated with card96... but rC_gap's proof goes through collRadius_gap whose statement is fixed with the explicit form — do the same hcast-rw trick there. Hmm — simpler: define card96 FIRST (before exists_collection_radius) and state everything with card96, converting at the boundaries where exists_avoiding_midpoint's k = Z96.card — in exists_collection_radius the statement uses the explicit card; I could restate with card96 t... but card96 t := (scaledZeroFinset t (24/25) (by norm_num)).card — the explicit form in exists_collection_radius IS (scaledZeroFinset t (24/25) (by norm_num)).card — syntactically same! (by norm_num proofs are proof-irrelevant-equal ✓ syntactic match of terms: (by norm_num) vs (by norm_num) — same tactic text, same elaborated term? by norm_num elaborates to some proof term — two separate elaborations might produce different proof terms?? Both prove (24/25:ℝ) ≤ 1 — norm_num produces a term like `of_reduceBool...`? could differ? They're both proofs of a Prop — for the FINSET equality scaledZeroFinset t (24/25) h1 = scaledZeroFinset t (24/25) h2: proof irrelevance gives defeq, but SYNTACTIC atom-matching (linarith) needs syntactic equality of atoms — the atoms are ↑(Finset.card (scaledZeroFinset t (24/25) ⋯)) — pretty printer shows ⋯ for the proof — the underlying terms: if elaborated differently they'd be different atoms syntactically BUT linarith compares atoms up to reducible defeq? linarith uses syntactic comparison up to instances... risky. SAFEST: use card96 everywhere and ONE conversion lemma. Let me restructure:\n\n- Define card96 right after scaledZeroFinset (+ mem).\n- State exists_collection_radius with (card96 t : ℝ) in the clearance — inside the proof, Z96 := scaledZeroFinset t (24/25) _; the pigeonhole gives clearance 1/(2*(Z96.card+1)); and Z96.card = card96 t by rfl (Z96 is `set`-bound — set replaces occurrences... hmm set with hZ96 rewrites goal occurrences. If the statement has card96 t, then after `set Z96 := scaledZeroFinset ...` the goal's card96 t is NOT syntactically scaledZeroFinset... — set only abstracts the given pattern. So statement-with-card96 + proof-with-Z96 needs unfolding card96. `unfold card96` at proof start? The goal would become the explicit form ✓. OK.\n\nPlan: keep exists_collection_radius statement with explicit card (as now — it compiled!), and card96 defined after with `card96_cast : (card96 t : ℝ) = ↑((scaledZeroFinset t (24/25) (by norm_num)).card) := rfl`, and use hcast rewrites at use sites. Actually collZeros_norm_le's statement: I want card96 form for downstream (Bbound uses card96). Do the hcast trick inside. Fine — implement.\n\nActually, hmm, wait: is `(card96 t : ℝ) = ((scaledZeroFinset t (24/25) (by norm_num)).card : ℝ)` really `rfl`? card96 t := (scaledZeroFinset t (24/25) (by norm_num)).card — the (by norm_num) in the DEF is elaborated once; the one in the lemma statement elaborated separately — same tactic, same goal ⟹ same proof term (deterministic elaboration) ⟹ rfl ✓ almost surely (norm_num is deterministic). And even if proof terms differed, proof irrelevance makes them defeq so `rfl` still works (rfl checks defeq up to proof irrelevance ✓). So card96_cast := rfl is safe. \n\nThen collZeros_norm_le with card96: inside, `rw [← card96_cast]`?? hgap comes in explicit form; convert hgap to card96 form by rw [← card96_cast] at hgap (replaces explicit cast with card96 cast). ✓ Then linarith.\n\nLet me also double check the FINAL Bbound form: (9/4)*|t|^2 * (50*((card96 t : ℝ)+1))^(collMultSum ht). The exponent: collMultSum ht : ℕ = Σ orders over collZeros. \n\nFor the sphere bound's product estimate: ∏_{ρ ∈ ZW} ‖w−ρ‖^{m_ρ} ≥ ∏ (δw)^{m_ρ} = δw^{Σ m} (Finset.prod_pow_eq_pow_sum reversed: ∏ δw^{m} = δw^{Σ m} via Finset.prod_pow_eq_pow_sum : ∏ a^f = a^(Σ f) ✓). Each ‖w−ρ‖ ≥ δw: ‖w‖ = rC, ‖ρ‖ ≤ rC − δw ⟹ ‖w−ρ‖ ≥ ‖w‖ − ‖ρ‖ ≥ rC − (rC − δw) = δw (norm_sub_norm_le... ‖w‖ − ‖ρ‖ ≤ ‖w−ρ‖: norm_sub_norm_le w ρ : ‖w‖ − ‖ρ‖ ≤ ‖w − ρ‖? `norm_sub_norm_le : ‖a‖ − ‖b‖ ≤ ‖a − b‖` ✓). pow_le_pow_left₀ (δw ≥ 0) (δw ≤ ‖w−ρ‖) m ✓. And each factor positive for the div: ‖w−ρ‖ > 0 since ≥ δw > 0 ✓ — need δw > 0: 1/(50(k+1)) > 0 ✓.\n\nThen ‖B w‖ = ‖F w‖/‖P w‖ ≤ ((9/4)|t|²)/δw^{M_c}: div_le_div (hF : ‖F‖ ≤ (9/4)|t|²) (hP : δw^M ≤ ‖P‖) (pow_pos δw>0) (norm_nonneg): the 4-arg div_le_div : a/d ≤ b/c?? order: `div_le_div (h₁ : a ≤ b) (h₂ : c ≤ d) (h₃ : 0 < c) (h₄ : 0 ≤ a) : a / d ≤ b / c` — so a := ‖F‖, b := (9/4)|t|², c := δw^M, d := ‖P‖: gives ‖F‖/‖P‖ ≤ (9/4)|t|²/δw^M ✓ with h₁ := hF, h₂ := hP, h₃ := pow_pos, h₄ := norm_nonneg. Then (9/4)|t|²/δw^M = (9/4)|t|² · (1/δw)^M: 1/δw = 50(k+1): δw = 1/(50(k+1)): (1/(50(k+1)))^{-...}... δw^M in denominator: X/δw^M = X·(δw^M)⁻¹ = X·(δw⁻¹)^M (inv_pow) and δw⁻¹ = 50(k+1): δw = 1/(50(k+1)) ⟹ δw⁻¹ = 50(k+1) (one_div, inv_inv... inv (1/y) = y via div_one/inv... (1/y)⁻¹ = y: `inv_inv`? hmm δw as written is `1 / (50 * (k+1))` — its inverse: (1/y)⁻¹ = y: inv_inv? no: (x⁻¹)⁻¹ = x is inv_inv; 1/y = y⁻¹ via one_div... (1/y)⁻¹ = y⁻¹⁻¹ = y: rw [one_div, inv_inv]). So X/δw^M = X·(50(k+1))^M: div_eq_mul_inv, inv_pow, one_div (δw = 1/E so δw^M = 1/E^M...). Let me just compute: δw^M = (1/E)^M = 1/E^M (one_pow_div... `div_pow`? (1/E)^M = 1^M/E^M = 1/E^M: one_div_pow? there's `one_div_pow : (1/a)^n = 1/a^n`? or div_pow + one_pow). Then X/(1/E^M) = X·E^M (div_one... X/(1/y) = X·y: `div_one_div`? X/(1/y) = X*y: field_simp or `div_div_cancel'`... simplest: `div_one_div_eq_mul`? Let me just use field_simp at the end with E ≠ 0. Or avoid: state the sphere bound as ‖B w‖ ≤ (9/4)*|t|² / δw^(M_c) and let the BALL bound (and M_bound) use the /δw^M form, converting to the (50(k+1))^M form only in the log computation... For log: log(X/δw^M) = log X + M·log(1/δw)... Real.log_div (X≠0) (δw^M≠0): log X − log(δw^M) = log X − M·log δw; log δw = log(1/E) = −log E (Real.log_one_div? `Real.log_div` with 1: log(1/E) = log 1 − log E = −log E); so −M·log δw = M·log E ✓. And log X = log(9/4)+2L ✓. So M_bound := log((9/4)|t|²) + M_c·log(50(k+1)) and ‖B w‖ ≤ X/δw^M ⟹ log‖B w‖ ≤ log X + M·log E — via Real.log_le_log (‖B w‖ > 0? need B w ≠ 0 ✓ from nonvanishing... on the sphere/closed ball ✓) then the log identities. OK — keep Bbound := (9/4)*|t|^2 / δw^(M_c) with δw := 1/(50*(card96 t + 1)) — hmm δw as a def? Let me define:\n\n```lean\n/-- The gap scale δw = 1/(50(k+1)). -/\nnoncomputable def δw (t : ℝ) : ℝ := 1 / (50 * ((card96 t : ℝ) + 1))\n```\nGreek letter names are fine in Lean but the project's convention... LiSkeleton uses C0hat etc. Let me name it `gapδ`? or `dwGap`. I'll use `gapD (t : ℝ) : ℝ := 1 / (50 * ((card96 t : ℝ) + 1))`. Noncomputable not needed (pure real expr) but fine as plain def. Positivity lemma: gapD_pos.\n\nAnd collZeros_norm_le becomes: ‖w‖ ≤ rC ht − gapD t. rC_gap becomes: gapD t ≤ |‖w‖ − rC ht|. Cleaner. But rC_gap's proof concludes the explicit form — convert via card96_cast inside (gapD t unfolds to explicit after unfold gapD + card96_cast rw).\n\nHmm, wait — gapD def uses card96 which needs the explicit finset — all fine (defs after card96).\n\nLet me restructure the order:\n1. scaledZeroFinset + mem + subset + 24_25_eq + sum_order_le + card_le_sum (§6, as now).\n2. card96 def + card96_cast + card96_pos-ish.\n3. gapD def + gapD_pos.\n4. exists_collection_radius (explicit form — keep), collRadius bundle, rC bundle, rC_gap (state with gapD; prove by converting collRadius_gap's explicit form), collZeros + mem + collZeros_norm_le (gapD form), collMultSum.\n5. collProd, Cf characterizations, Cf_analytic, Cf_ne_zero, Cf log-norm-center ≥ 0, Cf sphere bound, Cf ball bound (max-modulus).\n6. J_B + BC + main theorem.\n\nLet me now rewrite the tail (from rC_gap on) to use gapD, and add card96/gapD defs after card_le_sum. I'll edit the file: replace from \"/-! ## 7.\" to the end with the restructured version, and add card96+gapD into §6. Actually §6 currently ends with scaledZeroFinset_card_le_sum; §7 starts with exists_collection_radius (no card96). Let me just append card96/gapD defs at the start of §7 and rewrite rC_gap/collZeros_norm_le statements in gapD form.","signature":""},{"type":"text","text":"Chunk 1 compiles. Now restructuring §7 to route everything through named `card96`/`gapD` (avoids syntactic-atom mismatches downstream), then §8 (the Cf/g machinery)."},{"type":"tool_use","id":"Edit_48","name":"Edit","input":{"file_path":"D:\\Python\\Quantum\\research\\lean\\NguyenRH1\\NguyenRH1\\LiDisc.lean","old_string":"/-! ## 7. The R-gap selection (×10 rescale of the midpoint pigeonhole) -/\n\n/-- **The collection radius**: R_c ∈ [2.3, 2.4] at distance ≥ 1/(20(k+1))","new_string":"/-! ## 7. The R-gap selection (×10 rescale of the midpoint pigeonhole) -/\n\n/-- The cardinality of the 24/25-finset. -/\nnoncomputable def card96 (t : ℝ) : ℕ :=\n  (scaledZeroFinset t (24 / 25) (by norm_num)).card\n\ntheorem card96_cast (t : ℝ) :\n    (card96 t : ℝ) = ((scaledZeroFinset t (24 / 25)\n      (by norm_num : (24/25:ℝ) ≤ 1)).card : ℝ) := rfl\n\n/-- The gap scale δw = 1/(50(k+1)), k = card96. -/\nnoncomputable def gapD (t : ℝ) : ℝ := 1 / (50 * ((card96 t : ℝ) + 1))\n\ntheorem gapD_pos (t : ℝ) : 0 < gapD t := by\n  unfold gapD\n  apply div_pos (by norm_num)\n  exact mul_pos (by norm_num) (add_pos_of_nonneg_of_pos (Nat.cast_nonneg _) one_pos)\n\ntheorem gapD_le (t : ℝ) : gapD t ≤ 1 / 50 := by\n  unfold gapD\n  apply (div_le_div_iff_of_pos_left (by norm_num) (by norm_num : (0:ℝ) < 50 * 1)\n    (mul_pos (by norm_num : (0:ℝ) < 50)\n      (add_pos_of_nonneg_of_pos (Nat.cast_nonneg _) one_pos))).mpr\n  rw [mul_one]\n  exact mul_le_mul_of_nonneg_left (by linarith [Nat.cast_nonneg (card96 t)]) (by norm_num)\n\n/-- **The collection radius**: R_c ∈ [2.3, 2.4] at distance ≥ 1/(20(k+1))"},"extra_content":null}]