Lean sources / SurfaceBlowup / Reciprocity / Main.lean
The reciprocity law (Theorem 1.2)
1/-2Copyright (c) 2026 Asvin G, Claude (Anthropic), GPT-6-Astra (OpenAI). All rights reserved.3Released under Apache 2.0 license as described in the file LICENSE.4Authors: Asvin G, Claude (Anthropic), GPT-6-Astra (OpenAI)5-/6import SurfaceBlowup.Reciprocity.Patterns7 8/-!9# The reciprocity law (Theorem 1.2)10 11This file assembles the proof of Theorem 1.2: the universal monic density `monicExpr n σ` is the12`σ`-coefficient of the root law `rootLaw n` with `q ↦ 1/q` substituted (`A_n(q) = B_n(1/q)`),13and the universal projective density `projectiveExpr n σ` is self-reciprocal14(`R_n(1/q) = R_n(q)`).15 16The single-boundary cluster series `B_a = clusterSer a` satisfies an operator equation17`B_a = ρ(U_{a,a}) Φ(G_a)` for the contact series `U_{a,a} = crossingQ a a`, where18`G_a = eulerSer 0 a` is its Euler transform. Conjugating by reciprocal substitution `q ↦ q⁻¹`19and using the unitarity of `U_{a,a}` through a given degree, an induction on the cluster degree20shows `G_a = S(B_aᵛ)` (`S` the dilation `x ↦ qx`, `ᵛ` the reciprocal substitution). Reading off21coefficients for `a = 1` gives both statements.22 23## Main results24 25* `coeff_clusterSer_eq_coeff_qact`: `B_a = ρ(U_{a,a}) Φ(G_a)` coefficientwise.26* `cluster_reciprocity`: `G_a ≡ S(B_aᵛ)` in every degree.27* `lawCoef_globalLaw_false_eq_recipCoef`, `recipCoef_lawCoef_globalLaw_true`: the coefficient28 forms.29* `recip_main`: Theorem 1.2.30 31Provenance: `Thm_SurfaceBlowupV2_recip_{single_exit_regroup, single_operator_equation,32reciprocal_operator_equation, second_operator_equation, cluster_step, cluster_all, affine_coef,33projective_coef, main}`.34-/35 36namespace SurfaceBlowup37 38/-! ### The operator equation for single-boundary clusters -/39 40/-- The exit part of the recursion of `S(a;n)` (`n ≥ 2`), plus the self-return term41`q^{-tri n} q F_{S(a;n)}`, regroups by divisor degree `d` and crossing depth `r` into the42pattern sums `patternSum 0 a (a n) (d - r)`, weighted by the divisor probabilities and the laws43of the crossing children `T(a,a;r,n-d)`. -/44private theorem lawCoef_exitLaw_single_add_self (a n : ℕ) (ha : 0 < a) (hn : 2 ≤ n) :45 lawCoef (exitLaw (State.single a n)) +46 qpow (-(tri n : ℤ)) * (qpow 1 * lawCoef (stateLaw (State.single a n))) =47 ∑ d ∈ Finset.Icc 1 n, ∑ r ∈ Finset.range (d + 1),48 (if ((0 < r ↔ d < n) ∧ r ≤ d) then49 scalar (divisorProbability (State.single a n) d).rational *50 ((if r = 0 then 1 else lawCoef (stateLaw (State.crossing a a r (n - d)))) *51 patternSum 0 a (a * n) (d - r))52 else 0) := by53 classical54 have hn0 : 0 < n := by omega55 have hA : ∀ P ∈ allowedPatterns (State.single a n), Allowed (State.single a n) P :=56 fun P hP ↦ (Finset.mem_filter.mp hP).257 set T : TangentPattern (State.single a n).degree → Coef := fun P ↦58 lawCoef (lawScale (.mul (tangentCount (State.single a n) P)59 (divisorProbability (State.single a n) P.d.val))60 (lawProd ((children (State.single a n) P).map fun z ↦ lawDescend z.1 (stateLaw z.2))))61 with hT62 have hexit : lawCoef (exitLaw (State.single a n)) = ∑ P ∈ allowedPatterns (State.single a n),63 (if SelfPattern (State.single a n) P then 0 else T P) := by64 unfold exitLaw65 rw [lawCoef_flatMap, Finset.sum_map_toList]66 refine Finset.sum_congr rfl fun P _ ↦ ?_67 split_ifs <;> simp [lawCoef_nil, hT]68 obtain ⟨P₀, hA₀, hS₀, huniq⟩ := exists_unique_selfPattern_single a n ha hn69 have hself : ∑ P ∈ allowedPatterns (State.single a n),70 (if SelfPattern (State.single a n) P then T P else 0) = T P₀ := by71 rw [Finset.sum_eq_single P₀ (fun Q hQ hne ↦ ite_eq_right fun hSQ ↦ hne (huniq Q (hA Q hQ) hSQ))72 (fun h ↦ absurd (Finset.mem_filter.mpr ⟨Finset.mem_univ _, hA₀⟩) h), ite_eq_left hS₀]73 have hsplit : lawCoef (exitLaw (State.single a n)) + T P₀ =74 ∑ P ∈ allowedPatterns (State.single a n), T P := by75 rw [hexit, ← hself, ← Finset.sum_add_distrib]76 refine Finset.sum_congr rfl fun P _ ↦ ?_77 split_ifs <;> simp78 rw [← lawCoef_single_self_term a n ha hn P₀ hA₀ hS₀]79 refine hsplit.trans <| (Finset.sum_congr rfl fun P hP ↦80 lawCoef_single_term a n ha hn0 P (hA P hP)).trans ?_81 rw [sum_allowedPatterns_single a n ha (fun d r m ↦82 scalar ((divisorCount 0 m).rational * (divisorProbability (State.single a n) d).rational) *83 ((if r = 0 then 1 else lawCoef (stateLaw (State.crossing a a r (n - d)))) *84 ∏ ij : Fin (State.single a n).degree × Fin (State.single a n).degree,85 (adamsCoef (ij.1.val + 1) (lawCoef (stateLaw (State.single a (ij.2.val + 1))))) ^86 (m ij).val))]87 refine Finset.sum_congr rfl fun d _ ↦ Finset.sum_congr rfl fun r _ ↦ ?_88 by_cases hcond : ((0 < r ↔ d < n) ∧ r ≤ d)89 · rw [ite_eq_left hcond, ite_eq_left hcond]90 exact sum_patterns_scalar_mul_eq_patternSum _ _ _ _ _ _91 · rw [ite_eq_right hcond, ite_eq_right hcond]92 93/-- **Operator equation.** The cluster series is obtained from its Euler transform by the94Gaussian twist and the contact representation: `B_a = ρ(U_{a,a}) Φ(G_a)`, coefficientwise. -/95theorem coeff_clusterSer_eq_coeff_qact (a n : ℕ) (ha : 0 < a) :(S) = (7.11)(8.9)(9.4)96 PowerSeries.coeff n (clusterSer a) =97 PowerSeries.coeff n (qact (crossingQ a a) (gaussPhi (eulerSer 0 a))) := by98 have hqp : ∀ k : ℤ, qpow k = algebraMap (RatFunc ℚ) Coef ((RatFunc.X : RatFunc ℚ) ^ k) :=99 fun k ↦ scalar_eq_algebraMap _100 rw [coeff_qact_crossingQ_gaussPhi_eulerSer a n ha]101 rcases Nat.lt_or_ge n 2 with hn | hn102 · interval_cases n103 · simp [(coeff_zero_clusterSer a)]104 · rw [(coeff_one_clusterSer a)]105 simp only [Finset.Icc_self, Finset.sum_singleton, Finset.sum_range_succ, Finset.range_one]106 have hp : patternSum 0 a (a * 1) 1 =107 qpow 1 * AddMonoidAlgebra.single ({(a, 1)} : FactorType) 1 := by108 rw [patternSum_eq_of_le 0 a (a * 1) 1 1 (by omega) le_rfl, ← coeff_eulerSer,109 coeff_one_eulerSer_zero a]110 have hd : (divisorProbability (State.single a 1) 1).rational =111 (RatFunc.X : RatFunc ℚ)⁻¹ := by112 rw [rational_divisorProbability_single a 1 1]; simp [tri]113 simp only [hp, hd, lt_irrefl, iff_self, zero_le, and_self, ite_true, one_ne_zero, ite_false,114 one_mul, Nat.sub_zero, zero_lt_one, iff_false, not_true, false_and, add_zero]115 rw [scalar_eq_algebraMap, hqp, ← mul_assoc, ← map_mul, zpow_one,116 inv_mul_cancel₀ RatFunc.X_ne_zero, map_one,117 one_mul]118 · have hB := (coeff_succ_clusterSer a (n - 1))119 rw [show n - 1 + 1 = n by omega] at hB120 have hreg := lawCoef_exitLaw_single_add_self a n ha hn121 have hnt : (State.single a n).terminal = false := by122 obtain ⟨k, rfl⟩ : ∃ k, n = k + 2 := ⟨n - 2, by omega⟩123 rfl124 have hs : (State.single a n).Valid := ⟨ha, by omega⟩125 have hlaw := (state_law_unfold _ hs hnt).1 a n rfl126 rw [hB, hlaw]; rw [hlaw] at hreg127 have hsub : (Expr.sub (Expr.const 1) (returnWeight n)).rational =128 1 - (returnWeight n).rational := by129 rw [Expr.rational_sub (x := Expr.const 1) trivial (wf_returnWeight n), Expr.rational_const]130 simp131 rw [lawCoef_lawScale, Expr.rational_inv, hsub] at hreg ⊢132 have hne := one_sub_rational_returnWeight_ne_zero n hn133 have hlam : (returnWeight n).rational =134 (RatFunc.X : RatFunc ℚ) ^ (-(tri n : ℤ)) * RatFunc.X ^ (1 : ℤ) := by135 rw [rational_returnWeight n, zpow_neg, zpow_natCast, zpow_one,136 mul_comm]137 rw [← hreg, ite_eq_right (by omega), add_zero, ← mul_assoc, hqp, hqp, ← map_mul, ← hlam,138 scalar_eq_algebraMap,139 ← mul_assoc, ← map_mul, ← one_add_mul, ← map_one (algebraMap (RatFunc ℚ) Coef), ← map_add]140 congr 2141 field_simp142 ring143 144/-- **Reciprocal operator equation.** Applying reciprocal substitution and the dilation to the145operator equation: `Φ(S(B_aᵛ)) = ρ(U_{a,a}†) S(G_aᵛ)`. -/146private theorem gaussPhi_dilate_recipSer_clusterSer (a : ℕ) (ha : 0 < a) :(9.4)147 gaussPhi (dilate (recipSer (clusterSer a))) =148 qact (qdagger (crossingQ a a)) (dilate (recipSer (eulerSer 0 a))) := by149 have hB : clusterSer a = qact (crossingQ a a) (gaussPhi (eulerSer 0 a)) :=150 PowerSeries.ext fun n ↦ coeff_clusterSer_eq_coeff_qact a n ha151 have hv : recipSer (clusterSer a) =152 qactRecip (qrecip (crossingQ a a)) (gaussPhiInv (recipSer (eulerSer 0 a))) := by153 rw [hB, (recipSer_qact _ _), (recipSer_gaussPhi (eulerSer 0 a))]154 have hconj := gaussPhi_qactRecip_gaussPhiInv (crossingQ a a)155 (fun c h ↦ crossingQ_symm a a c h ha ha) (recipSer (eulerSer 0 a))156 rw [← hv] at hconj157 rw [(gaussPhi_dilate (recipSer (clusterSer a))), hconj,158 (dilate_codilate (qact (qdagger (crossingQ a a))159 (dilate (recipSer (eulerSer 0 a)))))]160 161/-- If `U_{a,a} U_{a,a}† ≡ 1` through degree `n`, then `ρ(U_{a,a}) Φ(S(B_aᵛ)) ≡ S(G_aᵛ)`162through degree `n`. -/163private theorem qact_gaussPhi_dilate_recipSer_scongr (a n : ℕ) (ha : 0 < a)(9.4)164 (hU : QCongr n (qmul (crossingQ a a) (qdagger (crossingQ a a))) qone) :165 SCongr n (qact (crossingQ a a) (gaussPhi (dilate (recipSer (clusterSer a)))))166 (dilate (recipSer (eulerSer 0 a))) := by167 rw [gaussPhi_dilate_recipSer_clusterSer a ha, ← qact_qmul]168 simpa only [qact_qone] using hU.qact_scongr (dilate (recipSer (eulerSer 0 a)))169 170/-! ### The induction on cluster degree -/171 172/-- Inductive step: if `G_b ≡ S(B_bᵛ)` through degree `n - 1` for all `b > 0`, then173`G_a ≡ S(B_aᵛ)` through degree `n` (`n ≥ 2`). -/174private theorem cluster_reciprocity_step (n : ℕ) (hn : 2 ≤ n)Proof of monic/cluster reciprocity175 (ih : ∀ a : ℕ, 0 < a → SCongr (n - 1) (eulerSer 0 a) (dilate (recipSer (clusterSer a))))176 (a : ℕ) (ha : 0 < a) :177 SCongr n (eulerSer 0 a) (dilate (recipSer (clusterSer a))) := by178 have hQ := qcongr_crossingQ_mul_qdagger (n / 2) (fun b hb ↦179 (SCongr.mono (ih b hb) (by omega)))180 n (by omega) a a ha ha181 have h2 := qact_gaussPhi_dilate_recipSer_scongr a n ha hQ n le_rfl182 have hD : ∀ m : ℕ, m < n → PowerSeries.coeff m183 (eulerSer 0 a - dilate (recipSer (clusterSer a))) = 0 := fun m hm ↦ by184 rw [map_sub, sub_eq_zero]185 exact ih a ha m (by omega)186 have lead := coeff_qact_gaussPhi_of_lt (crossingQ a a) (crossingQ_zero_zero a a) _ n hD187 rw [(gaussPhi_sub (eulerSer 0 a) (dilate (recipSer (clusterSer a)))),188 (qact_sub (crossingQ a a) _ _), map_sub, map_sub,189 ← coeff_clusterSer_eq_coeff_qact a n ha, h2] at lead190 have h4 := coeff_pPow_sub_of_scongr n (by omega) (RatFunc.X : RatFunc ℚ)⁻¹ _ _191 (constantCoeff_eulerSer 0 a)192 (by rw [← PowerSeries.coeff_zero_eq_constantCoeff_apply,193 coeff_zero_dilate_recipSer_clusterSer]) (ih a ha)194 rw [← clusterSer_eq_pPow, ← dilate_recipSer_eulerSer_eq_pPow] at h4195 set δ := PowerSeries.coeff n (eulerSer 0 a) -196 PowerSeries.coeff n (dilate (recipSer (clusterSer a)))197 have key : scalar ((RatFunc.X : RatFunc ℚ)⁻¹ - (RatFunc.X : RatFunc ℚ) ^ (-(tri n : ℤ))) * δ =198 0 := by199 have : scalar ((RatFunc.X : RatFunc ℚ)⁻¹ - (RatFunc.X : RatFunc ℚ) ^ (-(tri n : ℤ)))200 = scalar (RatFunc.X : RatFunc ℚ)⁻¹ - qpow (-(tri n : ℤ)) :=201 AddMonoidAlgebra.single_sub (R := RatFunc ℚ) _ _ _202 rw [this, sub_mul, ← h4, ← lead, sub_self]203 have hδ := eq_zero_of_scalar_mul_eq_zero (X_inv_sub_X_zpow_neg_tri_ne_zero n hn) key204 intro m hm205 rcases Nat.lt_or_ge m n with h | h206 · exact ih a ha m (by omega)207 · obtain rfl : m = n := by omega208 exact sub_eq_zero.mp hδ209 210/-- **Cluster reciprocity.** For every `a > 0`, the Euler transform `G_a` agrees with the211dilated reciprocal cluster series `S(B_aᵛ)` in every degree `≤ n`. -/212theorem cluster_reciprocity (n a : ℕ) (ha : 0 < a) :Proof of monic/cluster reciprocityTheorem 9.3213 SCongr n (eulerSer 0 a) (dilate (recipSer (clusterSer a))) := by214 induction n using Nat.strong_induction_on generalizing a with215 | _ n ih =>216 by_cases h : n ≤ 1217 · exact (SCongr.mono (cluster_reciprocity_one a) h)218 · exact cluster_reciprocity_step n (by omega) (fun a ha ↦ ih (n - 1) (by omega) a ha) a ha219 220/-! ### Coefficient forms and Theorem 1.2 -/221 222/-- **Affine reciprocity.** The global monic law is the reciprocal of the root law:223`F_global(q) = F_{S(1;n)}(1/q)` as elements of `Coef`. -/224theorem lawCoef_globalLaw_false_eq_recipCoef (n : ℕ) (hn : 0 < n) :Theorem 1.2Lemma 9.2225 lawCoef (globalLaw false n) = recipCoef (lawCoef (rootLaw n)) := by226 have h1 := (cluster_reciprocity n 1 one_pos) n le_rfl227 rw [coeff_eulerSer,228 (coeff_dilate (recipSer (clusterSer 1)) n),229 (coeff_recipSer (clusterSer 1) n)] at h1230 obtain ⟨m, rfl⟩ : ∃ m, n = m + 1 := ⟨n - 1, by omega⟩231 rw [(coeff_succ_clusterSer 1 m)] at h1232 rw [show rootLaw (m + 1) = stateLaw (.single 1 (m + 1)) by simp [rootLaw]]233 refine scalar_mul_left_cancel (pow_ne_zero (m + 1) (RatFunc.X_ne_zero (K := ℚ))) ?_234 rw [← qpow_natCast, ← h1, lawCoef_globalLaw_false, ← mul_assoc, mul_comm (qpow _),235 qpow_neg_mul_qpow, one_mul]236 237/-- **Projective self-reciprocity.** The normalised global projective law `R_n` is invariant238under reciprocal substitution: `R_n(1/q) = R_n(q)` as elements of `Coef`. -/239theorem recipCoef_lawCoef_globalLaw_true (n : ℕ) :Theorem 1.2Lemma 9.2240 recipCoef (lawCoef (globalLaw true n)) = lawCoef (globalLaw true n) := by241 set B := clusterSer 1 with hBdef242 have hB1 : PowerSeries.constantCoeff B = 1 := (constantCoeff_clusterSer 1)243 have hG : eulerSer 0 1 = pPow RatFunc.X B := by simp [eulerSer, hBdef]244 have hQ : eulerSer 1 1 = pPow (RatFunc.X + 1) B := by simp [eulerSer, hBdef]245 -- Step 1: `B ᵛ = S⁻¹ G_1`.246 have hGd : eulerSer 0 1 = dilate (recipSer B) :=247 PowerSeries.ext fun m ↦ cluster_reciprocity m 1 one_pos m le_rfl248 have hrB : recipSer B = codilate (pPow RatFunc.X B) := by249 rw [← hG, hGd, (codilate_dilate (recipSer B))]250 -- Step 2: `Q_1 ᵛ = S⁻¹ Q_1`.251 have hX : (RatFunc.X : RatFunc ℚ) ≠ 0 := RatFunc.X_ne_zero252 have hrQ : recipSer (pPow (RatFunc.X + 1) B) = codilate (pPow (RatFunc.X + 1) B) := by253 rw [(recipSer_pPow (RatFunc.X + 1) B hB1), map_add,254 recipRat_X, map_one, hrB,255 ← (codilate_pPow ((RatFunc.X)⁻¹ + 1) (pPow RatFunc.X B) (constantCoeff_pPow RatFunc.X B)),256 (pPow_pPow ((RatFunc.X)⁻¹ + 1) RatFunc.X B)]257 congr 2258 field_simp259 ring260 -- Step 3: read off the coefficient of `xⁿ`.261 have hcQ := congrArg (PowerSeries.coeff n) hrQ262 rw [(coeff_recipSer (pPow (RatFunc.X + 1) B) n),263 (coeff_codilate (pPow (RatFunc.X + 1) B) n),264 ← hQ, coeff_eulerSer] at hcQ265 have hNrec := recipRat_projectiveNormalizer n266 have hDne := projectiveNormalizer_rational_ne_zero n267 set D := (projectiveNormalizer n).rational268 set R := lawCoef (globalLaw true n)269 have hP : patternSum 1 1 n n = scalar D * R := by270 rw [show R = _ from lawCoef_globalLaw_true n, ← mul_assoc,271 ← (scalar_mul D D⁻¹), mul_inv_cancel₀ hDne,272 scalar_one, one_mul]273 have hqp : qpow (-(n : ℤ)) = scalar ((RatFunc.X ^ n)⁻¹) := by274 simp [qpow, zpow_neg, zpow_natCast]275 rw [hP, map_mul, (recipCoef_scalar D), hNrec,276 hqp, ← mul_assoc, ← (scalar_mul _ D)] at hcQ277 exact (scalar_mul_left_cancel (mul_ne_zero (inv_ne_zero (pow_ne_zero _ hX)) hDne)) hcQ278 279/-- **Theorem 1.2 (reciprocity).** For `n > 0` and every factorization type `σ`:280the universal monic density is the root-law coefficient with `q ↦ 1/q` substituted,281`A_{n,σ}(q) = B_{n,σ}(1/q)` (where `B_{n,σ}` is the coefficient of `σ` in the root law282`rootLaw n`), and the universal projective density is self-reciprocal,283`R_{n,σ}(1/q) = R_{n,σ}(q)`; both as identities of rational functions in `q`.284 285The certified form also assumed `ValidType σ` and `typeDegree σ = n`, which the proof does not use.286The hypothesis `0 < n` is used (`rootLaw 0` is defined separately). -/287theorem recip_main (n : ℕ) (hn : 0 < n) (σ : FactorType) :Theorem 1.2Remark 1.3Corollary 10.3288 (monicExpr n σ).rational =289 ((lawCoeff (rootLaw n) σ).subst (.inv .var)).rational ∧290 (projectiveExpr n σ).rational =291 ((projectiveExpr n σ).subst (.inv .var)).rational := by292 have hv : (State.single 1 n).Valid := ⟨Nat.one_pos, hn⟩293 have hr : rootLaw n = stateLaw (State.single 1 n) := by294 unfold rootLaw; rw [ite_eq_right hn.ne']295 refine ⟨?_, ?_⟩296 · rw [← coeff_lawCoef_globalLaw_false, lawCoef_globalLaw_false_eq_recipCoef n hn, hr,297 coeff_recipCoef_lawCoef _ (lawWf_stateLaw (State.single 1 n) hv) σ]298 · rw [← coeff_lawCoef_globalLaw_true, ← recipCoef_lawCoef_globalLaw_true n,299 coeff_recipCoef_lawCoef _ (lawWf_globalLaw true n) σ]300 rfl301 302end SurfaceBlowup