pushFwd cannot express one Galois field as a module over a smaller one, though the same extension spelled as quotient rings works
Nobody has claimed this yet.
- Dominant language
- Macaulay2
- Stars
- 435
- Forks
- 297
- Avg merge
- 4d 20h
- Merged PRs (30d)
- 11
Description
This issue was triaged from [`bugs/mike/1-GF.m2`](https://github.com/Macaulay2/M2/blob/388c1ff0ce30d83751dea7bc7eac77fdc1305dd7/bugs/mike/1-GF.m2), one of the 857 files removed from the pre-GitHub `bugs/` tree by [`d2c8d27826`](https://github.com/Macaulay2/M2/commit/d2c8d27826) and catalogued in [#36](https://github.com/Macaulay2/M2/issues/36). **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 original file, verbatim
```m2
-- Current problems with galois fields
-- (1) inclusion maps from one GF to another are difficult FIXED
-- (2) ring maps display with internal confusing information FIXED
-- (3) no factorization TO BE DONE
-- (4) no gcd's FIXED
-- (5) module structure of one GF wrt a smaller one TO BE DONE
-- this should be a special case of pushForward.
restart
loadPackage "ConwayPolynomials"
setRandomSeed 0
R = GF 729
a
sub(a,{a=>a+1})
F = map(R,R,{a^3})
F a
F (a+1)
debug Core
raw F
S = R[x]
F = map(S,S,{x-a,a^3})
F a
F (x-a)
isWellDefined map(R,R,{a+1})
isWellDefined map(R,R,{a^2})
isWellDefined map(R,R,{a^3})
factor 729
R = GF(729, Variable=>a)
S = GF(27, Variable=>b)
F = map(R,S,{a^28})
isWellDefined F
F a -- gives error
a^3
R = ZZ/3[a]/(a^6+2*a^4+a^2+2*a+2)
S = ZZ/3[b]/(b^3+2*b+1)
F = map(R,S,{a^(28)})
isWellDefined F
a^2
a^3
a^(2*2*7*13)
a^(2*2*2*7)
3^6-1
3^3-1
728/26
```
### Where it stands today
`pushFwd` cannot describe one Galois field as a module over a smaller one, although the same extension
written as quotient rings works fine.
```m2
i1 : needsPackage "PushForward";
i2 : R = GF(729, Variable => symbol ga);
i3 : S = GF(27, Variable => symbol vv);
i4 : F = map(R,S,{ga^28});
o4 : RingMap R <-- S
i5 : isWellDefined F
o5 = true
i6 : pushFwd F
stdio:6:7:(3):[1]: error: no coefficient ring present
```
The map is accepted and `isWellDefined` confirms it, so the failure is not about the map. Spelling the
same fields as quotient rings instead, the push-forward goes through and gives the right answer:
```m2
A = ZZ/3[x]/(x^3+2*x+1);
B = ZZ/3[y]/(y^6+2*y^4+y^2+2*y+2);
G = map(B,A,{y^28});
first pushFwd G -- a free module of rank 2
```
Rank 2 is correct: $[\mathbb{F}_{729} : \mathbb{F}_{27}] = 6/3 = 2$. So the computation is available and
only the `GF` spelling cannot reach it.
The error comes from `coefficientRing` being asked of a `GaloisField`:
https://github.com/Macaulay2/M2/blob/development/M2/Macaulay2/m2/rings.m2#L56
### Where this came from
Cataloguing the `bugs/` directory removed in d2c8d27826 (#36). `bugs/mike/1-GF.m2` opens with a
five-item checklist of "current problems with galois fields", carrying its own status markers:
```
-- (1) inclusion maps from one GF to another are difficult FIXED
-- (2) ring maps display with internal confusing information FIXED
-- (3) no factorization TO BE DONE
-- (4) no gcd's FIXED
-- (5) module structure of one GF wrt a smaller one TO BE DONE
-- this should be a special case of pushForward.
```
Four of the five are now done. Item (3) has been delivered since the file was written —
`factor` over `GF(729)[x]` splits `(x^2-a)(x-1)` correctly and the factorization multiplies back — and
items (1), (2) and (4) all check out, including the line the file flags at its item (1) as still
erroring, `F a` for a map between two Galois fields, which now returns a value. Item (5) is this issue.
Adjacent but distinct: [#4435](https://github.com/Macaulay2/M2/pull/4435) is open work by the same
author on letting Core `pushForward` accept more ring maps, but its blocker is a degree-map check
raising `not implemented yet: unexpected degree map of ring map`, and its diff contains no handling for
Galois fields.
`open` · disposition `issue` · source of truth: [`bug-triage/catalog.tsv`](https://github.com/d-torrance/M2/blob/bug-triage/bug-triage/catalog.tsv)
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the GF example in the issue, then inspect M2/Macaulay2's coefficientRing handling at M2/Macaulay2/m2/rings.m2 around line 56 and the pushFwd entry point. Compare it with the quotient-ring example, and verify that pushFwd on the Galois-field map returns a free module of rank 2 without the coefficient-ring error.
Written by the indexing model from the issue text.
Assessment
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100