Copyright | (c) 2020 Federico Bongiorno |
---|---|
License | MIT |
Maintainer | Federico Bongiorno <federicobongiorno97@gmail.com> |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
Cubic symbol of two Eisenstein Integers.
Synopsis
- data CubicSymbol
- = Zero
- | Omega
- | OmegaSquare
- | One
- cubicSymbol :: EisensteinInteger -> EisensteinInteger -> CubicSymbol
- symbolToNum :: CubicSymbol -> EisensteinInteger
Documentation
data CubicSymbol Source #
Represents the
cubic residue character
It is either 0
, ω
, ω²
or 1
.
Instances
Semigroup CubicSymbol Source # | The set of cubic symbols form a semigroup. Note
|
Defined in Math.NumberTheory.Moduli.Cbrt (<>) :: CubicSymbol -> CubicSymbol -> CubicSymbol # sconcat :: NonEmpty CubicSymbol -> CubicSymbol # stimes :: Integral b => b -> CubicSymbol -> CubicSymbol # | |
Show CubicSymbol Source # | |
Defined in Math.NumberTheory.Moduli.Cbrt showsPrec :: Int -> CubicSymbol -> ShowS # show :: CubicSymbol -> String # showList :: [CubicSymbol] -> ShowS # | |
Eq CubicSymbol Source # | |
Defined in Math.NumberTheory.Moduli.Cbrt (==) :: CubicSymbol -> CubicSymbol -> Bool # (/=) :: CubicSymbol -> CubicSymbol -> Bool # |
cubicSymbol :: EisensteinInteger -> EisensteinInteger -> CubicSymbol Source #
Cubic symbol
of two Eisenstein Integers.
The first argument is the numerator and the second argument
is the denominator. The latter must be coprime to 3
.
This condition is checked.
If the arguments have a common factor, the result
is Zero
, otherwise it is either Omega
, OmegaSquare
or One
.
>>>
cubicSymbol (45 + 23*ω) (11 - 30*ω)
0>>>
cubicSymbol (31 - ω) (1 +10*ω)
ω
symbolToNum :: CubicSymbol -> EisensteinInteger Source #
Converts a cubic symbol to an Eisenstein Integer.