Skip to content

The minimalPrimes documentation says decomposition does not happen over the extension field, then never shows what does #4640

Description

@d-torrance

This issue was triaged from one request inside bugs/dan/0-bugs-decker.m2, one of the 857 files removed from the pre-GitHub bugs/ tree by d2c8d27826 and catalogued in #36. That file is a wishlist holding several unrelated requests, so its asks were split apart and filed separately rather than as one issue nobody could close. The commentary below was written by Claude (Claude Opus 5, via Claude Code), not by @d-torrance, whose account posted it -- please weigh it accordingly.

The request, verbatim

In documentation to minimalPrimes, finish example on absolute decomposition by showing how factor works over extension fields. Do the relevant interface to libfac first.

The rest of the file is unrelated to this request; it is linked in the footer below.

Where it stands today

The minimalPrimes documentation tells the reader that decomposition does not happen over the extension
field, and then stops without showing what does. The passage is at
MinimalPrimes/doc.m2:126-131:

Note that the ideal is decomposed over the given field of coefficients and not over the extension field
where the decomposition into absolutely irreducible factors occurs:

i1 : R = QQ[w,x,y,z];

i2 : I = ideal(x^2 + y^2);

i3 : minimalPrimes I
             2    2
o3 = {ideal(x  + y )}

That is the whole example. A reader is shown a decomposition that does not split, told the reason lies over
an extension field, and left there — the interesting half, what the absolutely irreducible factors actually
are, never appears.

It can be finished today

factor splits it over an extension, so the example only needs a continuation:

i4 : K = toField(QQ[i]/(i^2+1));

i5 : S = K[x,y];

i6 : factor(x^2 + y^2)
o6 = (x - i*y)*(x + i*y)

and over a finite field just as well, where the extension is generated by a:

i7 : U = (GF 9)[x,y];

i8 : factor(x^2 + y^2)
o8 = (x + (a + 1)*y)*(x + (- a - 1)*y)

Two things the example should probably say

toField is not optional, and omitting it fails silently. Over the quotient ring without it, factor
returns the input unchanged rather than complaining:

i9 : A = QQ[i]/(i^2+1); T = A[x,y];

i11 : factor(x^2 + y^2)
o11 = (x^2 + y^2)

QQ[i]/(i^2+1) really is a field, but M2 does not know that until told, and a reader following the
documentation is quite likely to build it the first way. Showing the toField step explicitly — or showing
both, and the difference — would save that.

The continuation has to use factor, not minimalPrimes. It is natural to want to finish the example by
re-running minimalPrimes over the extension, but that is refused:

i12 : K = toField(QQ[i]/(i^2+1)); S = K[x,y];

i14 : minimalPrimes ideal(x^2 + y^2)
stdio:14:1:(3): error: no applicable strategy for (minimalPrimes,Ideal)

which is by design — the same doc node opens by restricting the base ring to QQ or ZZ/p, and the refusal
comes from MinimalPrimes.m2:239. So the example's point is necessarily "here is what factor shows you
about the geometry that minimalPrimes deliberately does not", and saying that in a sentence would make the
node self-consistent. It might also be worth a SeeAlso to factor, which the node does not currently have.

Provenance

This is one request from bugs/dan/0-bugs-decker.m2, a wishlist file removed with the bugs/ tree in
d2c8d27826 and catalogued in #36. The request reads in full:

In documentation to minimalPrimes, finish example on absolute decomposition by showing how factor works
over extension fields. Do the relevant interface to libfac first.

The second sentence is already satisfied: whatever was missing from the factorization interface when that was
written, factor over an extension field works now, which is what the transcripts above are.

Nothing in the tracker covers this — searched for absolute, minimalPrimes and absolutely irreducible.
#1017, radical over Galois fields, and
#2839, a correctness bug in decompose and radical, are the
nearest and neither is this.

open · disposition issue · ask 1 of bugs/dan/0-bugs-decker.m2 · source of truth: bug-triage/asks.tsv

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions