🏛️ Atlas✒️Formalizations.Combinatorics.Caballero.AngularCentralInjective view on GitHub ↗4 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.AngularGeneralApublic import Formalizations.Combinatorics.Caballero.AngularWindowspublic import Formalizations.Combinatorics.Caballero.AngularUpperTailpublic import Mathlib.Algebra.Order.Floor.Ring /-!# Central injectivity of Z on cell vectors for general a (Caballero, Part IV, Theorem 2) Theorem 2 of Part IV (central injectivity). Let E >= 1 and let c be a realisable vector with -1 <=c_h <= b - E for all h and spread max c - min c at most E. Then every realisable d different from cwith -1 <= d_h <= b - 1 and spread at most E has Z(d) different from Z(c). Only c needs the margin b- E. The proof goes from the clipped vectors to the plain floor vectors, equates the row multisetsby the row encoding (Lemma 7), then the window sums by the upper tail lemma, and concludes becausethe window sums determine the floor vector. The module builds on the base module of Part IV and itslemmas on window sums and the upper tail. Stated for every a (the paper fixes a >= 2) and for b >=1, as in the paper; realisability includes Lambda, theta > 0 as in the base module. ## Main results * `CaballeroCentralInjective.central_injectivity`: Theorem 2: for a realisable c with entries in [-1, b-E] and spread at most E, every realisable d different from c with entries in [-1, b-1] and spread at most E has Z(d) different from Z(c)* `CaballeroCentralInjective.eq_of_Z_eq`: Theorem 2 in the form: Z(d) = Z(c) with the same hypotheses forces d = c ## 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 CaballeroCentralInjective open CaballeroGeneralA /-- A realisable vector with all coordinates in `[-1, b - 1]` is the plain floor vector of itspoint: the clipping does not act. -/theorem cellVec_eq_floor (a b : ℕ) (hb : 1 ≤ b) (Λ θ : ℝ)    (h : ∀ k, -1 ≤ cellVec a b Λ θ k ∧ cellVec a b Λ θ k ≤ (b : ℤ) - 1) :    cellVec a b Λ θ = CaballeroWindows.floorVec a Λ θ := by  funext k  have hk := h k  have hb' : (0 : ℤ) ≤ b := by omega  have := CaballeroPeaks.clip_casos b ⌊Λ + ((((k : ℕ) : ℤ) - a : ℤ) : ℝ) * θ⌋ hb'  unfold cellVec at hk ⊢  unfold CaballeroWindows.floorVec  omega /-- The floor vector of a point with `θ > 0` is monotone in the index. -/theorem monotone_floorVec (a : ℕ) (Λ θ : ℝ) (hθ : 0 < θ) :    Monotone (CaballeroWindows.floorVec a Λ θ) := by  intro i j hij  unfold CaballeroWindows.floorVec  apply Int.floor_mono  have h1 : ((((i : ℕ) : ℤ) - a : ℤ) : ℝ) ≤ ((((j : ℕ) : ℤ) - a : ℤ) : ℝ) := by    have : (i : ℕ) ≤ (j : ℕ) := hij    exact_mod_cast (by omega : (((i : ℕ) : ℤ) - a) ≤ (((j : ℕ) : ℤ) - a))  nlinarith /-- Theorem 2 in the form "same `Z` implies equal": if `c` is realisable with `-1 ≤ c_h ≤ b - E`and spread at most `E`, every realisable `d` with `-1 ≤ d_h ≤ b - 1`, spread at most `E` and`Z d = Z c` equals `c`. -/theorem eq_of_Z_eq (a b : ℕ) (hb : 1 ≤ b) (E : ℤ) (hE : 1 ≤ E) (c d : Vec a)    (hc : Realisable a b c) (hd : Realisable a b d) (hcE : CentralE a b E c)    (hdb : ∀ k, -1 ≤ d k ∧ d k ≤ (b : ℤ) - 1) (hds : spread d ≤ E)    (hZ : Z a b d = Z a b c) : d = c := by  obtain ⟨Λ, θ, -, hθ, -, hcv⟩ := id hc  obtain ⟨Λ', θ', -, hθ', -, hdv⟩ := id hd  have hc' : ∀ k, -1 ≤ c k ∧ c k ≤ (b : ℤ) - 1 :=    fun k => ⟨(hcE.1 k).1, by have := (hcE.1 k).2; omega⟩  have ec : c = CaballeroWindows.floorVec a Λ θ := by    rw [← hcv]; exact cellVec_eq_floor a b hb Λ θ (by rw [hcv]; exact hc')  have ed : d = CaballeroWindows.floorVec a Λ' θ' := by    rw [← hdv]; exact cellVec_eq_floor a b hb Λ' θ' (by rw [hdv]; exact hdb)  have hmc : Monotone c := by rw [ec]; exact monotone_floorVec a Λ θ hθ  have hmd : Monotone d := by rw [ed]; exact monotone_floorVec a Λ' θ' hθ'  have hrows : Zr a b c = Zr a b d := (rows_iff a b c d hc hd).2 hZ.symm  have hva : coord c a ≤ (b : ℤ) - E := by    rw [coord_eq c (a : ℤ) (by omega) le_rfl]    exact (hcE.1 _).2  have hwin := upper_tail a b E hE c d hmc hmd    (fun k => ⟨(hcE.1 k).1, by have := (hcE.1 k).2; omega⟩)    (fun k => ⟨(hdb k).1, by have := (hdb k).2; omega⟩) hcE.2 hds hva hrows  have hfl : CaballeroWindows.floorVec a Λ θ = CaballeroWindows.floorVec a Λ' θ' := by    apply CaballeroWindows.windowSums_determine_floorVec    intro k hk    rw [← ec, ← ed]    exact hwin k hk  rw [ed, ← hfl, ← ec] /-- Theorem 2 (central injectivity). Let `E ≥ 1`. Let `c` be a realisable vector with`-1 ≤ c_h ≤ b - E` for all `h` and `max c - min c ≤ E`. Then every realisable `d ≠ c` with`-1 ≤ d_h ≤ b - 1` for all `h` and `max d - min d ≤ E` has `Z d ≠ Z c`. -/theorem central_injectivity (a b : ℕ) (hb : 1 ≤ b) (E : ℤ) (hE : 1 ≤ E) (c : Vec a)    (hc : Realisable a b c) (hcb : ∀ k, -1 ≤ c k ∧ c k ≤ (b : ℤ) - E) (hcs : spread c ≤ E)    (d : Vec a) (hd : Realisable a b d) (hdc : d ≠ c) (hdb : ∀ k, -1 ≤ d k ∧ d k ≤ (b : ℤ) - 1)    (hds : spread d ≤ E) : Z a b d ≠ Z a b c :=  fun hZ => hdc (eq_of_Z_eq a b hb E hE c d hc hd ⟨hcb, hcs⟩ hdb hds hZ) end CaballeroCentralInjective