Safe Haskell | None |
---|---|
Language | Haskell98 |
A module providing an efficient implementation of the Buchberger algorithm for calculating the (reduced) Groebner basis for an ideal, together with some straightforward applications.
- sPoly :: (Monomial b, Algebra k b, Ord b, Fractional k, Eq k) => Vect k b -> Vect k b -> Vect k b
- isGB :: (Monomial m, Algebra k m, Ord m, Fractional k, Eq k) => [Vect k m] -> Bool
- gb1 :: (Monomial m, Algebra k m, Ord m, Fractional k, Eq k) => [Vect k m] -> [Vect k m]
- pairWith :: (a1 -> a1 -> a) -> [a1] -> [a]
- reduce :: (Monomial m, Algebra k m, Ord m, Ord k, Fractional k) => [Vect k m] -> [Vect k m]
- gb2 :: (Monomial m, Algebra k m, Ord m, Ord k, Fractional k) => [Vect k m] -> [Vect k m]
- (!) :: [a] -> Int -> a
- gb2a :: (Monomial m, Algebra k m, Ord m, Ord k, Fractional k) => [Vect k m] -> [Vect k m]
- gb3 :: (Monomial m, Algebra k m, Ord m, Ord k, Fractional k) => [Vect k m] -> [Vect k m]
- gb4 :: (Monomial m, Algebra k m, Ord m, Ord k, Fractional k) => [Vect k m] -> [Vect k m]
- mergeBy :: (a -> a -> Ordering) -> [a] -> [a] -> [a]
- gb :: (Fractional k, Ord k, Monomial m, Ord m, Algebra k m) => [Vect k m] -> [Vect k m]
- sugar :: (Monomial m2, Monomial m1, Monomial m) => Vect b m1 -> Vect b1 m2 -> m -> Int
- cmpNormal :: (Ord t5, Ord t4) => ((t, t4), (t1, t5)) -> ((t2, t4), (t3, t5)) -> Ordering
- cmpSug :: (Ord t4, Ord t3, Ord t2, Num t2) => ((t2, t3), (t, t4)) -> ((t2, t3), (t1, t4)) -> Ordering
- memberGB :: (Monomial m, Algebra k m, Ord m, Fractional k, Eq k) => Vect k m -> [Vect k m] -> Bool
- memberI :: (Fractional k, Ord k, Monomial m, Ord m, Algebra k m) => Vect k m -> [Vect k m] -> Bool
- sumI :: (Fractional k, Ord k, Monomial m, Ord m, Algebra k m) => [Vect k m] -> [Vect k m] -> [Vect k m]
- productI :: (Fractional k, Ord k, Monomial m, Ord m, Algebra k m) => [Vect k m] -> [Vect k m] -> [Vect k m]
- intersectI :: (Fractional k, Ord k, Monomial m, Ord m) => [Vect k m] -> [Vect k m] -> [Vect k m]
- toElimFst :: (Mon b, Functor f) => f a -> f (Elim2 a b)
- toElimSnd :: (Mon a, Functor f) => f b -> f (Elim2 a b)
- isElimFst :: (Mon b, Eq b) => Vect b1 (Elim2 b t) -> Bool
- fromElimSnd :: Functor f => f (Elim2 t b) -> f b
- eliminateFst :: (Monomial t, Monomial b, Ord b1, Ord t, Ord b, Fractional b1) => [Vect b1 (Elim2 t b)] -> [Vect b1 b]
- quotientI :: (Fractional k, Ord k, Monomial m, Ord m, Algebra k m) => [Vect k m] -> [Vect k m] -> [Vect k m]
- quotientP :: (Monomial b, Algebra k b, Ord b, Ord k, Fractional k) => [Vect k b] -> Vect k b -> [Vect k b]
- eliminate :: (Eq k, Fractional k, Ord k, MonomialConstructor m, Monomial (m v), Ord (m v)) => [Vect k (m v)] -> [Vect k (m v)] -> [Vect k (m v)]
- mbasis :: (Ord t, Num t) => [t] -> [t]
- mbasisQA :: (Fractional k, Ord k, Monomial m, Ord m, Algebra k m) => [Vect k m] -> [Vect k m] -> [Vect k m]
- ltIdeal :: (Fractional k, Ord k, Monomial m, Ord m, Algebra k m) => [Vect k m] -> [Vect k m]
- numMonomials :: Integral a => a -> a -> Integer
- hilbertFunQA :: (Fractional k, Ord k, Monomial m, Ord m, Algebra k m) => [Vect k m] -> [Vect k m] -> Int -> Integer
- hilbertSeriesQA1 :: (Monomial m, Algebra k m, Ord m, Ord k, Fractional k) => [Vect k m] -> [Vect k m] -> [Int]
- hilbertSeriesQA :: (Fractional k, Ord k, Monomial m, Ord m, Algebra k m) => [Vect k m] -> [Vect k m] -> [Integer]
- hilbertSeriesQA' :: (Fractional k, Ord k, MonomialConstructor m, Ord (m v), Monomial (m v), Algebra k (m v)) => [Vect k (m v)] -> [Integer]
- hilbertPolyQA :: (Fractional k, Ord k, Monomial m, Ord m, Algebra k m) => [Vect k m] -> [Vect k m] -> GlexPoly Q String
- hilbertPolyQA' :: (Fractional k, Ord k, MonomialConstructor m, Ord (m v), Monomial (m v), Algebra k (m v)) => [Vect k (m v)] -> GlexPoly Q String
- dim :: (Monomial m, Algebra k m, Ord m, Ord k, Fractional k) => [Vect k m] -> [Vect k m] -> Int
- dim' :: (Monomial (m v), MonomialConstructor m, Algebra k (m v), Ord (m v), Ord k, Fractional k) => [Vect k (m v)] -> Int
Documentation
sPoly :: (Monomial b, Algebra k b, Ord b, Fractional k, Eq k) => Vect k b -> Vect k b -> Vect k b Source
gb :: (Fractional k, Ord k, Monomial m, Ord m, Algebra k m) => [Vect k m] -> [Vect k m] Source
Given a list of polynomials over a field, return a Groebner basis for the ideal generated by the polynomials.
cmpSug :: (Ord t4, Ord t3, Ord t2, Num t2) => ((t2, t3), (t, t4)) -> ((t2, t3), (t1, t4)) -> Ordering Source
memberGB :: (Monomial m, Algebra k m, Ord m, Fractional k, Eq k) => Vect k m -> [Vect k m] -> Bool Source
memberI :: (Fractional k, Ord k, Monomial m, Ord m, Algebra k m) => Vect k m -> [Vect k m] -> Bool Source
memberI f gs
returns whether f is in the ideal generated by gs
sumI :: (Fractional k, Ord k, Monomial m, Ord m, Algebra k m) => [Vect k m] -> [Vect k m] -> [Vect k m] Source
Given ideals I and J, their sum is defined as I+J = {f+g | f <- I, g <- J}.
If fs and gs are generators for I and J, then sumI fs gs
returns generators for I+J.
The geometric interpretation is that the variety of the sum is the intersection of the varieties, ie V(I+J) = V(I) intersect V(J)
productI :: (Fractional k, Ord k, Monomial m, Ord m, Algebra k m) => [Vect k m] -> [Vect k m] -> [Vect k m] Source
Given ideals I and J, their product I.J is the ideal generated by all products {f.g | f <- I, g <- J}.
If fs and gs are generators for I and J, then productI fs gs
returns generators for I.J.
The geometric interpretation is that the variety of the product is the union of the varieties, ie V(I.J) = V(I) union V(J)
intersectI :: (Fractional k, Ord k, Monomial m, Ord m) => [Vect k m] -> [Vect k m] -> [Vect k m] Source
The intersection of ideals I and J is the set of all polynomials which belong to both I and J.
If fs and gs are generators for I and J, then intersectI fs gs
returns generators for the intersection of I and J
The geometric interpretation is that the variety of the intersection is the union of the varieties, ie V(I intersect J) = V(I) union V(J).
The reason for prefering the intersection over the product is that the intersection of radical ideals is radical, whereas the product need not be.
fromElimSnd :: Functor f => f (Elim2 t b) -> f b Source
eliminateFst :: (Monomial t, Monomial b, Ord b1, Ord t, Ord b, Fractional b1) => [Vect b1 (Elim2 t b)] -> [Vect b1 b] Source
quotientI :: (Fractional k, Ord k, Monomial m, Ord m, Algebra k m) => [Vect k m] -> [Vect k m] -> [Vect k m] Source
Given ideals I and J, their quotient is defined as I:J = {f | f <- R, f.g is in I for all g in J}.
If fs and gs are generators for I and J, then quotientI fs gs
returns generators for I:J.
The ideal quotient is the algebraic analogue of the Zariski closure of a difference of varieties. V(I:J) contains the Zariski closure of V(I)-V(J), with equality if k is algebraically closed and I is a radical ideal.
quotientP :: (Monomial b, Algebra k b, Ord b, Ord k, Fractional k) => [Vect k b] -> Vect k b -> [Vect k b] Source
eliminate :: (Eq k, Fractional k, Ord k, MonomialConstructor m, Monomial (m v), Ord (m v)) => [Vect k (m v)] -> [Vect k (m v)] -> [Vect k (m v)] Source
eliminate vs gs
returns the elimination ideal obtained from the ideal generated by gs by eliminating the variables vs.
mbasisQA :: (Fractional k, Ord k, Monomial m, Ord m, Algebra k m) => [Vect k m] -> [Vect k m] -> [Vect k m] Source
Given variables vs, and a Groebner basis gs, mbasisQA vs gs
returns a monomial basis for the quotient algebra k[vs]/<gs>.
For example, mbasisQA [x,y] [x^2+y^2-1]
returns a monomial basis for k[x,y]/<x^2+y^2-1>.
In general, the monomial basis is likely to be infinite.
ltIdeal :: (Fractional k, Ord k, Monomial m, Ord m, Algebra k m) => [Vect k m] -> [Vect k m] Source
Given an ideal I, the leading term ideal lt(I) consists of the leading terms of all elements of I.
If I is generated by gs, then ltIdeal gs
returns generators for lt(I).
numMonomials :: Integral a => a -> a -> Integer Source
hilbertFunQA :: (Fractional k, Ord k, Monomial m, Ord m, Algebra k m) => [Vect k m] -> [Vect k m] -> Int -> Integer Source
Given variables vs, and a homogeneous ideal gs, hilbertFunQA vs gs
returns the Hilbert function for the quotient algebra k[vs]/<gs>.
Given an integer i, the Hilbert function returns the number of degree i monomials in a basis for k[vs]/<gs>.
For a homogeneous ideal, this number is independent of the monomial ordering used
(even though the elements of the monomial basis themselves are dependent on the ordering).
If the ideal I is not homogeneous, then R/I is not graded, and the Hilbert function is not well-defined. Specifically, the number of degree i monomials in a basis is likely to depend on which monomial ordering you use.
hilbertSeriesQA1 :: (Monomial m, Algebra k m, Ord m, Ord k, Fractional k) => [Vect k m] -> [Vect k m] -> [Int] Source
hilbertSeriesQA :: (Fractional k, Ord k, Monomial m, Ord m, Algebra k m) => [Vect k m] -> [Vect k m] -> [Integer] Source
Given variables vs, and a homogeneous ideal gs, hilbertSeriesQA vs gs
returns the Hilbert series for the quotient algebra k[vs]/<gs>.
The Hilbert series should be interpreted as a formal power series where the coefficient of t^i is the Hilbert function evaluated at i.
That is, the i'th element in the series is the number of degree i monomials in a basis for k[vs]/<gs>.
hilbertSeriesQA' :: (Fractional k, Ord k, MonomialConstructor m, Ord (m v), Monomial (m v), Algebra k (m v)) => [Vect k (m v)] -> [Integer] Source
In the case where every variable v occurs in some generator g of the homogeneous ideal (the usual case),
then the vs can be inferred from the gs.
hilbertSeriesQA' gs
returns the Hilbert series for the quotient algebra k[vs]/<gs>.
hilbertPolyQA :: (Fractional k, Ord k, Monomial m, Ord m, Algebra k m) => [Vect k m] -> [Vect k m] -> GlexPoly Q String Source
For i >> 0, the Hilbert function becomes a polynomial in i, called the Hilbert polynomial.
hilbertPolyQA' :: (Fractional k, Ord k, MonomialConstructor m, Ord (m v), Monomial (m v), Algebra k (m v)) => [Vect k (m v)] -> GlexPoly Q String Source
dim :: (Monomial m, Algebra k m, Ord m, Ord k, Fractional k) => [Vect k m] -> [Vect k m] -> Int Source
dim' :: (Monomial (m v), MonomialConstructor m, Algebra k (m v), Ord (m v), Ord k, Fractional k) => [Vect k (m v)] -> Int Source