Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- module Algebra.Ring.Polynomial.Monomial
- module Algebra.Ring.Polynomial.Class
- type Polynomial r = OrderedPolynomial r Grevlex
- transformMonomial :: (IsMonomialOrder m o', CoeffRing k, KnownNat m) => (USized n Int -> USized m Int) -> OrderedPolynomial k o n -> OrderedPolynomial k o' m
- castPolynomial :: forall r n m o o'. (CoeffRing r, KnownNat n, KnownNat m, IsMonomialOrder n o, IsMonomialOrder m o') => OrderedPolynomial r o n -> OrderedPolynomial r o' m
- changeOrder :: forall k n o o'. (CoeffRing k, Eq (Monomial n), IsMonomialOrder n o, IsMonomialOrder n o', KnownNat n) => o' -> OrderedPolynomial k o n -> OrderedPolynomial k o' n
- changeOrderProxy :: forall k n o o'. (CoeffRing k, Eq (Monomial n), IsMonomialOrder n o, IsMonomialOrder n o', KnownNat n) => Proxy o' -> OrderedPolynomial k o n -> OrderedPolynomial k o' n
- scastPolynomial :: (IsMonomialOrder n o, IsMonomialOrder m o', KnownNat m, CoeffRing r, KnownNat n) => SNat m -> OrderedPolynomial r o n -> OrderedPolynomial r o' m
- newtype OrderedPolynomial r order n = Polynomial {
- _terms :: Map (OrderedMonomial order n) r
- allVars :: forall k ord n. (IsMonomialOrder n ord, CoeffRing k, KnownNat n) => Sized n (OrderedPolynomial k ord n)
- substVar :: (CoeffRing r, KnownNat n, IsMonomialOrder n ord, 1 <= n) => Ordinal n -> OrderedPolynomial r ord n -> OrderedPolynomial r ord n -> OrderedPolynomial r ord n
- homogenize :: forall k ord n. (CoeffRing k, KnownNat n, IsMonomialOrder (n + 1) ord, IsMonomialOrder n ord) => OrderedPolynomial k ord n -> OrderedPolynomial k ord (n + 1)
- unhomogenize :: forall k ord n. (CoeffRing k, KnownNat n, IsMonomialOrder n ord, IsMonomialOrder (n + 1) ord) => OrderedPolynomial k ord (n + 1) -> OrderedPolynomial k ord n
- normalize :: DecidableZero r => OrderedPolynomial r order n -> OrderedPolynomial r order n
- varX :: forall r n order. (CoeffRing r, KnownNat n, IsMonomialOrder n order, 0 < n) => OrderedPolynomial r order n
- getTerms :: OrderedPolynomial k order n -> [(k, OrderedMonomial order n)]
- shiftR :: forall k r n ord. (CoeffRing r, KnownNat n, IsMonomialOrder n ord, IsMonomialOrder (k + n) ord) => SNat k -> OrderedPolynomial r ord n -> OrderedPolynomial r ord (k + n)
- orderedBy :: OrderedPolynomial k o n -> o -> OrderedPolynomial k o n
- mapCoeff :: (KnownNat n, CoeffRing b, IsMonomialOrder n ord) => (a -> b) -> OrderedPolynomial a ord n -> OrderedPolynomial b ord n
- reversal :: (CoeffRing k, IsMonomialOrder 1 o) => Int -> OrderedPolynomial k o 1 -> OrderedPolynomial k o 1
- padeApprox :: (Field r, DecidableUnits r, CoeffRing r, ZeroProductSemiring r, IsMonomialOrder 1 order) => Natural -> Natural -> OrderedPolynomial r order 1 -> (OrderedPolynomial r order 1, OrderedPolynomial r order 1)
- eval :: (CoeffRing r, IsMonomialOrder n order, KnownNat n) => Sized n r -> OrderedPolynomial r order n -> r
- evalUnivariate :: (CoeffRing b, IsMonomialOrder 1 order) => b -> OrderedPolynomial b order 1 -> b
- substUnivariate :: (Module (Scalar r) b, Unital b, CoeffRing r, IsMonomialOrder 1 order) => b -> OrderedPolynomial r order 1 -> b
- minpolRecurrent :: forall k. (Eq k, ZeroProductSemiring k, DecidableUnits k, DecidableZero k, Field k) => Natural -> [k] -> Polynomial k 1
- class IsOrder (n :: Nat) ordering where
- cmpMonomial :: Proxy ordering -> MonomialOrder n
- newtype PadPolyL n ord poly = PadPolyL {
- runPadPolyL :: OrderedPolynomial poly (Graded ord) n
- padLeftPoly :: (IsMonomialOrder n ord, IsPolynomial poly) => SNat n -> ord -> poly -> PadPolyL n ord poly
Documentation
type Polynomial r = OrderedPolynomial r Grevlex Source #
transformMonomial :: (IsMonomialOrder m o', CoeffRing k, KnownNat m) => (USized n Int -> USized m Int) -> OrderedPolynomial k o n -> OrderedPolynomial k o' m Source #
castPolynomial :: forall r n m o o'. (CoeffRing r, KnownNat n, KnownNat m, IsMonomialOrder n o, IsMonomialOrder m o') => OrderedPolynomial r o n -> OrderedPolynomial r o' m Source #
changeOrder :: forall k n o o'. (CoeffRing k, Eq (Monomial n), IsMonomialOrder n o, IsMonomialOrder n o', KnownNat n) => o' -> OrderedPolynomial k o n -> OrderedPolynomial k o' n Source #
changeOrderProxy :: forall k n o o'. (CoeffRing k, Eq (Monomial n), IsMonomialOrder n o, IsMonomialOrder n o', KnownNat n) => Proxy o' -> OrderedPolynomial k o n -> OrderedPolynomial k o' n Source #
scastPolynomial :: (IsMonomialOrder n o, IsMonomialOrder m o', KnownNat m, CoeffRing r, KnownNat n) => SNat m -> OrderedPolynomial r o n -> OrderedPolynomial r o' m Source #
newtype OrderedPolynomial r order n Source #
n-ary polynomial ring over some noetherian ring R.
Polynomial | |
|
Instances
allVars :: forall k ord n. (IsMonomialOrder n ord, CoeffRing k, KnownNat n) => Sized n (OrderedPolynomial k ord n) Source #
substVar :: (CoeffRing r, KnownNat n, IsMonomialOrder n ord, 1 <= n) => Ordinal n -> OrderedPolynomial r ord n -> OrderedPolynomial r ord n -> OrderedPolynomial r ord n Source #
substVar n f
substitutes n
-th variable with polynomial f
,
without changing arity.
homogenize :: forall k ord n. (CoeffRing k, KnownNat n, IsMonomialOrder (n + 1) ord, IsMonomialOrder n ord) => OrderedPolynomial k ord n -> OrderedPolynomial k ord (n + 1) Source #
Calculate the homogenized polynomial of given one, with additional variable is the last variable.
unhomogenize :: forall k ord n. (CoeffRing k, KnownNat n, IsMonomialOrder n ord, IsMonomialOrder (n + 1) ord) => OrderedPolynomial k ord (n + 1) -> OrderedPolynomial k ord n Source #
normalize :: DecidableZero r => OrderedPolynomial r order n -> OrderedPolynomial r order n Source #
varX :: forall r n order. (CoeffRing r, KnownNat n, IsMonomialOrder n order, 0 < n) => OrderedPolynomial r order n Source #
getTerms :: OrderedPolynomial k order n -> [(k, OrderedMonomial order n)] Source #
shiftR :: forall k r n ord. (CoeffRing r, KnownNat n, IsMonomialOrder n ord, IsMonomialOrder (k + n) ord) => SNat k -> OrderedPolynomial r ord n -> OrderedPolynomial r ord (k + n) Source #
orderedBy :: OrderedPolynomial k o n -> o -> OrderedPolynomial k o n Source #
mapCoeff :: (KnownNat n, CoeffRing b, IsMonomialOrder n ord) => (a -> b) -> OrderedPolynomial a ord n -> OrderedPolynomial b ord n Source #
reversal :: (CoeffRing k, IsMonomialOrder 1 o) => Int -> OrderedPolynomial k o 1 -> OrderedPolynomial k o 1 Source #
padeApprox :: (Field r, DecidableUnits r, CoeffRing r, ZeroProductSemiring r, IsMonomialOrder 1 order) => Natural -> Natural -> OrderedPolynomial r order 1 -> (OrderedPolynomial r order 1, OrderedPolynomial r order 1) Source #
eval :: (CoeffRing r, IsMonomialOrder n order, KnownNat n) => Sized n r -> OrderedPolynomial r order n -> r Source #
Evaluate polynomial at some point.
evalUnivariate :: (CoeffRing b, IsMonomialOrder 1 order) => b -> OrderedPolynomial b order 1 -> b Source #
substUnivariate :: (Module (Scalar r) b, Unital b, CoeffRing r, IsMonomialOrder 1 order) => b -> OrderedPolynomial r order 1 -> b Source #
Substitute univariate polynomial using Horner's rule
minpolRecurrent :: forall k. (Eq k, ZeroProductSemiring k, DecidableUnits k, DecidableZero k, Field k) => Natural -> [k] -> Polynomial k 1 Source #
class IsOrder (n :: Nat) ordering where #
Class to lookup ordering from its (type-level) name.
cmpMonomial :: Proxy ordering -> MonomialOrder n #
Instances
newtype PadPolyL n ord poly Source #
PadPolyL | |
|
Instances
padLeftPoly :: (IsMonomialOrder n ord, IsPolynomial poly) => SNat n -> ord -> poly -> PadPolyL n ord poly Source #
Orphan instances
(KnownNat n, Eq r, DecidableUnits r, DecidableZero r, Field r, IsMonomialOrder n ord, ZeroProductSemiring r) => UFD (OrderedPolynomial r ord n) Source # | |
(KnownNat n, Eq r, DecidableUnits r, DecidableZero r, Field r, IsMonomialOrder n ord, ZeroProductSemiring r) => GCDDomain (OrderedPolynomial r ord n) Source # | |
gcd :: OrderedPolynomial r ord n -> OrderedPolynomial r ord n -> OrderedPolynomial r ord n # reduceFraction :: OrderedPolynomial r ord n -> OrderedPolynomial r ord n -> (OrderedPolynomial r ord n, OrderedPolynomial r ord n) # lcm :: OrderedPolynomial r ord n -> OrderedPolynomial r ord n -> OrderedPolynomial r ord n # |