HaskellForMaths-0.4.8: Combinatorics, group theory, commutative algebra, non-commutative algebra

Safe Haskell | None
Language | Haskell98

Math.Core.Field

Description

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.

Synopsis

- 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 :: (Eq a, Num 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

newtype Q Source

Q is just the rationals, but with a better show function than the Prelude version

Constructors

Q Rational |

Instances

Eq Q Source |
Fractional Q Source |
Fractional QNF |
Num Q Source |
Ord Q Source |
Show Q Source |

numeratorQ :: Q -> Integer Source

denominatorQ :: Q -> Integer Source

newtype F2 Source

F2 is a type for the finite field with 2 elements

Constructors

F2 Int |

Instances

Eq F2 Source |
Fractional F2 Source |
Num F2 Source |
Ord F2 Source |
Show F2 Source |
FinSet F2 Source |

f2 :: [F2] Source

f2 is a list of the elements of F2

newtype F3 Source

F3 is a type for the finite field with 3 elements

Constructors

F3 Int |

Instances

Eq F3 Source |
Fractional F3 Source |
Num F3 Source |
Ord F3 Source |
Show F3 Source |
FinSet F3 Source |

f3 :: [F3] Source

f3 is a list of the elements of F3

newtype F5 Source

F5 is a type for the finite field with 5 elements

Constructors

F5 Int |

Instances

Eq F5 Source |
Fractional F5 Source |
Num F5 Source |
Ord F5 Source |
Show F5 Source |
FinSet F5 Source |

f5 :: [F5] Source

f5 is a list of the elements of F5

newtype F7 Source

F7 is a type for the finite field with 7 elements

Constructors

F7 Int |

Instances

Eq F7 Source |
Fractional F7 Source |
Num F7 Source |
Ord F7 Source |
Show F7 Source |
FinSet F7 Source |

f7 :: [F7] Source

f7 is a list of the elements of F7

newtype F11 Source

F11 is a type for the finite field with 11 elements

Constructors

F11 Int |

Instances

Eq F11 Source |
Fractional F11 Source |
Num F11 Source |
Ord F11 Source |
Show F11 Source |
FinSet F11 Source |

f11 :: [F11] Source

f11 is a list of the elements of F11

newtype F13 Source

F13 is a type for the finite field with 13 elements

Constructors

F13 Int |

Instances

Eq F13 Source |
Fractional F13 Source |
Num F13 Source |
Ord F13 Source |
Show F13 Source |
FinSet F13 Source |

f13 :: [F13] Source

f13 is a list of the elements of F13

newtype F17 Source

F17 is a type for the finite field with 17 elements

Constructors

F17 Int |

Instances

Eq F17 Source |
Fractional F17 Source |
Num F17 Source |
Ord F17 Source |
Show F17 Source |
FinSet F17 Source |

f17 :: [F17] Source

f17 is a list of the elements of F17

newtype F19 Source

F19 is a type for the finite field with 19 elements

Constructors

F19 Int |

Instances

Eq F19 Source |
Fractional F19 Source |
Num F19 Source |
Ord F19 Source |
Show F19 Source |
FinSet F19 Source |

f19 :: [F19] Source

f19 is a list of the elements of F19

newtype F23 Source

F23 is a type for the finite field with 23 elements

Constructors

F23 Int |

Instances

Eq F23 Source |
Fractional F23 Source |
Num F23 Source |
Ord F23 Source |
Show F23 Source |
FinSet F23 Source |

f23 :: [F23] Source

f23 is a list of the elements of F23

newtype F4 Source

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

Constructors

F4 Int |

Instances

Eq F4 Source |
Fractional F4 Source |
Num F4 Source |
Ord F4 Source |
Show F4 Source |
FinSet F4 Source |

a4 :: F4 Source

a4 is a primitive element for F4 as an extension over F2. a4 satisfies x^2+x+1 = 0.

f4 :: [F4] Source

f4 is a list of the elements of F4

powers :: (Eq a, Num a) => a -> [a] Source

newtype F8 Source

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

Constructors

F8 Int |

Instances

Eq F8 Source |
Fractional F8 Source |
Num F8 Source |
Ord F8 Source |
Show F8 Source |
FinSet F8 Source |

a8 :: F8 Source

a8 is a primitive element for F8 as an extension over F2. a8 satisfies x^3+x+1 = 0.

f8 :: [F8] Source

f8 is a list of the elements of F8

newtype F9 Source

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

Constructors

F9 Int |

Instances

Eq F9 Source |
Fractional F9 Source |
Num F9 Source |
Ord F9 Source |
Show F9 Source |
FinSet F9 Source |

a9 :: F9 Source

a9 is a primitive element for F9 as an extension over F3. a9 satisfies x^2+2x+2 = 0.

f9 :: [F9] Source

f9 is a list of the elements of F9

newtype F16 Source

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

Constructors

F16 Int |

Instances

Eq F16 Source |
Fractional F16 Source |
Num F16 Source |
Ord F16 Source |
Show F16 Source |
FinSet F16 Source |

a16 :: F16 Source

a16 is a primitive element for F16 as an extension over F2. a16 satisfies x^4+x+1 = 0.

f16 :: [F16] Source

f16 is a list of the elements of F16

newtype F25 Source

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

Constructors

F25 Int |

Instances

Eq F25 Source |
Fractional F25 Source |
Num F25 Source |
Ord F25 Source |
Show F25 Source |
FinSet F25 Source |

a25 :: F25 Source

a25 is a primitive element for F25 as an extension over F5. a25 satisfies x^2+4x+2 = 0.

f25 :: [F25] Source

f25 is a list of the elements of F25