ExtensionFields.mesa
Last Edited by: Arnon, March 5, 1986 10:49:31 am PST
DIRECTORY
Rope USING [ROPE],
Basics,
IO USING [STREAM],
AlgebraClasses,
Polynomials,
AlgebraicNumbers;
ExtensionFields: CEDAR DEFINITIONS
~ BEGIN OPEN AC: AlgebraClasses, POL: Polynomials, AN: AlgebraicNumbers;
ExtensionField Representation
ExtensionFieldElement: TYPE = POL.Polynomial;
wrt primitiveElement of the field: an element of minPolyRing, of degree less than the degree of minimalPolynomial.
Classes for ExtensionFields
generalExtensionFieldClass: AC.StructureClass;
realExtensionFieldClass: AC.StructureClass;
Instance Data for ExtensionFields
ExtensionFieldData: TYPE = REF ExtensionFieldDataRec;
ExtensionFieldDataRec: TYPE = RECORD [
groundField: AC.Structure,
primitiveElement: AN.AlgebraicNumber
];
Operations unique to ExtensionFields
ExtensionField Constructors
MakeExtensionField: PROC [primitiveElement: AN.AlgebraicNumber] RETURNS [extensionField: AC.Structure];
extensionField is a structure of category divisionAlgebra, with properties depending on whether primitiveElement is a general or real algebraic number.
Check Properties
IsGeneralExtensionField: PROC [structure: AC.Structure] RETURNS [BOOL];
IsRealField: PROC [structure: AC.Structure] RETURNS [BOOL];
check that has category field or divisionAlgebra, and is realField; may or may not be an extension field
IsRealExtensionField: PROC [structure: AC.Structure] RETURNS [BOOL];
Conversion and IO
ReadExtensionFieldElement: PROC [in: IO.STREAM, extensionField: AC.Structure, reduced: BOOLFALSE] RETURNS [out: ExtensionFieldElement];
If not reduced, then reduce mod the minimal polynomial
ExtensionFieldElementFromRope: PROC [in: Rope.ROPE, extensionField: AC.Structure, reduced: BOOLFALSE] RETURNS [out: ExtensionFieldElement];
ExtensionFieldElementToRope: PROC [in: ExtensionFieldElement] RETURNS [out: Rope.ROPE];
WriteExtensionFieldElement: PROC [in: ExtensionFieldElement, out: IO.STREAM];
Arithmetic
Add: PROC [in1, in2: ExtensionFieldElement] RETURNS [out: ExtensionFieldElement];
Negate: PROC [in: ExtensionFieldElement] RETURNS [out: ExtensionFieldElement];
Subtract: PROC [in1, in2: ExtensionFieldElement] RETURNS [ExtensionFieldElement];
Multiply: PROC [in1, in2: ExtensionFieldElement] RETURNS [out: ExtensionFieldElement];
Note final argument is extensionField, not groundField
Invert: PROC [in: ExtensionFieldElement] RETURNS [out: ExtensionFieldElement];
Divide: PROC [in1, in2: ExtensionFieldElement] RETURNS [out: ExtensionFieldElement];
ScalarMultiply: PROC [scalar: AC.Object, in: ExtensionFieldElement] RETURNS [out: ExtensionFieldElement];
Comparison
Sign: PROC [in: ExtensionFieldElement] RETURNS [Basics.Comparison];
Abs: PROC [in: ExtensionFieldElement] RETURNS [out: ExtensionFieldElement];
Compare: PROC [in1, in2: ExtensionFieldElement] RETURNS [Basics.Comparison];
Miscellaneous
Equal: PROC [in1, in2: ExtensionFieldElement] RETURNS [BOOL];
END.