halg-polynomials-0.6.0.0: Polynomial rings and basic Gröbner basis computation, part of halg computational algebra suite.

Safe HaskellNone
LanguageHaskell2010

Algebra.Ring.Polynomial.Labeled

Synopsis

Documentation

class UniqueList xs => IsUniqueList (xs :: [Symbol]) Source #

Instances
UniqueList xs => IsUniqueList xs Source # 
Instance details

data LabPolynomial poly (vars :: [Symbol]) where Source #

Constructors

LabelPolynomial :: (IsUniqueList vars, Length vars ~ Arity poly) => {..} -> LabPolynomial poly vars 

Fields

Instances
(KnownSymbol symb, SingI vars, UniqueList vars, IsPolynomial poly, Wraps vars poly, Elem symb vars ~ True) => IsLabel symb (LabPolynomial poly vars) Source #

This instance allows something like #x :: LabPolynomial (OrderedPolynomial Integer Grevlex 3) '["x", "y", "z"].

Instance details

Methods

fromLabel :: LabPolynomial poly vars #

(Wraps vars poly, RightModule Integer poly) => RightModule Integer (LabPolynomial poly vars) Source # 
Instance details

Methods

(*.) :: LabPolynomial poly vars -> Integer -> LabPolynomial poly vars #

(Wraps vars poly, RightModule Natural poly) => RightModule Natural (LabPolynomial poly vars) Source # 
Instance details

Methods

(*.) :: LabPolynomial poly vars -> Natural -> LabPolynomial poly vars #

(Wraps vars poly, LeftModule Integer poly) => LeftModule Integer (LabPolynomial poly vars) Source # 
Instance details

Methods

(.*) :: Integer -> LabPolynomial poly vars -> LabPolynomial poly vars #

(Wraps vars poly, LeftModule Natural poly) => LeftModule Natural (LabPolynomial poly vars) Source # 
Instance details

Methods

(.*) :: Natural -> LabPolynomial poly vars -> LabPolynomial poly vars #

(Wraps vars poly, RightModule (Scalar r) poly) => RightModule (Scalar r) (LabPolynomial poly vars) Source # 
Instance details

Methods

(*.) :: LabPolynomial poly vars -> Scalar r -> LabPolynomial poly vars #

(Wraps vars poly, LeftModule (Scalar r) poly) => LeftModule (Scalar r) (LabPolynomial poly vars) Source # 
Instance details

Methods

(.*) :: Scalar r -> LabPolynomial poly vars -> LabPolynomial poly vars #

(Wraps vars poly, Eq poly) => Eq (LabPolynomial poly vars) Source # 
Instance details

Methods

(==) :: LabPolynomial poly vars -> LabPolynomial poly vars -> Bool #

(/=) :: LabPolynomial poly vars -> LabPolynomial poly vars -> Bool #

(UniqueList vars, Arity poly ~ Length vars, Num poly) => Num (LabPolynomial poly vars) Source # 
Instance details

Methods

(+) :: LabPolynomial poly vars -> LabPolynomial poly vars -> LabPolynomial poly vars #

(-) :: LabPolynomial poly vars -> LabPolynomial poly vars -> LabPolynomial poly vars #

(*) :: LabPolynomial poly vars -> LabPolynomial poly vars -> LabPolynomial poly vars #

negate :: LabPolynomial poly vars -> LabPolynomial poly vars #

abs :: LabPolynomial poly vars -> LabPolynomial poly vars #

signum :: LabPolynomial poly vars -> LabPolynomial poly vars #

fromInteger :: Integer -> LabPolynomial poly vars #

(Wraps vars poly, Ord poly) => Ord (LabPolynomial poly vars) Source # 
Instance details

Methods

compare :: LabPolynomial poly vars -> LabPolynomial poly vars -> Ordering #

(<) :: LabPolynomial poly vars -> LabPolynomial poly vars -> Bool #

(<=) :: LabPolynomial poly vars -> LabPolynomial poly vars -> Bool #

