Copyright | (c) 2020 Federico Bongiorno |
---|---|
License | MIT |
Maintainer | Federico Bongiorno <federicobongiorno97@gmail.com> |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
Math.NumberTheory.Moduli.Cbrt
Description
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
.
Constructors
Zero | |
Omega | |
OmegaSquare | |
One |
Instances
Semigroup CubicSymbol Source # | The set of cubic symbols form a semigroup. Note
|
Defined in Math.NumberTheory.Moduli.Cbrt Methods (<>) :: CubicSymbol -> CubicSymbol -> CubicSymbol Source # sconcat :: NonEmpty CubicSymbol -> CubicSymbol Source # stimes :: Integral b => b -> CubicSymbol -> CubicSymbol Source # | |
Show CubicSymbol Source # | |
Defined in Math.NumberTheory.Moduli.Cbrt | |
Eq CubicSymbol Source # | |
Defined in Math.NumberTheory.Moduli.Cbrt Methods (==) :: CubicSymbol -> CubicSymbol -> Bool Source # (/=) :: CubicSymbol -> CubicSymbol -> Bool Source # |
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.