Primitive element for finite fields
Nobody has claimed this yet.
- Dominant language
- Macaulay2
- Stars
- 435
- Forks
- 297
- Avg merge
- 4d 20h
- Merged PRs (30d)
- 11
Description
When constructing finite fields using non standard polynomials, the option `PrimitiveElement` seems broken. The default behavior is `FindOne` which should automatically find one primitive element, but it's not working...
```macaulay2
R = ZZ/7[z]/(z^2-z-3);
F = GF(R, PrimitiveElement=>FindOne);
<< F.PrimitiveElement << endl; -- gives z, which is NOT a primitive element
<< #unique apply(48, i->(F.PrimitiveElement)^i) << endl; -- 24
```
Worse, even if a primitive element is specified, it does not respect it.
```macaulay2
R = ZZ/7[z]/(z^2-z-3);
<< #unique apply(48, i->(z+2)^i) << endl; -- 48 so z+2 is a primitive element
F = GF(R, PrimitiveElement=>z+2);
<< F.PrimitiveElement << endl; -- still gives z...
<< #unique apply(48, i->(F.PrimitiveElement)^i) << endl; -- 24
```
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
Start by locating the GF implementation and its PrimitiveElement handling, then reproduce the two Macaulay2 examples from the issue. Trace both FindOne selection and an explicitly supplied z+2; done means the reported primitive element has 48 distinct powers in the example and an explicit primitive element is respected.
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
- 45/100