(>) :: LabPolynomial poly vars -> LabPolynomial poly vars -> Bool #

(>=) :: LabPolynomial poly vars -> LabPolynomial poly vars -> Bool #

max :: LabPolynomial poly vars -> LabPolynomial poly vars -> LabPolynomial poly vars #

min :: LabPolynomial poly vars -> LabPolynomial poly vars -> LabPolynomial poly vars #

(PrettyCoeff (Coefficient poly), IsOrderedPolynomial poly, SingI vars) => Show (LabPolynomial poly vars) Source # 
Instance details

Methods

showsPrec :: Int -> LabPolynomial poly vars -> ShowS #

show :: LabPolynomial poly vars -> String #

showList :: [LabPolynomial poly vars] -> ShowS #

(UFD poly, Wraps vars poly) => UFD (LabPolynomial poly vars) Source # 
Instance details
(PID poly, Wraps vars poly) => PID (LabPolynomial poly vars) Source # 
Instance details

Methods

egcd :: LabPolynomial poly vars -> LabPolynomial poly vars -> (LabPolynomial poly vars, LabPolynomial poly vars, LabPolynomial poly vars) #

(IntegralDomain poly, Wraps vars poly) => IntegralDomain (LabPolynomial poly vars) Source # 
Instance details

Methods

divides :: LabPolynomial poly vars -> LabPolynomial poly vars -> Bool #

maybeQuot :: LabPolynomial poly vars -> LabPolynomial poly vars -> Maybe (LabPolynomial poly vars) #

(GCDDomain poly, Wraps vars poly) => GCDDomain (LabPolynomial poly vars) Source # 
Instance details

Methods

gcd :: LabPolynomial poly vars -> LabPolynomial poly vars -> LabPolynomial poly vars #

reduceFraction :: LabPolynomial poly vars -> LabPolynomial poly vars -> (LabPolynomial poly vars, LabPolynomial poly vars) #

lcm :: LabPolynomial poly vars -> LabPolynomial poly vars -> LabPolynomial poly vars #

(Euclidean poly, Wraps vars poly) => Euclidean (LabPolynomial poly vars) Source # 
Instance details

Methods

degree :: LabPolynomial poly vars -> Maybe Natural #

divide :: LabPolynomial poly vars -> LabPolynomial poly vars -> (LabPolynomial poly vars, LabPolynomial poly vars) #

quot :: LabPolynomial poly vars -> LabPolynomial poly vars -> LabPolynomial poly vars #

rem :: LabPolynomial poly vars -> LabPolynomial poly vars -> LabPolynomial poly vars #

(ZeroProductSemiring poly, Wraps vars poly) => ZeroProductSemiring (LabPolynomial poly vars) Source # 
Instance details
(UnitNormalForm poly, Wraps vars poly) => UnitNormalForm (LabPolynomial poly vars) Source # 
Instance details

Methods

splitUnit :: LabPolynomial poly vars -> (LabPolynomial poly vars, LabPolynomial poly vars) #

(Wraps vars poly, Ring poly) => Ring (LabPolynomial poly vars) Source # 
Instance details

Methods

fromInteger :: Integer -> LabPolynomial poly vars

(Wraps vars poly, Rig poly) => Rig (LabPolynomial poly vars) Source # 
Instance details

Methods

fromNatural :: Natural -> LabPolynomial poly vars #

(Wraps vars poly, DecidableZero poly) => DecidableZero (LabPolynomial poly vars) Source # 
Instance details

Methods

isZero :: LabPolynomial poly vars -> Bool #

(DecidableUnits poly, Wraps vars poly) => DecidableUnits (LabPolynomial poly vars) Source # 
Instance details

Methods

recipUnit :: LabPolynomial poly vars -> Maybe (LabPolynomial poly vars) #

isUnit :: LabPolynomial poly vars -> Bool #

(^?) :: Integral n => LabPolynomial poly vars -> n -> Maybe (LabPolynomial poly vars) #

