feat: the divisors, Riemann-Roch spaces and genus of the rational function field - #4938
feat: the divisors, Riemann-Roch spaces and genus of the rational function field#4938roed-math wants to merge 3 commits into
Conversation
…ction field Carry out Layer 3's rational-function-field acceptance suite for the AlgebraicCurves roadmap: `div x = P_(X) - P_infty`, `L(n P_infty)` is the space of polynomials of degree at most `n`, `l(n P_infty) = n + 1`, and hence the genus of `k(x)` is zero (Stichtenoth, Example 1.4.18). Co-Authored-By: Claude Code <noreply@github.com>
There was a problem hiding this comment.
✅ placement — now passing on e25e651.
AI review — approvedEach rubric is judged independently by multiple review agents; the PR merges only once every rubric is green — any rubric that is not green (changes requested, blocked, errored, stale, or not yet run) blocks the merge. See the rubrics.
♻️ = approved on an earlier commit, re-run before merge. Reviewing this diff at head |
There was a problem hiding this comment.
🟡 reuse — request_changes claude/claude-opus-5
The new material is genuinely new — no existing genus, L(n·P_∞), or 'no finite pole ⟹ polynomial' declaration exists in TauCeti or Mathlib. Two proofs re-derive located in-repo API: the monic-generator argument that monicIrreducibleEquiv/ratFuncEquivMonicIrreducible already package, and the associate-class argument the PR's own new iff now packages.
TauCeti/FieldTheory/FunctionField/Place/RatFunc/Basic.lean:329—eq_infty_or_exists_eq_adicOfIrreduciblere-derives "every height-one prime of k[X] isofIrreducible hq" fromexistsUnique_monic_irreducible_span+HeightOneSpectrum.ext; the same three lines are repeated inRiemannRoch/RatFunc.lean:79-81(obtain ⟨q, ⟨-, hqi, hspan⟩, -⟩ := v.existsUnique_monic_irreducible_span; show v = ofIrreducible hqi from HeightOneSpectrum.ext (hspan.trans (ofIrreducible_asIdeal hqi).symm)). Both are already provided by existing API. Fix: InRiemannRoch/RatFunc.lean:79-81useIsDedekindDomain.HeightOneSpectrum.monicIrreducibleEquiv: withq := monicIrreducibleEquiv.symm v,monicIrreducibleEquiv_apply(rfl/simp) andEquiv.apply_symm_applygiveofIrreducible q.2.2 = vdirectly. Proveeq_infty_or_exists_eq_adicOfIrreduciblefrom the existing classification equiv:obtain ⟨(_ | q), rfl⟩ := (ratFuncEquivMonicIrreducible k).surjective PthenOr.inl rfl/Or.inr ⟨q, q.2.2, ratFuncEquivMonicIrreducible_some k q⟩.TauCeti/FieldTheory/FunctionField/Place/RatFunc/Basic.lean:405— After this PR,adicOfIrreducible_X_sub_C_injectiveinlines exactly the argument the newadicOfIrreducible_eq_adicOfIrreducible_iff(line 266) packages:adic_injective,ofIrreducible_asIdealtwice,Ideal.span_singleton_eq_span_singleton. The same reasoning now lives twice in one file. Fix: Reprove it through the new lemma:fun a b h => by simpa using congrArg (fun p : k[X] => p.coeff 0) (eq_of_monic_of_associated (monic_X_sub_C a) (monic_X_sub_C b) ((adicOfIrreducible_eq_adicOfIrreducible_iff _ _).mp h)).
Reply in this thread to contest a finding; that re-runs only this rubric and posts an answer here. (To fix it, just push a commit — that re-reviews on its own. To contest again after an answer, post a NEW reply rather than editing an old one.)
claude/claude-opus-5 · 263s · 2.3k in / 19.6k out tokens · reviewing this diff · rubric
There was a problem hiding this comment.
Both duplications are gone, but by the route the proof-quality thread asked for rather than through monicIrreducibleEquiv/ratFuncEquivMonicIrreducible, because that route is not available at either site:
Place.eq_infty_or_exists_eq_adicOfIrreduciblesits aboveratFuncEquivMonicIrreducibleinPlace/RatFunc/Basic.lean— that equiv is built fromratFuncEquiv, which is built fromeq_infty_or_exists_eq_adic, so using it here would need the declaration moved past the whole classification block.monicIrreducibleEquiv's own surjectivity field (TauCeti/RingTheory/Polynomial/HeightOneSpectrum.lean:80-82) was the third copy of the same three lines, so it cannot be the shared home.
So the fact is now a single named lemma, IsDedekindDomain.HeightOneSpectrum.exists_monic_irreducible_eq_ofIrreducible (TauCeti/RingTheory/Polynomial/HeightOneSpectrum.lean), and all three sites consume it: monicIrreducibleEquiv, Place.eq_infty_or_exists_eq_adicOfIrreducible, and Place.forall_ord_adicOfIrreducible_nonneg_iff (which also moved to Place/RatFunc/Order.lean per the placement thread, and there closes its goal with the file's own valuation_ofIrreducible_le_one_iff and ord_adicOfIrreducible_neg_iff).
The second finding is fixed as suggested: adicOfIrreducible_X_sub_C_injective now goes through adicOfIrreducible_eq_adicOfIrreducible_iff.
lake build and lake exe axioms are green at dda1832.
There was a problem hiding this comment.
Re: your reply on reuse — re-reviewed on dda1832; this clears the finding ✅ — approved on dda1832.
agy/gemini-3.7-flash-high · addresses your replies through comment 3878430247.
There was a problem hiding this comment.
Re: your reply on reuse — re-reviewed on dda1832; this clears the finding ✅ — approved on dda1832.
codex/gpt-5.6-sol · addresses your replies through comment 3878430247.
There was a problem hiding this comment.
🟡 api-design — request_changes claude/claude-opus-5
The surface is minimal and free of compatibility artifacts, but Divisor.degree_poles_eq_max_natDegree carries a transcendence hypothesis that the identity does not need, weakening the hypothesis-free Mathlib result it wraps, and two new public lemmas restate compositions of existing @[simp] lemmas.
TauCeti/FieldTheory/FunctionField/RiemannRoch/RatFunc.lean:201—Divisor.degree_poles_eq_max_natDegreerequireshz : Transcendental k z, but the identity holds for every unit ofRatFunc k: ifzis algebraic then (byalgebraicClosure_ratFunc)z = C cwithc ≠ 0, soprincipal = 0hencedegree (poles ..) = 0, whilemax (C c).natDegree (1 : k[X]).natDegree = 0. The wrapper is thus strictly weaker than the Mathlib result it consumes, and the docstring itself has to tell the user to bridge viaRatFunc.transcendental_of_ne_C. Fix: Drophzand prove the unconditional statement:by_cases IsAlgebraic k (z : RatFunc k); in the algebraic branch useDivisor.principal_eq_zero_of_isAlgebraic(+algebraicClosure_ratFunc,RatFunc.num_C,RatFunc.denom_C) and in the other branch the currentrw.TauCeti/FieldTheory/FunctionField/Place/RatFunc/Basic.lean:132—Place.ord_infty_algebraMapis exactly the composition of two existing@[simp]lemmas (ord_infty,RatFunc.intDegree_polynomial), so it adds a public name for something already in simp normal form. Same problem at RiemannRoch/RatFunc.lean:176:Divisor.degree_nsmul_ofPoint_inftyis@[simp]yet is built only from the simp lemmasmap_nsmul,Divisor.degree_ofPoint,Place.degree_infty, so it duplicates simp-set coverage. Fix: Deleteord_infty_algebraMapand close its two uses withsimp; fordegree_nsmul_ofPoint_inftyeither drop the declaration (its two uses ingenus_ratFuncaresimp-closable) or at least remove the redundant@[simp].
Reply in this thread to contest a finding; that re-runs only this rubric and posts an answer here. (To fix it, just push a commit — that re-reviews on its own. To contest again after an answer, post a NEW reply rather than editing an old one.)
claude/claude-opus-5 · 318s · 2.3k in / 23.6k out tokens · reviewing this diff · rubric
There was a problem hiding this comment.
🟡 generality — request_changes claude/claude-opus-5
Two level problems: Divisor.principal_X is proved only for X although the identical proof gives div p = P_(p) − (deg p)·P_∞ for every irreducible p with lemmas already present, and Divisor.degree_poles_eq_max_natDegree carries a Transcendental hypothesis that Mathlib's counterpart deliberately does without.
TauCeti/FieldTheory/FunctionField/RiemannRoch/RatFunc.lean:95—Divisor.principal_Xis thep = Xcase ofdiv p = P_(p) − (deg p) • P_∞for an arbitrary irreduciblep; the proof given is already the general one withXhardcoded. Fix: StateDivisor.principal_irreducible {p : k[X]} (hp : Irreducible p) : principal (IsFunctionField.ratFunc k) (Units.mk0 (algebraMap k[X] (RatFunc k) p) _) = WeilDivisor.ofPoint (Place.adicOfIrreducible hp) - p.natDegree • WeilDivisor.ofPoint (Place.infty k)and deriveprincipal_Xfrom it viaRatFunc.algebraMap_X,natDegree_X,one_nsmul.TauCeti/FieldTheory/FunctionField/RiemannRoch/RatFunc.lean:201—Divisor.degree_poles_eq_max_natDegreeassumesTranscendental k z, but the statement holds for every unitz : (RatFunc k)ˣ: forzalgebraic overkboth sides are0. Fix: Drophzand case-split: ifIsAlgebraic k z,Divisor.principal_eq_zero_of_isAlgebraicgivespoles = 0hence degree0, andalgebraicClosure_ratFuncputsz = C c, somax z.num.natDegree z.denom.natDegree = 0.
Reply in this thread to contest a finding; that re-runs only this rubric and posts an answer here. (To fix it, just push a commit — that re-reviews on its own. To contest again after an answer, post a NEW reply rather than editing an old one.)
claude/claude-opus-5 · 240s · 2.3k in / 17.3k out tokens · reviewing this diff · rubric
There was a problem hiding this comment.
🟡 placement — request_changes claude/claude-opus-5
Directory choice, the four relocated Place lemmas, and both Mathlib imports are correct. One declaration is in the wrong home: a Place-level lemma about orders at the finite places of k(x) lives in the RiemannRoch file instead of Place/RatFunc/Order.lean.
TauCeti/FieldTheory/FunctionField/RiemannRoch/RatFunc.lean:72—TauCeti.Place.forall_ord_adicOfIrreducible_nonneg_iffis a pure statement aboutordat the finite places ofk(x)— no divisor,L(D)or genus content — but sits in a file importingRiemannRoch/Genus. Its canonical home is the earlierPlace/RatFunc/Order.lean, whose docstring is "Orders at the finite places of the rational function field" and which already collects theord_adicOfIrreducible_*family. As it stands, any future Place-level file needing "regular at every finite place ⟹ polynomial" must import the whole Riemann–Roch stack. Fix: Move the theorem (and itsPlacenamespace block) intoTauCeti/FieldTheory/FunctionField/Place/RatFunc/Order.lean, listing it in that file's## Main results, and drop it from the new file's## Main results.
Reply in this thread to contest a finding; that re-runs only this rubric and posts an answer here. (To fix it, just push a commit — that re-reviews on its own. To contest again after an answer, post a NEW reply rather than editing an old one.)
claude/claude-opus-5 · 159s · 2.3k in / 11.6k out tokens · reviewing this diff · rubric
There was a problem hiding this comment.
🟡 proof-quality — request_changes claude/claude-opus-5
Proofs are short and mostly robust, but the PR inlines the same three-line "every height-one prime of k[X] is ofIrreducible hq" derivation twice instead of factoring it, and Divisor.principal_X re-does an ite case split that two existing dedicated simp lemmas already close.
TauCeti/FieldTheory/FunctionField/RiemannRoch/RatFunc.lean:79— The stepobtain ⟨q, ⟨-, hqi, hspan⟩, -⟩ := v.existsUnique_monic_irreducible_spanfollowed byHeightOneSpectrum.ext (hspan.trans (ofIrreducible_asIdeal hqi).symm)to concludev = ofIrreducible hqiis inlined here and again verbatim at TauCeti/FieldTheory/FunctionField/Place/RatFunc/Basic.lean:329-331 (and already exists insidemonicIrreducibleEquiv, TauCeti/RingTheory/Polynomial/HeightOneSpectrum.lean:81-82). It is a reusable fact, not a one-off, and here it is buried in arw [show v = ... from ...]. Fix: AddIsDedekindDomain.HeightOneSpectrum.exists_irreducible_eq_ofIrreducible (p : HeightOneSpectrum k[X]) : ∃ (q : k[X]) (hq : Irreducible q), p = ofIrreducible hqto TauCeti/RingTheory/Polynomial/HeightOneSpectrum.lean and use it at both new sites (and inmonicIrreducibleEquiv's surjectivity).TauCeti/FieldTheory/FunctionField/RiemannRoch/RatFunc.lean:107—Divisor.principal_Xrewrites with the rawPlace.ord_adicOfIrreducible_Xand then hand-discharges theitewithite_eq_left hqX/ite_eq_right hqX(forcing the leadingclassical), althoughPlace.ord_adicOfIrreducible_X_selfandPlace.ord_adicOfIrreducible_X_of_not_associatedare@[simp]lemmas stating exactly the two branches the proof takes. Fix: In the¬Associated q Xbranch usePlace.ord_adicOfIrreducible_X_of_not_associated hq hqX; in the other branch rewrite the place withhplacefirst and close withsimpviaPlace.ord_adicOfIrreducible_X_self. Thenclassicaland theite_eq_*bookkeeping can go.
Reply in this thread to contest a finding; that re-runs only this rubric and posts an answer here. (To fix it, just push a commit — that re-reviews on its own. To contest again after an answer, post a NEW reply rather than editing an old one.)
claude/claude-opus-5 · 251s · 2.3k in / 19.2k out tokens · reviewing this diff · rubric
There was a problem hiding this comment.
Both findings are addressed, the second with one deliberate deviation.
-
The three-line derivation is now
IsDedekindDomain.HeightOneSpectrum.exists_monic_irreducible_eq_ofIrreducibleinTauCeti/RingTheory/Polynomial/HeightOneSpectrum.lean, exactly as suggested, and it is consumed at all three sites:monicIrreducibleEquiv's surjectivity,Place.eq_infty_or_exists_eq_adicOfIrreducible, andPlace.forall_ord_adicOfIrreducible_nonneg_iff. It carries the monicity as well, sincemonicIrreducibleEquivneeds it; the two consumers that do not discard it with-. Norw [show v = … from …]remains. -
The
classicaland theite_eq_left/ite_eq_rightbookkeeping are gone, but not by rewriting withord_adicOfIrreducible_X_self/ord_adicOfIrreducible_X_of_not_associated: the generality thread (finding atRiemannRoch/RatFunc.lean:95) requiredprincipal_Xto be replaced byDivisor.principal_irreduciblefor an arbitrary irreduciblep, so theX-specificsimplemmas no longer apply. The general lemma rewrites once withPlace.ord_adicOfIrreducible_algebraMap_irreducibleand discharges each branch withsimp [hqp](hqp : Associated q por its negation), which needs noclassicaland noite_eq_*.Divisor.principal_Xis now a two-line corollary viaRatFunc.algebraMap_X,natDegree_X,one_nsmuland contains no case split at all.
lake build and lake exe axioms are green at dda1832.
There was a problem hiding this comment.
Re: your reply on proof-quality — re-reviewed on dda1832; this clears the finding ✅ — approved on dda1832.
agy/gemini-3.7-flash-high · addresses your replies through comment 3878431211.
There was a problem hiding this comment.
Re: your reply on proof-quality — re-reviewed on dda1832; this clears the finding ✅ — approved on dda1832.
codex/gpt-5.6-sol · addresses your replies through comment 3878431211.
AI review — changes requestedEach rubric is judged independently by multiple review agents; the PR merges only once every rubric is green — any rubric that is not green (changes requested, blocked, errored, stale, or not yet run) blocks the merge. See the rubrics.
♻️ = approved on an earlier commit, re-run before merge. Reviewing this diff at head |
…lations Relocate `Place.forall_ord_adicOfIrreducible_nonneg_iff` to its canonical home in `Place/RatFunc/Order.lean`, factor the repeated "every height-one prime of `k[X]` is `ofIrreducible hq`" derivation into `HeightOneSpectrum.exists_monic_irreducible_eq_ofIrreducible`, generalize `Divisor.principal_X` to `Divisor.principal_irreducible`, drop the unnecessary transcendence hypothesis from `Divisor.degree_poles_eq_max_natDegree`, and remove the two lemmas that only restated compositions of existing `simp` lemmas. Co-Authored-By: Claude Code <noreply@github.com>
AI review — approvedEach rubric is judged independently by multiple review agents; the PR merges only once every rubric is green — any rubric that is not green (changes requested, blocked, errored, stale, or not yet run) blocks the merge. See the rubrics.
♻️ = approved on an earlier commit, re-run before merge. Reviewing this diff at head |
There was a problem hiding this comment.
🟡 api-design — request_changes codex/gpt-5.6-sol
The new canonical membership and finite-place characterization lemmas are missing normal-form automation annotations.
TauCeti/FieldTheory/FunctionField/RiemannRoch/RatFunc.lean:104—mem_riemannRochSpace_nsmul_ofPoint_infty_iffis the characteristic membership normal form for the computed space but is not tagged@[simp]. Fix: Add@[simp]so membership in this explicit Riemann–Roch space reduces to the polynomial degree condition.TauCeti/FieldTheory/FunctionField/Place/RatFunc/Basic.lean:261—adicOfIrreducible_eq_adicOfIrreducible_iffand the companion disjointness theorem at line 302 are canonical constructor equality/disjointness rules but lack@[simp]. Fix: Mark both lemmas@[simp]so finite-place equalities normalize toAssociatedand finite-place/infinity contradictions close automatically.
Reply in this thread to contest a finding; that re-runs only this rubric and posts an answer here. (To fix it, just push a commit — that re-reviews on its own. To contest again after an answer, post a NEW reply rather than editing an old one.)
codex/gpt-5.6-sol · 66s · 203.7k in / 1.9k out tokens · reviewing this diff · rubric
There was a problem hiding this comment.
The second finding is fixed as suggested; the first one I have to contest, because the repo's simpNF lint rejects it.
Fixed: Place.adicOfIrreducible_eq_adicOfIrreducible_iff and Place.adicOfIrreducible_ne_infty (the disjointness theorem at Place/RatFunc/Basic.lean:302) are now both @[simp]. Both pass scripts/lint-env.sh and the build is green.
Contested: @[simp] on mem_riemannRochSpace_nsmul_ofPoint_infty_iff is not admissible. Its LHS is not in simp normal form: TauCeti.mem_riemannRochSpace_iff is already @[simp] and rewrites f ∈ riemannRochSpace D to the valuation condition, so the proposed @[simp] lemma can never fire. I tried it and scripts/lint-env.sh (Mathlib's #lint set, run in CI) fails with a new violation:
lint-env: NEW violation(s) not in the grandfathered baseline (as '<linter> <declaration>'):
[simpNF]
#check @TauCeti.mem_riemannRochSpace_nsmul_ofPoint_infty_iff /- Left-hand side simplifies from
f ∈ TauCeti.riemannRochSpace (n • TauCeti.AlgebraicGeometry.WeilDivisor.ofPoint (TauCeti.Place.infty k))
to
∀ (P : TauCeti.Place k (RatFunc k)),
P.valuation f ≤ WithZero.exp (↑n * (TauCeti.AlgebraicGeometry.WeilDivisor.ofPoint (TauCeti.Place.infty k)).coeff P)
using
simp only [*, @TauCeti.mem_riemannRochSpace_iff, @TauCeti.AlgebraicGeometry.WeilDivisor.coeff_nsmul]
Try to change the left-hand side to the simplified term! -/
LINT-ENV: FAIL — 1 new violation(s); see the list above
The only ways to land the tag would be a @[nolint simpNF] plus an entry in scripts/lint-nolints-allowlist.txt — scripts/ is human-owned and off-limits to this PR — or silencing the linter, which the repo forbids. Since the lemma is an explicit unfolding of a specific L(D) rather than a normal form, it is correct as a plain theorem; its two consumers (riemannRochSpace_nsmul_ofPoint_infty here) name it explicitly.
lake build, lake exe axioms and scripts/lint-env.sh are green at e25e651.
There was a problem hiding this comment.
Re: your reply on api-design — re-reviewed on e25e651; this clears the finding ✅ — approved on e25e651.
agy/gemini-3.7-flash-high · addresses your replies through comment 3879757968.
There was a problem hiding this comment.
🟡 placement — request_changes codex/gpt-5.6-sol
The new Riemann–Roch module contains independent divisor calculations that belong with divisor theory rather than Riemann–Roch.
TauCeti/FieldTheory/FunctionField/RiemannRoch/RatFunc.lean:68—Divisor.principal_irreducible,Divisor.principal_X, andDivisor.degree_poles_eq_max_natDegree(line 181) are standalone rational-function divisor/product-formula results and are not used by the Riemann–Roch or genus calculations in this file. Fix: Move all three declarations to a rational-function module underFieldTheory/FunctionField/Divisorand update imports; this also keeps theRatFunc.IntermediateFielddependency out of the Riemann–Roch module.
Reply in this thread to contest a finding; that re-runs only this rubric and posts an answer here. (To fix it, just push a commit — that re-reviews on its own. To contest again after an answer, post a NEW reply rather than editing an old one.)
codex/gpt-5.6-sol · 48s · 101.1k in / 1.4k out tokens · reviewing this diff · rubric
AI review — changes requestedEach rubric is judged independently by multiple review agents; the PR merges only once every rubric is green — any rubric that is not green (changes requested, blocked, errored, stale, or not yet run) blocks the merge. See the rubrics.
♻️ = approved on an earlier commit, re-run before merge. Reviewing this diff at head |
Move `Divisor.principal_irreducible`, `Divisor.principal_X` and `Divisor.degree_poles_eq_max_natDegree` from `RiemannRoch/RatFunc.lean` into a new `Divisor/RatFunc.lean`: they are divisor-level results with no Riemann-Roch content, and this keeps the `RatFunc.IntermediateField` dependency and the genus stack apart. Mark `Place.adicOfIrreducible_eq_adicOfIrreducible_iff` and `Place.adicOfIrreducible_ne_infty` `@[simp]`. Co-Authored-By: Claude Code <noreply@anthropic.com>
AI review — approvedEach rubric is judged independently by multiple review agents; the PR merges only once every rubric is green — any rubric that is not green (changes requested, blocked, errored, stale, or not yet run) blocks the merge. See the rubrics.
♻️ = approved on an earlier commit, re-run before merge. Reviewing this diff at head |
This PR carries out the rational-function-field calculations of Layer 3 of the
AlgebraicCurvesroadmap — the "The rational function field, at divisor level" bullet of"Layer 3: divisors,
L(D), Riemann's theorem, and the genus", which asks fordiv x = P_(X) − P_∞,the pole-divisor degree
max (natDegree f.num) (natDegree f.denom) = [k(x) : k(f)], the modelcomputation
L(n·P_∞) =polynomials of degree≤ nwithℓ(n·P_∞) = n + 1"proved by hand, longbefore Riemann–Roch", and hence
g(k(x)) = 0(Stichtenoth, Example 1.4.18). That bullet is themilestone; it is Layer 3's named base case and first acceptance suite, and the genus-zero value it
produces is what Layer 5's genus-
0characterisation (Prop. 1.6.3) and Layer 7's normalisation2g − 2 = −2[F : k(x)] + deg Diff(F/k(x))(Cor. 3.4.14) both consume. Its prerequisites are all onmain: the classification of the places ofk(x)(Layer 1), the divisor group and principaldivisors,
L(D),ℓ(D), and Riemann's theorem with the genus (Layer 3). What remains in Layer 3after this PR is the concrete sum form
∑_p natDegree p · ord_p(f) = intDegree fof the productformula on
ℙ¹; the rest of the layer's rational-function-field bullet is closed here.New file
TauCeti/FieldTheory/FunctionField/RiemannRoch/RatFunc.leanproves, in order:TauCeti.Place.forall_ord_adicOfIrreducible_nonneg_iff, that a rational function is a polynomialexactly when it has no pole at any finite place;
TauCeti.Divisor.principal_X, thatdiv x = P_(X) − P_∞;TauCeti.mem_riemannRochSpace_nsmul_ofPoint_infty_iffandTauCeti.riemannRochSpace_nsmul_ofPoint_infty, thatL(n·P_∞)is the space of polynomials ofdegree at most
n;TauCeti.Divisor.dim_nsmul_ofPoint_infty, thatℓ(n·P_∞) = n + 1;TauCeti.genus_ratFunc, thatgenus k (RatFunc k) = 0; andTauCeti.Divisor.degree_poles_eq_max_natDegree, the pole-divisor degree of a nonconstant function.The genus computation feeds
ℓ(n·P_∞) = n + 1anddeg (n·P_∞) = ninto the existingTauCeti.exists_forall_dim_eq_degree_add_one_sub_genus, so Riemann's inequality is exhibited assharp at every
n, exactly as Stichtenoth's Example 1.4.18 argues.Three supporting lemmas go into their canonical home,
TauCeti/FieldTheory/FunctionField/Place/RatFunc/Basic.lean, rather than into the new file:TauCeti.Place.ord_infty_algebraMap(ord_∞ p = −deg p, next toord_infty),TauCeti.Place.adicOfIrreducible_ne_inftyandTauCeti.Place.eq_infty_or_exists_eq_adicOfIrreducible(next toadic_ne_inftyandeq_infty_or_exists_eq_adic), andTauCeti.Place.adicOfIrreducible_eq_adicOfIrreducible_iff(a finite place remembers exactly theassociate class of its polynomial, next to
adicOfIrreducible). No declaration is renamed orremoved, and nothing is vendored.
Nothing is copied from an existing formalization; the mathematics follows Stichtenoth, Algebraic
Function Fields and Codes, 2nd ed., GTM 254, Example 1.4.18 and Proposition 1.2.1, cited in the
module docstring. The proofs consume rather than rebuild three central Mathlib results:
IsDedekindDomain.HeightOneSpectrum.mem_integers_of_valuation_le_one(a Dedekind domain is theintersection of its localizations at the height-one primes) for "no finite pole ⟹ polynomial",
RatFunc.finrank_eq_max_natDegreefor the degree of a rational map, andPolynomial.degreeLT.basistogether with
Polynomial.degreeLT_succ_eq_degreeLEfordim_k {p | deg p ≤ n} = n + 1.Roadmap: AlgebraicCurves
🤖 Prepared with Claude Code