Macaulay2 / Macaulay2/M2

Primitive element for finite fields

Open
#1,917 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Core Documentation
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

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.