(DecidableAssociates poly, Wraps vars poly) => DecidableAssociates (LabPolynomial poly vars) Source # 
Instance details

Methods

isAssociate :: LabPolynomial poly vars -> LabPolynomial poly vars -> Bool #

(Wraps vars poly, Unital poly) => Unital (LabPolynomial poly vars) Source # 
Instance details

Methods

one :: LabPolynomial poly vars #

pow :: LabPolynomial poly vars -> Natural -> LabPolynomial poly vars #

productWith :: Foldable f => (a -> LabPolynomial poly vars) -> f a -> LabPolynomial poly vars #

(Wraps vars poly, Commutative poly) => Commutative (LabPolynomial poly vars) Source # 
Instance details
(Wraps vars poly, Semiring poly) => Semiring (LabPolynomial poly vars) Source # 
Instance details
(Wraps vars poly, Multiplicative poly) => Multiplicative (LabPolynomial poly vars) Source # 
Instance details

Methods

(*) :: LabPolynomial poly vars -> LabPolynomial poly vars -> LabPolynomial poly vars #

pow1p :: LabPolynomial poly vars -> Natural -> LabPolynomial poly vars #

productWith1 :: Foldable1 f => (a -> LabPolynomial poly vars) -> f a -> LabPolynomial poly vars #

(Wraps vars poly, Monoidal poly) => Monoidal (LabPolynomial poly vars) Source # 
Instance details

Methods

zero :: LabPolynomial poly vars #

sinnum :: Natural -> LabPolynomial poly vars -> LabPolynomial poly vars #

sumWith :: Foldable f => (a -> LabPolynomial poly vars) -> f a -> LabPolynomial poly vars #

(Wraps vars poly, Group poly) => Group (LabPolynomial poly vars) Source # 
Instance details

Methods

(-) :: LabPolynomial poly vars -> LabPolynomial poly vars -> LabPolynomial poly vars #

negate :: LabPolynomial poly vars -> LabPolynomial poly vars #

subtract :: LabPolynomial poly vars -> LabPolynomial poly vars -> LabPolynomial poly vars #

times :: Integral n => n -> LabPolynomial poly vars -> LabPolynomial poly vars #

(Wraps vars poly, Additive poly) => Additive (LabPolynomial poly vars) Source # 
Instance details

Methods

(+) :: LabPolynomial poly vars -> LabPolynomial poly vars -> LabPolynomial poly vars #

sinnum1p :: Natural -> LabPolynomial poly vars -> LabPolynomial poly vars #

sumWith1 :: Foldable1 f => (a -> LabPolynomial poly vars) -> f a -> LabPolynomial poly vars #

(Wraps vars poly, Abelian poly) => Abelian (LabPolynomial poly vars) Source # 
Instance details
(IsPolynomial poly, Wraps vars poly) => IsPolynomial (LabPolynomial poly vars) Source # 
Instance details

Associated Types

type Coefficient (LabPolynomial poly vars) :: Type #

type Arity (LabPolynomial poly vars) :: Nat #

Methods

liftMap :: (Module (Scalar (Coefficient (LabPolynomial poly vars))) alg, Ring alg, Commutative alg) => (Ordinal (Arity (LabPolynomial poly vars)) -> alg) -> LabPolynomial poly vars -> alg #

subst :: (Ring alg, Commutative alg, Module (Scalar (Coefficient (LabPolynomial poly vars))) alg) => Sized (Arity (LabPolynomial poly vars)) alg -> LabPolynomial poly vars -> alg #

substWith :: Ring m => (Coefficient (LabPolynomial poly vars) -> m -> m) -> Sized (Arity (LabPolynomial poly vars)) m -> LabPolynomial poly vars -> m #

sArity' :: LabPolynomial poly vars -> SNat (Arity (LabPolynomial poly vars)) #

sArity :: proxy (LabPolynomial poly vars) -> SNat (Arity (LabPolynomial poly vars)) #

