Safe Haskell | None |
---|---|
Language | Haskell98 |
A module defining the field Q of rationals and the small finite fields (Galois fields) F2, F3, F4, F5, F7, F8, F9, F11, F13, F16, F17, F19, F23, F25.
Given a prime power q, Fq is the type representing elements of the field (eg F4
),
fq is a list of the elements of the field, beginning 0,1,... (eg f4
),
and for prime power fields, aq is a primitive element, which generates the multiplicative group (eg a4
).
The design philosophy is that fq, the list of elements, represents the field. Thus, many functions elsewhere in the library expect to take fq as an argument, telling them which field to work over.
- newtype Q = Q Rational
- numeratorQ :: Q -> Integer
- denominatorQ :: Q -> Integer
- newtype F2 = F2 Int
- f2 :: [F2]
- newtype F3 = F3 Int
- f3 :: [F3]
- newtype F5 = F5 Int
- f5 :: [F5]
- newtype F7 = F7 Int
- f7 :: [F7]
- newtype F11 = F11 Int
- f11 :: [F11]
- newtype F13 = F13 Int
- f13 :: [F13]
- newtype F17 = F17 Int
- f17 :: [F17]
- newtype F19 = F19 Int
- f19 :: [F19]
- newtype F23 = F23 Int
- f23 :: [F23]
- newtype F4 = F4 Int
- a4 :: F4
- f4 :: [F4]
- powers :: (Num a, Eq a) => a -> [a]
- newtype F8 = F8 Int
- a8 :: F8
- f8 :: [F8]
- newtype F9 = F9 Int
- a9 :: F9
- f9 :: [F9]
- newtype F16 = F16 Int
- a16 :: F16
- f16 :: [F16]
- newtype F25 = F25 Int
- a25 :: F25
- f25 :: [F25]
Documentation
Q is just the rationals, but with a better show function than the Prelude version
Eq Q | |
Fractional Q | |
Fractional QNF | |
Num Q | |
Ord Q | |
Show Q | |
HasInverses (GroupAlgebra Q) | Note that the inverse of a group algebra element can only be efficiently calculated if the group generated by the non-zero terms is very small (eg <100 elements). |
numeratorQ :: Q -> Integer Source
denominatorQ :: Q -> Integer Source
F2 is a type for the finite field with 2 elements
F3 is a type for the finite field with 3 elements
F5 is a type for the finite field with 5 elements
F7 is a type for the finite field with 7 elements
F11 is a type for the finite field with 11 elements
F13 is a type for the finite field with 13 elements
F17 is a type for the finite field with 17 elements
F19 is a type for the finite field with 19 elements
F23 is a type for the finite field with 23 elements
F4 is a type for the finite field with 4 elements. F4 is represented as the extension of F2 by an element a4 satisfying x^2+x+1 = 0
F8 is a type for the finite field with 8 elements. F8 is represented as the extension of F2 by an element a8 satisfying x^3+x+1 = 0
F9 is a type for the finite field with 9 elements. F9 is represented as the extension of F3 by an element a9 satisfying x^2+2x+2 = 0
F16 is a type for the finite field with 16 elements. F16 is represented as the extension of F2 by an element a16 satisfying x^4+x+1 = 0
a16 is a primitive element for F16 as an extension over F2. a16 satisfies x^4+x+1 = 0.
F25 is a type for the finite field with 25 elements. F25 is represented as the extension of F5 by an element a25 satisfying x^2+4x+2 = 0
a25 is a primitive element for F25 as an extension over F5. a25 satisfies x^2+4x+2 = 0.