Instance Data for ExtensionFields
ExtensionFieldData: TYPE = REF ExtensionFieldDataRec;
ExtensionFieldDataRec:
TYPE =
RECORD [
groundField: AC.Structure,
primitiveElement: AN.AlgebraicNumber
];
Conversion and IO
ReadExtensionFieldElement:
PROC [in:
IO.
STREAM, algebraicNumber:
AN.AlgebraicNumber, reduced:
BOOL ←
FALSE]
RETURNS [out: ExtensionFieldElement];
If not reduced, then reduce mod the minimal polynomial
ExtensionFieldElementFromRope:
PROC [in: Rope.
ROPE, algebraicNumber:
AN.AlgebraicNumber, reduced:
BOOL ←
FALSE]
RETURNS [out: ExtensionFieldElement];
ExtensionFieldElementToRope:
PROC [in: ExtensionFieldElement, algebraicNumber:
AN.AlgebraicNumber]
RETURNS [out: Rope.
ROPE];
WriteExtensionFieldElement: PROC [in: ExtensionFieldElement, algebraicNumber: AN.AlgebraicNumber, out: IO.STREAM];
Arithmetic
Add:
PROC [in1, in2: ExtensionFieldElement, groundField:
AC.Structure]
RETURNS [out: ExtensionFieldElement];
Negate:
PROC [in: ExtensionFieldElement, groundField:
AC.Structure]
RETURNS [out: ExtensionFieldElement];
Subtract:
PROC [in1, in2: ExtensionFieldElement, groundField:
AC.Structure]
RETURNS [ExtensionFieldElement];
Multiply:
PROC [in1, in2: ExtensionFieldElement, extensionField:
AC.Structure]
RETURNS [out: ExtensionFieldElement];
Note final argument is extensionField, not groundField
Invert:
PROC [in: ExtensionFieldElement, algebraicNumber:
AN.AlgebraicNumber]
RETURNS [out: ExtensionFieldElement];
Divide:
PROC [in1, in2: ExtensionFieldElement, algebraicNumber:
AN.AlgebraicNumber]
RETURNS [out: ExtensionFieldElement];
ScalarMultiply: PROC [scalar: REF, in: ExtensionFieldElement, extensionField: AC.Structure] RETURNS [out: ExtensionFieldElement];
Comparison
Sign:
PROC [in: ExtensionFieldElement, realExtensionField:
AC.Structure]
RETURNS [Basics.Comparison];
Abs:
PROC [in: ExtensionFieldElement, realExtensionField:
AC.Structure]
RETURNS [out: ExtensionFieldElement];
Compare: PROC [in1, in2: ExtensionFieldElement, realExtensionField: AC.Structure] RETURNS [Basics.Comparison];