为什么FieldExp(有限字段包)不返回原始元素?

时间:2011-08-25 10:56:17

标签: wolfram-mathematica

  1. 需要[ “FiniteFields`”]
  2. FLD = GF [2,3]
  3. GF [2,{1,0,1,1}]
  4. PowerListQ [FLD]
  5. PE = FieldExp [FLD,1]
  6. FieldExp [GF [2,{1,0,1,1}],1]

1 个答案:

答案 0 :(得分:1)

PowerListQ似乎不接受变量替换:

Needs["FiniteFields`"]
fld = GF[2, 3];
PowerListQ[fld] = True;
FieldExp[fld, 1]
PowerListQ[GF[2, 3]] = True;
FieldExp[fld, 1]

返回

FieldExp [GF [2,{1,0,1,1}],1]

{0,1,0} 2

这是预期的答案。

我试过PowerListQ[Evaluate[fld]] = True;无济于事。

ToExpression["PowerListQ[" <> ToString[fld] <> "]=True"]虽然有效。

Needs["FiniteFields`"]
fld = GF[2, 3];
ToExpression["PowerListQ[" <> ToString[fld] <> "]=True"];
FieldExp[fld, 1]

产生{0,1,0} 2