Description
When
ConwayPolynomials is loaded,
map(F,G) constructs the canonical map between compatible Conway-presented finite fields.In this implementation,
GF(p^n) contains
GF(p^m) only when
m divides
n, and both fields must be represented using Conway polynomials.
i1 : F2 = GF 2
o1 = F2
o1 : GaloisField
|
i2 : F4 = GF(2^2)
o2 = F4
o2 : GaloisField
|
i3 : F8 = GF(2^3)
o3 = F8
o3 : GaloisField
|
i4 : F16 = GF(2^4)
o4 = F16
o4 : GaloisField
|
i5 : map(F16, F2)
o5 = map (F16, F2, {1})
o5 : RingMap F16 <-- F2
|
i6 : map(F16, F4)
2
o6 = map (F16, F4, {a + a})
o6 : RingMap F16 <-- F4
|
If no compatible subfield exists, then Macaulay2 signals an error:
i7 : try map(F16, F8) else "this map does not exist"
o7 = this map does not exist
|
It is also possible to invoke the generic ring-map constructor with an explicit image for a generator of the source field:
i8 : map(F16, F4, {1})
o8 = map (F16, F4, {1})
o8 : RingMap F16 <-- F4
|
Such a map need not be well-defined:
i9 : phi = map(F16, F4, {1})
o9 = map (F16, F4, {1})
o9 : RingMap F16 <-- F4
|
i10 : isWellDefined phi
o10 = false
|