Module

# Data.Algebraic.NumberField

- Package
- purescript-numberfield
- Repository
- Ebmtranceboy/purescript-numberfield

### #Expression Source

`type Expression :: forall k. k -> Type -> Type`

`type Expression f a = Reflectable f (Framework a) => Proxy f -> Extension (Proxy f) (Framework a)`

### #Extension Source

`newtype Extension :: forall k. k -> Type -> Type`

`newtype Extension f`

_{}a

#### Constructors

#### Instances

`(Add n1 1 n, Arity (Polynomial (Polynomial a)) n, Divisible a, Eq a, EuclideanRing a, Full n1 (Polynomial a), Leadable a, Reflectable f (Framework (Polynomial a))) => Semiring (Extension (Proxy f) (Framework (Polynomial a)))`

`(Add n1 1 n, Arity (Polynomial (Polynomial a)) n, Divisible a, Eq a, EuclideanRing a, Full n1 (Polynomial a), Leadable a, Reflectable f (Framework (Polynomial a))) => Ring (Extension (Proxy f) (Framework (Polynomial a)))`

`(Add n 1 m1, Add m1 1 m, Arity (Polynomial (Polynomial a)) m, Divisible a, Divisible r, Eq a, Eq r, EuclideanRing a, EuclideanRing r, Full m1 (Polynomial a), Leadable a, Leadable r, Ord r, Pad n (Polynomial r) (Polynomial (Polynomial a)), Peel r r, Reflectable f (Framework (Polynomial a)), Unpad n (Polynomial r) (Polynomial (Polynomial a))) => DivisionRing (Extension (Proxy f) (Framework (Polynomial a)))`

### #Framework Source

`newtype Framework a`

#### Constructors

`Framework { lift :: a -> Polynomial a, minimal :: Polynomial a, primitiveExpressions :: Array (Polynomial a), primitiveSubstitution :: Polynomial a -> Polynomial a, rawModuli :: Array (Polynomial a), unlift :: Polynomial a -> a, value :: a }`

#### Instances

`Reifiable (Framework (Polynomial (Ratio a)))`

`(Reifiable (Framework a)) => Reifiable (Framework (Polynomial a))`

`(Add n1 1 n, Arity (Polynomial (Polynomial a)) n, Divisible a, Eq a, EuclideanRing a, Full n1 (Polynomial a), Leadable a, Reflectable f (Framework (Polynomial a))) => Semiring (Extension (Proxy f) (Framework (Polynomial a)))`

`(Add n1 1 n, Arity (Polynomial (Polynomial a)) n, Divisible a, Eq a, EuclideanRing a, Full n1 (Polynomial a), Leadable a, Reflectable f (Framework (Polynomial a))) => Ring (Extension (Proxy f) (Framework (Polynomial a)))`

`(Add n 1 m1, Add m1 1 m, Arity (Polynomial (Polynomial a)) m, Divisible a, Divisible r, Eq a, Eq r, EuclideanRing a, EuclideanRing r, Full m1 (Polynomial a), Leadable a, Leadable r, Ord r, Pad n (Polynomial r) (Polynomial (Polynomial a)), Peel r r, Reflectable f (Framework (Polynomial a)), Unpad n (Polynomial r) (Polynomial (Polynomial a))) => DivisionRing (Extension (Proxy f) (Framework (Polynomial a)))`

### #cayley Source

`cayley :: forall a. Divisible a => Eq a => EuclideanRing a => Leadable a => Peel a a => Polynomial a -> Polynomial a -> Polynomial a`

Computes the reciprocal of the second polynomial with the help of the previously computed https://en.wikipedia.org/wiki/Resultant between that polynomial and the minimal polynomial of the extension

### #extensionBySum Source

`extensionBySum :: forall a. CommutativeRing a => Divisible a => Eq a => Leadable a => Ord a => Ring a => Array (Polynomial a) -> Polynomial a`

Builds the minimal polynomial whose root(s) is (are) the sum of the roots of each of the polynomials listed in the array

### #framework Source

`framework :: forall r a n1 n2 n3. Add n3 1 n2 => Add n2 1 n1 => Arity (Polynomial (Polynomial a)) n1 => Axed a r => CommutativeRing a => CommutativeRing r => Divisible a => Divisible r => DivisionRing r => Full n2 (Polynomial a) => GoSwap 0 n1 (Polynomial a) => Leadable a => Leadable r => Nest n2 (Polynomial a) => Ord a => Ord r => Pad n3 (Polynomial r) (Polynomial (Polynomial a)) => Pad n2 (Polynomial r) (Polynomial (Polynomial (Polynomial a))) => Peel a r => Set n2 r (Polynomial a) => Unpad n3 (Polynomial r) (Polynomial (Polynomial a)) => Polynomial a -> Array (Polynomial r) -> Framework (Polynomial a)`

Computes the required quantities needed to perform computations with algebraic extensions in the field of rational numbers

### #minimalPolynomial Source

`minimalPolynomial :: forall a. Framework a -> Polynomial a`

### #normalize Source

`normalize :: forall f a n n1. Add n1 1 n => Arity (Polynomial (Polynomial a)) n => Divisible a => Eq a => EuclideanRing a => Full n1 (Polynomial a) => Leadable a => Reflectable f (Framework (Polynomial a)) => Polynomial a -> Extension (Proxy f) (Framework (Polynomial a))`

### #reciprocal Source

`reciprocal :: forall n n1 n2 a r. Add n2 1 n1 => Add n1 1 n => Arity a n => Divisible r => Eq r => EuclideanRing r => Leadable r => Ord r => Pad n2 (Polynomial r) a => Peel r r => Unpad n2 (Polynomial r) a => a -> a -> a`

Computes the reciprocal of the first polynomial in the extension whose minimal polynomial is provided by the second polynomial

### #run Source

`run :: forall a. Framework (Polynomial a) -> Polynomial a`

### #sylvester Source

`sylvester :: forall a. CommutativeRing a => Divisible a => Eq a => Leadable a => Polynomial a -> Polynomial a -> Matrix a`

Builds the https://en.wikipedia.org/wiki/Sylvester_matrix of two univariate polynomials with coefficients in a commutative ring

### #toPrimitive Source

`toPrimitive :: forall a. Framework a -> Array (Polynomial a)`

- Modules
- Data.
Algebraic. NumberField