Univariate polynomials parametrised by the variable name.
- newtype CommutativeRing r => UPoly r x = UP [r]
- deg :: CommutativeRing r => UPoly r x -> Integer
- type Qx = UPoly Q X_
- x :: Qx
- toUPoly :: (CommutativeRing r, Eq r) => [r] -> UPoly r x
- monomial :: CommutativeRing r => r -> Integer -> UPoly r x
- lt :: CommutativeRing r => UPoly r x -> r
- deriv :: CommutativeRing r => UPoly r x -> UPoly r x
- sqfr :: (Num k, Field k) => UPoly k x -> UPoly k x
- sqfrDec :: (Num k, Field k) => UPoly k x -> [UPoly k x]
Documentation
newtype CommutativeRing r => UPoly r x Source
Polynomials over a commutative ring, indexed by a phantom type x that denote the name of the variable that the polynomial is over. For example UPoly Q X_ is Q[x] and UPoly Q T_ is Q[t].
UP [r] |
Eq r => Eq (UPoly r x) | |
(Show r, Field r, Num r, Show x) => Num (UPoly r x) | |
Ord r => Ord (UPoly r x) | |
(CommutativeRing r, Eq r, Show r, Show x) => Show (UPoly r x) | |
(CommutativeRing r, Eq r, Arbitrary r) => Arbitrary (UPoly r x) | |
(CommutativeRing r, Eq r) => Ring (UPoly r x) | |
(CommutativeRing r, Eq r) => CommutativeRing (UPoly r x) | |
(CommutativeRing r, Eq r) => IntegralDomain (UPoly r x) | |
(Field k, Eq k) => EuclideanDomain (UPoly k x) |
deg :: CommutativeRing r => UPoly r x -> IntegerSource
The degree of the polynomial.
toUPoly :: (CommutativeRing r, Eq r) => [r] -> UPoly r xSource
Take a list and construct a polynomial by removing all zeroes in the end.
monomial :: CommutativeRing r => r -> Integer -> UPoly r xSource
Take an element of the ring and the degree of the desired monomial, for example: monomial 3 7 = 3x^7
lt :: CommutativeRing r => UPoly r x -> rSource
Compute the leading term of a polynomial.
deriv :: CommutativeRing r => UPoly r x -> UPoly r xSource
Formal derivative of polynomials in k[x].