Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- data GF' p (n :: Nat) (f :: Type)
- class (KnownNat n, KnownNat p, Reifies f (Unipol (F p))) => IsGF' p n f
- modPoly :: forall p n f. (KnownNat n, Reifies p Integer) => Unipol (F p) -> GF' p n f
- modVec :: Sized n (F p) -> GF' p n f
- withIrreducible :: forall p a. KnownNat p => Unipol (F p) -> (forall f (n :: Nat). Reifies f (Unipol (F p)) => Proxy (GF' p n f) -> a) -> a
- linearRepGF :: GF' p n f -> Vector (F p)
- linearRepGF' :: GF' p n f -> Vector Integer
- reifyGF' :: MonadRandom m => Natural -> Natural -> (forall (p :: Nat) (f :: Type) (n :: Nat). (Reifies p Integer, Reifies f (Unipol (F p))) => Proxy (GF' p n f) -> a) -> m a
- generateIrreducible :: (MonadRandom m, Random k, FiniteField k, Eq k) => proxy k -> Natural -> m (Unipol k)
- withGF' :: MonadRandom m => Natural -> Natural -> (forall (p :: Nat) f (n :: Nat). (Reifies p Integer, Reifies f (Unipol (F p))) => GF' p n f) -> m (Vector Integer)
- type GF (p :: Nat) n = GF' p n (Conway p n)
- class ConwayPolynomial (p :: Nat) (n :: Nat) where
- conwayPolynomial :: proxy p -> proxy n -> Unipol (F p)
- data Conway p n
- primitive :: forall p n. (IsGF' p n (Conway p n), 1 <= n) => GF p n
- primitive' :: forall p n f. (IsGF' p n f, 1 <= n) => GF' p n f
- conway :: forall p n. ConwayPolynomial p n => SNat p -> SNat n -> Unipol (F p)
- conwayFile :: FilePath -> DecsQ
- addConwayPolynomials :: [(Integer, Integer, [Integer])] -> DecsQ
Documentation
data GF' p (n :: Nat) (f :: Type) Source #
Galois field of order p^n
.
f
stands for the irreducible polynomial over F_p
of degree n
.
Instances
Reifies p Integer => RightModule Integer (GF' p n f) Source # | |
Reifies p Integer => RightModule Natural (GF' p n f) Source # | |
Reifies p Integer => LeftModule Integer (GF' p n f) Source # | |
Reifies p Integer => LeftModule Natural (GF' p n f) Source # | |
Reifies p Integer => Eq (GF' p n f) Source # | |
(Reifies p Integer, Reifies f (Unipol (F p)), KnownNat n) => Fractional (GF' p n f) Source # | |
(Reifies p Integer, Reifies f (Unipol (F p)), KnownNat n) => Num (GF' p n f) Source # | |
Defined in Algebra.Field.Galois | |
(Reifies p Integer, KnownNat n, Show (F p)) => Show (GF' p n f) Source # | |
(KnownNat n, Reifies p Integer, Reifies f (Unipol (F p))) => UFD (GF' p n f) Source # | |
Defined in Algebra.Field.Galois | |
(KnownNat n, Reifies p Integer, Reifies f (Unipol (F p))) => PID (GF' p n f) Source # | |
(KnownNat n, Reifies p Integer, Reifies f (Unipol (F p))) => GCDDomain (GF' p n f) Source # | |
(KnownNat n, Reifies p Integer, Reifies f (Unipol (F p))) => IntegralDomain (GF' p n f) Source # | |
(KnownNat n, Reifies p Integer, Reifies f (Unipol (F p))) => Euclidean (GF' p n f) Source # | |
(KnownNat n, IsGF' p n f) => ZeroProductSemiring (GF' p n f) Source # | |
Defined in Algebra.Field.Galois | |
(KnownNat n, Reifies p Integer, Reifies f (Unipol (F p))) => ZeroProductSemiring (GF' p n f) Source # | |
Defined in Algebra.Field.Galois | |
(KnownNat n, Reifies p Integer, Reifies f (Unipol (F p))) => UnitNormalForm (GF' p n f) Source # | |
(KnownNat n, Reifies f (Unipol (F p)), Reifies p Integer) => Ring (GF' p n f) Source # | |
Defined in Algebra.Field.Galois fromInteger :: Integer -> GF' p n f | |
(KnownNat n, Reifies f (Unipol (F p)), Reifies p Integer) => Rig (GF' p n f) Source # | |
Defined in Algebra.Field.Galois fromNatural :: Natural -> GF' p n f # | |
(Reifies p Integer, Reifies f (Unipol (F p)), KnownNat n) => Characteristic (GF' p n f) Source # | |
Defined in Algebra.Field.Galois | |
(KnownNat n, Reifies p Integer) => DecidableZero (GF' p n f) Source # | |
Defined in Algebra.Field.Galois | |
(KnownNat n, Reifies p Integer, Reifies f (Unipol (F p))) => DecidableUnits (GF' p n f) Source # | |
(KnownNat n, Reifies p Integer, Reifies f (Unipol (F p))) => DecidableAssociates (GF' p n f) Source # | |
Defined in Algebra.Field.Galois isAssociate :: GF' p n f -> GF' p n f -> Bool # | |
(KnownNat n, Reifies f (Unipol (F p)), Reifies p Integer) => Unital (GF' p n f) Source # | |
(Reifies p Integer, Reifies f (Unipol (F p)), KnownNat n) => Division (GF' p n f) Source # | |
(KnownNat n, Reifies f (Unipol (F p)), Reifies p Integer) => Commutative (GF' p n f) Source # | |
Defined in Algebra.Field.Galois | |
(KnownNat n, Reifies f (Unipol (F p)), Reifies p Integer) => Semiring (GF' p n f) Source # | |
Defined in Algebra.Field.Galois | |
(KnownNat n, Reifies f (Unipol (F p)), Reifies p Integer) => Multiplicative (GF' p n f) Source # | |
(Reifies p Integer, KnownNat n) => Monoidal (GF' p n f) Source # | |
(KnownNat n, Reifies p Integer) => Group (GF' p n f) Source # | |
Reifies p Integer => Additive (GF' p n f) Source # | |
Reifies p Integer => Abelian (GF' p n f) Source # | |
Defined in Algebra.Field.Galois | |
NFData (GF' p n f) Source # | |
Defined in Algebra.Field.Galois | |
(Reifies p Integer, KnownNat n, Show (F p)) => PrettyCoeff (GF' p n f) Source # | |
Defined in Algebra.Field.Galois showsCoeff :: Int -> GF' p n f -> ShowSCoeff # | |
(KnownNat n, IsGF' p n f) => FiniteField (GF' p n f) Source # | |
IsGF' p n f => Random (GF' p n f) Source # | |
class (KnownNat n, KnownNat p, Reifies f (Unipol (F p))) => IsGF' p n f Source #
Type-constraint synonym to work with Galois field.
withIrreducible :: forall p a. KnownNat p => Unipol (F p) -> (forall f (n :: Nat). Reifies f (Unipol (F p)) => Proxy (GF' p n f) -> a) -> a Source #
reifyGF' :: MonadRandom m => Natural -> Natural -> (forall (p :: Nat) (f :: Type) (n :: Nat). (Reifies p Integer, Reifies f (Unipol (F p))) => Proxy (GF' p n f) -> a) -> m a Source #
generateIrreducible :: (MonadRandom m, Random k, FiniteField k, Eq k) => proxy k -> Natural -> m (Unipol k) Source #
generateIrreducible p n
generates irreducible polynomial over F_p
of degree n
.
withGF' :: MonadRandom m => Natural -> Natural -> (forall (p :: Nat) f (n :: Nat). (Reifies p Integer, Reifies f (Unipol (F p))) => GF' p n f) -> m (Vector Integer) Source #
type GF (p :: Nat) n = GF' p n (Conway p n) Source #
Galois Field of order p^n
. This uses conway polynomials
as canonical minimal polynomial and it should be known at
compile-time (i.e. Reifies (Conway p n) (Unipol (F n))
instances should be defined to use field operations).
class ConwayPolynomial (p :: Nat) (n :: Nat) where Source #
Type-class to provide the dictionary for Conway polynomials
conwayPolynomial :: proxy p -> proxy n -> Unipol (F p) Source #
Instances
Empty tag to reify Conway polynomial to type-level
conway :: forall p n. ConwayPolynomial p n => SNat p -> SNat n -> Unipol (F p) Source #
Conway polynomial (if definition is known).
conwayFile :: FilePath -> DecsQ Source #
Parse conway polynomial file and define instances for them. File-format must be the same as Lueback's file.