arity :: proxy (LabPolynomial poly vars) -> Integer #

injectCoeff :: Coefficient (LabPolynomial poly vars) -> LabPolynomial poly vars #

injectCoeff' :: proxy (LabPolynomial poly vars) -> Coefficient (LabPolynomial poly vars) -> LabPolynomial poly vars #

monomials :: LabPolynomial poly vars -> HashSet (Monomial (Arity (LabPolynomial poly vars))) #

terms' :: LabPolynomial poly vars -> Map (Monomial (Arity (LabPolynomial poly vars))) (Coefficient (LabPolynomial poly vars)) #

coeff' :: Monomial (Arity (LabPolynomial poly vars)) -> LabPolynomial poly vars -> Coefficient (LabPolynomial poly vars) #

constantTerm :: LabPolynomial poly vars -> Coefficient (LabPolynomial poly vars) #

fromMonomial :: Monomial (Arity (LabPolynomial poly vars)) -> LabPolynomial poly vars #

toPolynomial' :: (Coefficient (LabPolynomial poly vars), Monomial (Arity (LabPolynomial poly vars))) -> LabPolynomial poly vars #

polynomial' :: Map (Monomial (Arity (LabPolynomial poly vars))) (Coefficient (LabPolynomial poly vars)) -> LabPolynomial poly vars #

totalDegree' :: LabPolynomial poly vars -> Natural #

var :: Ordinal (Arity (LabPolynomial poly vars)) -> LabPolynomial poly vars #

mapCoeff' :: (Coefficient (LabPolynomial poly vars) -> Coefficient (LabPolynomial poly vars)) -> LabPolynomial poly vars -> LabPolynomial poly vars #

(>|*) :: Monomial (Arity (LabPolynomial poly vars)) -> LabPolynomial poly vars -> LabPolynomial poly vars #

(*|<) :: LabPolynomial poly vars -> Monomial (Arity (LabPolynomial poly vars)) -> LabPolynomial poly vars #

(!*) :: Coefficient (LabPolynomial poly vars) -> LabPolynomial poly vars -> LabPolynomial poly vars #

_Terms' :: Iso' (LabPolynomial poly vars) (Map (Monomial (Arity (LabPolynomial poly vars))) (Coefficient (LabPolynomial poly vars))) #

mapMonomial :: (Monomial (Arity (LabPolynomial poly vars)) -> Monomial (Arity (LabPolynomial poly vars))) -> LabPolynomial poly vars -> LabPolynomial poly vars #

(IsOrderedPolynomial poly, Wraps vars poly) => IsOrderedPolynomial (LabPolynomial poly vars) Source # 
Instance details

Associated Types

type MOrder (LabPolynomial poly vars) :: Type #

Methods

coeff :: OrderedMonomial (MOrder (LabPolynomial poly vars)) (Arity (LabPolynomial poly vars)) -> LabPolynomial poly vars -> Coefficient (LabPolynomial poly vars) #

terms :: LabPolynomial poly vars -> Map (OrderedMonomial (MOrder (LabPolynomial poly vars)) (Arity (LabPolynomial poly vars))) (Coefficient (LabPolynomial poly vars)) #

leadingTerm :: LabPolynomial poly vars -> (Coefficient (LabPolynomial poly vars), OrderedMonomial (MOrder (LabPolynomial poly vars)) (Arity (LabPolynomial poly vars))) #

leadingMonomial :: LabPolynomial poly vars -> OrderedMonomial (MOrder (LabPolynomial poly vars)) (Arity (LabPolynomial poly vars)) #

leadingCoeff :: LabPolynomial poly vars -> Coefficient (LabPolynomial poly vars) #

orderedMonomials :: LabPolynomial poly vars -> Set (OrderedMonomial (MOrder (LabPolynomial poly vars)) (Arity (LabPolynomial poly vars))) #

