Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- type Monomial n = USized n Int
- newtype OrderedMonomial ordering n = OrderedMonomial (Monomial n)
- getMonomial :: OrderedMonomial ordering n -> Monomial n
- class IsOrder (n :: Nat) (ordering :: Type) where
- cmpMonomial :: Proxy ordering -> MonomialOrder n
- class IsOrder n name => IsMonomialOrder n name
- type MonomialOrder n = Monomial n -> Monomial n -> Ordering
- type IsStrongMonomialOrder ord = Forall (IsMonomialOrder' ord)
- isRelativelyPrime :: KnownNat n => OrderedMonomial ord n -> OrderedMonomial ord n -> Bool
- totalDegree :: OrderedMonomial ord n -> Int
- data ProductOrder (n :: Nat) (m :: Nat) (a :: Type) (b :: Type) where
- ProductOrder :: SNat n -> SNat m -> ord -> ord' -> ProductOrder n m ord ord'
- productOrder :: forall ord ord' n m. (IsOrder n ord, IsOrder m ord', KnownNat n, KnownNat m) => Proxy (ProductOrder n m ord ord') -> MonomialOrder (n + m)
- productOrder' :: forall n ord ord' m. (IsOrder n ord, IsOrder m ord') => SNat n -> SNat m -> ord -> ord' -> MonomialOrder (n + m)
- type WeightProxy (v :: [Nat]) = SList v
- data WeightOrder (v :: [Nat]) (ord :: Type) where
- WeightOrder :: SList (v :: [Nat]) -> Proxy ord -> WeightOrder v ord
- gcdMonomial :: KnownNat n => OrderedMonomial ord n -> OrderedMonomial ord n -> OrderedMonomial ord n
- divs :: KnownNat n => OrderedMonomial ord n -> OrderedMonomial ord n -> Bool
- isPowerOf :: KnownNat n => OrderedMonomial ord n -> OrderedMonomial ord n -> Bool
- tryDiv :: (KnownNat n, Field r) => (r, OrderedMonomial ord n) -> (r, OrderedMonomial ord n) -> (r, OrderedMonomial ord n)
- lcmMonomial :: KnownNat n => OrderedMonomial ord n -> OrderedMonomial ord n -> OrderedMonomial ord n
- data Lex = Lex
- class (IsMonomialOrder n ord, KnownNat n) => EliminationType n m ord
- type EliminationOrder n m = ProductOrder n m Grevlex Grevlex
- type WeightedEliminationOrder (n :: Nat) (ord :: Type) = WeightOrder (Replicate n 1) ord
- eliminationOrder :: SNat n -> SNat m -> EliminationOrder n m
- weightedEliminationOrder :: SNat n -> WeightedEliminationOrder n Grevlex
- lex :: KnownNat n => MonomialOrder n
- revlex :: KnownNat n => MonomialOrder n
- graded :: MonomialOrder n -> MonomialOrder n
- grlex :: KnownNat n => MonomialOrder n
- grevlex :: MonomialOrder n
- weightOrder :: forall n ns ord. (KnownNat n, IsOrder n ord, SingI ns) => Proxy (WeightOrder ns ord) -> MonomialOrder n
- data Grevlex = Grevlex
- fromList :: SNat n -> [Int] -> Monomial n
- data Revlex = Revlex
- data Grlex = Grlex
- newtype Graded ord = Graded ord
- castMonomial :: KnownNat m => OrderedMonomial o n -> OrderedMonomial o' m
- scastMonomial :: SNat m -> OrderedMonomial o n -> OrderedMonomial o m
- varMonom :: SNat n -> Ordinal n -> Monomial n
- changeMonomialOrder :: o' -> OrderedMonomial ord n -> OrderedMonomial o' n
- changeMonomialOrderProxy :: Proxy o' -> OrderedMonomial ord n -> OrderedMonomial o' n
- sOnes :: SNat n -> SList (Replicate n 1)
- withStrongMonomialOrder :: forall ord n r proxy (proxy' :: Nat -> Type). IsStrongMonomialOrder ord => proxy ord -> proxy' n -> (IsMonomialOrder n ord => r) -> r
- cmpAnyMonomial :: (IsStrongMonomialOrder ord, KnownNat n, KnownNat m) => Proxy ord -> Monomial n -> Monomial m -> Ordering
- orderMonomial :: proxy ord -> Monomial n -> OrderedMonomial ord n
- ifoldMapMonom :: (KnownNat n, Monoid m) => (Ordinal n -> Int -> m) -> Monomial n -> m
Documentation
newtype OrderedMonomial ordering n Source #
A wrapper for monomials with a certain (monomial) order.
Instances
getMonomial :: OrderedMonomial ordering n -> Monomial n Source #
class IsOrder (n :: Nat) (ordering :: Type) where Source #
Class to lookup ordering from its (type-level) name.
cmpMonomial :: Proxy ordering -> MonomialOrder n Source #
Instances
class IsOrder n name => IsMonomialOrder n name Source #
Class for Monomial' orders.
Instances
KnownNat n => IsMonomialOrder n Lex Source # | |
Defined in Algebra.Ring.Polynomial.Monomial | |
KnownNat n => IsMonomialOrder n Grevlex Source # | |
Defined in Algebra.Ring.Polynomial.Monomial | |
KnownNat n => IsMonomialOrder n Grlex Source # | |
Defined in Algebra.Ring.Polynomial.Monomial | |
IsMonomialOrder n ord => IsMonomialOrder n (Graded ord) Source # | |
Defined in Algebra.Ring.Polynomial.Monomial | |
(KnownNat k, SingI ws, IsMonomialOrder k ord) => IsMonomialOrder k (WeightOrder ws ord) Source # | |
Defined in Algebra.Ring.Polynomial.Monomial | |
(KnownNat n, KnownNat m, IsMonomialOrder n o, IsMonomialOrder m o', k ~ (n + m)) => IsMonomialOrder k (ProductOrder n m o o') Source # | |
Defined in Algebra.Ring.Polynomial.Monomial |
type MonomialOrder n = Monomial n -> Monomial n -> Ordering Source #
Monomial' order (of degree n). This should satisfy following laws: (1) Totality: forall a, b (a < b || a == b || b < a) (2) Additivity: a b == a + c <= b + c (3) Non-negative: forall a, 0 <= a
type IsStrongMonomialOrder ord = Forall (IsMonomialOrder' ord) Source #
Monomial' ordering which can do with monomials of arbitrary large arity.
isRelativelyPrime :: KnownNat n => OrderedMonomial ord n -> OrderedMonomial ord n -> Bool Source #
totalDegree :: OrderedMonomial ord n -> Int Source #
data ProductOrder (n :: Nat) (m :: Nat) (a :: Type) (b :: Type) where Source #
ProductOrder :: SNat n -> SNat m -> ord -> ord' -> ProductOrder n m ord ord' |
Instances
(KnownNat n, KnownNat m, IsMonomialOrder n ord, IsMonomialOrder m ord', k ~ (n + m), KnownNat k) => EliminationType k (n :: Nat) (ProductOrder n m ord ord') Source # | |
Defined in Algebra.Ring.Polynomial.Monomial | |
(KnownNat n, KnownNat m, IsMonomialOrder n o, IsMonomialOrder m o', k ~ (n + m)) => IsMonomialOrder k (ProductOrder n m o o') Source # | |
Defined in Algebra.Ring.Polynomial.Monomial | |
(IsOrder n ord, IsOrder m ord', KnownNat m, KnownNat n, k ~ (n + m)) => IsOrder k (ProductOrder n m ord ord') Source # | |
Defined in Algebra.Ring.Polynomial.Monomial cmpMonomial :: Proxy (ProductOrder n m ord ord') -> MonomialOrder k Source # |
productOrder :: forall ord ord' n m. (IsOrder n ord, IsOrder m ord', KnownNat n, KnownNat m) => Proxy (ProductOrder n m ord ord') -> MonomialOrder (n + m) Source #
productOrder' :: forall n ord ord' m. (IsOrder n ord, IsOrder m ord') => SNat n -> SNat m -> ord -> ord' -> MonomialOrder (n + m) Source #
type WeightProxy (v :: [Nat]) = SList v Source #
data WeightOrder (v :: [Nat]) (ord :: Type) where Source #
WeightOrder :: SList (v :: [Nat]) -> Proxy ord -> WeightOrder v ord |
Instances
(IsMonomialOrder k ord, ones ~ Replicate n 1, SingI ones, Length ones <= k, KnownNat k) => EliminationType k (n :: Nat) (WeightOrder ones ord) Source # | |
Defined in Algebra.Ring.Polynomial.Monomial | |
(KnownNat k, SingI ws, IsMonomialOrder k ord) => IsMonomialOrder k (WeightOrder ws ord) Source # | |
Defined in Algebra.Ring.Polynomial.Monomial | |
(KnownNat n, IsOrder n ord, SingI ws) => IsOrder n (WeightOrder ws ord) Source # | |
Defined in Algebra.Ring.Polynomial.Monomial cmpMonomial :: Proxy (WeightOrder ws ord) -> MonomialOrder n Source # |
gcdMonomial :: KnownNat n => OrderedMonomial ord n -> OrderedMonomial ord n -> OrderedMonomial ord n Source #
divs :: KnownNat n => OrderedMonomial ord n -> OrderedMonomial ord n -> Bool Source #
isPowerOf :: KnownNat n => OrderedMonomial ord n -> OrderedMonomial ord n -> Bool Source #
tryDiv :: (KnownNat n, Field r) => (r, OrderedMonomial ord n) -> (r, OrderedMonomial ord n) -> (r, OrderedMonomial ord n) Source #
lcmMonomial :: KnownNat n => OrderedMonomial ord n -> OrderedMonomial ord n -> OrderedMonomial ord n Source #
Lexicographical order
Instances
Eq Lex Source # | |
Ord Lex Source # | |
Show Lex Source # | |
KnownNat n => IsMonomialOrder n Lex Source # | |
Defined in Algebra.Ring.Polynomial.Monomial | |
KnownNat n => IsOrder n Lex Source # | |
Defined in Algebra.Ring.Polynomial.Monomial cmpMonomial :: Proxy Lex -> MonomialOrder n Source # | |
KnownNat n => EliminationType n (m :: k) Lex Source # | |
Defined in Algebra.Ring.Polynomial.Monomial |
class (IsMonomialOrder n ord, KnownNat n) => EliminationType n m ord Source #
Monomial' order which can be use to calculate n-th elimination ideal of m-ary polynomial. This should judge monomial to be bigger if it contains variables to eliminate.
Instances
KnownNat n => EliminationType n (m :: k) Lex Source # | |
Defined in Algebra.Ring.Polynomial.Monomial | |
(IsMonomialOrder k ord, ones ~ Replicate n 1, SingI ones, Length ones <= k, KnownNat k) => EliminationType k (n :: Nat) (WeightOrder ones ord) Source # | |
Defined in Algebra.Ring.Polynomial.Monomial | |
(KnownNat n, KnownNat m, IsMonomialOrder n ord, IsMonomialOrder m ord', k ~ (n + m), KnownNat k) => EliminationType k (n :: Nat) (ProductOrder n m ord ord') Source # | |
Defined in Algebra.Ring.Polynomial.Monomial |
type EliminationOrder n m = ProductOrder n m Grevlex Grevlex Source #
type WeightedEliminationOrder (n :: Nat) (ord :: Type) = WeightOrder (Replicate n 1) ord Source #
eliminationOrder :: SNat n -> SNat m -> EliminationOrder n m Source #
lex :: KnownNat n => MonomialOrder n Source #
Lexicographical order. This *is* a monomial order.
revlex :: KnownNat n => MonomialOrder n Source #
Reversed lexicographical order. This is *not* a monomial order.
graded :: MonomialOrder n -> MonomialOrder n Source #
Convert ordering into graded one.
grlex :: KnownNat n => MonomialOrder n Source #
Graded lexicographical order. This *is* a monomial order.
grevlex :: MonomialOrder n Source #
Graded reversed lexicographical order. This *is* a monomial order.
weightOrder :: forall n ns ord. (KnownNat n, IsOrder n ord, SingI ns) => Proxy (WeightOrder ns ord) -> MonomialOrder n Source #
Graded reversed lexicographical order. Same as Graded Revlex
.
Instances
Eq Grevlex Source # | |
Ord Grevlex Source # | |
Defined in Algebra.Ring.Polynomial.Monomial | |
Show Grevlex Source # | |
KnownNat n => IsMonomialOrder n Grevlex Source # | |
Defined in Algebra.Ring.Polynomial.Monomial | |
KnownNat n => IsOrder n Grevlex Source # | |
Defined in Algebra.Ring.Polynomial.Monomial cmpMonomial :: Proxy Grevlex -> MonomialOrder n Source # |
Reversed lexicographical order
Graded lexicographical order. Same as Graded Lex
.
Graded order from another monomial order.
Graded ord |
Instances
IsMonomialOrder n ord => IsMonomialOrder n (Graded ord) Source # | |
Defined in Algebra.Ring.Polynomial.Monomial | |
IsOrder n ord => IsOrder n (Graded ord) Source # | |
Defined in Algebra.Ring.Polynomial.Monomial cmpMonomial :: Proxy (Graded ord) -> MonomialOrder n Source # | |
Eq ord => Eq (Graded ord) Source # | |
Ord ord => Ord (Graded ord) Source # | |
Defined in Algebra.Ring.Polynomial.Monomial | |
Read ord => Read (Graded ord) Source # | |
Show ord => Show (Graded ord) Source # | |
castMonomial :: KnownNat m => OrderedMonomial o n -> OrderedMonomial o' m Source #
scastMonomial :: SNat m -> OrderedMonomial o n -> OrderedMonomial o m Source #
changeMonomialOrder :: o' -> OrderedMonomial ord n -> OrderedMonomial o' n Source #
changeMonomialOrderProxy :: Proxy o' -> OrderedMonomial ord n -> OrderedMonomial o' n Source #
withStrongMonomialOrder :: forall ord n r proxy (proxy' :: Nat -> Type). IsStrongMonomialOrder ord => proxy ord -> proxy' n -> (IsMonomialOrder n ord => r) -> r Source #
cmpAnyMonomial :: (IsStrongMonomialOrder ord, KnownNat n, KnownNat m) => Proxy ord -> Monomial n -> Monomial m -> Ordering Source #
Comparing monomials with different arity,
padding with 0
at bottom of the shorter monomial to
make the length equal.
orderMonomial :: proxy ord -> Monomial n -> OrderedMonomial ord n Source #