serre-duality-cech: the Serre pairing at the Čech level (namespace RS/RS.SerrePairing) #
API summary (see docs/design/serre-duality-cech.md). Builds on: canonical-forms (BUILT) and
residue-calculus (BUILT). Blueprint: "The Serre pairing at the Čech level: the dimension-counting
surjectivity core and the duality bookkeeping consumed by the tail route." Per the design's own
routing decision (§0.1), this unit owns the pairing formula and its injectivity half; the hard
surjectivity half of Serre duality (Miranda VI.3 Lemma 3.4/3.6 and the induction on growing
divisors) is squarely serre-duality-tails' (#26) job and is not attempted here.
Exports #
TailSpace.lean #
Tail X : Type _ := X →₀ (ℤ →₀ ℂ)(anoncomputable abbrev, not adef— this avoids theAddCommGroup/Moduleinstance-search breakage a plaindefwrapping a nestedFinsuppwould cause; the reducible unfolding lets everyFinsuppinstance transport for free): Miranda VI.3's ambient Laurent-tail space, an arbitrary finite tail of Laurent coefficients at finitely many points ofX, read in each point's ownchartAt, with no exponent restriction at the ambient level (Tail.BoundedBy/TailSpaceis the only place a bound enters — hard-coding "negative exponents only" would be wrong for divisorsDwith a negative value somewhere).Tail.BoundedBy τ D/TailSpace D : Submodule ℂ (Tail X): Miranda'sT[D](X), tails whose exponent at each pointxis< -(D x).Tail.single p n c/Tail.single_boundedBy: the single-point, single-exponent test tail (the injectivity witness's raw material).
Pairing.lean (RS.MForm/RS.SerrePairing namespaces) #
pair (θ : MForm X) (τ : Tail X) : ℂ(Miranda'sRes_θ, purely algebraic — a finite sum of Laurent coefficients ofθagainstτ's exponents, no integration, no residue functional, built directly fromMForm.laurentCoeffAton classes):pairAt/pairTailare the per-point and full assembly viaFinsupp.lsum(packaging bilinearity for free, no manualfinsumsupport-union bookkeeping);pairL : MForm X →ₗ[ℂ] Tail X →ₗ[ℂ] ℂis the bundled bilinear form.- Bilinearity:
pair_add_left/pair_smul_left/pair_zero_left(inθ),pair_add_right/pair_smul_right/pair_zero_right(inτ). pair_single (θ) (p) (n) (c) : pair θ (Tail.single p n c) = c * θ.laurentCoeffAt p (-1 - n)— the atom the injectivity core computes with directly.MForm.laurentCoeffAt_add/_smul/_zero(Compat:ℂ-linearity oflaurentCoeffAtin the class argument, proved via representatives + residue-calculus's linearity kit, since canonical-forms does not itself export this).
Duality.lean (RS.MForm/RS.SerrePairing namespaces, [T1Space X] [ConnectedSpace X]) #
exists_tail_pair_ne_zero(D4, Miranda Thm 3.3's injectivity half / Forster 17.6): a nonzeroθ ∈ MForm.OmegaSpace (-D)pairs nontrivially against someD-bounded tail — the single-term tail atθ's own leading Laurent exponent at any point, "cheap and local" exactly as billed.finrank_omegaSpace_le(D5, the generic dimension-counting interface #26 discharges): given any finite-dimensional targetH, a surjective linear maptoH : ↥(TailSpace D) →ₗ[ℂ] H, and a well-definedness hypothesishwd(pair θvanishes onker toHfor everyθ ∈ Ω(-D)), the pairing descends to an injective↥(MForm.OmegaSpace (-D)) →ₗ[ℂ] Module.Dual ℂ H, hencefinrank Ω(-D) ≤ finrank H— i.e.i(-D) ≤ finrank H. Pure linear algebra once the two hypotheses are supplied; proved here in full, zero dependence on laurent-tails/residue-theorem.MForm.laurentCoeffAt_ord_ne_zero(Compat): the leading Laurent coefficient of a class at a finite-order point is nonzero (lifted from residue-calculus'slaurentCoeffAt_order_ne_zero).
The frozen target for #26 (recorded as documentation — NOT a compiled declaration here) #
The obligation this unit hands off to serre-duality-tails (its own design's §0, "frozen reconciliation"), Serre Duality in full:
theorem RS.TailDuality.i_neg_eq_h1 [T1Space X] [T2Space X] [CompactSpace X] [ConnectedSpace X]
(D : RS.Divisor X) : RS.MForm.i (-D) = RS.Finiteness.h1 D
The ≤ direction is finrank_omegaSpace_le instantiated at H := RS.Cech.H1 D; the ≥ direction
(Miranda Lemma 3.4/3.6, genuinely new labor) is entirely #26's own. Per serre-duality-tails' own
frozen reconciliation (§0.1 of its design), finrank_omegaSpace_le is not literally
instantiated there — #26 runs Miranda VI.3 on its own germ tail model (RS.LaurentTail.T D)
instead, reusing only this unit's proof pattern (resAt_zpow_mul/laurentCoeffAt_order_ne_zero,
spike-verified here) and citing exists_tail_pair_ne_zero's shape directly; Tail X/TailSpace D/
pair/finrank_omegaSpace_le remain fully self-contained, adapter-friendly exports regardless.
Deviations from docs/design/serre-duality-cech.md (recorded honestly) #
- The quotient revision (
Jacobian/CanonicalForms/Quotient.lean, landed after this design was frozen):MForm Xis now the QUOTIENT of a raw data carrierMFormData Xby codiscrete/germ agreement, not a raw structure exposingcoeffAtdirectly.pairis defined directly as the finite sum ofMForm.laurentCoeffAtvalues (the design's ownpair_eq_finsum_sumformula) viaFinsupp.lsum, rather than viaresAtof an explicit representative product +resAt_tail_mul— the same mathematical content (seepair_single's proof, the one place a representative'sresAt_tail_mulis genuinely exercised, insideRS.laurentCoeffAt_order_ne_zero's proof chain viaMForm.laurentCoeffAt_ord_ne_zero), with strictly less proof debt (bilinearity inτis free fromFinsupp.lsum, no manualfinsum-over-two-supports bookkeeping). MForm.OmegaSpace's membership dropped the design's disjunction: it is now the single order-wise condition∀ x, (-(D x) : WithTop ℤ) ≤ θ.ord x(noθ = 0 ∨ ...), uniform sinceθ = 0hasord = ⊤everywhere.exists_tail_pair_ne_zero/finrank_omegaSpace_leuse this directly.- Hypothesis simplification:
Duality.lean's theorems need only[T1Space X] [ConnectedSpace X], not the design's listed[T1Space X] [T2Space X] [CompactSpace X] [ConnectedSpace X]—MForm.OmegaSpaceandModule.finrankare topology-free, perCONVENTIONS.md's "drop hypotheses lemmas don't need, when free to do so". finrank_omegaSpace_le's proof avoidsSubmodule.liftQ/LinearMap.quotKerEquivOfSurjective(the design's primary plan, §5 P2): building↥(TailSpace D) ⧸ LinearMap.ker toHwas found to elaborate extremely slowly (deterministic timeout atwhnf/isDefEqeven at 1,000,000 heartbeats). Root cause, isolated by direct experiment:↥(TailSpace D)(aSubmoduleover the doubly-nestedFinsuppcarrierTail X := X →₀ (ℤ →₀ ℂ)) has no findableAddCommGroup/Sub/Neginstance at this pin —AddSubgroupClass (Submodule ℂ (Tail X)) (Tail X)itself fails to synthesize, even thoughTail Xunwrapped has a perfectly goodAddCommGroup, and the SEMIRING-levelSubmodule.add_mem/smul_mem(notneg_mem/sub_mem) resolve fine. Used instead: the design's own documented risk-3 fallback (§7) —Φ/resDualare built directly from a chosen sectionFunction.surjInvoftoH, with a congruence lemma (pair_congr_of_toH_eq) replacing the quotient machinery, and every place a "difference" of↥(TailSpace D)elements was needed is built asτ + (-1 : ℂ) • σ(+/•, confirmed working) rather thanτ - σ(Sub, confirmed broken). Zero mathematical content lost; this is exactly the fallback the design pre-registered for this contingency, not an ad-hoc patch. Filed as a coordination note for any future consumer building furtherSubmodules overTail X/TailSpace D: avoidSubmodule.sub_mem/neg_mem/AddSubgroupClass/Sub/Negon↥(TailSpace D)directly; useSubmodule.add_mem/smul_memplus the(-1 : ℂ) • ·trick instead.
Notes for serre-duality-tails (#26), the adapter surface as built #
Tail X/TailSpace D/Tail.BoundedBy/Tail.single(TailSpace.lean) andpair/pairL/ bilinearity/pair_single(Pairing.lean) are fully self-contained and provable independent of laurent-tails, residue-theorem, or cech-cohomology (confirmed: this whole unit builds on canonical-forms + residue-calculus only, exactly as itsBuilds on:edge states).exists_tail_pair_ne_zero's proof shape (Tail.single p (-1 - k) 1at the leading exponentk := (θ.ord p).untop₀, computed viapair_single+MForm.laurentCoeffAt_ord_ne_zero) is the exact pattern #26 reuses against its owntailGerm-based test vectors (its design's §0.1 point 2, confirmed:RS.Cech.tailGermis the literal monomial germ, so the sameresAt_zpow_mul+laurentCoeffAt_order_ne_zerocomputation applies verbatim).finrank_omegaSpace_le's statement shape (hypothesestoH/hsurj/hwd, conclusionfinrank Ω(-D) ≤ finrank H) is available as a ready-made≤-half instantiable atH := RS.Cech.H1 Dshould a future revision want it; #26's own frozen design (§0.1) currently gets both inequalities for free from its ownresEquivbijectivity instead, so this export is offered but not required.