A module defining the algebra of commutative polynomials over a field k
- data GlexMonomial v = Glex Int [(v, Int)]
- type GlexPoly k v = Vect k (GlexMonomial v)
- class Monomial m where
- bind :: (Monomial m, Num k, Ord b, Show b, Algebra k b) => Vect k (m v) -> (v -> Vect k b) -> Vect k b
- class DivisionBasis b where
- (%%) :: (Fractional k, Ord b, Show b, Algebra k b, DivisionBasis b) => Vect k b -> [Vect k b] -> Vect k b
Documentation
data GlexMonomial v Source
Monomial GlexMonomial | |
(Num k, Ord v) => Algebra k (GlexMonomial v) | |
Eq v => Eq (GlexMonomial v) | |
Ord v => Ord (GlexMonomial v) | |
Show v => Show (GlexMonomial v) | |
Ord v => DivisionBasis (GlexMonomial v) |
type GlexPoly k v = Vect k (GlexMonomial v)Source
bind :: (Monomial m, Num k, Ord b, Show b, Algebra k b) => Vect k (m v) -> (v -> Vect k b) -> Vect k bSource
In effect, we have (Num k, Monomial m) => Monad (v -> Vect k (m v)), with return = var, and (>>=) = bind. However, we can't express this directly in Haskell, firstly because of the Ord b constraint, secondly because Haskell doesn't support type functions.
class DivisionBasis b whereSource
Ord v => DivisionBasis (GlexMonomial v) |
(%%) :: (Fractional k, Ord b, Show b, Algebra k b, DivisionBasis b) => Vect k b -> [Vect k b] -> Vect k bSource