fromOrderedMonomial :: OrderedMonomial (MOrder (LabPolynomial poly vars)) (Arity (LabPolynomial poly vars)) -> LabPolynomial poly vars #

toPolynomial :: (Coefficient (LabPolynomial poly vars), OrderedMonomial (MOrder (LabPolynomial poly vars)) (Arity (LabPolynomial poly vars))) -> LabPolynomial poly vars #

polynomial :: Map (OrderedMonomial (MOrder (LabPolynomial poly vars)) (Arity (LabPolynomial poly vars))) (Coefficient (LabPolynomial poly vars)) -> LabPolynomial poly vars #

(>*) :: OrderedMonomial (MOrder (LabPolynomial poly vars)) (Arity (LabPolynomial poly vars)) -> LabPolynomial poly vars -> LabPolynomial poly vars #

(*<) :: LabPolynomial poly vars -> OrderedMonomial (MOrder (LabPolynomial poly vars)) (Arity (LabPolynomial poly vars)) -> LabPolynomial poly vars #

_Terms :: Iso' (LabPolynomial poly vars) (Map (OrderedMonomial (MOrder (LabPolynomial poly vars)) (Arity (LabPolynomial poly vars))) (Coefficient (LabPolynomial poly vars))) #

diff :: Ordinal (Arity (LabPolynomial poly vars)) -> LabPolynomial poly vars -> LabPolynomial poly vars #

mapMonomialMonotonic :: (OrderedMonomial (MOrder (LabPolynomial poly vars)) (Arity (LabPolynomial poly vars)) -> OrderedMonomial (MOrder (LabPolynomial poly vars)) (Arity (LabPolynomial poly vars))) -> LabPolynomial poly vars -> LabPolynomial poly vars #

type Arity (LabPolynomial poly vars) Source # 
Instance details
type Arity (LabPolynomial poly vars) = Arity poly
type Coefficient (LabPolynomial poly vars) Source # 
Instance details
type Coefficient (LabPolynomial poly vars) = Coefficient poly
type MOrder (LabPolynomial poly vars) Source # 
Instance details
type MOrder (LabPolynomial poly vars) = MOrder poly

type family LabPolynomial' r ord vars where ... Source #

Convenient type-synonym for LabPlynomial wrapping OrderedPolynomial and Unipol.

Equations

LabPolynomial' r ord '[x] = LabPolynomial (Unipol r) '[x] 
LabPolynomial' r ord vars = LabPolynomial (OrderedPolynomial r ord (Length vars)) vars 

type LabUnipol r sym = LabPolynomial (Unipol r) '[sym] Source #

Convenient type-synonym for LabPlynomial wrapping univariate polynomial Unipol.

canonicalMap :: forall xs ys poly poly'. (SingI xs, SingI ys, IsSubsetOf xs ys, Wraps xs poly, Wraps ys poly', IsPolynomial poly, IsPolynomial poly', Coefficient poly ~ Coefficient poly') => LabPolynomial poly xs -> LabPolynomial poly' ys Source #

canonicalMap' :: (SingI xs, SingI ys, IsSubsetOf xs ys, Wraps xs poly, Wraps ys poly', IsPolynomial poly, IsPolynomial poly', Coefficient poly ~ Coefficient poly') => proxy poly' -> proxy' ys -> LabPolynomial poly xs -> LabPolynomial poly' ys Source #

class All ((FlipSym0 @@ ElemSym0) @@ ys) xs ~ True => IsSubsetOf (xs :: [a]) (ys :: [a]) Source #

Instances
All (((FlipSym0 :: TyFun (TyFun a (TyFun [a] Bool -> Type) -> Type) (TyFun [a] (TyFun a Bool -> Type) -> Type) -> *) @@ (ElemSym0 :: TyFun a (TyFun [a] Bool -> Type) -> *)) @@ ys) xs ~ True => IsSubsetOf (xs :: [a]) (ys :: [a]) Source # 
Instance details

Methods

_suppress :: proxy xs -> proxy ys -> x -> x