Module

Data.Algebraic.NumberField

Package
purescript-numberfield
Repository
Ebmtranceboy/purescript-numberfield

#Expression Source

type Expression :: forall k. k -> Type -> Typetype Expression f a = Reflectable f (Framework a) => Proxy f -> Extension (Proxy f) (Framework a)

#Framework Source

newtype Framework a

Constructors

Instances

#build Source

build :: forall proxy a f. (proxy -> Extension f a) -> proxy -> 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

#element Source

element :: forall f a. Eq a => Semiring a => a -> Extension f (Framework a)

#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

#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)