🏛️ Atlas✒️Formalizations.Combinatorics.Caballero.AngularFirstPeak view on GitHub ↗2 theorems
/-Copyright (c) 2026 Carles Marín. All rights reserved.Released under Apache 2.0 license as described in the file LICENSE.Authors: Carles Marín, Claude (AI assistant)-/module public import Formalizations.Combinatorics.Caballero.AngularLowerBound /-!# The first peak of the ambiguity profile (Caballero, Part IV, Corollary 6) Corollary 6 of Part IV: for every a >= 2, the ambiguous proportion A_{a,b}(1/(a+1)) tends to 1 as btends to infinity (b ranges over the natural numbers, Filter.atTop). The proof follows the paper:the primary phase function satisfies U_a(1/(a+1)) = 1 by Lemma 4 (primaryPhase_third), and Theorem 5(lower_bound) gives b/(b + a/(a+1)) <= A_{a,b}(1/(a+1)) <= 1, so the proportion is squeezed to 1.A_{a,b} is CaballeroLowerBound.ambProportion. The corollary is not new: Part II, Proposition6.3(iii) at d = 0 already gives the same limit; the paper includes it because it follows from Lemma4. ## Main results * `CaballeroFirstPeak.tendsto_ambProportion_first_peak`: Corollary 6: for a >= 2, A_{a,b}(1/(a+1)) tends to 1 as b tends to infinity* `CaballeroFirstPeak.primaryPhase_first_peak`: Lemma 4 at the first peak: U_a(1/(a+1)) = 1 for a >= 2 ## References * C. Marín, How Many Dyck Words Do the Divisors of an Integer Make? IV. The Primary Phase of the Ambiguity Profile for General a, draft (2 December 2026), unpublished.* C. Marín, How Many Dyck Words Do the Divisors of an Integer Make? Exact Counts and Quasipolynomial Growth (Part I), Zenodo (2026), doi:10.5281/zenodo.24536372 (concept DOI).-/ @[expose] public section namespace CaballeroFirstPeak open Filter Topology CaballeroLowerBound CaballeroWidths /-- Lemma 4 at the first peak: `U_a(1/(a+1)) = 1` for `a ≥ 2`. -/theorem primaryPhase_first_peak (a : ℕ) (ha : 2 ≤ a) :    primaryPhase a (1 / ((a : ℝ) + 1)) = 1 := by  have ha1 : (0 : ℝ) < (a : ℝ) + 1 := by positivity  have ha0 : (0 : ℝ) < a := by exact_mod_cast (by omega : 0 < a)  rw [primaryPhase_third a ha _ le_rfl ?_]  · field_simp    ring  · rw [div_le_div_iff₀ ha1 ha0]    linarith /-- Corollary 6 (first peak): for every `a ≥ 2`, `lim_{b → ∞} A_{a,b}(1/(a+1)) = 1`. -/theorem tendsto_ambProportion_first_peak (a : ℕ) (ha : 2 ≤ a) :    Filter.Tendsto (fun b : ℕ => ambProportion a b (1 / ((a : ℝ) + 1))) Filter.atTop (nhds 1) := by  have ha1 : (0 : ℝ) < (a : ℝ) + 1 := by positivity  have hθ : 0 < 1 / ((a : ℝ) + 1) := by positivity  have hden : ∀ b : ℕ, 0 < (b : ℝ) + (a : ℝ) * (1 / ((a : ℝ) + 1)) := fun b => by    have : (0 : ℝ) < a := by exact_mod_cast (by omega : 0 < a)    positivity  have hg := tendsto_natCast_div_add_atTop ((a : ℝ) * (1 / ((a : ℝ) + 1)))  refine tendsto_of_tendsto_of_tendsto_of_le_of_le' hg tendsto_const_nhds ?_ ?_  · filter_upwards [eventually_ge_atTop 1] with b hb    unfold ambProportion    rw [div_le_div_iff_of_pos_right (hden b)]    have := lower_bound a b ha hb _ hθ    rwa [primaryPhase_first_peak a ha, mul_one] at this  · exact Eventually.of_forall fun b =>      div_le_one_of_le₀ (ambLength_le a b _ hθ.le) (hden b).le end CaballeroFirstPeak