🏛️ Atlas✒️Formalizations.Combinatorics.Caballero.AngularK6Examples view on GitHub ↗3 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.AngularK6Even /-!# Worked examples of the second-peak family (Caballero, Part IV) Examples of Part IV. After Theorem 2: for a = 4, b = 20, x = 0 the vector g of Theorem 17 is (15,15, 16, 16, 16, 17, 17, 18, 18) (g_example); for a = 4, x = 0 and every b >= 32, g has allcoordinates in [-1, b-4] and spread at most 4, so it satisfies the hypotheses of Theorem 2 with E =4 (g_centralE; its partner c has c_a = b, CaballeroK6Remark.twoStep_last_eq_b). Remark after Theorem3, item (1): for a = 4, b = 10, x = 8, c = (8, 8, 10^7), g = (8, 9, 9, 10^6), and Z^r(g) is Z^r(c)with one value 2 replaced by 1 (remark_example, by kernel evaluation with decide +kernel, no extraaxiom). ## Main results * `CaballeroK6Examples.g_centralE`: a = 4, x = 0, b >= 32: g satisfies the hypotheses of Theorem 2 with E = 4* `CaballeroK6Examples.g_example`: a = 4, b = 20, x = 0: g = (15,15,16,16,16,17,17,18,18)* `CaballeroK6Examples.remark_example`: a = 4, b = 10, x = 8: c, g and Z^r(g) = Z^r(c) - {2} + {1} ## 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.-/ @[expose] public section namespace CaballeroK6Examples open CaballeroGeneralA /-- Introduction, after Theorem 2: for `a = 4`, `b = 20`, `x = 0` the vector `g` of Theorem 17(`k = ab + a + x = 84`, `q = 5`) is `(15, 15, 16, 16, 16, 17, 17, 18, 18)`. -/theorem g_example :    CaballeroK6Even.slopeVec 4 20 5 84 = ![15, 15, 16, 16, 16, 17, 17, 18, 18] := by  funext i  unfold CaballeroK6Even.slopeVec  rw [CaballeroSlopeTwo.slope2_g_eq]  fin_cases i <;> decide /-- Introduction, after Theorem 2: for `a = 4`, `x = 0` and `b ≥ 32`, the vector `g` ofTheorem 17 (`k = 4b + 4`, `q = 5`) has all coordinates in `[-1, b - 4]` and spread at most `4`,so it satisfies the hypotheses of Theorem 2 with `E = 4`. -/theorem g_centralE (b : ℕ) (hb : 32 ≤ b) :    CentralE 4 b 4 (CaballeroK6Even.slopeVec 4 b 5 (4 * (b : ℤ) + 4)) := by  have hc : ∀ i : Fin 9, CaballeroK6Even.slopeVec 4 b 5 (4 * (b : ℤ) + 4) i =      (4 * (b : ℤ) + 4 + 2 * ((i : ℕ) - 4 : ℤ)) / 5 := by    intro i    unfold CaballeroK6Even.slopeVec    rw [CaballeroSlopeTwo.slope2_g_eq]    unfold CaballeroSlopeTwo.slope2_clip    have hi := i.2    have h1 : ((4 * (b : ℤ) + 4 + 2 * ((i : ℕ) - 4 : ℤ)) / 5) ≤ b := by omega    have h2 : 0 ≤ ((4 * (b : ℤ) + 4 + 2 * ((i : ℕ) - 4 : ℤ)) / 5) := by omega    push_cast    omega  have hb' : (32 : ℤ) ≤ b := by exact_mod_cast hb  have hlo : ∀ i : Fin 9, (4 * (b : ℤ) - 4) / 5 ≤ CaballeroK6Even.slopeVec 4 b 5 (4 * (b : ℤ) + 4) i := by    intro i; rw [hc i]; have := i.2; omega  have hhi : ∀ i : Fin 9, CaballeroK6Even.slopeVec 4 b 5 (4 * (b : ℤ) + 4) i ≤ (4 * (b : ℤ) + 12) / 5 := by    intro i; rw [hc i]; have := i.2; omega  refine ⟨fun i => ⟨?_, ?_⟩, ?_⟩  · have := hlo i; omega  · have := hhi i; omega  · unfold spread    have h1 : Finset.univ.sup' ⟨⟨0, by omega⟩, Finset.mem_univ _⟩        (CaballeroK6Even.slopeVec 4 b 5 (4 * (b : ℤ) + 4)) ≤ (4 * (b : ℤ) + 12) / 5 :=      Finset.sup'_le _ _ fun i _ => hhi i    have h2 : (4 * (b : ℤ) - 4) / 5 ≤ Finset.univ.inf' ⟨⟨0, by omega⟩, Finset.mem_univ _⟩        (CaballeroK6Even.slopeVec 4 b 5 (4 * (b : ℤ) + 4)) :=      Finset.le_inf' _ _ fun i _ => hlo i    omega /-- Remark after Theorem 3, item (1), the example for `a = 4`: for `b = 10` and `x = b - a + 2 = 8`,`c = (8, 8, 10, …, 10)` and `g = (8, 9, 9, 10, …, 10)` (`k = 52`, `q = 5`), and `Z^r(g)` is`Z^r(c)` with one value `r = 2` replaced by `r - 1 = 1`. -/theorem remark_example :    CaballeroTwoStep.twoStep 4 10 2 8 = ![8, 8, 10, 10, 10, 10, 10, 10, 10] ∧      CaballeroK6Even.slopeVec 4 10 5 52 = ![8, 9, 9, 10, 10, 10, 10, 10, 10] ∧      Zr 4 10 (CaballeroK6Even.slopeVec 4 10 5 52) =        (Zr 4 10 (CaballeroTwoStep.twoStep 4 10 2 8)).erase 2 + {1} := by  have hc : CaballeroTwoStep.twoStep 4 10 2 8 = ![8, 8, 10, 10, 10, 10, 10, 10, 10] := by    funext i    unfold CaballeroTwoStep.twoStep    fin_cases i <;> rfl  have hg : CaballeroK6Even.slopeVec 4 10 5 52 = ![8, 9, 9, 10, 10, 10, 10, 10, 10] := by    funext i    unfold CaballeroK6Even.slopeVec    rw [CaballeroSlopeTwo.slope2_g_eq]    fin_cases i <;> decide  refine ⟨hc, hg, ?_⟩  rw [hc, hg]  decide +kernel end CaballeroK6Examples